⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 imgprocess.h

📁 这是一款蛮COOL的图像处理系统
💻 H
字号:
// ImgProcess.h: interface for the CImgProcess class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_IMGPROCESS_H__77CC8C62_E478_465B_9F18_B22239E6A3C7__INCLUDED_)
#define AFX_IMGPROCESS_H__77CC8C62_E478_465B_9F18_B22239E6A3C7__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#include "dibapi.h"

// Definitions required for convolution image filtering
#define KERNELCOLS 3
#define KERNELROWS 3
#define KERNELELEMENTS (KERNELCOLS * KERNELROWS)
// local use macro
#define PIXEL_OFFSET(i, j, nWidthBytes)	\
	(LONG)((LONG)(i)*(LONG)(nWidthBytes) + (LONG)(j)*3)


//#define Point(x,y) lpPoints[(x)+(y)*nWidth]

// struct for convolute kernel 
typedef struct 
{
	int Element[KERNELELEMENTS];
	int Divisor;
} KERNEL;

class CImgProcess  
{
private:

public:
	CImgProcess();
	virtual ~CImgProcess();
	
	// local function prototype
	static int compare(const void *e1, const void *e2);
	static void DoMedianFilterDIB(int *red, int *green, int *blue, int i, int j, 
		WORD wBytesPerLine, LPSTR lpDIBits);
	static void DoConvoluteDIB(int *red, int *green, int *blue, int i, int j, 
		WORD wBytesPerLine, LPSTR lpDIBits, KERNEL *lpKernel);
	static BOOL ConvoluteDIB(HDIB hDib, KERNEL *lpKernel, int Strength, int nKernelNum=1);
	
	static BOOL HighPassDIB(HDIB hDib, int Strength, int nAlgorithm);
	static BOOL LowPassDIB(HDIB hDib, int Strength, int nAlgorithm);
	static BOOL EdgeEnhanceDIB(HDIB hDib, int Strength, int nAlgorithm);
	static BOOL MedianFilterDIB(HDIB hDib);
	static BOOL ReverseDIB(HDIB hDib);
	static BOOL ErosionDIB(HDIB hDib, BOOL bHori);
	static BOOL DilationDIB(HDIB hDib, BOOL bHori);
	static BOOL MorphOpenDIB(HDIB hDib, BOOL bHori);
	static BOOL MorphCloseDIB(HDIB hDib, BOOL bHori);
	static BOOL ContourDIB(HDIB hDib, BOOL bHori);
	static BOOL ThinningDIB(HDIB hDib);
	static void GetPoints(int nWidth,int nHeight,BYTE *lpBits,BYTE *lpPoints);
	static void PutPoints(int nWidth,int nHeight,BYTE *lpBits,BYTE *lpPoints);
	static BOOL FFTDIB(HDIB hDIB);
	static BOOL DCTDIB(HDIB hDIB);
	static BOOL WALhDIB(HDIB hDIB);

		
};

#endif // !defined(AFX_IMGPROCESS_H__77CC8C62_E478_465B_9F18_B22239E6A3C7__INCLUDED_)

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -