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 » 2017-07-08T07:05:07-07:00

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: 9382
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Diff() function

Post by snibgo » 2017-07-08T08:53:07-07:00

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: 22086
Joined: 2007-07-02T17:14:51-07:00
Location: Sunnyvale, California, USA

Re: Diff() function

Post by fmw42 » 2017-07-08T10:40:46-07:00

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 » 2017-07-09T09:58:00-07:00

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: 22086
Joined: 2007-07-02T17:14:51-07:00
Location: Sunnyvale, California, USA

Re: Diff() function

Post by fmw42 » 2017-07-09T11:26:55-07:00

See compare.c and inside that GetImageChannelDistortion()

Post Reply