人脸椭圆的参数是怎么定的?

来源:百度知道 编辑:UC知道 时间:2024/07/07 12:32:31
//对人脸的勾勒(椭圆)
void DIB::EllipseFace(HANDLE hDIB, CPoint mouth, CPoint eye1, CPoint eye2)
{
LPBYTE lpData;
LPBITMAPINFOHEADER lpbi;
int width;
int height;
WORD wBytesPerLine;
long lOffset;

//得到图象的基本信息
lpbi = (LPBITMAPINFOHEADER)GlobalLock(hDIB);
height = lpbi->biHeight;
width = lpbi->biWidth;
lpData = this->FindDIBBits(hDIB);
wBytesPerLine = this->BytePerLine(hDIB);

//用dda算法画三角形
this->DdaLine(mouth,eye1,lpData,wBytesPerLine);
this->DdaLine(mouth,eye2,lpData,wBytesPerLine);
this->DdaLine(eye1,eye2,lpData,wBytesPerLine);

//椭圆的中心点和两个焦点坐标
int ellipsecenter_x;
int ellipsecenter_y;
int ellipseFocusTop_x;
int ellipseFocusTop_y;
int ellipseFocusBottom_x;
int ellipseFocusBottom_y;

//根据眼睛和嘴巴的坐标计算椭圆的中心点坐标
ellipsecenter_x = (eye1.x + eye2.x + mouth.x )/3;
ellipsecenter_y = (eye1.y + eye2.

没收到吗?
算了我直接把那个PDF文档地址发给你吧

http://www.cis.pku.edu.cn/vision/Visual&Robot/publication/doc/thesis/Face%20Detection%20Based%20on%20AdaBoost%20-%20ZhaoNan.pdf

你下下来参考下吧