How can I quantify difference between two images?

2019-01-02 16:43发布

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.

20条回答
情到深处是孤独
2楼-- · 2019-01-02 17:09

Have you seen the Algorithm for finding similar images question? Check it out to see suggestions.

I would suggest a wavelet transformation of your frames (I've written a C extension for that using Haar transformation); then, comparing the indexes of the largest (proportionally) wavelet factors between the two pictures, you should get a numerical similarity approximation.

查看更多
栀子花@的思念
3楼-- · 2019-01-02 17:11

Earth movers distance might be exactly what you need. It might be abit heavy to implement in real time though.

查看更多
登录 后发表回答