hi_mpi_vpc_get_affine_lut

Description

Obtains a pixel position remapping LUT of affine transformation according to the pixel position coordinates in the input and output images. This API is synchronous.

The Ascend 310 AI Processor does not support this API in the current version.

The Ascend 910 AI Processor does not support this API in the current version.

The Ascend 310P AI Processor does not support this API in the current version.

Prototype

hi_s32 hi_mpi_vpc_get_affine_lut(hi_point_pair_info *point_pair_info, hi_u32 interpolation, hi_remap_lut *remap_lut)

Parameters

Parameter

Input/Output

Description

point_pair_info

Input

Three pairs of pixel coordinates in the input and output images. Each pair contains pixel coordinates of an input image and an output image, respectively.

interpolation

Input

The following resizing algorithms are supported:
  • 0: conventional bilinear algorithm, whose compute process is close to that of OpenCV.
  • 1: conventional nearest neighbor algorithm, whose compute process is close to that of OpenCV.

remap_lut

Input/Output

Information about the pixel position remapping LUT of affine transformation.

In the hi_remap_lut structure:
  • When lut is used as an input, you must allocate memory in advance. The memory size lut_size can be obtained by calling hi_mpi_vpc_get_lut_mem_size.
  • When lut is used as an output, you can obtain the affine transformation LUT information from the memory after this API is successfully called.

Returns