OpenCV  3.2.0-dev
Open Source Computer Vision
Collaboration diagram for Legacy support:

Modules

 NPPST Core
 Basic functions for CUDA streams management.
 
 NPPST Image Processing
 
 NPPST Signal Processing
 

Namespaces

 NcvCTprep
 Compile-time assert namespace.
 

Classes

class  cv::cuda::BackgroundSubtractorFGD
 The class discriminates between foreground and background pixels by building and maintaining a model of the background. More...
 
class  cv::cuda::BackgroundSubtractorGMG
 Background/Foreground Segmentation Algorithm. More...
 
class  cv::cuda::FastOpticalFlowBM
 
struct  cv::cuda::FGDParams
 
struct  HaarClassifierCascadeDescriptor
 
struct  HaarClassifierNode128
 
struct  HaarClassifierNodeDescriptor32
 
struct  HaarFeature64
 
struct  HaarFeatureDescriptor32
 
struct  HaarStage64
 
class  cv::cuda::ImagePyramid
 
class  INCVMemAllocator
 INCVMemAllocator (Interface) More...
 
struct  NCVBroxOpticalFlowDescriptor
 Model and solver parameters. More...
 
class  NCVMatrix< T >
 NCVMatrix (2D) More...
 
class  NCVMatrixAlloc< T >
 NCVMatrixAlloc. More...
 
class  NCVMatrixReuse< T >
 NCVMatrixReuse. More...
 
class  NCVMemNativeAllocator
 NCVMemNativeAllocator. More...
 
struct  NCVMemPtr
 NCVMemPtr. More...
 
struct  NCVMemSegment
 NCVMemSegment. More...
 
class  NCVMemStackAllocator
 NCVMemStackAllocator. More...
 
struct  NcvPoint2D32s
 
struct  NcvPoint2D32u
 
struct  NcvRect32s
 
struct  NcvRect32u
 
struct  NcvRect8u
 
struct  NcvSize32s
 
struct  NcvSize32u
 
class  NCVVector< T >
 NCVVector (1D) More...
 
class  NCVVectorAlloc< T >
 NCVVectorAlloc. More...
 
class  NCVVectorReuse< T >
 NCVVectorReuse. More...
 

Macros

#define CLAMP(x, a, b)   ( (x) > (b) ? (b) : ( (x) < (a) ? (a) : (x) ) )
 
#define CLAMP_0_255(x)   CLAMP(x,0,255)
 
#define CLAMP_BOTTOM(x, a)   (((x) < (a)) ? (a) : (x))
 
#define CLAMP_TOP(x, a)   (((x) > (a)) ? (a) : (x))
 
#define HAAR_STDDEV_BORDER   1
 
#define NCV_CT_ASSERT(X)
 Performs compile-time assertion of a condition on the file scope. More...
 
#define NCV_CT_PREP_PASTE(a, b)   NCV_CT_PREP_PASTE_AUX(a, b)
 Concatenation macro. More...
 
#define NCV_CT_PREP_PASTE_AUX(a, b)   a##b
 Concatenation indirection macro. More...
 
#define NCV_RESET_SKIP_COND(x)   __ncv_skip_cond = x
 
#define NCV_SET_SKIP_COND(x)   bool __ncv_skip_cond = x
 
#define NCV_SKIP_COND_BEGIN   if (!__ncv_skip_cond) {
 
#define NCV_SKIP_COND_END   }
 
#define ncvAssertCUDALastErrorReturn(errCode)
 
#define ncvAssertCUDAReturn(cudacall, errCode)
 
#define ncvAssertPrintCheck(pred, msg)
 
#define ncvAssertPrintReturn(pred, msg, err)
 
#define ncvAssertReturn(pred, err)
 
#define ncvAssertReturnNcvStat(ncvOp)
 
#define ncvSafeMatAlloc(name, type, alloc, width, height, err)
 
#define OBJDET_MASK_ELEMENT_INVALID_32U   0xFFFFFFFF
 
#define RECT_SIMILARITY_PROPORTION   0.2f
 
#define SQR(x)   ((x)*(x))
 
#define SUB_BEGIN(type, name)   struct { __inline type name
 
#define SUB_CALL(name)   name.name
 
#define SUB_END(name)   } name;
 

Typedefs

typedef short Ncv16s
 
typedef unsigned short Ncv16u
 
typedef float Ncv32f
 
typedef Ncv32f Ncv32f_a
 
typedef int Ncv32s
 
typedef unsigned int Ncv32u
 
typedef Ncv32u Ncv32u_a
 
typedef double Ncv64f
 
typedef long long Ncv64s
 
typedef unsigned long long Ncv64u
 
typedef signed char Ncv8s
 
typedef unsigned char Ncv8u
 
typedef bool NcvBool
 
typedef void NCVDebugOutputHandler(const cv::String &msg)
 
typedef Ncv32u NCVStatus
 
typedef struct _NcvTimer * NcvTimer
 

Enumerations

enum  {
  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_NOT_IMPLEMENTED,
  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,
  NCV_LAST_STATUS
}
 Return-codes for status notification, errors and warnings. More...
 
enum  {
  NCVPipeObjDet_Default = 0x000,
  NCVPipeObjDet_UseFairImageScaling = 0x001,
  NCVPipeObjDet_FindLargestObject = 0x002,
  NCVPipeObjDet_VisualizeInPlace = 0x004
}
 
enum  NCVMemoryType {
  NCVMemoryTypeNone,
  NCVMemoryTypeHostPageable,
  NCVMemoryTypeHostPinned,
  NCVMemoryTypeDevice
}
 NCVMemoryType. More...
 

Functions

virtual INCVMemAllocator::~INCVMemAllocator ()=0
 
Ncv32u alignUp (Ncv32u what, Ncv32u alignment)
 Calculates the aligned top bound value. More...
 
void cv::cuda::calcOpticalFlowBM (const GpuMat &prev, const GpuMat &curr, Size block_size, Size shift_size, Size max_range, bool use_previous, GpuMat &velx, GpuMat &vely, GpuMat &buf, Stream &stream=Stream::Null())
 Calculates optical flow for 2 images using block matching algorithm */. More...
 
void cv::cuda::connectivityMask (const GpuMat &image, GpuMat &mask, const cv::Scalar &lo, const cv::Scalar &hi, Stream &stream=Stream::Null())
 compute mask for Generalized Flood fill componetns labeling. More...
 
Ptr< cuda::BackgroundSubtractorFGD > cv::cuda::createBackgroundSubtractorFGD (const FGDParams &params=FGDParams())
 Creates FGD Background Subtractor. More...
 
Ptr< cuda::BackgroundSubtractorGMG > cv::cuda::createBackgroundSubtractorGMG (int initializationFrames=120, double decisionThreshold=0.8)
 Creates GMG Background Subtractor. More...
 
Ptr< ImagePyramid > cv::cuda::createImagePyramid (InputArray img, int nLayers=-1, Stream &stream=Stream::Null())
 
void cv::cuda::createOpticalFlowNeedleMap (const GpuMat &u, const GpuMat &v, GpuMat &vertex, GpuMat &colors)
 
void cv::cuda::graphcut (GpuMat &terminals, GpuMat &leftTransp, GpuMat &rightTransp, GpuMat &top, GpuMat &bottom, GpuMat &labels, GpuMat &buf, Stream &stream=Stream::Null())
 performs labeling via graph cuts of a 2D regular 4-connected graph. More...
 
void cv::cuda::graphcut (GpuMat &terminals, GpuMat &leftTransp, GpuMat &rightTransp, GpuMat &top, GpuMat &topLeft, GpuMat &topRight, GpuMat &bottom, GpuMat &bottomLeft, GpuMat &bottomRight, GpuMat &labels, GpuMat &buf, Stream &stream=Stream::Null())
 performs labeling via graph cuts of a 2D regular 8-connected graph. More...
 
void cv::cuda::interpolateFrames (const GpuMat &frame0, const GpuMat &frame1, const GpuMat &fu, const GpuMat &fv, const GpuMat &bu, const GpuMat &bv, float pos, GpuMat &newFrame, GpuMat &buf, Stream &stream=Stream::Null())
 Interpolates frames (images) using provided optical flow (displacement field). More...
 
void cv::cuda::labelComponents (const GpuMat &mask, GpuMat &components, int flags=0, Stream &stream=Stream::Null())
 performs connected componnents labeling. More...
 
NCVStatus memSegCopyHelper (void *dst, NCVMemoryType dstType, const void *src, NCVMemoryType srcType, size_t sz, cudaStream_t cuStream)
 Copy dispatchers. More...
 
NCVStatus memSegCopyHelper2D (void *dst, Ncv32u dstPitch, NCVMemoryType dstType, const void *src, Ncv32u srcPitch, NCVMemoryType srcType, Ncv32u widthbytes, Ncv32u height, cudaStream_t cuStream)
 
 NCV_CT_ASSERT (sizeof(HaarFeature64)==8)
 
 NCV_CT_ASSERT (sizeof(HaarFeatureDescriptor32)==4)
 
 NCV_CT_ASSERT (sizeof(HaarClassifierNodeDescriptor32)==4)
 
 NCV_CT_ASSERT (sizeof(HaarClassifierNode128)==16)
 
 NCV_CT_ASSERT (sizeof(HaarStage64)==8)
 
NCVStatus ncvApplyHaarClassifierCascade_device (NCVMatrix< Ncv32u > &d_integralImage, NCVMatrix< Ncv32f > &d_weights, NCVMatrixAlloc< Ncv32u > &d_pixelMask, Ncv32u &numDetections, HaarClassifierCascadeDescriptor &haar, NCVVector< HaarStage64 > &h_HaarStages, NCVVector< HaarStage64 > &d_HaarStages, NCVVector< HaarClassifierNode128 > &d_HaarNodes, NCVVector< HaarFeature64 > &d_HaarFeatures, NcvBool bMaskElements, NcvSize32u anchorsRoi, Ncv32u pixelStep, Ncv32f scaleArea, INCVMemAllocator &gpuAllocator, INCVMemAllocator &cpuAllocator, cudaDeviceProp &devProp, cudaStream_t cuStream)
 
NCVStatus ncvApplyHaarClassifierCascade_host (NCVMatrix< Ncv32u > &h_integralImage, NCVMatrix< Ncv32f > &h_weights, NCVMatrixAlloc< Ncv32u > &h_pixelMask, Ncv32u &numDetections, HaarClassifierCascadeDescriptor &haar, NCVVector< HaarStage64 > &h_HaarStages, NCVVector< HaarClassifierNode128 > &h_HaarNodes, NCVVector< HaarFeature64 > &h_HaarFeatures, NcvBool bMaskElements, NcvSize32u anchorsRoi, Ncv32u pixelStep, Ncv32f scaleArea)
 
NCVStatus NCVBroxOpticalFlow (const NCVBroxOpticalFlowDescriptor desc, INCVMemAllocator &gpu_mem_allocator, const NCVMatrix< Ncv32f > &frame0, const NCVMatrix< Ncv32f > &frame1, NCVMatrix< Ncv32f > &u, NCVMatrix< Ncv32f > &v, cudaStream_t stream)
 Compute optical flow. More...
 
void ncvDebugOutput (const cv::String &msg)
 
NCVStatus ncvDetectObjectsMultiScale_device (NCVMatrix< Ncv8u > &d_srcImg, NcvSize32u srcRoi, NCVVector< NcvRect32u > &d_dstRects, Ncv32u &dstNumRects, HaarClassifierCascadeDescriptor &haar, NCVVector< HaarStage64 > &h_HaarStages, NCVVector< HaarStage64 > &d_HaarStages, NCVVector< HaarClassifierNode128 > &d_HaarNodes, NCVVector< HaarFeature64 > &d_HaarFeatures, NcvSize32u minObjSize, Ncv32u minNeighbors, Ncv32f scaleStep, Ncv32u pixelStep, Ncv32u flags, INCVMemAllocator &gpuAllocator, INCVMemAllocator &cpuAllocator, cudaDeviceProp &devProp, cudaStream_t cuStream)
 
NCVStatus ncvDrawRects_32u_device (Ncv32u *d_dst, Ncv32u dstStride, Ncv32u dstWidth, Ncv32u dstHeight, NcvRect32u *d_rects, Ncv32u numRects, Ncv32u color, cudaStream_t cuStream)
 
NCVStatus ncvDrawRects_32u_host (Ncv32u *h_dst, Ncv32u dstStride, Ncv32u dstWidth, Ncv32u dstHeight, NcvRect32u *h_rects, Ncv32u numRects, Ncv32u color)
 
NCVStatus ncvDrawRects_8u_device (Ncv8u *d_dst, Ncv32u dstStride, Ncv32u dstWidth, Ncv32u dstHeight, NcvRect32u *d_rects, Ncv32u numRects, Ncv8u color, cudaStream_t cuStream)
 
NCVStatus ncvDrawRects_8u_host (Ncv8u *h_dst, Ncv32u dstStride, Ncv32u dstWidth, Ncv32u dstHeight, NcvRect32u *h_rects, Ncv32u numRects, Ncv8u color)
 
double ncvEndQueryTimerMs (NcvTimer t)
 
double ncvEndQueryTimerUs (NcvTimer t)
 
NCVStatus ncvGroupRectangles_host (NCVVector< NcvRect32u > &hypotheses, Ncv32u &numHypotheses, Ncv32u minNeighbors, Ncv32f intersectEps, NCVVector< Ncv32u > *hypothesesWeights)
 Operations with rectangles. More...
 
NCVStatus ncvGrowDetectionsVector_device (NCVVector< Ncv32u > &pixelMask, Ncv32u numPixelMaskDetections, NCVVector< NcvRect32u > &hypotheses, Ncv32u &totalDetections, Ncv32u totalMaxDetections, Ncv32u rectWidth, Ncv32u rectHeight, Ncv32f curScale, cudaStream_t cuStream)
 
NCVStatus ncvGrowDetectionsVector_host (NCVVector< Ncv32u > &pixelMask, Ncv32u numPixelMaskDetections, NCVVector< NcvRect32u > &hypotheses, Ncv32u &totalDetections, Ncv32u totalMaxDetections, Ncv32u rectWidth, Ncv32u rectHeight, Ncv32f curScale)
 
NCVStatus ncvHaarGetClassifierSize (const cv::String &filename, Ncv32u &numStages, Ncv32u &numNodes, Ncv32u &numFeatures)
 
NCVStatus ncvHaarLoadFromFile_host (const cv::String &filename, HaarClassifierCascadeDescriptor &haar, NCVVector< HaarStage64 > &h_HaarStages, NCVVector< HaarClassifierNode128 > &h_HaarNodes, NCVVector< HaarFeature64 > &h_HaarFeatures)
 
NCVStatus ncvHaarStoreNVBIN_host (const cv::String &filename, HaarClassifierCascadeDescriptor haar, NCVVector< HaarStage64 > &h_HaarStages, NCVVector< HaarClassifierNode128 > &h_HaarNodes, NCVVector< HaarFeature64 > &h_HaarFeatures)
 
void ncvSetDebugOutputHandler (NCVDebugOutputHandler *func)
 
NcvTimer ncvStartTimer (void)
 
void cv::cuda::projectPoints (const GpuMat &src, const Mat &rvec, const Mat &tvec, const Mat &camera_mat, const Mat &dist_coef, GpuMat &dst, Stream &stream=Stream::Null())
 
void cv::cuda::solvePnPRansac (const Mat &object, const Mat &image, const Mat &camera_mat, const Mat &dist_coef, Mat &rvec, Mat &tvec, bool use_extrinsic_guess=false, int num_iters=100, float max_dist=8.0, int min_inlier_count=100, std::vector< int > *inliers=NULL)
 Finds the object pose from 3D-2D point correspondences. More...
 
void cv::cuda::transformPoints (const GpuMat &src, const Mat &rvec, const Mat &tvec, GpuMat &dst, Stream &stream=Stream::Null())
 

Variables

const Ncv32u K_LOG2_WARP_SIZE = 5
 
const Ncv32u K_WARP_SIZE = 32
 

Detailed Description

Macro Definition Documentation

#define CLAMP (   x,
  a,
 
)    ( (x) > (b) ? (b) : ( (x) < (a) ? (a) : (x) ) )

#include <cudalegacy/include/opencv2/cudalegacy/NCV.hpp>

#define CLAMP_0_255 (   x)    CLAMP(x,0,255)

#include <cudalegacy/include/opencv2/cudalegacy/NCV.hpp>

#define CLAMP_BOTTOM (   x,
 
)    (((x) < (a)) ? (a) : (x))

#include <cudalegacy/include/opencv2/cudalegacy/NCV.hpp>

#define CLAMP_TOP (   x,
 
)    (((x) > (a)) ? (a) : (x))

#include <cudalegacy/include/opencv2/cudalegacy/NCV.hpp>

#define HAAR_STDDEV_BORDER   1

#include <cudalegacy/include/opencv2/cudalegacy/NCVHaarObjectDetection.hpp>

#define NCV_CT_ASSERT (   X)

#include <cudalegacy/include/opencv2/cudalegacy/NCV.hpp>

Value:
NCV_CT_PREP_PASTE(__ct_assert_typedef_, __LINE__)
Definition: NCV.hpp:78
#define NCV_CT_PREP_PASTE(a, b)
Concatenation macro.
Definition: NCV.hpp:83

Performs compile-time assertion of a condition on the file scope.

Referenced by NcvPoint2D32u::NcvPoint2D32u().

#define NCV_CT_PREP_PASTE (   a,
 
)    NCV_CT_PREP_PASTE_AUX(a, b)

#include <cudalegacy/include/opencv2/cudalegacy/NCV.hpp>

Concatenation macro.

#define NCV_CT_PREP_PASTE_AUX (   a,
 
)    a##b

#include <cudalegacy/include/opencv2/cudalegacy/NCV.hpp>

Concatenation indirection macro.

#define NCV_RESET_SKIP_COND (   x)    __ncv_skip_cond = x

#include <cudalegacy/include/opencv2/cudalegacy/NCV.hpp>

#define NCV_SET_SKIP_COND (   x)    bool __ncv_skip_cond = x

#include <cudalegacy/include/opencv2/cudalegacy/NCV.hpp>

#define NCV_SKIP_COND_BEGIN   if (!__ncv_skip_cond) {

#include <cudalegacy/include/opencv2/cudalegacy/NCV.hpp>

#define NCV_SKIP_COND_END   }

#include <cudalegacy/include/opencv2/cudalegacy/NCV.hpp>

#define ncvAssertCUDALastErrorReturn (   errCode)

#include <cudalegacy/include/opencv2/cudalegacy/NCV.hpp>

Value:
do \
{ \
cudaError_t res = cudaGetLastError(); \
cv::String msg = cv::format("cudaError_t=%d", (int)res); \
ncvAssertPrintReturn(cudaSuccess==res, msg.c_str(), errCode); \
} while (0)
#define ncvAssertPrintReturn(pred, msg, err)
Definition: NCV.hpp:267
String format(const char *fmt,...)
Returns a text string formatted using the printf-like expression.
#define ncvAssertCUDAReturn (   cudacall,
  errCode 
)

#include <cudalegacy/include/opencv2/cudalegacy/NCV.hpp>

Value:
do \
{ \
cudaError_t res = cudacall; \
cv::String msg = cv::format("cudaError_t=%d", (int)res); \
ncvAssertPrintReturn(cudaSuccess==res, msg.c_str(), errCode); \
} while (0)
#define ncvAssertPrintReturn(pred, msg, err)
Definition: NCV.hpp:267
String format(const char *fmt,...)
Returns a text string formatted using the printf-like expression.
#define ncvAssertPrintCheck (   pred,
  msg 
)

#include <cudalegacy/include/opencv2/cudalegacy/NCV.hpp>

Value:
do \
{ \
if (!(pred)) \
{ \
cv::String str = cv::format("NCV Assertion Failed: %s, file=%s, line=%d", msg, __FILE__, __LINE__); \
} \
} while (0)
void ncvDebugOutput(const cv::String &msg)
String format(const char *fmt,...)
Returns a text string formatted using the printf-like expression.

Referenced by NCVMatrix< T >::at(), NCVMatrixAlloc< T >::~NCVMatrixAlloc(), and NCVVectorAlloc< T >::~NCVVectorAlloc().

#define ncvAssertPrintReturn (   pred,
  msg,
  err 
)

#include <cudalegacy/include/opencv2/cudalegacy/NCV.hpp>

Value:
do \
{ \
ncvAssertPrintCheck(pred, msg); \
if (!(pred)) return err; \
} while (0)
#define ncvAssertPrintCheck(pred, msg)
Definition: NCV.hpp:256

Referenced by NCVMatrixAlloc< T >::NCVMatrixAlloc(), NCVMatrixReuse< T >::NCVMatrixReuse(), NCVVectorAlloc< T >::NCVVectorAlloc(), and NCVVectorReuse< T >::NCVVectorReuse().

#define ncvAssertReturn (   pred,
  err 
)

#include <cudalegacy/include/opencv2/cudalegacy/NCV.hpp>

Value:
do \
{ \
cv::String msg = cv::format("retcode=%d", (int)err); \
ncvAssertPrintReturn(pred, msg.c_str(), err); \
} while (0)
#define ncvAssertPrintReturn(pred, msg, err)
Definition: NCV.hpp:267
String format(const char *fmt,...)
Returns a text string formatted using the printf-like expression.

Referenced by NCVMatrix< T >::copy2D(), NCVVector< T >::copySolid(), NCVMatrix< T >::copySolid(), and HaarFeature64::setRect().

#define ncvAssertReturnNcvStat (   ncvOp)

#include <cudalegacy/include/opencv2/cudalegacy/NCV.hpp>

Value:
do \
{ \
NCVStatus _ncvStat = ncvOp; \
cv::String msg = cv::format("NcvStat=%d", (int)_ncvStat); \
ncvAssertPrintReturn(NCV_SUCCESS==_ncvStat, msg.c_str(), _ncvStat); \
} while (0)
Definition: NCV.hpp:316
#define ncvAssertPrintReturn(pred, msg, err)
Definition: NCV.hpp:267
Ncv32u NCVStatus
Definition: NCV.hpp:376
String format(const char *fmt,...)
Returns a text string formatted using the printf-like expression.
#define ncvSafeMatAlloc (   name,
  type,
  alloc,
  width,
  height,
  err 
)

#include <cudalegacy/include/opencv2/cudalegacy/NCV.hpp>

Value:
NCVMatrixAlloc<type> name(alloc, width, height); \
ncvAssertReturn(name.isMemAllocated(), err);
NCVMatrixAlloc.
Definition: NCV.hpp:844
#define ncvAssertReturn(pred, err)
Definition: NCV.hpp:275
#define OBJDET_MASK_ELEMENT_INVALID_32U   0xFFFFFFFF

#include <cudalegacy/include/opencv2/cudalegacy/NCVHaarObjectDetection.hpp>

#define RECT_SIMILARITY_PROPORTION   0.2f

#include <cudalegacy/include/opencv2/cudalegacy/NCVHaarObjectDetection.hpp>

#define SQR (   x)    ((x)*(x))

#include <cudalegacy/include/opencv2/cudalegacy/NCV.hpp>

#define SUB_BEGIN (   type,
  name 
)    struct { __inline type name

#include <cudalegacy/include/opencv2/cudalegacy/NCV.hpp>

#define SUB_CALL (   name)    name.name

#include <cudalegacy/include/opencv2/cudalegacy/NCV.hpp>

#define SUB_END (   name)    } name;

#include <cudalegacy/include/opencv2/cudalegacy/NCV.hpp>

Typedef Documentation

typedef short Ncv16s

#include <cudalegacy/include/opencv2/cudalegacy/NCV.hpp>

typedef unsigned short Ncv16u

#include <cudalegacy/include/opencv2/cudalegacy/NCV.hpp>

typedef float Ncv32f

#include <cudalegacy/include/opencv2/cudalegacy/NCV.hpp>

typedef Ncv32f Ncv32f_a

#include <cudalegacy/include/opencv2/cudalegacy/NCVHaarObjectDetection.hpp>

typedef int Ncv32s

#include <cudalegacy/include/opencv2/cudalegacy/NCV.hpp>

typedef unsigned int Ncv32u

#include <cudalegacy/include/opencv2/cudalegacy/NCV.hpp>

typedef Ncv32u Ncv32u_a

#include <cudalegacy/include/opencv2/cudalegacy/NCVHaarObjectDetection.hpp>

typedef double Ncv64f

#include <cudalegacy/include/opencv2/cudalegacy/NCV.hpp>

typedef long long Ncv64s

#include <cudalegacy/include/opencv2/cudalegacy/NCV.hpp>

typedef unsigned long long Ncv64u

#include <cudalegacy/include/opencv2/cudalegacy/NCV.hpp>

typedef signed char Ncv8s

#include <cudalegacy/include/opencv2/cudalegacy/NCV.hpp>

typedef unsigned char Ncv8u

#include <cudalegacy/include/opencv2/cudalegacy/NCV.hpp>

typedef bool NcvBool

#include <cudalegacy/include/opencv2/cudalegacy/NCV.hpp>

typedef void NCVDebugOutputHandler(const cv::String &msg)

#include <cudalegacy/include/opencv2/cudalegacy/NCV.hpp>

typedef Ncv32u NCVStatus

#include <cudalegacy/include/opencv2/cudalegacy/NCV.hpp>

typedef struct _NcvTimer* NcvTimer

#include <cudalegacy/include/opencv2/cudalegacy/NCV.hpp>

Enumeration Type Documentation

anonymous enum

#include <cudalegacy/include/opencv2/cudalegacy/NCV.hpp>

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_NOT_IMPLEMENTED 
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.

NCV_LAST_STATUS 

Marker to continue error numeration in other files.

anonymous enum

#include <cudalegacy/include/opencv2/cudalegacy/NCVHaarObjectDetection.hpp>

Enumerator
NCVPipeObjDet_Default 
NCVPipeObjDet_UseFairImageScaling 
NCVPipeObjDet_FindLargestObject 
NCVPipeObjDet_VisualizeInPlace 

#include <cudalegacy/include/opencv2/cudalegacy/NCV.hpp>

NCVMemoryType.

Enumerator
NCVMemoryTypeNone 
NCVMemoryTypeHostPageable 
NCVMemoryTypeHostPinned 
NCVMemoryTypeDevice 

Function Documentation

INCVMemAllocator::~INCVMemAllocator ( )
inlinepure virtual

#include <cudalegacy/include/opencv2/cudalegacy/NCV.hpp>

Ncv32u alignUp ( Ncv32u  what,
Ncv32u  alignment 
)

#include <cudalegacy/include/opencv2/cudalegacy/NCV.hpp>

Calculates the aligned top bound value.

Referenced by NCVMatrixAlloc< T >::NCVMatrixAlloc(), and NCVMatrixReuse< T >::NCVMatrixReuse().

Here is the caller graph for this function:

void cv::cuda::calcOpticalFlowBM ( const GpuMat prev,
const GpuMat curr,
Size  block_size,
Size  shift_size,
Size  max_range,
bool  use_previous,
GpuMat velx,
GpuMat vely,
GpuMat buf,
Stream stream = Stream::Null() 
)

#include <cudalegacy/include/opencv2/cudalegacy.hpp>

Calculates optical flow for 2 images using block matching algorithm */.

void cv::cuda::connectivityMask ( const GpuMat image,
GpuMat mask,
const cv::Scalar lo,
const cv::Scalar hi,
Stream stream = Stream::Null() 
)

#include <cudalegacy/include/opencv2/cudalegacy.hpp>

compute mask for Generalized Flood fill componetns labeling.

Ptr<cuda::BackgroundSubtractorFGD> cv::cuda::createBackgroundSubtractorFGD ( const FGDParams params = FGDParams())

#include <cudalegacy/include/opencv2/cudalegacy.hpp>

Creates FGD Background Subtractor.

Parameters
paramsAlgorithm's parameters. See [46] for explanation.
Ptr<cuda::BackgroundSubtractorGMG> cv::cuda::createBackgroundSubtractorGMG ( int  initializationFrames = 120,
double  decisionThreshold = 0.8 
)

#include <cudalegacy/include/opencv2/cudalegacy.hpp>

Creates GMG Background Subtractor.

Parameters
initializationFramesNumber of frames of video to use to initialize histograms.
decisionThresholdValue above which pixel is determined to be FG.
Ptr<ImagePyramid> cv::cuda::createImagePyramid ( InputArray  img,
int  nLayers = -1,
Stream stream = Stream::Null() 
)

#include <cudalegacy/include/opencv2/cudalegacy.hpp>

void cv::cuda::createOpticalFlowNeedleMap ( const GpuMat u,
const GpuMat v,
GpuMat vertex,
GpuMat colors 
)

#include <cudalegacy/include/opencv2/cudalegacy.hpp>

void cv::cuda::graphcut ( GpuMat terminals,
GpuMat leftTransp,
GpuMat rightTransp,
GpuMat top,
GpuMat bottom,
GpuMat labels,
GpuMat buf,
Stream stream = Stream::Null() 
)

#include <cudalegacy/include/opencv2/cudalegacy.hpp>

performs labeling via graph cuts of a 2D regular 4-connected graph.

void cv::cuda::graphcut ( GpuMat terminals,
GpuMat leftTransp,
GpuMat rightTransp,
GpuMat top,
GpuMat topLeft,
GpuMat topRight,
GpuMat bottom,
GpuMat bottomLeft,
GpuMat bottomRight,
GpuMat labels,
GpuMat buf,
Stream stream = Stream::Null() 
)

#include <cudalegacy/include/opencv2/cudalegacy.hpp>

performs labeling via graph cuts of a 2D regular 8-connected graph.

void cv::cuda::interpolateFrames ( const GpuMat frame0,
const GpuMat frame1,
const GpuMat fu,
const GpuMat fv,
const GpuMat bu,
const GpuMat bv,
float  pos,
GpuMat newFrame,
GpuMat buf,
Stream stream = Stream::Null() 
)

#include <cudalegacy/include/opencv2/cudalegacy.hpp>

Interpolates frames (images) using provided optical flow (displacement field).

Parameters
frame0First frame (32-bit floating point images, single channel).
frame1Second frame. Must have the same type and size as frame0 .
fuForward horizontal displacement.
fvForward vertical displacement.
buBackward horizontal displacement.
bvBackward vertical displacement.
posNew frame position.
newFrameOutput image.
bufTemporary buffer, will have width x 6*height size, CV_32FC1 type and contain 6 GpuMat: occlusion masks for first frame, occlusion masks for second, interpolated forward horizontal flow, interpolated forward vertical flow, interpolated backward horizontal flow, interpolated backward vertical flow.
streamStream for the asynchronous version.
void cv::cuda::labelComponents ( const GpuMat mask,
GpuMat components,
int  flags = 0,
Stream stream = Stream::Null() 
)

#include <cudalegacy/include/opencv2/cudalegacy.hpp>

performs connected componnents labeling.

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

#include <cudalegacy/include/opencv2/cudalegacy/NCV.hpp>

Copy dispatchers.

Referenced by NCVVector< T >::copySolid(), and NCVMatrix< T >::copySolid().

Here is the caller graph for this function:

NCVStatus memSegCopyHelper2D ( void *  dst,
Ncv32u  dstPitch,
NCVMemoryType  dstType,
const void *  src,
Ncv32u  srcPitch,
NCVMemoryType  srcType,
Ncv32u  widthbytes,
Ncv32u  height,
cudaStream_t  cuStream 
)

#include <cudalegacy/include/opencv2/cudalegacy/NCV.hpp>

Referenced by NCVMatrix< T >::copy2D().

Here is the caller graph for this function:

NCV_CT_ASSERT ( sizeof(HaarFeature64 = =8)

#include <cudalegacy/include/opencv2/cudalegacy/NCVHaarObjectDetection.hpp>

Referenced by HaarStage64::getNumClassifierRootNodes().

Here is the caller graph for this function:

NCV_CT_ASSERT ( sizeof(HaarFeatureDescriptor32 = =4)

#include <cudalegacy/include/opencv2/cudalegacy/NCVHaarObjectDetection.hpp>

NCV_CT_ASSERT ( sizeof(HaarClassifierNodeDescriptor32 = =4)

#include <cudalegacy/include/opencv2/cudalegacy/NCVHaarObjectDetection.hpp>

NCV_CT_ASSERT ( sizeof(HaarClassifierNode128 = =16)

#include <cudalegacy/include/opencv2/cudalegacy/NCVHaarObjectDetection.hpp>

NCV_CT_ASSERT ( sizeof(HaarStage64 = =8)

#include <cudalegacy/include/opencv2/cudalegacy/NCVHaarObjectDetection.hpp>

NCVStatus ncvApplyHaarClassifierCascade_device ( NCVMatrix< Ncv32u > &  d_integralImage,
NCVMatrix< Ncv32f > &  d_weights,
NCVMatrixAlloc< Ncv32u > &  d_pixelMask,
Ncv32u numDetections,
HaarClassifierCascadeDescriptor haar,
NCVVector< HaarStage64 > &  h_HaarStages,
NCVVector< HaarStage64 > &  d_HaarStages,
NCVVector< HaarClassifierNode128 > &  d_HaarNodes,
NCVVector< HaarFeature64 > &  d_HaarFeatures,
NcvBool  bMaskElements,
NcvSize32u  anchorsRoi,
Ncv32u  pixelStep,
Ncv32f  scaleArea,
INCVMemAllocator gpuAllocator,
INCVMemAllocator cpuAllocator,
cudaDeviceProp &  devProp,
cudaStream_t  cuStream 
)

#include <cudalegacy/include/opencv2/cudalegacy/NCVHaarObjectDetection.hpp>

NCVStatus ncvApplyHaarClassifierCascade_host ( NCVMatrix< Ncv32u > &  h_integralImage,
NCVMatrix< Ncv32f > &  h_weights,
NCVMatrixAlloc< Ncv32u > &  h_pixelMask,
Ncv32u numDetections,
HaarClassifierCascadeDescriptor haar,
NCVVector< HaarStage64 > &  h_HaarStages,
NCVVector< HaarClassifierNode128 > &  h_HaarNodes,
NCVVector< HaarFeature64 > &  h_HaarFeatures,
NcvBool  bMaskElements,
NcvSize32u  anchorsRoi,
Ncv32u  pixelStep,
Ncv32f  scaleArea 
)

#include <cudalegacy/include/opencv2/cudalegacy/NCVHaarObjectDetection.hpp>

NCVStatus NCVBroxOpticalFlow ( const NCVBroxOpticalFlowDescriptor  desc,
INCVMemAllocator gpu_mem_allocator,
const NCVMatrix< Ncv32f > &  frame0,
const NCVMatrix< Ncv32f > &  frame1,
NCVMatrix< Ncv32f > &  u,
NCVMatrix< Ncv32f > &  v,
cudaStream_t  stream 
)

#include <cudalegacy/include/opencv2/cudalegacy/NCVBroxOpticalFlow.hpp>

Compute optical flow.

Based on method by Brox et al [2004]

Parameters
[in]descmodel and solver parameters
[in]gpu_mem_allocatorGPU memory allocator
[in]frame0source frame
[in]frame1frame to track
[out]uflow horizontal component (along x axis)
[out]vflow vertical component (along y axis)
stream
Returns
computation status
void ncvDebugOutput ( const cv::String msg)

#include <cudalegacy/include/opencv2/cudalegacy/NCV.hpp>

NCVStatus ncvDetectObjectsMultiScale_device ( NCVMatrix< Ncv8u > &  d_srcImg,
NcvSize32u  srcRoi,
NCVVector< NcvRect32u > &  d_dstRects,
Ncv32u dstNumRects,
HaarClassifierCascadeDescriptor haar,
NCVVector< HaarStage64 > &  h_HaarStages,
NCVVector< HaarStage64 > &  d_HaarStages,
NCVVector< HaarClassifierNode128 > &  d_HaarNodes,
NCVVector< HaarFeature64 > &  d_HaarFeatures,
NcvSize32u  minObjSize,
Ncv32u  minNeighbors,
Ncv32f  scaleStep,
Ncv32u  pixelStep,
Ncv32u  flags,
INCVMemAllocator gpuAllocator,
INCVMemAllocator cpuAllocator,
cudaDeviceProp &  devProp,
cudaStream_t  cuStream 
)

#include <cudalegacy/include/opencv2/cudalegacy/NCVHaarObjectDetection.hpp>

NCVStatus ncvDrawRects_32u_device ( Ncv32u d_dst,
Ncv32u  dstStride,
Ncv32u  dstWidth,
Ncv32u  dstHeight,
NcvRect32u d_rects,
Ncv32u  numRects,
Ncv32u  color,
cudaStream_t  cuStream 
)

#include <cudalegacy/include/opencv2/cudalegacy/NCV.hpp>

Referenced by NCVMatrixReuse< T >::isMemReused().

Here is the caller graph for this function:

NCVStatus ncvDrawRects_32u_host ( Ncv32u h_dst,
Ncv32u  dstStride,
Ncv32u  dstWidth,
Ncv32u  dstHeight,
NcvRect32u h_rects,
Ncv32u  numRects,
Ncv32u  color 
)

#include <cudalegacy/include/opencv2/cudalegacy/NCV.hpp>

Referenced by NCVMatrixReuse< T >::isMemReused().

Here is the caller graph for this function:

NCVStatus ncvDrawRects_8u_device ( Ncv8u d_dst,
Ncv32u  dstStride,
Ncv32u  dstWidth,
Ncv32u  dstHeight,
NcvRect32u d_rects,
Ncv32u  numRects,
Ncv8u  color,
cudaStream_t  cuStream 
)

#include <cudalegacy/include/opencv2/cudalegacy/NCV.hpp>

Referenced by NCVMatrixReuse< T >::isMemReused().

Here is the caller graph for this function:

NCVStatus ncvDrawRects_8u_host ( Ncv8u h_dst,
Ncv32u  dstStride,
Ncv32u  dstWidth,
Ncv32u  dstHeight,
NcvRect32u h_rects,
Ncv32u  numRects,
Ncv8u  color 
)

#include <cudalegacy/include/opencv2/cudalegacy/NCV.hpp>

Referenced by NCVMatrixReuse< T >::isMemReused().

Here is the caller graph for this function:

double ncvEndQueryTimerMs ( NcvTimer  t)

#include <cudalegacy/include/opencv2/cudalegacy/NCV.hpp>

double ncvEndQueryTimerUs ( NcvTimer  t)

#include <cudalegacy/include/opencv2/cudalegacy/NCV.hpp>

NCVStatus ncvGroupRectangles_host ( NCVVector< NcvRect32u > &  hypotheses,
Ncv32u numHypotheses,
Ncv32u  minNeighbors,
Ncv32f  intersectEps,
NCVVector< Ncv32u > *  hypothesesWeights 
)

#include <cudalegacy/include/opencv2/cudalegacy/NCV.hpp>

Operations with rectangles.

Referenced by NCVMatrixReuse< T >::isMemReused().

Here is the caller graph for this function:

NCVStatus ncvGrowDetectionsVector_device ( NCVVector< Ncv32u > &  pixelMask,
Ncv32u  numPixelMaskDetections,
NCVVector< NcvRect32u > &  hypotheses,
Ncv32u totalDetections,
Ncv32u  totalMaxDetections,
Ncv32u  rectWidth,
Ncv32u  rectHeight,
Ncv32f  curScale,
cudaStream_t  cuStream 
)

#include <cudalegacy/include/opencv2/cudalegacy/NCVHaarObjectDetection.hpp>

NCVStatus ncvGrowDetectionsVector_host ( NCVVector< Ncv32u > &  pixelMask,
Ncv32u  numPixelMaskDetections,
NCVVector< NcvRect32u > &  hypotheses,
Ncv32u totalDetections,
Ncv32u  totalMaxDetections,
Ncv32u  rectWidth,
Ncv32u  rectHeight,
Ncv32f  curScale 
)

#include <cudalegacy/include/opencv2/cudalegacy/NCVHaarObjectDetection.hpp>

NCVStatus ncvHaarGetClassifierSize ( const cv::String filename,
Ncv32u numStages,
Ncv32u numNodes,
Ncv32u numFeatures 
)

#include <cudalegacy/include/opencv2/cudalegacy/NCVHaarObjectDetection.hpp>

NCVStatus ncvHaarLoadFromFile_host ( const cv::String filename,
HaarClassifierCascadeDescriptor haar,
NCVVector< HaarStage64 > &  h_HaarStages,
NCVVector< HaarClassifierNode128 > &  h_HaarNodes,
NCVVector< HaarFeature64 > &  h_HaarFeatures 
)

#include <cudalegacy/include/opencv2/cudalegacy/NCVHaarObjectDetection.hpp>

NCVStatus ncvHaarStoreNVBIN_host ( const cv::String filename,
HaarClassifierCascadeDescriptor  haar,
NCVVector< HaarStage64 > &  h_HaarStages,
NCVVector< HaarClassifierNode128 > &  h_HaarNodes,
NCVVector< HaarFeature64 > &  h_HaarFeatures 
)

#include <cudalegacy/include/opencv2/cudalegacy/NCVHaarObjectDetection.hpp>

void ncvSetDebugOutputHandler ( NCVDebugOutputHandler func)

#include <cudalegacy/include/opencv2/cudalegacy/NCV.hpp>

NcvTimer ncvStartTimer ( void  )

#include <cudalegacy/include/opencv2/cudalegacy/NCV.hpp>

void cv::cuda::projectPoints ( const GpuMat src,
const Mat rvec,
const Mat tvec,
const Mat camera_mat,
const Mat dist_coef,
GpuMat dst,
Stream stream = Stream::Null() 
)

#include <cudalegacy/include/opencv2/cudalegacy.hpp>

void cv::cuda::solvePnPRansac ( const Mat object,
const Mat image,
const Mat camera_mat,
const Mat dist_coef,
Mat rvec,
Mat tvec,
bool  use_extrinsic_guess = false,
int  num_iters = 100,
float  max_dist = 8.0,
int  min_inlier_count = 100,
std::vector< int > *  inliers = NULL 
)

#include <cudalegacy/include/opencv2/cudalegacy.hpp>

Finds the object pose from 3D-2D point correspondences.

Parameters
objectSingle-row matrix of object points.
imageSingle-row matrix of image points.
camera_mat3x3 matrix of intrinsic camera parameters.
dist_coefDistortion coefficients. See undistortPoints for details.
rvecOutput 3D rotation vector.
tvecOutput 3D translation vector.
use_extrinsic_guessFlag to indicate that the function must use rvec and tvec as an initial transformation guess. It is not supported for now.
num_itersMaximum number of RANSAC iterations.
max_distEuclidean distance threshold to detect whether point is inlier or not.
min_inlier_countFlag to indicate that the function must stop if greater or equal number of inliers is achieved. It is not supported for now.
inliersOutput vector of inlier indices.
void cv::cuda::transformPoints ( const GpuMat src,
const Mat rvec,
const Mat tvec,
GpuMat dst,
Stream stream = Stream::Null() 
)

#include <cudalegacy/include/opencv2/cudalegacy.hpp>

Variable Documentation

const Ncv32u K_LOG2_WARP_SIZE = 5

#include <cudalegacy/include/opencv2/cudalegacy/NCV.hpp>

const Ncv32u K_WARP_SIZE = 32

#include <cudalegacy/include/opencv2/cudalegacy/NCV.hpp>