Error I'm getting with MagickCore but not MagickWand

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

Re: Error I'm getting with MagickCore but not MagickWand

Post by snibgo »

That last image shows typical JPG blocking. Horrible. What you need is a high resolution camera with perspective control lens -- the lens shifts sideways, so it photographs the target head-on without the camera being in the firing line. And use raw images, so you don't get JPEG nastiness.
snibgo's IM pages: im.snibgo.com
el_supremo
Posts: 1015
Joined: 2005-03-21T21:16:57-07:00

Re: Error I'm getting with MagickCore but not MagickWand

Post by el_supremo »

I have it figured out (I hope). The MagickSetOption doesn't set the fuzz that is used by the compareImages function. It needs MagickSetFuzz to do that. Here's a snippet that works:

Code: Select all

	MagickReadImage(img1, "original-after-transform.jpg");
	MagickSetImageArtifact(img1,"highlight-color","blue");
	MagickSetImageFuzz(img1,5000.);

	MagickReadImage(img2,"changed-after-transform.jpg");

	// the command line didn't specify a metric
	m_wand = MagickCompareImages(img1,img2,UndefinedMetric,&distortion);
Pete
Sorry, my ISP shutdown all personal webspace so my MagickWand Examples in C is offline.
See my message in this topic for a link to a zip of all the files.
168gr
Posts: 47
Joined: 2013-01-09T22:46:19-07:00
Authentication code: 6789

Re: Error I'm getting with MagickCore but not MagickWand

Post by 168gr »

That would explain why messing with the fuzz value didn't seem to have any effect. :) Much better now, thank you. I'm sure higher res images will help, too.
Post Reply