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
pull/2121/head^2
Krutika Bapat 6 years ago committed by Alexander Alekhin
parent 1484dcf2de
commit 9005e9ea7e
  1. 6
      modules/face/include/opencv2/face.hpp

@ -162,7 +162,7 @@ public:
@param src The training images, that means the faces you want to learn. The data has to be @param src The training images, that means the faces you want to learn. The data has to be
given as a vector\<Mat\>. given as a vector\<Mat\>.
@param labels The labels corresponding to the images have to be given either as a vector\<int\> @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 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 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 // holds images and labels
vector<Mat> images; vector<Mat> images;
vector<int> labels; vector<int> labels;
// using Mat of type CV_32SC1
// Mat labels(number_of_samples, 1, CV_32SC1);
// images for first person // images for first person
images.push_back(imread("person0/0.jpg", CV_LOAD_IMAGE_GRAYSCALE)); labels.push_back(0); 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); 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 @param src The training images, that means the faces you want to learn. The data has to be given
as a vector\<Mat\>. as a vector\<Mat\>.
@param labels The labels corresponding to the images have to be given either as a vector\<int\> or @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 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. Local Binary Patterns Histograms (LBPH) recognizer (see createLBPHFaceRecognizer) can be updated.

Loading…
Cancel
Save