资源简介
eyelike的windows版本,VS2010工程,依赖OpenCV2.4.11。
配套博客链接:https://blog.csdn.net/chaipp0607/article/details/79935302

代码片段和文件信息
#include “opencv2/objdetect/objdetect.hpp“
#include “opencv2/highgui/highgui.hpp“
#include “opencv2/imgproc/imgproc.hpp“
//#include
#include
#include
#include
#include
#include “constants.h“
#include “helpers.h“
using namespace std;
using namespace cv;
// Pre-declarations
cv::Mat floodKillEdges(cv::Mat &mat);
#pragma mark Visualization
/*
template mglData *matToData(const cv::Mat &mat) {
mglData *data = new mglData(mat.colsmat.rows);
for (int y = 0; y < mat.rows; ++y) {
const T *Mr = mat.ptr(y);
for (int x = 0; x < mat.cols; ++x) {
data->Put(((mreal)Mr[x])xy);
}
}
return data;
}
void plotVecField(const cv::Mat &gradientX const cv::Mat &gradientY const cv::Mat &img) {
mglData *xData = matToData(gradientX);
mglData *yData = matToData(gradientY);
mglData *imgData = matToData(img);
mglGraph gr(0gradientX.cols * 20 gradientY.rows * 20);
gr.Vect(*xData *yData);
gr.Mesh(*imgData);
gr.Writeframe(“vecField.png“);
delete xData;
delete yData;
delete imgData;
}*/
#pragma mark Helpers
int round(double r)
{
return (r > 0.0) ? floor(r + 0.5) : ceil(r - 0.5);
}
cv::Point unscalePoint(cv::Point p cv::Rect origSize) {
float ratio = (((float)kFastEyeWidth)/origSize.width);
int x = round(p.x / ratio);
int y = round(p.y / ratio);
return cv::Point(xy);
}
void scaleToFastSize(const cv::Mat &srccv::Mat &dst) {
cv::resize(src dst cv::Size(kFastEyeWidth(((float)kFastEyeWidth)/src.cols) * src.rows));
}
cv::Mat computeMatXGradient(const cv::Mat &mat) {
cv::Mat out(mat.rowsmat.colsCV_64F);
for (int y = 0; y < mat.rows; ++y) {
const uchar *Mr = mat.ptr(y);
double *Or = out.ptr(y);
Or[0] = Mr[1] - Mr[0];
for (int x = 1; x < mat.cols - 1; ++x) {
Or[x] = (Mr[x+1] - Mr[x-1])/2.0;
}
Or[mat.cols-1] = Mr[mat.cols-1] - Mr[mat.cols-2];
}
return out;
}
#pragma mark Main Algorithm
void testPossibleCentersFormula(int x int y const cv::Mat &weightdouble gx double gy cv::Mat &out) {
// for all possible centers
for (int cy = 0; cy < out.rows; ++cy) {
double *Or = out.ptr(cy);
const unsigned char *Wr = weight.ptr(cy);
for (int cx = 0; cx < out.cols; ++cx) {
if (x == cx && y == cy) {
continue;
}
// create a vector from the possible center to the gradient origin
double dx = x - cx;
double dy = y - cy;
// normalize d
double magnitude = sqrt((dx * dx) + (dy * dy));
dx = dx / magnitude;
dy = dy / magnitude;
double dotProduct = dx*gx + dy*gy;
dotProduct = std::max(0.0dotProduct);
// square and multiply by the weight
if (kEnableWeight) {
Or[cx] += dotProduct * dotProduct * (Wr[cx]/kWeightDivisor);
} else {
Or[cx] += dotProduct * dotProduct;
}
}
}
}
cv::Point findEyeCenter(cv::Mat face cv::R
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 136704 2018-04-13 21:09 eyelike1.0\Debug\main.exe
文件 2038180 2018-04-13 21:09 eyelike1.0\Debug\main.ilk
文件 1936384 2018-04-13 21:09 eyelike1.0\Debug\main.pdb
文件 47906816 2018-04-14 14:54 eyelike1.0\ipch\main-e69ee443\main-62bed6b1.ipch
文件 685 2017-10-17 01:07 eyelike1.0\main\constants.h
文件 10510 2018-04-13 21:09 eyelike1.0\main\Debug\cl.command.1.tlog
文件 89002 2018-04-13 21:09 eyelike1.0\main\Debug\CL.read.1.tlog
文件 6528 2018-04-13 21:09 eyelike1.0\main\Debug\CL.write.1.tlog
文件 267423 2018-04-13 21:09 eyelike1.0\main\Debug\findEyeCenter.obj
文件 143049 2018-04-13 21:09 eyelike1.0\main\Debug\findEyeCorner.obj
文件 139689 2018-04-13 21:09 eyelike1.0\main\Debug\helpers.obj
文件 2 2018-04-13 21:09 eyelike1.0\main\Debug\li
文件 2 2018-04-13 21:09 eyelike1.0\main\Debug\li
文件 2 2018-04-13 21:09 eyelike1.0\main\Debug\li
文件 2 2018-04-13 21:09 eyelike1.0\main\Debug\li
文件 2 2018-04-13 21:09 eyelike1.0\main\Debug\li
文件 2 2018-04-13 21:09 eyelike1.0\main\Debug\li
文件 9598 2018-04-13 21:09 eyelike1.0\main\Debug\li
文件 18796 2018-04-13 21:09 eyelike1.0\main\Debug\li
文件 3542 2018-04-13 21:09 eyelike1.0\main\Debug\li
文件 406 2018-03-31 14:08 eyelike1.0\main\Debug\main.exe.em
文件 472 2018-04-13 21:09 eyelike1.0\main\Debug\main.exe.em
文件 381 2018-04-13 21:09 eyelike1.0\main\Debug\main.exe.intermediate.manifest
文件 73 2018-04-14 15:45 eyelike1.0\main\Debug\main.lastbuildstate
文件 873 2018-04-14 15:45 eyelike1.0\main\Debug\main.log
文件 315762 2018-04-13 21:09 eyelike1.0\main\Debug\main.obj
文件 713 2018-03-31 13:52 eyelike1.0\main\Debug\main.vcxprojResolveAssemblyReference.cache
文件 0 2018-03-31 13:52 eyelike1.0\main\Debug\main.write.1.tlog
文件 198 2018-03-31 14:08 eyelike1.0\main\Debug\main_manifest.rc
文件 1116 2018-04-13 21:09 eyelike1.0\main\Debug\mt.command.1.tlog
............此处省略29个文件信息
相关资源
- 论文研究-基于肤色和AdaBoost算法的彩
- Emgu.CV 打开视频与人脸检测
- iOS平台下人脸识别系统实现研究
- 基于PCA的人脸识别技术的研究
- 基于多任务卷积网络(MTCNN)和Cente
- 人脸数据库(人脸检测,人脸识别)
- 基于WebCam的人脸检测技术的设计与实
- 人脸检测特征数据.rar
- 一套 MIT 的人脸训练样本库
- 比opencv还牛的,免费、高效的人脸检
- 人脸检测的论文
- 人脸检测的代码
- 基于opencv实现的人脸识别程序,需要
- 2017年人脸检测、人脸对齐、人脸识别
- 在Yale 人脸库上运用PCA+SVM的方法实现
- 用于人脸检测的一些标准人脸图库
- 基于opencv的人脸检测
- 人脸检测、人脸正负样本库
- haar+Adaboost人脸检测viola-jones人脸检测
- ORL人脸数据集
- 基于opencv接口的深度学习人脸检测代
- 基于Adaboost算法的人脸检测
- 人脸检测并保存人脸图像
- 基于Adaboost算法的人脸检测研究
- 基于AdaBoost的人脸检测改进算法
- 人脸检测综述
- opencv人脸检测训练用到的正样本图像
- 基于AdaBoost算法的人脸检测系统设计
- 利用OpenCV在VS2015平台下对进行人脸识
- cmu + mit 人脸测试集-旋转测试集
评论
共有 条评论