OCR of low-resolution text from screenshots

后端 未结 3 1555
悲&欢浪女
悲&欢浪女 2021-02-15 17:36

I\'m writing an OCR application to read characters from a screenshot image. Currently, I\'m focusing only on digits. I\'m partially basing my approach on this blog post: http:

相关标签:
3条回答
  • 2021-02-15 18:23

    I can tell you from my experience and from reading several papers on character classification, that a good way to start is by reading about Principal Component Analysis (PCA), Fisher's Linear Discriminant Analysis (LDA), and Support Vector Machines (SVMs). These are classification methods that are extremely useful for OCR, and it turns out that OpenCV already includes excellent implementations on PCAs and SVMs. I haven't seen any OpenCV code examples for OCR, but you can use some modified version of face classification to perform character classification. An excellent resource for face recognition code for OpenCV is this website.

    Another library for Python that I recommend you is "scikits.learn". It is very easy to send cvArrays to scikits.learn and run machine learning algorithms on your data. A basic example for OCR using SVM is here.

    Another more complicated example using manifold learning for handwritten character recognition is here.

    0 讨论(0)
  • 2021-02-15 18:27

    I would look into using Haar cascades. I've used them for face detection/head tracking, and it seems like you could build up a pretty good set of cascades with enough '2's, '3's, '4's, and so on.

    http://alereimondo.no-ip.org/OpenCV/34

    http://en.wikipedia.org/wiki/Haar-like_features

    0 讨论(0)
  • 2021-02-15 18:36

    OCR on noisy images is not easy - so simple approaches no not work well.

    So, I would recommend you to use HOG to extract features and SVM to classify. HOG seems to be one of the most powerful ways to describe shapes.

    The whole processing pipeline is implemented in OpenCV, however I do not know the function names in python wrappers. You should be able to train with the latest haartraining.cpp - it actually supports more than haar - HOG and LBP also.

    And I think the latest code (from trunk) is much improved over the official release (2.3.1).

    HOG usually needs just a fraction of the training data used by other recognition methods, however, if you want to classify shapes that are partially ocludded (or missing), you should make sure you include some such shapes in training.

    0 讨论(0)
提交回复
热议问题