Skip to content

Commit 071eb5a

Browse files
committed
Merge pull request #69 from thorikawa/fix-usage-text
Fix key name to switch between MSER/CSER regions.
2 parents 1ce1522 + d9d8db3 commit 071eb5a

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

modules/text/samples/webcam_demo.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,9 @@ class Parallel_OCR: public cv::ParallelLoopBody
5959

6060
public:
6161
Parallel_OCR(vector<Mat> &_detections, vector<string> &_outputs, vector< vector<Rect> > &_boxes,
62-
vector< vector<string> > &_words, vector< vector<float> > &_confidences,
62+
vector< vector<string> > &_words, vector< vector<float> > &_confidences,
6363
vector< Ptr<T> > &_ocrs)
64-
: detections(_detections), outputs(_outputs), boxes(_boxes), words(_words),
64+
: detections(_detections), outputs(_outputs), boxes(_boxes), words(_words),
6565
confidences(_confidences), ocrs(_ocrs)
6666
{}
6767

@@ -87,7 +87,7 @@ int main(int argc, char* argv[])
8787
cout << endl << argv[0] << endl << endl;
8888
cout << "A demo program of End-to-end Scene Text Detection and Recognition using webcam." << endl << endl;
8989
cout << " Usage: " << argv[0] << " [camera_index]" << endl << endl;
90-
cout << " Press 'e' to switch between MSER/CSER regions." << endl;
90+
cout << " Press 'r' to switch between MSER/CSER regions." << endl;
9191
cout << " Press 'g' to switch between Horizontal and Arbitrary oriented grouping." << endl;
9292
cout << " Press 'o' to switch between OCRTesseract/OCRHMMDecoder recognition." << endl;
9393
cout << " Press 's' to scale down frame size to 320x240." << endl;
@@ -140,7 +140,7 @@ int main(int argc, char* argv[])
140140
vector< Ptr<OCRHMMDecoder> > decoders;
141141
for (int o=0; o<num_ocrs; o++)
142142
{
143-
decoders.push_back(OCRHMMDecoder::create(loadOCRHMMClassifierNM("OCRHMM_knn_model_data.xml.gz"),
143+
decoders.push_back(OCRHMMDecoder::create(loadOCRHMMClassifierNM("OCRHMM_knn_model_data.xml.gz"),
144144
voc, transition_p, emission_p));
145145
}
146146
cout << " Done!" << endl;
@@ -236,7 +236,7 @@ int main(int argc, char* argv[])
236236
float scale_font = (float)(2-scale_img)/1.4f;
237237
vector<string> words_detection;
238238
float min_confidence1 = 0.f, min_confidence2 = 0.f;
239-
239+
240240
if (RECOGNITION == 0)
241241
{
242242
min_confidence1 = 51.f; min_confidence2 = 60.f;
@@ -261,9 +261,9 @@ int main(int argc, char* argv[])
261261
vector< vector<Rect> > boxes((int)detections.size());
262262
vector< vector<string> > words((int)detections.size());
263263
vector< vector<float> > confidences((int)detections.size());
264-
264+
265265
// parallel process detections in batches of ocrs.size() (== num_ocrs)
266-
for (int i=0; i<(int)detections.size(); i=i+(int)num_ocrs)
266+
for (int i=0; i<(int)detections.size(); i=i+(int)num_ocrs)
267267
{
268268
Range r;
269269
if (i+(int)num_ocrs <= (int)detections.size())

0 commit comments

Comments
 (0)