mathmorphology.h
来自「visual c++数字图像与图形处理中的光盘内容」· C头文件 代码 · 共 58 行
H
58 行
/////////////////////////////////////////////////////////////////////////////////
//
// MathMorphology.h: interface for the CMathMorphology class.
//
////////////////////////////////////////////////////////////////////////////////
// 版权所有(2002)
// Copyright(2002)
// 编写者: 向世明
// Author: Xiang Shiming
//数学形态学,图像处理
#ifndef _CMATHMORPH_H
#define _CMATHMORPH_H
#ifndef _CIMAGEPROCESS_H
#include "ImageProcess.h"
#endif
class CMathMorphology : public CImageProcess
{
DECLARE_DYNAMIC(CMathMorphology)
public:
CMathMorphology();
virtual ~CMathMorphology();
public:
BOOL TopHat(LPBYTE lpbyBits32, int x, int y, int nWidth, int nHeight, int nScanWidth, int nScanHeight);
BOOL Gradientize(LPBYTE lpbyBitsSrc32, int x, int y, int nWidth, int nHeight, int nScanWidth, int nScanHeight);
BOOL Denoise(LPBYTE lpbyBitsSrc32, int x, int y, int nWidth, int nHeight, int nScanWidth, int nScanHeight);
BOOL OpenCompose(LPBYTE lpbyBitsSrc32, int x, int y, int nWidth, int nHeight, int nScanWidth, int nScanHeight);
BOOL PickEdge(LPBYTE lpbyBitsSrc32, int x, int y, int nWidth, int nHeight, int nScanWidth, int nScanHeight);
BOOL Close(LPBYTE lpbyBitsSrc32, int x, int y, int nWidth, int nHeight, int nScanWidth, int nScanHeight);
BOOL Open(LPBYTE lpbyBitsSrc32, int x, int y, int nWidth, int nHeight, int nScanWidth, int nScanHeight);
BOOL Erode(LPBYTE lpbyBitsSrc32, int x, int y, int nWidth, int nHeight, int nScanWidth, int nScanHeight);
BOOL Dilate(LPBYTE lpbyBitsSrc32, int x, int y, int nWidth, int nHeight, int nScanWidth, int nScanHeight);
void SetMorphologyElement(const MORPHOLOGYELEMENT* pME, int nEUsed);
#ifdef _DEBUG
virtual void Dump(CDumpContext& dc) const;
virtual void AssertValid() const;
#endif
protected:
void Erode(short* pcxDataSrc, int nWidth, int nHeight,short* pcxDataDst);
void Dilate(short* pcxDataSrc, int nWidth, int nHeight,short* pcxDataDst);
//采用了多少个元素元素个数
int m_nElementUsed;
//形态学结构元素,
MORPHOLOGYELEMENT* m_pME;
};
#endif
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?