![]() |
NVIDIA DRIVE OS Linux SDK API Reference5.1.6.0 Release |
The NvMedia Vision Programming Interface (VPI) API contains NvMedia functions for accessing the 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 2 |
Major version number. More... | |
#define | NVMEDIA_VPI_VERSION_MINOR 6 |
Minor version number. More... | |
#define | NVMEDIA_VPI_MAX_QUEUED_TASKS 64 |
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... | |
#define NVMEDIA_VPI_CONFIDENCE_TABLE_MIN_CAPACITY (128) |
Minimum capacity of NvMediaArray holding Confidence Table.
Definition at line 635 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 690 of file nvmedia_vpi.h.
#define NVMEDIA_VPI_MAX_QUEUED_TASKS 64 |
Maximum number of tasks that can be queued.
Used by NvMediaVPICreate().
Definition at line 47 of file nvmedia_vpi.h.
#define NVMEDIA_VPI_VERSION_MAJOR 2 |
Major version number.
Definition at line 41 of file nvmedia_vpi.h.
#define NVMEDIA_VPI_VERSION_MINOR 6 |
Minor version number.
Definition at line 43 of file nvmedia_vpi.h.
typedef struct NvMediaVPI NvMediaVPI |
Holds an opaque object representing NvMediaVPI.
Definition at line 52 of file nvmedia_vpi.h.
typedef struct NvMediaVPIConvertMVDescriptor NvMediaVPIConvertMVDescriptor |
NvMediaVPIConvertMV descriptor.
Definition at line 454 of file nvmedia_vpi.h.
typedef struct NvMediaVPIConvolveImageSeparableDescriptor NvMediaVPIConvolveImageSeparableDescriptor |
NvMediaVPIConvolveImageSeparableDescriptor.
Definition at line 1348 of file nvmedia_vpi.h.
Definition at line 889 of file nvmedia_vpi.h.
Definition at line 774 of file nvmedia_vpi.h.
NvMediaVPISparseFlowPyr descriptor.
Definition at line 994 of file nvmedia_vpi.h.
typedef struct NvMediaVPIKLTDescriptor NvMediaVPIKLTDescriptor |
NvMediaVPIKLTDescriptor descriptor.
Definition at line 1068 of file nvmedia_vpi.h.
typedef enum NvMediaVPIKltTrackType NvMediaVPIKltTrackType |
Specifies the types of KLT Tracking.
NvMediaVPIProcessStereo descriptor.
Definition at line 386 of file nvmedia_vpi.h.
NvMediaVPISteroPostprocess descriptor.
Definition at line 524 of file nvmedia_vpi.h.
NvMediaVPISteroPreprocess descriptor.
Definition at line 596 of file nvmedia_vpi.h.
enum NvMediaVPIArrayType |
Defines the different types of VPI-specific arrays.
Definition at line 56 of file nvmedia_vpi.h.
Specifies types of filters used in the Harris corner detector.
Definition at line 763 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 1089 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 755 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 |
Definition at line 392 of file nvmedia_vpi.h.
Specifies the conditions that cause the Lucas-Kanade Feature Tracker to be terminated.
Definition at line 959 of file nvmedia_vpi.h.
NvMediaArray* NvMediaVPIArrayCreate | ( | NvMediaDevice * | device, |
NvMediaVPIArrayType | type, | ||
uint32_t | numElements, | ||
const NvMediaArrayAllocAttr * | attrs, | ||
uint32_t | numAttrs | ||
) |
Creates an NvMediaArray for a VPI-specific element type.
[in] | device | Handle to the NvMedia device obtained by calling NvMediaDeviceCreate(). |
[in] | type | Type of array to be created. |
[in] | numElements | Number of elements in the array. |
[in] | attrs | A pointer to an array of allocation attributes. |
[in] | numAttrs | Number of allocation elelments in attrs. |
NvMediaStatus NvMediaVPIArrayGet2DTransform | ( | NvMediaArray * | array, |
const uint32_t | startIndex, | ||
const uint32_t | numElements, | ||
NvMediaVPI2DTransform * | destPtr | ||
) |
Helper function; converts an NvMediaArray of type NVMEDIA_VPI_ARRAY_TYPE_TRANSFORM type to an array of type NvMediaVPI2DTransform.
[in] | array | A pointer to the input NvMediaArray. The array must be created by a call to NvMediaVPIArrayCreate(). |
[in] | startIndex | Index offset (number of elements) into array. |
[in] | numElements | Number of elements to write to destination. |
[out] | destPtr | A pointer to a location in which to write the output array. |
NvMediaStatus NvMediaVPIArrayGetAABB | ( | NvMediaArray * | array, |
const uint32_t | startIndex, | ||
const uint32_t | numElements, | ||
NvMediaVPIAABB * | destPtr | ||
) |
Helper function; converts an NvMediaArray of type NVMEDIA_VPI_ARRAY_TYPE_BBOX_XFORM type to an array of type NvMediaVPIAABB.
[in] | array | A pointer to an input NvMediaArray. The array must be created with NvMediaVPIArrayCreate(). |
[in] | startIndex | Index offset (number of elements) into array. |
[in] | numElements | Number of elements to write to destination. |
[out] | destPtr | A pointer to the location at which to write the output array. |
NvMediaStatus NvMediaVPIArrayGetBoundingBoxWithTransform | ( | NvMediaArray * | array, |
const uint32_t | startIndex, | ||
const uint32_t | numElements, | ||
NvMediaVPIBoundingBoxWithTransform * | destPtr | ||
) |
Helper function; converts an NvMediaArray of type NVMEDIA_VPI_ARRAY_TYPE_BBOX_XFORM type to an array of type NvMediaVPIBoundingBoxWithTransform.
[in] | array | A pointer to the input NvMediaArray. The array must be created by a call to NvMediaVPIArrayCreate(). |
[in] | startIndex | Index offset (number of elements) into array. |
[in] | numElements | Number of elements to write to destination. |
[out] | destPtr | A pointer to a location in which to write the output array. |
NvMediaStatus NvMediaVPIArrayGetPoint2Df | ( | NvMediaArray * | array, |
const uint32_t | startIndex, | ||
const uint32_t | numElements, | ||
NvMediaVPIPoint2Df * | destPtr | ||
) |
Helper function; converts an NvMediaArray of type NVMEDIA_VPI_ARRAY_TYPE_KEYPOINT type to an array of type NvMediaVPIPoint2Df.
[in] | array | A pointer to the input NvMediaArray. The array must be created with NvMediaVPIArrayCreate(). |
[in] | startIndex | Index offset (number of elements) into the array. Currently 0 (zero) is the only value supported. |
[in] | numElements | Number of elements to write to the destination. |
[out] | destPtr | A pointer to the location where the output array is to be written. |
NvMediaStatus NvMediaVPIArrayGetTranslationWithScale | ( | NvMediaArray * | array, |
const uint32_t | startIndex, | ||
const uint32_t | numElements, | ||
NvMediaVPITranslationWithScale * | destPtr | ||
) |
Helper function; converts an NvMediaArray of type NVMEDIA_VPI_ARRAY_TYPE_TRANSFORM to an array of type NvMediaVPITranslationWithScale.
[in] | array | A pointer to the input NvMediaArray. The array must be created by a call to NvMediaVPIArrayCreate(). |
[in] | startIndex | Index offset (number of elements) into array. |
[in] | numElements | Number of elements to write to destination. |
[out] | destPtr | A pointer to a location at which to write the output array. |
NvMediaStatus NvMediaVPIArrayRegister | ( | NvMediaVPI * | vpi, |
NvMediaArray * | array | ||
) |
Registers an array for use with an NvMediaVPI function.
[in] | vpi | A pointer to the Vision Programming Interface returned by NvMediaVPICreate(). |
[in] | array | A pointer to array to be registered. |
NvMediaStatus NvMediaVPIArrayUnregister | ( | NvMediaVPI * | vpi, |
NvMediaArray * | array | ||
) |
Unregisters an array after use.
[in] | vpi | A pointer to the Vision Programming Interface returned by NvMediaVPICreate(). |
[in] | array | A pointer to array to be unregistered. |
NvMediaStatus NvMediaVPIArrayUpdate2DTransform | ( | NvMediaVPI2DTransform * | inputPtr, |
const uint32_t | startIndex, | ||
const uint32_t | numElements, | ||
NvMediaArray * | destArray | ||
) |
Helper function; converts an array of NvMediaVPI2DTransform to NvMediaArray of NVMEDIA_VPI_ARRAY_TYPE_TRANSFORM type.
[in] | inputPtr | A pointer to the input array. |
[in] | startIndex | Index offset (number of elements) into array. |
[in] | numElements | Number of elements to write to destination. |
[out] | destArray | A pointer to output NvMediaArray. destArray must be created by a call to NvMediaVPIArrayCreate(). |
NvMediaStatus NvMediaVPIArrayUpdateAABB | ( | NvMediaVPIAABB * | inputPtr, |
const uint32_t | startIndex, | ||
const uint32_t | numElements, | ||
NvMediaArray * | destArray | ||
) |
Helper function; converts an array of type NvMediaVPIAABB to an NvMediaArray of type NVMEDIA_VPI_ARRAY_TYPE_BBOX_XFORM.
[in] | inputPtr | A pointer to the input array. |
[in] | startIndex | Index offset (number of elements) into the destination array. |
[in] | numElements | Number of elements to write to the destination. |
[out] | destArray | A pointer to the output NvMediaArray. destArray must be created by a call to NvMediaVPIArrayCreate(). |
NvMediaStatus NvMediaVPIArrayUpdateBoundingBoxWithTransform | ( | NvMediaVPIBoundingBoxWithTransform * | inputPtr, |
const uint32_t | startIndex, | ||
const uint32_t | numElements, | ||
NvMediaArray * | destArray | ||
) |
Helper function; converts an array of type NvMediaVPIBoundingBoxWithTransform to an NvMediaArray of type NVMEDIA_VPI_ARRAY_TYPE_BBOX_XFORM.
[in] | inputPtr | A pointer to the input array. |
[in] | startIndex | Index offset (number of elements) into destination array. |
[in] | numElements | Number of elements to write to the destination. |
[out] | destArray | A pointer to an output NvMediaArray. destArray must be created by a call to NvMediaVPIArrayCreate(). |
NvMediaStatus NvMediaVPIArrayUpdatePoint2Df | ( | NvMediaVPIPoint2Df * | inputPtr, |
const uint32_t | startIndex, | ||
const uint32_t | numElements, | ||
NvMediaArray * | destArray | ||
) |
Helper function; converts an array of type NvMediaVPIPoint2Df to an NvMediaArray of type NVMEDIA_VPI_ARRAY_TYPE_KEYPOINT.
[in] | inputPtr | A pointer to the input array. |
[in] | startIndex | Index offset (number of elements) into the destination array. |
[in] | numElements | Number of elements to write to the destination. |
[out] | destArray | A pointer to the output NvMediaArray. destArray must be created by a call to NvMediaVPIArrayCreate() with type set to NVMEDIA_VPI_ARRAY_TYPE_KEYPOINT. |
NvMediaStatus NvMediaVPIArrayUpdateTranslationWithScale | ( | NvMediaVPITranslationWithScale * | inputPtr, |
const uint32_t | startIndex, | ||
const uint32_t | numElements, | ||
NvMediaArray * | destArray | ||
) |
Helper function; converts an array of type NvMediaVPITranslationWithScale to an NvMediaArray of type NVMEDIA_VPI_ARRAY_TYPE_TRANSFORM.
[in] | inputPtr | A pointer to the input array. |
[in] | startIndex | Index offset (number of elements) into destination array. |
[in] | numElements | Number of elements to write to destination. |
[out] | destArray | A pointer to the output NvMediaArray. destArray must be created by a call to NvMediaVPIArrayCreate(). |
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:
NVMEDIA_VPI_STEREO_DISPARITY
, this function converts the image to a stereo disparity.NVMEDIA_VPI_MV
this function refines it. [in] | vpi | A pointer to the Vision Programming Interface returned by NvMediaVPICreate(). |
[in,out] | descriptor | A pointer returned by NvMediaVPICreateConvertMVDescriptor(). |
[in] | inputMVImage | A pointer to an Input Motion Vectors image which must be converted or refined. |
[in] | inputColor | A pointer to an input color NvMediaImage image. |
[out] | output | A pointer to the NvMediaImage image which has been refined. |
[in] | outputType | Type of output. |
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.
[in] | vpi | A pointer to the Vision Programming Interface object returned by NvMediaVPICreate(). |
[in] | input | A pointer to an NvMediaImage image. |
[in] | kernelData | A pointer to the convolution kernel coefficients. |
[in] | kernelWidth | Convolution kernel width. |
[in] | kernelHeight | Convolution kernel height. |
[out] | output | A pointer to an NvMediaImage image. |
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.
[in] | vpi | A pointer to the Vision Programming Interface object returned by NvMediaVPICreate(). |
[in] | input | A pointer to an NvMediaImage image. |
[in] | kernelX | A pointer to the x convolution kernel coefficients. |
[in] | kernelXSize | Size of the x convolution kernel. |
[in] | kernelY | A pointer to the y convolution kernel coefficients. |
[in] | kernelYSize | Size of the y convolution kernel. |
[in] | output | A pointer to an NvMediaImage image. |
NvMediaVPI* NvMediaVPICreate | ( | const uint32_t | Id, |
const uint32_t | maxQueuedTasks | ||
) |
Creates an NvMediaVPI object.
[in] | Id | Engine ID. Must be less than the value returned by NvMediaVPIGetNumEngines(). |
[in] | maxQueuedTasks | Number 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. |
NvMediaVPIConvertMVDescriptor* NvMediaVPICreateConvertMVDescriptor | ( | NvMediaVPI * | vpi, |
const uint32_t | width, | ||
const uint32_t | height, | ||
const NvMediaSurfaceType | type, | ||
const float | strength, | ||
const float | scale | ||
) |
Creates an NvMediaVPIConvertMVDescriptor.
[in] | vpi | A pointer to the Vision Programming Interface object returned by NvMediaVPICreate(). |
[in] | width | Width of the input depth image. |
[in] | height | Height of the input depth image. |
[in] | type | NvMediaSurfaceType of the input depth image. |
[in] | strength | Smoothing strength: a value in the range (0.0,1.0). |
[in] | scale | Scale factor. |
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.
[in] | vpi | A pointer to the Vision Programming Interface object returned by NvMediaVPICreate(). |
[in] | type | NvMediaSurfaceType of the input image. |
[in] | kernelX | A pointer to the x convolution kernel coefficients. |
[in] | kernelXSize | Size of the x convolution kernel. |
[in] | kernelY | A pointer to the y convolution kernel coefficients. |
[in] | kernelYSize | Size of the y convolution kernel. |
NvMediaVPIGetKeyPointsFastDescriptor* NvMediaVPICreateGetKeyPointsFastDescriptor | ( | NvMediaVPI * | vpi, |
const uint32_t | width, | ||
const uint32_t | height, | ||
const NvMediaSurfaceType | type | ||
) |
Creates a pointer to an NvMediaVPIGetKeyPointsFastDescriptor.
[in] | vpi | A pointer to the Vision Programming Interface object returned by NvMediaVPICreate(). |
[in] | width | Width of the input image. |
[in] | height | Height of the input image. |
[in] | type | NvMediaSurfaceType of the input image. |
NvMediaVPIGetKeyPointsHarrisDescriptor* NvMediaVPICreateGetKeyPointsHarrisDescriptor | ( | NvMediaVPI * | vpi, |
const uint32_t | width, | ||
const uint32_t | height, | ||
const NvMediaVPINonMaxSuppressionType | nonMaxSuppressionType | ||
) |
Creates a pointer to a NvMediaVPIGetKeyPointsHarrisDescriptor.
[in] | vpi | A pointer to the Vision Programming Interface returned by NvMediaVPICreate(). |
[in] | width | Input image width. |
[in] | height | Input image height. |
[in] | nonMaxSuppressionType | Post-process non-maximum suppression type. |
NvMediaVPIGetSparseFlowPyrLKDescriptor* NvMediaVPICreateGetSparseFlowPyrLKDescriptor | ( | NvMediaVPI * | vpi, |
const NvMediaVPIGetSparseFlowPyrLKParams * | params | ||
) |
Creates a pointer to an NvMediaVPIGetSparseFlowPyrLKDescriptor.
[in] | vpi | A pointer to an Vision Programming Interface object returned by NvMediaVPICreate(). |
[in] | params | A pointer to an NvMediaVPIGetSparseFlowPyrLKParams. |
NvMediaVPIKLTDescriptor* NvMediaVPICreateKLTDescriptor | ( | NvMediaVPI * | vpi, |
const uint32_t | width, | ||
const uint32_t | height, | ||
const NvMediaSurfaceType | type | ||
) |
Creates a pointer to the NvMediaVPIKLTDescriptor.
[in] | vpi | A pointer to a Vision Programming Interface object returned by NvMediaVPICreate(). |
[in] | width | Width of the input image. |
[in] | height | Height of the input image. |
[in] | type | NvMediaSurfaceType of the input image. |
NvMediaVPIProcessStereoDescriptor* NvMediaVPICreateProcessStereoPairDescriptor | ( | NvMediaVPI * | vpi, |
const uint32_t | width, | ||
const uint32_t | height, | ||
const NvMediaVPIOFSTOutputType | outputType | ||
) |
Creates NvMediaVPIProcessStereoDescriptor.
[in] | vpi | A pointer to the Vision Programming Interface object returned by NvMediaVPICreate(). |
[in] | width | Width of the input images. |
[in] | height | Height of the input images. |
[in] | outputType | NvMediaVPIOFSTOutputType for type of output. |
NvMediaVPIStereoPostprocessDescriptor* NvMediaVPICreateStereoPostprocessDescriptor | ( | NvMediaVPI * | vpi, |
const uint32_t | width, | ||
const uint32_t | height, | ||
const float | scale | ||
) |
Creates an NvMediaVPIStereoPostprocessDescriptor.
[in] | vpi | A pointer to the Vision Programming Interface returned by NvMediaVPICreate(). |
[in] | width | Width of the input disparity image. |
[in] | height | Height of the input disparity image. |
[in] | scale | Upsample scale factor. Must be 1.0 or 4.0. |
NvMediaVPIStereoPreprocessDescriptor* NvMediaVPICreateStereoPreprocessDescriptor | ( | NvMediaVPI * | vpi, |
const uint32_t | width, | ||
const uint32_t | height, | ||
const NvMediaVPIOFSTOutputType | outputType | ||
) |
Creates an NvMediaVPIStereoPreprocessDescriptor.
[in] | vpi | A pointer to the Vision Programming Interface returned by NvMediaVPICreate(). |
[in] | width | Width of the input disparity image. |
[in] | height | Height of the input disparity image. |
[in] | outputType | An NvMediaVPIOFSTOutputType specifying the type of output. |
NvMediaStatus NvMediaVPIDestroy | ( | NvMediaVPI * | vpi | ) |
Destroys an Vision Programming Interface object created by NvMediaVPICreate().
[in] | vpi | A pointer to the object to be destroyed. |
NvMediaStatus NvMediaVPIDestroyDescriptor | ( | NvMediaVPI * | vpi, |
void * | descriptor | ||
) |
Destroys an NvMediaVPI function descriptor.
[in] | vpi | A pointer to an Vision Programming Interface object returned by NvMediaVPICreate(). |
[in] | descriptor | A pointer to an NvMediaVPI function descriptor. |
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.
[in] | vpi | A pointer to the Vision Programming Interface object returned by NvMediaVPICreate(). |
[in] | input | A pointer to an NvMediaImage image. |
[in] | windowWidth | Window width. |
[in] | windowHeight | Window height. |
[in] | output | A pointer to an NvMediaImage image. |
NvMediaStatus NvMediaVPIFlush | ( | NvMediaVPI * | vpi | ) |
Flushes all queued operations.
[in] | vpi | A pointer to the Vision Programming Interface returned by NvMediaVPICreate(). |
NvMediaStatus NvMediaVPIGetImagePyramid | ( | NvMediaVPI * | vpi, |
NvMediaImage * | input, | ||
NvMediaImagePyramid * | output | ||
) |
Queues an operation to generate a Gaussian pyramid from an input image.
[in] | vpi | A pointer to the Vision Programming Interface object returned by NvMediaVPICreate(). |
[in] | input | A 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] | output | A pointer to an NvMediaImagePyramid. |
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.
[in] | vpi | A pointer to the Vision Programming Interface object returned by NvMediaVPICreate(). |
[in,out] | descriptor | A pointer returned by NvMediaVPICreateGetKeyPointsFastDescriptor(). |
[in] | input | NvMediaImage image. |
[in] | strengthThresh | Threshold of difference between intensity of the central pixel and pixels on Bresenham's circle of radius 3. |
[in] | nonmaxSupression | Indicates whether to apply non-maximum suppression. |
[in,out] | keypoints | A pointer to an NvMediaArray containing keypoints. array must be of NVMEDIA_VPI_ARRAY_TYPE_KEYPOINT type created by a call to NvMediaVPIArrayCreate(), or must be created by a call to NvMediaArrayCreate() with stride passed as size of NvMediaVPIPoint2DFrac. |
[out] | scores | A pointer to an NvMediaArray containing scores. |
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.
[in] | vpi | A pointer to the Vision Programming Interface object returned by NvMediaVPICreate(). |
[in,out] | descriptor | A pointer returned by NvMediaVPICreateGetKeyPointsHarrisDescriptor(). |
[in] | params | A pointer to NvMediaVPIGetKeyPointsHarrisParams. |
[in] | input | A pointer to an NvMediaImage image. |
[in] | mask | NvMediaImage mask image. Optional. Value may be 0 (suppressed) or 0xFF (not suppressed). |
[in] | trackedKeypoints | A pointer to an NvMediaArray containing keypoints to track. Optional. If NULL, trackedScores must be NULL. The array must be of type NVMEDIA_VPI_ARRAY_TYPE_KEYPOINT, created by a call to NvMediaVPIArrayCreate(), or must be created by a call to NvMediaArrayCreate() with stride passed as size of NvMediaVPIPoint2DFrac. |
[in] | trackedScores | A pointer to an NvMediaArray containing scores of keypoints to track. Optional. If NULL, trackedKeypoints must be NULL. |
[out] | keypoints | A pointer to an NvMediaArray containing keypoints. array must be of NVMEDIA_VPI_ARRAY_TYPE_KEYPOINT type created by a call to NvMediaVPIArrayCreate(), or must be created by a call to NvMediaArrayCreate() with stride passed as size of NvMediaVPIPoint2DFrac. |
[out] | scores | A pointer to an NvMediaArray containing scores. |
NvMediaStatus NvMediaVPIGetNumEngines | ( | uint32_t * | numEngines | ) |
Returns the number of HW engines accessible.
[in] | numEngines | A pointer to the number of engines. |
NvMediaStatus NvMediaVPIGetScratchpadSize | ( | void * | descriptor, |
uint32_t * | scratchpadSizeBytes | ||
) |
Returns the size of scratchpad memory required for operations that support an NvMediaCVScratchpad based scratchpad.
[in] | descriptor | A pointer returned by NvMediaVPICreateXYZDescriptor(). |
[out] | scratchpadSizeBytes | A pointer to the amount of scratchpad memory required for the operation, in bytes. |
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.
[in] | vpi | A pointer to an Vision Programming Interface object returned by NvMediaVPICreate(). |
[in,out] | descriptor | A pointer returned by NvMediaVPICreateGetSparseFlowPyrLKDescriptor(). |
[in] | params | A pointer to an NvMediaVPIGetSparseFlowPyrLKParams. |
[in] | oldImages | A pointer to the input NvMediaImagePyramid of first (old) images. |
[in] | newImages | A pointer to the input NvMediaImagePyramid of destination (new) images. |
[in] | oldPoints | A pointer to an array of keypoints in the oldImages high resolution pyramid. array must be of NVMEDIA_VPI_ARRAY_TYPE_KEYPOINT type created by a call to NvMediaVPIArrayCreate(), or must be created by a call to NvMediaArrayCreate() with stride passed as size of NvMediaVPIPoint2DFrac. |
[in,out] | newPoints | A pointer to an array of keypoints in the newImages high resolution pyramid. It is used for starting a search in newImages. array must be of NVMEDIA_VPI_ARRAY_TYPE_KEYPOINT type created by a call to NvMediaVPIArrayCreate(), or must be created by a call to NvMediaArrayCreate() with stride passed as size of NvMediaVPIPoint2DFrac. |
[out] | newStatus | A pointer to an array for tracking status for each input in oldPoints. |
NvMediaStatus NvMediaVPIGetVersion | ( | NvMediaVersion * | version | ) |
Returns version information for the NvMediaVPI library.
[in] | version | A pointer to a NvMediaVersion structure filled by the NvMediaVPI library. |
NvMediaStatus NvMediaVPIImageRegister | ( | NvMediaVPI * | vpi, |
NvMediaImage * | image | ||
) |
Registers an image for use with an NvMediaVPI function.
[in] | vpi | A pointer to the Vision Programming Interface returned by NvMediaVPICreate(). |
[in] | image | A pointer to image to be registered. |
NvMediaStatus NvMediaVPIImageUnregister | ( | NvMediaVPI * | vpi, |
NvMediaImage * | image | ||
) |
Unregisters an image after use.
[in] | vpi | A pointer to the Vision Programming Interface returned by NvMediaVPICreate(). |
[in] | image | A pointer to the image to be unregistered. |
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.
[in] | vpi | A pointer to an Vision Programming Interface object returned by NvMediaVPICreate(). |
[in,out] | descriptor | A pointer returned by NvMediaVPICreateKLTDescriptor(). |
[in] | params | A pointer to an NvMediaVPIKLTParams object. |
[in] | referenceImage | A pointer to an NvMediaImage reference image. |
[in] | templateImage | A pointer to an NvMediaImage template image. |
[in] | inputBoxList | A pointer to an NvMediaArray input bounding box list. The array must be of type NVMEDIA_VPI_ARRAY_TYPE_BBOX_XFORM, created by a call to NvMediaVPIArrayCreate(), or must be created by a call to NvMediaArrayCreate() with stride passed as size of NvMediaVPIAABB. |
[in] | predictedBoxList | A pointer to an NvMediaArray predicted bounding box list. The array must be of type NVMEDIA_VPI_ARRAY_TYPE_TRANSFORM, created by a call to NvMediaVPIArrayCreate(), or must be created by a call to NvMediaArrayCreate() with stride passed as size of NvMediaVPITranslationWithScale. |
[out] | outputBoxList | A pointer to an NvMediaArray output bounding box list. The array must be of type NVMEDIA_VPI_ARRAY_TYPE_BBOX_XFORM, created by a call to NvMediaVPIArrayCreate(), or must be created by a call to NvMediaArrayCreate() with stride passed as size of NvMediaVPIAABB. |
[out] | estimationList | A pointer to an NvMediaArray output estimated motion. The array must be of type NVMEDIA_VPI_ARRAY_TYPE_TRANSFORM, created by a call to NvMediaVPIArrayCreate(), or must be created by a call to NvMediaArrayCreate() with stride passed as size of NvMediaVPITranslationWithScale. |
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.
[in] | vpi | A pointer to the Vision Programming Interface object returned by NvMediaVPICreate(). |
[in,out] | descriptor | A pointer returned by NvMediaVPICreateKLTDescriptor(). |
[in] | scratchpad | A pointer to an NvMediaCVScratchpad created by NvMediaCVScratchpadCreate(). |
[in] | params | A pointer to an NvMediaVPIKLTParams object. |
[in] | referenceImage | A pointer to an NvMediaImage reference image. |
[in] | templateImage | A pointer to an NvMediaImage template image. |
[in] | inputBoxList | A pointer to an NvMediaArray input bounding box list. The array must be of type NVMEDIA_VPI_ARRAY_TYPE_BBOX_XFORM, created by a call to NvMediaVPIArrayCreate(), or must be created by a call to NvMediaArrayCreate() with stride passed as size of NvMediaVPIAABB. |
[in] | predictedBoxList | A pointer to an NvMediaArray predicted bounding box list. The array must be of type NVMEDIA_VPI_ARRAY_TYPE_TRANSFORM, created by a call to NvMediaVPIArrayCreate(), or must be created by a call to NvMediaArrayCreate() with stride passed as size of NvMediaVPITranslationWithScale. |
[out] | outputBoxList | A pointer to an NvMediaArray output bounding box list. The array must be of type NVMEDIA_VPI_ARRAY_TYPE_BBOX_XFORM, created by a call to NvMediaVPIArrayCreate(), or must be created by a call to NvMediaArrayCreate() with stride passed as size of NvMediaVPIAABB. |
[out] | estimationList | A pointer to an NvMediaArray output estimated motion. The array must be of type NVMEDIA_VPI_ARRAY_TYPE_TRANSFORM, created by a call to NvMediaVPIArrayCreate(), or must be created by a call to NvMediaArrayCreate() with stride passed as size of NvMediaVPITranslationWithScale. |
NvMediaStatus NvMediaVPIProcessStereoPairDesc | ( | NvMediaVPI * | vpi, |
NvMediaVPIProcessStereoDescriptor * | descriptor, | ||
NvMediaImage * | left, | ||
NvMediaImage * | right, | ||
NvMediaImage * | output | ||
) |
Queues an operation to process a stereo image pair.
[in] | vpi | A pointer to the Vision Programming Interface returned by NvMediaVPICreate(). |
[in,out] | descriptor | Pointer returned by NvMediaVPICreateProcessStereoPairDescriptor(). |
[in] | left | A pointer to the left NvMediaImage image. |
[in] | right | A pointer to the right NvMediaImage image. |
[out] | output | A pointer to the output NvMediaImage image. |
NvMediaStatus NvMediaVPIPyramidRegister | ( | NvMediaVPI * | vpi, |
NvMediaImagePyramid * | pyramid | ||
) |
Registers a pyramid for use with an NvMediaVPI function.
[in] | vpi | A pointer to the Vision Programming Interface returned by NvMediaVPICreate(). |
[in] | pyramid | A pointer to the pyramid to be registered. |
NvMediaStatus NvMediaVPIPyramidUnregister | ( | NvMediaVPI * | vpi, |
NvMediaImagePyramid * | pyramid | ||
) |
Unregisters a pyramid after use.
[in] | vpi | A pointer to the Vision Programming Interface returned by NvMediaVPICreate(). |
[in] | pyramid | A pointer to the pyramid to be unregistered. |
NvMediaStatus NvMediaVPIScratchpadRegister | ( | NvMediaVPI * | vpi, |
NvMediaCVScratchpad * | scratchpad | ||
) |
Registers scratchpad memory for use with an NvMediaVPI function.
[in] | vpi | A pointer to the Vision Programming Interface returned by NvMediaVPICreate(). |
[in] | scratchpad | A pointer to the NvMediaCVScratchpad handle to be registered. |
NvMediaStatus NvMediaVPIScratchpadUnregister | ( | NvMediaVPI * | vpi, |
NvMediaCVScratchpad * | scratchpad | ||
) |
Unregisters scratchpad memory after use.
[in] | vpi | A pointer to the Vision Programming Interface returned by NvMediaVPICreate(). |
[in] | scratchpad | A pointer to the NvMediaCVScratchpad handle to be unregistered. |
NvMediaStatus NvMediaVPIStereoPostprocessDesc | ( | NvMediaVPI * | vpi, |
NvMediaVPIStereoPostprocessDescriptor * | descriptor, | ||
NvMediaVPIStereoPostprocessParams * | params, | ||
NvMediaImage * | disparityInput, | ||
NvMediaImage * | confidenceInput, | ||
NvMediaImage * | disparityOutput, | ||
NvMediaImage * | confidenceOutput | ||
) |
Performs stereo postprocessing to refine a disparity image.
[in] | vpi | A pointer to the Vision Programming Interface returned by NvMediaVPICreate(). |
[in,out] | descriptor | A pointer returned by NvMediaVPICreateStereoPostprocessDescriptor(). |
[in] | params | A pointer to an NvMediaVPIStereoPostprocessParams. |
[in] | disparityInput | A pointer to an input disparity image that needs refinement. |
[in] | confidenceInput | A pointer to an input confidence map. |
[out] | disparityOutput | A pointer to the refined and upscaled (for scale>1.0) disparity image. |
[out] | confidenceOutput | A pointer to the refined and upscaled (for scale>1.0) confidence map. |
NvMediaStatus NvMediaVPIStereoPreprocessDesc | ( | NvMediaVPI * | vpi, |
NvMediaVPIStereoPreprocessDescriptor * | descriptor, | ||
NvMediaVPIStereoPreprocessParams * | params, | ||
NvMediaArray * | confidenceTable, | ||
NvMediaImage * | leftImage, | ||
NvMediaImage * | rightImage, | ||
NvMediaImage * | output0, | ||
NvMediaImage * | output1 | ||
) |
Performs stereo preprocessing to produce a disparity image or motion vector hints.
Motion vector hints are generated as a 2-D image.
[in] | vpi | A pointer to the Vision Programming Interface returned by NvMediaVPICreate(). |
[in,out] | descriptor | A pointer returned by NvMediaVPICreateStereoPreprocessDescriptor(). |
[in] | params | A pointer to an NvMediaVPIStereoPreprocessParams. |
[in] | confidenceTable | A 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] | leftImage | A pointer to the input left image. |
[in] | rightImage | A pointer to the input right image. |
[out] | output0 | A pointer to the first output image. It contains hints if NvMediaVPIOFSTOutputType is NVMEDIA_VPI_MV_HINTS. It contains the left disparity if NvMediaVPIOFSTOutputType is NVMEDIA_VPI_STEREO_DISPARITY. |
[out] | output1 | A pointer to the second output image. Contains Confidence image if NvMediaVPIOFSTOutputType is NVMEDIA_VPI_MV_HINTS, or right disparity if NvMediaVPIOFSTOutputType is NVMEDIA_VPI_STEREO_DISPARITY. |
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.
[in] | vpi | A pointer to the Vision Programming Interface returned by NvMediaVPICreate(). |
[in,out] | descriptor | A pointer returned by NvMediaVPICreateStereoPreprocessDescriptor(). |
[in] | params | A pointer to an NvMediaVPIStereoPreprocessParams. |
[in] | confidenceTable | A 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] | leftImage | A pointer to the input left image. |
[in] | rightImage | A pointer to the input right image. |
[out] | leftDisparity | A pointer to the left disparity if NvMediaVPIOFSTOutputType is NVMEDIA_VPI_STEREO_DISPARITY. Must NULL for other output types. |
[out] | rightDisparity | A pointer to the right disparity if NvMediaVPIOFSTOutputType is NVMEDIA_VPI_STEREO_DISPARITY. Must NULL for other output types. |
[out] | confidenceMap | A pointer to an NvMediaImage containing Confidence Map if NvMediaVPIOFSTOutputType is NVMEDIA_VPI_MV_HINTS. Must NULL for other output types. |
[out] | hintsArray | A pointer to an NvMediaArray containing motion vector hints if NvMediaVPIOFSTOutputType is NVMEDIA_VPI_MV_HINTS. Must NULL for other output types. |