About the "Compare" function

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
kct01

About the "Compare" function

Post by kct01 »

Hi everyone!!!
I am doing a project about image comparison and I found that ImageMagick is very useful.
And I found that imagemagick got a "compare" function which can compare 2 images' differences.
However, I dun know how to implement it with java.
Can jmagick use the "compare" function?
Thank you!!
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: About the "Compare" function

Post by anthony »

All languages, except possibly java can run other programs, so you could have it run the "compare" command itself.

NOTE however that if you plan to compare a lot of images then you face a 'N-squared' problem. that is to compare N images with every other image you need N*(N-1) or on the order of N^2 compares. That is a LOT of compares for even a small number of images!

Because of this you are better off generating small 'thumbnails' or some type of 'fingerprint' image to compare for speed. This will identify images that are 'close' enough that a full image comparison is warranted, without the full cost of always using full image compares.

See IM example pages on my notes on image comparing
http://www.imagemagick.org/Usage/compare/

I am sorry in that the notes are fairly rough, but their is a lot of ideas and techniques present in the page that could be used.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
kct01

Re: About the "Compare" function

Post by kct01 »

Thank you for answering.
I read the page that u mentioned before.
But still I dun know how to use that compare function with java.
Im a newbie in java programming. Would u mind tell me the details?
Thank you very much!!
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: About the "Compare" function

Post by anthony »

Sorry don't know much about java or its API.

Perhaps one of the more specialized forum groups can help.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
kct01

Re: About the "Compare" function

Post by kct01 »

So, normally, the whole function of Imagemagick should be able to be used with different languages??
Do you know what I mean?? :D
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: About the "Compare" function

Post by anthony »

Yes all the image processing functions should be available in all API's of the library. However that is not always the case. Especially when new functions are involved.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
kct01

Re: About the "Compare" function

Post by kct01 »

I wonder if jmagick really use the "compare" or "difference" function of ImageMagick coz I can't find any related function here: http://downloads.jmagick.org/jmagick-doc/
Can somebody help!?!?!?!?
Post Reply