文档介绍:基于肤色的人手交互技术
基于vc++
1
Opencv的配置:
一、安装opencv
下载:./f/
安装opencv (按提示安装即可)
二、配置opencv
菜单tools->options->directories:先选择include files,在下方填入:
c:\program files\opencv\cxcore\include
c:\program files\opencv\cv\include
c:\program files\opencv\cxaux\include
c:\program files\opencv\ml\include
c:\program files\opencv\otherlibs\highgui
c:\program files\opencv\otherlibs\cvcam\include
2
选择source files,在下方填入:
c:\program files\opencv\cxcore\src
c:\program files\opencv\cvaux\src
c:\program files\opencv\otherlibs\highgui
c:\program files\opencv\otherlibs\cvcam\src\windows
选择library files,在下方填入:
c:\programfiles\opencv\lib
创建全局变量
我的电脑—属性—高级—环境变量—
path—C:\Program Files\OpenCV\bin
项目配置:在vc++,
Project->settings,在setting for中选择all configuration,选择右面的link标签,在object/library modules附加上
3
人手交互的框架
图像采集
及预处理
手势分割
手势分析
手势识别
基于手势识
别的应用
用户
手势建模
语法、语义及
其它约束
参数模型
视频
信号
动态手势识别系统构成
4
视频采集
获得摄像头信息
CvCapture *capture;
capture=cvCaptureFromCAM(0);//参数0表示摄像头,参数
从摄像头获得一幅图像
IplImage *frame,*frame_copy;
cvGrabFrame(capture);
frame = cvRetrieveFrame( capture );
frame_copy = cvCreateImage( cvSize(frame->width,frame->height),IPL_DEPTH_8U, frame->nChannels );
if( frame->origin == IPL_ORIGIN_TL )
cvCopy( frame, frame_copy, 0 );
else
cvFlip( frame, frame_copy, 0 );
5
预处理
图像噪声分类及处理办法
噪声是一些不可预测的随机信号,主要来源于图像的获取、传输过程中。
高斯噪声:出现的位置是一定的,但噪声的幅值是随机的;
脉冲噪声(椒盐噪声):出现位置是随机的,但噪声的幅值是基本相同的。
6
平滑:均值滤波
以模板运算系数表示
1
2
1
4
3
1
2
2
3
4
5
7
6
8
9
5
7
6
8
8
5
6
7
8
9
1
2
1
4
3
1
3
4
4
4
5
4
5
6
9
5
6
7
8
8
5
6
7
8
9
7
平滑:改进的均值滤波
以模板运算系数表示
8
平滑:中值滤波
1
2
1
4
3
1
2
2
3
4
5
7
6
8
9
5
7
6
8
8
5
6
7
8
9
1
2
1
4
3
1
3
4
4
4
5
4
5
6
9
5
6
7
8
8
5
6
7
8
9
开一个窗口,以窗口的平均值代替中心位置的值
9
10