Skip to content

Commit 9005e9e

Browse files
krutikabapatalalek
authored andcommitted
Merge pull request #2000 from krutikabapat:master
Incomplete sentence corrected. Resolves Issue #1997 (#2000) * Incomplete sentence corrected. Issue #1997 Resolves Issue #1997 ``` FaceRecognizer::train(InputArrayOfArrays src, InputArray labels); ``` The type `InputArray` can accept `vector<T>` or `Mat` types as mentioned here: https://docs.opencv.org/3.4/d4/d32/classcv_1_1__InputArray.html * Trailing whitespaces problem resolved
1 parent 1484dcf commit 9005e9e

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

modules/face/include/opencv2/face.hpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ class CV_EXPORTS_W FaceRecognizer : public Algorithm
162162
@param src The training images, that means the faces you want to learn. The data has to be
163163
given as a vector\<Mat\>.
164164
@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.
166166
167167
The following source code snippet shows you how to learn a Fisherfaces model on a given set of
168168
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
175175
// holds images and labels
176176
vector<Mat> images;
177177
vector<int> labels;
178+
// using Mat of type CV_32SC1
179+
// Mat labels(number_of_samples, 1, CV_32SC1);
178180
// images for first person
179181
images.push_back(imread("person0/0.jpg", CV_LOAD_IMAGE_GRAYSCALE)); labels.push_back(0);
180182
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
211213
@param src The training images, that means the faces you want to learn. The data has to be given
212214
as a vector\<Mat\>.
213215
@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.
215217
216218
This method updates a (probably trained) FaceRecognizer, but only if the algorithm supports it. The
217219
Local Binary Patterns Histograms (LBPH) recognizer (see createLBPHFaceRecognizer) can be updated.

0 commit comments

Comments
 (0)