See the discussion in motion detection.