acldvppSetResizeConfigInterpolation

Description

Sets the image resizing algorithm. This API is synchronous.

Prototype

aclError acldvppSetResizeConfigInterpolation(acldvppResizeConfig *resizeConfig, uint32_t interpolation)

Parameters

Parameter

Input/Output

Description

resizeConfig

Output

Pointer to resizing configuration to be set.

Call acldvppCreateResizeConfig to create data of the acldvppResizeConfig type in advance.

interpolation

Input

Resizing algorithm. You are advised to use the same resizing algorithm as in model training.

Selected from:

  • 0 (default):

    On the Ascend 310 AI Processor, 0 indicates the high-order filtering algorithm developed by Huawei.

    On the Ascend 310 AI Processor, 0 indicates the high-order filtering algorithm developed by Huawei.

    On the Ascend 610 AI Processor, the system forces 1 (even if 0 is set).

  • 1: conventional bilinear algorithm, whose compute process is close to that of OpenCV.

    On the Ascend 310P AI Processor, when this algorithm is set and the input and output images are in RGB format, the maximum difference between the pixel value of the algorithm and that of OpenCV is ±1 within the scaling range of [1/32, 512].

  • 2: conventional nearest neighbor algorithm, whose compute process is close to that of OpenCV.
  • 3: conventional bilinear algorithm, whose compute process is close to that of TensorFlow.

    The Ascend 310P AI Processor does not support this algorithm.

  • 4: conventional nearest neighbor algorithm, whose compute process is close to that of TensorFlow.

    The Ascend 310P AI Processor does not support this algorithm.

Returns

0 on success; else, failure.