VPI - Vision Programming Interface

3.1 Release

Crop Scaler

Overview

Crops rectangular regions from the input frames and rescales them all to the same dimensions. Optionally, can also perform color conversion from NV12 to interleaved or planar RGB(A) formats. The inputs are an array of input frames and an array of DCF tracked bounding boxes, specifying the corresponding frame index for each object, the starting coordinates, width and height in pixels, and tracking state (lost object are ignored). The output is a single image where all output patches are stacked vertically.

Implementation

The input is sampled using bilinear interpolation. If the bounding box is partially out of frame, clamping is used (the border pixels are repeated).

C API functions

For list of limitations, constraints and backends that implement the algorithm, consult reference documentation of the following functions:

Function Description
vpiCreateCropScaler Creates payload instance for the Crop Scale algorithm.
vpiSubmitCropScalerBatch Crops rectangular regions from the input frames and rescale them all to the same dimensions.

For more information, see Crop Scaler in the "C API Reference" section of VPI - Vision Programming Interface.