2、its.h>#include#include#endifstaticCvMemStorage*storage;//staticdoublecolor;staticCvSizeimgSize;staticCvSizetmplSize;staticCvSeq*contour;staticCvSeq*biggest;staticCvCapture*capture=0;staticintisHandOpen=1;//staticdoublecolor;staticCvScalarcolor;staticIplImage
3、*img;staticIplImage*tmpImg;staticIplImage*conv;staticIplImage*H;staticIplImage*S;staticIplImage*V;staticIplImage*tmpH1;staticIplImage*tmpS1;staticIplImage*tmpH2;staticIplImage*tmpS2;staticIplImage*tmpH3;staticIplImage*tmpS3;staticIplImage*openHandTmpl,*closedHandTmpl;staticI
4、plImage*openGrayHandTmpl,*closedGrayHandTmpl;staticIplImage*openscaledTmpl,*closedscaledTmpl;staticIplImage*openMatchResult,*closedMatchResult;FILE*output;voidhandDetect(IplImage*img);staticintnumImg=10;char*names[]={"./images/test01.jpg","./images/test02.jpg","./images/test
5、03.jpg","./images/test04.jpg","./images/test05.jpg","../images/test06.jpg","./images/test07.jpg","./images/test08.jpg","./images/test09.jpg","./images/test10.jpg"};char*resultsiamge[]={"result01.jpg","result02.jpg","result03.jpg","result04.jpg","result05.jpg","result06.jpg",
6、"result07.jpg","result08.jpg","result09.jpg","result10.jpg"};intmain(intargc,char**argv){ inti=0; charfilename[80]; storage=cvCreateMemStorage(0); #ifdefDEBUG cvNamedWindow("Template1",1); cvNamedWindow("Template2",1); cvNamedWindow("CompResults1",1); cvNamed
7、Window("CompResults2",1); cvNamedWindow("SkinDetection",1);#endif openHandTmpl=cvLoadImage("openHandTmpl.jpg",1); closedHandTmpl=cvLoadImage("closedHandTmpl.jpg",1); //ConvertformRGBtoGRAY tmplSize.width=openHandTmpl->width; tmplSize.height=openHandTmpl->heigh
8、t; openGrayHandTmpl=cvCreateImage(tmplSize,IPL_DEPTH_8U,1); cvCvtCol