read numbers and letters from an image using openCV

后端 未结 5 1457
鱼传尺愫
鱼传尺愫 2021-01-30 09:28

I am developing an application to read the letters and numbers from an image using opencv in c++. I first changed the given colour image and colour template to binary image, the

5条回答
  •  误落风尘
    2021-01-30 10:04

    As of OpenCV 3.0 (in active dev), you can use the built-in "scene text" object detection module ~

    • Reference: http://docs.opencv.org/3.0-beta/modules/text/doc/erfilter.html

    • Example: https://github.com/Itseez/opencv_contrib/blob/master/modules/text/samples/textdetection.cpp

    The text detection is built on these two papers:

    • [Neumann12] Neumann L., Matas J.: Real-Time Scene Text Localization and Recognition, CVPR 2012. The paper is available online at http://cmp.felk.cvut.cz/~neumalu1/neumann-cvpr2012.pdf

    • [Gomez13] Gomez L. and Karatzas D.: Multi-script Text Extraction from Natural Scenes, ICDAR 2013. The paper is available online at http://refbase.cvc.uab.es/files/GoK2013.pdf

    Once you've found where the text in the scene is, you can run any sort of standard OCR against those slices (Tesseract OCR is common). And there's now an end-to-end sample in opencv using OpenCV's new interface to Tesseract:

    • https://github.com/Itseez/opencv_contrib/blob/master/modules/text/samples/end_to_end_recognition.cpp

提交回复
热议问题