artelogic_text_recognition
v1.0.4
Published
This package let you to highlight and recognise text on image or on video
Readme
Artelogic text recognition
What this package is about?
This package implements basic OCR logic which recognises and highlights text on image or video.
How to install it?
npm i artelogic_text_recongition
How to use it?
const orc = new Ocr({language: 'eng', lineClassName: 'line', wordClassName: 'word'});
orc.addSelectionListener();
orc.addProgressListener(e => console.log(e));
await orc.parseImage(image); // image reference, base64, url etc.
await orc.appendHtml(container, {scale: number, adjustFontSize: boolean});While unmounting don't forget to remove listeners
orc.removeSelectionListener();Add these styles in your project
.selectable-element {
color: transparent;
opacity: .5;
}
.line-element {
padding-bottom: 200px;
margin: 0;
}
.selectable-element::selection {
background: transparent;
}