Monday, July 27th, 2009, 406 days ago

HSV.cpp – hands detection demonstration

hdoutputorig

hdoutput

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

Posted in Design, HCI, Research | Share on facebook twitter digg delicious

9 Responses to “HSV.cpp – hands detection demonstration”

  1. Zoran says:

    I have already seen it somethere…
    Zoran

  2. quarks says:

    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

  3. Ayush says:

    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 ?

  4. priyanka says:

    plz sir refer to this link
    http://atmaja.tk/
    here video 2 run succesfully from opencv display video program but video 1 does not.

  5. priyanka says:

    here is display video program:

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

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

    if(!frame)
    {
    printf(“no input \n”);
    break;
    }
    cvShowImage(“w”,frame);
    char c=cvWaitKey(33);
    if(c==27) break;
    }
    cvReleaseCapture( &capture );
    cvDestroyWindow(“w”);
    system(“pause”);
    return 0;
    }

  6. champie says:

    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 Reply

You can use these XHTML tags:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>