資源簡介
網上下載的利用OpenCV進行手指識別的代碼,網上代碼有問題,經過我的修改能正確運行,但是效果沒有ReadMe文件給的youtube上視頻中那么好,視頻是在背景最理想情況下進行的,不過這個代碼可以用來學習。
代碼片段和文件信息
#include?
#include?
#include?
#define?VIDEO_FILE “video.avi“
#define?VIDEO_FORMAT CV_FOURCC(‘M‘‘J‘‘P‘‘G‘)
#define?NUM_FINGERS 5
#define?NUM_DEFECTS 8
struct?ctx?{
CvCapture *capture; /*?Capture?handle?*/
CvVideoWriter *writer; /*?File?recording?handle?*/
IplImage *image; /*?Input?image?*/
IplImage *thr_image; /*?After?filtering?and?thresholding?*/
IplImage *temp_image1; /*?Temporary?image?(1?channel)?*/
IplImage *temp_image3; /*?Temporary?image?(3?channels)?*/
CvSeq *contour; /*?Hand?contour?*/
CvSeq *hull; /*?Hand?convex?hull?*/
CvPoint hand_center;
CvPoint *fingers; /*?Detected?fingers?positions?*/
CvPoint *defects; /*?Convexity?defects?depth?points?*/
CvMemStorage *hull_st;
CvMemStorage *contour_st;
CvMemStorage *tem
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件???????7964??2013-06-22?08:49??HandFingerDetection\hand.c
?????文件????????181??2012-08-19?08:54??HandFingerDetection\Makefile
?????文件????????115??2012-08-19?08:54??HandFingerDetection\README
?????文件??????11353??2013-06-09?19:49??HandFingerDetection\效果圖.JPG
?????目錄??????????0??2013-06-22?08:50??HandFingerDetection
-----------?---------??----------?-----??----
????????????????19613????????????????????5
- 上一篇:基于PLC的自動售貨機設計
- 下一篇:zbar_識別二維碼.zip
評論
共有 條評論