|
|
|
@ -16,7 +16,7 @@ const { TesseractWorker } = Tesseract;
@@ -16,7 +16,7 @@ const { TesseractWorker } = Tesseract;
|
|
|
|
|
const worker = new TesseractWorker(); |
|
|
|
|
|
|
|
|
|
worker |
|
|
|
|
.recognize('https://tesseract.projectnaptha.com/img/eng_bw.png') |
|
|
|
|
.recognize('http://jeroen.github.io/images/testocr.png') |
|
|
|
|
.then((result) => { |
|
|
|
|
console.log(result); |
|
|
|
|
}); |
|
|
|
@ -31,7 +31,7 @@ const { TesseractWorker } = Tesseract;
@@ -31,7 +31,7 @@ const { TesseractWorker } = Tesseract;
|
|
|
|
|
const worker = new TesseractWorker(); |
|
|
|
|
|
|
|
|
|
worker |
|
|
|
|
.recognize('https://tesseract.projectnaptha.com/img/eng_bw.png') |
|
|
|
|
.recognize('http://jeroen.github.io/images/testocr.png') |
|
|
|
|
.progress((p) => { |
|
|
|
|
console.log('progress', p); |
|
|
|
|
}) |
|
|
|
@ -50,7 +50,7 @@ const worker = new TesseractWorker();
@@ -50,7 +50,7 @@ const worker = new TesseractWorker();
|
|
|
|
|
|
|
|
|
|
worker |
|
|
|
|
.recognize( |
|
|
|
|
'https://tesseract.projectnaptha.com/img/eng_bw.png', |
|
|
|
|
'http://jeroen.github.io/images/testocr.png', |
|
|
|
|
'eng+chi_tra' |
|
|
|
|
) |
|
|
|
|
.progress((p) => { |
|
|
|
@ -73,7 +73,7 @@ const worker = new TesseractWorker();
@@ -73,7 +73,7 @@ const worker = new TesseractWorker();
|
|
|
|
|
|
|
|
|
|
worker |
|
|
|
|
.recognize( |
|
|
|
|
'https://tesseract.projectnaptha.com/img/eng_bw.png', |
|
|
|
|
'http://jeroen.github.io/images/testocr.png', |
|
|
|
|
'eng', |
|
|
|
|
{ |
|
|
|
|
'tessedit_ocr_engine_mode': OEM.TESSERACT_ONLY, |
|
|
|
@ -100,7 +100,7 @@ const worker = new TesseractWorker();
@@ -100,7 +100,7 @@ const worker = new TesseractWorker();
|
|
|
|
|
|
|
|
|
|
worker |
|
|
|
|
.recognize( |
|
|
|
|
'https://tesseract.projectnaptha.com/img/eng_bw.png', |
|
|
|
|
'http://jeroen.github.io/images/testocr.png', |
|
|
|
|
'eng', |
|
|
|
|
{ |
|
|
|
|
'tessedit_pageseg_mode': PSM.SINGLE_BLOCK, |
|
|
|
@ -126,7 +126,7 @@ const worker = new TesseractWorker();
@@ -126,7 +126,7 @@ const worker = new TesseractWorker();
|
|
|
|
|
|
|
|
|
|
worker |
|
|
|
|
.recognize( |
|
|
|
|
'https://tesseract.projectnaptha.com/img/eng_bw.png', |
|
|
|
|
'http://jeroen.github.io/images/testocr.png', |
|
|
|
|
'eng', |
|
|
|
|
{ |
|
|
|
|
'tessedit_create_pdf': '1', |
|
|
|
@ -150,7 +150,7 @@ const worker = new TesseractWorker();
@@ -150,7 +150,7 @@ const worker = new TesseractWorker();
|
|
|
|
|
|
|
|
|
|
worker |
|
|
|
|
.recognize( |
|
|
|
|
'https://tesseract.projectnaptha.com/img/eng_bw.png', |
|
|
|
|
'http://jeroen.github.io/images/testocr.png', |
|
|
|
|
'eng', |
|
|
|
|
{ |
|
|
|
|
'tessedit_create_pdf': '1', |
|
|
|
|