From 0821c7ad1733ef7ece5c95fd0f6879ef379b004e Mon Sep 17 00:00:00 2001 From: Vladislav Vinogradov Date: Tue, 15 Feb 2011 08:57:35 +0000 Subject: [PATCH] fixed descriptor calculation in SURF_GPU --- modules/gpu/src/cuda/surf.cu | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/gpu/src/cuda/surf.cu b/modules/gpu/src/cuda/surf.cu index 8cdafb3ed0..c780f6e48a 100644 --- a/modules/gpu/src/cuda/surf.cu +++ b/modules/gpu/src/cuda/surf.cu @@ -1071,7 +1071,7 @@ namespace cv { namespace gpu { namespace surf } __device__ void calc_dx_dy_old(float sdx[25], float sdy[25], const KeyPoint_GPU* features, int tid) - { + { // get the interest point parameters (x, y, scale, strength, theta) __shared__ float ipt[5]; if (tid < 5) @@ -1081,7 +1081,7 @@ namespace cv { namespace gpu { namespace surf __syncthreads(); float sin_theta, cos_theta; - sincosf(ipt[SF_ANGLE], &sin_theta, &cos_theta); + sincosf(ipt[SF_ANGLE] * (CV_PI / 180.0f), &sin_theta, &cos_theta); // Compute sampling points // since grids are 2D, need to compute xBlock and yBlock indices