Comment out direct print statements during tesseract run invocations

This statement interferes with regular logging on the client side
where the OpenCV library's outputs cannot be managed by the user
and forcefully print out in the client code. For instance, this
is observed when OpenCV is used as a python library where it is
expected to provide optional loggers instead of direct writes to
stdout.
pull/1533/head
Plamen Dimitrov 7 years ago
parent 0ac290f8f7
commit 7ccfdbef66
  1. 2
      modules/text/src/ocr_tesseract.cpp

@ -116,7 +116,7 @@ CV_WRAP String OCRTesseract::run(InputArray image, InputArray mask, int min_conf
run(image_m, mask_m, output1, NULL, &component_texts, &component_confidences, component_level);
for(unsigned int i = 0; i < component_texts.size(); i++)
{
cout << "confidence: " << component_confidences[i] << " text:" << component_texts[i] << endl;
// cout << "confidence: " << component_confidences[i] << " text:" << component_texts[i] << endl;
if(component_confidences[i] > min_confidence)
{

Loading…
Cancel
Save