import type { DetectionResult, DetectedFace, LivenessResult, RegistrationResult, MatchResult } from './ExpoFaceDetection.types'; /** * Detect all faces in an image. * * @param imageBase64 - Base64 encoded image (with or without data URI prefix) * @param cropFaces - Whether to include cropped face images in the result * @returns Detection result with all detected faces * * @example * ```typescript * const result = await detectFaces(imageBase64); * console.log(`Found ${result.faceCount} faces`); * ``` */ export declare function detectFaces(imageBase64: string, cropFaces?: boolean): Promise; /** * Detect the largest face in an image. * * @param imageBase64 - Base64 encoded image * @returns The largest detected face, or null if no face found */ export declare function detectLargestFace(imageBase64: string): Promise; /** * Check if a face in the image is from a live person (anti-spoofing). * * @param imageBase64 - Base64 encoded image * @returns Liveness result with scores and detection info * * @example * ```typescript * const result = await checkLiveness(imageBase64); * if (result.isLive) { * console.log('Live face detected'); * } else { * console.log('Possible spoof detected'); * } * ``` */ export declare function checkLiveness(imageBase64: string): Promise; /** * Extract face embedding from a single image. * The embedding can be stored by the app for later matching. * * @param imageBase64 - Base64 encoded image * @returns Registration result with 192-dimensional embedding * * @example * ```typescript * const result = await extractEmbedding(imageBase64); * if (result.success && result.embedding) { * // Store embedding on your server * await api.saveEmbedding(userId, result.embedding); * } * ``` */ export declare function extractEmbedding(imageBase64: string): Promise; /** * Register a face using 3 photos (front, left, right) for better accuracy. * Returns an averaged embedding from all 3 photos. * * @param frontBase64 - Base64 encoded front-facing photo * @param leftBase64 - Base64 encoded left-facing photo * @param rightBase64 - Base64 encoded right-facing photo * @returns Registration result with averaged 192-dimensional embedding * * @example * ```typescript * const result = await registerFace(frontPhoto, leftPhoto, rightPhoto); * if (result.success) { * // Store the embedding on your server * await api.registerUser(userId, result.embedding); * } * ``` */ export declare function registerFace(frontBase64: string, leftBase64: string, rightBase64: string): Promise; /** * Set the target embedding for face matching. * Call this before using processFrame for real-time matching. * * @param embedding - 192-dimensional face embedding array * * @example * ```typescript * // Fetch embedding from your server * const userEmbedding = await api.getUserEmbedding(userId); * setTargetEmbedding(userEmbedding); * ``` */ export declare function setTargetEmbedding(embedding: number[]): void; /** * Check if a target embedding is currently set. */ export declare function hasTarget(): boolean; /** * Clear the current target embedding. */ export declare function clearTarget(): void; /** * Process a single frame for face matching against the target embedding. * * @param imageBase64 - Base64 encoded image * @returns Match result with distance and confidence scores * * @example * ```typescript * const result = await processFrame(frameBase64); * if (result.isMatch) { * console.log(`Match found with ${(result.confidence * 100).toFixed(1)}% confidence`); * } * ``` */ export declare function processFrame(imageBase64: string): Promise; /** * Set the minimum face size ratio relative to image width. * Smaller values detect smaller faces but may increase processing time. * * @param ratio - Value between 0.05 and 0.5 (default: 0.2) */ export declare function setMinFaceRatio(ratio: number): void; /** * Get the current minimum face size ratio. */ export declare function getMinFaceRatio(): number; /** * Set the confidence threshold for face detection. * * @param threshold - Value between 0 and 1 (default: 0.6) */ export declare function setDetectionConfidenceThreshold(threshold: number): void; /** * Get the current detection confidence threshold. */ export declare function getDetectionConfidenceThreshold(): number; /** * Set the liveness detection threshold. * Lower values are stricter (fewer false positives but more false negatives). * * @param threshold - Liveness score threshold (default: 0.2) */ export declare function setLivenessThreshold(threshold: number): void; /** * Get the current liveness threshold. */ export declare function getLivenessThreshold(): number; /** * Set the sharpness threshold for liveness detection. * Images below this threshold are considered too blurry. * * @param threshold - Sharpness score threshold (default: 50) */ export declare function setSharpnessThreshold(threshold: number): void; /** * Get the current sharpness threshold. */ export declare function getSharpnessThreshold(): number; /** * Set the match threshold (L2 distance). * Lower values are stricter (require more similar faces to match). * * @param threshold - L2 distance threshold (default: 1.1) */ export declare function setMatchThreshold(threshold: number): void; /** * Get the current match threshold. */ export declare function getMatchThreshold(): number; export { FaceDetectionCameraView } from './ExpoFaceDetectionView'; export type { FaceBox, FaceLandmark, DetectedFace, DetectionResult, LivenessResult, RegistrationResult, MatchResult, FaceDetectionViewProps, FaceDetectedEvent, EnrollmentCaptureEvent, EnrollmentCompleteEvent, EnrollmentStatusEvent, } from './ExpoFaceDetection.types'; //# sourceMappingURL=index.d.ts.map