Closed GoogleCodeExporter closed 8 years ago
Thank you for your report. I agree that there should be an explanation in the
README of how to use the regression tests. This will be added for 1.70.
The regression tests covered by alltests_reg include about 40% of the programs
in the prog directory.
You need to first run
alltests_reg generate
to generate the golden files in /tmp/golden/
(suggest you make this directory first, just in case ...)
Then you can run
alltests_reg compare (to compare results with golden files)
You can also run
alltests_reg display (to throw a lot of results up on your display)
The warnings you saw are not a problem. The errors were because there were no
golden files. I'm surprised you got 37/46 correct. That may be a bug; if so,
it will be fixed in 1.70.
Original comment by dan.bloo...@gmail.com
on 23 Jul 2013 at 4:07
Excellent. Running "alltests_reg generate" produces 68 warnings:
53 Warning in pixConvertTo8Or32: pix has colormap; removing
5 Warning in pixWriteStreamBmp: writing 2 bpp bmp file; nobody else can read
2 Warning in pixSauvolaBinarizeTiled: tile height too small; ny reduced to 78
2 Warning in pixSauvolaBinarizeTiled: tile height too small; ny reduced to 28
1 Warning: empty y range [99:99], adjusting to [98.01:99.99]
After this, running "alltests_reg compare" generates
68 Warnings, 15 Failures and 0 Errors:
1 FAILURE: findpattern_reg
1 Failed to complete findpattern_reg
2 Failure in findpattern_reg, index 11: comparing /tmp/findpattern.11.png with /tmp/golden/findpattern_golden.11.png
2 Failure in findpattern_reg, index 15: comparing /tmp/findpattern.15.png with /tmp/golden/findpattern_golden.15.png
2 Failure in findpattern_reg, index 17: comparing /tmp/findpattern.17.png with /tmp/golden/findpattern_golden.17.png
2 Failure in findpattern_reg, index 19: comparing /tmp/findpattern.19.png with /tmp/golden/findpattern_golden.19.png
2 Failure in findpattern_reg, index 3: comparing /tmp/findpattern.3.png with /tmp/golden/findpattern_golden.3.png
2 Failure in findpattern_reg, index 5: comparing /tmp/findpattern.5.png with /tmp/golden/findpattern_golden.5.png
2 Failure in findpattern_reg, index 7: comparing /tmp/findpattern.7.png with /tmp/golden/findpattern_golden.7.png
53 Warning in pixConvertTo8Or32: pix has colormap; removing
5 Warning in pixWriteStreamBmp: writing 2 bpp bmp file; nobody else can read
2 Warning in pixSauvolaBinarizeTiled: tile height too small; ny reduced to 78
2 Warning in pixSauvolaBinarizeTiled: tile height too small; ny reduced to 28
1 Warning: empty y range [99:99], adjusting to [98.01:99.99]
1 Warning: empty y range [51:51], adjusting to [50.49:51.51]
1 Warning: empty y range [1:1], adjusting to [0.99:1.01]
1 Warning: empty y range [0:0], adjusting to [-1:1]
1 Warning in pixModifySaturation: no change requested in saturation
1 Warning in getScaledParametersPS: right edge > 8.5 inch
So I'm guessing only the Failures matter, which are for findpattern_reg
Success in 45 of 46 *_reg programs (output matches the "golden" files)
Original comment by l...@austin.rr.com
on 23 Jul 2013 at 2:31
Lyle, thanks for checking this out.
findpattern_reg runs in 1.70 (beta) without errors, but we'll double check on
the distro.
BTW, can you get findpattern_reg to run if you don't give it any arguments? It
is a nice demonstration of using hit-miss transforms in a pattern-recognition
application.
Original comment by dan.bloo...@gmail.com
on 23 Jul 2013 at 8:40
I figured the purpose of the regressions was to check if my
configuration and build worked correctly. Detect chip and
compiler issues or library problems, for example.
I can run "findpattern_reg" with no arguments, and I get:
> findpattern_reg
################ findpattern_reg ###############
leptonica-1.69
libgif 4.1.6 : libjpeg 6b : libpng 1.5.10 : libtiff 3.9.7 : zlib 1.2.5
Warning in pixConvertTo8Or32: pix has colormap; removing
sh: xzgv: command not found
Time to find patterns = 0.013
Warning in pixConvertTo8Or32: pix has colormap; removing
sh: xzgv: command not found
Warning in pixConvertTo8Or32: pix has colormap; removing
sh: xzgv: command not found
Time to find patterns = 0.006
sh: xzgv: command not found
Warning in pixConvertTo8Or32: pix has colormap; removing
sh: xzgv: command not found
Time to find patterns = 0.001
sh: xzgv: command not found
Warning in pixConvertTo8Or32: pix has colormap; removing
sh: xzgv: command not found
Time to find patterns = 0.004
Warning in pixConvertTo8Or32: pix has colormap; removing
sh: xzgv: command not found
Warning in pixConvertTo8Or32: pix has colormap; removing
sh: xzgv: command not found
Time to find patterns = 0.001
sh: xzgv: command not found
Time: 1.084 sec
################################################
If I run "yum provides xzgv", it should be in package xzgv-0.9.1-5.fc17.x86_64,
which I can install, to get rid of the "command not found" messages, and
creates a lot of windows of the Rome News Tribune.
If I try to compare the output /tmp/findpattern.7.png with the golden
/tmp/golden/findpattern_golden.7.png, they appear to be the same image
(I can use "convert" to convert both of them to GIFs and these are
identical files), but cmp says that they differ. Looking up the PNG
file format, and writing a small program to dump the structure, it
appears the first two chunks are the same (IHDR, pHYs), but they
differ in the 3rd chunk (IDAT) and then the following ones too.
At this point, I'm over my head.
Original comment by l...@austin.rr.com
on 24 Jul 2013 at 12:33
Lyle, 1.70 is released. You can get it at: leptonica.org/download.html
I'm closing this bug. There are occasional differences in the file bytes, even
without any difference in the image. I will continue to make these tests more
robust. The new release lets you use the automake to build and test (see
Makefile.html).
Original comment by dan.bloo...@gmail.com
on 23 Jan 2014 at 8:54
Original issue reported on code.google.com by
l...@austin.rr.com
on 22 Jul 2013 at 8:51