Algorithm to detect presence of text on image

后端 未结 3 384
[愿得一人]
[愿得一人] 2020-11-28 07:50

With my new assignment I am looking for a method to detect the presence of text on image. The image is a map - can be for example google map. The task is to detect where the

相关标签:
3条回答
  • 2020-11-28 08:32

    There are several possible approaches you can take.

    1. Use OCR. A search for OCR on Stackoverflow will show many options. These include Tesseract and Ocropus.
    2. If your text uses very specific fixed font, you may get away with simple template matching.
    3. In the more general case you might want to take a look at "Detecting Text in Natural Scenes with Stroke Width Transform"

    UPDATE Jan. 2017
    The OpenCV 3.2 contrib module now has a text detection module.
    It also includes a sample of how to use it.

    0 讨论(0)
  • 2020-11-28 08:32

    You need to tune this to a specific type of map images, or the problem is going to be very difficult (see the previous post about links to articles).

    OCR is the way to go, and you should use an existing library. However, OCR is mainly done on text on white backgrounds. To reduce your problem to a regular OCR problem, you should attempt to work on the color space of the map. Likely the map text has a very specific color and this may be enough to find these pixels. You can then filter the detected pixels based on the size of connected regions.

    If you literally only want to find the locations of text labels, you can do the above, and pretty much just skip the OCR step. If the labels are not too close, simple clustering algorithms can be used to find their respective positions.

    0 讨论(0)
  • 2020-11-28 08:34

    There is a standard problem in vision called text detection in images. it is quite different to OCR. OCR concerms itself with what it says, while text detection is about determining if there is text in the image. Adi Shavit's third link is a method to address this problem. You can look on google scholar well cited articles on text detection.

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