Diff() function

Questions and postings pertaining to the development of ImageMagick, feature enhancements, and ImageMagick internals. ImageMagick source code and algorithms are discussed here. Usage questions which are too arcane for the normal user list should also be posted here.
Post Reply
sachini de silva
Posts: 3
Joined: 2017-06-27T06:12:10-07:00
Authentication code: 1151

Diff() function

Post by sachini de silva »

Though i searched in many documentations i couldn't find the details about the algorithm which handles the Diff() function in comparing images. Would you please provide me a link from where i can get details about the algorithm use in Diff() function? is there any specified name for this algorithm?
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Diff() function

Post by snibgo »

What Diff() function? There is a Difference method for "-composite" (and other operations), and a "compare" program. The source code is published, so you can see exactly what they do.
snibgo's IM pages: im.snibgo.com
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Diff() function

Post by fmw42 »

The compare function has many "difference" metrics. See http://www.imagemagick.org/Usage/compare/#statistics. You will have to look in the compare.c code to see how they are implemented.
sachini de silva
Posts: 3
Joined: 2017-06-27T06:12:10-07:00
Authentication code: 1151

Re: Diff() function

Post by sachini de silva »

i used compare command of imagemagick to detect near duplicate images. Though i refer source code and several documentations i couldn't find which code part handles this compare command. Can you please tell me which algorithm/code handles this compare command
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Diff() function

Post by fmw42 »

See compare.c and inside that GetImageChannelDistortion()
Post Reply