@@ -162,7 +162,7 @@ class CV_EXPORTS_W FaceRecognizer : public Algorithm
162
162
@param src The training images, that means the faces you want to learn. The data has to be
163
163
given as a vector\<Mat\>.
164
164
@param labels The labels corresponding to the images have to be given either as a vector\<int\>
165
- or a
165
+ or a Mat of type CV_32SC1.
166
166
167
167
The following source code snippet shows you how to learn a Fisherfaces model on a given set of
168
168
images. The images are read with imread and pushed into a std::vector\<Mat\>. The labels of each
@@ -175,6 +175,8 @@ class CV_EXPORTS_W FaceRecognizer : public Algorithm
175
175
// holds images and labels
176
176
vector<Mat> images;
177
177
vector<int> labels;
178
+ // using Mat of type CV_32SC1
179
+ // Mat labels(number_of_samples, 1, CV_32SC1);
178
180
// images for first person
179
181
images.push_back(imread("person0/0.jpg", CV_LOAD_IMAGE_GRAYSCALE)); labels.push_back(0);
180
182
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
211
213
@param src The training images, that means the faces you want to learn. The data has to be given
212
214
as a vector\<Mat\>.
213
215
@param labels The labels corresponding to the images have to be given either as a vector\<int\> or
214
- a
216
+ a Mat of type CV_32SC1.
215
217
216
218
This method updates a (probably trained) FaceRecognizer, but only if the algorithm supports it. The
217
219
Local Binary Patterns Histograms (LBPH) recognizer (see createLBPHFaceRecognizer) can be updated.
0 commit comments