UNPKG

@gutenye/ocr-node

Version:

Guten OCR is a high accurate text detection (OCR) Javascript/Typescript library that runs on Node.js, Browser, React Native and C++. Based on PaddleOCR and ONNX runtime

12 lines (11 loc) 473 B
import { ImageRawBase } from '@gutenye/ocr-common'; import type { ImageRawData, LineImage, SizeOption } from '@gutenye/ocr-common'; import sharp from 'sharp'; export declare class ImageRaw extends ImageRawBase { #private; static open(path: string): Promise<ImageRaw>; constructor(imageRawData: ImageRawData); write(path: string): Promise<sharp.OutputInfo>; resize(size: SizeOption): Promise<this>; drawBox(lineImages: LineImage[]): Promise<this>; }