I've run through the installation process, and am trying to run the run-test script. I keep getting the error "expected a segmentation with white background" when running ocropus-ngraphs (see output below) - it's failing because the max of 255 is being checked against an expected value of 0xffffff. However, if I modify the code, and change 0xffffff to 0xff the run-test script works. Not sure if this is a bug?
+ true
+ true language model application
+ true
+ ocropus-ngraphs 'temp/????/??????.lattice'
loading /usr/local/share/ocropus/en-mixed-4.ngraphs
processing 92 files
temp/0001/010001.lattice =NGRAPHS= 21.29 BOOK REVIEIP
Traceback (most recent call last):
File "/usr/local/bin/ocropus-ngraphs", line 294, in <module>
rseg = ocrolib.read_line_segmentation(rname)
File "/usr/local/lib/python2.7/dist-packages/ocrolib/toplevel.py", line 194, in argument_checks
result = f(*args,**kw)
File "/usr/local/lib/python2.7/dist-packages/ocrolib/common.py", line 207, in read_line_segmentation
result = make_seg_black(image)
File "/usr/local/lib/python2.7/dist-packages/ocrolib/toplevel.py", line 190, in argument_checks
raise e
ocrolib.toplevel.CheckError:
CheckError for argument 'image' in call to function: '<function make_seg_black at 0x3810aa0>'
<ndarray-13b67fd0 (60, 583) int32 [1,255]> of type <type 'numpy.ndarray'>: expected a segmentation with white background