Comments (7)
Please keep in mind that Pyocr is just a wrapper for Tesseract and Cuneiform. Therefore, does Tesseract or Cuneiform provide such functionality ?
from pyocr.
That's why I stated If it's possible. I don't know if they provide API for that, but Tesseract prints to stdout Emtpy page!!!
when it detects one. I thought you could provide more info on that one.
from pyocr.
I can't find any option related to what you are looking for. I doubt there is one. I think being able to tell there is no text implies that you must try to find text, which in turn implies running the full OCR process to be perfectly sure.
I'm going to close this ticket. Feel free to comment here if you find such option, and I will reopen this ticket.
from pyocr.
BTW, are you looking to know if there is no text at all (only images, photos, etc), or if the input image is actually empty ?
Both things are not the same at all. If you want to know whether there is text or not, using Tesseract makes senses. However, if you want to know if an image is entirely empty, you should look at image processing libraries (OpenCV, libpillowfight, etc).
from pyocr.
I want to know if there is a text or not. If I wanted to know, whether an image is entirely empty, I would go for Google Cloud Vision for sure. Also, Google Cloud Vision can do something close to what I want, and it's that you can limit number of detected text annotations. But it still returns way more data than I need and it's kind of expensive for just saying whether there is a text or not.
from pyocr.
I've been playing around with Tesseract CLI and just found out it returns Script and Script confidence in OSD-only PSM. Using this feature seems to be ~36x faster than using mode 3 on a image with ~12,000 characters (2.4 instead of 88.3 seconds). I see that these values are omitted in detect_os(handle)
.
from pyocr.
Oh good point, I forgot about this, my bad :
https://github.com/openpaperwork/pyocr/#orientation-detection << "detect_orientation() MAY raise an exception if there is no text detected in the image." << this part actually concern Tesseract. Tesseract (3.03) does return an error when there is no text.
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.