57 #ifndef _RNR_WIN_CV_IOI_H 58 #define _RNR_WIN_CV_IOI_H 60 #include "rnr/rnrconfig.h" 62 #include "opencv2/core/core.hpp" 128 cv::Rect &rectRoIIoI,
140 virtual void transform(cv::Mat &imgIoI, cv::Mat &imgTgt);
150 cv::Point
mapPoint(cv::Point &ptDisplay);
181 cv::Size
calcMaxFit43(cv::Size &sizeSrc, cv::Size &sizeTgt);
202 #endif // _RNR_WIN_CV_IOI_H cv::Rect m_rectRoIIoI
image of interest region of interest
cv::Size calcMaxFit43(cv::Size &sizeSrc, cv::Size &sizeTgt)
Calculate the maximal size the source can fit into the target size while keeping a 4:3 aspect ratio...
bool m_bOpRotate
do [not] apply rotation operation
virtual void transform(cv::Mat &imgIoI, cv::Mat &imgTgt)
Transform Image of Interest into the target image.
RoadNarrows Robotics Win abstract base class interface.
cv::Size m_sizeTgt
target workspace size
cv::Size getOriginalSize()
cv::Point mapPoint(cv::Point &ptDisplay)
Map display pixel coordinates to Image of Interest pixel coordinates.
bool m_bOpScale
do [not] apply resize operation
cv::Size m_sizeRotated
rotated image size
cv::Rect m_rectRoITgt
target workspace region of interest
cv::Size m_sizeIoI
image native size
bool m_bOpCrop
do [not] apply crop operation
cv::Mat m_matRot
2x3 transformation matrix
RotOp m_eOpRot
image rotation operator
cv::Rect m_rectRoICropped
cropped region of interest
virtual ~WinCvIoI()
Destructor.
WinCvIoI(cv::Size &sizeIoI, cv::Size &sizeTgt, RotOp eOpRot, AlignOp eOpAlign, bool bCropToFit)
Image of Interest class initialization constructor.
cv::Size getTransformedSize()
Get the transformed target size.
AlignOp m_eOpAlign
image alignment operator
cv::Size m_sizeScaled
scaled image size
void setTransformParams(cv::Size &sizeIoI, cv::Rect &rectRoIIoI, cv::Size &sizeTgt, RotOp eOpRot, AlignOp eOpAlign, bool bCropToFit)
Set Image of Interest transfromation parameters.