import Vnmf from '../../index' declare module '../../index' { namespace stopFaceDetect { interface Option { /** The callback function of the interface call (Call success 、Failure will be executed ) */ complete?: (res: VnmfGeneral.CallbackResult) => void /** Interface call failure recovery function */ fail?: (res: VnmfGeneral.CallbackResult) => void /** Interface call successful callback function */ success?: (res: VnmfGeneral.CallbackResult) => void } } namespace initFaceDetect { interface Option { /** The callback function of the interface call (Call success 、Failure will be executed ) */ complete?: (res: VnmfGeneral.CallbackResult) => void /** Interface call failure recovery function */ fail?: (res: VnmfGeneral.CallbackResult) => void /** Interface call successful callback function */ success?: (res: VnmfGeneral.CallbackResult) => void } } namespace faceDetect { interface Option { /** Image pixel dot data ,Each four items represent a pixel point RGBA */ frameBuffer: ArrayBuffer /** Image width */ width: number /** Image height */ height: number /** Whether to return the face of the current image (106 One point ) * @default false */ enablePoint?: boolean /** Whether the face of the person who returns the current image (Can indicate the situation of organ obstruction ) * @default false */ enableConf?: boolean /** Whether to return the face angle information of the current image * @default false */ enableAngle?: boolean /** Whether to return multiple faces information * @default false */ enableMultiFace?: boolean /** The callback function of the interface call (Call success 、Failure will be executed ) */ complete?: (res: VnmfGeneral.CallbackResult) => void /** Interface call failure recovery function */ fail?: (res: VnmfGeneral.CallbackResult) => void /** Interface call successful callback function */ success?: (res: SuccessCallbackOption) => void } interface SuccessCallbackOption extends face { /** Multi -person mode (enableMultiFace)Face information next ,Each object contains other attributes above */ faceInfo?: face } interface face { /** Facial square box value ,Object contains height, weight, originX, originY Four attributes */ detectRect: detectRect /** Face center point horizontal coordinates ,If you can't detect the face, the face is -1 */ x: number /** Men in the center of the face ,If you can't detect the face, the face is -1 */ y: number /** human face 106 Separate position array ,Each object of the array contains x and y */ pointArray: point[] /** Face facial reliability ,Ranges [0, 1],The greater the value, the higher the credibility (The less blocking ) */ confArray: conf[] /** Face angle information ,Ranges [-1, 1],The closer the value 0 Express the righteousness of the camera */ angleArray: angle[] } /** Facial square box value */ interface detectRect { height: number weight: number originX: number originY: number } interface point { x: number y: number } interface conf { /** Overall credibility */ global: number /** Credibility of the left eye */ leftEye: number /** Right eye credibility */ rightEye: number /** Credibility of the mouth */ mouth: number /** Nose credibility */ nose: number } interface angle { /** Leaning angle (nod ) */ pitch: number /** Polar angle (Shake ) */ yaw: number /** Rolling angle (Left -right ) */ roll: number } } interface VnmfStatic { /** Stopping face recognition * @supported weapp * @see https://developers.weixin.qq.com/miniprogram/dev/api/ai/face/wx.stopFaceDetect.html */ stopFaceDetect (option: stopFaceDetect.Option): Promise /** Initialized face recognition * @supported weapp * @see https://developers.weixin.qq.com/miniprogram/dev/api/ai/face/wx.initFaceDetect.html */ initFaceDetect (option: initFaceDetect.Option): Promise /** Face recognition ,Need to pass before use Vnmf.initFaceDetect Perform a initialization ,Recommended frame data returned to the camera interface * @supported weapp * @see https://developers.weixin.qq.com/miniprogram/dev/api/ai/face/wx.faceDetect.html */ faceDetect (option: faceDetect.Option): Promise } }