predict (cv.BasicFaceRecognizer) - MATLAB File Help
cv.BasicFaceRecognizer/predict

Predicts a label and associated confidence (e.g. distance) for a given input image

[label, confidence] = obj.predict(src)

Input

Output

The following example shows how to get a prediction from a trained model:

% Do your initialization here (create the FaceRecognizer model) ...
% Read in a sample image:
img = cv.imread('person1/3.jpg', 'Grayscale',true);
% And get a prediction from the FaceRecognizer:
predicted = model.predict(img);

Or to get a prediction and the associated confidence (e.g. distance):

% Do your initialization here (create the FaceRecognizer model) ...
img = cv.imread('person1/3.jpg', 'Grayscale',true);
% Get the prediction and associated confidence from the model
[predicted_label, predicted_confidence] = model.predict(img);
See also
Method Details
Access public
Sealed false
Static false