hi_vpc_resize_info

Description

Defines the parameters for VPC resizing.

Prototype

typedef struct {
    hi_u32 resize_width;
    hi_u32 resize_height;
    hi_u32 interpolation;
} hi_vpc_resize_info;

Members

Member

Description

resize_width

Destination width.

resize_height

Destination height.

interpolation

Resizing algorithm.

You are advised to use the same resizing algorithm as in model training. The following resizing algorithms are supported:

  • 0: the conventional bilinear algorithm
  • 1: the conventional nearest neighbor algorithm

For the Atlas 350 Accelerator Card, the compute result of each resizing algorithm is the same as that of the OpenCV-3.4.2 algorithm.

Atlas A3 training product/Atlas A3 inference product. The calculation result of each resizing algorithm is the same as that of the OpenCV-3.4.2 algorithm.

In Atlas A2 training product/Atlas A2 inference product, the calculation results of each resizing algorithm are the same as those of the OpenCV-3.4.2 algorithm.

Atlas 200I/500 A2 inference product. The calculation result of each resizing algorithm is the same as that of the OpenCV-3.4.2 algorithm.

The computation process of the bilinear algorithm is similar to that of the OpenCV algorithm. When both the input and output images are in RGB format, the maximum difference between the value of Atlas inference product and a single pixel value of OpenCV is ±1 within the resizing range of [1/32, 512]. The calculation process of the nearest neighbor algorithm commonly used in the industry is similar to that of the OpenCV algorithm.