Post date: Feb 18, 2012 2:27:22 AM
Going through the documentation for the video experimenter kit. The sample 'Bright spot following" and edge detection code work essentially by processing each frame of data as a black and white bitmap. tvout appears to be converting the signal automatically to black and white.
For example ObjectTracking contains this
for(int y=0;y<H;y++) {
for(int x=0;x<W;x++) {
c = tv.get_pixel(x,y);
Where y is the verticle pixel location and x is the horizontal. H and W are static values set to 128 and 96 at the beginning of the sketch and are used also to call tvout's begin function with the specified numbers as the resolution.
The above lines of code are scrolling left to right, top to bottom. Get_pixel returns a 1 if the pixel is white and a 0 if it's black.
edge detection uses something similar to go through and compare the image to a set of pre-compiled edge templates which are 3x3 pixels. It scans through in a similar xy loop to the above except this time it takes a snapshot of 3x3 pixels around the center point and compares each one to the included templates.
The take away from this is that it might provide me a mechanism for implementing the chin dection described in the flo control project. I need to experiement a bit and read a bit more.