# What is the best algorithm for image comparison in terms of speed?

Problem domain - I'm implementing a home monitoring system using smart phones. At regular intervals rear camera of the phone takes images and compare them for a change detection. This change detection is done inside the android app itself. Only after a change is detected, image is sent to server.

I want to know a fast algorithm to compare two images and detect whether a significant change is occurred. I want to avoid changes due to light effects and negligible changes. So far I have come up with multiple options 1. Feature matching using SIFT 2. Comparing histograms 3. Template matching

But I'm not sure which one is more appropriate to my problem domain or whether there are better options.

• I'm not sure whether this question is on topic here. If it is, I don't see how we could evaluate which of the 3 approaches would be effective in practice or when they would be fast enough. – Discrete lizard Feb 20 '18 at 7:38
• If you want to know which is most effective, the place to start is to implement them and see how well tey work on the kinds of images you have. This is an empirical field, which requires trying things (experiments). I think you should try that first on your own, then use that to improve your question by showing us what you've tried, what you found when you tried them, and in what situations (if any) they are unsatisfactory. – D.W. Feb 20 '18 at 16:22
• Also, we don't have much detail on how to evaluate possible answers ("appropriate to my problem domain" is a bit vague and we don't have much information on your problem domain). It might be more effective for you to figure out what are the key challenges in your domain, and then list specific technical requirements/challenges. – D.W. Feb 20 '18 at 16:23

## 2 Answers

I want to avoid changes due to light effects

A similarity measure based on binary descriptor can deal with this issue since it designed for multimodal images.

Also, you can try correlation coefficient since it cloud be used for real-time applications. for more information visit this page. Hence this algorithm in Matlab as a function called corr2 to find the degree of similarity between 2 images.

Personally, I'd read up on h.264 and its algorithms and figure out how it uses the previous frame to predict the next frame - that will find all the similarities between frames that there are. It will quite easily identify both changes between frames and motion.