test_image_statistics fails for me on Fedora 18. Many of the statistics are not within the tolerances:
if ~DIFF_BELOW_TOL(pixelTotal, 2.26349e+07, 1e3) then nb_errors=nb_errors+1
if ~DIFF_BELOW_TOL(pixelMax, 255.0, 0.001) then nb_errors=nb_errors+1
if ~DIFF_BELOW_TOL(pixelMean, 48.5520, 0.0001) then nb_errors=nb_errors+1
if ~DIFF_BELOW_TOL(pixelMin,0.0, 0.0001) then nb_errors=nb_errors+1
if ~DIFF_BELOW_TOL(pixelDeviation, 65.5660, 0.0001) then nb_errors=nb_errors+1
if ~DIFF_BELOW_TOL(pixelSquareSum, 3.10312e+09, 1e4) then nb_errors=nb_errors+1
if ~DIFF_BELOW_TOL(pixelVariance, 4298.91, 0.01) then nb_errors=nb_errors+1
I have:
% TEST_IMAGE_STATISTICS: pixelTotal= 2.26332e+07
% TEST_IMAGE_STATISTICS: pixelMean= 48.5483
% TEST_IMAGE_STATISTICS: pixelDeviation= 65.5623
% TEST_IMAGE_STATISTICS: pixelSquareSum= 3.10272e+09
% TEST_IMAGE_STATISTICS: pixelVariance= 4298.41
Perhaps just bumping the variances is okay?
--- gdl-0.9.3/testsuite/test_image_statistics.pro.tests 2013-03-12 09:21:08.100225141 -0600
+++ gdl-0.9.3/testsuite/test_image_statistics.pro 2013-03-12 09:20:55.495293098 -0600
@@ -76,13 +76,13 @@ IMAGE_STATISTICS, cube, COUNT = pixelNum
nb_errors=0
;
if pixelNumber NE 466200 then nb_errors=nb_errors+1
-if ~DIFF_BELOW_TOL(pixelTotal, 2.26349e+07, 1e3) then nb_errors=nb_errors+1
+if ~DIFF_BELOW_TOL(pixelTotal, 2.26349e+07, 7e3) then nb_errors=nb_errors+1
if ~DIFF_BELOW_TOL(pixelMax, 255.0, 0.001) then nb_errors=nb_errors+1
-if ~DIFF_BELOW_TOL(pixelMean, 48.5520, 0.0001) then nb_errors=nb_errors+1
+if ~DIFF_BELOW_TOL(pixelMean, 48.5520, 0.004) then nb_errors=nb_errors+1
if ~DIFF_BELOW_TOL(pixelMin,0.0, 0.0001) then nb_errors=nb_errors+1
-if ~DIFF_BELOW_TOL(pixelDeviation, 65.5660, 0.0001) then nb_errors=nb_errors+1
-if ~DIFF_BELOW_TOL(pixelSquareSum, 3.10312e+09, 1e4) then nb_errors=nb_errors+1
-if ~DIFF_BELOW_TOL(pixelVariance, 4298.91, 0.01) then nb_errors=nb_errors+1
+if ~DIFF_BELOW_TOL(pixelDeviation, 65.5660, 0.004) then nb_errors=nb_errors+1
+if ~DIFF_BELOW_TOL(pixelSquareSum, 3.10312e+09, 4e6) then nb_errors=nb_errors+1
+if ~DIFF_BELOW_TOL(pixelVariance, 4298.91, 0.5) then nb_errors=nb_errors+1
;
if (nb_errors GT 0) then begin
MESSAGE, /continue, 'Number of Errors: '+STRING(nb_errors)
Hi
This code and "test_read_standard_images.pro" (not automatically run) and related to ImageMagick (IM) and GraphicMagick (GM) related codes in GDL. Since years, we encountered many changes and regressions in IM.
But it is still not clear for me why, on some systems, we receive one kind of results, and on other ones another value. I would expect that values and range on PNG or JPG images are always the same ...
For me, it would be better not to change the tests (except problems with links or md5sum) but understanding why outputs may change depending the code (IM and GM) and it version.
Few cases with given versions of IM returns internal errors in GDL. These tests helps to know if we are using a buggy version of IM.
Suggestions welcome.
Alain
Let me know what else I can provide then to try to determine what the differences are.
Let's move the discussion here: https://github.com/gnudatalanguage/gdl/issues/188