NVIDIA DRIVE OS Linux SDK API Reference

5.1.9.0 Release

 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages

Detailed Description

APIs for accessing Computer Vision (CV) hardware-accelerated algorithms.

Data Structures

struct  NvMediaVPIPoint2Df
 Holds 2D floating point definition. More...
 
struct  NvMediaVPIPoint2DFrac
 Holds 2D point fractional representation. More...
 
struct  NvMediaVPIAABB
 Axis Aligned Bounding Box. More...
 
struct  NvMediaVPI2DTransform
 3x3 transform matrix. More...
 
struct  NvMediaVPITranslationWithScale
 Translation with Scale parameters. More...
 
struct  NvMediaVPIBoundingBoxWithTransform
 Holds bounding box definition. More...
 
struct  NvMediaVPIStereoPostprocessParams
 Holds stereo postprocess parameters. More...
 
struct  NvMediaVPIStereoPreprocessParams
 Holds stereo preprocessing parameters. More...
 
struct  NvMediaVPIGetKeyPointsHarrisParams
 Holds Harris keypoint parameters. More...
 
struct  NvMediaVPIGetSparseFlowPyrLKParams
 NvMediaVPIGetSparseFlowPyrLKParams. More...
 
struct  NvMediaVPIKLTParams
 Holds the KLT parameters. More...
 

Macros

#define NVMEDIA_VPI_VERSION_MAJOR   3
 Major version number. More...
 
#define NVMEDIA_VPI_VERSION_MINOR   1
 Minor version number. More...
 
#define NVMEDIA_VPI_MAX_QUEUED_TASKS   (64u)
 Maximum number of tasks that can be queued. More...
 
#define NVMEDIA_VPI_CONFIDENCE_TABLE_MIN_CAPACITY   (128)
 Minimum capacity of NvMediaArray holding Confidence Table. More...
 
#define NVMEDIA_VPI_HINT_ARRAY_MIN_CAPACITY_BYTES   (261376)
 Minimum capacity (in bytes) of NvMediaArray holding Motion Vector Hints Array. More...
 

Typedefs

typedef struct NvMediaVPI NvMediaVPI
 Holds an opaque object representing NvMediaVPI. More...
 
typedef struct
NvMediaVPIProcessStereoDescriptor 
NvMediaVPIProcessStereoDescriptor
 NvMediaVPIProcessStereo descriptor. More...
 
typedef struct
NvMediaVPIConvertMVDescriptor 
NvMediaVPIConvertMVDescriptor
 NvMediaVPIConvertMV descriptor. More...
 
typedef struct
NvMediaVPIStereoPostprocessDescriptor 
NvMediaVPIStereoPostprocessDescriptor
 NvMediaVPISteroPostprocess descriptor. More...
 
typedef struct
NvMediaVPIStereoPreprocessDescriptor 
NvMediaVPIStereoPreprocessDescriptor
 NvMediaVPISteroPreprocess descriptor. More...
 
typedef struct
NvMediaVPIGetKeyPointsHarrisDescriptor 
NvMediaVPIGetKeyPointsHarrisDescriptor
 
typedef struct
NvMediaVPIGetKeyPointsFastDescriptor 
NvMediaVPIGetKeyPointsFastDescriptor
 
typedef struct
NvMediaVPIGetSparseFlowPyrLKDescriptor 
NvMediaVPIGetSparseFlowPyrLKDescriptor
 NvMediaVPISparseFlowPyr descriptor. More...
 
typedef struct
NvMediaVPIKLTDescriptor 
NvMediaVPIKLTDescriptor
 NvMediaVPIKLTDescriptor descriptor. More...
 
typedef enum NvMediaVPIKltTrackType NvMediaVPIKltTrackType
 Specifies the types of KLT Tracking. More...
 
typedef struct
NvMediaVPIConvolveImageSeparableDescriptor 
NvMediaVPIConvolveImageSeparableDescriptor
 NvMediaVPIConvolveImageSeparableDescriptor. More...
 

Enumerations

enum  NvMediaVPIOFSTOutputType {
  NVMEDIA_VPI_STEREO_DISPARITY = 0,
  NVMEDIA_VPI_MV,
  NVMEDIA_VPI_MV_HINTS
}
 Specifies the types of output for Optical Flow/Stereo Disparity processing. More...
 
enum  NvMediaVPINonMaxSuppressionType { NVMEDIA_VPI_2D_GRID_8x8_CELL_NO_MIN_DISTANCE = 0 }
 Specifies types of post-process non-maximum suppression. More...
 
enum  NvMediaVPIHarrisGradientFilterType {
  NVMEDIA_VPI_HARRIS_FILTER_TYPE_DEFAULT = 0,
  NVMEDIA_VPI_HARRIS_FILTER_TYPE_USER
}
 Specifies types of filters used in the Harris corner detector. More...
 
enum  NvMediaVPITerminationCriterion {
  NVMEDIA_VPI_TERMINATION_CRITERION_ITERATIONS = 0,
  NVMEDIA_VPI_TERMINATION_CRITERION_EPSILON,
  NVMEDIA_VPI_TERMINATION_CRITERION_BOTH
}
 Specifies the conditions that cause the Lucas-Kanade Feature Tracker to be terminated. More...
 
enum  NvMediaVPIKltTrackType { NVMEDIA_VPI_KLT_INVERSE_COMPOSITIONAL = 0 }
 Specifies the types of KLT Tracking. More...
 

Functions

NvMediaStatus NvMediaVPIGetNumEngines (uint32_t *numEngines)
 Returns the number of HW engines accessible. More...
 
NvMediaStatus NvMediaVPIGetVersion (NvMediaVersion *version)
 Returns version information for the NvMediaVPI library. More...
 
NvMediaVPINvMediaVPICreate (const uint32_t Id, const uint32_t maxQueuedTasks)
 Creates an NvMediaVPI object. More...
 
NvMediaStatus NvMediaVPIDestroy (NvMediaVPI *vpi)
 Destroys an NvMediaVPI object created by NvMediaVPICreate(). More...
 
NvMediaStatus NvMediaVPIFlush (NvMediaVPI *vpi)
 Flushes all queued operations. More...
 
NvMediaStatus NvMediaVPIImageRegister (NvMediaVPI *vpi, NvMediaImage *image)
 Registers an image for use with an NvMediaVPI function. More...
 
NvMediaStatus NvMediaVPIImageUnregister (NvMediaVPI *vpi, NvMediaImage *image)
 Unregisters an image after use. More...
 
NvMediaStatus NvMediaVPIArrayRegister (NvMediaVPI *vpi, NvMediaArray *array)
 Registers an array for use with an NvMediaVPI function. More...
 
NvMediaStatus NvMediaVPIArrayUnregister (NvMediaVPI *vpi, NvMediaArray *array)
 Unregisters an array after use. More...
 
NvMediaStatus NvMediaVPIScratchpadRegister (NvMediaVPI *vpi, NvMediaCVScratchpad *scratchpad)
 Registers scratchpad memory for use with an NvMediaVPI function. More...
 
NvMediaStatus NvMediaVPIScratchpadUnregister (NvMediaVPI *vpi, NvMediaCVScratchpad *scratchpad)
 Unregisters scratchpad memory after use. More...
 
NvMediaStatus NvMediaVPIPyramidRegister (NvMediaVPI *vpi, NvMediaImagePyramid *pyramid)
 Registers a pyramid for use with an NvMediaVPI function. More...
 
NvMediaStatus NvMediaVPIPyramidUnregister (NvMediaVPI *vpi, NvMediaImagePyramid *pyramid)
 Unregisters a pyramid after use. More...
 
NvMediaVPIConvertMVDescriptorNvMediaVPICreateConvertMVDescriptor (NvMediaVPI *vpi, const uint32_t width, const uint32_t height, const NvMediaSurfaceType type, const float strength, const float scale)
 Creates an NvMediaVPIConvertMVDescriptor. More...
 
NvMediaStatus NvMediaVPIConvertMVDesc (NvMediaVPI *vpi, NvMediaVPIConvertMVDescriptor *descriptor, NvMediaImage *inputMVImage, NvMediaImage *inputColor, NvMediaImage *output, const NvMediaVPIOFSTOutputType outputType)
 Converts or refines a motion vector image. More...
 
NvMediaVPIStereoPostprocessDescriptorNvMediaVPICreateStereoPostprocessDescriptor (NvMediaVPI *vpi, const uint32_t width, const uint32_t height, const float scale)
 Creates an NvMediaVPIStereoPostprocessDescriptor. More...
 
NvMediaStatus NvMediaVPIStereoPostprocessDesc (NvMediaVPI *vpi, NvMediaVPIStereoPostprocessDescriptor *descriptor, NvMediaVPIStereoPostprocessParams *params, NvMediaImage *disparityInput, NvMediaImage *confidenceInput, NvMediaImage *disparityOutput, NvMediaImage *confidenceOutput)
 Performs stereo postprocessing to refine a disparity image. More...
 
NvMediaVPIStereoPreprocessDescriptorNvMediaVPICreateStereoPreprocessDescriptor (NvMediaVPI *vpi, const uint32_t width, const uint32_t height, const NvMediaVPIOFSTOutputType outputType)
 Creates an NvMediaVPIStereoPreprocessDescriptor. More...
 
NvMediaStatus NvMediaVPIStereoPreprocessDescEx (NvMediaVPI *vpi, NvMediaVPIStereoPreprocessDescriptor *descriptor, NvMediaVPIStereoPreprocessParams *params, NvMediaArray *confidenceTable, NvMediaImage *leftImage, NvMediaImage *rightImage, NvMediaImage *leftDisparity, NvMediaImage *rightDisparity, NvMediaImage *confidenceMap, NvMediaArray *hintsArray)
 Performs stereo preprocessing to produce a disparity image or motion vector hints. More...
 
NvMediaVPIGetKeyPointsHarrisDescriptorNvMediaVPICreateGetKeyPointsHarrisDescriptor (NvMediaVPI *vpi, const uint32_t width, const uint32_t height, const NvMediaVPINonMaxSuppressionType nonMaxSuppressionType)
 Creates a pointer to a NvMediaVPIGetKeyPointsHarrisDescriptor. More...
 
NvMediaStatus NvMediaVPIGetKeyPointsHarrisDesc (NvMediaVPI *vpi, NvMediaVPIGetKeyPointsHarrisDescriptor *descriptor, const NvMediaVPIGetKeyPointsHarrisParams *params, NvMediaImage *input, NvMediaImage *mask, NvMediaArray *trackedKeypoints, NvMediaArray *trackedScores, NvMediaArray *keypoints, NvMediaArray *scores)
 Queues an operation to get Harris keypoints throughout an image. More...
 
NvMediaVPIGetKeyPointsFastDescriptorNvMediaVPICreateGetKeyPointsFastDescriptor (NvMediaVPI *vpi, const uint32_t width, const uint32_t height, const NvMediaSurfaceType type)
 Creates a pointer to an NvMediaVPIGetKeyPointsFastDescriptor. More...
 
NvMediaStatus NvMediaVPIGetKeyPointsFastDesc (NvMediaVPI *vpi, NvMediaVPIGetKeyPointsFastDescriptor *descriptor, NvMediaImage *input, const uint32_t strengthThresh, const NvMediaBool nonmaxSupression, NvMediaArray *keypoints, NvMediaArray *scores)
 Queues an operation to get FAST keypoints throughout an image. More...
 
NvMediaVPIGetSparseFlowPyrLKDescriptorNvMediaVPICreateGetSparseFlowPyrLKDescriptor (NvMediaVPI *vpi, const NvMediaVPIGetSparseFlowPyrLKParams *params)
 Creates a pointer to an NvMediaVPIGetSparseFlowPyrLKDescriptor. More...
 
NvMediaStatus NvMediaVPIGetSparseFlowPyrLKDesc (NvMediaVPI *vpi, NvMediaVPIGetSparseFlowPyrLKDescriptor *descriptor, const NvMediaVPIGetSparseFlowPyrLKParams *params, NvMediaImagePyramid *oldImages, NvMediaImagePyramid *newImages, NvMediaArray *oldPoints, NvMediaArray *newPoints, NvMediaArray *newStatus)
 Queues an operation to track features in a pyramid. More...
 
NvMediaVPIKLTDescriptorNvMediaVPICreateKLTDescriptor (NvMediaVPI *vpi, const uint32_t width, const uint32_t height, const NvMediaSurfaceType type)
 Creates a pointer to the NvMediaVPIKLTDescriptor. More...
 
NvMediaStatus NvMediaVPIKLTDesc (NvMediaVPI *vpi, NvMediaVPIKLTDescriptor *descriptor, const NvMediaVPIKLTParams *params, NvMediaImage *referenceImage, NvMediaImage *templateImage, NvMediaArray *inputBoxList, NvMediaArray *predictedBoxList, NvMediaArray *outputBoxList, NvMediaArray *estimationList)
 Queues an operation to run the Kanade Lucas Tomasi (KLT) tracking algorithm. More...
 
NvMediaStatus NvMediaVPIGetScratchpadSize (void *descriptor, uint32_t *scratchpadSizeBytes)
 Returns the size of scratchpad memory required for operations that support an NvMediaCVScratchpad based scratchpad. More...
 
NvMediaStatus NvMediaVPIKLTFastDesc (NvMediaVPI *vpi, NvMediaVPIKLTDescriptor *descriptor, NvMediaCVScratchpad *scratchpad, const NvMediaVPIKLTParams *params, NvMediaImage *referenceImage, NvMediaImage *templateImage, NvMediaArray *inputBoxList, NvMediaArray *predictedBoxList, NvMediaArray *outputBoxList, NvMediaArray *estimationList)
 Queues an operation to run the Kanade Lucas Tomasi (KLT) tracking algorithm. More...
 
NvMediaStatus NvMediaVPIGetImagePyramid (NvMediaVPI *vpi, NvMediaImage *input, NvMediaImagePyramid *output)
 Queues an operation to generate a Gaussian pyramid from an input image. More...
 
NvMediaStatus NvMediaVPIConvolveImage (NvMediaVPI *vpi, NvMediaImage *input, const float *kernelData, const uint32_t kernelWidth, const uint32_t kernelHeight, NvMediaImage *output)
 Queues an operation to convolve an input image with a client-supplied convolution matrix. More...
 
NvMediaVPIConvolveImageSeparableDescriptorNvMediaVPICreateConvolveImageSeparableDescriptor (NvMediaVPI *vpi, NvMediaSurfaceType type, const float *kernelX, const uint32_t kernelXSize, const float *kernelY, const uint32_t kernelYSize)
 Creates a pointer to the NvMediaVPIConvolveImageSeparableDescriptor. More...
 
NvMediaStatus NvMediaVPIConvolveImageSeparable (NvMediaVPI *vpi, NvMediaImage *input, const float *kernelX, const uint32_t kernelXSize, const float *kernelY, const uint32_t kernelYSize, NvMediaImage *output)
 Queues an operation to convolve an image with a 2D kernel, using separable convolution. More...
 
NvMediaStatus NvMediaVPIFilterImageBox (NvMediaVPI *vpi, NvMediaImage *input, const uint32_t windowWidth, const uint32_t windowHeight, NvMediaImage *output)
 Queues an operation to compute a generic box filter window of the input image. More...
 
NvMediaStatus NvMediaVPIDestroyDescriptor (NvMediaVPI *vpi, void *descriptor)
 Destroys an NvMediaVPI function descriptor. More...
 

Macro Definition Documentation

#define NVMEDIA_VPI_CONFIDENCE_TABLE_MIN_CAPACITY   (128)

Minimum capacity of NvMediaArray holding Confidence Table.

Definition at line 561 of file nvmedia_vpi.h.

#define NVMEDIA_VPI_HINT_ARRAY_MIN_CAPACITY_BYTES   (261376)

Minimum capacity (in bytes) of NvMediaArray holding Motion Vector Hints Array.

Definition at line 564 of file nvmedia_vpi.h.

#define NVMEDIA_VPI_MAX_QUEUED_TASKS   (64u)

Maximum number of tasks that can be queued.

Used by NvMediaVPICreate().

Definition at line 54 of file nvmedia_vpi.h.

#define NVMEDIA_VPI_VERSION_MAJOR   3

Major version number.

Definition at line 48 of file nvmedia_vpi.h.

#define NVMEDIA_VPI_VERSION_MINOR   1

Minor version number.

Definition at line 50 of file nvmedia_vpi.h.

Typedef Documentation

typedef struct NvMediaVPI NvMediaVPI

Holds an opaque object representing NvMediaVPI.

Definition at line 59 of file nvmedia_vpi.h.

NvMediaVPIConvertMV descriptor.

Definition at line 380 of file nvmedia_vpi.h.

NvMediaVPIConvolveImageSeparableDescriptor.

Definition at line 1184 of file nvmedia_vpi.h.

NvMediaVPISparseFlowPyr descriptor.

Definition at line 859 of file nvmedia_vpi.h.

NvMediaVPIKLTDescriptor descriptor.

Definition at line 927 of file nvmedia_vpi.h.

Specifies the types of KLT Tracking.

NvMediaVPIProcessStereo descriptor.

Definition at line 360 of file nvmedia_vpi.h.

NvMediaVPISteroPostprocess descriptor.

Definition at line 450 of file nvmedia_vpi.h.

NvMediaVPISteroPreprocess descriptor.

Definition at line 522 of file nvmedia_vpi.h.

Enumeration Type Documentation

Specifies types of filters used in the Harris corner detector.

Enumerator
NVMEDIA_VPI_HARRIS_FILTER_TYPE_DEFAULT 

Built-in normalized separable Sobel filter.

NVMEDIA_VPI_HARRIS_FILTER_TYPE_USER 

User-supplied separable gradient filter.

The filter is automatically normalized.

Definition at line 637 of file nvmedia_vpi.h.

Specifies the types of KLT Tracking.

Enumerator
NVMEDIA_VPI_KLT_INVERSE_COMPOSITIONAL 

Specifies Inverse Compositional tracking type.

Definition at line 948 of file nvmedia_vpi.h.

Specifies types of post-process non-maximum suppression.

Enumerator
NVMEDIA_VPI_2D_GRID_8x8_CELL_NO_MIN_DISTANCE 

Definition at line 629 of file nvmedia_vpi.h.

Specifies the types of output for Optical Flow/Stereo Disparity processing.

Enumerator
NVMEDIA_VPI_STEREO_DISPARITY 

Disparity relative to reference.

NVMEDIA_VPI_MV 

Absolute motion vector output.

NVMEDIA_VPI_MV_HINTS 

Motion vector hints for the NVENC hardware engine, which performs video encoding.

When this type is used with processStereoPair(), the output holds data of type NvMediaEncodeExternalMEHint.

Definition at line 366 of file nvmedia_vpi.h.

Specifies the conditions that cause the Lucas-Kanade Feature Tracker to be terminated.

Enumerator
NVMEDIA_VPI_TERMINATION_CRITERION_ITERATIONS 

Specifies termination by the number of iterations.

NVMEDIA_VPI_TERMINATION_CRITERION_EPSILON 

Specifies termination by matching the value against epsilon.

NVMEDIA_VPI_TERMINATION_CRITERION_BOTH 

Specifies termination by iterations or epsilon, whichever happens first.

Definition at line 824 of file nvmedia_vpi.h.

Function Documentation

NvMediaStatus NvMediaVPIArrayRegister ( NvMediaVPI vpi,
NvMediaArray array 
)

Registers an array for use with an NvMediaVPI function.

Parameters
[in]vpiA pointer to the NvMediaVPI returned by NvMediaVPICreate().
[in]arrayA pointer to array to be registered.
Returns
Status indicator. Possible values are:
NvMediaStatus NvMediaVPIArrayUnregister ( NvMediaVPI vpi,
NvMediaArray array 
)

Unregisters an array after use.

Parameters
[in]vpiA pointer to the NvMediaVPI returned by NvMediaVPICreate().
[in]arrayA pointer to array to be unregistered.
Returns
Status indicator. Possible values are:
NvMediaStatus NvMediaVPIConvertMVDesc ( NvMediaVPI vpi,
NvMediaVPIConvertMVDescriptor descriptor,
NvMediaImage inputMVImage,
NvMediaImage inputColor,
NvMediaImage output,
const NvMediaVPIOFSTOutputType  outputType 
)

Converts or refines a motion vector image.

The processing done on the image depends on the outputType parameter:

NvMediaStatus NvMediaVPIConvolveImage ( NvMediaVPI vpi,
NvMediaImage input,
const float *  kernelData,
const uint32_t  kernelWidth,
const uint32_t  kernelHeight,
NvMediaImage output 
)

Queues an operation to convolve an input image with a client-supplied convolution matrix.

Note
NvMediaVPIFlush() must be called to actually flush the queue to the engine.
Parameters
[in]vpiA pointer to the NvMediaVPI object returned by NvMediaVPICreate().
[in]inputA pointer to an NvMediaImage image.
[in]kernelDataA pointer to the convolution kernel coefficients.
[in]kernelWidthConvolution kernel width.
[in]kernelHeightConvolution kernel height.
[out]outputA pointer to an NvMediaImage image.
Returns
Status indicator. Possible values are:
NvMediaStatus NvMediaVPIConvolveImageSeparable ( NvMediaVPI vpi,
NvMediaImage input,
const float *  kernelX,
const uint32_t  kernelXSize,
const float *  kernelY,
const uint32_t  kernelYSize,
NvMediaImage output 
)

Queues an operation to convolve an image with a 2D kernel, using separable convolution.

Note
NvMediaVPIFlush() must be called to actually flush the queue to the engine.
Parameters
[in]vpiA pointer to the NvMediaVPI object returned by NvMediaVPICreate().
[in]inputA pointer to an NvMediaImage image.
[in]kernelXA pointer to the x convolution kernel coefficients.
[in]kernelXSizeSize of the x convolution kernel.
[in]kernelYA pointer to the y convolution kernel coefficients.
[in]kernelYSizeSize of the y convolution kernel.
[in]outputA pointer to an NvMediaImage image.
Returns
Status indicator. Possible values are:
NvMediaVPI* NvMediaVPICreate ( const uint32_t  Id,
const uint32_t  maxQueuedTasks 
)

Creates an NvMediaVPI object.

Parameters
[in]IdEngine ID. Must be less than the value returned by NvMediaVPIGetNumEngines().
[in]maxQueuedTasksNumber of simultaneous tasks that can be submitted to an instance at a time, before NvMediaVPIFlush must be called. maxQueuedTasks is clamped between 1 and NVMEDIA_VPI_MAX_QUEUED_TASKS.
Returns
A pointer to an NvMediaVPI if successful, or NULL otherwise.
NvMediaVPIConvertMVDescriptor* NvMediaVPICreateConvertMVDescriptor ( NvMediaVPI vpi,
const uint32_t  width,
const uint32_t  height,
const NvMediaSurfaceType  type,
const float  strength,
const float  scale 
)

Creates an NvMediaVPIConvertMVDescriptor.

Parameters
[in]vpiA pointer to the NvMediaVPI object returned by NvMediaVPICreate().
[in]widthWidth of the input depth image.
[in]heightHeight of the input depth image.
[in]typeNvMediaSurfaceType of the input depth image.
[in]strengthSmoothing strength: a value in the range (0.0,1.0).
[in]scaleScale factor.
Returns
A pointer to the NvMediaVPIConvertMVDescriptor.
NvMediaVPIConvolveImageSeparableDescriptor* NvMediaVPICreateConvolveImageSeparableDescriptor ( NvMediaVPI vpi,
NvMediaSurfaceType  type,
const float *  kernelX,
const uint32_t  kernelXSize,
const float *  kernelY,
const uint32_t  kernelYSize 
)

Creates a pointer to the NvMediaVPIConvolveImageSeparableDescriptor.

Parameters
[in]vpiA pointer to the NvMediaVPI object returned by NvMediaVPICreate().
[in]typeNvMediaSurfaceType of the input image.
[in]kernelXA pointer to the x convolution kernel coefficients.
[in]kernelXSizeSize of the x convolution kernel.
[in]kernelYA pointer to the y convolution kernel coefficients.
[in]kernelYSizeSize of the y convolution kernel.
Returns
A pointer to the NvMediaVPIConvolveImageSeparableDescriptor.
NvMediaVPIGetKeyPointsFastDescriptor* NvMediaVPICreateGetKeyPointsFastDescriptor ( NvMediaVPI vpi,
const uint32_t  width,
const uint32_t  height,
const NvMediaSurfaceType  type 
)

Creates a pointer to an NvMediaVPIGetKeyPointsFastDescriptor.

Parameters
[in]vpiA pointer to the NvMediaVPI object returned by NvMediaVPICreate().
[in]widthWidth of the input image.
[in]heightHeight of the input image.
[in]typeNvMediaSurfaceType of the input image.
Returns
A pointer to the NvMediaVPIGetKeyPointsFastDescriptor.
NvMediaVPIGetKeyPointsHarrisDescriptor* NvMediaVPICreateGetKeyPointsHarrisDescriptor ( NvMediaVPI vpi,
const uint32_t  width,
const uint32_t  height,
const NvMediaVPINonMaxSuppressionType  nonMaxSuppressionType 
)

Creates a pointer to a NvMediaVPIGetKeyPointsHarrisDescriptor.

Parameters
[in]vpiA pointer to the NvMediaVPI returned by NvMediaVPICreate().
[in]widthInput image width.
[in]heightInput image height.
[in]nonMaxSuppressionTypePost-process non-maximum suppression type.
Returns
A pointer to the NvMediaVPIGetKeyPointsHarrisDescriptor.
NvMediaVPIGetSparseFlowPyrLKDescriptor* NvMediaVPICreateGetSparseFlowPyrLKDescriptor ( NvMediaVPI vpi,
const NvMediaVPIGetSparseFlowPyrLKParams params 
)

Creates a pointer to an NvMediaVPIGetSparseFlowPyrLKDescriptor.

Parameters
[in]vpiA pointer to an NvMediaVPI object returned by NvMediaVPICreate().
[in]paramsA pointer to an NvMediaVPIGetSparseFlowPyrLKParams.
Returns
A pointer to an NvMediaVPIGetSparseFlowPyrLKDescriptor.
NvMediaVPIKLTDescriptor* NvMediaVPICreateKLTDescriptor ( NvMediaVPI vpi,
const uint32_t  width,
const uint32_t  height,
const NvMediaSurfaceType  type 
)

Creates a pointer to the NvMediaVPIKLTDescriptor.

Parameters
[in]vpiA pointer to a NvMediaVPI object returned by NvMediaVPICreate().
[in]widthWidth of the input image.
[in]heightHeight of the input image.
[in]typeNvMediaSurfaceType of the input image.
Returns
A pointer to the NvMediaVPIKLTDescriptor.
NvMediaVPIStereoPostprocessDescriptor* NvMediaVPICreateStereoPostprocessDescriptor ( NvMediaVPI vpi,
const uint32_t  width,
const uint32_t  height,
const float  scale 
)

Creates an NvMediaVPIStereoPostprocessDescriptor.

Parameters
[in]vpiA pointer to the NvMediaVPI returned by NvMediaVPICreate().
[in]widthWidth of the input disparity image.
[in]heightHeight of the input disparity image.
[in]scaleUpsample scale factor. Must be 1.0 or 4.0.
Returns
A pointer to the NvMediaVPIStereoPostprocessDescriptor.
NvMediaVPIStereoPreprocessDescriptor* NvMediaVPICreateStereoPreprocessDescriptor ( NvMediaVPI vpi,
const uint32_t  width,
const uint32_t  height,
const NvMediaVPIOFSTOutputType  outputType 
)

Creates an NvMediaVPIStereoPreprocessDescriptor.

Parameters
[in]vpiA pointer to the NvMediaVPI returned by NvMediaVPICreate().
[in]widthWidth of the input disparity image.
[in]heightHeight of the input disparity image.
[in]outputTypeAn NvMediaVPIOFSTOutputType specifying the type of output.
Returns
A pointer to the NvMediaVPIStereoPreprocessDescriptor.
NvMediaStatus NvMediaVPIDestroy ( NvMediaVPI vpi)

Destroys an NvMediaVPI object created by NvMediaVPICreate().

Parameters
[in]vpiA pointer to the object to be destroyed.
Returns
Status indicator. Possible values are:
NvMediaStatus NvMediaVPIDestroyDescriptor ( NvMediaVPI vpi,
void *  descriptor 
)

Destroys an NvMediaVPI function descriptor.

Parameters
[in]vpiA pointer to an NvMediaVPI object returned by NvMediaVPICreate().
[in]descriptorA pointer to an NvMediaVPI function descriptor.
Returns
Status indicator. Possible values are:
NvMediaStatus NvMediaVPIFilterImageBox ( NvMediaVPI vpi,
NvMediaImage input,
const uint32_t  windowWidth,
const uint32_t  windowHeight,
NvMediaImage output 
)

Queues an operation to compute a generic box filter window of the input image.

Note
NvMediaVPIFlush() must be called to actually flush the queue to the engine.
Parameters
[in]vpiA pointer to the NvMediaVPI object returned by NvMediaVPICreate().
[in]inputA pointer to an NvMediaImage image.
[in]windowWidthWindow width.
[in]windowHeightWindow height.
[in]outputA pointer to an NvMediaImage image.
Returns
Status indicator. Possible values are:
NvMediaStatus NvMediaVPIFlush ( NvMediaVPI vpi)

Flushes all queued operations.

Parameters
[in]vpiA pointer to the NvMediaVPI returned by NvMediaVPICreate().
Returns
Status indicator. Possible values are:
NvMediaStatus NvMediaVPIGetImagePyramid ( NvMediaVPI vpi,
NvMediaImage input,
NvMediaImagePyramid output 
)

Queues an operation to generate a Gaussian pyramid from an input image.

Note
NvMediaVPIFlush() must be called to actually flush the queue to the engine.
Parameters
[in]vpiA pointer to the NvMediaVPI object returned by NvMediaVPICreate().
[in]inputA pointer to an NvMediaImage image. The image may be the same NvMediaImage as is returned by NvMediaImagePyramidGetImageForLevel(output, 0), thereby saving a copy operation of the input to the output.
[out]outputA pointer to an NvMediaImagePyramid.
Returns
Status indicator. Possible values are:
NvMediaStatus NvMediaVPIGetKeyPointsFastDesc ( NvMediaVPI vpi,
NvMediaVPIGetKeyPointsFastDescriptor descriptor,
NvMediaImage input,
const uint32_t  strengthThresh,
const NvMediaBool  nonmaxSupression,
NvMediaArray keypoints,
NvMediaArray scores 
)

Queues an operation to get FAST keypoints throughout an image.

If the keypoints array is not empty, then the operation tracks the keypoints as well.

Note
NvMediaVPIFlush() must be called to actually flush the queue to the engine.
Parameters
[in]vpiA pointer to the NvMediaVPI object returned by NvMediaVPICreate().
[in,out]descriptorA pointer returned by NvMediaVPICreateGetKeyPointsFastDescriptor().
[in]inputNvMediaImage image.
[in]strengthThreshThreshold of difference between intensity of the central pixel and pixels on Bresenham's circle of radius 3.
[in]nonmaxSupressionIndicates whether to apply non-maximum suppression.
[in,out]keypointsA pointer to an NvMediaArray containing keypoints. array must be created by a call to NvMediaArrayCreate() with stride passed as size of NvMediaVPIPoint2DFrac.
[out]scoresA pointer to an NvMediaArray containing scores.
Returns
Status indicator. Possible values are:
NvMediaStatus NvMediaVPIGetKeyPointsHarrisDesc ( NvMediaVPI vpi,
NvMediaVPIGetKeyPointsHarrisDescriptor descriptor,
const NvMediaVPIGetKeyPointsHarrisParams params,
NvMediaImage input,
NvMediaImage mask,
NvMediaArray trackedKeypoints,
NvMediaArray trackedScores,
NvMediaArray keypoints,
NvMediaArray scores 
)

Queues an operation to get Harris keypoints throughout an image.

If the tracked keypoints array is not empty, then those keypoints are inserted at the beginning of the output keypoints array. An optional mask can be supplied to suppress detected and tracked keypoints. Suppressed tracked keypoints are removed from the output array. Non-maximum suppression is applied only to newly detected keypoints.

Note
NvMediaVPIFlush() must be called to actually flush the queue to the engine.
Parameters
[in]vpiA pointer to the NvMediaVPI object returned by NvMediaVPICreate().
[in,out]descriptorA pointer returned by NvMediaVPICreateGetKeyPointsHarrisDescriptor().
[in]paramsA pointer to NvMediaVPIGetKeyPointsHarrisParams.
[in]inputA pointer to an NvMediaImage image.
[in]maskNvMediaImage mask image. Optional. Value may be 0 (suppressed) or 0xFF (not suppressed).
[in]trackedKeypointsA pointer to an NvMediaArray containing keypoints to track. Optional. If NULL, trackedScores must be NULL. The array must be created by a call to NvMediaArrayCreate() with stride passed as size of NvMediaVPIPoint2DFrac.
[in]trackedScoresA pointer to an NvMediaArray containing scores of keypoints to track. Optional. If NULL, trackedKeypoints must be NULL.
[out]keypointsA pointer to an NvMediaArray containing keypoints. array must be created by a call to NvMediaArrayCreate() with stride passed as size of NvMediaVPIPoint2DFrac.
[out]scoresA pointer to an NvMediaArray containing scores.
Returns
Status indicator. Possible values are:
NvMediaStatus NvMediaVPIGetNumEngines ( uint32_t *  numEngines)

Returns the number of HW engines accessible.

Parameters
[in]numEnginesA pointer to the number of engines.
Returns
Status indicator. Possible values are:
NvMediaStatus NvMediaVPIGetScratchpadSize ( void *  descriptor,
uint32_t *  scratchpadSizeBytes 
)

Returns the size of scratchpad memory required for operations that support an NvMediaCVScratchpad based scratchpad.

Parameters
[in]descriptorA pointer returned by NvMediaVPICreateXYZDescriptor().
[out]scratchpadSizeBytesA pointer to the amount of scratchpad memory required for the operation, in bytes.
Returns
Status indicator. Possible values are:
NvMediaStatus NvMediaVPIGetSparseFlowPyrLKDesc ( NvMediaVPI vpi,
NvMediaVPIGetSparseFlowPyrLKDescriptor descriptor,
const NvMediaVPIGetSparseFlowPyrLKParams params,
NvMediaImagePyramid oldImages,
NvMediaImagePyramid newImages,
NvMediaArray oldPoints,
NvMediaArray newPoints,
NvMediaArray newStatus 
)

Queues an operation to track features in a pyramid.

Note
NvMediaVPIFlush() must be called to actually flush the queue to the engine.
Parameters
[in]vpiA pointer to an NvMediaVPI object returned by NvMediaVPICreate().
[in,out]descriptorA pointer returned by NvMediaVPICreateGetSparseFlowPyrLKDescriptor().
[in]paramsA pointer to an NvMediaVPIGetSparseFlowPyrLKParams.
[in]oldImagesA pointer to the input NvMediaImagePyramid of first (old) images.
[in]newImagesA pointer to the input NvMediaImagePyramid of destination (new) images.
[in]oldPointsA pointer to an array of keypoints in the oldImages high resolution pyramid. array must be created by a call to NvMediaArrayCreate() with stride passed as size of NvMediaVPIPoint2DFrac.
[in,out]newPointsA pointer to an array of keypoints in the newImages high resolution pyramid. It is used for starting a search in newImages. array must be created by a call to NvMediaArrayCreate() with stride passed as size of NvMediaVPIPoint2DFrac.
[out]newStatusA pointer to an array for tracking status for each input in oldPoints.
Returns
Status indicator. Possible values are:
NvMediaStatus NvMediaVPIGetVersion ( NvMediaVersion version)

Returns version information for the NvMediaVPI library.

Parameters
[in]versionA pointer to a NvMediaVersion structure filled by the NvMediaVPI library.
Returns
Status indicator. Possible values are:
NvMediaStatus NvMediaVPIImageRegister ( NvMediaVPI vpi,
NvMediaImage image 
)

Registers an image for use with an NvMediaVPI function.

Parameters
[in]vpiA pointer to the NvMediaVPI returned by NvMediaVPICreate().
[in]imageA pointer to image to be registered.
Returns
Status indicator. Possible values are:
NvMediaStatus NvMediaVPIImageUnregister ( NvMediaVPI vpi,
NvMediaImage image 
)

Unregisters an image after use.

Parameters
[in]vpiA pointer to the NvMediaVPI returned by NvMediaVPICreate().
[in]imageA pointer to the image to be unregistered.
Returns
Status indicator. Possible values are:
NvMediaStatus NvMediaVPIKLTDesc ( NvMediaVPI vpi,
NvMediaVPIKLTDescriptor descriptor,
const NvMediaVPIKLTParams params,
NvMediaImage referenceImage,
NvMediaImage templateImage,
NvMediaArray inputBoxList,
NvMediaArray predictedBoxList,
NvMediaArray outputBoxList,
NvMediaArray estimationList 
)

Queues an operation to run the Kanade Lucas Tomasi (KLT) tracking algorithm.

Note
NvMediaVPIFlush() must be called to actually flush the queue to the engine.
Parameters
[in]vpiA pointer to an NvMediaVPI object returned by NvMediaVPICreate().
[in,out]descriptorA pointer returned by NvMediaVPICreateKLTDescriptor().
[in]paramsA pointer to an NvMediaVPIKLTParams object.
[in]referenceImageA pointer to an NvMediaImage reference image.
[in]templateImageA pointer to an NvMediaImage template image.
[in]inputBoxListA pointer to an NvMediaArray input bounding box list. The array must be created by a call to NvMediaArrayCreate() with stride passed as size of NvMediaVPIAABB.
[in]predictedBoxListA pointer to an NvMediaArray predicted bounding box list. The array must be created by a call to NvMediaArrayCreate() with stride passed as size of NvMediaVPITranslationWithScale.
[out]outputBoxListA pointer to an NvMediaArray output bounding box list. The array must be created by a call to NvMediaArrayCreate() with stride passed as size of NvMediaVPIAABB.
[out]estimationListA pointer to an NvMediaArray output estimated motion. The array must be created by a call to NvMediaArrayCreate() with stride passed as size of NvMediaVPITranslationWithScale.
Returns
Status indicator. Possible values are:
NvMediaStatus NvMediaVPIKLTFastDesc ( NvMediaVPI vpi,
NvMediaVPIKLTDescriptor descriptor,
NvMediaCVScratchpad scratchpad,
const NvMediaVPIKLTParams params,
NvMediaImage referenceImage,
NvMediaImage templateImage,
NvMediaArray inputBoxList,
NvMediaArray predictedBoxList,
NvMediaArray outputBoxList,
NvMediaArray estimationList 
)

Queues an operation to run the Kanade Lucas Tomasi (KLT) tracking algorithm.

This version uses CVScratchpad for optimized operation.

Note
NvMediaVPIFlush() must be called to actually flush the queue to the engine.
Parameters
[in]vpiA pointer to the NvMediaVPI object returned by NvMediaVPICreate().
[in,out]descriptorA pointer returned by NvMediaVPICreateKLTDescriptor().
[in]scratchpadA pointer to an NvMediaCVScratchpad created by NvMediaCVScratchpadCreate().
[in]paramsA pointer to an NvMediaVPIKLTParams object.
[in]referenceImageA pointer to an NvMediaImage reference image.
[in]templateImageA pointer to an NvMediaImage template image.
[in]inputBoxListA pointer to an NvMediaArray input bounding box list. The array must be created by a call to NvMediaArrayCreate() with stride passed as size of NvMediaVPIAABB.
[in]predictedBoxListA pointer to an NvMediaArray predicted bounding box list. The array must be created by a call to NvMediaArrayCreate() with stride passed as size of NvMediaVPITranslationWithScale.
[out]outputBoxListA pointer to an NvMediaArray output bounding box list. The array must be created by a call to NvMediaArrayCreate() with stride passed as size of NvMediaVPIAABB.
[out]estimationListA pointer to an NvMediaArray output estimated motion. The array must be created by a call to NvMediaArrayCreate() with stride passed as size of NvMediaVPITranslationWithScale.
Returns
Status indicator. Possible values are:
NvMediaStatus NvMediaVPIPyramidRegister ( NvMediaVPI vpi,
NvMediaImagePyramid pyramid 
)

Registers a pyramid for use with an NvMediaVPI function.

Parameters
[in]vpiA pointer to the NvMediaVPI returned by NvMediaVPICreate().
[in]pyramidA pointer to the pyramid to be registered.
Returns
Status indicator. Possible values are:
NvMediaStatus NvMediaVPIPyramidUnregister ( NvMediaVPI vpi,
NvMediaImagePyramid pyramid 
)

Unregisters a pyramid after use.

Parameters
[in]vpiA pointer to the NvMediaVPI returned by NvMediaVPICreate().
[in]pyramidA pointer to the pyramid to be unregistered.
Returns
Status indicator. Possible values are:
NvMediaStatus NvMediaVPIScratchpadRegister ( NvMediaVPI vpi,
NvMediaCVScratchpad scratchpad 
)

Registers scratchpad memory for use with an NvMediaVPI function.

Parameters
[in]vpiA pointer to the NvMediaVPI returned by NvMediaVPICreate().
[in]scratchpadA pointer to the NvMediaCVScratchpad handle to be registered.
Returns
Status indicator. Possible values are:
NvMediaStatus NvMediaVPIScratchpadUnregister ( NvMediaVPI vpi,
NvMediaCVScratchpad scratchpad 
)

Unregisters scratchpad memory after use.

Parameters
[in]vpiA pointer to the NvMediaVPI returned by NvMediaVPICreate().
[in]scratchpadA pointer to the NvMediaCVScratchpad handle to be unregistered.
Returns
Status indicator. Possible values are:
NvMediaStatus NvMediaVPIStereoPostprocessDesc ( NvMediaVPI vpi,
NvMediaVPIStereoPostprocessDescriptor descriptor,
NvMediaVPIStereoPostprocessParams params,
NvMediaImage disparityInput,
NvMediaImage confidenceInput,
NvMediaImage disparityOutput,
NvMediaImage confidenceOutput 
)

Performs stereo postprocessing to refine a disparity image.

Note
NvMediaVPIFlush() must be called to actually flush the queue to the engine.
Parameters
[in]vpiA pointer to the NvMediaVPI returned by NvMediaVPICreate().
[in,out]descriptorA pointer returned by NvMediaVPICreateStereoPostprocessDescriptor().
[in]paramsA pointer to an NvMediaVPIStereoPostprocessParams.
[in]disparityInputA pointer to an input disparity image that needs refinement.
[in]confidenceInputA pointer to an input confidence map.
[out]disparityOutputA pointer to the refined and upscaled (for scale>1.0) disparity image.
[out]confidenceOutputA pointer to the refined and upscaled (for scale>1.0) confidence map.
Returns
Status indicator. Possible values are:
NvMediaStatus NvMediaVPIStereoPreprocessDescEx ( NvMediaVPI vpi,
NvMediaVPIStereoPreprocessDescriptor descriptor,
NvMediaVPIStereoPreprocessParams params,
NvMediaArray confidenceTable,
NvMediaImage leftImage,
NvMediaImage rightImage,
NvMediaImage leftDisparity,
NvMediaImage rightDisparity,
NvMediaImage confidenceMap,
NvMediaArray hintsArray 
)

Performs stereo preprocessing to produce a disparity image or motion vector hints.

Motion vector hints are generated as a 1-D array.

Note
NvMediaVPIFlush() must be called to actually flush the queue to the engine.
Parameters
[in]vpiA pointer to the NvMediaVPI returned by NvMediaVPICreate().
[in,out]descriptorA pointer returned by NvMediaVPICreateStereoPreprocessDescriptor().
[in]paramsA pointer to an NvMediaVPIStereoPreprocessParams.
[in]confidenceTableA pointer to an NvMediaArray containing mapped confidence. The array must be of unsigned int16 type with a capacity at least NVMEDIA_VPI_CONFIDENCE_TABLE_MIN_CAPACTY.
[in]leftImageA pointer to the input left image.
[in]rightImageA pointer to the input right image.
[out]leftDisparityA pointer to the left disparity if NvMediaVPIOFSTOutputType is NVMEDIA_VPI_STEREO_DISPARITY. Must NULL for other output types.
[out]rightDisparityA pointer to the right disparity if NvMediaVPIOFSTOutputType is NVMEDIA_VPI_STEREO_DISPARITY. Must NULL for other output types.
[out]confidenceMapA pointer to an NvMediaImage containing Confidence Map if NvMediaVPIOFSTOutputType is NVMEDIA_VPI_MV_HINTS. Must NULL for other output types.
[out]hintsArrayA pointer to an NvMediaArray containing motion vector hints if NvMediaVPIOFSTOutputType is NVMEDIA_VPI_MV_HINTS. Must NULL for other output types.
Returns
Status indicator. Possible values are: