@@ -18,7 +18,7 @@ vector< pair<cv::dnn::Backend, cv::dnn::Target> > backendTargetPairs = {
18
18
19
19
std::string keys =
20
20
" { help h | | Print help message. }"
21
- " { model m | text_detection_ch_ppocrv3_2023may .onnx | Usage: Set model type, defaults to text_detection_ch_ppocrv3_2023may.onnx }"
21
+ " { model m | text_detection_cn_ppocrv3_2023may .onnx | Usage: Set model type, defaults to text_detection_ch_ppocrv3_2023may.onnx }"
22
22
" { input i | | Usage: Path to input image or video file. Skip this argument to capture frames from a camera.}"
23
23
" { width | 736 | Usage: Resize input image to certain width, default = 736. It should be multiple by 32.}"
24
24
" { height | 736 | Usage: Resize input image to certain height, default = 736. It should be multiple by 32.}"
@@ -113,7 +113,7 @@ int main(int argc, char** argv)
113
113
int maxCand = parser.get <int >(" max_candidates" );
114
114
double unRatio = parser.get <float >(" unclip_ratio" );
115
115
bool save = parser.get <bool >(" save" );
116
- bool viz = parser.get <float >(" viz" );
116
+ bool viz = parser.get <bool >(" viz" );
117
117
118
118
PPOCRDet model (modelName, inpSize, binThresh, polyThresh, maxCand, unRatio, backendTargetPairs[backendTargetid].first , backendTargetPairs[backendTargetid].second );
119
119
@@ -172,7 +172,10 @@ int main(int argc, char** argv)
172
172
imwrite (" result.jpg" , originalImage);
173
173
}
174
174
if (viz)
175
+ {
175
176
imshow (kWinName , originalImage);
177
+ waitKey (0 );
178
+ }
176
179
}
177
180
else
178
181
imshow (kWinName , originalImage);
0 commit comments