Is this your first time here? SwingWiki is a Java Swing Developer community site with an big archive of Swing-related usenet groups and mailing lists, but also tips, tricks and articles and book reviews written by your colleagues from around the world. If you came here through a search engine and did not find what you were looking for, make sure to check the wiki table of contents.

Re: [Jmagick] Testing JMagick

From:"Jacob Nordfalk" [jacob.nordfalk@masked-domain]
Sent on:Thu, 28 Feb 2008 22:45:03 +0545
In reply to:Re: [Jmagick] Testing JMagick sent on Thu, 28 Feb 2008 09:43:50 -0600 (CST) by Bob Friesenhahn [bfriesen@masked-domain]
>
> I have been through this a number of times before, having written the
> test suites for ImageMagick, GraphicsMagick, and Magick++. When
> comparing output images against a reference image, you really need to
> do a statisical comparison rather than absolute.

Yes. If you look in MagickTesttools line 87 you wil se that that's
exactly what is being done:
(http://jmagick.svn.sourceforge.net/viewvc/jmagick/test/magicktest/MagickTesttools.java?view=markup)

String cmd = "compare -metric MSE "+file1+" "+file2+"
tempImageDifference.jpg";


So 'compare -metric MSE.correctFile.jpg actualFile.jpg' is being used
to determine the difference.

I have used this technique the last year and my experience is this:
Usually differences are under 1 on the test image and images supposed
to be identical
but I have set a "fudge factor" margin of 20 for the maximal
statistical derivation.

When images differ becaurse of algorithmic errors, they usually do
this with aprox 100 or more (for example input pics.jpg and
sharpened.jpg differs by 77, convolved.jpg by 70 and quantized.png by
943).


> Otherwise
> differences between Q8/Q16/Q32 will cause test failure.

I dont think so, for the above reasons. But all has been done with Q8
only, I still needs someone to try on Q16.


> Formats like
> JPEG are lossy so they require a large "fudge factor".

Yes. Therefore the standard "fudge factor" margin is set to 20
(usually a margin of 2 is really enough).


> I think that
> reference images should be generated using a Q8 build since they
> represent the maximum variation from the "one true image" and the
> files are likely to be smaller.

I agree and that's also how Ive done it.


> Dealing with fonts is a major problem
> since each version of FreeType produces different results, and glyph
> hinting (FreeType compile-time options) can make a huge difference in
> the output. There are similar problems with PDF and Postscript.

I agree and that's also how Ive done it:
Some tests are dependent on the fonts installed on the system and will
thus probably fail. These have been '_failMightBeOk' in their name (to
not upset you).



--
Jacob Nordfalk
http://javabog.dk
Skype: jacobnordfalk
_______________________________________________
JMagick mailing list
[JMagick@masked-domain]
http://www.yeo.id.au/mailman/listinfo/jmagick
Please ensure that [JMagick@masked-domain] is a recipient when replying.
Found what you were looking for? If not - continue at Wiki Index

Other messages in this topic

SenderDate sentSubject
"Jacob Nordfalk" [jacob.nordfalk@masked-domain]Wed, 26 Mar 2008 10:39:03 +0545Re: [Jmagick] Testing JMagick
"Terence M. Bandoian" [terence@masked-domain]Fri, 29 Feb 2008 16:51:29 -0600Re: [Jmagick] Testing JMagick
Bob Friesenhahn [bfriesen@masked-domain]Thu, 28 Feb 2008 09:43:50 -0600 (CST)Re: [Jmagick] Testing JMagick
"Jacob Nordfalk" [jacob.nordfalk@masked-domain]Thu, 28 Feb 2008 11:55:12 +0545[Jmagick] Testing JMagick

 
Recent changes | RSS changes | Table of contents | News Archive | Terms And Conditions | Register | The Quest For Software++| Ruby Resources
FitNesse Resources