c# - Individuazione del testo all'interno dell'immagine

original title: "c# - Locating Text within image"


I am currently working on a project and my goal is to locate text in an image. OCR'ing the text is not my intention as of yet. I want to basically obtain the bounds of text within an image. I am using the AForge.Net imaging component for manipulation. Any assistance in some sense or another?

Update 2/5/09: I've since went along another route in my project. However I did attempt to obtain text using MODI (Microsoft Office Document Imaging). It allows you to OCR an image and pull text from it with some ease.

Attualmente sto lavorando a un progetto e il mio obiettivo è individuare il testo in un'immagine. L'OCR del testo non è ancora mia intenzione. Voglio sostanzialmente ottenere i limiti del testo all'interno di un'immagine. Io sono tu ...

Questo è il riepilogo dopo la traduzione, se è necessario visualizzare la traduzione completa, fare clic sull'icona "traduci"

Tutte le risposte
  • Translate

    This is an active area of research. There are literally oodles of academic papers on the subject. It's going to be difficult to give you assistance especially w/o more deatails. Are you looking for specific types of text? Fonts? English-only? Are you familiar with the academic literature?

    "Text detection" is a standard problem in any OCR (optical character recognition) system and consequently there are lots of bits of code on the interwebs that deal with it.

    I could start listing piles of links from google but I suggest you just do a search for "text detection" and start reading :). There is ample example code available as well.

  • Translate

    recognizing text inside an image is indeed a hot topic for researchers in that field, but only begun to grow out of control when captcha's became the "norm" in terms of defense against spam bots. Why use captcha's as protection? well because it is/was very hard to locate (and read) text inside an image!

    The reason why I mention captcha's is because the most advancement* is made within that tiny area, and I think that your solution could be best found there. especially because captcha's are indeed about locating text (or something that resembles text) inside a cluttered image and afterwards trying to read the letters correctly.

    so if you can find yourself a good open source captcha breaking tool you probably have all you need to continue your quest...
    You could probably even throw away the most dificult code that handles the character recognition itself, because those OCR's are used to read distorted text, something you don't have to do.

    *: advancement in terms of visible, usable, and practical information for a "non-researcher"

  • Translate

    If you're ok with using an online API for this, the API at http://www.wisetrend.com/wisetrend_ocr_cloud.shtml can do text detection in addition to just OCR.

  • Translate

    Stroke width transform can do that for you. That's at least what MS developed for their mobile phone OS. A discussion on the implementation is here at https://stackoverflow.com/