?? dlgreg.h
字號:
#if !defined(AFX_DlgReg_H__096C39D7_72FA_4ABD_90AC_688669D1692C__INCLUDED_)
#define AFX_DlgReg_H__096C39D7_72FA_4ABD_90AC_688669D1692C__INCLUDED_
#include "ImageProcessingDoc.h"
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// DlgReg.h : header file
//
/////////////////////////////////////////////////////////////////////////////
// CDlgReg dialog
class CDlgReg : public CDialog
{
// Construction
public:
CImageProcessingDoc* m_pDoc;
CDlgReg(CWnd* pParent = NULL, CImageProcessingDoc* pDoc = NULL); // standard constructor
// Dialog Data
//{{AFX_DATA(CDlgReg)
enum { IDD = IDD_DLG_REG };
// NOTE: the ClassWizard will add data members here
//}}AFX_DATA
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CDlgReg)
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
//}}AFX_VIRTUAL
// Implementation
protected:
// 基準圖象數據指針,用于圖象拼接
LPBYTE m_lpBaseImg;
// 待配準圖象數據指針,用于圖象拼接
LPBYTE m_lpSampImg;
// 計算圖象位置的標志位。FALSE表示還沒有計算圖象位置
BOOL m_bCalImgLoc;
// 選取特征點標志位。FALSE表示還沒有選取
BOOL m_bChoseFeature;
// 設置圖象等控件的位置大小
void CalImageLocation();
// 基準圖象
CDib* m_pDibInit;
// 待配準圖象
CDib* m_pDibSamp;
// 配準后的圖象
CDib* m_pDibResult;
// 基準圖象顯示區域
CRect m_rectInitImage;
// 待配準圖象顯示區域
CRect m_rectResltImage;
// 待配準特征點位置
CPoint m_pPointSampl[3];
// 配準的特征點位置
CPoint m_pPointBase[3];
// 尋找配準點
CPoint FindMatchPoint(CDib* pDibBase, CDib* pDibSamp, CPoint pointSamp);
// 計算相似度
double CalCorrelation(unsigned char* pBase, unsigned char* pSamp, int nBlockLen);
// 畫出特征點
void DrawFeature(CDC* pDC);
// 獲得仿射變換系數
void GetAffinePara(CPoint* pPointBase, CPoint* pPointSampl, double* pDbBs2SpAffPara);
// 計算兩個矩陣相乘
void CalMatProduct(double* pDbSrc1, double *pDbSrc2, double *pDbDest, int nX, int nY, int nZ);
// 計算矩陣的逆
BOOL CalInvMatrix(double* pDbSrc, int nLen);
// 獲得待配準圖象仿射變換后的區域
CRect GetAftAffDim(double* pDbAffPara);
// 計算仿射變換后的待配準圖象
LPBYTE SetSampImgAftAff(double* pDbAffPara, CRect rectNewImg);
// 計算三次插值
unsigned char CalSpline(unsigned char *pUnchCorr, double x, double y);
// 計算仿射變換后的基準圖象
LPBYTE SetBaseImgAftAff(CRect rectNewImg);
// Generated message map functions
//{{AFX_MSG(CDlgReg)
afx_msg void OnPaint();
afx_msg void OnRegOpen();
afx_msg void OnRegReg();
afx_msg void OnRegChoseFeature();
afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
afx_msg void OnMouseMove(UINT nFlags, CPoint point);
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
private:
int m_nChsFeatureNum;
};
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_DlgReg_H__096C39D7_72FA_4ABD_90AC_688669D1692C__INCLUDED_)
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -