Can't seem to wrap my head around this one...

Here's what I'm doing:
I pull an image from a database (my reference image) and compare it to an image on my form (the current view). This produces a "resulting" image showing the difference between the two (differences are red, unchanged pixels are green). This works. I then count the number of green pixels (unchanged portion of image) and calculate a percentage of the image that has changed and not changed.

here's where I need help:

The user is able to select a "threshold", or percentage of the image that they want to be notified about if it exceeds that percentage.
ie: user's setting is 51% for notification, image is 53% changed, then they will be notified.

The problem i'm facing is i'm trying to add some dynamics to it by calculating a "running average" or something of that nature. In areas of high traffic, comparison 1 might yield a high percentage unchanged (lots of people in view) and comparison 2 (it scans continuously) might yeild a real low percentage (no people in view). This would throw a "false positive" if simply going by a percentage threshold, unless I set that percentage threshold to the very minimum.

The end goal here is to detect when a camera's view has changed. I'm getting close, but there's so many variables to consider. Is there a better approach here?