image-comparison

How can I quantify difference between two images?

青春壹個敷衍的年華 提交于 2019-11-25 23:08:45
Here's what I would like to do: I'm taking pictures with a webcam at regular intervals. Sort of like a time lapse thing. However, if nothing has really changed, that is, the picture pretty much looks the same, I don't want to store the latest snapshot. I imagine there's some way of quantifying the difference, and I would have to empirically determine a threshold. I'm looking for simplicity rather than perfection. I'm using python. General idea Option 1: Load both images as arrays ( scipy.misc.imread ) and calculate an element-wise (pixel-by-pixel) difference. Calculate the norm of the