Training Tesseract 3 to recognize numbers from real images of gas meters

后端 未结 4 601
有刺的猬
有刺的猬 2021-02-08 18:39

I\'m trying to train tesseract to recognize numbers from real images of gas meters.

The images that I use for training are made with a camera, for this reason there are

4条回答
  •  庸人自扰
    2021-02-08 19:30

    I would try this simple ImageMagick command first:

     convert          \
        original.jpg  \
       -threshold 50% \
        result.jpg
    

    (Play a bit with the 50% parameter -- try with smaller and higher values...)

    Thresholding basically leaves over only 2 values, zero or maximum, for each color channel. Values below the threshold get set to 0, values above it get set to 255 (or 65535 if working at 16-bit depth).

    Depending on your original.jpg, you may have a OCR-able, working, very high contrast image as a result.

提交回复
热议问题