StereoPlusDlg.h
资源名称:estereo2.zip [点击查看]
上传用户:fengshi120
上传日期:2014-07-17
资源大小:6155k
文件大小:3k
源码类别:
3D图形编程
开发平台:
C/C++
- // StereoPlusDlg.h : header file
- //
- #pragma once
- #include "StereoMatching.h"
- #include <gdiplus.h>
- #include "ControlGroup.h"
- #include "afxwin.h"
- // CStereoPlusDlg dialog
- class CStereoPlusDlg : public CDialog
- {
- // Construction
- public:
- CStereoPlusDlg(CWnd* pParent = NULL); // standard constructor
- CStereoPlusDlg::~CStereoPlusDlg();
- bool m_bClosing;
- // Dialog Data
- enum { IDD = IDD_STEREOPLUS_DIALOG };
- protected:
- virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
- CControlGroup m_SADControls;
- CString m_strLeftImagePath;
- CString m_strRightImagePath;
- CString m_strImagePairPath;
- // image pre-processing
- void ResampleBitmap(Bitmap *&pBitmap,UINT iNewWidth);
- void SwapImages(void);
- BOOL m_bResample;
- BOOL m_bImagesAreSwapped;
- Bitmap* m_pLeftImageBitmap;
- Bitmap* m_pRightImageBitmap;
- Bitmap* m_pDisparityBitmap;
- BYTE* m_pLeftBitmapData;
- BYTE* m_pRightBitmapData;
- float m_fFocalLength;
- float m_fBaseLine;
- //David's stuff
- Reconst3D m_Reconst3d; // 3d reconstruction module, etc...
- StereoImage m_StereoData; // disparity, subpixel, etc...
- ReconstPoints3D* m_pPts3d; // 3d reconstruction
- StereoMatching* m_pStereoContext;
- bool Save3DReconst(CString filename);
- void estereo_process(StereoMatching* stereo, bool propag_stereo,StereoImage* simage,
- const char* imLeft, const char* imRight,
- int width, int height, int xOffset, int yOffset);
- void InitStereoContext();
- void ComputeStereo(void);
- ////
- bool m_bNewFilesLoaded;
- BYTE* GetGrayScaleData(Bitmap* pBitmap);
- void DrawBitmap(UINT idWindow,Bitmap *pBitmap);
- bool m_bSizeChanged;
- void ArrangeControls(void);
- bool m_bGreyScaleDataLoaded;
- float m_fExtentX;
- float m_fExtentZ;
- // Implementation
- protected:
- HICON m_hIcon;
- void GroupControl(UINT idFrame,UINT idControl);
- // Generated message map functions
- virtual BOOL OnInitDialog();
- afx_msg void OnPaint();
- afx_msg HCURSOR OnQueryDragIcon();
- DECLARE_MESSAGE_MAP()
- public:
- afx_msg void OnBnClickedButtonLoadLeft();
- afx_msg void OnDestroy();
- afx_msg void OnSize(UINT nType, int cx, int cy);
- afx_msg void OnBnClickedButtonLoadRight();
- afx_msg void OnBnClickedButtonLoadPair();
- afx_msg void OnBnClickedButtonDoStereo();
- afx_msg void OnDeltaposSpinDisparityrange(NMHDR *pNMHDR, LRESULT *pResult);
- afx_msg void OnDeltaposSpinHoropter(NMHDR *pNMHDR, LRESULT *pResult);
- afx_msg void OnDeltaposSpinCorrwinsize(NMHDR *pNMHDR, LRESULT *pResult);
- afx_msg void OnDeltaposSpinSadthresh(NMHDR *pNMHDR, LRESULT *pResult);
- afx_msg void OnDeltaposSpinDisparityscale(NMHDR *pNMHDR, LRESULT *pResult);
- afx_msg void OnBnClickedCheckStereoPropagation();
- int m_iDisparityRange;
- int m_iHoropter;
- int m_iCorrelationWindow;
- int m_iSADThreshold;
- int m_iDisparityImageScale;
- BOOL m_bPropagateStereo;
- afx_msg void OnClose();
- afx_msg void OnBnClickedButtonDoReconstructionDirectx();
- BOOL m_bSwapLeftRight;
- afx_msg void OnBnClickedCheckSwap();
- CButton m_ctrlCheckSwapLeftRight;
- CButton m_ctrlResampleImages;
- int m_iImageResampleWidth;
- int m_iImageXTranslation; // translate image
- int m_iImageYTranslation; // translate image
- afx_msg void OnBnClickedCheckResample();
- CEdit m_ctrlEditResampleWidth;
- afx_msg void OnDeltaposSpinXtranslate(NMHDR *pNMHDR, LRESULT *pResult);
- afx_msg void OnDeltaposSpinYtranslate(NMHDR *pNMHDR, LRESULT *pResult);
- afx_msg void OnBnClickedButtonSavedisparity();
- };