Copyright: technology sharing, CSDN Longji https://blog.csdn.net/longji/article/details/78274842
OpenCV end comes scene text detection and recognition cases, opencv_contrib \ modules \ text \ samples \ webcam_demo.cpp. webcam_demo.cpp single character recognition in the picture.
Model files (need to be copied to the Debug or Release directory):
opencv_contrib/modules/text/samples/trained_classifierNM1.xml
opencv_contrib/modules/text/samples/trained_classifierNM2.xml
opencv_contrib/modules/text/samples/OCRHMM_knn_model_data.xml.gz
opencv_contrib/modules/text/samples/trained_classifier_erGrouping.xml
You need a computer equipped with a camera.
02 compilation webcam_demo
Reference opencv01 relatively complete compilation opencv3.3.0 win version , compiled opencv3.3.0 vs2015 version.
Makefile: D:\git\opencv\build\v3.3.0\x64\bin\Debug\text-example-webcam_demo.exe
.
03 webcam_demo project configuration
Set webcam_demo project startup items.
配置属性==>调试==>工作目录=$(OutDir)
- 1
04 operating results
Debug version will run slower, use the Release version. Foundation white character portion is detected in the result. The default is identified in English. Test book is opened to adjust the distance against the camera, i.e., between the detection and identification can 0.1-10FPS.