fixed some bugs, added tests for gpu::HOGDescriptor
This commit is contained in:
@@ -142,6 +142,7 @@ __global__ void compute_hists_kernel_many_blocks(const int img_block_width, cons
|
||||
const float* grad_ptr = grad.ptr(offset_y) + offset_x * 2;
|
||||
const unsigned char* qangle_ptr = qangle.ptr(offset_y) + offset_x * 2;
|
||||
|
||||
// 12 means that 12 pixels affect on block's cell (in one row)
|
||||
if (cell_thread_x < 12)
|
||||
{
|
||||
float* hist = hists + 12 * (cell_y * blockDim.z * CELLS_PER_BLOCK_Y +
|
||||
|
@@ -295,11 +295,6 @@ void cv::gpu::HOGDescriptor::detectMultiScale(const GpuMat& img, vector<Rect>& f
|
||||
}
|
||||
|
||||
|
||||
cv::gpu::GpuMat cv::gpu::HOGDescriptor::getLastBlockHists() const {
|
||||
return block_hists;
|
||||
}
|
||||
|
||||
|
||||
int cv::gpu::HOGDescriptor::numPartsWithin(int size, int part_size, int stride)
|
||||
{
|
||||
return (size - part_size + stride) / stride;
|
||||
|
@@ -68,7 +68,7 @@ namespace cv
|
||||
void GpuMat::release() { throw_nogpu(); }
|
||||
|
||||
void CudaMem::create(int /*_rows*/, int /*_cols*/, int /*_type*/, int /*type_alloc*/) { throw_nogpu(); }
|
||||
bool CudaMem::can_device_map_to_host() { throw_nogpu(); return false; }
|
||||
bool CudaMem::canMapHostMemory() { throw_nogpu(); return false; }
|
||||
void CudaMem::release() { throw_nogpu(); }
|
||||
GpuMat CudaMem::createGpuMatHeader () const { throw_nogpu(); return GpuMat(); }
|
||||
}
|
||||
|
Reference in New Issue
Block a user