Remap Class Reference

Remap Class Reference#

3 min read time

Applies to Linux

rocCV: roccv::Remap Class Reference
roccv::Remap Class Referencefinal

Class for managing the remap operator. More...

#include <op_remap.hpp>

Inheritance diagram for roccv::Remap:
roccv::IOperator

Public Member Functions

void operator() (hipStream_t stream, const roccv::Tensor &input, const roccv::Tensor &output, const roccv::Tensor &map, const eInterpolationType inInterpolation, const eInterpolationType mapInterpolation, const eRemapType mapValueType, const bool alignCorners, const eBorderType borderType, const float4 borderValue, eDeviceType device=eDeviceType::GPU)
 Construct a new Remap object. The object can be used to remap the pixels in an image according to a new mapping given by a map tensor containing pixel coordinates. More...
 
 Remap ()
 Constructs an Remap object. More...
 
 ~Remap ()
 Destroy the Remap object. More...
 
- Public Member Functions inherited from roccv::IOperator
virtual ~IOperator ()
 

Detailed Description

Class for managing the remap operator.

Constructor & Destructor Documentation

◆ Remap()

roccv::Remap::Remap ( )

Constructs an Remap object.

◆ ~Remap()

roccv::Remap::~Remap ( )

Destroy the Remap object.

Member Function Documentation

◆ operator()()

void roccv::Remap::operator() ( hipStream_t  stream,
const roccv::Tensor input,
const roccv::Tensor output,
const roccv::Tensor map,
const eInterpolationType  inInterpolation,
const eInterpolationType  mapInterpolation,
const eRemapType  mapValueType,
const bool  alignCorners,
const eBorderType  borderType,
const float4  borderValue,
eDeviceType  device = eDeviceType::GPU 
)

Construct a new Remap object. The object can be used to remap the pixels in an image according to a new mapping given by a map tensor containing pixel coordinates.

Limitations:

Input: Supported TensorLayout(s): [NHWC, HWC] Channels: [1 , 3, 4] Supported DataType(s): [U8]

Output: Supported TensorLayout(s): [NHWC, HWC] Channels: [1 , 3, 4] Supported DataType(s): [U8]

Input/Output dependency:

  Property      |  Input == Output
 -------------- | -------------
  TensorLayout  | Yes
  DataType      | Yes
  Channels      | Yes
  Width         | Yes
  Height        | Yes
  Batch Size    | Yes

Currently supported remap types:

  • REMAP_ABSOLUTE
Parameters
[in]streamThe HIP stream to run this operation on.
[in]inputInput tensor with image batch data
[out]outputOutput tensor for storing modified image batch data
[in]mapMap tensor containing absolute or relative positions for how to remap the pixels of the input tensor to the output tensor
[in]inInterpolationInterpolation type to be used when getting values from the input tensor.
[in]mapInterpolationInterpolation type to be used when getting indices from the map tensor.
[in]mapValueTypeDetermines how the values in the map are interpreted.
[in]alignCornersSet to true if corner values are aligned to center points of corner pixels and set to false if they are aligned by the corner points of the corner pixels.
[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 which this operation should run on. (Default: eDeviceType::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_remap.hpp