UNPKG

ppu-paddle-ocr

Version:

Blazing-fast and lightweight PaddleOCR library for Node.js and Bun. Perform accurate text detection, recognition, and image deskew with a simple, modern, and type-safe API. Ideal for document processing, data extraction, and computer vision tasks.

26 lines (25 loc) 562 B
/** * Simple LRU cache for processed images to avoid redundant processing */ export declare class ImageCache { private cache; private maxSize; constructor(maxSize?: number); /** * Get item from cache */ get(key: string): any; /** * Set item in cache */ set(key: string, value: any): void; /** * Clear cache */ clear(): void; /** * Generate cache key from image data */ static generateKey(imageBuffer: ArrayBuffer): string; } export declare const globalImageCache: ImageCache;