41 lines
881 B
C++
41 lines
881 B
C++
/*
|
||
* ====================================================
|
||
|
||
* 功能:自定义裁剪
|
||
* 作者:刘丁维
|
||
* 生成时间:2020/4/21
|
||
* 最近修改时间:2020/4/21
|
||
* 版本号:v1.0
|
||
|
||
* ====================================================
|
||
*/
|
||
|
||
#ifndef IMAGE_APPLY_CUSTOM_CROP_H
|
||
#define IMAGE_APPLY_CUSTOM_CROP_H
|
||
|
||
#include "ImageApply.h"
|
||
|
||
class GIMGPROC_LIBRARY_API CImageApplyCustomCrop : public CImageApply
|
||
{
|
||
public:
|
||
|
||
/*
|
||
* rect [in]:裁剪区域
|
||
* */
|
||
CImageApplyCustomCrop(const cv::Rect& rect);
|
||
|
||
virtual~ CImageApplyCustomCrop(void);
|
||
|
||
inline cv::Rect getROI() const { return m_rect; }
|
||
|
||
inline void setROI(const cv::Rect& roi) { m_rect = roi; }
|
||
|
||
virtual void apply(cv::Mat &pDib, int side);
|
||
|
||
virtual void apply(std::vector<cv::Mat>& mats, bool isTwoSide);
|
||
private:
|
||
cv::Rect m_rect;
|
||
};
|
||
|
||
#endif // IMAGE_APPLY_CUSTOM_CROP_H
|