Friday, April 10, 2009

Possible simpliest way to extract information from video

Pipeline :

----------------------------------------------------------------

Capture Video -> Capture Frame -> Extract Finger ->Point Stream

----------------------------------------------------------------

Assuming point stream would contain - point(x,y) for the centroid of fingers, timestamp


Procedure :

1. Using Processing Api it is possible to load pixels of the frame.

2. After we get the pixels we look for the RGB component of the pixel color. If we know the finger has a blue patch on it, we compare the blue(B) component of the pixels with a threshold say 200 (0 is min , 255 is max) and get those pixels' coordinates those have blue component above the threshold 200, indicating the blue points of the finger that we are interested in.

3. To get the centroid of these points we can simply get the average of the points vector.

4. To get the time stamp if the frames are stored sequentially and we know the frame rate , we can know(or put) the time gap between each two frames and therewith set a time stamp on each frame.

Note : As we would go forward we might need to consider some other factors and adjust the plan of retrieving information from video.

No comments:

Post a Comment