Some motion detection snippets in C with the OpenCV library.