Search code examples
opencvtext-recognition

Runtime error in Opencv text module sample code "webcam_demo"


When I run other samples code of module text , everything is well. But when I tried to run webcam_demo program I got this error:

Error: Illegal min or max specification!
"Fatal error encountered!" == NULL:Error:Assert failed:in file globaloc.cpp, line 75

The debugger breaks execution right before this line:

ocrs.push_back(OCRTesseract::create());

webcam_demo.cpp

Thank you for helping out


Solution

  • I had same problem, when using tesseract with OpenCV. When I moved initialization before anything else, it started to work.