Giter Site home page Giter Site logo

display_ocr's Introduction

Display OCR

Unmaintained. Alternative traineddata avaliable at https://github.com/Shreeshrii/tessdata_ssd or alternative implementation that don't use tesseract: https://github.com/arturaugusto/7seg-ocr.


OpenCV-Python + python-tesseract real-time image preprocess and OCR.

alt tag

Trained data for 7 segments font avaliable under letsgodigital folder.

Web-app using trained data: http://ocr.sytes.net (Not always up, due to the low cost server)

Reference: https://code.google.com/p/python-tesseract/

Tips to achieve better results:

  • Use erode to avoid gaps between the segments.
  • Avoid direct light on the display (I use parchment paper to diffuse the light)

License: GPL v2

display_ocr's People

Contributors

arturaugusto avatar nichtjens avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

display_ocr's Issues

Training

Hi,

I have compiled Tesseract 3.05.2 with Leptonica 1.76.0.

When I try to run your trainig:
python2 tesseract-trainer.py

I get very small output letsgodigital.tesstrain file, 144 kb.

And errors like these:

read_params_file: Can't open nobatch
read_params_file: Can't open box.train.stderr
Tesseract Open Source OCR Engine v3.05.02 with Leptonica
Empty page!!
Empty page!!

P.S. I set properly TESSDATA_PREFIX to your folder ./letsgodigital/

Question is s Tesseract 3.02 necessary for the training?

How to run it?

I have installed the files via git clone. I don't know how to use it.
Please do help, thanks

Update to python 3?

Hey,
Is possible for this to be updated to work in python 3? I've had a play with the getting it to work but it seems that the wrapper for tesseracts API is broken.

Thanks.

problem with OCR.py

Hi ! I have a problem with OCR.py (ubuntu) :

lorisson@lorisson-MS-7677:/usr/lib/python2.7$ /home/lorisson/Bureau/display_ocr-master/OCR.py
Traceback (most recent call last):
  File "/home/lorisson/Bureau/display_ocr-master/OCR.py", line 104, in <module>
    thresh = ConfigSectionMap("PREPROCESS")['threshold']
  File "/home/lorisson/Bureau/display_ocr-master/OCR.py", line 17, in ConfigSectionMap
    options = Config.options(section)
  File "/usr/lib/python2.7/ConfigParser.py", line 279, in options
    raise NoSectionError(section)
ConfigParser.NoSectionError: No section: 'PREPROCESS'

Recognizing 26 but not 43 for me

Sorry, this isn't really an issue, more of a plea for help. I am executing the follow statement from python on the two attached images:

text = pytesseract.image_to_string(Image.open(filename), lang="letsgodigital", boxes=False, config="digits")

The "26" works fine but the "43" doesn't come back with a result. Anything I could try? I tried dilating the image further but no luck. Is it because the "43" is slightly rotated? Perhaps because the 3 is too close to the edge of the image?

26
43

some error in tesseract or OCR.py?

I install python-opencv and python-teressact and run OCR.py. This is my result:

nano@nano-MOV:$ cd display_ocr-master/
nano@nano-MOV:
/display_ocr-master$ python OCR.py
VIDIOC_QUERYMENU: Invalid argument
VIDIOC_QUERYMENU: Invalid argument
VIDIOC_QUERYMENU: Invalid argument
Error opening data file ./tessdata/letsgodigital.traineddata
Please make sure the TESSDATA_PREFIX environment variable is set to the parent directory of your "tessdata" directory.
Failed loading language 'letsgodigital'
Tesseract couldn't load any languages!

the program is going on but when i want to select a region the application stop:

Traceback (most recent call last):
File "OCR.py", line 203, in
Recognize(iplimage)
File "OCR.py", line 39, in Recognize
full_text = api.GetUTF8Text()
File "/usr/lib/python2.7/dist-packages/tesseract.py", line 10556, in
getattr = lambda self, name: _swig_getattr(self, TessBaseAPI, name)
File "/usr/lib/python2.7/dist-packages/tesseract.py", line 57, in _swig_getattr
raise AttributeError(name)
AttributeError: GetUTF8Text

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.