/**
 * faceDetection — Face detection for auto-crop and photo analysis
 *
 * Provides face detection using:
 * 1. Pure JS skin-tone + edge detection heuristics (fast, no deps)
 * 2. Optional face-api.js integration (accurate, requires loading models)
 *
 * Features:
 * - Face region detection
 * - Face count estimation
 * - Auto-crop suggestions
 * - Face landmarks (with face-api.js)
 * - Expression detection (with face-api.js)
 */
export interface FaceRegion {
    /** Bounding box */
    x: number;
    y: number;
    width: number;
    height: number;
    /** Detection confidence (0-1) */
    confidence: number;
    /** Face landmarks (if available) */
    landmarks?: FaceLandmarks;
    /** Estimated expression (if available) */
    expression?: FaceExpression;
}
export interface FaceLandmarks {
    leftEye: {
        x: number;
        y: number;
    };
    rightEye: {
        x: number;
        y: number;
    };
    nose: {
        x: number;
        y: number;
    };
    mouthLeft: {
        x: number;
        y: number;
    };
    mouthRight: {
        x: number;
        y: number;
    };
    jawOutline?: Array<{
        x: number;
        y: number;
    }>;
}
export type FaceExpression = 'neutral' | 'happy' | 'sad' | 'angry' | 'fearful' | 'disgusted' | 'surprised';
export interface FaceDetectionOptions {
    /** Minimum face size (relative to image, 0-1) */
    minFaceSize: number;
    /** Maximum number of faces to detect */
    maxFaces: number;
    /** Detection quality */
    quality: 'fast' | 'accurate';
    /** Include landmarks detection */
    detectLandmarks: boolean;
    /** Include expression detection */
    detectExpressions: boolean;
}
export interface FaceDetectionResult {
    /** Detected faces */
    faces: FaceRegion[];
    /** Processing time in ms */
    processingTimeMs: number;
    /** Detection method used */
    method: 'heuristic' | 'neural';
}
export interface AutoCropSuggestion {
    /** Suggested crop rectangle */
    x: number;
    y: number;
    width: number;
    height: number;
    /** Aspect ratio used */
    aspectRatio: number;
    /** Crop type */
    type: 'portrait' | 'headshot' | 'group' | 'full';
}
export declare const DEFAULT_DETECTION_OPTIONS: FaceDetectionOptions;
/**
 * Generate auto-crop suggestion based on detected faces
 */
export declare function generateAutoCropSuggestion(faces: FaceRegion[], imageWidth: number, imageHeight: number, targetAspectRatio?: number): AutoCropSuggestion | null;
/**
 * Generate multiple crop suggestions for common aspect ratios
 */
export declare function generateMultipleCropSuggestions(faces: FaceRegion[], imageWidth: number, imageHeight: number): AutoCropSuggestion[];
/**
 * Detect faces in an image
 */
export declare function detectFaces(imageData: ImageData, options?: Partial<FaceDetectionOptions>): Promise<FaceDetectionResult>;
/**
 * Quick face detection (always uses heuristic for speed)
 */
export declare function detectFacesFast(imageData: ImageData, maxFaces?: number): FaceRegion[];
export default detectFaces;
