OCR Tesseract won't accept 3 channel images (Bug #4074)


Added by Matthew McGovern about 10 years ago. Updated almost 10 years ago.


Status:Done Start date:2014-12-18
Priority:Normal Due date:
Assignee:- % Done:

0%

Category:contrib/text
Target version:-
Affected version:branch 'master' (3.0-dev) Operating System:Linux
Difficulty:Easy HW Platform:x86
Pull request:

Description

While writing some code that uses text::OCRTesseract, I came across an error trace that led me to think there might be an error in the logic with text::OCRTesseract::run().
This was a runtime error code, while attempting to pass an RBG

The error code:
/home/username/opencv_contrib/modules/text/src/ocr_tesseract.cpp:130: error: (-215) (image.type() CV_8UC1) || (image.type() CV_8UC1) in function run

Notice the two 'or' logic checks are looking for the same type of image, I checked the Documentation and this function should accept an image CV_8UC1 or CV_8UC3. Should this be changed?

First bug report, be nice if my formatting is bad! Thanks ya'll.


Associated revisions

Revision b46719b0
Added by Vadim Pisarevsky almost 10 years ago

Merge pull request #4074 from vpisarev:objdetect_fixes

History

Updated by Vadim Pisarevsky almost 10 years ago

  • Category set to contrib/text

Updated by Lluis Gomez almost 10 years ago

Fixed in Pull Request #253 https://github.com/Itseez/opencv_contrib/pull/253

Seems to be just typo-error because Tesseract API can handle correctly with RGB images (double-checked and it works).

  • Status changed from New to Done

Also available in: Atom PDF