Setup Accura Face Match

Method for get face match percentages between two face.

Future<void> startFaceMatch() async{
SystemChrome.setPreferredOrientations([DeviceOrientation.portraitUp]);
try{
var accuraConfs = {
  "face_uri":{path to your Face image}
};

   await AccuraFacematch.setFaceMatchFeedbackTextSize(18);
   await AccuraFacematch.setFaceMatchFeedBackframeMessage("Frame Your Face");
   await AccuraFacematch.setFaceMatchFeedBackAwayMessage("Move Phone Away");
   await AccuraFacematch.setFaceMatchFeedBackOpenEyesMessage("Keep Your Eyes Open");
   await AccuraFacematch.setFaceMatchFeedBackCloserMessage("Move Phone Closer");
   await AccuraFacematch.setFaceMatchFeedBackCenterMessage("Move Phone Center");
   await AccuraFacematch.setFaceMatchFeedbackMultipleFaceMessage("Multiple Face Detected");
   await AccuraFacematch.setFaceMatchFeedBackFaceSteadymessage("Keep Your Head Straight");
   await AccuraFacematch.setFaceMatchFeedBackLowLightMessage("Low light detected");
   await AccuraFacematch.setFaceMatchFeedBackBlurFaceMessage("Blur Detected Over Face");
   await AccuraFacematch.setFaceMatchFeedBackGlareFaceMessage("Glare Detected");
   await AccuraFacematch.setFaceMatchBlurPercentage(80);
   await AccuraFacematch.setFaceMatchGlarePercentage_0(-1);
   await AccuraFacematch.setFaceMatchGlarePercentage_1(-1);

   await AccuraFacematch.startFaceMatch([accuraConfs])
    .then((value) => {
  setState((){
    dynamic result = json.decode(value);
  })
}).onError((error, stackTrace) => {
});
}on PlatformException{}
}

Success: JSON Response { detect: URI? score: Float }

Error: String


Last updated