UNPKG

mindee

Version:

Mindee Client Library for Node.js

28 lines (27 loc) 1.11 kB
import { FieldLocation } from "../../../v2/parsing/inference/field/index.js"; import { StringDict } from "../../../parsing/index.js"; import { LocalInputSource } from "../../../input/index.js"; import { ExtractedImage } from "../../../image/index.js"; import { ExtractionResponse } from "../../../v2/product/index.js"; export declare class CropItem { /** * Type or classification of the detected object. */ objectType: string; /** * Location that includes cropping coordinates for the detected object, within the source document. */ location: FieldLocation; /** * The extraction response associated with the crop. */ extractionResponse?: ExtractionResponse; constructor(serverResponse: StringDict); toString(): string; /** * Extracts a single crop from an input. * @param inputSource The input file to extract from. * @param quality Optional quality parameter for image extraction, default is undefined (full quality). */ extractFromInputSource(inputSource: LocalInputSource, quality?: number): Promise<ExtractedImage>; }