import type { DebuggingOptions, DetectionOptions } from "../interface.js"; import type { CoreCanvas, PlatformProvider } from "./platform.js"; /** * Service for calculating the skew angle of an image containing text. */ export declare class BaseDeskewService { protected readonly options: DetectionOptions; protected readonly debugging: DebuggingOptions; protected readonly platform: PlatformProvider; constructor(platform: PlatformProvider, options?: Partial, debugging?: Partial); protected log(message: string): void; /** * Runs a lightweight detection pass to determine the average text skew angle. * Uses multiple methods to robustly calculate skew from all detected text regions. * @param probabilityMapCanvas - The canvas containing the probability map of text regions. * @returns The calculated skew angle in degrees. */ calculateSkewAngle(probabilityMapCanvas: CoreCanvas): Promise; private calculateMinRectAngles; private calculateBaselineAngles; private calculateHoughAngles; private calculateLineAngle; private calculateConsensusAngle; }