I am starting to get quite obsessed with procesing at the moment its a very addictive framework. I have been experimenting with the video class library. Processing allows for individual pixel comparison of each capture from a webcam. The code from the video in this post compares the current webcam capture to the previous capture from the webcam. The code scans from left to right top to bottom when it finds the first pixel that is different from the previous capture it draws a circle on the screen at that point. One of the interesting problems solved from this code was converting the linear array of pixels from the webcam capture to the 2d space on the form.
xPos = The modulous or remainder of pixelnumber / width.
yPos = the result of pixelnumber / width ignoring the remainder.
ps. ignore the quality of my very very old webcam its just impressive it still works