diff --git a/modules/face/include/opencv2/face.hpp b/modules/face/include/opencv2/face.hpp index 890f5b6a08f..4f38c0cb1c6 100644 --- a/modules/face/include/opencv2/face.hpp +++ b/modules/face/include/opencv2/face.hpp @@ -162,7 +162,7 @@ class CV_EXPORTS_W FaceRecognizer : public Algorithm @param src The training images, that means the faces you want to learn. The data has to be given as a vector\. @param labels The labels corresponding to the images have to be given either as a vector\ - or a + or a Mat of type CV_32SC1. The following source code snippet shows you how to learn a Fisherfaces model on a given set of images. The images are read with imread and pushed into a std::vector\. The labels of each @@ -175,6 +175,8 @@ class CV_EXPORTS_W FaceRecognizer : public Algorithm // holds images and labels vector images; vector labels; + // using Mat of type CV_32SC1 + // Mat labels(number_of_samples, 1, CV_32SC1); // images for first person images.push_back(imread("person0/0.jpg", CV_LOAD_IMAGE_GRAYSCALE)); labels.push_back(0); images.push_back(imread("person0/1.jpg", CV_LOAD_IMAGE_GRAYSCALE)); labels.push_back(0); @@ -211,7 +213,7 @@ class CV_EXPORTS_W FaceRecognizer : public Algorithm @param src The training images, that means the faces you want to learn. The data has to be given as a vector\. @param labels The labels corresponding to the images have to be given either as a vector\ or - a + a Mat of type CV_32SC1. This method updates a (probably trained) FaceRecognizer, but only if the algorithm supports it. The Local Binary Patterns Histograms (LBPH) recognizer (see createLBPHFaceRecognizer) can be updated.