Commit 33106236 authored by Vladislav Vinogradov's avatar Vladislav Vinogradov

fixed bug in SURF_GPU (compute descriptors, tid < 25)

parent 6259520a
......@@ -831,6 +831,8 @@ namespace cv { namespace gpu { namespace surf
const int tid = threadIdx.y * blockDim.x + threadIdx.x;
if (tid < 25)
{
sdxabs[tid] = fabs(sdx[tid]); // |dx| array
sdyabs[tid] = fabs(sdy[tid]); // |dy| array
__syncthreads();
......@@ -849,6 +851,7 @@ namespace cv { namespace gpu { namespace surf
descriptors_block[3] = sdyabs[0];
}
}
}
__global__ void compute_descriptors128(PtrStepf descriptors, const float* featureX, const float* featureY, const float* featureSize, const float* featureDir)
{
......@@ -867,6 +870,8 @@ namespace cv { namespace gpu { namespace surf
const int tid = threadIdx.y * blockDim.x + threadIdx.x;
if (tid < 25)
{
if (sdy[tid] >= 0)
{
sd1[tid] = sdx[tid];
......@@ -926,6 +931,7 @@ namespace cv { namespace gpu { namespace surf
descriptors_block[7] = sdabs2[0];
}
}
}
template <int BLOCK_DIM_X> __global__ void normalize_descriptors(PtrStepf descriptors)
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment