mirror of http://192.168.1.51:8099/lmh188/twain3.0
39 lines
855 B
C++
39 lines
855 B
C++
/*
|
||
* ====================================================
|
||
|
||
* 功能:除噪,消除3*3以内的像素点,主要针对黑白图
|
||
* 作者:刘丁维
|
||
* 生成时间:2020/4/21
|
||
* 最近修改时间:2020/4/21 v1.0
|
||
2020/5/29 v1.1 增加接口,使噪点大小阈值可调
|
||
* 版本号:v1.1
|
||
|
||
* ====================================================
|
||
*/
|
||
|
||
#ifndef IMAGE_APPLY_DETACH_NOISE_H
|
||
#define IMAGE_APPLY_DETACH_NOISE_H
|
||
|
||
#include "ImageApply.h"
|
||
|
||
class CImageApplyDetachNoise : public CImageApply
|
||
{
|
||
public:
|
||
CImageApplyDetachNoise(int noise = 1);
|
||
|
||
inline int getNoise() { return m_noise; }
|
||
|
||
inline void setNoise(int noise) { m_noise = noise; }
|
||
|
||
virtual ~CImageApplyDetachNoise(void);
|
||
|
||
virtual void apply(cv::Mat& pDib, int side);
|
||
|
||
virtual void apply(std::vector<cv::Mat>& mats, bool isTwoSide);
|
||
|
||
private:
|
||
int m_noise;
|
||
};
|
||
#endif // !IMAGE_APPLY_DETACH_NOISE_H
|
||
|