Functions

The Atlas 200/300/500 Inference Product does not support the VPC function described in this section.

The Atlas Training Series Product does not support the VPC function described in this section.

Function Description

The following table describes the functions of the vision preprocessing core (VPC) and the function support of each version.

Function

Description

Cropping

Crops one or more selected regions of interest (ROIs) from an input image.

Resizing

  • Supports 8K resizing and non-8K resizing for images with different resolutions.
  • Resizes an ROI (supporting uncompressed format) or multiple ROIs from a single image (supporting uncompressed format).
  • Supports other resizing modes, such as resizing an image without cropping it and resizing an image with the aspect ratio preserved.

Pasting

Crops a selected ROI from the input image, resizes the cropped image, and loads it to the output buffer. The output buffer may be a blank image (when the allocated output buffer is empty) or an existing canvas (when an image has been read into the allocated output buffer). Note that the pasting concept here refers only to the case when the output buffer is an existing canvas.

Stitching

Crops selected ROIs from the input image, resizes the cropped images, and loads them to specified areas in the output buffer.

Image pyramid

Successively downsamples an image using a Gaussian filter.

Histogram analysis

Collects statistics on the pixel value distribution of each image channel (RGB/YUV).

Color remapping

Remaps an image to a new one based on the given configuration.

Border making

Creates a border around an image (also referred to as padding).

Format conversion

Converts between RGB and YUV.

Image grayscale

Converts a color image into a grayscale image. Note that a grayscale input image produces only a grayscale output image.

A YUV400 image is output.

Surround-view stitching

Produces panoramas in automotive scenarios..

To use this function, four images are input, covering the front, left, back, and right directions. These images are merged into one panoramic image after distortion correction, gain compensation, and image fusion. Gain compensation is an optional step. You can determine whether to perform gain compensation when calling parameter setting APIs. Gain compensation can balance illumination of different cameras to achieve a better effect. In terms of image fusion, the weighted fusion mode is now used, that is, the pixel weighted averaging method.

Remapping

Performs geometric deformation on the input image based on the pixel position lookup table (LUT). Typical functions include lens distortion correction, affine transformation, and perspective transformation.

The deformation can be described using the following formula: dst(x,y) = src(LUT(x,y)).

dst(x,y) is the pixel value of coordinates (x,y) in the output image, and its corresponding horizontal and vertical coordinate values of the input image are represented by pixel position LUT(x,y). And src(LUT(x,y)) is the pixel value of coordinates LUT(x,y) in the input image. The general pixel position LUT can be generated by using map1 (horizontal coordinate mapping matrix) and map2 (vertical coordinate mapping matrix) provided by the user. The pixel position LUT of affine transformation or perspective transformation can also be generated through calculation by using the three or four point pairs provided by the user.

Filtering

Performs filtering on the input image. Currently, median filtering, erosion, dilation, Gaussian filtering, mean filtering, and convolution filtering are supported.

Rotation

Rotates the input image by 90, 180, or 270 degrees.

Mosaic

Performs mosaic processing on the input image.

Cover

Draws covers on part of the input image.

Line drawing

Draws lines on the input image.

Watermark addition

Adds a watermark to the input image.

Reference

The following figure shows the component layout of the RGB and YUV formats. Two YUV420SP images are used as examples for semi-planar format and an ARGB image is used as an example for Packed and RGB formats.