Tesseract.js is a pure JavaScript port of the Tesseract OCR engine.
Questions tagged [tesseract.js]
89 questions
9
votes
1 answer
How to improve tesseract.js accuracy?
Im using this piece of code from the website but its not accurate enough
const worker1 = createWorker();
const worker2 = createWorker();
await worker1.load();
await worker2.load();
await worker1.loadLanguage("eng");
await…

PayamB.
- 706
- 1
- 9
- 28
7
votes
5 answers
How to use Tesseract.js in a React app
I am working on an app using React. I want to be able to load a pic and then have Tesseract.js convert it to text. I am using react-dropzone to load the image file and I can add the image to page with an img tag. But when I try to run the ocr using…

Brian Tatum
- 177
- 1
- 3
- 11
6
votes
2 answers
how to use tessdata_best for tesseract (pytesseract). What are the arguments and procedure?
TL;DR: How do I install tessdata_best to use withpytesseract inside conda in Ubuntu 18?
I have been using pytesseract inside conda environment for quite some but there is a need to improve the accuracy and I found out that tessdata_best gives you…

Deshwal
- 3,436
- 4
- 35
- 94
5
votes
0 answers
How can I fine tune tesseract on custom dataset?
I know this question may not be a new one, but training/fine-tuning tesseract is one of the hardest part, I could never find any articles which can explain it properly. All the tutorials or docs no one explained it completely, going through them…

user_12
- 1,778
- 7
- 31
- 72
5
votes
0 answers
How to suppress console output in Tesseract.js?
Tesseract.js seems to print to the console with every call to .recognize(), even with no option parameters attached.
It seems possible to quiet the output with the Tesseract CLI by using the "quiet" flag, but I can't find anything like that for…

Neil Hansen
- 531
- 4
- 7
3
votes
0 answers
running tesseract js on an array of images
i have a series of images , when trying to use tesseract on this array to read their text , i face this error:
Error opening data file ./eng.traineddata
Please make sure the TESSDATA_PREFIX environment variable is set to your "tessdata"…

PayamB.
- 706
- 1
- 9
- 28
3
votes
2 answers
Tesseract couldn't load any languages (node tesseract.js)
I ran npm install tesseract.js and now I try to run this code:
const Tesseract = require('tesseract.js');
const filename = 'Screen Shot 2018-01-13 at 16.51.06.png';
Tesseract.recognize(filename)
.progress(p => {
console.log('progress',…

theonlygusti
- 11,032
- 11
- 64
- 119
3
votes
0 answers
Tesseract.js produces nonsense on mobile devices
See this very simple example (can be tested at http://codepen.io/anon/pen/xRXEmM). The input takes in an image, and pressing "Start" will start the OCR, and once done, show the result.
2
votes
0 answers
how to recognize two images using tesseract.js?
Here is my code, I can recognize only one image using tesseract.js (i.e filepath1), I want to recognize both images (filepath1 and filepath2), how to achieve that?
app.post("/",(req,res)=>{
const form =…

sarathkumar23
- 21
- 1
2
votes
0 answers
Setting Tesseract.js data location
I built a server with Adonis.js and Typescript that downloads an image from the web and performs OCD on it with Tesseract.js. The program works, but every time a new Tesseract worker gets initialized this error shows up:
The eng.traineddata is…

exakoss
- 55
- 1
- 6
2
votes
0 answers
File Input in JavaScript function for Tesseract.js
I have this website in which the User Inputs a file and then then the website returns in the console the text in the image. I use Tesseract.js, and the recognize function which has a file as parameter and string for language. Everything works fine…

KhushThakor
- 112
- 1
- 10
2
votes
0 answers
How to suppress logs in tesseract.js
When I call worker.recognize I get
Info in pixReadMemPng: converting (cmap + alpha) ==> RGBA
Info in pixReadMemPng: converting 8 bpp cmap with alpha ==> RGBA
logs in console. How can I get rid of them ?
I tried:
const worker = createWorker({
…

Valera
- 2,665
- 2
- 16
- 33
2
votes
0 answers
How to OCR scanned voting protocols
As part of a hobby project I'm trying to digitalise all the voting records of the Swedish parliament to see if I can extract any interesting statistics (yes a strange hobby I know).
From 1983 to 2001 the voting records look something like in the…

potmo
- 131
- 1
- 4
2
votes
1 answer
How to pass in Tesseract options for page segmentation?
I have been trying to figure out how to pass in tesseract options for page segmentation. I tried tessedit_pageseg_mode: '1', But when I use it, the process stops at recognizing text. If I set it as number 1, then it finishes, but the mode is still…

Sanju
- 1,478
- 2
- 20
- 41
2
votes
0 answers
Cordova with tesseract
Can anyone please provide a link or sample to make a mobile app using the cordova and tesseract.
I can't use the phonegap or ionic, its a client requirement
for last two days m trying to make it, but nothing worked

Sonu
- 133
- 2
- 9