CenterCrop Class Reference

CenterCrop Class Reference#

2 min read time

Applies to Linux

rocCV: roccv::CenterCrop Class Reference
roccv::CenterCrop Class Referencefinal

Class for managing the Center Crop operator. More...

#include <op_center_crop.hpp>

Inheritance diagram for roccv::CenterCrop:
roccv::IOperator

Public Member Functions

 CenterCrop ()
 Construct a new Op CenterCrop object. More...
 
void operator() (hipStream_t stream, const Tensor &input, const Tensor &output, const Size2D cropSize, const eDeviceType device=eDeviceType::GPU) const
 Construct a new Op Center Crop object. The object can be used to crop a region of interest from the center of an image. More...
 
 ~CenterCrop ()
 Destroy the Op CenterCrop object. More...
 
- Public Member Functions inherited from roccv::IOperator
virtual ~IOperator ()
 

Detailed Description

Class for managing the Center Crop operator.

Constructor & Destructor Documentation

◆ CenterCrop()

roccv::CenterCrop::CenterCrop ( )
inline

Construct a new Op CenterCrop object.

◆ ~CenterCrop()

roccv::CenterCrop::~CenterCrop ( )
inline

Destroy the Op CenterCrop object.

Member Function Documentation

◆ operator()()

void roccv::CenterCrop::operator() ( hipStream_t  stream,
const Tensor input,
const Tensor output,
const Size2D  cropSize,
const eDeviceType  device = eDeviceType::GPU 
) const

Construct a new Op Center Crop object. The object can be used to crop a region of interest from the center of an image.

Limitations:

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

Output: Supported TensorLayout(s): [NHWC, HWC] 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
  Batch         | Yes
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]cropWidthThe crop rectangle width.
[in]cropHeightThe crop rectangle height.
[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_center_crop.hpp