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

📄 imagecodesdoc.h

📁 VC写的harris角点检测程序。又名plessey
💻 H
字号:
// ImageCodesDoc.h : interface of the CImageCodesDoc class
//
/////////////////////////////////////////////////////////////////////////////

#if !defined(AFX_IMAGECODESDOC_H__302C7446_3675_4299_9235_2C3E6B50DE6E__INCLUDED_)
#define AFX_IMAGECODESDOC_H__302C7446_3675_4299_9235_2C3E6B50DE6E__INCLUDED_

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

#include "DIBSectionLite.h"
#include "BMGDLL.h"
#include "Capture.h"


enum ALPHABG { BG_NONE, BG_COLOR, BG_BITMAP, BG_IMAGE };

enum FILETYPE { IF_TIFF, IF_JPEG, IF_PNG, IF_BMP, IF_RGB, IF_CEL, IF_TGA,
                IF_GIF, IF_NONE };

class CImageCodesDoc : public CDocument
{
protected: // create from serialization only
	CImageCodesDoc();
	DECLARE_DYNCREATE(CImageCodesDoc)

// Attributes
public:
	
	CDIBSectionLite *DIB;
	HBITMAP hBitmap ;
	unsigned int **trans;//存放原始象素值,24位,RGB
//	unsigned int **GrayValue;//存放灰度值,8位
	unsigned int **convo;//存放边缘检测后的象素值,8位
	unsigned char *back;//存放显示以前的象素值
//	unsigned int r0,c0; //r0,c0代表总行数和总列数
	struct BMGImageStruct img;
	BOOL transflag;
	BOOL Grayflag;
	HCURSOR mHArrow;
	HCURSOR mHWait;

	TiffCompression compression;
    TiffPhotometric photometric;
    TiffOrientation orientation;
    unsigned short predictor; 

	FILETYPE FileType;	
	ALPHABG alpha_bg;

	BOOL newFile;

// Operations
public:

// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CImageCodesDoc)
	public:
	virtual BOOL OnNewDocument();
	virtual void Serialize(CArchive& ar);
	//}}AFX_VIRTUAL

// Implementation
public:
	BOOL erflag;
	BOOL m_Harris;
	unsigned int MaxClass(unsigned int temp[50][50]);
	void ProcessMaxl();
	void ProcessMaxl1();
	BOOL connectflag;
	BOOL xingflag;
	void CopyGrayValueToConvo();
	void CopyGVToConvo();
	BOOL label;
	BOOL convoflag;
    void  Reply();
	void  Free();
	unsigned int SortPinghuaK(unsigned int sort[3][3]);
	unsigned int SortAndSelectM(unsigned int s[3][3]);
	void ConvertTo8Bits(unsigned int **convo);
	void ConvertTo24Bits(unsigned int **convo);
	void EdgeDetect(double T[3][3]);
	void TemplateConvolution(double T[3][3]);
	void Display();
	void Gray();
	void CopyBackToBits();
	void TransBack(unsigned int **trans);
	void DataOutToFile(unsigned int **trans);
	void TransTo2D();
	void show();
	virtual ~CImageCodesDoc();
#ifdef _DEBUG
	virtual void AssertValid() const;
	virtual void Dump(CDumpContext& dc) const;
#endif

protected:

// Generated message map functions
protected:
	//{{AFX_MSG(CImageCodesDoc)
	afx_msg void OnFileOpen();
	afx_msg void OnFileSaveAs();
	afx_msg void OnProcessDataout();
	afx_msg void OnProcessGray();
	afx_msg void OnProcessRecover();
	afx_msg void OnProcessSobel();
	afx_msg void OnProcessLap();
	afx_msg void OnProcessAve();
	afx_msg void OnProcessHor();
	afx_msg void OnProcessHv();
	afx_msg void OnProcessMid();
	afx_msg void OnProcessRui();
	afx_msg void OnProcessVer();
	afx_msg void OnProcessErzhihua();
	afx_msg void OnProcessRobert();
	afx_msg void OnUpdateProcessGray(CCmdUI* pCmdUI);
	afx_msg void OnUpdateProcessErzhihua(CCmdUI* pCmdUI);
	afx_msg void OnUpdateProcessAve(CCmdUI* pCmdUI);
	afx_msg void OnUpdateProcessDataout(CCmdUI* pCmdUI);
	afx_msg void OnUpdateProcessHor(CCmdUI* pCmdUI);
	afx_msg void OnUpdateProcessHv(CCmdUI* pCmdUI);
	afx_msg void OnUpdateProcessLap(CCmdUI* pCmdUI);
	afx_msg void OnUpdateProcessMid(CCmdUI* pCmdUI);
	afx_msg void OnUpdateProcessRecover(CCmdUI* pCmdUI);
	afx_msg void OnUpdateProcessRobert(CCmdUI* pCmdUI);
	afx_msg void OnUpdateProcessRui(CCmdUI* pCmdUI);
	afx_msg void OnUpdateProcessSobel(CCmdUI* pCmdUI);
	afx_msg void OnUpdateProcessVer(CCmdUI* pCmdUI);
	afx_msg void OnUpdateFileSaveAs(CCmdUI* pCmdUI);
	afx_msg void OnProcessArethr();
	afx_msg void OnProcessConvert();
	afx_msg void OnProcessGray1();
	afx_msg void OnProcessAve1();
	afx_msg void OnProcessConvert1();
	afx_msg void OnProcessErzhihua1();
	afx_msg void OnProcessHor1();
	afx_msg void OnProcessHv1();
	afx_msg void OnProcessLap1();
	afx_msg void OnProcessMid1();
	afx_msg void OnProcessRobert1();
	afx_msg void OnProcessRui1();
	afx_msg void OnProcessSobel1();
	afx_msg void OnProcessVer1();
	afx_msg void OnUpdateFileSave(CCmdUI* pCmdUI);
	afx_msg void OnUpdateProcessAve1(CCmdUI* pCmdUI);
	afx_msg void OnUpdateProcessConvert1(CCmdUI* pCmdUI);
	afx_msg void OnUpdateProcessErzhihua1(CCmdUI* pCmdUI);
	afx_msg void OnUpdateProcessGray1(CCmdUI* pCmdUI);
	afx_msg void OnUpdateProcessHor1(CCmdUI* pCmdUI);
	afx_msg void OnUpdateProcessHv1(CCmdUI* pCmdUI);
	afx_msg void OnUpdateProcessLap1(CCmdUI* pCmdUI);
	afx_msg void OnUpdateProcessMid1(CCmdUI* pCmdUI);
	afx_msg void OnUpdateProcessRobert1(CCmdUI* pCmdUI);
	afx_msg void OnUpdateProcessRui1(CCmdUI* pCmdUI);
	afx_msg void OnUpdateProcessSobel1(CCmdUI* pCmdUI);
	afx_msg void OnUpdateProcessVer1(CCmdUI* pCmdUI);
	afx_msg void OnUpdateProcessConvert(CCmdUI* pCmdUI);
	afx_msg void OnPointEnhance();
	afx_msg void OnPointEnhance1();
	afx_msg void OnPinghuaK();
	afx_msg void OnPinghuaK1();
	afx_msg void OnPinghuaChao();
	afx_msg void OnPinghuaChao1();
	afx_msg void OnPointStretch();
	afx_msg void OnPointStretch1();
	afx_msg void OnPointWindow();
	afx_msg void OnPointWindow1();
	afx_msg void OnUpdatePinghuaChao(CCmdUI* pCmdUI);
	afx_msg void OnUpdatePinghuaChao1(CCmdUI* pCmdUI);
	afx_msg void OnUpdatePinghuaK(CCmdUI* pCmdUI);
	afx_msg void OnUpdatePinghuaK1(CCmdUI* pCmdUI);
	afx_msg void OnUpdatePointEnhance(CCmdUI* pCmdUI);
	afx_msg void OnUpdatePointEnhance1(CCmdUI* pCmdUI);
	afx_msg void OnUpdatePointStretch(CCmdUI* pCmdUI);
	afx_msg void OnUpdatePointStretch1(CCmdUI* pCmdUI);
	afx_msg void OnUpdatePointWindow(CCmdUI* pCmdUI);
	afx_msg void OnUpdatePointWindow1(CCmdUI* pCmdUI);
	afx_msg void OnUpdateEdgePrewitt(CCmdUI* pCmdUI);
	afx_msg void OnEdgePrewitt1();
	afx_msg void OnEdgePrewitt();
	afx_msg void OnUpdateEdgePrewitt1(CCmdUI* pCmdUI);
	afx_msg void OnProcessMaxl();
	afx_msg void OnUpdateProcessMaxl(CCmdUI* pCmdUI);
	afx_msg void OnProcessMaxl1();
	afx_msg void OnUpdateProcessMaxl1(CCmdUI* pCmdUI);
	afx_msg void OnXingH();
	afx_msg void OnXingV();
	afx_msg void OnXingFang();
	afx_msg void OnUpdateXingFang(CCmdUI* pCmdUI);
	afx_msg void OnUpdateXingH(CCmdUI* pCmdUI);
	afx_msg void OnUpdateXingV(CCmdUI* pCmdUI);
	afx_msg void OnXingH1();
	afx_msg void OnXingFang1();
	afx_msg void OnXingV1();
	afx_msg void OnUpdateXingFang1(CCmdUI* pCmdUI);
	afx_msg void OnUpdateXingH1(CCmdUI* pCmdUI);
	afx_msg void OnUpdateXingV1(CCmdUI* pCmdUI);
	afx_msg void OnPengH();
	afx_msg void OnUpdatePengH(CCmdUI* pCmdUI);
	afx_msg void OnPengH1();
	afx_msg void OnUpdatePengH1(CCmdUI* pCmdUI);
	afx_msg void OnPengFang();
	afx_msg void OnUpdatePengFang(CCmdUI* pCmdUI);
	afx_msg void OnPengV();
	afx_msg void OnPengV1();
	afx_msg void OnUpdatePengV1(CCmdUI* pCmdUI);
	afx_msg void OnUpdatePengV(CCmdUI* pCmdUI);
	afx_msg void OnUpdatePengFang1(CCmdUI* pCmdUI);
	afx_msg void OnPengFang1();
	afx_msg void OnOpenFang();
	afx_msg void OnOpenFang1();
	afx_msg void OnOpenH();
	afx_msg void OnOpenH1();
	afx_msg void OnOpenV();
	afx_msg void OnOpenV1();
	afx_msg void OnCloseFang();
	afx_msg void OnCloseFang1();
	afx_msg void OnCloseH();
	afx_msg void OnCloseH1();
	afx_msg void OnCloseV();
	afx_msg void OnCloseV1();
	afx_msg void OnUpdateCloseFang(CCmdUI* pCmdUI);
	afx_msg void OnUpdateCloseFang1(CCmdUI* pCmdUI);
	afx_msg void OnUpdateCloseH(CCmdUI* pCmdUI);
	afx_msg void OnUpdateCloseH1(CCmdUI* pCmdUI);
	afx_msg void OnUpdateCloseV(CCmdUI* pCmdUI);
	afx_msg void OnUpdateCloseV1(CCmdUI* pCmdUI);
	afx_msg void OnUpdateOpenFang(CCmdUI* pCmdUI);
	afx_msg void OnUpdateOpenFang1(CCmdUI* pCmdUI);
	afx_msg void OnUpdateOpenH(CCmdUI* pCmdUI);
	afx_msg void OnUpdateOpenH1(CCmdUI* pCmdUI);
	afx_msg void OnUpdateOpenV(CCmdUI* pCmdUI);
	afx_msg void OnUpdateOpenV1(CCmdUI* pCmdUI);
	afx_msg void OnConect();
	afx_msg void OnDisconect();
	afx_msg void OnReadCapture();
	afx_msg void OnUpdateReadCapture(CCmdUI* pCmdUI);
	afx_msg void OnProcessAmaxl();
	afx_msg void OnProcessBestmax();
	afx_msg void OnUpdateProcessBestmax(CCmdUI* pCmdUI);
	afx_msg void OnUpdateProcessAmaxl(CCmdUI* pCmdUI);
	afx_msg void OnDetect();
	afx_msg void OnUpdateDetect(CCmdUI* pCmdUI);
	afx_msg void OnUpdateDisconect(CCmdUI* pCmdUI);
	afx_msg void OnUpdateConect(CCmdUI* pCmdUI);
	afx_msg void OnSetsource();
	afx_msg void OnUpdateSetsource(CCmdUI* pCmdUI);
	afx_msg void OnProcessHough();
	afx_msg void OnProcessHough1();
	afx_msg void OnUpdateProcessHough1(CCmdUI* pCmdUI);
	afx_msg void OnUpdateProcessHough(CCmdUI* pCmdUI);
	afx_msg void OnDetect2();
	afx_msg void OnUpdateDetect2(CCmdUI* pCmdUI);
	afx_msg void OnHarris();
	afx_msg void OnUpdateHarris(CCmdUI* pCmdUI);
	//}}AFX_MSG
	afx_msg void OnUpdateImageInfo(CCmdUI * pCmdUI);
	DECLARE_MESSAGE_MAP()
};

/////////////////////////////////////////////////////////////////////////////

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_IMAGECODESDOC_H__302C7446_3675_4299_9235_2C3E6B50DE6E__INCLUDED_)

⌨️ 快捷键说明

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