OCR library that uses system provided API.
VisionKit
on macOS,Media OCR
on Windows.
node example/index.js
Example | Result |
---|---|
pnpm add @napi-rs/system-ocr
yarn install @napi-rs/system-ocr
npm install @napi-rs/system-ocr
import { recognize } from '@napi-rs/system-ocr'
const result = await recognize('path/to/image.png')
import { recognize, OcrAccuracy } from '@napi-rs/system-ocr'
const image = await fetch('https://example.com/image.png')
const result = await recognize(image, OcrAccuracy.Accurate, ['fr', 'zh-cn'])
Huge thanks to: