code_device/hgdriver/ImageProcess/ImageApplyCustomCrop.h

41 lines
881 B
C++
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/*
* ====================================================
* 功能:自定义裁剪
* 作者:刘丁维
* 生成时间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