Here's one way to do it:
- Compare the entire images, get the percentage of pixels that differ more than a threshold.
- Divide into quarters recursively, down to a certain size, and get the same percentage for each quadrant.
- Draw the frame around the quadrants that are a certain amount above the average difference. If you need square sections, use a single quadrant based on size and percent difference. Otherwise, you can combine more than one quadrant with large differences.