Comments (4)
Maybe I should add an example where the output is there same:
gives:
Using pyocr tool 'Tesseract (C-API)'
l/Z
Using pyocr tool 'Tesseract (sh)'
l/Z
Which was more like what I would've expected. Ignore that the text is wrong; I know how to fix that, but at least the output is consistent.
from pyocr.
I observed a similar problems when making the tests. The output of libtesseract and tesseract (sh) are slightly different. Quite frankly I'm not sure where this difference comes from.
Currently, my main theory is that it comes from the way images are read:
- with libtesseract, the input image is loaded by PIllow, turned into a raw image and then passed directly to libtesseract.
- With tesseract (sh), Pillow read the image, save it back as a .bmp, then tesseract loads this .bmp using libleptonica and pass it raw to Tesseract.
Maybe somewhere there is a slight difference in the way images are encoded / decoded that makes the OCR reacts differently.
from pyocr.
I don't know if it's related to this issue, but one difference between tesseract and libtesseract is the default psm. The default psm in tesseract is '3', while in libtesseract it's '6'.
from pyocr.
Good point. It might explain the differences. I'll have a look later.
from pyocr.
Related Issues (20)
- -psm tesseract parameter is deprecated HOT 2
- Could we get a confidence value by each word? HOT 4
- In a multipage TIFF, results are returned only from the first page HOT 16
- I want use chinese char, but acc is low HOT 3
- tessedit_char_whitelist . detect only predefined chars . HOT 15
- [libtesseract] output of get_available_builders() is incomplete HOT 2
- The result is empty HOT 2
- Test environment to make tests reproducable HOT 1
- preserve_interword_spaces in tesseract HOT 1
- Extract Individual Characters
- [Libtesseract] Reduce calls to tesseract_raw.init() HOT 5
- Using libtesseract on Windows HOT 3
- 1 recognize 3 issue HOT 1
- File not found HOT 5
- Difference between pyocr, pytesseract, tesserocr HOT 2
- Different results generated from pyocr and tesseract HOT 1
- Problem allocate memory HOT 4
- tesseract4 error in detect orientation HOT 1
- Trying to OCR a jpeg but getting [Error 3221225477]? HOT 7
- pyocr with latest Tesseract fails with pyocr.error.TesseractError: "Error, unknown command line argument '-psm'\n") HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pyocr.