On Mon, Mar 28, 2011 at 9:22 AM, Ben Caradoc-Davies
<[email protected]> wrote:
> +1. Nice work. I am impressed. Image comparison is notoriously difficult,
> and it is a good idea to recycle other tools.
>
> My one suggestion is to consider other tolerance options. In particular, the
> integer tolerance does not look like it scales with image size. I expect you
> are honouring pdiff's native options. If you double the image in each
> dimension, do you have to have to quadruple your tolerance? Would a double
> representing a fraction of total pixels be a bit more user-friendly? For
> example, we might want to fail a test if 0.01% of pixels change, regardless
> of image size. Is this good practice? Who knows. (Thinking of noise scaling
> laws.)

Yeah, I wrestled with the idea in the weekend and eventually decided it would
have been a dangerous one.
Consider a small image, 300x100. Now think of a small percentage... 1%?
1% is 300 pixels difference, a solid black line crossing the image.
Can it be ignored? Not really.

The thing is, no matter how big the image is a solid blob of 100 pixes is
visible to anyone. So the choice of perceptualdiff of using pixel
count is a good
on imho, percentages can really be deceptive.

>
> Would it be useful to add an ImageAssert.Options class to allow other
> options to be set? This might allow either style (integer or fraction) to be
> used transparently.

Yeah, I could go for that. PerceptualDiff offers other three options, field
of view, gamma and luminance to drive the comparison, we could expose
them all:

http://pdiff.sourceforge.net/

>
> Well done: two static methods and already you have users asking for more
> features.  :-)

And I did not even commit that so far!

Cheers
Andrea

-- 
-------------------------------------------------------
Ing. Andrea Aime
GeoSolutions S.A.S.
Tech lead

Via Poggio alle Viti 1187
55054  Massarosa (LU)
Italy

phone: +39 0584 962313
fax:      +39 0584 962313
mob:    +39 333 8128928

http://www.geo-solutions.it
http://geo-solutions.blogspot.com/
http://www.youtube.com/user/GeoSolutionsIT
http://www.linkedin.com/in/andreaaime
http://twitter.com/geowolf

-------------------------------------------------------

------------------------------------------------------------------------------
Enable your software for Intel(R) Active Management Technology to meet the
growing manageability and security demands of your customers. Businesses
are taking advantage of Intel(R) vPro (TM) technology - will your software 
be a part of the solution? Download the Intel(R) Manageability Checker 
today! http://p.sf.net/sfu/intel-dev2devmar
_______________________________________________
Geotools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to