Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

node js ocr

const img = fs.readFileSync("image.jpg")

tesseract
  .recognize(img, config)
  .then((text) => {
    console.log("Result:", text)
  })
  .catch((error) => {
    console.log(error.message)
  })
Comment

Node OCR

import Tesseract from 'tesseract.js';

Tesseract.recognize(
  'https://tesseract.projectnaptha.com/img/eng_bw.png',
  'eng',
  { logger: m => console.log(m) }
).then(({ data: { text } }) => {
  console.log(text);
})
Comment

PREVIOUS NEXT
Code Example
Javascript :: max array 
Javascript :: javascript this keyword 
Javascript :: Javascript "For..in Loop" Syntax 
Javascript :: react router native back button 
Javascript :: javascript dict 
Javascript :: splice mdn 
Javascript :: vuejs jwt authentication example 
Javascript :: array unshift 
Javascript :: base64 
Javascript :: short-circuit evaluation javascript 
Javascript :: javascript static class variable 
Javascript :: what is bom in javascript 
Javascript :: javascript highlight element 
Javascript :: Material-ui account icon 
Javascript :: bot react message with custom emoji 
Javascript :: Javascript first example 
Javascript :: mongoose query object 
Javascript :: find last item in an array JS 
Javascript :: javascript for validation 
Javascript :: javascript debugging 
Javascript :: array concat 
Javascript :: react admin 
Javascript :: JavaScript slice() Syntax 
Javascript :: .default in javascript 
Javascript :: . is not recognized as an internal command npm run 
Javascript :: how to increase the window size in nightmare 
Javascript :: javascript change get parameter without reload 
Javascript :: capacitorjs get zip code example 
Javascript :: find smallest interval in array javascript 
Javascript :: gdscript create node 
ADD CONTENT
Topic
Content
Source link
Name
6+9 =