/home/docs/checkouts/readthedocs.org/user_builds/advanced-micro-devices-roccv/checkouts/latest/include/op_warp_affine.hpp Source File

/home/docs/checkouts/readthedocs.org/user_builds/advanced-micro-devices-roccv/checkouts/latest/include/op_warp_affine.hpp Source File#

2 min read time

Applies to Linux

rocCV: /home/docs/checkouts/readthedocs.org/user_builds/advanced-micro-devices-roccv/checkouts/latest/include/op_warp_affine.hpp Source File
op_warp_affine.hpp
Go to the documentation of this file.
1 
22 #pragma once
23 
24 #include "core/tensor.hpp"
25 #include "i_operator.hpp"
26 #include "op_warp_perspective.hpp"
27 #include "operator_types.h"
28 
29 namespace roccv {
34 // Typedef for affine transformation matrix. Row-major.
35 typedef float AffineTransform[6];
36 
37 class WarpAffine final : public IOperator {
38  public:
43  WarpAffine() : m_op() {}
44 
50 
89  void operator()(hipStream_t stream, const Tensor& input, const Tensor& output, const AffineTransform xform,
90  const bool isInverted, const eInterpolationType interp, const eBorderType borderMode,
91  const float4 borderValue, const eDeviceType device = eDeviceType::GPU) const;
92 
93  private:
94  // WarpPerspective op is used to execute the affine transformation, as affine transformation is a subset.
95  WarpPerspective m_op;
96 };
97 } // namespace roccv
Interface class for all roccv operators.
Definition: i_operator.hpp:31
Definition: tensor.hpp:37
Definition: op_warp_affine.hpp:37
void operator()(hipStream_t stream, const Tensor &input, const Tensor &output, const AffineTransform xform, const bool isInverted, const eInterpolationType interp, const eBorderType borderMode, const float4 borderValue, const eDeviceType device=eDeviceType::GPU) const
Executes the WarpAffine operation on the given HIP stream. WarpAffine applies an affine transformatio...
~WarpAffine()
Destroy the WarpAffine object.
Definition: op_warp_affine.hpp:49
WarpAffine()
Construct a new WarpAffine object.
Definition: op_warp_affine.hpp:43
Class for managing the Warp Perspective operator.
Definition: op_warp_perspective.hpp:35
Definition: strided_data_wrap.hpp:33
float AffineTransform[6]
Class for managing the Warp Affine Operator.
Definition: op_warp_affine.hpp:35
eInterpolationType
Definition: operator_types.h:30
eBorderType
Definition: operator_types.h:36
eDeviceType
Describes the device type. Used to determine where Tensor data should be allocated and whether operat...
Definition: util_enums.h:69