资源简介
opencv版本较老,本程序中,利用了LBP特征对人脸特征进行提取,并且利用SVM对提取的人脸特征进行训练和识别;;
代码片段和文件信息
#include “StdAfx.h“
#include “CvvImage.h“
//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////
CV_INLINE RECT NormalizeRect( RECT r );
CV_INLINE RECT NormalizeRect( RECT r )
{
int t;
if( r.left > r.right )
{
t = r.left;
r.left = r.right;
r.right = t;
}
if( r.top > r.bottom )
{
t = r.top;
r.top = r.bottom;
r.bottom = t;
}
return r;
}
CV_INLINE CvRect RectToCvRect( RECT sr );
CV_INLINE CvRect RectToCvRect( RECT sr )
{
sr = NormalizeRect( sr );
return cvRect( sr.left sr.top sr.right - sr.left sr.bottom - sr.top );
}
CV_INLINE RECT CvRectToRect( CvRect sr );
CV_INLINE RECT CvRectToRect( CvRect sr )
{
RECT dr;
dr.left = sr.x;
dr.top = sr.y;
dr.right = sr.x + sr.width;
dr.bottom = sr.y + sr.height;
return dr;
}
CV_INLINE IplROI RectToROI( RECT r );
CV_INLINE IplROI RectToROI( RECT r )
{
IplROI roi;
r = NormalizeRect( r );
roi.xOffset = r.left;
roi.yOffset = r.top;
roi.width = r.right - r.left;
roi.height = r.bottom - r.top;
roi.coi = 0;
return roi;
}
void FillBitmapInfo( BITMAPINFO* bmi int width int height int bpp int origin )
{
assert( bmi && width >= 0 && height >= 0 && (bpp == 8 || bpp == 24 || bpp == 32));
BITMAPINFOHEADER* bmih = &(bmi->bmiHeader);
memset( bmih 0 sizeof(*bmih));
bmih->biSize = sizeof(BITMAPINFOHEADER);
bmih->biWidth = width;
bmih->biHeight = origin ? abs(height) : -abs(height);
bmih->biPlanes = 1;
bmih->biBitCount = (unsigned short)bpp;
bmih->biCompression = BI_RGB;
if( bpp == 8 )
{
RGBQUAD* palette = bmi->bmiColors;
int i;
for( i = 0; i < 256; i++ )
{
palette[i].rgbBlue = palette[i].rgbGreen = palette[i].rgbRed = (BYTE)i;
palette[i].rgbReserved = 0;
}
}
}
CvvImage::CvvImage()
{
m_img = 0;
}
void CvvImage::Destroy()
{
cvReleaseImage( &m_img );
}
CvvImage::~CvvImage()
{
Destroy();
}
bool CvvImage::Create( int w int h int bpp int origin )
{
const unsigned max_img_size = 10000;
if( (bpp != 8 && bpp != 24 && bpp != 32) ||
(unsigned)w >= max_img_size || (unsigned)h >= max_img_size ||
(origin != IPL_ORIGIN_TL && origin != IPL_ORIGIN_BL))
{
assert(0); // most probably it is a programming error
return false;
}
if( !m_img || Bpp() != bpp || m_img->width != w || m_img->height != h )
{
if( m_img && m_img->nSize == sizeof(IplImage))
Destroy();
m_img = cvCreateImage( cvSize( w h ) IPL_DEPTH_8U bpp/8 );
}
if( m_img )
m_img->origin = origin == 0 ? IPL_ORIGIN_TL : IPL_ORIGIN_BL;
return m_img != 0;
}
void CvvImage::CopyOf( CvvImage& image int desired_color )
{
IplImage* img = image.GetImage();
i
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2016-11-27 16:28 faceRecognization\
目录 0 2016-11-27 16:17 faceRecognization\Debug\
文件 303616 2016-11-27 16:19 faceRecognization\Debug\faceRecognization.exe
文件 1685644 2016-11-27 16:19 faceRecognization\Debug\faceRecognization.ilk
文件 11145216 2016-11-27 16:19 faceRecognization\Debug\faceRecognization.pdb
文件 3057152 2011-02-04 22:21 faceRecognization\Debug\libxl.dll
目录 0 2016-11-27 16:29 faceRecognization\faceRecognization\
文件 997 2016-11-23 20:10 faceRecognization\faceRecognization.sln
文件 34816 2016-11-27 16:28 faceRecognization\faceRecognization.v12.suo
文件 7181 2014-07-23 11:01 faceRecognization\faceRecognization\CvvImage.cpp
文件 1716 2014-07-23 11:01 faceRecognization\faceRecognization\CvvImage.h
文件 110084 2016-11-26 20:24 faceRecognization\faceRecognization\faceRecognization.aps
文件 2517 2016-11-23 20:10 faceRecognization\faceRecognization\faceRecognization.cpp
文件 509 2016-11-23 20:10 faceRecognization\faceRecognization\faceRecognization.h
文件 12396 2016-11-26 20:24 faceRecognization\faceRecognization\faceRecognization.rc
文件 6967 2016-11-24 13:49 faceRecognization\faceRecognization\faceRecognization.vcxproj
文件 2565 2016-11-24 13:49 faceRecognization\faceRecognization\faceRecognization.vcxproj.filters
文件 13233 2016-11-27 16:28 faceRecognization\faceRecognization\faceRecognizationDlg.cpp
文件 1067 2016-11-26 20:24 faceRecognization\faceRecognization\faceRecognizationDlg.h
目录 0 2016-11-26 20:32 faceRecognization\faceRecognization\Faces\
目录 0 2016-11-26 20:32 faceRecognization\faceRecognization\Faces\s1\
目录 0 2016-11-26 20:32 faceRecognization\faceRecognization\Faces\s10\
文件 11382 2009-08-17 09:04 faceRecognization\faceRecognization\Faces\s10\1.BMP
文件 11382 2009-08-17 09:04 faceRecognization\faceRecognization\Faces\s10\10.BMP
文件 11382 2009-08-17 09:04 faceRecognization\faceRecognization\Faces\s10\2.BMP
文件 11382 2009-08-17 09:04 faceRecognization\faceRecognization\Faces\s10\3.BMP
文件 11382 2009-08-17 09:04 faceRecognization\faceRecognization\Faces\s10\4.BMP
文件 11382 2009-08-17 09:04 faceRecognization\faceRecognization\Faces\s10\5.BMP
文件 11382 2009-08-17 09:04 faceRecognization\faceRecognization\Faces\s10\6.BMP
文件 11382 2009-08-17 09:04 faceRecognization\faceRecognization\Faces\s10\7.BMP
文件 11382 2009-08-17 09:04 faceRecognization\faceRecognization\Faces\s10\8.BMP
............此处省略495个文件信息
相关资源
- LEAST SQUARES SUPPORT VECTOR MACHINES
- 基于OpenCV的车牌识别一整套
- 灰狼算法优化svm以及求解多目标规划
- 基于CNN和SVM的猫狗识别
- 逻辑回归贝叶斯SVM实现情感分析
- GLCM-SVM-master.zip
- 68人脸特征点Hog+SVM人脸表情识别
- Opencv_SVM训练_识别几何体
- Haar人脸检测+SVM+PCA人脸识别
- SVM实现手写数字识别
- 基于SVM的情感分析系统
- SVM支持向量机代码解释
- 行人数据库正样本
- 手写体数字识别系统实现
- minst数据集机器学习练习
- R语言预测实战(高清扫描版本)
- 基于KICA-SVM的矿用主要通风机故障诊断
- 基于SVM的产品评论属性特征的情感倾
- chapter14_基于SVM的数据分类预测——意
- 论文研究-基于word2vec扩展情感词典和
- SVM原理讲解
- svm breast cancer
- SVM在RGB图像分割中的应用
- libsvm下载50395
- 这里实现了四种SVM工具箱的分类与回
- 基于SVM的手写字体识别
- 毕业设计-基于pca和lbp的人脸识别算法
- 基于pso优化lssvm两参数
- Libsvm参数详解(含具体程序代码,可
- 机器学习SVM(支持向量机)实验报告
评论
共有 条评论