// 人脸识别考勤软件Dlg.cpp : 实现文件
//
include “stdafx.h”
include “afxwin.h”
include “人脸识别考勤软件.h”
include “人脸识别考勤软件Dlg.h”
include “afxdialogex.h”
include “resource.h”
ifdef _DEBUG
define new DEBUG_NEW
endif
include “opencv2/objdetect/objdetect.hpp”
include “opencv2/highgui/highgui.hpp”
include “opencv2/imgproc/imgproc.hpp”
include
include
include
include “highgui.h”
include
include
// 用于应用程序“关于”菜单项的 CAboutDlg 对话框
using namespace std;
using namespace cv;
Mat image2, frame;
std::vector faces;
CascadeClassifier face_cascade;
Ptr modelPCA = createEigenFaceRecognizer();
VideoCapture capture;
double fx, fy, fw, fh;
int predictFisher, predictPCA, predictLBP;
COLORREF m_bkcolor1 RGB(207, 210, 210), m_bkcolor2 RGB(207, 210, 210), m_bkcolor3 RGB(207, 210, 210), m_bkcolor4 RGB(207, 210, 210), m_bkcolor5 RGB(207, 210, 210), m_bkcolor6 RGB(207, 210, 210), m_bkcolor7 RGB(207, 210, 210), m_bkcolor8 RGB(207, 210, 210);
void detectAndDisplay(Mat frame);
String face_cascade_name = “haarcascade_frontalface_alt.xml”;
class CAboutDlg : public CDialogEx
{
public:
CAboutDlg();
// 对话框数据
enum { IDD = IDD_ABOUTBOX };
pro