diff --git a/modules/text/samples/webcam_demo.cpp b/modules/text/samples/webcam_demo.cpp index bf13a5f39..3042ee218 100644 --- a/modules/text/samples/webcam_demo.cpp +++ b/modules/text/samples/webcam_demo.cpp @@ -59,9 +59,9 @@ private: public: Parallel_OCR(vector &_detections, vector &_outputs, vector< vector > &_boxes, - vector< vector > &_words, vector< vector > &_confidences, + vector< vector > &_words, vector< vector > &_confidences, vector< Ptr > &_ocrs) - : detections(_detections), outputs(_outputs), boxes(_boxes), words(_words), + : detections(_detections), outputs(_outputs), boxes(_boxes), words(_words), confidences(_confidences), ocrs(_ocrs) {} @@ -87,7 +87,7 @@ int main(int argc, char* argv[]) cout << endl << argv[0] << endl << endl; cout << "A demo program of End-to-end Scene Text Detection and Recognition using webcam." << endl << endl; cout << " Usage: " << argv[0] << " [camera_index]" << endl << endl; - cout << " Press 'e' to switch between MSER/CSER regions." << endl; + cout << " Press 'r' to switch between MSER/CSER regions." << endl; cout << " Press 'g' to switch between Horizontal and Arbitrary oriented grouping." << endl; cout << " Press 'o' to switch between OCRTesseract/OCRHMMDecoder recognition." << endl; cout << " Press 's' to scale down frame size to 320x240." << endl; @@ -140,7 +140,7 @@ int main(int argc, char* argv[]) vector< Ptr > decoders; for (int o=0; o words_detection; float min_confidence1 = 0.f, min_confidence2 = 0.f; - + if (RECOGNITION == 0) { min_confidence1 = 51.f; min_confidence2 = 60.f; @@ -261,9 +261,9 @@ int main(int argc, char* argv[]) vector< vector > boxes((int)detections.size()); vector< vector > words((int)detections.size()); vector< vector > confidences((int)detections.size()); - + // parallel process detections in batches of ocrs.size() (== num_ocrs) - for (int i=0; i<(int)detections.size(); i=i+(int)num_ocrs) + for (int i=0; i<(int)detections.size(); i=i+(int)num_ocrs) { Range r; if (i+(int)num_ocrs <= (int)detections.size())