Hello everyone,

I'm interested in making a crude motion sensor that compares two images captured by a USB webcam, one after the other. It should work something like this, the webcam is in the corner of my room, taking snapshots and putting them into a picture box. One snapshot would be taken, put into a picture box, and then one second later another would be taken and put into another picture box. The pixel information would be compared using a Spearman's Rank Correlation coefficient between the two picture boxes. This I can do. If the coefficient dropped below a critical value the computer would recognise a sizable difference in the two images and trigger a WAV file to play, instructing the person to leave my room. Is there any way that I can capture an image from a webcam and put it into a picture box? The rest is easy from there on in, but capturing the image in the first place I really don't have a clue how to do!!! Thanks in advance,

Sam