include/opencv2/gpu/NCV.hpp File Reference

Go to the source code of this file.

Classes

struct  NcvCTprep::CT_ASSERT_FAILURE< true >
struct  NcvCTprep::assertTest< x >
struct  NcvRect8u
struct  NcvRect32s
struct  NcvRect32u
struct  NcvSize32s
struct  NcvSize32u
struct  NCVMemPtr
struct  NCVMemSegment
class  INCVMemAllocator
class  NCVMemStackAllocator
class  NCVMemNativeAllocator
class  NCVVector< T >
class  NCVVectorAlloc< T >
class  NCVVectorReuse< T >
class  NCVMatrix< T >
class  NCVMatrixAlloc< T >
class  NCVMatrixReuse< T >

Namespaces

namespace  NcvCTprep

Typedefs

typedef bool NcvBool
typedef long long Ncv64s
typedef uint64_t Ncv64u
typedef int Ncv32s
typedef unsigned int Ncv32u
typedef short Ncv16s
typedef unsigned short Ncv16u
typedef char Ncv8s
typedef unsigned char Ncv8u
typedef float Ncv32f
typedef double Ncv64f
typedef void NCVDebugOutputHandler (const char *msg)
typedef struct _NcvTimer * NcvTimer

Enumerations

enum  NCVStatus {
  NCV_SUCCESS, NCV_UNKNOWN_ERROR, NCV_CUDA_ERROR, NCV_NPP_ERROR,
  NCV_FILE_ERROR, NCV_NULL_PTR, NCV_INCONSISTENT_INPUT, NCV_TEXTURE_BIND_ERROR,
  NCV_DIMENSIONS_INVALID, NCV_INVALID_ROI, NCV_INVALID_STEP, NCV_INVALID_SCALE,
  NCV_ALLOCATOR_NOT_INITIALIZED, NCV_ALLOCATOR_BAD_ALLOC, NCV_ALLOCATOR_BAD_DEALLOC, NCV_ALLOCATOR_INSUFFICIENT_CAPACITY,
  NCV_ALLOCATOR_DEALLOC_ORDER, NCV_ALLOCATOR_BAD_REUSE, NCV_MEM_COPY_ERROR, NCV_MEM_RESIDENCE_ERROR,
  NCV_MEM_INSUFFICIENT_CAPACITY, NCV_HAAR_INVALID_PIXEL_STEP, NCV_HAAR_TOO_MANY_FEATURES_IN_CLASSIFIER, NCV_HAAR_TOO_MANY_FEATURES_IN_CASCADE,
  NCV_HAAR_TOO_LARGE_FEATURES, NCV_HAAR_XML_LOADING_EXCEPTION, NCV_NOIMPL_HAAR_TILTED_FEATURES, NCV_WARNING_HAAR_DETECTIONS_VECTOR_OVERFLOW,
  NPPST_SUCCESS = NCV_SUCCESS, NPPST_ERROR, NPPST_CUDA_KERNEL_EXECUTION_ERROR, NPPST_NULL_POINTER_ERROR,
  NPPST_TEXTURE_BIND_ERROR, NPPST_MEMCPY_ERROR, NPPST_MEM_ALLOC_ERR, NPPST_MEMFREE_ERR,
  NPPST_INVALID_ROI, NPPST_INVALID_STEP, NPPST_INVALID_SCALE, NPPST_MEM_INSUFFICIENT_BUFFER,
  NPPST_MEM_RESIDENCE_ERROR, NPPST_MEM_INTERNAL_ERROR
}
enum  NCVMemoryType { NCVMemoryTypeNone, NCVMemoryTypeHostPageable, NCVMemoryTypeHostPinned, NCVMemoryTypeDevice }

Functions

 NCV_CT_ASSERT (sizeof(NcvBool)<=4)
 NCV_CT_ASSERT (sizeof(Ncv64s)==8)
 NCV_CT_ASSERT (sizeof(Ncv64u)==8)
 NCV_CT_ASSERT (sizeof(Ncv32s)==4)
 NCV_CT_ASSERT (sizeof(Ncv32u)==4)
 NCV_CT_ASSERT (sizeof(Ncv16s)==2)
 NCV_CT_ASSERT (sizeof(Ncv16u)==2)
 NCV_CT_ASSERT (sizeof(Ncv8s)==1)
 NCV_CT_ASSERT (sizeof(Ncv8u)==1)
 NCV_CT_ASSERT (sizeof(Ncv32f)==4)
 NCV_CT_ASSERT (sizeof(Ncv64f)==8)
 NCV_CT_ASSERT (sizeof(NcvRect8u)==sizeof(Ncv32u))
 NCV_CT_ASSERT (sizeof(NcvRect32s)==4 *sizeof(Ncv32s))
 NCV_CT_ASSERT (sizeof(NcvRect32u)==4 *sizeof(Ncv32u))
 NCV_CT_ASSERT (sizeof(NcvSize32u)==2 *sizeof(Ncv32u))
NCV_EXPORTS void ncvDebugOutput (const char *msg,...)
NCV_EXPORTS void ncvSetDebugOutputHandler (NCVDebugOutputHandler *func)
NCV_EXPORTS NcvTimer ncvStartTimer (void)
NCV_EXPORTS double ncvEndQueryTimerUs (NcvTimer t)
NCV_EXPORTS double ncvEndQueryTimerMs (NcvTimer t)
NCV_EXPORTS Ncv32u alignUp (Ncv32u what, Ncv32u alignment)
NCV_EXPORTS NCVStatus memSegCopyHelper (void *dst, NCVMemoryType dstType, const void *src, NCVMemoryType srcType, size_t sz, cudaStream_t cuStream)
NCV_EXPORTS NCVStatus memSegCopyHelper2D (void *dst, Ncv32u dstPitch, NCVMemoryType dstType, const void *src, Ncv32u srcPitch, NCVMemoryType srcType, Ncv32u widthbytes, Ncv32u height, cudaStream_t cuStream)
NCV_EXPORTS NCVStatus ncvGroupRectangles_host (NCVVector< NcvRect32u > &hypotheses, Ncv32u &numHypotheses, Ncv32u minNeighbors, Ncv32f intersectEps, NCVVector< Ncv32u > *hypothesesWeights)
NCV_EXPORTS NCVStatus ncvDrawRects_8u_host (Ncv8u *h_dst, Ncv32u dstStride, Ncv32u dstWidth, Ncv32u dstHeight, NcvRect32u *h_rects, Ncv32u numRects, Ncv8u color)
NCV_EXPORTS NCVStatus ncvDrawRects_32u_host (Ncv32u *h_dst, Ncv32u dstStride, Ncv32u dstWidth, Ncv32u dstHeight, NcvRect32u *h_rects, Ncv32u numRects, Ncv32u color)
NCV_EXPORTS NCVStatus ncvDrawRects_8u_device (Ncv8u *d_dst, Ncv32u dstStride, Ncv32u dstWidth, Ncv32u dstHeight, NcvRect32u *d_rects, Ncv32u numRects, Ncv8u color, cudaStream_t cuStream)
NCV_EXPORTS NCVStatus ncvDrawRects_32u_device (Ncv32u *d_dst, Ncv32u dstStride, Ncv32u dstWidth, Ncv32u dstHeight, NcvRect32u *d_rects, Ncv32u numRects, Ncv32u color, cudaStream_t cuStream)

Variables

const Ncv32u K_WARP_SIZE = 32
const Ncv32u K_LOG2_WARP_SIZE = 5

Typedef Documentation

typedef bool NcvBool
typedef long long Ncv64s
typedef unsigned long long Ncv64u
typedef int Ncv32s
typedef unsigned int Ncv32u
typedef short Ncv16s
typedef unsigned short Ncv16u
typedef char Ncv8s
typedef unsigned char Ncv8u
typedef float Ncv32f
typedef double Ncv64f
typedef void NCVDebugOutputHandler(const char *msg)
typedef struct _NcvTimer* NcvTimer

Enumeration Type Documentation

enum NCVStatus

Return-codes for status notification, errors and warnings

Enumerator:
NCV_SUCCESS 
NCV_UNKNOWN_ERROR 
NCV_CUDA_ERROR 
NCV_NPP_ERROR 
NCV_FILE_ERROR 
NCV_NULL_PTR 
NCV_INCONSISTENT_INPUT 
NCV_TEXTURE_BIND_ERROR 
NCV_DIMENSIONS_INVALID 
NCV_INVALID_ROI 
NCV_INVALID_STEP 
NCV_INVALID_SCALE 
NCV_ALLOCATOR_NOT_INITIALIZED 
NCV_ALLOCATOR_BAD_ALLOC 
NCV_ALLOCATOR_BAD_DEALLOC 
NCV_ALLOCATOR_INSUFFICIENT_CAPACITY 
NCV_ALLOCATOR_DEALLOC_ORDER 
NCV_ALLOCATOR_BAD_REUSE 
NCV_MEM_COPY_ERROR 
NCV_MEM_RESIDENCE_ERROR 
NCV_MEM_INSUFFICIENT_CAPACITY 
NCV_HAAR_INVALID_PIXEL_STEP 
NCV_HAAR_TOO_MANY_FEATURES_IN_CLASSIFIER 
NCV_HAAR_TOO_MANY_FEATURES_IN_CASCADE 
NCV_HAAR_TOO_LARGE_FEATURES 
NCV_HAAR_XML_LOADING_EXCEPTION 
NCV_NOIMPL_HAAR_TILTED_FEATURES 
NCV_WARNING_HAAR_DETECTIONS_VECTOR_OVERFLOW 
NPPST_SUCCESS 

Successful operation (same as NPP_NO_ERROR).

NPPST_ERROR 

Unknown error.

NPPST_CUDA_KERNEL_EXECUTION_ERROR 

CUDA kernel execution error.

NPPST_NULL_POINTER_ERROR 

NULL pointer argument error.

NPPST_TEXTURE_BIND_ERROR 

CUDA texture binding error or non-zero offset returned.

NPPST_MEMCPY_ERROR 

CUDA memory copy error.

NPPST_MEM_ALLOC_ERR 

CUDA memory allocation error.

NPPST_MEMFREE_ERR 

CUDA memory deallocation error.

NPPST_INVALID_ROI 

Invalid region of interest argument.

NPPST_INVALID_STEP 

Invalid image lines step argument (check sign, alignment, relation to image width).

NPPST_INVALID_SCALE 

Invalid scale parameter passed.

NPPST_MEM_INSUFFICIENT_BUFFER 

Insufficient user-allocated buffer.

NPPST_MEM_RESIDENCE_ERROR 

Memory residence error detected (check if pointers should be device or pinned).

NPPST_MEM_INTERNAL_ERROR 

Internal memory management error.

NCVMemoryType

Enumerator:
NCVMemoryTypeNone 
NCVMemoryTypeHostPageable 
NCVMemoryTypeHostPinned 
NCVMemoryTypeDevice 

Function Documentation

NCV_CT_ASSERT ( sizeof(NcvBool)<=  4  ) 
NCV_CT_ASSERT ( sizeof(Ncv64s = =8  ) 
NCV_CT_ASSERT ( sizeof(Ncv64u = =8  ) 
NCV_CT_ASSERT ( sizeof(Ncv32s = =4  ) 
NCV_CT_ASSERT ( sizeof(Ncv32u = =4  ) 
NCV_CT_ASSERT ( sizeof(Ncv16s = =2  ) 
NCV_CT_ASSERT ( sizeof(Ncv16u = =2  ) 
NCV_CT_ASSERT ( sizeof(Ncv8s = =1  ) 
NCV_CT_ASSERT ( sizeof(Ncv8u = =1  ) 
NCV_CT_ASSERT ( sizeof(Ncv32f = =4  ) 
NCV_CT_ASSERT ( sizeof(Ncv64f = =8  ) 
NCV_CT_ASSERT ( sizeof(NcvRect8u = =sizeof(Ncv32u)  ) 
NCV_CT_ASSERT ( sizeof(NcvRect32s = =4 *sizeof(Ncv32s)  ) 
NCV_CT_ASSERT ( sizeof(NcvRect32u = =4 *sizeof(Ncv32u)  ) 
NCV_CT_ASSERT ( sizeof(NcvSize32u = =2 *sizeof(Ncv32u)  ) 
NCV_EXPORTS void ncvDebugOutput ( const char *  msg,
  ... 
)
NCV_EXPORTS void ncvSetDebugOutputHandler ( NCVDebugOutputHandler func  ) 
NCV_EXPORTS NcvTimer ncvStartTimer ( void   ) 
NCV_EXPORTS double ncvEndQueryTimerUs ( NcvTimer  t  ) 
NCV_EXPORTS double ncvEndQueryTimerMs ( NcvTimer  t  ) 
NCV_EXPORTS Ncv32u alignUp ( Ncv32u  what,
Ncv32u  alignment 
)

Calculates the aligned top bound value

NCV_EXPORTS NCVStatus memSegCopyHelper ( void *  dst,
NCVMemoryType  dstType,
const void *  src,
NCVMemoryType  srcType,
size_t  sz,
cudaStream_t  cuStream 
)

Copy dispatchers

NCV_EXPORTS NCVStatus memSegCopyHelper2D ( void *  dst,
Ncv32u  dstPitch,
NCVMemoryType  dstType,
const void *  src,
Ncv32u  srcPitch,
NCVMemoryType  srcType,
Ncv32u  widthbytes,
Ncv32u  height,
cudaStream_t  cuStream 
)
NCV_EXPORTS NCVStatus ncvGroupRectangles_host ( NCVVector< NcvRect32u > &  hypotheses,
Ncv32u numHypotheses,
Ncv32u  minNeighbors,
Ncv32f  intersectEps,
NCVVector< Ncv32u > *  hypothesesWeights 
)

Operations with rectangles

NCV_EXPORTS NCVStatus ncvDrawRects_8u_host ( Ncv8u h_dst,
Ncv32u  dstStride,
Ncv32u  dstWidth,
Ncv32u  dstHeight,
NcvRect32u h_rects,
Ncv32u  numRects,
Ncv8u  color 
)
NCV_EXPORTS NCVStatus ncvDrawRects_32u_host ( Ncv32u h_dst,
Ncv32u  dstStride,
Ncv32u  dstWidth,
Ncv32u  dstHeight,
NcvRect32u h_rects,
Ncv32u  numRects,
Ncv32u  color 
)
NCV_EXPORTS NCVStatus ncvDrawRects_8u_device ( Ncv8u d_dst,
Ncv32u  dstStride,
Ncv32u  dstWidth,
Ncv32u  dstHeight,
NcvRect32u d_rects,
Ncv32u  numRects,
Ncv8u  color,
cudaStream_t  cuStream 
)
NCV_EXPORTS NCVStatus ncvDrawRects_32u_device ( Ncv32u d_dst,
Ncv32u  dstStride,
Ncv32u  dstWidth,
Ncv32u  dstHeight,
NcvRect32u d_rects,
Ncv32u  numRects,
Ncv32u  color,
cudaStream_t  cuStream 
)

Variable Documentation

const Ncv32u K_WARP_SIZE = 32