How to track an area enclosed by a rectangle on a video in C# ? RRS feed

  • Question

  • Hi, this is what I am doing, I take the input from a web camera onto a picturebox in C# and draw a rectangle on the video using a mouse. Then I plan to track that particular area(e.g. right eye)enclosed by the rectangle, as the video streams, for instance if the person moves to the right, the rectangle will also move to the right but will stay glued to the right eye. In other words the rectangle will move along with the human eye. In the below video, the area under consideration is the right eye.

    I am still learning to draw on a video. I have been looking at the Directshow sample bitmapmixer to get an idea.

    What I want to know is how to isolate the frame which has the whole rectangle(since a person cant draw on a single frame) and how to track the region. I was thinking of getting the color histogram of the enclosed area and then searching for that area in the subsequent frames.

    Check Image >>> http://i29.tinypic.com/2466s02.jpg 
    Any ideas.

    Many Thanks.
    • Moved by Nancy Shao Tuesday, July 20, 2010 9:15 AM Not appropriate forum (From:Visual C# General)
    Sunday, July 18, 2010 5:01 AM


All replies