|
|
@ -831,6 +831,8 @@ namespace cv { namespace gpu { namespace surf |
|
|
|
|
|
|
|
|
|
|
|
const int tid = threadIdx.y * blockDim.x + threadIdx.x; |
|
|
|
const int tid = threadIdx.y * blockDim.x + threadIdx.x; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (tid < 25) |
|
|
|
|
|
|
|
{ |
|
|
|
sdxabs[tid] = fabs(sdx[tid]); // |dx| array |
|
|
|
sdxabs[tid] = fabs(sdx[tid]); // |dx| array |
|
|
|
sdyabs[tid] = fabs(sdy[tid]); // |dy| array |
|
|
|
sdyabs[tid] = fabs(sdy[tid]); // |dy| array |
|
|
|
__syncthreads(); |
|
|
|
__syncthreads(); |
|
|
@ -849,6 +851,7 @@ namespace cv { namespace gpu { namespace surf |
|
|
|
descriptors_block[3] = sdyabs[0]; |
|
|
|
descriptors_block[3] = sdyabs[0]; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
__global__ void compute_descriptors128(PtrStepf descriptors, const float* featureX, const float* featureY, const float* featureSize, const float* featureDir) |
|
|
|
__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; |
|
|
|
const int tid = threadIdx.y * blockDim.x + threadIdx.x; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (tid < 25) |
|
|
|
|
|
|
|
{ |
|
|
|
if (sdy[tid] >= 0) |
|
|
|
if (sdy[tid] >= 0) |
|
|
|
{ |
|
|
|
{ |
|
|
|
sd1[tid] = sdx[tid]; |
|
|
|
sd1[tid] = sdx[tid]; |
|
|
@ -926,6 +931,7 @@ namespace cv { namespace gpu { namespace surf |
|
|
|
descriptors_block[7] = sdabs2[0]; |
|
|
|
descriptors_block[7] = sdabs2[0]; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
template <int BLOCK_DIM_X> __global__ void normalize_descriptors(PtrStepf descriptors) |
|
|
|
template <int BLOCK_DIM_X> __global__ void normalize_descriptors(PtrStepf descriptors) |
|
|
|
{ |
|
|
|
{ |
|
|
|