52 lines
1.2 KiB
C++
52 lines
1.2 KiB
C++
/*
|
||
* ====================================================
|
||
|
||
* 功能:去除网纹
|
||
* 作者:刘丁维
|
||
* 生成时间:2020/4/21
|
||
* 最近修改时间:2020/4/21 v1.0
|
||
* 2022/4/09 v1.1 提高算法效率
|
||
* 版本号:v1.1
|
||
|
||
* ====================================================
|
||
*/
|
||
|
||
#ifndef IMAGE_APPLY_TEXTURE_REMOVAL_H
|
||
#define IMAGE_APPLY_TEXTURE_REMOVAL_H
|
||
|
||
#include "ImageApply.h"
|
||
|
||
class GIMGPROC_LIBRARY_API CImageApplyTextureRemoval : public CImageApply
|
||
{
|
||
public:
|
||
CImageApplyTextureRemoval(void);
|
||
|
||
/*
|
||
* dilateSize [in]:膨胀像素
|
||
* erodeSize [in]:腐蚀像素
|
||
*/
|
||
CImageApplyTextureRemoval(int dilateSize, int erodeSize);
|
||
|
||
virtual ~CImageApplyTextureRemoval(void);
|
||
|
||
virtual void apply(cv::Mat& pDib, int side);
|
||
|
||
virtual void apply(std::vector<cv::Mat>& mats, bool isTwoSide);
|
||
|
||
int getDilateSize() { return m_dilateSize; }
|
||
|
||
int getErodeSize() { return m_erodeSize; }
|
||
|
||
void setDilateSize(int size) { m_dilateSize = size; }
|
||
|
||
void setErodeSize(int size) { m_erodeSize = size; }
|
||
private:
|
||
void textureRemovalGray(cv::Mat& img);
|
||
|
||
private:
|
||
int m_dilateSize;
|
||
int m_erodeSize;
|
||
};
|
||
|
||
#endif
|