From 31d113789020b37e8de6a53e61191e385840fcc9 Mon Sep 17 00:00:00 2001 From: Alexander Alekhin Date: Sat, 26 Nov 2016 01:19:18 +0300 Subject: [PATCH] text: minor refactoring in C++ sample --- modules/text/samples/textdetection.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/modules/text/samples/textdetection.cpp b/modules/text/samples/textdetection.cpp index 2cf67b0cb..6d167b4a0 100644 --- a/modules/text/samples/textdetection.cpp +++ b/modules/text/samples/textdetection.cpp @@ -32,7 +32,6 @@ int main(int argc, const char * argv[]) if (argc < 2) show_help_and_exit(argv[0]); - namedWindow("grouping",WINDOW_NORMAL); Mat src = imread(argv[1]); // Extract channels to be processed individually @@ -70,8 +69,8 @@ int main(int argc, const char * argv[]) imshow("grouping",src); cout << "Done!" << endl << endl; - cout << "Press 'e' to show the extracted Extremal Regions, any other key to exit." << endl << endl; - if( waitKey (-1) == 101) + cout << "Press 'space' to show the extracted Extremal Regions, any other key to exit." << endl << endl; + if ((waitKey()&0xff) == ' ') er_show(channels,regions); // memory clean-up