I bought my camera from Newark/Element 14 which is the only place I found the minimum $25 price. Then I followed the installation instructions from--
(others available). I also looked at--
Which includes Python code for comparing images -- as for a security camera. As it happens, their code resembles what I would have done if I'd had to start from scratch -- by comparing the same pixel position in successive low-res images. Since the G (green) part of RGB contains 70% of an image's grayscale information, R and B values can be ignored for a motion detection application. Thanks to the Raspi org I got my camera working with very little learning curve pain.
The way one captures an image is with the command line program "raspistill". This app has no Unix-style man page but if you know to execute--
$ raspistill -?
You'll get by.
In my little test program I wanted to learn just how how much difference to expect when there should have been no change at all. Here are the counts for 5 pair-wise comparisons of 120x90-pixel images: