- // test2eyesDlg.h : 头文件
- //
- /* the maximum number of keypoint NN candidates to check during BBF search */
- #include "afxcmn.h"
- #include "cxtypes.h"
- #define KDTREE_BBF_MAX_NN_CHKS 200
- /* threshold on squared ratio of distances between NN and 2nd NN */
- #define NN_SQ_DIST_RATIO_THR 0.49
- #pragma once
- typedef struct _BufStruct
- {
- UINT size;
- UCHAR buf[200*1024];
- }BufStruct,*PBufStruct;
- // Ctest2eyesDlg 对话框
- class Ctest2eyesDlg : public CDialog
- {
- // 构造
- public:
- Ctest2eyesDlg(CWnd* pParent = NULL); // 标准构造函数
- virtual ~Ctest2eyesDlg(); // 标准构造函数
- // 对话框数据
- enum { IDD = IDD_TEST2EYES_DIALOG };
- protected:
- virtual void DoDataExchange(CDataExchange* pDX);// DDX/DDV 支持
- void SaveBitmap(BYTE * recvImageBufR, long recvBytePointerR );
- // 实现
- protected:
- HICON m_hIcon;
- // 生成的消息映射函数
- virtual BOOL OnInitDialog();
- afx_msg void OnPaint();
- afx_msg HCURSOR OnQueryDragIcon();
- DECLARE_MESSAGE_MAP()
- public:
- struct des
- {
- int x;
- int y;
- int s;
- int lx;
- int ly;
- int rx;
- int ry;
- int L_des;
- };
- IplImage* img1, * img2;
- struct feature* feat1, * feat2;
- struct kd_node* kd_root;
- public:
- afx_msg void OnBnClickedOk();
- afx_msg void OnEnChangeEdit1();
- // BOOL PlaySound(LPCSTR pszSound, HMODULE hmod,DWORD fdwSound);
- public:
- CSliderCtrl m_slider;
- void test_SIFT();
- void Yu_Zhi();
- CEdit * m_sj;
- CEdit * m_jj;
- CEdit * m_min;
- CEdit * m_max;
- CEdit * m_lip;
- CEdit * m_rip;
- int m_pos;
- IplImage* stacked;
- struct des m_ju[1000];
- struct des m_out_ju[1000];
- int m_ju_k;
- BOOL m_yu_zhi_enable;
- public:
- BufStruct imageBufL;
- BufStruct imageBufR;
- UINT recvBytePointerR;
- UINT recvBytePointerL;
- UCHAR recvImageBufR[100*1024];
- UCHAR recvImageBufL[100*1024];
- bool f_MutexImageBufR;
- bool f_MutexImageBufL;
- public:
- afx_msg void OnNMReleasedcaptureSlider1(NMHDR *pNMHDR, LRESULT *pResult);
- public:
- afx_msg void OnBnClickedButton1();
- CBrush m_BMPDisplayBrush;
- CBitmap m_BMP_OK;
- CBitmap m_BMP_NG;
- CBitmap m_BMP_WAIT;
- CRect m_BMPDisplayRect;
- void ShowICON(int nicon = 0);
- public:
- afx_msg void OnTimer(UINT_PTR nIDEvent);
- public:
- afx_msg HBRUSH OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor);
- public:
- afx_msg void OnBnClickedCancel();
- BOOL m_RightReceived;
- BOOL m_LeftReceived;
- BOOL m_processing;
- BOOL m_ThreadExit;
- };
- #define F_RECEIVE_NOWORKL 2
- #define F_RECEIVE_BEGINL 3
- #define F_RECEIVEL 4
- #define F_RECEIVE_OVER_L 5
- #define F_RECEIVE_NOWORKR 2
- #define F_RECEIVE_BEGINR 3
- #define F_RECEIVE_R 4
- #define F_RECEIVE_OVERR 5
- #define RECV_BUF_SIZE 1024
- #define MUTEX_USE 1
- #define MUTEX_NONUSE 0
- static UINT ThreadL( LPVOID p);
- static UINT ThreadR( LPVOID g);