WarpPerspective Class Reference

WarpPerspective Class Reference#

2 min read time

Applies to Linux

rocCV: roccv::WarpPerspective Class Reference
roccv::WarpPerspective Class Referencefinal

Class for managing the Warp Perspective operator. More...

#include <op_warp_perspective.hpp>

Inheritance diagram for roccv::WarpPerspective:
roccv::IOperator

Public Member Functions

void operator() (hipStream_t stream, const roccv::Tensor &input, const roccv::Tensor &output, const PerspectiveTransform transMatrix, bool isInverted, const eInterpolationType interpolation, const eBorderType borderType, const float4 borderValue, const eDeviceType device=eDeviceType::GPU) const
 Construct a new Op Warp Perspective object. The object can be used to apply a perspective transformation operation on an image. More...
 
- Public Member Functions inherited from roccv::IOperator
virtual ~IOperator ()
 

Detailed Description

Class for managing the Warp Perspective operator.

Member Function Documentation

◆ operator()()

void roccv::WarpPerspective::operator() ( hipStream_t  stream,
const roccv::Tensor input,
const roccv::Tensor output,
const PerspectiveTransform  transMatrix,
bool  isInverted,
const eInterpolationType  interpolation,
const eBorderType  borderType,
const float4  borderValue,
const eDeviceType  device = eDeviceType::GPU 
) const

Construct a new Op Warp Perspective object. The object can be used to apply a perspective transformation operation on an image.

Limitations:

Input: Supported TensorLayout(s): [HWC, NHWC] Channels: [1, 3, 4] Supported DataType(s): [U8, S8, U16, S16, U32, S32, F32, F64]

Output: Supported TensorLayout(s): [HWC, NHWC] Channels: [1, 3, 4] Supported DataType(s): [U8, S8, U16, S16, U32, S32, F32, F64]

Input/Output dependency:

  Property      |  Input == Output
 -------------- | -------------
  TensorLayout  | Yes
  DataType      | Yes
  Channels      | Yes
  Width         | No
  Height        | No
Parameters
[in]streamThe HIP stream to run this operator on.
[in]inputInput tensor with image data.
[out]outputOutput tensor for storing modified image data.
[in]transMatrixA 3x3 transformation matrix for the perspective transformation.
[in]isInvertedMarks whether transMatrix is the inverted transformation matrix or not.
[in]interpolationInterpolation type (e.g. Nearest neigbour, linear).
[in]borderTypeA border type to identify the pixel extrapolation method (e.g. BORDER_TYPE_CONSTANT or BORDER_TYPE_REPLICATE)
[in]borderValueSet as 0 unless using a constant border.
[in]deviceThe device to run this operator on. (Default: GPU)

The documentation for this class was generated from the following file:
  • /home/docs/checkouts/readthedocs.org/user_builds/advanced-micro-devices-roccv/checkouts/latest/include/op_warp_perspective.hpp