Hi,
I'm attempting to ocr an image, which is of a simple and relatively clear A4 page.
Cuneiform does an ok job, but I'm curious to see if ocropus is better.
I followed the instructions to install on the home page. However, when I do the following from a shell I get some errors.
I type:
ocropus-recognize-book in.png -o out.html
Here is the output I get:
book directory ./_book-017587
in.png -> ./_book-017587/0001.png
=== preprocess
# ocropus-nlbin ./_book-017587/????.png
=== ./_book-017587/0001.png 1
estimating skew angle
estimating thresholds
rescaling
./_book-017587/0001.png lo-hi (0.42 1.45) angle 0.2 no-normalization
writing
Traceback (most recent call last):
File "/usr/local/bin/ocropus-nlbin", line 181, in <module>
process1((f,i+1))
File "/usr/local/bin/ocropus-nlbin", line 161, in process1
gray()
File "/usr/lib/pymodules/python2.7/matplotlib/pyplot.py", line 2951, in gray
im = gci()
File "/usr/lib/pymodules/python2.7/matplotlib/pyplot.py", line 217, in gci
return gcf()._gci()
File "/usr/lib/pymodules/python2.7/matplotlib/pyplot.py", line 369, in gcf
return figure()
File "/usr/lib/pymodules/python2.7/matplotlib/pyplot.py", line 343, in figure
**kwargs)
File "/usr/lib/pymodules/python2.7/matplotlib/backends/backend_tkagg.py", line 80, in new_figure_manager
window = Tk.Tk()
File "/usr/lib/python2.7/lib-tk/Tkinter.py", line 1688, in __init__
self.tk = _tkinter.create(screenName, baseName, className, interactive, wantobjects, useTk, sync, use)
_tkinter.TclError: no display name and no $DISPLAY environment variable
Traceback (most recent call last):
File "/usr/local/bin/ocropus-recognize-book", line 73, in <module>
run(args.preproc,book+"/????.png")
File "/usr/local/bin/ocropus-recognize-book", line 57, in run
assert subprocess.call(args)==0
AssertionError
If anyone can help me overcome these errors that would be greatly appreciated. I can not seem to find any output text at the moment from this operation.
Thanks in advance,
Dan