mxpi_rotation

Function

Rotates images.

Synchronous/Asynchronous (Status)

Synchronous

Constraints

Currently, the following input data types are supported:

  • UINT8
  • FLOAT32

Currently, the following input image formats are supported:

  • RGB888
  • BGR888

Plugin Base Class (Factory)

mxpi_rotation

Input/Output

Input: buffer (data type: MxpiBuffer) and metadata (data type: MxpiVisionList)

Output: buffer (data type: MxpiBuffer) and metadata (data type: MxpiVisionList)

Port Format (Caps)

Static input 1: {"image/rgb"}

Dynamic input 2: {"metadata/class"}

Static output: {"image/rgb"}

Property

For details, see Table mxpi_rotation plugin properties.

Table 1 mxpi_rotation plugin properties

Property Name

Description

Mandatory or Not

Modifiable or Not

deviceId

Ascend device ID, which is specified by the deviceId property in the stream_config field. You do not need to set the ID.

No

Yes

dataSourceWarp

Index of the input image data. The default value is the key of the metadata mounted to the output port of the upstream plugin.

No

Yes

dataSourceClass

Index of the classification result data. The default value is the key of the metadata mounted to the output port of the upstream plugin.

No

Yes

rotateCode

Rotation types:

  • ROTATE_90_CLOCKWISE: rotates 90 degrees clockwise (default).
  • ROTATE_180: rotates 180 degrees.
  • ROTATE_90_COUNTERCLOCKWISE: rotates 90 degrees counterclockwise.

No

Yes

rotCondition

Rotation conditions:

  • GE: greater than or equal to (default)
  • GT: greater than
  • LE: less than or equal to
  • LT: less than

No

Yes

criticalValue

Rotation threshold. The default value is 0.

No

Yes