我運行opencv 3.2.0,ubuntu 14.04和最新的opencv_contrib。OpenCV錯誤:ERClassifierNM1中的錯誤參數
我運行檢查: https://github.com/opencv/opencv_contrib/blob/master/modules/text/samples/textdetection.py
但它具有顯示錯誤:
$ python textdetection.py scenetext_word01.jpg
textdetection.py
A demo script of the Extremal Region Filter algorithm described in:
Neumann L., Matas J.: Real-Time Scene Text Localization and Recognition, CVPR 2012
Extracting Class Specific Extremal Regions from 9 channels ...
(...) this may take a while (...)
OpenCV Error: Bad argument (Default classifier file not found!) in ERClassifierNM1, file /home/vietnam/opencv_and_contri/opencv_contrib/modules/text/src/erfilter.cpp, line 1022
Traceback (most recent call last):
File "textdetection.py", line 38, in <module>
erc1 = cv2.text.loadClassifierNM1(pathname+'/trained_classifierNM1.xml')
cv2.error: /home/vietnam/opencv_and_contri/opencv_contrib/modules/text/src/erfilter.cpp:1022: error: (-5) Default classifier file not found! in function ERClassifierNM1
如何解決這個問題?在cv2.text.loadClassifierNM1()和cv2.text.loadClassifierNM2() 參數使用相對路徑所以,現在的那部分代碼
正方體的什麼版本和leptonica沒有你安裝? – SarahData
@SarahM tesseract 3.05.00 leptonica-1.74 libjpeg 8d(libjpeg-turbo 1.4.2):libpng 1.2.54:libtiff 4.0.6:zlib 1.2.8 – Aka
謝謝。項目是以調試模式還是以發佈模式工作?因爲我安裝了它們並在發佈時測試了該項目(它工作正常),但不知道如何進入調試模式,特別是它需要使用cmake再次構建它們。 – SarahData