It is currently Sun Aug 23, 2026 3:19 pm


All times are UTC - 5 hours [ DST ]



Post new topic Reply to topic  [ 27 posts ]  Go to page Previous  1, 2
Author Message
 Post subject: Re: image comparison
PostPosted: Thu Mar 31, 2016 5:19 am  (#21) 
Offline
GimpChat Member
User avatar

Joined: Jan 20, 2013
Posts: 14831
Location: roma, italy
paynekj wrote:
So here's a suggestion for you to code up...

Both images as layers
Set the mode of the top layer to "Difference"
New layer from Visible (gimp-layer-new-from-visible)
With New layer active, look at the histogram (gimp-histogram)
Divide the Mean value by 2.55 to get a percentage (You may want to consider the means of all 4 channels)

Kevin

Kevin,
I'm on the way, but to better evaluate my results:
- could you post 2-3 (or just only 1 if you prefer) pairs of images indicating what is the percentage of similarity you get from ImageMagick? (to verify my tests)
thanks

_________________
"Where am I ?"


Top
 Post subject: Re: image comparison
PostPosted: Thu Mar 31, 2016 7:14 am  (#22) 
Offline
Script Coder
User avatar

Joined: Jun 22, 2010
Posts: 1171
Location: Here and there
dinasset wrote:
Kevin,
I'm on the way, but to better evaluate my results:
- could you post 2-3 (or just only 1 if you prefer) pairs of images indicating what is the percentage of similarity you get from ImageMagick? (to verify my tests)
thanks


Yes, I'll do that later today after I'm home from work. I'll also try and remember what the ImageMagick options are doing ;)

Kevin


Top
 Post subject: Re: image comparison
PostPosted: Thu Mar 31, 2016 7:18 am  (#23) 
Offline
GimpChat Member
User avatar

Joined: Jan 20, 2013
Posts: 14831
Location: roma, italy
thanks, Kevin.

_________________
"Where am I ?"


Top
 Post subject: Re: image comparison
PostPosted: Thu Mar 31, 2016 1:59 pm  (#24) 
Offline
Script Coder
User avatar

Joined: Jun 22, 2010
Posts: 1171
Location: Here and there
Here are three files for comparison

And the results of the image magic command:
Compare 2015-04-20-17-57-29.jpg to 2015-04-20-17-58-14.jpg difference=7.3
Compare 2015-04-20-17-58-14.jpg to 2015-04-20-18-00-02.jpg difference=2.7


If I do it manually using GIMP
Compare 2015-04-20-17-57-29.jpg to 2015-04-20-17-58-14.jpg Value mean = 20.3 (/255 = 7.9%)
Compare 2015-04-20-17-58-14.jpg to 2015-04-20-18-00-02.jpg Value mean = 8.6 (/255 = 3.3%)


And desaturating before comparing
Compare 2015-04-20-17-57-29.jpg to 2015-04-20-17-58-14.jpg Value mean = 18.5 (/255 = 7.3%)
Compare 2015-04-20-17-58-14.jpg to 2015-04-20-18-00-02.jpg Value mean = 6.8 (/255 = 2.7%)

Which matches the ImageMagick result.

Kevin


Attachments:
2015-04-20-18-00-02.jpg
2015-04-20-18-00-02.jpg [ 40.6 KiB | Viewed 1389 times ]
2015-04-20-17-58-14.jpg
2015-04-20-17-58-14.jpg [ 40.53 KiB | Viewed 1389 times ]
2015-04-20-17-57-29.jpg
2015-04-20-17-57-29.jpg [ 40.54 KiB | Viewed 1389 times ]
Top
 Post subject: Re: image comparison
PostPosted: Thu Mar 31, 2016 2:23 pm  (#25) 
Offline
GimpChat Member
User avatar

Joined: Jan 20, 2013
Posts: 14831
Location: roma, italy
Thanks Kevin.

These are my results (the output is the percentage of similarity:

1st vs 2nd : mean average similarity = 90.56
(average of the following 4 results from:
V,R,G,B histograms: 92.03 90.29 90.11 90.79

2nd vs 3rd : mean average similarity = 95.95
(average of the following 4 results from:
V,R,G,B histograms: 96.61 95.88 95.77 95.55

What is your opinion ?

_________________
"Where am I ?"


Top
 Post subject: Re: image comparison
PostPosted: Thu Mar 31, 2016 2:36 pm  (#26) 
Offline
Script Coder
User avatar

Joined: Jun 22, 2010
Posts: 1171
Location: Here and there
dinasset wrote:
Thanks Kevin.

These are my results (the output is the percentage of similarity:

1st vs 2nd : mean average similarity = 90.56
(average of the following 4 results from:
V,R,G,B histograms: 92.03 90.29 90.11 90.79

2nd vs 3rd : mean average similarity = 95.95
(average of the following 4 results from:
V,R,G,B histograms: 96.61 95.88 95.77 95.55

What is your opinion ?


I think it entirely depends on what you are going to do with the numbers.

For me I got enough difference to be able to automatically delete the 1500 images per day that didn't show anything different frame-to-frame.

Kevin


Top
 Post subject: Re: image comparison
PostPosted: Thu Mar 31, 2016 11:54 pm  (#27) 
Offline
GimpChat Member
User avatar

Joined: Jan 20, 2013
Posts: 14831
Location: roma, italy
OK.
It's enough for me, thanks again Kevin.

_________________
"Where am I ?"


Top
Post new topic Reply to topic  [ 27 posts ]  Go to page Previous  1, 2

All times are UTC - 5 hours [ DST ]



* Login  



Powered by phpBB3 © phpBB Group