/** * Pose detection using MediaPipe — detects body landmarks to overlay * measurement lines on a try-on result image. */ export interface MeasurementLine { y: number; x1: number; x2: number; } export interface MeasurementLines { chest: MeasurementLine; waist: MeasurementLine; hips: MeasurementLine; } /** Extended landmarks for per-field measurement guides. * Each point now carries: * - x, y: normalized image coords (0–1) * - z: depth-into-photo (BlazePose's hip-centered z, in normalized units) * - visibility: 0–1 confidence the joint was actually seen * z + eyes + heels enable: pelvic tilt detection, IPD sanity check, * femur-based scaling (per Gemini's recommendations). */ export interface JointPoint { x: number; y: number; z?: number; visibility?: number; } export interface BodyLandmarks { leftShoulder: JointPoint; rightShoulder: JointPoint; leftHip: JointPoint; rightHip: JointPoint; leftElbow: JointPoint; rightElbow: JointPoint; leftWrist: JointPoint; rightWrist: JointPoint; leftKnee: JointPoint; rightKnee: JointPoint; leftAnkle: JointPoint; rightAnkle: JointPoint; nose: JointPoint; } /** Pixel dimensions of the image the landmarks were detected on. Sent to * the backend alongside the landmarks so it can convert normalized x/y * into pixels — without this, horizontal and vertical distances on a * non-square image are skewed by the aspect ratio. */ export interface BodyLandmarksWithDims extends BodyLandmarks { imageWidth: number; imageHeight: number; } export declare function preloadBodyLandmarker(): Promise; export declare function detectMeasurementLines(imageSrc: string): Promise; /** Detect full body landmarks for per-field measurement guides. * Accepts a URL string OR an already-loaded HTMLImageElement to avoid CORS issues. */ export declare function detectBodyLandmarks(imageSrc: string | HTMLImageElement, options?: { maxLongEdge?: number; }): Promise;