56 #ifndef NV_VPI_TYPES_H
57 #define NV_VPI_TYPES_H
102 #define VPI_BACKEND_TEGRA (VPI_BACKEND_VIC | VPI_BACKEND_NVENC | VPI_BACKEND_OFA)
104 #define VPI_BACKEND_MASK ((VPI_BACKEND_INVALID << 1) - 1)
107 #define VPI_BACKEND_ALL \
108 (VPI_BACKEND_CPU | VPI_BACKEND_CUDA | VPI_BACKEND_PVA | VPI_BACKEND_VIC | VPI_BACKEND_NVENC | VPI_BACKEND_OFA)
136 #define VPI_EXCLUSIVE_STREAM_ACCESS (1ULL << 16)
146 #define VPI_RESTRICT_MEM_USAGE (1ULL << 17)
159 #define VPI_REQUIRE_BACKENDS (1ULL << 18)
320 #if NV_VPI_VERSION_API_AT_MOST(2, 0)
348 #define VPI_BRIEF_DESCRIPTOR_ARRAY_LENGTH 32
353 #define VPI_BRIEF_DESCRIPTOR_BIT_WIDTH (VPI_BRIEF_DESCRIPTOR_ARRAY_LENGTH * 8)
454 float covariance[4][4];
467 #define VPI_MAX_MATCHES_PER_DESCRIPTOR (3)
488 typedef struct VPIRectangleIRec
491 int32_t width, height;
539 #define VPI_TERMINATION_CRITERIA_ITERATIONS (1u << 0)
540 #define VPI_TERMINATION_CRITERIA_EPSILON (1u << 1)
656 #define VPI_STAT_PIXEL_COUNT (1U << 0)
659 #define VPI_STAT_SUM (1U << 1)
662 #define VPI_STAT_MEAN ((1U << 2) | VPI_STAT_SUM | VPI_STAT_PIXEL_COUNT)
665 #define VPI_STAT_VARIANCE ((1U << 3) | VPI_STAT_MEAN)
668 #define VPI_STAT_COVARIANCE ((1U << 4) | VPI_STAT_VARIANCE)
Defines all interpolation types used in VPI.
Defines types and functions to handle pixel types.
Declaration of VPI status codes handling functions.
#define VPI_BRIEF_DESCRIPTOR_ARRAY_LENGTH
Length of Brief Descriptor Array.
VPIGradientMethod
Different method to generate gradients.
@ VPI_GRADIENT_SOBEL
Generate the gradient in x direction and y direction via sobel operator.
@ VPI_GRADIENT_BLUR_PREWITT
Generate the gradient by using prewitt operator on blurred input image.
#define VPI_MAX_MATCHES_PER_DESCRIPTOR
Maximum number of matches per descriptor.
VPINormType
Defines the magnitude of vectors.
@ VPI_NORM_HAMMING
Hamming norm.
VPICornerScore
Defines different types of corner scores.
@ VPI_CORNER_SCORE_FAST
Use FAST corner scores.
@ VPI_CORNER_SCORE_HARRIS
Use Harris response corner scores.
VPIFlipMode
Defines image flip directions.
@ VPI_FLIP_HORIZ
Flip horizontally.
@ VPI_FLIP_VERT
Flip vertically.
@ VPI_FLIP_BOTH
Flip horizontally and vertically.
Stores a BRIEF Descriptor.
Functions and structures for handling VPI library version.
struct VPIArrayImpl * VPIArray
A handle to an array.
int maxThreads
The maximum number of threads used by the parallel_for implementation code.
void * userData
A user defined opaque pointer passed to callback function unaltered.
VPIParallelForCallback callback
A pointer to the parallel_for implementation.
void(* VPIParallelTask)(int taskId, int threadId, void *vpiData)
Parallel task function pointer type.
void * VPINativeThreadHandle
A handle to OS-specific thread handle.
struct VPIContextImpl * VPIContext
A handle to a context.
void(* VPIParallelForCallback)(VPIParallelTask task, int taskCount, void *vpiData, void *userData)
Parallel for callback function pointer type.
Stores the ParallelFor configuration.
struct VPIEventImpl * VPIEvent
A handle to an event.
struct VPIImageImpl * VPIImage
A handle to an image.
int8_t templateStatus
Status of the template related to this bounding box.
int8_t trackingStatus
Tracking status of this bounding box.
VPIBoundingBox bbox
Bounding box being tracked.
uint8_t reserved1
Reserved for future use.
Stores a bounding box that is being tracked by KLT Tracker.
float VPICameraExtrinsic[3][4]
Camera extrinsic matrix.
float VPICameraIntrinsic[2][3]
Camera intrinsic matrix.
struct VPIPayloadImpl * VPIPayload
A handle to an algorithm payload.
float VPIPerspectiveTransform[3][3]
Represents a 2D perspective transform.
struct VPIPyramidImpl * VPIPyramid
A handle to an image pyramid.
struct VPIStreamImpl * VPIStream
A handle to a stream.
VPIBackend
VPI Backend types.
@ VPI_BACKEND_CUDA
CUDA backend.
@ VPI_BACKEND_PVA
PVA backend.
@ VPI_BACKEND_NVENC
NVENC backend.
@ VPI_BACKEND_OFA
OFA backend.
@ VPI_BACKEND_VIC
VIC backend.
@ VPI_BACKEND_INVALID
Invalid backend.
@ VPI_BACKEND_CPU
CPU backend.
int32_t pixelCount
Total pixel count.
float width
Bounding box width.
uint32_t y
Keypoint's y coordinate.
float height
Bounding box height.
VPIHomographyTransform2D xform
Defines the bounding box top left corner and its homography.
float x
Keypoint's x coordinate.
float y
Keypoint's y coordinate.
uint32_t x
Keypoint's x coordinate.
VPIBorderExtension
Image border extension specify how pixel values outside of the image domain should be constructed.
VPIEventState
Defines the states of the event.
VPIOpticalFlowQuality
Defines the quality of the optical flow algorithm.
VPILockMode
Defines the lock modes used by memory lock functions.
@ VPI_BORDER_INVALID
Invalid border.
@ VPI_BORDER_ZERO
All pixels outside the image are considered to be zero.
@ VPI_BORDER_LIMITED
Consider image as limited to not access outside pixels.
@ VPI_BORDER_CLAMP
Border pixels are repeated indefinitely.
@ VPI_BORDER_MIRROR
dedcb|abcde|dcbab
@ VPI_BORDER_REFLECT
edcba|abcde|edcba
@ VPI_EVENT_STATE_NOT_SIGNALED
Event is not signaled yet.
@ VPI_EVENT_STATE_SIGNALED
Event has been signaled.
@ VPI_OPTICAL_FLOW_QUALITY_LOW
Fast but low quality optical flow implementation.
@ VPI_OPTICAL_FLOW_QUALITY_HIGH
Slow but high quality optical flow implementation.
@ VPI_OPTICAL_FLOW_QUALITY_MEDIUM
Speed and quality in between of VPI_OPTICAL_FLOW_QUALITY_LOW and VPI_OPTICAL_FLOW_QUALITY_HIGH.
@ VPI_LOCK_WRITE
Lock memory only for writing.
@ VPI_LOCK_READ_WRITE
Lock memory for reading and writing.
@ VPI_LOCK_READ
Lock memory only for reading.
Stores a generic 2D bounding box.
Stores a float32 keypoint coordinate The coordinate is relative to the top-left corner of an image.
Stores a U32 keypoint coordinate The coordinate is relative to the top-left corner of an image.
Stores the matches between 2 descriptors.
Stores the geometric information of a rectangle.
Stores the statistics of an image.