Commit 9005e9ea authored by Krutika Bapat's avatar Krutika Bapat Committed by Alexander Alekhin

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
parent 1484dcf2
......@@ -162,7 +162,7 @@ public:
@param src The training images, that means the faces you want to learn. The data has to be
given as a vector\<Mat\>.
@param labels The labels corresponding to the images have to be given either as a vector\<int\>
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\<Mat\>. The labels of each
......@@ -175,6 +175,8 @@ public:
// holds images and labels
vector<Mat> images;
vector<int> 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 @@ public:
@param src The training images, that means the faces you want to learn. The data has to be given
as a vector\<Mat\>.
@param labels The labels corresponding to the images have to be given either as a vector\<int\> 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.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment