fixed bug in SURF_GPU (compute descriptors, tid < 25)
This commit is contained in:
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user