UNPKG

document-scanner-vue

Version:

Vue 3 Document Scanner with OpenCV.js - Mobile optimized with camera/gallery support

20 lines 1 kB
import { Point } from '../types'; export declare function loadImageToCvMat(imgElement: HTMLImageElement): any; export declare function matToImageDataURL(mat: any): string; export declare function detectDocumentCorners(imageDataURL: string): Promise<Point[] | null>; export declare function applyPerspectiveTransform(imageDataURL: string, corners: Point[], options?: { outputWidth?: number; outputHeight?: number; }): Promise<{ imageDataURL: string; processedWidth: number; processedHeight: number; } | null>; /** * Rotates an image dataURL by the specified angle and returns the rotated dataURL. * @param {string} imageDataURL - The original image as a data URL. * @param {number} rotationAngle - Rotation angle in degrees (0, 90, 180, 270). * @returns {Promise<string>} - Promise that resolves to the rotated image data URL. */ export declare function rotateImageDataURL(imageDataURL: string, rotationAngle: number): Promise<string>; //# sourceMappingURL=opencvUtils.d.ts.map