twain3.0/huagao/ImageProcess/ImageApplyDetachNoise.h

39 lines
855 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.

/*
* ====================================================
* 功能除噪消除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