octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Fingerprint of demo plots


From: Andreas Weber
Subject: Fingerprint of demo plots
Date: Sat, 27 Aug 2016 11:33:55 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Icedove/38.8.0

Dear all,

Currently the tests in __osmesa_print__.cc checks if the size of the
generated svg matches the expectation. One example which triggered the
test is http://savannah.gnu.org/bugs/?48842#comment11 where the code was
changed
so that the grid doesn't overwrite the axes and thus the generated file
is smaller
than before. In my eyes this case was exactly what was intended: alert
if the plot
was changed.

But now I'm wondering if we can create better fingerprints for all plots
in the demos.
Some scripts which reside beneath scripts/testfun/private/ and
create/compare all
images generated by dump_plot_demos.m.

Does someone have a good idea how to create good fingerprints for that
purpose?
The goal would be to get alarmed if a change braks the plot in the demos.

Some unsorted ideas for metrics:

Create EPS and parse:
* Number of used colors
* Number of lines for each color (perhaps indexed palette with 16 entries)
* Sum of length of lines per color
* Number of text characters

Create Bitmap:
* Mean of RGB
* resize to 8x6 image and store the RGB values (would cost 144 bytes per
plot)

-- Andy
<http://savannah.gnu.org/users/carandraug>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]