matcherDoc.h
上传用户:quan1896
上传日期:2013-04-17
资源大小:94k
文件大小:4k
源码类别:

2D图形编程

开发平台:

Visual C++

  1. // matcherDoc.h : interface of the CMatcherDoc class
  2. //
  3. /////////////////////////////////////////////////////////////////////////////
  4. #if !defined(AFX_MATCHERDOC_H__A7A22240_C581_4664_A129_9ABB7CC35D5C__INCLUDED_)
  5. #define AFX_MATCHERDOC_H__A7A22240_C581_4664_A129_9ABB7CC35D5C__INCLUDED_
  6. #if _MSC_VER > 1000
  7. #pragma once
  8. #endif // _MSC_VER > 1000
  9. #include "MyOpenCV.h"
  10. #include "OpenImgDLG.h"
  11. #include "CorParDLG.h"
  12. #include "MatParDLG.h"
  13. #include "ManDelSet.h"
  14. #include "MainFrm.h"
  15. #define MAXFEATURES 5000
  16. class CMatcherDoc : public CDocument
  17. {
  18. protected: // create from serialization only
  19. CMatcherDoc();
  20. DECLARE_DYNCREATE(CMatcherDoc)
  21. // Attributes
  22. public:
  23. CMainFrame* pFrame;//主框架窗口指针
  24. IplImage* m_image1;//显示接口指针
  25. IplImage* m_image2;//显示接口指针
  26. IplImage* srcImg1;
  27. IplImage* srcImg2;
  28. IplImage* grayImg1;
  29. IplImage* grayImg2;
  30. IplImage* smoothImg1;
  31. IplImage* smoothImg2;
  32. IplImage* showImg1;
  33. IplImage* showImg2;
  34. CvSize m_imgsize1,m_imgsize2;
  35. BOOL IMG1OPEN,IMG2OPEN;
  36. BOOL CORNERDONE;
  37. BOOL INIMATCHDONE;
  38. BOOL RANSACDONE;
  39. BOOL GUIMATDONE;
  40. BOOL ENMANUALDEL;
  41. //角点检测
  42. CvPoint2D32f corners1[MAXFEATURES];
  43. CvPoint2D32f corners2[MAXFEATURES];
  44. int cornerCount;
  45. //匹配
  46. int nImatches;//初始匹配点对
  47. CvPoint2D32f Imatches1[MAXFEATURES];
  48. CvPoint2D32f Imatches2[MAXFEATURES];
  49. int nFmatches;//RANSAC后的匹配点对
  50. CvPoint2D32f Fmatches1[MAXFEATURES];
  51. CvPoint2D32f Fmatches2[MAXFEATURES];
  52. int nGmatches;//引导匹配点对
  53. CvPoint2D32f Gmatches1[MAXFEATURES];
  54. CvPoint2D32f Gmatches2[MAXFEATURES];
  55. float F[9];//基本矩阵
  56. protected:
  57. COpenImgDLG dlgopenImg;//打开图像对话框
  58. CCorParDLG CorParPage;//角点参数属性框
  59. CMatParDLG MatParPage;//匹配参数属性框
  60. public:
  61. CManDelSet ManParPage;//手工添加删除参数属性框
  62. private:
  63. //角点检测
  64. int minDistance;
  65. double minCorLevel;
  66. //匹配
  67. int max_disparity;
  68. int patch_radius;
  69. double max_epidistance;
  70. //set check box
  71. BOOL SHOWCORNER;
  72. BOOL SHOWINIMAT1;
  73. BOOL SHOWINIMAT2;
  74. BOOL SHOWFINMAT;
  75. BOOL SHOWGUIMAT;
  76. BOOL SHOWEPILINE;
  77. //another
  78. COLORREF crTextColor1,crTextColor2;
  79. // Operations
  80. public:
  81. // Overrides
  82. // ClassWizard generated virtual function overrides
  83. //{{AFX_VIRTUAL(CMatcherDoc)
  84. public:
  85. virtual BOOL OnNewDocument();
  86. virtual void Serialize(CArchive& ar);
  87. //}}AFX_VIRTUAL
  88. // Implementation
  89. public:
  90. virtual ~CMatcherDoc();
  91. #ifdef _DEBUG
  92. virtual void AssertValid() const;
  93. virtual void Dump(CDumpContext& dc) const;
  94. #endif
  95. // Generated message map functions
  96. protected:
  97. //{{AFX_MSG(CMatcherDoc)
  98. afx_msg void OnFileOpen();
  99. afx_msg void OnFindcorner();
  100. afx_msg void OnParameter();
  101. afx_msg void OnInimatch();
  102. afx_msg void OnRansac();
  103. afx_msg void OnShowcorner();
  104. afx_msg void OnShowinimat1();
  105. afx_msg void OnShowinimat2();
  106. afx_msg void OnShowepiline();
  107. afx_msg void OnFinmatches();
  108. afx_msg void OnShowguimat();
  109. afx_msg void OnUpdateShowcorner(CCmdUI* pCmdUI);
  110. afx_msg void OnUpdateShowinimat1(CCmdUI* pCmdUI);
  111. afx_msg void OnUpdateShowinimat2(CCmdUI* pCmdUI);
  112. afx_msg void OnUpdateFinmatches(CCmdUI* pCmdUI);
  113. afx_msg void OnUpdateShowepiline(CCmdUI* pCmdUI);
  114. afx_msg void OnGuimatch();
  115. afx_msg void OnUpdateShowguimat(CCmdUI* pCmdUI);
  116. afx_msg void OnMenualdelte();
  117. afx_msg void OnUpdateMenualdelte(CCmdUI* pCmdUI);
  118. afx_msg void OnHdelete();
  119. afx_msg void OnFileSave();
  120. //}}AFX_MSG
  121. DECLARE_MESSAGE_MAP()
  122. };
  123. /////////////////////////////////////////////////////////////////////////////
  124. //{{AFX_INSERT_LOCATION}}
  125. // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
  126. #endif // !defined(AFX_MATCHERDOC_H__A7A22240_C581_4664_A129_9ABB7CC35D5C__INCLUDED_)