?? 圖像特征跟蹤系統view.h
字號:
// 圖像特征跟蹤系統View.h : interface of the CMyView class
//
/////////////////////////////////////////////////////////////////////////////
#if !defined(AFX_VIEW_H__916AF838_5C47_4452_8D95_D03FB1E4F4DB__INCLUDED_)
#define AFX_VIEW_H__916AF838_5C47_4452_8D95_D03FB1E4F4DB__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include "TrackerParameters.h"
#include "Track.h"
class CMyView : public CScrollView
{
public:
double* pBitmapInput; //輸入圖像指針
CTrack track;
private:
//////////////////////////////////////////////
//設置背景:
BYTE* pBitmapBackGround;
BITMAPINFO* pBitmapInfoBackGround;
//////////////////////////////////////////////
//下面是為跟蹤算法而在view內定義的全局變量:
TRACK_TYPE TrackType; //跟蹤類型
TRACK_TEPLATE_UPDATE_TYPE TemplateUpdateType;//模板更新方式
TRACK_SOURCE_TYPE SourceType; //數據源類型
DWORD dwBitmapInputWidth; //輸入圖像寬度
DWORD dwBitmapInputHeight; //輸入圖像高度
double* pBitmapTemplate; //模板圖像指針
double dTemplateUpdatePower; //模板更新權值
double* pBitmapTarget; //目標圖像指針
double* pBitmapTarget_SecondLevel;//目標圖像指針
DWORD dwTargetWidth; //目標圖像寬度
DWORD dwTargetHeight; //目標圖像高度
CString strEigenSapceFilePath; //特征空間文件路徑
double* pEigenSpace; //特征空間指針
double* pEigenSpace_SecondLevel; //金字塔抽層后的特征空間指針
int nEigenSpaceTotalVector; //特征空間總維數
int nEigenSpaceSelectVector; //選用的特征空間維數
CString strInputBitmapFilePath; //輸入磁盤圖像文件路徑
int nInputBitmapFileNumber; //輸入磁盤圖像文件總數
int nPyramidLevel; //算法采用的金字塔層數
int nMaxIterateTimes; //算法采用的最大迭代次數
double dDelt; //算法采用的一個控制曲線形狀的參數
double affine[6]; //目標的仿射參數數組
double dGradationOffset; //由于歸一化造成的灰度偏移量
int nTargetWidthSet;
int nTargetHeightSet;
bool bSetTargetScale;
bool bSaveResultFile; //保存結果圖像文間
CString strOutputResultFilePath; //結果輸出文件路徑名
bool bSaveTargetFile; //保存目標圖像文件
CString strOutputTargetFilePath; //目標輸出文件路徑名
RECT rectBitmapInputDisplay; //輸入圖像顯示區域
RECT rectBitmapTemplateDisplay; //模板圖像顯示區域
RECT rectBitmapTargetDisplay; //目標圖像顯示區域
//////////////////////////////////////////////
//下面的是定義顯示有關的變量:
BYTE* pDisplayBitmapInputBuffer; //輸入圖像顯示緩沖區
BITMAPINFO* pBMIBitmapInputBuffer; //輸入圖像BMP信息結構
BYTE* pDisplayBitmapTemplateBuffer; //模板圖像顯示緩沖區
BITMAPINFO* pBMIBitmapTemplateBuffer;//模板圖像BMP信息結構
BYTE* pDisplayBitmapTargetBuffer; //目標圖像顯示緩沖區
BITMAPINFO* pBMIBitmapTargetBuffer; //目標圖像BMP信息結構
double a[6];
protected: // create from serialization only
CMyView();
DECLARE_DYNCREATE(CMyView)
// Attributes
public:
CMyDoc* GetDocument();
// Operations
public:
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CMyView)
public:
virtual void OnDraw(CDC* pDC); // overridden to draw this view
virtual BOOL DestroyWindow();
protected:
virtual void OnInitialUpdate(); // called first time after construct
//}}AFX_VIRTUAL
// Implementation
public:
bool Track();
virtual ~CMyView();
#ifdef _DEBUG
virtual void AssertValid() const;
virtual void Dump(CDumpContext& dc) const;
#endif
protected:
void CheckRectData(CPoint* pPoint);
// Generated message map functions
protected:
//{{AFX_MSG(CMyView)
afx_msg void OnTrackSetting();
afx_msg void OnTrackBegin();
afx_msg void OnTrackStop();
afx_msg void OnMouseMove(UINT nFlags, CPoint point);
afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
afx_msg void OnSetUsbCamera();
afx_msg void OnUpdateSetUsbCamera(CCmdUI* pCmdUI);
afx_msg void OnUpdateFileNew(CCmdUI* pCmdUI);
afx_msg void OnTrackGetTemplate();
afx_msg void OnUpdateTrackGetTemplate(CCmdUI* pCmdUI);
afx_msg void OnUpdateTrackBegin(CCmdUI* pCmdUI);
afx_msg void OnUpdateTrackStop(CCmdUI* pCmdUI);
afx_msg void OnRButtonDown(UINT nFlags, CPoint point);
afx_msg BOOL OnEraseBkgnd(CDC* pDC);
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
#ifndef _DEBUG // debug version in 圖像特征跟蹤系統View.cpp
inline CMyDoc* CMyView::GetDocument()
{ return (CMyDoc*)m_pDocument; }
#endif
/////////////////////////////////////////////////////////////////////////////
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_VIEW_H__916AF838_5C47_4452_8D95_D03FB1E4F4DB__INCLUDED_)
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -