import { OCRUtil } from './utils/ocr.js'; import { ElementType } from './types.js'; import type { ElementConfig, ElementResult, ScreenComparison } from './types.js'; export { ElementType }; export type { ElementConfig, ElementResult, ScreenComparison }; /** * Extracts UI element values from filled screens by comparing them to blank templates * * @deprecated Class name is outdated. Functionality remains the same but considers renaming to ElementExtractor. */ export declare class FieldExtractor { private visionUtil; private ocrUtil; private blankForm; private filledForm; private blankColor; private filledColor; private debug; constructor(ocrUtil: OCRUtil, debug?: boolean); /** * Load blank and live screenshots. * Blank is the whole screen; widgets on it can move. Do not warp the live * shot onto blank — match each template on both images independently. */ loadForms(blankFormPath: string, filledFormPath: string): Promise; /** * Extract values from multiple UI elements */ extractElements(elementConfigs: readonly ElementConfig[] | ElementConfig[], options?: { ocrThreshold?: number; locateOnly?: boolean; }): Promise; /** * Extract a single UI element value. * Match the template on blank (empty control) and on the live screenshot * (label needle so typed text does not tank confidence), then OCR the pair * of crops. Locations are live-screenshot coordinates for click/fill. */ extractElement(config: ElementConfig, options?: { ocrThreshold?: number; locateOnly?: boolean; }): Promise; /** * Match a field template on blank and on the live screenshot independently. * Java POC aligned scanned forms then cropped at blank coords; here the blank * is a full screen and windows can move, so each image gets its own match. */ private locateOnBoth; private labelNeedle; private readChangedText; /** * Match an element's template against a live screenshot (no blank alignment). * Uses the label portion when ocrRect is set so filled values do not tank confidence. */ locateOnScreenshot(screenshotPath: string, config: ElementConfig): Promise; /** * Extract element using custom matcher function */ private extractWithCustomMatcher; /** * Clean up OpenCV matrices */ cleanup(): void; } //# sourceMappingURL=field-extractor.d.ts.map