nareshmlx/opencv-pr huggingface dataset:
**File:** modules/highgui/test/test_grfmt.cpp
**Change Type:** modified
**Context:** PR #2378: added jpeg progressive support. - Related to this ticket: http://code.opencv.org/issues/3547.

**Code Changes:**
```diff
@@ -386,6 +386,30 @@ TEST(Highgui_Jpeg, encode_empty)
 
     ASSERT_THROW(cv::imencode(".jpg", img, jpegImg), cv::Exception);
 }
+
+TEST(Highgui_Jpeg, encode_decode_progressive_jpeg)
+{
+    cvtest::TS& ts = *cvtest::TS::ptr();
+    string input = string(ts.get_data_path()) + "../cv/shared/lena.png";
+    cv::Mat img = cv::imread(input);
```

Review comment:
Build is broken. You need to add `#include "opencv2/ts/gpu_test.hpp"` or calculate absdiff of two matrices and replace the the check with something like EXPECT_EQ(0, countNonZero(diff)).
**File:** modules/highgui/test/test_grfmt.cpp
**Change Type:** modified
**Context:** PR #2378: added jpeg progressive support. - Related to this ticket: http://code.opencv.org/issues/3547.

**Code Changes:**
```diff
@@ -386,6 +386,30 @@ TEST(Highgui_Jpeg, encode_empty)
 
     ASSERT_THROW(cv::imencode(".jpg", img, jpegImg), cv::Exception);
 }
+
+TEST(Highgui_Jpeg, encode_decode_progressive_jpeg)
+{
+    cvtest::TS& ts = *cvtest::TS::ptr();
+    string input = string(ts.get_data_path()) + "../cv/shared/lena.png";
+    cv::Mat img = cv::imread(input);
```

Review comment:
Oh sorry for that. You asked me to use `EXPECT_MAT_NEAR` macro. So I guess it's available in `"opencv2/ts/gpu_test.hpp"`. I'll update the test.
**File:** modules/highgui/test/test_grfmt.cpp
**Change Type:** modified
**Context:** PR #2378: added jpeg progressive support. - Related to this ticket: http://code.opencv.org/issues/3547.
**Review Line:** 401

**Code Changes:**
```diff
+
+    std::vector<int> params;
+    params.push_back(IMWRITE_JPEG_PROGRESSIVE);
+    params.push_back(1);
+
+    string output_progressive = cv::tempfile(".jpg");
+    EXPECT_NO_THROW(cv::imwrite(output_progressive, img, params));
+    cv::Mat img_jpg_progressive = cv::imread(output_progressive);
+
+    string output_normal = cv::tempfile(".jpg");
+    EXPECT_NO_THROW(cv::imwrite(output_normal, img));
```

Review comment:
Please remove the temporary files after you're done with them.
**File:** modules/highgui/test/test_grfmt.cpp
**Change Type:** modified
**Context:** PR #2378: added jpeg progressive support. - Related to this ticket: http://code.opencv.org/issues/3547.

**Code Changes:**
```diff
@@ -386,6 +386,30 @@ TEST(Highgui_Jpeg, encode_empty)
 
     ASSERT_THROW(cv::imencode(".jpg", img, jpegImg), cv::Exception);
 }
+
+TEST(Highgui_Jpeg, encode_decode_progressive_jpeg)
+{
+    cvtest::TS& ts = *cvtest::TS::ptr();
+    string input = string(ts.get_data_path()) + "../cv/shared/lena.png";
+    cv::Mat img = cv::imread(input);
```

Review comment:
I believe this can be written much simpler as `EXPECT_EQ(0, cv::norm(img_jpg_progressive, img_jpg_normal, NORM_INF))`.
**File:** modules/ts/misc/run.py
**Change Type:** modified
**Context:** PR #1837: Experimental OpenCL support for Android. - Improvements: - Some of functions were enabled by changing grid size; - OpenCL kernel grid size u...
**Review Line:** 567

**Code Changes:**
```diff
                 hw = ""
             tstamp = timestamp.strftime("%Y%m%d-%H%M%S")
-            return "%s_%s_%s_%s%s%s.xml" % (app, self.targetos, self.targetarch, hw, rev, tstamp)
+            lname = "%s_%s_%s_%s%s%s.xml" % (app, self.targetos, self.targetarch, hw, rev, tstamp)
+            lname = str.replace(lname, '(', '_')
+            lname = str.replace(lname, ')', '_')
+            return lname
 
     def getTest(self, name):
         # full path
```

Review comment:
What's the problem with parentheses? And where do they come from, anyway?
**File:** modules/ts/misc/run.py
**Change Type:** modified
**Context:** PR #1837: Experimental OpenCL support for Android. - Improvements: - Some of functions were enabled by changing grid size; - OpenCL kernel grid size u...

**Code Changes:**
```diff
@@ -562,7 +562,10 @@ def getLogName(self, app, timestamp):
             else:
                 hw = ""
             tstamp = timestamp.strftime("%Y%m%d-%H%M%S")
-            return "%s_%s_%s_%s%s%s.xml" % (app, self.targetos, self.targetarch, hw, rev, tstamp)
+            lname = "%s_%s_%s_%s%s%s.xml" % (app, self.targetos, self.targetarch, hw, rev, tstamp)
+            lname = str.replace(lname, '(', '_')
+            lname = str.replace(lname, ')', '_')
+            return lname
 
```

Review comment:
Looks like a debugging output.
**File:** modules/ts/misc/run.py
**Change Type:** modified
**Context:** PR #1837: Experimental OpenCL support for Android. - Improvements: - Some of functions were enabled by changing grid size; - OpenCL kernel grid size u...
**Review Line:** 567

**Code Changes:**
```diff
                 hw = ""
             tstamp = timestamp.strftime("%Y%m%d-%H%M%S")
-            return "%s_%s_%s_%s%s%s.xml" % (app, self.targetos, self.targetarch, hw, rev, tstamp)
+            lname = "%s_%s_%s_%s%s%s.xml" % (app, self.targetos, self.targetarch, hw, rev, tstamp)
+            lname = str.replace(lname, '(', '_')
+            lname = str.replace(lname, ')', '_')
+            return lname
 
     def getTest(self, name):
         # full path
```

Review comment:
They come from full device name and become part of log or xml file name. File name is a part of command line on android during test execution. Using command line with parentheses breaks shell syntax on the Android phone. It is easier to replace it with some simple symbol then guard them with "\".
**File:** modules/features2d/src/akaze/AKAZEConfig.h
**Change Type:** added
**Context:** PR #2673: Kaze - This pull request adds two new feature algorithms: [KAZE](http://www.robesafe.com/personal/pablo.alcantarilla/papers/Alcantarilla12ec...

**Code Changes:**
```diff
@@ -0,0 +1,109 @@
+/**
+ * @file AKAZEConfig.h
+ * @brief AKAZE configuration file
+ * @date Feb 23, 2014
+ * @author Pablo F. Alcantarilla, Jesus Nuevo
+ */
+
+#pragma once
+
```

Review comment:
Variable is not initialized in the constructor and nowhere more is not used. Maybe it's an old variable?
**File:** modules/features2d/src/akaze/AKAZEConfig.h
**Change Type:** added
**Context:** PR #2673: Kaze - This pull request adds two new feature algorithms: [KAZE](http://www.robesafe.com/personal/pablo.alcantarilla/papers/Alcantarilla12ec...
**Review Line:** 65

**Code Changes:**
```diff
+    {
+    }
+
+    int omax;                       ///< Maximum octave evolution of the image 2^sigma (coarsest scale sigma units)
+    int nsublevels;                 ///< Default number of sublevels per scale level
+    int img_width;                  ///< Width of the input image
+    int img_height;                 ///< Height of the input image
+    float soffset;                  ///< Base scale offset (sigma units)
+    float derivative_factor;        ///< Factor for the multiscale derivatives
+    float sderivatives;             ///< Smoothing factor for the derivatives
+    DIFFUSIVITY_TYPE diffusivity;   ///< Diffusivity type
```

Review comment:
Variable is not initialized in the constructor.
**File:** modules/features2d/src/akaze/AKAZEConfig.h
**Change Type:** added
**Context:** PR #2673: Kaze - This pull request adds two new feature algorithms: [KAZE](http://www.robesafe.com/personal/pablo.alcantarilla/papers/Alcantarilla12ec...
**Review Line:** 66

**Code Changes:**
```diff
+    }
+
+    int omax;                       ///< Maximum octave evolution of the image 2^sigma (coarsest scale sigma units)
+    int nsublevels;                 ///< Default number of sublevels per scale level
+    int img_width;                  ///< Width of the input image
+    int img_height;                 ///< Height of the input image
+    float soffset;                  ///< Base scale offset (sigma units)
+    float derivative_factor;        ///< Factor for the multiscale derivatives
+    float sderivatives;             ///< Smoothing factor for the derivatives
+    DIFFUSIVITY_TYPE diffusivity;   ///< Diffusivity type
+
```

Review comment:
Variable is not initialized in the constructor.
**File:** modules/features2d/src/kaze/KAZEFeatures.h
**Change Type:** added
**Context:** PR #2673: Kaze - This pull request adds two new feature algorithms: [KAZE](http://www.robesafe.com/personal/pablo.alcantarilla/papers/Alcantarilla12ec...

**Code Changes:**
```diff
@@ -0,0 +1,90 @@
+
+/**
+ * @file KAZE.h
+ * @brief Main program for detecting and computing descriptors in a nonlinear
+ * scale space
+ * @date Jan 21, 2012
+ * @author Pablo F. Alcantarilla
+ */
+
```

Review comment:
This function is never called. Maybe it is dead code?
**File:** modules/features2d/src/akaze/AKAZEConfig.h
**Change Type:** added
**Context:** PR #2673: Kaze - This pull request adds two new feature algorithms: [KAZE](http://www.robesafe.com/personal/pablo.alcantarilla/papers/Alcantarilla12ec...

**Code Changes:**
```diff
@@ -0,0 +1,109 @@
+/**
+ * @file AKAZEConfig.h
+ * @brief AKAZE configuration file
+ * @date Feb 23, 2014
+ * @author Pablo F. Alcantarilla, Jesus Nuevo
+ */
+
+#pragma once
+
```

Review comment:
A good point! You're right, this is dead code and will be removed.
**File:** modules/features2d/src/kaze/KAZEFeatures.h
**Change Type:** added
**Context:** PR #2673: Kaze - This pull request adds two new feature algorithms: [KAZE](http://www.robesafe.com/personal/pablo.alcantarilla/papers/Alcantarilla12ec...

**Code Changes:**
```diff
@@ -0,0 +1,90 @@
+
+/**
+ * @file KAZE.h
+ * @brief Main program for detecting and computing descriptors in a nonlinear
+ * scale space
+ * @date Jan 21, 2012
+ * @author Pablo F. Alcantarilla
+ */
+
```

Review comment:
Variable is not initialized in the constructor and never used. Get/Set methods for this variable also never used. May be it dead code?
**File:** modules/features2d/src/kaze/KAZEFeatures.h
**Change Type:** added
**Context:** PR #2673: Kaze - This pull request adds two new feature algorithms: [KAZE](http://www.robesafe.com/personal/pablo.alcantarilla/papers/Alcantarilla12ec...

**Code Changes:**
```diff
@@ -0,0 +1,90 @@
+
+/**
+ * @file KAZE.h
+ * @brief Main program for detecting and computing descriptors in a nonlinear
+ * scale space
+ * @date Jan 21, 2012
+ * @author Pablo F. Alcantarilla
+ */
+
```

Review comment:
Variable is not initialized in the constructor.
**File:** modules/features2d/src/akaze/AKAZEFeatures.h
**Change Type:** added
**Context:** PR #2673: Kaze - This pull request adds two new feature algorithms: [KAZE](http://www.robesafe.com/personal/pablo.alcantarilla/papers/Alcantarilla12ec...

**Code Changes:**
```diff
@@ -0,0 +1,65 @@
+/**
+ * @file AKAZE.h
+ * @brief Main class for detecting and computing binary descriptors in an
+ * accelerated nonlinear scale space
+ * @date Mar 27, 2013
+ * @author Pablo F. Alcantarilla, Jesus Nuevo
+ */
+
+#pragma once
```

Review comment:
I think this code will not be used again. Maybe should remove this?
**File:** modules/features2d/src/kaze/KAZEFeatures.h
**Change Type:** added
**Context:** PR #2673: Kaze - This pull request adds two new feature algorithms: [KAZE](http://www.robesafe.com/personal/pablo.alcantarilla/papers/Alcantarilla12ec...

**Code Changes:**
```diff
@@ -0,0 +1,90 @@
+
+/**
+ * @file KAZE.h
+ * @brief Main program for detecting and computing descriptors in a nonlinear
+ * scale space
+ * @date Jan 21, 2012
+ * @author Pablo F. Alcantarilla
+ */
+
```

Review comment:
This code is dead? Maybe it is time to remove it?
**File:** modules/features2d/src/kaze/KAZEFeatures.h
**Change Type:** added
**Context:** PR #2673: Kaze - This pull request adds two new feature algorithms: [KAZE](http://www.robesafe.com/personal/pablo.alcantarilla/papers/Alcantarilla12ec...

**Code Changes:**
```diff
@@ -0,0 +1,90 @@
+
+/**
+ * @file KAZE.h
+ * @brief Main program for detecting and computing descriptors in a nonlinear
+ * scale space
+ * @date Jan 21, 2012
+ * @author Pablo F. Alcantarilla
+ */
+
```

Review comment:
Lines 55 to 62 (all of which is a commented).
**File:** modules/features2d/src/kaze/KAZEFeatures.h
**Change Type:** added
**Context:** PR #2673: Kaze - This pull request adds two new feature algorithms: [KAZE](http://www.robesafe.com/personal/pablo.alcantarilla/papers/Alcantarilla12ec...

**Code Changes:**
```diff
@@ -0,0 +1,90 @@
+
+/**
+ * @file KAZE.h
+ * @brief Main program for detecting and computing descriptors in a nonlinear
+ * scale space
+ * @date Jan 21, 2012
+ * @author Pablo F. Alcantarilla
+ */
+
```

Review comment:
Maybe i missed somewhere else in the code commented out code. It is better to keep in the git history, and not comments.
**File:** modules/features2d/src/kaze/KAZEFeatures.h
**Change Type:** added
**Context:** PR #2673: Kaze - This pull request adds two new feature algorithms: [KAZE](http://www.robesafe.com/personal/pablo.alcantarilla/papers/Alcantarilla12ec...

**Code Changes:**
```diff
@@ -0,0 +1,90 @@
+
+/**
+ * @file KAZE.h
+ * @brief Main program for detecting and computing descriptors in a nonlinear
+ * scale space
+ * @date Jan 21, 2012
+ * @author Pablo F. Alcantarilla
+ */
+
```

Review comment:
Functions in nldiffusion_functions looks very similar (identical signature), however there are a few differences in implementation. I've sent request to KAZE author to clarify whether we can leave only one implementation.
**File:** modules/features2d/src/kaze/KAZEFeatures.h
**Change Type:** added
**Context:** PR #2673: Kaze - This pull request adds two new feature algorithms: [KAZE](http://www.robesafe.com/personal/pablo.alcantarilla/papers/Alcantarilla12ec...

**Code Changes:**
```diff
@@ -0,0 +1,90 @@
+
+/**
+ * @file KAZE.h
+ * @brief Main program for detecting and computing descriptors in a nonlinear
+ * scale space
+ * @date Jan 21, 2012
+ * @author Pablo F. Alcantarilla
+ */
+
```

Review comment:
I found significant differences only for nld_step_scalar(...), but it's may be identical the logic operations. In other methods, the differences are mostly in formatting.
**File:** modules/features2d/include/opencv2/features2d.hpp
**Change Type:** modified
**Context:** PR #2673: Kaze - This pull request adds two new feature algorithms: [KAZE](http://www.robesafe.com/personal/pablo.alcantarilla/papers/Alcantarilla12ec...
**Review Line:** 934

**Code Changes:**
```diff
+class CV_EXPORTS_W AKAZE : public Feature2D
+{
+public:
+    /// AKAZE Descriptor Type
+    enum DESCRIPTOR_TYPE {
+        DESCRIPTOR_KAZE_UPRIGHT = 2, ///< Upright descriptors, not invariant to rotation
+        DESCRIPTOR_KAZE = 3,
+        DESCRIPTOR_MLDB_UPRIGHT = 4, ///< Upright descriptors, not invariant to rotation
+        DESCRIPTOR_MLDB = 5
+    };
+
```

Review comment:
Why do we start from 2? It is question for KAZE and AKAZE enums?
**File:** modules/features2d/include/opencv2/features2d/features2d.hpp
**Change Type:** modified
**Context:** PR #1087: GFTT wrapped to python

**Code Changes:**
```diff
@@ -589,11 +589,11 @@ class CV_EXPORTS_W FastFeatureDetector : public FeatureDetector
 };
 
 
-class CV_EXPORTS GFTTDetector : public FeatureDetector
+class CV_EXPORTS_W GFTTDetector : public FeatureDetector
 {
 public:
-    GFTTDetector( int maxCorners=1000, double qualityLevel=0.01, double minDistance=1,
-                  int blockSize=3, bool useHarrisDetector=false, double k=0.04 );
```

Review comment:
Please realign this line.
**File:** modules/matlab/include/opencv2/matlab/bridge.hpp
**Change Type:** modified
**Context:** PR #2783: Fixed MATLAB Bridge for DenseOpticalFlow - The MATLAB module was not compiling in R2014a on my machine. After adding these lines in the same...

**Code Changes:**
```diff
@@ -50,6 +50,7 @@
 #include <opencv2/imgproc.hpp>
 #include <opencv2/calib3d.hpp>
 #include <opencv2/photo.hpp>
+#include <opencv2/video.hpp>
 
 namespace cv {
 namespace bridge {
@@ -76,6 +77,7 @@ typedef cv::Ptr<LineSegmentDetector> Ptr_LineSegmentDetector;
 typedef cv::Ptr<AlignMTB> Ptr_AlignMTB;
```

Review comment:
OK. Can you please change it to `#include <opencv2/video.hpp>`, and make sure that everything still works for you? Your PR looks good otherwise :)
**File:** cmake/OpenCVDetectCUDA.cmake
**Change Type:** modified
**Context:** PR #2449: Cut path to CUDA libraries to prevent generation of OpenCVModules.cmake with abs path

**Code Changes:**
```diff
@@ -219,3 +219,42 @@ else()
   unset(CUDA_ARCH_BIN CACHE)
   unset(CUDA_ARCH_PTX CACHE)
 endif()
+
+if(HAVE_CUDA)
+  set(CUDA_LIBS_PATH "")
+  foreach(p ${CUDA_LIBRARIES} ${CUDA_npp_LIBRARY})
+    get_filename_component(_tmp ${p} PATH)
+    list(APPEND CUDA_LIBS_PATH ${_tmp})
```

Review comment:
Missing indentation.
**File:** samples/cpp/connected_components.cpp
**Change Type:** modified
**Context:** PR #135: connectedcomponents submission - Hi, This is a git pull request for the following issue (that has went on way too long!). I've fixed up the D...

**Code Changes:**
```diff
@@ -11,25 +11,21 @@ int threshval = 100;
 static void on_trackbar(int, void*)
 {
     Mat bw = threshval < 128 ? (img < threshval) : (img > threshval);
-
-    vector<vector<Point> > contours;
-    vector<Vec4i> hierarchy;
-
-    findContours( bw, contours, hierarchy, CV_RETR_CCOMP, CV_CHAIN_APPROX_SIMPLE );
-
```

Review comment:
This is an error with MSVC9 (VS2008) since `nLabels` is not a constant; use new and delete instead.
**File:** samples/cpp/connected_components.cpp
**Change Type:** modified
**Context:** PR #135: connectedcomponents submission - Hi, This is a git pull request for the following issue (that has went on way too long!). I've fixed up the D...

**Code Changes:**
```diff
@@ -11,25 +11,21 @@ int threshval = 100;
 static void on_trackbar(int, void*)
 {
     Mat bw = threshval < 128 ? (img < threshval) : (img > threshval);
-
-    vector<vector<Point> > contours;
-    vector<Vec4i> hierarchy;
-
-    findContours( bw, contours, hierarchy, CV_RETR_CCOMP, CV_CHAIN_APPROX_SIMPLE );
-
```

Review comment:
"const int" will not help. Using run-time, not a compile-time value to specify the array size is GCC extension to C/C++ standards. Use vector<Vec3b> colors(nLabels); instead
**File:** modules/imgproc/src/connectedcomponents.cpp
**Change Type:** added
**Context:** PR #135: connectedcomponents submission - Hi, This is a git pull request for the following issue (that has went on way too long!). I've fixed up the D...

**Code Changes:**
```diff
@@ -0,0 +1,411 @@
+/*M///////////////////////////////////////////////////////////////////////////////////////
+//
+//  IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.
+//
+//  By downloading, copying, installing or using the software you agree to this license.
+//  If you do not agree to this license, do not download, install,
+//  copy or use the software.
+//
+//
```

Review comment:
To fix the Windows errors, at least with VC10, add `typedef unsigned __int64 uint64_t;`. However shouldn't this really be in core? Look at `core\types_c.h`, as `uint64` is already defined here. Consider using `uint64` etc. in your code, moving the necessary bits of this set of typedefs there.
**File:** modules/contrib/src/facerec.cpp
**Change Type:** modified
**Context:** PR #2705: [face rec] labels info string added

**Code Changes:**
```diff
@@ -98,10 +98,84 @@ inline vector<_Tp> remove_dups(const vector<_Tp>& src) {
     return elems;
 }
 
+// The FaceRecognizer2 class is introduced to keep the FaceRecognizer binary backward compatibility in 2.4
+// In master setLabelInfo/getLabelInfo/getLabelsByString should be virtual and _labelsInfo should be moved
+// to FaceRecognizer, that allows to avoid FaceRecognizer2 in master
+class FaceRecognizer2 : public FaceRecognizer
+{
+protected:
```

Review comment:
`friend` declaration is useless here
**File:** modules/contrib/include/opencv2/contrib/contrib.hpp
**Change Type:** modified
**Context:** PR #2705: [face rec] labels info string added

**Code Changes:**
```diff
@@ -948,6 +948,14 @@ namespace cv
         // Deserializes this object from a given cv::FileStorage.
         virtual void load(const FileStorage& fs) = 0;
 
+        // Sets additional information as pairs label - info.
+        void setLabelsInfo(const std::map<int, string>& labelsInfo);
+
+        // Gets string information by label
+        string getLabelInfo(const int &label);
+
```

Review comment:
`const string & str`?
**File:** samples/cpp/facerec_demo.cpp
**Change Type:** modified
**Context:** PR #2705: [face rec] labels info string added

**Code Changes:**
```diff
@@ -39,20 +39,23 @@ static Mat toGrayscale(InputArray _src) {
     return dst;
 }
 
-static void read_csv(const string& filename, vector<Mat>& images, vector<int>& labels, char separator = ';') {
+static void read_csv(const string& filename, vector<Mat>& images, vector<int>& labels, std::map<int, string>& labelsInfo, char separator = ';') {
     std::ifstream file(filename.c_str(), ifstream::in);
     if (!file) {
         string error_message = "No valid input file was given, please check the given filename.";
         CV_Error(CV_StsBadArg, error_message);
```

Review comment:
`!model->getLabelInfo(predictedLabel).empty()`
**File:** modules/contrib/src/facerec.cpp
**Change Type:** modified
**Context:** PR #2705: [face rec] labels info string added

**Code Changes:**
```diff
@@ -98,10 +98,84 @@ inline vector<_Tp> remove_dups(const vector<_Tp>& src) {
     return elems;
 }
 
+// The FaceRecognizer2 class is introduced to keep the FaceRecognizer binary backward compatibility in 2.4
+// In master setLabelInfo/getLabelInfo/getLabelsByString should be virtual and _labelsInfo should be moved
+// to FaceRecognizer, that allows to avoid FaceRecognizer2 in master
+class FaceRecognizer2 : public FaceRecognizer
+{
+protected:
```

Review comment:
`const string& _value` ?
**File:** modules/contrib/include/opencv2/contrib/contrib.hpp
**Change Type:** modified
**Context:** PR #2705: [face rec] labels info string added

**Code Changes:**
```diff
@@ -948,6 +948,14 @@ namespace cv
         // Deserializes this object from a given cv::FileStorage.
         virtual void load(const FileStorage& fs) = 0;
 
+        // Sets additional information as pairs label - info.
+        void setLabelsInfo(const std::map<int, string>& labelsInfo);
+
+        // Gets string information by label
+        string getLabelInfo(const int &label);
+
```

Review comment:
I would suggest `virtual string getLabelInfo(int label) const = 0;` here and below; (moving `const` from arg to func spec)
**File:** modules/contrib/doc/facerec/facerec_api.rst
**Change Type:** modified
**Context:** PR #2705: [face rec] labels info string added

**Code Changes:**
```diff
@@ -46,6 +46,15 @@ a unified access to all face recongition algorithms in OpenCV. ::
 
       // Deserializes this object from a given cv::FileStorage.
       virtual void load(const FileStorage& fs) = 0;
+
+      // Sets additional information as pairs label - info.
+      void setLabelsInfo(const std::map<int, string>& labelsInfo);
+
+      // Gets string information by label
+      string getLabelInfo(const int &label);
```

Review comment:
a pair "label id - string info"
**File:** modules/contrib/doc/facerec/facerec_api.rst
**Change Type:** modified
**Context:** PR #2705: [face rec] labels info string added

**Code Changes:**
```diff
@@ -46,6 +46,15 @@ a unified access to all face recongition algorithms in OpenCV. ::
 
       // Deserializes this object from a given cv::FileStorage.
       virtual void load(const FileStorage& fs) = 0;
+
+      // Sets additional information as pairs label - info.
+      void setLabelsInfo(const std::map<int, string>& labelsInfo);
+
+      // Gets string information by label
+      string getLabelInfo(const int &label);
```

Review comment:
If an unknown label id is provided or there is no label information assosiated with the specified label id the method returns an empty string.