HSV.cpp – hands detection demonstration



This is a screenshot of demonstration hands detection using the code hsv.cpp. Comparing with the old version within black background and green contours lines, this version actually is based on that. Besides, two functions are added in this new version: using rectangle to locate the hands location, and using eslipe to illustrate the angle of hands motion.

hsv.cpp source code

Related post may interest you

Hand gesture detection and recognition using openCV

Author: Andol Li

A HCI researcher, a digital media lecturer, an information product designer, and a python/php/java coder.

10 Comments On “ HSV.cpp – hands detection demonstration”

  1. hi
    i would like to detect the gesture of the hand such as (you shown above) during motion to trigger some other input such as (to open a folder).
    i had exceuted your code but i dont know, how to make to detect my gesture and to trigger some other actions (to open folder)
    my email id is:infoquarks@gmail.com

  2. Hi, why are you using BGR values in hsv_min & hsv_max??

    CvScalar hsv_min = cvScalar(0, 30, 80, 0);
    CvScalar hsv_max = cvScalar(20, 150, 255, 0);

    moreover, whats the need to convert the image from BGR to HSV ?

  3. here is display video program:

    //———————————————— To display to a video in a Window————————————————-//
    #include “cv.h”
    #include “highgui.h”
    int main(){
    const char* file=”H:\\seq3.avi”;
    // CvCapture* capture=cvCaptureFromAVI(“video.avi”);
    CvCapture* capture=cvCreateFileCapture(file);
    IplImage* frame=0;

    // either use
    // or
    int i=cvGrabFrame(capture);
    printf(“cvGrabFrame value is %d \n”,i);
    frame=cvRetrieveFrame(capture );

    printf(“no input \n”);
    char c=cvWaitKey(33);
    if(c==27) break;
    cvReleaseCapture( &capture );
    return 0;

  4. Hi im newbie in OpenCv/image processing, i have a code here using visual c++ and opencv, i need to display the video in a new form in mfc. can anyone please guide me what to do first?. thank you and godbless.

Leave a comment
Due to technical adjustments, the comment function is shortly closed and will be re-openning soon. Thanks.

Copyrights 2006-2018 © All rights reserved
Theme Tree2, re-designed by Andol Li, powered by WordPress and Bootsrap
WWW.ANDOL.ME | 浙ICP备15040508号-1
公安备案图标 浙公网安备33010602004018号
Back to top