Skip to content

Commit 31d1137

Browse files
committed
text: minor refactoring in C++ sample
1 parent 1dc84e8 commit 31d1137

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

modules/text/samples/textdetection.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ int main(int argc, const char * argv[])
3232

3333
if (argc < 2) show_help_and_exit(argv[0]);
3434

35-
namedWindow("grouping",WINDOW_NORMAL);
3635
Mat src = imread(argv[1]);
3736

3837
// Extract channels to be processed individually
@@ -70,8 +69,8 @@ int main(int argc, const char * argv[])
7069
imshow("grouping",src);
7170

7271
cout << "Done!" << endl << endl;
73-
cout << "Press 'e' to show the extracted Extremal Regions, any other key to exit." << endl << endl;
74-
if( waitKey (-1) == 101)
72+
cout << "Press 'space' to show the extracted Extremal Regions, any other key to exit." << endl << endl;
73+
if ((waitKey()&0xff) == ' ')
7574
er_show(channels,regions);
7675

7776
// memory clean-up

0 commit comments

Comments
 (0)