nareshmlx/opencv-pr huggingface dataset:
**File:** modules/dnn/include/opencv2/dnn/all_layers.hpp
**Change Type:** modified
**Context:** PR #16223: Add human parsing demo - **Merge with extra:** opencv/opencv_extra#695 ``` force_builders=Custom,Custom Win,Custom Mac build_image:Custom=u...

**Code Changes:**
```diff
@@ -250,7 +250,8 @@ CV__DNN_EXPERIMENTAL_NS_BEGIN
         std::vector<size_t> pads_begin, pads_end;
         CV_DEPRECATED_EXTERNAL Size kernel, stride, pad;
         CV_DEPRECATED_EXTERNAL int pad_l, pad_t, pad_r, pad_b;
-        bool globalPooling;
+        bool globalPooling; //!< Flag is true if at least one of the axes is global pooled.
+        std::vector<bool> isGlobalPooling;
         bool computeMaxIdx;
         String padMode;
         bool ceilMode;
```

Review comment:
Due we are going to use this flag as well, let's remove `CV_DEPRECATED_EXTERNAL`
**File:** modules/dnn/src/tensorflow/tf_importer.cpp
**Change Type:** modified
**Context:** PR #16223: Add human parsing demo - **Merge with extra:** opencv/opencv_extra#695 ``` force_builders=Custom,Custom Win,Custom Mac build_image:Custom=u...

**Code Changes:**
```diff
@@ -1932,37 +1932,151 @@ void TFImporter::populateNet(Net dstNet)
         }
         else if (type == "Mean")
         {
+            // Computes the mean of elements across dimensions of a tensor.
+            // If keepdims is false (default) reduces input_tensor along the dimensions given in axis,
+            // else the reduced dimensions are retained with length 1.
+            // if indices = [1, 2] in NHWC layout we use global pooling: NxCxHxW --Pooling--> NxCx1x1
+            // if keepdims is false we use Flatten after Pooling: out_shape = NxC
+            // if indices = [0] we use a global pooling by indices.
```

Review comment:
Maybe it's better to use `dstNet`'s connect directly?
**File:** modules/dnn/src/layers/pooling_layer.cpp
**Change Type:** modified
**Context:** PR #16223: Add human parsing demo - **Merge with extra:** opencv/opencv_extra#695 ``` force_builders=Custom,Custom Win,Custom Mac build_image:Custom=u...
**Review Line:** 155

**Code Changes:**
```diff
-            kernel_size = std::vector<size_t>(inp.begin(), inp.end());
-        }
+            std::vector<size_t> finalKernel;
+            for (int i = 0; i < inp.size(); i++) {
+                int idx = isGlobalPooling.size() - inp.size() + i;
+                finalKernel.push_back(isGlobalPooling[idx] ? inp[i] : kernel_size[idx]);
+             }
+             kernel_size = finalKernel;
+             kernel = Size(kernel_size[1], kernel_size[0]);
+         }
 
```

Review comment:
Let's add assert before the loop that ```cpp isGlobalPooling.size() == kernel_size.size() ```
**File:** modules/dnn/src/layers/pooling_layer.cpp
**Change Type:** modified
**Context:** PR #16223: Add human parsing demo - **Merge with extra:** opencv/opencv_extra#695 ``` force_builders=Custom,Custom Win,Custom Mac build_image:Custom=u...

**Code Changes:**
```diff
@@ -79,6 +79,7 @@ class PoolingLayerImpl CV_FINAL : public PoolingLayer
     {
         computeMaxIdx = true;
         globalPooling = false;
+        isGlobalPooling = std::vector<bool>(3, false);
         stride = Size(1, 1);
         pad_t = pad_l = pad_b = pad_r = 0;
 
@@ -95,7 +96,8 @@ class PoolingLayerImpl CV_FINAL : public PoolingLayer
             else
```

Review comment:
Let's reuse the loop above: ```cpp std::vector<size_t> finalKernel; if (globalPooling) for (int i = 0; i < inp.size(); i++) { int idx = isGlobalPooling.size() - inp.size() + i; finalKernel.push_back(isGlobalPooling[idx] ? inp[i] : kernel_size[idx]); } else finalKernel = kernel_size; ``` so in the code below we can use it without offsets: ```cpp for (int i = 0; i < finalKernel.size(); i++) { float dst = (float)(inpShape[i] + pads_begin[i] + pads_end[i] - finalKernel[i]) / strides[i]; ```
**File:** modules/dnn/src/layers/pooling_layer.cpp
**Change Type:** modified
**Context:** PR #16223: Add human parsing demo - **Merge with extra:** opencv/opencv_extra#695 ``` force_builders=Custom,Custom Win,Custom Mac build_image:Custom=u...

**Code Changes:**
```diff
@@ -79,6 +79,7 @@ class PoolingLayerImpl CV_FINAL : public PoolingLayer
     {
         computeMaxIdx = true;
         globalPooling = false;
+        isGlobalPooling = std::vector<bool>(3, false);
         stride = Size(1, 1);
         pad_t = pad_l = pad_b = pad_r = 0;
 
@@ -95,7 +96,8 @@ class PoolingLayerImpl CV_FINAL : public PoolingLayer
             else
```

Review comment:
please remove extra newline here and in one more place before
**File:** modules/dnn/src/layers/slice_layer.cpp
**Change Type:** modified
**Context:** PR #16223: Add human parsing demo - **Merge with extra:** opencv/opencv_extra#695 ``` force_builders=Custom,Custom Win,Custom Mac build_image:Custom=u...
**Review Line:** 117

**Code Changes:**
```diff
@@ -114,7 +114,8 @@ class SliceLayerImpl : public SliceLayer
     virtual bool supportBackend(int backendId) CV_OVERRIDE
     {
         return backendId == DNN_BACKEND_OPENCV ||
-               ((backendId == DNN_BACKEND_INFERENCE_ENGINE_NN_BUILDER_2019 || backendId == DNN_BACKEND_INFERENCE_ENGINE_NGRAPH) &&
+               (backendId == DNN_BACKEND_INFERENCE_ENGINE_NGRAPH && sliceRanges.size() == 1) ||
+               (backendId == DNN_BACKEND_INFERENCE_ENGINE_NN_BUILDER_2019 &&
 #ifdef HAVE_INF_ENGINE
                 INF_ENGINE_VER_MAJOR_GE(INF_ENGINE_RELEASE_2019R1) &&
 #endif
```

Review comment:
Did we have a test with `sliceRanges.size() > 1` before?
**File:** modules/dnn/src/layers/slice_layer.cpp
**Change Type:** modified
**Context:** PR #16223: Add human parsing demo - **Merge with extra:** opencv/opencv_extra#695 ``` force_builders=Custom,Custom Win,Custom Mac build_image:Custom=u...
**Review Line:** 117

**Code Changes:**
```diff
@@ -114,7 +114,8 @@ class SliceLayerImpl : public SliceLayer
     virtual bool supportBackend(int backendId) CV_OVERRIDE
     {
         return backendId == DNN_BACKEND_OPENCV ||
-               ((backendId == DNN_BACKEND_INFERENCE_ENGINE_NN_BUILDER_2019 || backendId == DNN_BACKEND_INFERENCE_ENGINE_NGRAPH) &&
+               (backendId == DNN_BACKEND_INFERENCE_ENGINE_NGRAPH && sliceRanges.size() == 1) ||
+               (backendId == DNN_BACKEND_INFERENCE_ENGINE_NN_BUILDER_2019 &&
 #ifdef HAVE_INF_ENGINE
                 INF_ENGINE_VER_MAJOR_GE(INF_ENGINE_RELEASE_2019R1) &&
 #endif
```

Review comment:
Yes, Test_Caffe_layers.Reshape_Split_Slice: sliceRanges.size() = 3
**File:** modules/dnn/src/layers/slice_layer.cpp
**Change Type:** modified
**Context:** PR #16223: Add human parsing demo - **Merge with extra:** opencv/opencv_extra#695 ``` force_builders=Custom,Custom Win,Custom Mac build_image:Custom=u...
**Review Line:** 117

**Code Changes:**
```diff
@@ -114,7 +114,8 @@ class SliceLayerImpl : public SliceLayer
     virtual bool supportBackend(int backendId) CV_OVERRIDE
     {
         return backendId == DNN_BACKEND_OPENCV ||
-               ((backendId == DNN_BACKEND_INFERENCE_ENGINE_NN_BUILDER_2019 || backendId == DNN_BACKEND_INFERENCE_ENGINE_NGRAPH) &&
+               (backendId == DNN_BACKEND_INFERENCE_ENGINE_NGRAPH && sliceRanges.size() == 1) ||
+               (backendId == DNN_BACKEND_INFERENCE_ENGINE_NN_BUILDER_2019 &&
 #ifdef HAVE_INF_ENGINE
                 INF_ENGINE_VER_MAJOR_GE(INF_ENGINE_RELEASE_2019R1) &&
 #endif
```

Review comment:
But why we need this condition in this PR?
**File:** modules/dnn/src/layers/slice_layer.cpp
**Change Type:** modified
**Context:** PR #16223: Add human parsing demo - **Merge with extra:** opencv/opencv_extra#695 ``` force_builders=Custom,Custom Win,Custom Mac build_image:Custom=u...
**Review Line:** 117

**Code Changes:**
```diff
@@ -114,7 +114,8 @@ class SliceLayerImpl : public SliceLayer
     virtual bool supportBackend(int backendId) CV_OVERRIDE
     {
         return backendId == DNN_BACKEND_OPENCV ||
-               ((backendId == DNN_BACKEND_INFERENCE_ENGINE_NN_BUILDER_2019 || backendId == DNN_BACKEND_INFERENCE_ENGINE_NGRAPH) &&
+               (backendId == DNN_BACKEND_INFERENCE_ENGINE_NGRAPH && sliceRanges.size() == 1) ||
+               (backendId == DNN_BACKEND_INFERENCE_ENGINE_NN_BUILDER_2019 &&
 #ifdef HAVE_INF_ENGINE
                 INF_ENGINE_VER_MAJOR_GE(INF_ENGINE_RELEASE_2019R1) &&
 #endif
```

Review comment:
We enable case with ` sliceRanges.size() =1` and with any` sliceRanges[0].size()` (not just `sliceRanges[0].size() == 4`)
**File:** modules/dnn/src/layers/slice_layer.cpp
**Change Type:** modified
**Context:** PR #16223: Add human parsing demo - **Merge with extra:** opencv/opencv_extra#695 ``` force_builders=Custom,Custom Win,Custom Mac build_image:Custom=u...
**Review Line:** 117

**Code Changes:**
```diff
@@ -114,7 +114,8 @@ class SliceLayerImpl : public SliceLayer
     virtual bool supportBackend(int backendId) CV_OVERRIDE
     {
         return backendId == DNN_BACKEND_OPENCV ||
-               ((backendId == DNN_BACKEND_INFERENCE_ENGINE_NN_BUILDER_2019 || backendId == DNN_BACKEND_INFERENCE_ENGINE_NGRAPH) &&
+               (backendId == DNN_BACKEND_INFERENCE_ENGINE_NGRAPH && sliceRanges.size() == 1) ||
+               (backendId == DNN_BACKEND_INFERENCE_ENGINE_NN_BUILDER_2019 &&
 #ifdef HAVE_INF_ENGINE
                 INF_ENGINE_VER_MAJOR_GE(INF_ENGINE_RELEASE_2019R1) &&
 #endif
```

Review comment:
I mean this PR introduces limited usage of Slice layer with nGraph because of new mode of Mean layer?
**File:** modules/dnn/src/layers/pooling_layer.cpp
**Change Type:** modified
**Context:** PR #16223: Add human parsing demo - **Merge with extra:** opencv/opencv_extra#695 ``` force_builders=Custom,Custom Win,Custom Mac build_image:Custom=u...

**Code Changes:**
```diff
@@ -79,6 +79,7 @@ class PoolingLayerImpl CV_FINAL : public PoolingLayer
     {
         computeMaxIdx = true;
         globalPooling = false;
+        isGlobalPooling = std::vector<bool>(3, false);
         stride = Size(1, 1);
         pad_t = pad_l = pad_b = pad_r = 0;
 
@@ -95,7 +96,8 @@ class PoolingLayerImpl CV_FINAL : public PoolingLayer
             else
```

Review comment:
Why not `pads_end.size()`?
**File:** samples/dnn/human_parsing.py
**Change Type:** added
**Context:** PR #16223: Add human parsing demo - **Merge with extra:** opencv/opencv_extra#695 ``` force_builders=Custom,Custom Win,Custom Mac build_image:Custom=u...

**Code Changes:**
```diff
@@ -0,0 +1,178 @@
+#!/usr/bin/env python
+'''
+You can download the converted pb model from https://www.dropbox.com/s/qag9vzambhhkvxr/lip_jppnet_384.pb?dl=0
+or convert the model yourself.
+
+Follow these steps if you want to convert the original model yourself:
+    To get original .meta pre-trained model download https://drive.google.com/file/d/1BFVXgeln-bek8TCbRjN6utPAgRE0LJZg/view
+    For correct convert .meta to .pb model download original repository https://github.com/Engineering-Course/LIP_JPPNet
+    Change script evaluate_parsing_JPPNet-s2.py for human parsing
```

Review comment:
Please move this information in the beginning of the file and reformat it as "doc" string: ``` #!/usr/bin/env python ''' ... doc string goes here ... ''' ```
**File:** samples/dnn/human_parsing.py
**Change Type:** added
**Context:** PR #16223: Add human parsing demo - **Merge with extra:** opencv/opencv_extra#695 ``` force_builders=Custom,Custom Win,Custom Mac build_image:Custom=u...

**Code Changes:**
```diff
@@ -0,0 +1,178 @@
+#!/usr/bin/env python
+'''
+You can download the converted pb model from https://www.dropbox.com/s/qag9vzambhhkvxr/lip_jppnet_384.pb?dl=0
+or convert the model yourself.
+
+Follow these steps if you want to convert the original model yourself:
+    To get original .meta pre-trained model download https://drive.google.com/file/d/1BFVXgeln-bek8TCbRjN6utPAgRE0LJZg/view
+    For correct convert .meta to .pb model download original repository https://github.com/Engineering-Course/LIP_JPPNet
+    Change script evaluate_parsing_JPPNet-s2.py for human parsing
```

Review comment:
Lets `import numpy` first
**File:** modules/dnn/include/opencv2/dnn/all_layers.hpp
**Change Type:** modified
**Context:** PR #16223: Add human parsing demo - **Merge with extra:** opencv/opencv_extra#695 ``` force_builders=Custom,Custom Win,Custom Mac build_image:Custom=u...
**Review Line:** 254

**Code Changes:**
```diff
         std::vector<size_t> pads_begin, pads_end;
         CV_DEPRECATED_EXTERNAL Size kernel, stride, pad;
         CV_DEPRECATED_EXTERNAL int pad_l, pad_t, pad_r, pad_b;
-        bool globalPooling;
+        bool globalPooling; //!< Flag is true if at least one of the axes is global pooled.
+        std::vector<bool> isGlobalPooling;
         bool computeMaxIdx;
         String padMode;
         bool ceilMode;
```

Review comment:
Please increase version for DNN namespace `CV__DNN_EXPERIMENTAL_NS`.
**File:** samples/dnn/human_parsing.py
**Change Type:** added
**Context:** PR #16223: Add human parsing demo - **Merge with extra:** opencv/opencv_extra#695 ``` force_builders=Custom,Custom Win,Custom Mac build_image:Custom=u...

**Code Changes:**
```diff
@@ -0,0 +1,178 @@
+#!/usr/bin/env python
+'''
+You can download the converted pb model from https://www.dropbox.com/s/qag9vzambhhkvxr/lip_jppnet_384.pb?dl=0
+or convert the model yourself.
+
+Follow these steps if you want to convert the original model yourself:
+    To get original .meta pre-trained model download https://drive.google.com/file/d/1BFVXgeln-bek8TCbRjN6utPAgRE0LJZg/view
+    For correct convert .meta to .pb model download original repository https://github.com/Engineering-Course/LIP_JPPNet
+    Change script evaluate_parsing_JPPNet-s2.py for human parsing
```

Review comment:
Why do we need indentation here?
**File:** modules/objdetect/include/opencv2/objdetect.hpp
**Change Type:** modified
**Context:** PR #15338: QR-Code detector : multiple detection - **Merge with extra**: https://github.com/opencv/opencv_extra/pull/684

**Code Changes:**
```diff
@@ -694,8 +694,8 @@ class CV_EXPORTS_W QRCodeDetector
     CV_WRAP bool detect(InputArray img, OutputArray points) const;
 
     /** @brief Decodes QR code in image once it's found by the detect() method.
-     Returns UTF8-encoded output string or empty string if the code cannot be decoded.
 
+     Returns UTF8-encoded output string or empty string if the code cannot be decoded.
      @param img grayscale or color (BGR) image containing QR code.
      @param points Quadrangle vertices found by detect() method (or some other algorithm).
      @param straight_qrcode The optional output image containing rectified and binarized QR code
```

Review comment:
pls deleted tabs and exatra spaces
**File:** modules/objdetect/perf/perf_qrcode_pipeline.cpp
**Change Type:** modified
**Context:** PR #15338: QR-Code detector : multiple detection - **Merge with extra**: https://github.com/opencv/opencv_extra/pull/684

**Code Changes:**
```diff
@@ -53,6 +53,56 @@ PERF_TEST_P_(Perf_Objdetect_QRCode, decode)
 }
 #endif
 
+typedef ::perf::TestBaseWithParam< std::string > Perf_Objdetect_QRCode_Multi;
+
+PERF_TEST_P_(Perf_Objdetect_QRCode_Multi, detectMulti)
+{
+    const std::string name_current_image = GetParam();
+    const std::string root = "cv/qrcode/multiple/";
```

Review comment:
pls add performance tests for few qr-codes ( 3/4/5 codes )
**File:** modules/objdetect/src/qrcode.cpp
**Change Type:** modified
**Context:** PR #15338: QR-Code detector : multiple detection - **Merge with extra**: https://github.com/opencv/opencv_extra/pull/684
**Review Line:** 24

**Code Changes:**
```diff
@@ -22,6 +22,48 @@ namespace cv
 {
 using std::vector;
 
+static bool checkQRInputImage(InputArray img, Mat& gray)
+{
+    CV_Assert(!img.empty());
+    CV_CheckDepthEQ(img.depth(), CV_8U, "");
+
```

Review comment:
pls remove changes that do not affect the program
**File:** modules/objdetect/src/qrcode.cpp
**Change Type:** modified
**Context:** PR #15338: QR-Code detector : multiple detection - **Merge with extra**: https://github.com/opencv/opencv_extra/pull/684
**Review Line:** 24

**Code Changes:**
```diff
@@ -22,6 +22,48 @@ namespace cv
 {
 using std::vector;
 
+static bool checkQRInputImage(InputArray img, Mat& gray)
+{
+    CV_Assert(!img.empty());
+    CV_CheckDepthEQ(img.depth(), CV_8U, "");
+
```

Review comment:
preferably everywhere
**File:** modules/objdetect/src/qrcode.cpp
**Change Type:** modified
**Context:** PR #15338: QR-Code detector : multiple detection - **Merge with extra**: https://github.com/opencv/opencv_extra/pull/684

**Code Changes:**
```diff
@@ -22,6 +22,48 @@ namespace cv
 {
 using std::vector;
 
+static bool checkQRInputImage(InputArray img, Mat& gray)
+{
+    CV_Assert(!img.empty());
+    CV_CheckDepthEQ(img.depth(), CV_8U, "");
+
+    if (img.cols() <= 20 || img.rows() <= 20)
```

Review comment:
pls call function in the same style (checkPoints, not CheckPoints)
**File:** modules/objdetect/src/qrcode.cpp
**Change Type:** modified
**Context:** PR #15338: QR-Code detector : multiple detection - **Merge with extra**: https://github.com/opencv/opencv_extra/pull/684

**Code Changes:**
```diff
@@ -22,6 +22,48 @@ namespace cv
 {
 using std::vector;
 
+static bool checkQRInputImage(InputArray img, Mat& gray)
+{
+    CV_Assert(!img.empty());
+    CV_CheckDepthEQ(img.depth(), CV_8U, "");
+
+    if (img.cols() <= 20 || img.rows() <= 20)
```

Review comment:
pls use `cv::Point`
**File:** modules/objdetect/src/qrcode.cpp
**Change Type:** modified
**Context:** PR #15338: QR-Code detector : multiple detection - **Merge with extra**: https://github.com/opencv/opencv_extra/pull/684

**Code Changes:**
```diff
@@ -22,6 +22,48 @@ namespace cv
 {
 using std::vector;
 
+static bool checkQRInputImage(InputArray img, Mat& gray)
+{
+    CV_Assert(!img.empty());
+    CV_CheckDepthEQ(img.depth(), CV_8U, "");
+
+    if (img.cols() <= 20 || img.rows() <= 20)
```

Review comment:
pls remove extra line
**File:** modules/objdetect/src/qrcode.cpp
**Change Type:** modified
**Context:** PR #15338: QR-Code detector : multiple detection - **Merge with extra**: https://github.com/opencv/opencv_extra/pull/684

**Code Changes:**
```diff
@@ -22,6 +22,48 @@ namespace cv
 {
 using std::vector;
 
+static bool checkQRInputImage(InputArray img, Mat& gray)
+{
+    CV_Assert(!img.empty());
+    CV_CheckDepthEQ(img.depth(), CV_8U, "");
+
+    if (img.cols() <= 20 || img.rows() <= 20)
```

Review comment:
why `struct`?
**File:** modules/objdetect/src/qrcode.cpp
**Change Type:** modified
**Context:** PR #15338: QR-Code detector : multiple detection - **Merge with extra**: https://github.com/opencv/opencv_extra/pull/684

**Code Changes:**
```diff
@@ -22,6 +22,48 @@ namespace cv
 {
 using std::vector;
 
+static bool checkQRInputImage(InputArray img, Mat& gray)
+{
+    CV_Assert(!img.empty());
+    CV_CheckDepthEQ(img.depth(), CV_8U, "");
+
+    if (img.cols() <= 20 || img.rows() <= 20)
```

Review comment:
write about `b` and `d`, because not informative
**File:** modules/objdetect/src/qrcode.cpp
**Change Type:** modified
**Context:** PR #15338: QR-Code detector : multiple detection - **Merge with extra**: https://github.com/opencv/opencv_extra/pull/684

**Code Changes:**
```diff
@@ -22,6 +22,48 @@ namespace cv
 {
 using std::vector;
 
+static bool checkQRInputImage(InputArray img, Mat& gray)
+{
+    CV_Assert(!img.empty());
+    CV_CheckDepthEQ(img.depth(), CV_8U, "");
+
+    if (img.cols() <= 20 || img.rows() <= 20)
```

Review comment:
not on the same line as the line above
**File:** modules/objdetect/test/test_qrcode.cpp
**Change Type:** modified
**Context:** PR #15338: QR-Code detector : multiple detection - **Merge with extra**: https://github.com/opencv/opencv_extra/pull/684

**Code Changes:**
```diff
@@ -21,7 +21,11 @@ std::string qrcode_images_close[] = {
 std::string qrcode_images_monitor[] = {
   "monitor_1.png", "monitor_2.png", "monitor_3.png", "monitor_4.png", "monitor_5.png"
 };
-// #define UPDATE_QRCODE_TEST_DATA
+std::string qrcode_images_multiple[] = {
+  "2_qrcodes.png", "3_close_qrcodes.png", "3_qrcodes.png", "4_qrcodes.png",
+   "5_qrcodes.png", "6_qrcodes.png", "7_qrcodes.png", "8_close_qrcodes.png"
+};
+//#define UPDATE_QRCODE_TEST_DATA
```

Review comment:
pls remove comments
**File:** modules/objdetect/include/opencv2/objdetect.hpp
**Change Type:** modified
**Context:** PR #15338: QR-Code detector : multiple detection - **Merge with extra**: https://github.com/opencv/opencv_extra/pull/684

**Code Changes:**
```diff
@@ -694,8 +694,8 @@ class CV_EXPORTS_W QRCodeDetector
     CV_WRAP bool detect(InputArray img, OutputArray points) const;
 
     /** @brief Decodes QR code in image once it's found by the detect() method.
-     Returns UTF8-encoded output string or empty string if the code cannot be decoded.
 
+     Returns UTF8-encoded output string or empty string if the code cannot be decoded.
      @param img grayscale or color (BGR) image containing QR code.
      @param points Quadrangle vertices found by detect() method (or some other algorithm).
      @param straight_qrcode The optional output image containing rectified and binarized QR code
```

Review comment:
Do we have python test for QR codes? Need to check that `std::vector<std::string>` works fine. Otherwise need to replace to `std::vector<cv::String>`
**File:** modules/objdetect/include/opencv2/objdetect.hpp
**Change Type:** modified
**Context:** PR #15338: QR-Code detector : multiple detection - **Merge with extra**: https://github.com/opencv/opencv_extra/pull/684

**Code Changes:**
```diff
@@ -694,8 +694,8 @@ class CV_EXPORTS_W QRCodeDetector
     CV_WRAP bool detect(InputArray img, OutputArray points) const;
 
     /** @brief Decodes QR code in image once it's found by the detect() method.
-     Returns UTF8-encoded output string or empty string if the code cannot be decoded.
 
+     Returns UTF8-encoded output string or empty string if the code cannot be decoded.
      @param img grayscale or color (BGR) image containing QR code.
      @param points Quadrangle vertices found by detect() method (or some other algorithm).
      @param straight_qrcode The optional output image containing rectified and binarized QR code
```

Review comment:
What about default values?
**File:** modules/objdetect/src/qrcode.cpp
**Change Type:** modified
**Context:** PR #15338: QR-Code detector : multiple detection - **Merge with extra**: https://github.com/opencv/opencv_extra/pull/684

**Code Changes:**
```diff
@@ -22,6 +22,48 @@ namespace cv
 {
 using std::vector;
 
+static bool checkQRInputImage(InputArray img, Mat& gray)
+{
+    CV_Assert(!img.empty());
+    CV_CheckDepthEQ(img.depth(), CV_8U, "");
+
+    if (img.cols() <= 20 || img.rows() <= 20)
```

Review comment:
For which types it is used?
**File:** modules/objdetect/src/qrcode.cpp
**Change Type:** modified
**Context:** PR #15338: QR-Code detector : multiple detection - **Merge with extra**: https://github.com/opencv/opencv_extra/pull/684

**Code Changes:**
```diff
@@ -22,6 +22,48 @@ namespace cv
 {
 using std::vector;
 
+static bool checkQRInputImage(InputArray img, Mat& gray)
+{
+    CV_Assert(!img.empty());
+    CV_CheckDepthEQ(img.depth(), CV_8U, "");
+
+    if (img.cols() <= 20 || img.rows() <= 20)
```

Review comment:
pls rename variable for more detailed
**File:** modules/objdetect/src/qrcode.cpp
**Change Type:** modified
**Context:** PR #15338: QR-Code detector : multiple detection - **Merge with extra**: https://github.com/opencv/opencv_extra/pull/684

**Code Changes:**
```diff
@@ -22,6 +22,48 @@ namespace cv
 {
 using std::vector;
 
+static bool checkQRInputImage(InputArray img, Mat& gray)
+{
+    CV_Assert(!img.empty());
+    CV_CheckDepthEQ(img.depth(), CV_8U, "");
+
+    if (img.cols() <= 20 || img.rows() <= 20)
```

Review comment:
Please use just `RETR_TREE` and `CHAIN_APPROX_SIMPLE`