FaceMFC_v1Dlg.h
上传用户:xiaoge123
上传日期:2022-08-05
资源大小:5794k
文件大小:4k
- // FaceMFC_v1Dlg.h : header file
- //
- #include "cv.h"
- #include "highgui.h"
- #include <vector>
- using namespace std;
- #if !defined(AFX_FACEMFC_V1DLG_H__09F97E5F_AC61_40F1_ACA5_E94C19C4A25A__INCLUDED_)
- #define AFX_FACEMFC_V1DLG_H__09F97E5F_AC61_40F1_ACA5_E94C19C4A25A__INCLUDED_
- #if _MSC_VER > 1000
- #pragma once
- #endif // _MSC_VER > 1000
- /////////////////////////////////////////////////////////////////////////////
- // CFaceMFC_v1Dlg dialog
- void ThreadFunc();
- class CFaceMFC_v1Dlg : public CDialog
- {
- // Construction
- public:
- void merge();
- void Seperator();
- int frame_time[6];
- IplImage* ImgFaceResult[12];
- IplImage* ImgFaceTemp[6];
- //IplImage* ImgFaceResult[12];
- int FaceRecgnition(IplImage* img,CvHaarClassifierCascade* cascade,vector<CvRect *> &faceposition);
- void Findneighbors(vector<double> v,int n,vector<int> &frontposition);
- int FindSmallest(vector<double> v,double &smallest);
- void MatSVD(CvMat *src,CvMat *dst,double &scale);
- void Do2DPCA(IplImage *face);
- IplImage* ImgData;
- IplImage* FaceSel[6];//保存六个人脸的灰度图,用于单选按钮部分
- IplImage* FaceToSel;
- char* cascade_name;
- int FaceNum;
- void DrawPicToHDC(IplImage *img, UINT ID);
- int detect_and_draw(IplImage *img, CvHaarClassifierCascade *cascade);
- void CFaceMFC_v1Dlg::CreatMask(CvMat* Mask,double r);
- IplImage* img_face[6];
- CvHaarClassifierCascade* cascade;
- IplImage* mImg;
- int m_Facesel;
- int startframe,overframe;
- int hour[2],minute[2],second[2];
- double framerate;
- int numFrames;
- CFaceMFC_v1Dlg(CWnd* pParent = NULL); // standard constructor
- // Dialog Data
- //{{AFX_DATA(CFaceMFC_v1Dlg)
- enum { IDD = IDD_FACEMFC_V1_DIALOG };
- CStatic m_totaltime;
- CStatic m_timedown;
- CStatic m_timeup;
- int m_framestep;
- //}}AFX_DATA
- // ClassWizard generated virtual function overrides
- //{{AFX_VIRTUAL(CFaceMFC_v1Dlg)
- protected:
- virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
- //}}AFX_VIRTUAL
- // Implementation
- protected:
- CPoint temp_p1;
- CPoint temp_p2;
- CPoint temp_p3;
- int m_iIsDraging;
- IplImage* ImgReload;
- int rectheight;
- int rectwidth;
- int imgheight;
- int imgwidth;
- CPoint m_p1;
- CPoint m_p2;
- int m_height;
- int m_width;
- BOOL m_bIsDraging;
- //BOOL m_bDrawed;
- CRect m_MouseRect;
- CRect m_InfoRect;//确定弹出软件信息的鼠标活动区域
- int aimframe;
- HICON m_hIcon;
- DWORD ThreadID;
- HANDLE hThread;
- IplImage* ImgTemp;
- // Generated message map functions
- //{{AFX_MSG(CFaceMFC_v1Dlg)
- virtual BOOL OnInitDialog();
- afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
- afx_msg void OnPaint();
- afx_msg HCURSOR OnQueryDragIcon();
- afx_msg void OnOpenimage();
- afx_msg void OnFacedetect();
- afx_msg void OnRadioface1();
- afx_msg void OnRadioface2();
- afx_msg void OnRadioface3();
- afx_msg void OnRadioface4();
- afx_msg void OnRadioface5();
- afx_msg void OnRadioface6();
- afx_msg void OnOpenvideo();
- afx_msg void OnReload();
- afx_msg void OnPlayPause();
- afx_msg void OnCustomdrawSlider(NMHDR* pNMHDR, LRESULT* pResult);
- afx_msg void OnTimestart();
- afx_msg void OnTimeover();
- afx_msg void OnKillfocusEditStep();
- afx_msg void OnFaceretrieval();
- afx_msg void OnDown();
- afx_msg void OnUp();
- afx_msg void OnFollow();
- afx_msg void OnRadioresult1();
- afx_msg void OnRadioresult2();
- afx_msg void OnRadioresult3();
- afx_msg void OnRadioresult4();
- afx_msg void OnRadioresult5();
- afx_msg void OnRadioresult6();
- afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
- afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
- afx_msg void OnMouseMove(UINT nFlags, CPoint point);
- afx_msg void OnRButtonDown(UINT nFlags, CPoint point);
- afx_msg void OnImageinfo();
- afx_msg void OnVideoinfo();
- afx_msg void OnInfo();
- //}}AFX_MSG
- DECLARE_MESSAGE_MAP()
- };
- //{{AFX_INSERT_LOCATION}}
- // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
- #endif // !defined(AFX_FACEMFC_V1DLG_H__09F97E5F_AC61_40F1_ACA5_E94C19C4A25A__INCLUDED_)