From 9005e9ea7e3399c8891202ffbf636a17d76978c0 Mon Sep 17 00:00:00 2001 From: Krutika Bapat Date: Thu, 23 May 2019 19:17:03 +0800 Subject: [PATCH] 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` or `Mat` types as mentioned here: https://docs.opencv.org/3.4/d4/d32/classcv_1_1__InputArray.html * Trailing whitespaces problem resolved --- modules/face/include/opencv2/face.hpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/modules/face/include/opencv2/face.hpp b/modules/face/include/opencv2/face.hpp index 890f5b6a0..4f38c0cb1 100644 --- a/modules/face/include/opencv2/face.hpp +++ b/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 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 @@ public: // 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 @@ public: @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.