This question is somewhat language-agnostic, but my tool of choice happens to be a numpy array.
What I am doing is taking the difference of two images via PIL:
You could look for connected components in the image and then determine the bounding boxes of these components.