subokita / Robust-Text-Detection

Robust Text Detection implementation based on http://www.stanford.edu/~hchen2/papers/ICIP2011_RobustTextDetection.pdf
MIT License
157 stars 80 forks source link

Error for rectangular images #2

Closed mihaelkovach closed 10 years ago

mihaelkovach commented 10 years ago

For rectangular images I always see this error:

Error in file "c:/2.PNG" processing: ........\opencv\modules\core\src\matrix.cpp:323: error: (-215) 0 <= roi.x && 0 <= roi.width && roi.x + roi.width <= m.cols && 0 <= roi.y && 0 <= roi.height && roi.y + roi.height <= m.rows in function cv::Mat::Mat

Example of the image: 2

subokita commented 10 years ago

Yeah sadly, my example of Robust Text Detection is tailored for that specific image. You might want to add additional check so that the resulting detection window is still within the image.

mihaelkovach commented 10 years ago

I located the errors. These are lines 51-52 in main.cpp

subokita commented 10 years ago

Hmm, I don't encounter any exceptions or segfaults. Here's the output result out

And here's the detected text that I printed out: HANDICAPPED ‘“ PARKING SPECIAL PLATE REQUIRED UNAUTHORIZED VEHICLES MAV BE TOWED AT OWNERS EXPENSE "3 W