⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 facelocator.h

📁 face detection Face detection can be regarded as a more general case of face localization In face
💻 H
字号:
// FaceDetection.h
#pragma once
#pragma managed 
#include "ObjectLocator.h"
#include <stdio.h>
#include < vcclr.h >
#define MAXEYERAD 100
#define MINEYERAD 10

static int InitFlag = 0;
static int lastHeight, lastWidth;

#pragma managed 
__gc class FaceLocator
	{
		// TODO: Add your methods for this class here.	
	private:		
		ObjectLocator* FaceDetector;
		ObjectLocator* LeftEyeDetector;		
		ObjectLocator* RightEyeDetector;		
	
		static System::String * FaceCascade  = "\\Cascades\\haarcascade_frontalface_alt.xml";
		static System::String * RightEyeCascade  = "\\Cascades\\ojoD.xml";
		static System::String * LeftEyeCascade  = "\\Cascades\\ojoI.xml";
		void InitCascades();
		int faceMode;
	
	public:	
		FaceLocator(void);	
		~FaceLocator(void);

		int DetectFaces(IplImage* ImageData);			
		int GetFaceCordinates(int index, int &lx, int &ly, int &rx, int &ry);	
		int GetEyeCordinates(int index, int &lx, int &ly, int &rx, int &ry);
	};

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -