资源简介
从手势图像的预处理、手势的特征提取和手势的识别三方面对基于视觉的手势识别进行了研究。
图像预处理包括图像平滑、图像分割、二值化、图像形态学处理和轮廓提取。轮廓提取是使用八邻域边界跟踪算法。在手势的特征提取部分,使用边界傅立叶描绘子的手势特征提取算法。针对手势的识别,采用了基于 BP 神经网络的识别方法。
是基于opencv和vs编写的程序
代码片段和文件信息
#include “stdafx.h“
#include “cv.h“
#include “highgui.h“
#include
#include
#include
#include
using namespace std;
#define SQRT(x y) sqrt((x)*(x) + (y)*(y))
void ColorSegmentation(IplImage* imgIplImage* P_);//肤色分割
int otsu (IplImage* image);// 大津法求取阈值
void Processing(IplImage* P_);//对图像进行各种处理
void Outline(IplImage* P_);//轮廓提取
void Fourier(IplImage* pContourImgCvSeq* pcontour);//计算傅立叶描述子
const char* filename=“E:\\vs工程\\Gesture Recognition\\测试\\1.6.jpg“;//待检测图像
ofstream outfile(“E:\\vs工程\\Gesture Recognition\\数据\\1.6.txt“);//傅立叶描述子存储的txt文件
int _tmain(int argc _TCHAR* argv[])
{
cvNamedWindow(“外轮廓提取“1);
IplImage* img=cvLoadImage(filenameCV_WINDOW_AUTOSIZE); //加载图像
IplImage* P_=cvCreateImage(cvGetSize(img)81);//肤
- 上一篇:C语言课程设计——电子投票系统
- 下一篇:士兵战队问题
评论
共有 条评论