Click here to Skip to main content
15,890,282 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I want to make a program that can compare two image but ignore the brightness which may cause by sunlight.
is there any library or method to do that?

What I have tried:

I have tried to compare two image by comparing the pixel, but it will not ignore the brightness.
Posted
Updated 4-Apr-18 1:45am
Comments
Afzaal Ahmad Zeeshan 4-Apr-18 7:03am    
Perhaps you would need to go down to grayscale and then compare them? It sounds almost impossible to ignore the brightness.

Here is a sample thread that might help you out in doing a high-pass filter and then comparison, https://stackoverflow.com/questions/14434426/image-comparison-algorithm-that-ignores-brightness

1 solution

There is several methods, for example:
1. Keypoint Matching
2. Histogram method
3. Keypoints + Decision Trees
4. file-hash based (md5,sha1,etc) for exact duplicates
5. perceptual hashing (phash) for rescaled images
6. feature-based (SIFT) for modified images
For further details, please see: Image comparison - fast algorithm[^]

It depends on what you mean by "compare two images"...

For starters, i'd suggest to read this excellent CP's article: Simple image comparison in .NET[^]
 
Share this answer
 
Comments
Graeme_Grant 4-Apr-18 10:41am    
5'ed!
Maciej Los 4-Apr-18 11:35am    
Thank you, Graeme.
Graeme_Grant 4-Apr-18 11:41am    
It was basically the answer & links that I was going to give ;)
Maciej Los 4-Apr-18 11:46am    
I'm glad i was first...
:laugh:

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900