gpu face detetcion:
1) fixed bug with error codes (enum NppStStatus) shift. 2) added some asserts
This commit is contained in:
parent
6f87567ee1
commit
cb63046dcf
3rdparty/NPP_staging
modules/gpu/src
samples/gpu
16
3rdparty/NPP_staging/npp_staging.h
vendored
16
3rdparty/NPP_staging/npp_staging.h
vendored
@ -188,14 +188,14 @@ struct NppStSize32u
|
||||
enum NppStStatus
|
||||
{
|
||||
//already present in NPP
|
||||
//NPP_SUCCESS = 0, ///< Successful operation (same as NPP_NO_ERROR)
|
||||
//NPP_ERROR = -1, ///< Unknown error
|
||||
//NPP_CUDA_KERNEL_EXECUTION_ERROR = -3, ///< CUDA kernel execution error
|
||||
//NPP_NULL_POINTER_ERROR = -4, ///< NULL pointer argument error
|
||||
//NPP_TEXTURE_BIND_ERROR = -24, ///< CUDA texture binding error or non-zero offset returned
|
||||
//NPP_MEMCPY_ERROR = -13, ///< CUDA memory copy error
|
||||
//NPP_MEM_ALLOC_ERR = -12, ///< CUDA memory allocation error
|
||||
//NPP_MEMFREE_ERR = -15, ///< CUDA memory deallocation error
|
||||
__NPP_SUCCESS = 0, ///< Successful operation (same as NPP_NO_ERROR)
|
||||
__NPP_ERROR = -1, ///< Unknown error
|
||||
__NPP_CUDA_KERNEL_EXECUTION_ERROR = -3, ///< CUDA kernel execution error
|
||||
__NPP_NULL_POINTER_ERROR = -4, ///< NULL pointer argument error
|
||||
__NPP_TEXTURE_BIND_ERROR = -24, ///< CUDA texture binding error or non-zero offset returned
|
||||
__NPP_MEMCPY_ERROR = -13, ///< CUDA memory copy error
|
||||
__NPP_MEM_ALLOC_ERR = -12, ///< CUDA memory allocation error
|
||||
__NPP_MEMFREE_ERR = -15, ///< CUDA memory deallocation error
|
||||
|
||||
//to be added
|
||||
NPP_INVALID_ROI, ///< Invalid region of interest argument
|
||||
|
@ -89,6 +89,7 @@ struct cv::gpu::CascadeClassifier_GPU::CascadeClassifierImpl
|
||||
src_seg.size = src.step * src.rows;
|
||||
|
||||
NCVMatrixReuse<Ncv8u> d_src(src_seg, devProp.textureAlignment, src.cols, src.rows, src.step, true);
|
||||
ncvAssertReturn(d_src.isMemReused(), NCV_ALLOCATOR_BAD_REUSE);
|
||||
|
||||
//NCVMatrixAlloc<Ncv8u> d_src(*gpuAllocator, src.cols, src.rows);
|
||||
//ncvAssertReturn(d_src.isMemAllocated(), NCV_ALLOCATOR_BAD_ALLOC);
|
||||
@ -106,6 +107,7 @@ struct cv::gpu::CascadeClassifier_GPU::CascadeClassifierImpl
|
||||
objects_seg.begin = objects_beg;
|
||||
objects_seg.size = objects.step * objects.rows;
|
||||
NCVVectorReuse<NcvRect32u> d_rects(objects_seg, objects.cols);
|
||||
ncvAssertReturn(d_rects.isMemReused(), NCV_ALLOCATOR_BAD_REUSE);
|
||||
//NCVVectorAlloc<NcvRect32u> d_rects(*gpuAllocator, 100);
|
||||
//ncvAssertReturn(d_rects.isMemAllocated(), NCV_ALLOCATOR_BAD_ALLOC);
|
||||
|
||||
|
@ -84,7 +84,7 @@ int main( int argc, const char** argv )
|
||||
|
||||
/* parameters */
|
||||
bool useGPU = true;
|
||||
double scale_factor = 2;
|
||||
double scale_factor = 1;
|
||||
|
||||
bool visualizeInPlace = false;
|
||||
bool findLargestObject = false;
|
||||
|
Loading…
x
Reference in New Issue
Block a user