import { type Canvas } from "ppu-ocv";
import type { DebuggingOptions, DetectionOptions } from "../interface";
export declare class DeskewService {
    private readonly options;
    private readonly debugging;
    constructor(options?: Partial<DetectionOptions>, debugging?: Partial<DebuggingOptions>);
    /**
     * Logs a message if verbose debugging is enabled
     */
    private log;
    /**
     * 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: Canvas): Promise<number>;
    /**
     * Calculate angles using minimum area rectangles around text regions
     */
    private calculateMinRectAngles;
    /**
     * Calculate angles by analyzing text baselines using contour points
     */
    private calculateBaselineAngles;
    /**
     * Calculate angles using Hough line transform for dominant lines
     */
    private calculateHoughAngles;
    /**
     * Calculate angle from a set of points using linear regression
     */
    private calculateLineAngle;
    /**
     * Calculate consensus angle from multiple measurements using robust statistics
     */
    private calculateConsensusAngle;
}
