display_ocr | Real-time image preprocess and OCR | Computer Vision library
kandi X-RAY | display_ocr Summary
kandi X-RAY | display_ocr Summary
OpenCV-Python + python-tesseract real-time image preprocess and OCR. Trained data for 7 segments font avaliable under letsgodigital folder. Web-app using trained data: (Not always up, due to the low cost server). 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).
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- This function is called by the main thread
- Check if the given rectangle is a rectangle
- Handle a shape event
- Define a rectangle
display_ocr Key Features
display_ocr Examples and Code Snippets
Community Discussions
Trending Discussions on display_ocr
QUESTION
I'm working on performing OCR of energy meter displays: example 1 example 2 example 3
I tried to use tesseract-ocr with the letsgodigital trained data. But the performance is very poor.
I'm fairly new to the topic and this is what I've done:
...ANSWER
Answered 2021-Apr-19 at 06:01Notice how your power meters either use blue or green LEDs to light up the display; I suggest you use this color display to your advantage. What I'd do is select only one RGB channel based on the LED color. Then I can threshold it based on some algorithm or assumption. After that, you can do the downstream steps of cropping / resizing / transformation / OCR etc.
For example, using your example image 1, look at its histogram here. Notice how there is a small peak of green to the right of the 150 mark.
I take advantage of this, and set anything below 150 to zero. My assumption being that the green peak is the bright green LED in the image.
QUESTION
I am trying to train Tesseract 4 with particular pictures (to read multimeters with 7 segments),
please note that I am aware of the allready trained data from Arthur Augusto at https://github.com/arturaugusto/display_ocr but I need to train Tesseract over my own data.
In order to train tess, I followed differents tutorials (as https://robipritrznik.medium.com/recognizing-vehicle-license-plates-on-images-using-tesseract-4-ocr-with-custom-trained-models-4ba9861595e7 or https://pretius.com/how-to-prepare-training-files-for-tesseract-ocr-and-improve-characters-recognition/)
but i allways get problem when running the shapeclustering command with my own data
(With example data as https://github.com/tesseract-ocr/tesseract/issues/1174#issuecomment-338448972, every things is working fine)
Indeed when I try to do the shapeclusturing command it have this output screenshot Then my shape_table is empty and the trainig could'nt be efficient...
With example data it's working fine and the shape_table is well filled
I am guessing that I have issue with box file generation, here is my process to create box file :
I use the
...ANSWER
Answered 2020-Dec-09 at 21:47Ok so finally I achieved to train tesseract.
The solution is to add a --psm
parameter when using the command
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install display_ocr
You can use display_ocr like any standard Python library. You will need to make sure that you have a development environment consisting of a Python distribution including header files, a compiler, pip, and git installed. Make sure that your pip, setuptools, and wheel are up to date. When using pip it is generally recommended to install packages in a virtual environment to avoid changes to the system.
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page