vpc_get_rotation_matrix

Applicability

Product

Supported

Atlas 350 Accelerator Card

Atlas A3 training product/Atlas A3 inference product

Atlas A2 training product/Atlas A2 inference product

Atlas training product

x

Atlas inference product

x

Atlas 200I/500 A2 inference product

Description

Obtains the rotation matrix required for affine transformation.

Prototype

  • C Prototype
    1
    hi_s32 hi_mpi_vpc_get_rotation_matrix(hi_float_point center_point, hi_double angle, hi_double scale, hi_transform_matrix *matrix)
    
  • Python Function
    1
    matrix, ret = acl.himpi.vpc_get_rotation_matrix(center_point, angle, scale)
    

Parameters

Parameter

Description

center_point

Dict, dictionary of the rotation center point of the input image. For details, see hi_float_point.

angle

Float, rotation angle. A positive value indicates anticlockwise rotation.

scale

Float, resizing parameter. If the value of scale is greater than 1, the image is resized up. If the value of scale is less than 1, the image is resized down.

Return Value

Return Value

Description

matrix

Dict, dictionary of the transformation matrix information required for affine transformation. Set matrix_type based on the actual input matrix. For details, see hi_transform_matrix.

ret

Int, error code.
  • 0 indicates success.
  • Other values indicate failure. For details, see VPC Return Codes.