How to OCR engraved text?

后端 未结 4 1745
借酒劲吻你
借酒劲吻你 2021-02-06 06:47

I have this image

\"Image

How to OCR it? I know this is very challenging, but I would

相关标签:
4条回答
  • 2021-02-06 07:32

    If you have the time to develop the detection yourself, I would do it roughly like this:

    1. Get 1000 images or so and either OCR them yourself or let the people on Amazon Mechanical Turk do it for you, it will cost virtually nothing. Now you have something to tune your algorithm on and measure how well you are doing.
    2. Like Ryan wrote, play with standard image filters, contrast, color, gauss, etc, manually or with something like http://www.roborealm.com/ . See if you can't find a combination that makes the text really stand out.
    3. Try the libraries again
    4. If the libs still don't work, try to use your knowledge of the picture to split it into separate digits. You know how many digits there should be and roughly how many pixels each should take. Use edge detection or something (perhaps standard OCR feature extraction, together with clustering will give you each digit as a cluster?) to find the digits and split them out separately.
    5. Do standard OCR feature extraction (don't be too creative - use existing libraries or at least read up on what the most common and simple are) on each digit and feed those features, together with the answer you got under 1) into a neural network or a SVM.
    6. Improve your feature set until the machine learning works.

    Since you have only ten digits, which are fairly consistent between images, this should work.

    0 讨论(0)
  • 2021-02-06 07:40

    Machine learning (here, using some neutral network) for digits is usually accurate already with minimal training and easy to use.

    One DIY approach:

    1. The output from some neural net might be ???1160060060??1??? for the first character. From this you should pick the most commonly appearing (0).

    2. To get the ordering of recognised digits right, use a "moving window", so as if you crop out a tiny part of the width of the image.

    3. Repeat this over the whole width of the image.

    The trickiest bit is quite likely about figuring out the space between one digit and the next.

    If you're lucky the digits are always the same size (monispaced) and you can decide ahead of time how many pixels you need. Otherwise this can would normally be done in a calibration step before feeding pixels into the neural network.

    If the image can be rotated it might actually make sense to have a separate neural network help you figure out the rotation.

    Programmers (and me) tried out digit recognition already on Commodore computers in the 1980s! Nowadays, you might find some university AI courses that have tasks similar to this one.

    0 讨论(0)
  • 2021-02-06 07:44

    I would suggest 2 libraries to get you going:

    1. Tesseract
    2. Emgu CV - comes with loads of examples look for the license plate detection one as a good place to start.
    0 讨论(0)
  • 2021-02-06 07:48

    Try playing with the contrast and gamma on the image. All you need is a solid outline on the characters for most libraries. Depending on your performance SLA, you could run through various contrast/gamma scenarios and let the OCR software take a couple of shots at it. Take an aggregate of the results and see if there are any consistencies. This could give you a fairly accurate result long term.

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