-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathFaceDetectDlg.h
More file actions
133 lines (114 loc) · 3.43 KB
/
FaceDetectDlg.h
File metadata and controls
133 lines (114 loc) · 3.43 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
// FaceDetectDlg.h : header file
//
#ifndef __FACEDETECTDLG_H
#define __FACEDETECTDLG_H
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include "Dib.h"
#include "LikelyHood.h"
#include "HairFace.h"
#include <afxtempl.h>
#include <math.h>
/////////////////////////////////////////////////////////////////////////////
// CFaceDetectDlg dialog
class CFaceDetectDlg : public CDialog
{
// Construction
public:
CFaceDetectDlg(CWnd* pParent = NULL); // standard constructor
//公共变量
public:
void MyDraw();
void DoLOG(int left,int right,int top,int bottom,RGBQUAD** source,RGBQUAD** target);
void SetPixelArray(RGBQUAD** target,int Val);
void LoadOriPixel(CDib* pDib);
void MakeBitMap();
bool CopyBitMap(RGBQUAD** dest,RGBQUAD** source);
void DrawCross(CDC* pDC,CPoint point,COLORREF crColor);
CDC *pDCShow;//用来画图的区域
CDib *m_pMainDib;//位图
RGBQUAD** m_tOriPixelArray;//原始位图数据
RGBQUAD** m_tResPixelArray;//参考位图数据
CBitmap* m_pResMap;
int m_nWndWidth;//图像宽度
int m_nWndHeight;//图像高度
CString m_sFileName;//位图名称
bool m_bFaceOK;//脸部已经确定标志位
bool m_bShowFace;
CRect m_rFaceRegion;//脸部区域
bool m_bSelectByMan;
bool m_bLBottonDown;
int m_ManLeft;
int m_ManRight;
int m_ManTop;
int m_ManBottom;
//下面是一些标志位
bool m_bManualMarkFacial;
bool m_bLeftEyeOK;//左眼确定标志位
bool m_bRightEyeOK;//右眼确定标志位
bool m_bLeftEyeLeftCornerOK;//左眼左角
bool m_bLeftEyeRightCornerOK;//左眼右角
bool m_bRightEyeLeftCornerOK;//右眼左角
bool m_bRightEyeRightCornerOK;//右眼右角
bool m_bLeftNostrilOK;//左鼻角
bool m_bRightNostrilOK;//右鼻角
bool m_bLeftMouthCornerOK;//左嘴角
bool m_bRightMouthCornerOK;//右嘴角
bool m_bMidMouthOK;//嘴中部
bool m_bMidNoseOK;//鼻尖
//下面是上那些特征点的位置
CPoint m_LeftEye;
CPoint m_LeftEyeLeftCorner;
CPoint m_LeftEyeRightCorner;
CPoint m_RightEye;
CPoint m_RightEyeLeftCorner;
CPoint m_RightEyeRightCorner;
CPoint m_LeftNostril;
CPoint m_RightNostril;
CPoint m_LeftMouthCorner;
CPoint m_RightMouthCorner;
CPoint m_MidMouth;
CPoint m_MidNose;
//两种方法
CLikelyHood *method1;
CHairFace *method2;
// Dialog Data
//{{AFX_DATA(CFaceDetectDlg)
enum { IDD = IDD_FACEDETECT_DIALOG };
// NOTE: the ClassWizard will add data members here
//}}AFX_DATA
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CFaceDetectDlg)
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
//}}AFX_VIRTUAL
// Implementation
protected:
HICON m_hIcon;
// Generated message map functions
//{{AFX_MSG(CFaceDetectDlg)
virtual BOOL OnInitDialog();
afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
afx_msg void OnPaint();
afx_msg HCURSOR OnQueryDragIcon();
afx_msg void OnBtnBinary();
afx_msg void OnBtnEdge();
afx_msg void OnBtnFacehair();
afx_msg void OnBtnHistogramFace();
afx_msg void OnBtnHistogramH();
afx_msg void OnBtnHistogramHair();
afx_msg void OnBtnHistogramV();
afx_msg void OnBtnLikehood();
afx_msg void OnBtnMarkEye();
afx_msg void OnBtnMarkFace1();
afx_msg void OnBtnMarkFace2();
afx_msg void OnBtnMarkMouse();
afx_msg void OnBtnMarkNose();
afx_msg void OnBtnOpenfile();
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // #ifndef __FACEDETECTDLG_H