运行测试程序时出现错误:
! image to reco: data/holiday_notification.jpg
Traceback (most recent call last):
File "./bin/deep_ocr_reco", line 137, in
show_img(raw, title="raw image")
File "./bin/deep_ocr_reco", line 27, in show_img
plt.gray()
File "/mnt/OCR/deep_ocr_env/local/lib/python2.7/site-packages/matplotlib/pyplot.py", line 3829, in gray
set_cmap("gray")
File "/mnt/OCR/deep_ocr_env/local/lib/python2.7/site-packages/matplotlib/pyplot.py", line 2269, in set_cmap
im = gci()
File "/mnt/OCR/deep_ocr_env/local/lib/python2.7/site-packages/matplotlib/pyplot.py", line 335, in gci
return gcf()._gci()
File "/mnt/OCR/deep_ocr_env/local/lib/python2.7/site-packages/matplotlib/pyplot.py", line 601, in gcf
return figure()
File "/mnt/OCR/deep_ocr_env/local/lib/python2.7/site-packages/matplotlib/pyplot.py", line 548, in figure
**kwargs)
File "/mnt/OCR/deep_ocr_env/local/lib/python2.7/site-packages/matplotlib/backend_bases.py", line 161, in new_figure_manager
return cls.new_figure_manager_given_figure(num, fig)
File "/mnt/OCR/deep_ocr_env/local/lib/python2.7/site-packages/matplotlib/backends/_backend_tk.py", line 1044, in new_figure_manager_given_figure
window = Tk.Tk(className="matplotlib")
File "/usr/lib/python2.7/lib-tk/Tkinter.py", line 1767, in init
self.tk = _tkinter.create(screenName, baseName, className, interactive, wantobjects, useTk, sync, use)
_tkinter.TclError: no display name and no $DISPLAY environment variable
运行测试程序时出现错误: ! image to reco: data/holiday_notification.jpg Traceback (most recent call last): File "./bin/deep_ocr_reco", line 137, in
show_img(raw, title="raw image")
File "./bin/deep_ocr_reco", line 27, in show_img
plt.gray()
File "/mnt/OCR/deep_ocr_env/local/lib/python2.7/site-packages/matplotlib/pyplot.py", line 3829, in gray
set_cmap("gray")
File "/mnt/OCR/deep_ocr_env/local/lib/python2.7/site-packages/matplotlib/pyplot.py", line 2269, in set_cmap
im = gci()
File "/mnt/OCR/deep_ocr_env/local/lib/python2.7/site-packages/matplotlib/pyplot.py", line 335, in gci
return gcf()._gci()
File "/mnt/OCR/deep_ocr_env/local/lib/python2.7/site-packages/matplotlib/pyplot.py", line 601, in gcf
return figure()
File "/mnt/OCR/deep_ocr_env/local/lib/python2.7/site-packages/matplotlib/pyplot.py", line 548, in figure
**kwargs)
File "/mnt/OCR/deep_ocr_env/local/lib/python2.7/site-packages/matplotlib/backend_bases.py", line 161, in new_figure_manager
return cls.new_figure_manager_given_figure(num, fig)
File "/mnt/OCR/deep_ocr_env/local/lib/python2.7/site-packages/matplotlib/backends/_backend_tk.py", line 1044, in new_figure_manager_given_figure
window = Tk.Tk(className="matplotlib")
File "/usr/lib/python2.7/lib-tk/Tkinter.py", line 1767, in init
self.tk = _tkinter.create(screenName, baseName, className, interactive, wantobjects, useTk, sync, use)
_tkinter.TclError: no display name and no $DISPLAY environment variable
环境: Ubuntu 14.04 Python 2.7