mirror of http://192.168.1.51:8099/lmh188/twain3
50 lines
875 B
C++
50 lines
875 B
C++
/*
|
||
* ====================================================
|
||
|
||
* 功能:滤镜。目前包括锐化、加强锐化、模糊和加强模糊
|
||
* 作者:刘丁维
|
||
* 生成时间: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
|