Motion/image recognition is a pretty difficult topic. Recognizing that there is motion isn't too difficult (pixel-wise comparison between two pictures, using some tolerance level for environment...