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 that in model training. The following resizing algorithms are supported:

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

On the Atlas A3 training products/Atlas A3 inference products, the compute result of each resizing algorithm is the same as that of the OpenCV-3.4.2 algorithm.

On the Atlas A2 training products/Atlas A2 inference products, the compute result of each resizing algorithm is the same as that of the OpenCV-3.4.2 algorithm.

On the Atlas 200I/500 A2 inference products, the compute result of each resizing algorithm is the same as that of the OpenCV-3.4.2 algorithm.

On the Atlas inference products, the compute process of the conventional bilinear algorithm is similar to that of the OpenCV algorithm. When the input and output image formats are both RGB, the maximum difference between the bilinear algorithm and the OpenCV algorithm is ±1 within the resizing range of [1/32, 512]. The compute process of the conventional nearest neighbor algorithm is similar to that of the OpenCV algorithm.