twain3/ImageProcess/ImageApplyFilter.h

50 lines
875 B
C++
Raw Permalink 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_FILTER_H
#define IMAGE_APPLY_FILTER_H
#include "ImageApply.h"
class CImageApplyFilter : public CImageApply
{
public:
enum FilterMode
{
None,
Sharpen,
Sharpen_More,
AverBlur,
AverBlur_More
};
/*
* sharpentype [in]:滤镜模式
*/
CImageApplyFilter(FilterMode type);
virtual ~CImageApplyFilter();
virtual void apply(cv::Mat& pDib, int side);
virtual void apply(std::vector<cv::Mat>& mats, bool isTwoSide);
private:
void averblur(cv::Mat& src, int kSize);
void sharpen(cv::Mat& src, float kSize);
private:
int m_type;
float m_kSize;
};
#endif // !IMAGE_APPLY_SHARPEN_H