fixed descriptor calculation in SURF_GPU
authorVladislav Vinogradov <no@email>
Tue, 15 Feb 2011 08:57:35 +0000 (08:57 +0000)
committerVladislav Vinogradov <no@email>
Tue, 15 Feb 2011 08:57:35 +0000 (08:57 +0000)
modules/gpu/src/cuda/surf.cu

index 8cdafb3ed00f56cc394b334d50774486ddc604ae..c780f6e48ae5ac907cdcb543907065e6b8d0e8dc 100644 (file)
@@ -1071,7 +1071,7 @@ namespace cv { namespace gpu { namespace surf
     }\r
 \r
     __device__ void calc_dx_dy_old(float sdx[25], float sdy[25], const KeyPoint_GPU* features, int tid)\r
-    {        \r
+    {\r
         // get the interest point parameters (x, y, scale, strength, theta)\r
         __shared__ float ipt[5];\r
         if (tid < 5)\r
@@ -1081,7 +1081,7 @@ namespace cv { namespace gpu { namespace surf
         __syncthreads();\r
 \r
         float sin_theta, cos_theta;\r
-        sincosf(ipt[SF_ANGLE], &sin_theta, &cos_theta);\r
+        sincosf(ipt[SF_ANGLE] * (CV_PI / 180.0f), &sin_theta, &cos_theta);\r
 \r
         // Compute sampling points\r
         // since grids are 2D, need to compute xBlock and yBlock indices\r