CenterCrop Class Reference#
2 min read time
Applies to Linux
roccv::CenterCrop Class Referencefinal
Class for managing the Center Crop operator. More...
#include <op_center_crop.hpp>
Inheritance diagram for roccv::CenterCrop:

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... | |
![]() | |
virtual | ~IOperator () |
Detailed Description
Class for managing the Center Crop operator.
Constructor & Destructor Documentation
◆ CenterCrop()
|
inline |
Construct a new Op CenterCrop object.
◆ ~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] stream The HIP stream to run this operator on. [in] input Input tensor with image data. [out] output Output tensor for storing modified image data. [in] cropWidth The crop rectangle width. [in] cropHeight The crop rectangle height. [in] device The 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