/// <summary> /// Predict the label of the image /// </summary> /// <param name="image">The image where prediction will be based on</param> /// <returns>The prediction label</returns> public PredictionResult Predict(IInputArray image) { int label = -1; double distance = -1; using (InputArray iaImage = image.GetInputArray()) ContribInvoke.CvFaceRecognizerPredict(_ptr, iaImage, ref label, ref distance); return(new PredictionResult() { Label = label, Distance = distance }); }