DVPP Operator APIs

For details about the header and library files on which DVPP operator APIs depend, see Table 1.

API

Function Usage

acldvppInit

Initializes the DVPP. Call this API before calling operator function APIs. No error is reported when this API is called repeatedly. It is recommended that this API be used together with the acldvppFinalize API to initialize and deinitialize the DVPP.

acldvppFinalize

Deinitializes the DVPP. This API is called after the operator function APIs are called and before the process exits. No error is reported when this API is called repeatedly. It is recommended that the acldvppInit API be used together with this API to initialize and deinitialize the DVPP.

acldvppNormalize

Normalizes images by subtracting the mean value and then dividing the result by the standard deviation. The mean value and standard deviation are specified by users.

acldvppDecodeJpeg

Decodes .jpg, .jpeg, .JPG, or .JPEG images into single-channel (GRAY) or three-channel (RGB) images.

acldvppResize

Resizes images. Bilinear, nearest neighbour, and bicubic interpolation algorithms are supported.

acldvppImgToTensor

Normalizes images by subtracting the mean value and then dividing the result by the standard deviation, where the mean value is fixed at 0 and the standard deviation is fixed at 255. Therefore, this operator is used only to normalize UINT8 images with range [0, 255] to FLOAT images with range [0.0, 1.0].

acldvppAdjustBrightness

Adjusts the image brightness.

acldvppAdjustSaturation

Adjusts the image saturation.

acldvppAdjustHue

Adjusts the image hue.

acldvppAdjustContrast

Adjusts the image contrast.

acldvppHorizontalFlip

Flips an image horizontally.

acldvppVerticalFlip

Flips an image vertically.

acldvppGaussianBlur

Performs Gaussian blur on images.

acldvppWarpAffine

Performs affine transformation on images.

acldvppWarpPerspective

Performs transmission transformation on images.

acldvppCropAndResize

Crops and resizes images.

acldvppPad

Pads images.

acldvppRotate

Rotates an image counterclockwise.

acldvppRgbToGrayscale

Converts an RGB image into a grayscale image.

acldvppCrop

Crops an image.

acldvppInvert

Reverses the image color.

acldvppPosterize

Generates images by reducing the number of bits in each color channel.

acldvppSolarize

Generates RGB/grayscale images by inverting all pixel values within the threshold.

acldvppEqualize

Performs histogram equalization on the input image.

acldvppAdjustSharpness

Adjusts the sharpness of the input image.

acldvppAutoContrast

Remaps the pixels of each channel to maximize the contrast. The darkest pixel in the image is mapped to black, and the brightest pixel is mapped to white. In addition, you can adjust the cutoff and ignore parameters to control the contrast.

acldvppErase

Erases pixels in a specified range in the input image by using a specified value.

acldvppConvertColor

Changes the color space of an image.

acldvppEncodeJpeg

Encodes a single-channel (GRAY) or three-channel (RGB) image into a JPEG image.

acldvppHWC2CHW

Converts the shape of the input image from <H, W, C> to <C, H, W>.

acldvppCHW2HWC

Converts the shape of the input image from <C, H, W> to <H, W, C>.