Skip to content

Instantly share code, notes, and snippets.

@UlisesGascon
Created February 4, 2020 08:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save UlisesGascon/ac5d494c560da12b9a27ab60cf5134b7 to your computer and use it in GitHub Desktop.
Save UlisesGascon/ac5d494c560da12b9a27ab60cf5134b7 to your computer and use it in GitHub Desktop.
Basic OCR
// npm install tesseract.js
const Tesseract = require('tesseract.js');
Tesseract.recognize(
'./img/2.png',
'spa',
{ logger: m => console.log(m) }
).then(({ data: { text } }) => {
console.log(text);
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment