Types
- group Types
Typedefs
-
typedef unsigned char uint8_t
-
typedef int int32_t
-
typedef struct NVCVBndBoxesIRec *NVCVBndBoxesI
-
typedef struct NVCVBlurBoxesIRec *NVCVBlurBoxesI
-
typedef struct NVCVElementsRec *NVCVElements
Enums
-
enum NVCVInterpolationType
Values:
-
enumerator NVCV_INTERP_NEAREST
-
enumerator NVCV_INTERP_LINEAR
-
enumerator NVCV_INTERP_CUBIC
-
enumerator NVCV_INTERP_AREA
-
enumerator NVCV_INTERP_LANCZOS
-
enumerator NVCV_INTERP_GAUSSIAN
-
enumerator NVCV_INTERP_NEAREST_FLOOR
-
enumerator NVCV_INTERP_MAX
-
enumerator NVCV_WARP_INVERSE_MAP
-
enumerator NVCV_INTERP_HAMMING
-
enumerator NVCV_INTERP_BOX
-
enumerator NVCV_INTERP_NEAREST
-
enum NVCVMorphologyType
Values:
-
enumerator NVCV_ERODE
-
enumerator NVCV_DILATE
-
enumerator NVCV_OPEN
-
enumerator NVCV_CLOSE
-
enumerator NVCV_ERODE
-
enum NVCVChannelManip
Values:
-
enumerator NVCV_CHANNEL_NO_OP
do not manipulate channel data
-
enumerator NVCV_CHANNEL_REVERSE
reverse channel order (e.g., RGB to BGR, BGR to RGB, RGBA to ABGR, etc.)
-
enumerator NVCV_CHANNEL_NO_OP
-
enum NVCVColorConversionCode
Values:
-
enumerator NVCV_COLOR_BGR2BGRA
add alpha channel to RGB or BGR image
-
enumerator NVCV_COLOR_RGB2RGBA
-
enumerator NVCV_COLOR_BGRA2BGR
remove alpha channel from RGB or BGR image
-
enumerator NVCV_COLOR_RGBA2RGB
-
enumerator NVCV_COLOR_BGR2RGBA
convert between RGB and BGR color spaces (with or without alpha channel)
-
enumerator NVCV_COLOR_RGB2BGRA
-
enumerator NVCV_COLOR_RGBA2BGR
-
enumerator NVCV_COLOR_BGRA2RGB
-
enumerator NVCV_COLOR_BGR2RGB
-
enumerator NVCV_COLOR_RGB2BGR
-
enumerator NVCV_COLOR_BGRA2RGBA
-
enumerator NVCV_COLOR_RGBA2BGRA
-
enumerator NVCV_COLOR_BGR2GRAY
convert between RGB/BGR and grayscale, color conversions
-
enumerator NVCV_COLOR_RGB2GRAY
-
enumerator NVCV_COLOR_GRAY2BGR
-
enumerator NVCV_COLOR_GRAY2RGB
-
enumerator NVCV_COLOR_GRAY2BGRA
-
enumerator NVCV_COLOR_GRAY2RGBA
-
enumerator NVCV_COLOR_BGRA2GRAY
-
enumerator NVCV_COLOR_RGBA2GRAY
-
enumerator NVCV_COLOR_BGR2BGR565
convert between RGB/BGR and BGR565 (16-bit images)
-
enumerator NVCV_COLOR_RGB2BGR565
-
enumerator NVCV_COLOR_BGR5652BGR
-
enumerator NVCV_COLOR_BGR5652RGB
-
enumerator NVCV_COLOR_BGRA2BGR565
-
enumerator NVCV_COLOR_RGBA2BGR565
-
enumerator NVCV_COLOR_BGR5652BGRA
-
enumerator NVCV_COLOR_BGR5652RGBA
-
enumerator NVCV_COLOR_GRAY2BGR565
convert between grayscale to BGR565 (16-bit images)
-
enumerator NVCV_COLOR_BGR5652GRAY
-
enumerator NVCV_COLOR_BGR2BGR555
convert between RGB/BGR and BGR555 (16-bit images)
-
enumerator NVCV_COLOR_RGB2BGR555
-
enumerator NVCV_COLOR_BGR5552BGR
-
enumerator NVCV_COLOR_BGR5552RGB
-
enumerator NVCV_COLOR_BGRA2BGR555
-
enumerator NVCV_COLOR_RGBA2BGR555
-
enumerator NVCV_COLOR_BGR5552BGRA
-
enumerator NVCV_COLOR_BGR5552RGBA
-
enumerator NVCV_COLOR_GRAY2BGR555
convert between grayscale and BGR555 (16-bit images)
-
enumerator NVCV_COLOR_BGR5552GRAY
-
enumerator NVCV_COLOR_BGR2XYZ
convert RGB/BGR to CIE XYZ, color conversions
-
enumerator NVCV_COLOR_RGB2XYZ
-
enumerator NVCV_COLOR_XYZ2BGR
-
enumerator NVCV_COLOR_XYZ2RGB
-
enumerator NVCV_COLOR_BGR2YCrCb
convert RGB/BGR to luma-chroma (aka YCC), color conversions
-
enumerator NVCV_COLOR_RGB2YCrCb
-
enumerator NVCV_COLOR_YCrCb2BGR
-
enumerator NVCV_COLOR_YCrCb2RGB
-
enumerator NVCV_COLOR_BGR2HSV
convert RGB/BGR to HSV (hue saturation value), color conversions
-
enumerator NVCV_COLOR_RGB2HSV
-
enumerator NVCV_COLOR_BGR2Lab
convert sRGB BGR to CIE L*a*b*; supported by CvtColor for U8, F16, and F32
-
enumerator NVCV_COLOR_RGB2Lab
convert sRGB to CIE L*a*b*; supported by CvtColor for U8, F16, and F32
-
enumerator NVCV_COLOR_BGR2Luv
convert RGB/BGR to CIE Luv, color conversions
-
enumerator NVCV_COLOR_RGB2Luv
-
enumerator NVCV_COLOR_BGR2HLS
convert RGB/BGR to HLS (hue lightness saturation), color conversions
-
enumerator NVCV_COLOR_RGB2HLS
-
enumerator NVCV_COLOR_HSV2BGR
backward conversions to RGB/BGR
-
enumerator NVCV_COLOR_HSV2RGB
-
enumerator NVCV_COLOR_Lab2BGR
convert CIE L*a*b* to sRGB BGR; supported by CvtColor for U8, F16, and F32
-
enumerator NVCV_COLOR_Lab2RGB
convert CIE L*a*b* to sRGB; supported by CvtColor for U8, F16, and F32
-
enumerator NVCV_COLOR_Luv2BGR
-
enumerator NVCV_COLOR_Luv2RGB
-
enumerator NVCV_COLOR_HLS2BGR
-
enumerator NVCV_COLOR_HLS2RGB
-
enumerator NVCV_COLOR_BGR2HSV_FULL
-
enumerator NVCV_COLOR_RGB2HSV_FULL
-
enumerator NVCV_COLOR_BGR2HLS_FULL
-
enumerator NVCV_COLOR_RGB2HLS_FULL
-
enumerator NVCV_COLOR_HSV2BGR_FULL
-
enumerator NVCV_COLOR_HSV2RGB_FULL
-
enumerator NVCV_COLOR_HLS2BGR_FULL
-
enumerator NVCV_COLOR_HLS2RGB_FULL
-
enumerator NVCV_COLOR_LBGR2Lab
convert linear BGR to CIE L*a*b*; supported by CvtColor for U8, F16, and F32
-
enumerator NVCV_COLOR_LRGB2Lab
convert linear RGB to CIE L*a*b*; supported by CvtColor for U8, F16, and F32
-
enumerator NVCV_COLOR_LBGR2Luv
-
enumerator NVCV_COLOR_LRGB2Luv
-
enumerator NVCV_COLOR_Lab2LBGR
convert CIE L*a*b* to linear BGR; supported by CvtColor for U8, F16, and F32
-
enumerator NVCV_COLOR_Lab2LRGB
convert CIE L*a*b* to linear RGB; supported by CvtColor for U8, F16, and F32
-
enumerator NVCV_COLOR_Luv2LBGR
-
enumerator NVCV_COLOR_Luv2LRGB
-
enumerator NVCV_COLOR_BGR2YUV
convert between RGB/BGR and YUV
-
enumerator NVCV_COLOR_RGB2YUV
-
enumerator NVCV_COLOR_YUV2BGR
-
enumerator NVCV_COLOR_YUV2RGB
-
enumerator NVCV_COLOR_YUV2RGB_NV12
YUV 4:2:0 family to RGB.
-
enumerator NVCV_COLOR_YUV2BGR_NV12
-
enumerator NVCV_COLOR_YUV2RGB_NV21
-
enumerator NVCV_COLOR_YUV2BGR_NV21
-
enumerator NVCV_COLOR_YUV420sp2RGB
-
enumerator NVCV_COLOR_YUV420sp2BGR
-
enumerator NVCV_COLOR_YUV2RGBA_NV12
-
enumerator NVCV_COLOR_YUV2BGRA_NV12
-
enumerator NVCV_COLOR_YUV2RGBA_NV21
-
enumerator NVCV_COLOR_YUV2BGRA_NV21
-
enumerator NVCV_COLOR_YUV420sp2RGBA
-
enumerator NVCV_COLOR_YUV420sp2BGRA
-
enumerator NVCV_COLOR_YUV2RGB_YV12
-
enumerator NVCV_COLOR_YUV2BGR_YV12
-
enumerator NVCV_COLOR_YUV2RGB_IYUV
-
enumerator NVCV_COLOR_YUV2BGR_IYUV
-
enumerator NVCV_COLOR_YUV2RGB_I420
-
enumerator NVCV_COLOR_YUV2BGR_I420
-
enumerator NVCV_COLOR_YUV420p2RGB
-
enumerator NVCV_COLOR_YUV420p2BGR
-
enumerator NVCV_COLOR_YUV2RGBA_YV12
-
enumerator NVCV_COLOR_YUV2BGRA_YV12
-
enumerator NVCV_COLOR_YUV2RGBA_IYUV
-
enumerator NVCV_COLOR_YUV2BGRA_IYUV
-
enumerator NVCV_COLOR_YUV2RGBA_I420
-
enumerator NVCV_COLOR_YUV2BGRA_I420
-
enumerator NVCV_COLOR_YUV420p2RGBA
-
enumerator NVCV_COLOR_YUV420p2BGRA
-
enumerator NVCV_COLOR_YUV2GRAY_420
-
enumerator NVCV_COLOR_YUV2GRAY_NV21
-
enumerator NVCV_COLOR_YUV2GRAY_NV12
-
enumerator NVCV_COLOR_YUV2GRAY_YV12
-
enumerator NVCV_COLOR_YUV2GRAY_IYUV
-
enumerator NVCV_COLOR_YUV2GRAY_I420
-
enumerator NVCV_COLOR_YUV420sp2GRAY
-
enumerator NVCV_COLOR_YUV420p2GRAY
-
enumerator NVCV_COLOR_YUV2RGB_UYVY
YUV 4:2:2 family to RGB.
-
enumerator NVCV_COLOR_YUV2BGR_UYVY
-
enumerator NVCV_COLOR_YUV2RGB_Y422
-
enumerator NVCV_COLOR_YUV2BGR_Y422
-
enumerator NVCV_COLOR_YUV2RGB_UYNV
-
enumerator NVCV_COLOR_YUV2BGR_UYNV
-
enumerator NVCV_COLOR_YUV2RGBA_UYVY
-
enumerator NVCV_COLOR_YUV2BGRA_UYVY
-
enumerator NVCV_COLOR_YUV2RGBA_Y422
-
enumerator NVCV_COLOR_YUV2BGRA_Y422
-
enumerator NVCV_COLOR_YUV2RGBA_UYNV
-
enumerator NVCV_COLOR_YUV2BGRA_UYNV
-
enumerator NVCV_COLOR_YUV2RGB_YUY2
-
enumerator NVCV_COLOR_YUV2BGR_YUY2
-
enumerator NVCV_COLOR_YUV2RGB_YVYU
-
enumerator NVCV_COLOR_YUV2BGR_YVYU
-
enumerator NVCV_COLOR_YUV2RGB_YUYV
-
enumerator NVCV_COLOR_YUV2BGR_YUYV
-
enumerator NVCV_COLOR_YUV2RGB_YUNV
-
enumerator NVCV_COLOR_YUV2BGR_YUNV
-
enumerator NVCV_COLOR_YUV2RGBA_YUY2
-
enumerator NVCV_COLOR_YUV2BGRA_YUY2
-
enumerator NVCV_COLOR_YUV2RGBA_YVYU
-
enumerator NVCV_COLOR_YUV2BGRA_YVYU
-
enumerator NVCV_COLOR_YUV2RGBA_YUYV
-
enumerator NVCV_COLOR_YUV2BGRA_YUYV
-
enumerator NVCV_COLOR_YUV2RGBA_YUNV
-
enumerator NVCV_COLOR_YUV2BGRA_YUNV
-
enumerator NVCV_COLOR_YUV2GRAY_UYVY
-
enumerator NVCV_COLOR_YUV2GRAY_YUY2
-
enumerator NVCV_COLOR_YUV2GRAY_Y422
-
enumerator NVCV_COLOR_YUV2GRAY_UYNV
-
enumerator NVCV_COLOR_YUV2GRAY_YVYU
-
enumerator NVCV_COLOR_YUV2GRAY_YUYV
-
enumerator NVCV_COLOR_YUV2GRAY_YUNV
-
enumerator NVCV_COLOR_RGBA2mRGBA
alpha premultiplication
-
enumerator NVCV_COLOR_mRGBA2RGBA
-
enumerator NVCV_COLOR_RGB2YUV_I420
RGB to YUV 4:2:0 family.
-
enumerator NVCV_COLOR_BGR2YUV_I420
-
enumerator NVCV_COLOR_RGB2YUV_IYUV
-
enumerator NVCV_COLOR_BGR2YUV_IYUV
-
enumerator NVCV_COLOR_RGBA2YUV_I420
-
enumerator NVCV_COLOR_BGRA2YUV_I420
-
enumerator NVCV_COLOR_RGBA2YUV_IYUV
-
enumerator NVCV_COLOR_BGRA2YUV_IYUV
-
enumerator NVCV_COLOR_RGB2YUV_YV12
-
enumerator NVCV_COLOR_BGR2YUV_YV12
-
enumerator NVCV_COLOR_RGBA2YUV_YV12
-
enumerator NVCV_COLOR_BGRA2YUV_YV12
-
enumerator NVCV_COLOR_BayerBG2BGR
Demosaicing.
-
enumerator NVCV_COLOR_BayerGB2BGR
-
enumerator NVCV_COLOR_BayerRG2BGR
-
enumerator NVCV_COLOR_BayerGR2BGR
-
enumerator NVCV_COLOR_BayerBG2RGB
-
enumerator NVCV_COLOR_BayerGB2RGB
-
enumerator NVCV_COLOR_BayerRG2RGB
-
enumerator NVCV_COLOR_BayerGR2RGB
-
enumerator NVCV_COLOR_BayerBG2GRAY
-
enumerator NVCV_COLOR_BayerGB2GRAY
-
enumerator NVCV_COLOR_BayerRG2GRAY
-
enumerator NVCV_COLOR_BayerGR2GRAY
-
enumerator NVCV_COLOR_BayerBG2BGR_VNG
Demosaicing using Variable Number of Gradients.
-
enumerator NVCV_COLOR_BayerGB2BGR_VNG
-
enumerator NVCV_COLOR_BayerRG2BGR_VNG
-
enumerator NVCV_COLOR_BayerGR2BGR_VNG
-
enumerator NVCV_COLOR_BayerBG2RGB_VNG
-
enumerator NVCV_COLOR_BayerGB2RGB_VNG
-
enumerator NVCV_COLOR_BayerRG2RGB_VNG
-
enumerator NVCV_COLOR_BayerGR2RGB_VNG
-
enumerator NVCV_COLOR_BayerBG2BGR_EA
Edge-Aware Demosaicing.
-
enumerator NVCV_COLOR_BayerGB2BGR_EA
-
enumerator NVCV_COLOR_BayerRG2BGR_EA
-
enumerator NVCV_COLOR_BayerGR2BGR_EA
-
enumerator NVCV_COLOR_BayerBG2RGB_EA
-
enumerator NVCV_COLOR_BayerGB2RGB_EA
-
enumerator NVCV_COLOR_BayerRG2RGB_EA
-
enumerator NVCV_COLOR_BayerGR2RGB_EA
-
enumerator NVCV_COLOR_COLORCVT_MAX
-
enumerator NVCV_COLOR_RGB2YUV_NV12
-
enumerator NVCV_COLOR_BGR2YUV_NV12
-
enumerator NVCV_COLOR_RGB2YUV_NV21
-
enumerator NVCV_COLOR_RGB2YUV420sp
-
enumerator NVCV_COLOR_BGR2YUV_NV21
-
enumerator NVCV_COLOR_BGR2YUV420sp
-
enumerator NVCV_COLOR_RGBA2YUV_NV12
-
enumerator NVCV_COLOR_BGRA2YUV_NV12
-
enumerator NVCV_COLOR_RGBA2YUV_NV21
-
enumerator NVCV_COLOR_RGBA2YUV420sp
-
enumerator NVCV_COLOR_BGRA2YUV_NV21
-
enumerator NVCV_COLOR_BGRA2YUV420sp
-
enumerator NVCV_COLOR_RGB2GRAY_TV
Grayscale bit-exact with torchvision.transforms.v2.functional.rgb_to_grayscale.
Computes BT.601 luma with torchvision’s rounded weights:
Y = 0.2989 * R + 0.587 * G + 0.114 * B
These are the BT.601 luma weights as rounded by MATLAB rgb2gray / TensorFlow tf.image.rgb_to_grayscale, which torchvision follows. NVCV_COLOR_RGB2GRAY instead follows OpenCV: weights 0.299 / 0.587 / 0.114, with integer inputs computed in 15-bit fixed point and rounded to nearest. Consequences of following torchvision:
The weights sum to 0.9999, so a white pixel does not map to white: U8 255 -> 254, U16 65535 -> 65528, F32 1.0 -> 0.9999 and F16 1.0 -> 0.99951171875.
Evaluation order is fixed to match torchvision on CUDA: R * 0.2989 is computed first, then G * 0.587 and B * 0.114 are each added with a fused multiply-add. U8, U16 and F32 inputs evaluate in float32. F16 inputs round to half after each of the three operations, as torchvision’s half-precision kernels do.
Integer outputs truncate toward zero (torchvision casts with .to(dtype)); they do not round to nearest. Float outputs are not clamped.
Supports U8, U16, F16 and F32 tensors (HWC/NHWC, CHW/NCHW) and variable-shape image batches (interleaved or planar). The output has one channel.
-
enumerator NVCV_COLOR_BGR2GRAY_TV
NVCV_COLOR_RGB2GRAY_TV for BGR channel order; identical weights and arithmetic.
-
enumerator NVCV_COLOR_RGBA2GRAY_TV
NVCV_COLOR_RGB2GRAY_TV for RGBA input; alpha is ignored. CV-CUDA extension: torchvision’s rgb_to_grayscale accepts only three-channel input.
-
enumerator NVCV_COLOR_BGRA2GRAY_TV
NVCV_COLOR_RGB2GRAY_TV for BGRA input; alpha is ignored. CV-CUDA extension: torchvision’s rgb_to_grayscale accepts only three-channel input.
-
enumerator NVCV_COLORCVT_MAX
-
enumerator NVCV_COLOR_BGR2BGRA
-
enum NVCVThresholdType
Values:
-
enumerator NVCV_THRESH_BINARY
-
enumerator NVCV_THRESH_BINARY_INV
-
enumerator NVCV_THRESH_TRUNC
-
enumerator NVCV_THRESH_TOZERO
-
enumerator NVCV_THRESH_TOZERO_INV
-
enumerator NVCV_THRESH_MASK
-
enumerator NVCV_THRESH_OTSU
-
enumerator NVCV_THRESH_TRIANGLE
-
enumerator NVCV_THRESH_BINARY
-
enum NVCVAdaptiveThresholdType
Values:
-
enumerator NVCV_ADAPTIVE_THRESH_MEAN_C
-
enumerator NVCV_ADAPTIVE_THRESH_GAUSSIAN_C
-
enumerator NVCV_ADAPTIVE_THRESH_MEAN_C
-
enum NVCVHistogramEqMethod
Values:
-
enumerator NVCV_HISTOGRAM_EQ_OPENCV
OpenCV’s
equalizeHist: the cumulative histogram, shifted so its first non-empty bin maps to zero, normalized by the pixel count and scaled to the output range.
-
enumerator NVCV_HISTOGRAM_EQ_PILLOW
Pillow’s
ImageOps.equalize, which torchvision follows. Withstepthe count of pixels outside the histogram’s tallest bin divided by 255, the table islut[0] = 0andlut[k] = clamp((cumulative[k - 1] + step / 2) / step, 0, 255), all in integer arithmetic. A channel whosestepis zero is passed through unchanged.
-
enumerator NVCV_HISTOGRAM_EQ_INVALID
Reserved invalid value for validating method arguments (not a lookup-table method).
-
enumerator NVCV_HISTOGRAM_EQ_OPENCV
-
enum NVCVRemapMapValueType
Values:
-
enumerator NVCV_REMAP_ABSOLUTE
-
enumerator NVCV_REMAP_ABSOLUTE_NORMALIZED
-
enumerator NVCV_REMAP_RELATIVE_NORMALIZED
-
enumerator NVCV_REMAP_ABSOLUTE
-
enum NVCVOSDType
Values:
-
enumerator NVCV_OSD_NONE
-
enumerator NVCV_OSD_RECT
-
enumerator NVCV_OSD_TEXT
-
enumerator NVCV_OSD_SEGMENT
-
enumerator NVCV_OSD_POINT
-
enumerator NVCV_OSD_LINE
-
enumerator NVCV_OSD_POLYLINE
-
enumerator NVCV_OSD_ROTATED_RECT
-
enumerator NVCV_OSD_CIRCLE
-
enumerator NVCV_OSD_ARROW
-
enumerator NVCV_OSD_CLOCK
-
enumerator NVCV_OSD_MAX
-
enumerator NVCV_OSD_NONE
-
enum NVCVSIFTFlagType
Values:
-
enumerator NVCV_SIFT_USE_ORIGINAL_INPUT
-
enumerator NVCV_SIFT_USE_EXPANDED_INPUT
-
enumerator NVCV_SIFT_USE_ORIGINAL_INPUT
-
enum NVCVConnectivityType
Values:
-
enumerator NVCV_CONNECTIVITY_4_2D
Immediate (cross) neighborhood of pixels.
-
enumerator NVCV_CONNECTIVITY_6_3D
Immediate (cross) neighborhood of voxels.
-
enumerator NVCV_CONNECTIVITY_8_2D
All direct (full) neighborhood of pixels.
-
enumerator NVCV_CONNECTIVITY_26_3D
All direct (full) neighborhood of voxels.
-
enumerator NVCV_CONNECTIVITY_4_2D
-
enum NVCVLabelType
Values:
-
enumerator NVCV_LABEL_FAST
Does not guarantee consecutive label numbers.
-
enumerator NVCV_LABEL_SEQUENTIAL
Assigns consecutive numbers to labels.
-
enumerator NVCV_LABEL_FAST
-
enum NVCVLabelMaskType
Values:
-
enumerator NVCV_REMOVE_ISLANDS_OUTSIDE_MASK_ONLY
Prevent removing islands inside the mask.
-
enumerator NVCV_REMOVE_ISLANDS_OUTSIDE_MASK_ONLY
-
enum NVCVPairwiseMatcherType
Values:
-
enumerator NVCV_BRUTE_FORCE
Select brute-force algorithm as the matcher.
-
enumerator NVCV_BRUTE_FORCE
-
enum NVCVNormType
Values:
-
enumerator NVCV_NORM_HAMMING
Equivalent to the Hamming distance (or L_0 norm)
-
enumerator NVCV_NORM_L1
Equivalent to the absolute distance = |x1-x2| + |y1-y2| (or L_1 norm)
-
enumerator NVCV_NORM_L2
Equivalent to the Euclidean distance (or L_2 norm)
-
enumerator NVCV_NORM_C
distance = max(|x1-x2|,|y1-y2|)
-
enumerator NVCV_NORM_L12
L1-L2 metric: distance = 2(sqrt(1+x*x/2) - 1))
-
enumerator NVCV_NORM_FAIR
distance = c^2(|x|/c-log(1+|x|/c)), c = 1.3998
-
enumerator NVCV_NORM_WELSCH
distance = c^2/2(1-exp(-(x/c)^2)), c = 2.9846
-
enumerator NVCV_NORM_HUBER
distance = |x|<c ? x^2/2 : c(|x|-c/2), c=1.345
-
enumerator NVCV_NORM_HAMMING
Functions
-
NVCVStatus nvcvBndBoxesIConstruct(NVCVBndBoxesI *handle, const NVCVBndBoxI *boxes, const int32_t *numBoxesPerBatch, int32_t batchSize)
Construct an NVCVBndBoxesI from a flat array of bounding boxes.
The handle owns its copy of the data; the input arrays may be freed after the call returns. Free the handle with nvcvBndBoxesIDestroy.
- Parameters:
handle – [out] Where the new handle is written. Must not be NULL.
boxes – [in] Flat array of bounding boxes, length == sum(numBoxesPerBatch[]).
numBoxesPerBatch – [in] Per-batch box counts, length == batchSize.
batchSize – [in] Number of batches. Must be >= 0.
- Return values:
NVCV_ERROR_INVALID_ARGUMENT – One of the pointers is NULL or batchSize < 0.
NVCV_ERROR_OUT_OF_MEMORY – Allocation failed.
NVCV_SUCCESS – Operation executed successfully.
-
NVCVStatus nvcvBndBoxesIDestroy(NVCVBndBoxesI handle)
Destroy a handle previously returned by nvcvBndBoxesIConstruct. Passing NULL is a no-op.
-
NVCVStatus nvcvBlurBoxesIConstruct(NVCVBlurBoxesI *handle, const NVCVBlurBoxI *boxes, const int32_t *numBoxesPerBatch, int32_t batchSize)
Construct an NVCVBlurBoxesI from a flat array of blur boxes. See nvcvBndBoxesIConstruct.
-
NVCVStatus nvcvBlurBoxesIDestroy(NVCVBlurBoxesI handle)
Destroy a handle previously returned by nvcvBlurBoxesIConstruct. Passing NULL is a no-op.
-
NVCVStatus nvcvElementsConstruct(NVCVElements *handle, const NVCVOSDType *types, const void *const *payloads, const int32_t *numElementsPerBatch, int32_t batchSize)
Construct an NVCVElements from parallel flat arrays of OSD types and payload pointers.
Element i in the flat arrays is described by types[i] and payloads[i]. Elements are grouped into batches according to numElementsPerBatch (length batchSize). The handle owns its copy of the payloads; input arrays may be freed after the call. Free the handle with nvcvElementsDestroy.
Only POD OSD element types are supported here: NVCV_OSD_RECT, NVCV_OSD_POINT, NVCV_OSD_LINE, NVCV_OSD_ROTATED_RECT, NVCV_OSD_CIRCLE, NVCV_OSD_ARROW.
- Parameters:
handle – [out] Where the new handle is written. Must not be NULL.
types – [in] Flat array of OSD types, length == sum(numElementsPerBatch[]).
payloads – [in] Flat array of payload pointers, parallel to types[].
numElementsPerBatch – [in] Per-batch element counts, length == batchSize.
batchSize – [in] Number of batches. Must be >= 0.
-
NVCVStatus nvcvElementsDestroy(NVCVElements handle)
Destroy a handle previously returned by nvcvElementsConstruct. Passing NULL is a no-op.
-
struct NVCVColorRGBA
- #include <Types.h>
-
struct NVCVPointI
- #include <Types.h>
-
struct NVCVBoxI
- #include <Types.h>
-
struct NVCVBndBoxI
- #include <Types.h>
-
struct NVCVBlurBoxI
- #include <Types.h>
-
struct NVCVPoint
- #include <Types.h>
-
struct NVCVLine
- #include <Types.h>
-
struct NVCVRotatedBox
- #include <Types.h>
-
struct NVCVCircle
- #include <Types.h>
-
struct NVCVArrow
- #include <Types.h>
-
typedef unsigned char uint8_t