UNPKG

@paulinasource/face-capture-landmarks-lib

Version:

Biblioteca React para captura facial e detecção de landmarks em tempo real.

33 lines (29 loc) 974 B
export type MovementStep = | "faceClose150" | "faceClose200" | "faceClose250" | "center" | "left" | "right" | "up" | "down" | "blinkLeft" | "blinkRight"; export interface FaceRecognitionProps { onReady?: () => void; onStepChange?: (step: MovementStep) => void; onCapture?: (imageData: string, step: MovementStep) => void; onComplete?: (result: { images: { step: MovementStep | string; img: string }[]; }) => void; onError?: (error: Error) => void; onCancel?: () => void; onProgress?: (progress: number, currentStep: MovementStep) => void; lang?:Language, step?:RegistrationStep // onFrameProcessed?: (landmarks: facemesh.AnnotatedPrediction | null) => void; } export type Language = 'pt' | 'en'; export type RegistrationStep = 'intro' | 'setup' | 'detection' | 'processing' | 'success' | 'error'; export type HeadMovement = 'center' | 'left' | 'right' | 'up' | 'down'; export type ErrorType = 'duplicate' | 'invalid' | null;