Functions
Function Description
VPC (Vision Preprocessing Core): processes YUV and RGB images. It provides the following key functions:
- Cropping: Crops one or more selected regions of interest (ROIs) from an input image.
- Resizing: For images with different resolution, 8K resizing and non-8K resizing are supported. Single-image cropping and resizing (uncompressed format) and single-image multi-ROI cropping and resizing (uncompressed format) are supported. Resizing modes such as original image resizing and proportional resizing (the aspect ratio of the image before and after resizing is the same) are supported.
- Pasting: crops an image out of an input image, resizes the cropped image, and places it in a specified area of the output image. The output image may be a blank image (when the output buffer allocated by the user is empty) or an existing image (when an image has been read into the output buffer allocated by the user). Note that the pasting concept here refers only to the case when the output image is an existing image.
- Stitching: Crops multiple images out of an input image, resizes the cropped images, and places them in a specified area of the output image.
- Image pyramid: Performs Gaussian filtering on the original image for multiple times and then downsamples the image to generate images of different sizes.
- Histogram analysis: collects statistics on the pixel value distribution of each image channel (RGB/YUV).
- Color Remapping: Maps an image to another image based on the configuration information.
- Border making: Perform border making on images.
- Format conversion: converts between different formats, such as RGB and YUV.
- Image grayscale: converts a color image into a grayscale image. Note that grayscale input images produce only grayscale output images. Outputs an image in YUV400 format.
- Surround-view stitching: generates panoramas in vehicle-mounted 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: Filters the input image. Currently, median filtering, corrosion filtering, dilation filtering, Gaussian filtering, mean filtering, and convolution filtering are supported.
- Rotation: rotates the input image by a fixed angle of 90 degrees, 180 degrees, or 270 degrees.
- Mosaic: Mosaic the input image.
- Overwrite: Overwrites part of the input image.
- Draw Line: Draws lines on the input image.
- Watermark: Add watermarks to the input image.
Function Support
The following table lists the functions supported by each version.
|
Description |
|
|
|
|
Atlas 350 Accelerator Card |
|---|---|---|---|---|---|
|
Cropping |
√ |
√ |
√ |
√ |
√ |
|
Resizing: |
√ |
√ |
√ |
√ |
√ |
|
Pasting |
√ |
√ |
√ |
√ |
√ |
|
Stitching |
√ |
√ |
√ |
√ |
√ |
|
Image pyramid |
√ |
☓ |
☓ |
☓ |
☓ |
|
Histogram analysis |
√ |
√ |
√ |
√ |
√ |
|
Remapping |
√ |
√ |
√ |
√ |
√ |
|
Border making |
√ |
√ |
√ |
√ |
√ |
|
Format conversion |
√ |
√ |
√ |
√ |
√ |
|
Image grayscale |
√ |
√ |
√ |
√ |
√ |
|
Surround-view stitching |
☓ |
☓ |
☓ |
☓ |
☓ |
|
Remapping |
☓ |
√ |
√ |
√ |
√ |
|
Filtering |
☓ |
√ |
√ |
√ |
√ |
|
Rotate |
☓ |
√ |
√ |
√ |
√ |
|
Mosaic |
☓ |
√ |
☓ |
☓ |
☓ |
|
Coverage |
☓ |
√ |
☓ |
☓ |
☓ |
|
Line drawing |
☓ |
√ |
☓ |
☓ |
☓ |
|
Watermark addition |
☓ |
√ |
☓ |
☓ |
☓ |
VPC Function Diagram
Only the function diagram is provided here. The alignment restrictions vary depending on the product model. For details, see the usage description of each functional interface.
Due to different alignment constraints,
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.
