Comments (8)
The problem seems to be in this line
Line 87 in 1cd43c1
we managed to fix it only for tesseract 4.0 by changing it in
result = append(result, "--psm")
probably it's needed to switch between the 2 cases to make the change backward compatible.
from open-ocr.
Yes, would be great to improve docs available output formats.
But the main issue is the system cannot execute tesseract with "--psm" parameter.
from open-ocr.
I found config argument: "tessedit_create_hocr": "1" in order to return data in hocr format.
from open-ocr.
Do the docs need to be improved?
from open-ocr.
Hello @tleyden
Do you have any updates?
Thanks.
from open-ocr.
Hello! We're having the exact same problem. We would like to launch tesseract with the psm:3 parameter but we fail to do so for tesseract 4.0.
from open-ocr.
we managed to fix it only for tesseract 4.0 by changing it in
result = append(result, "--psm")
Could you please say where exactly I need to replace it? I went into the docker container of the worker and httpd and located the mentioned file, changed it and restarted both containers. Error is still the same.
from open-ocr.
There is a workaround solution for this issue..
Get into OCR worker container
You should be able to list your running docker container with command below
docker ps
List should contain dockercompose_openocr_1, dockercompose_openocrworker_1, dockercompose_strokewidthtransform_1 and dockercompose_rabbitmq_1 in NAMES column which corresponding to HTTP handler, OCR worker, pre-processor and RabbitMQ.
Use command below to get into OCR worker
container
docker exec -it <container_id> /bin/bash
Refactor the source code
cd /opt/go/src/github.com/tleyden/open-ocr/
vim tesseract_engine.go
Around line 87:
Change result = append(result, "-psm")
into result = append(result, "--psm")
Recompiling execution file
cd /opt/go/src/github.com/tleyden/open-ocr/cli-worker && go build -v -o open-ocr-worker && cp open-ocr-worker /usr/bin
If you encountered the message below:
cp: cannot create regular file '/usr/bin/open-ocr-worker': Text file busy
you may try to restart the container and try cp it again
Restart docker container
Exit docker container and restart it by using command below:
docker restart <container_id>
from open-ocr.
Related Issues (20)
- Curl on Windows
- memory consumption HOT 13
- Java client for open-OCR HOT 1
- Can we use preprocessors with multipart requests?
- No default machine exists
- curl: (7) Failed to connect to 192.168.99.100 port 9292: Connection refused on Mac OSX HOT 1
- upload
- Unable to perform OCR decode. Error: Get : unsupported protocol scheme ""
- Using the PDF pre-processor HOT 13
- Pin dependencies with Go modules
- Non-English Error
- error connecting to rabbitmq dial tcp 172.19.0.2:5672: i/o timeout
- 选择 语言 HOT 2
- upload-local-file.py does not work as expected
- strokewidthtransform container craches using PDF and "stroke-width-transform"
- rpc timeout when load increases on kubernetes cluster
- Use links HOT 1
- convert-pdf error
- Launch in Google Cloud Run
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 open-ocr.