nareshmlx/opencv-pr huggingface dataset:
**File:** apps/python-calibration-generator/calibration_generator.py
**Change Type:** added
**Context:** PR #22363: add multiview calibration [GSOC 2022]

**Code Changes:**
```diff
@@ -0,0 +1,336 @@
+# This file is part of OpenCV project.
+# It is subject to the license terms in the LICENSE file found in the top-level directory
+# of this distribution and at http://opencv.org/license.html.
+
+import argparse
+import numpy as np
+import math
+import yaml
+from drawer import animation2D, animation3D
```

Review comment:
> yacs.config Looks like it is a new dependency. Releases are abandoned in 2020: https://pypi.org/project/yacs/#history Can we use `json.load()` approach from Python library?
**File:** doc/tutorials/calib3d/camera_multiview_calibration/multiview_calibration.markdown
**Change Type:** added
**Context:** PR #22363: add multiview calibration [GSOC 2022]

**Code Changes:**
```diff
@@ -0,0 +1,252 @@
+Multi-view Camera Calibration Tutorial {#tutorial_multiview_camera_calibration}
+==========================
+
+@tableofcontents
+
+@prev_tutorial{tutorial_interactive_calibration}
+
+|    |    |
+| -: | :- |
```

Review comment:
Empty line after `----` header mark.
**File:** modules/calib/src/multiview_calibration.cpp
**Change Type:** added
**Context:** PR #22363: add multiview calibration [GSOC 2022]

**Code Changes:**
```diff
@@ -0,0 +1,848 @@
+// This file is part of OpenCV project.
+// It is subject to the license terms in the LICENSE file found in the top-level directory
+// of this distribution and at http://opencv.org/license.html.
+
+#include "precomp.hpp"
+#include "opencv2/core/utils/logger.hpp"
+#include "opencv2/core/softfloat.hpp"
+
+namespace cv {
```

Review comment:
Please use short license header: https://github.com/opencv/opencv/wiki/Coding_Style_Guide#file-structure ``` // This file is part of OpenCV project. // It is subject to the license terms in the LICENSE file found in the top-level directory // of this distribution and at http://opencv.org/license.html. ```
**File:** samples/cpp/multiview_calibration_sample.cpp
**Change Type:** added
**Context:** PR #22363: add multiview calibration [GSOC 2022]

**Code Changes:**
```diff
@@ -0,0 +1,173 @@
+// This file is part of OpenCV project.
+// It is subject to the license terms in the LICENSE file found in the top-level directory
+// of this distribution and at http://opencv.org/license.html.
+
+#include <vector>
+#include <string>
+#include <opencv2/calib3d.hpp>
+#include <opencv2/imgcodecs.hpp>
+#include <opencv2/imgproc.hpp>
```

Review comment:
assert -> CV_Assert
**File:** samples/cpp/multiview_calibration_sample.cpp
**Change Type:** added
**Context:** PR #22363: add multiview calibration [GSOC 2022]

**Code Changes:**
```diff
@@ -0,0 +1,173 @@
+// This file is part of OpenCV project.
+// It is subject to the license terms in the LICENSE file found in the top-level directory
+// of this distribution and at http://opencv.org/license.html.
+
+#include <vector>
+#include <string>
+#include <opencv2/calib3d.hpp>
+#include <opencv2/imgcodecs.hpp>
+#include <opencv2/imgproc.hpp>
```

Review comment:
> `#include <cassert>` drop
**File:** samples/python/multiview_calibration.py
**Change Type:** added
**Context:** PR #22363: add multiview calibration [GSOC 2022]

**Code Changes:**
```diff
@@ -0,0 +1,736 @@
+# This file is part of OpenCV project.
+# It is subject to the license terms in the LICENSE file found in the top-level directory
+# of this distribution and at http://opencv.org/license.html.
+
+import argparse
+import glob
+import json
+import multiprocessing
+import os
```

Review comment:
It is better to have 1 dependency per line.
**File:** doc/tutorials/calib3d/camera_multiview_calibration/multiview_calibration.markdown
**Change Type:** added
**Context:** PR #22363: add multiview calibration [GSOC 2022]

**Code Changes:**
```diff
@@ -0,0 +1,252 @@
+Multi-view Camera Calibration Tutorial {#tutorial_multiview_camera_calibration}
+==========================
+
+@tableofcontents
+
+@prev_tutorial{tutorial_interactive_calibration}
+
+|    |    |
+| -: | :- |
```

Review comment:
changed to jpg.
**File:** apps/python-calibration-generator/calibration_generator.py
**Change Type:** added
**Context:** PR #22363: add multiview calibration [GSOC 2022]

**Code Changes:**
```diff
@@ -0,0 +1,336 @@
+# This file is part of OpenCV project.
+# It is subject to the license terms in the LICENSE file found in the top-level directory
+# of this distribution and at http://opencv.org/license.html.
+
+import argparse
+import numpy as np
+import math
+import yaml
+from drawer import animation2D, animation3D
```

Review comment:
replaced it with yaml library, json does not work as expected.
**File:** doc/tutorials/calib3d/camera_multiview_calibration/multiview_calibration.markdown
**Change Type:** added
**Context:** PR #22363: add multiview calibration [GSOC 2022]

**Code Changes:**
```diff
@@ -0,0 +1,252 @@
+Multi-view Camera Calibration Tutorial {#tutorial_multiview_camera_calibration}
+==========================
+
+@tableofcontents
+
+@prev_tutorial{tutorial_interactive_calibration}
+
+|    |    |
+| -: | :- |
```

Review comment:
replaced https with ref
**File:** doc/tutorials/calib3d/camera_multiview_calibration/multiview_calibration.markdown
**Change Type:** added
**Context:** PR #22363: add multiview calibration [GSOC 2022]

**Code Changes:**
```diff
@@ -0,0 +1,252 @@
+Multi-view Camera Calibration Tutorial {#tutorial_multiview_camera_calibration}
+==========================
+
+@tableofcontents
+
+@prev_tutorial{tutorial_interactive_calibration}
+
+|    |    |
+| -: | :- |
```

Review comment:
Looks like jpg file is not added to commits.
**File:** doc/tutorials/calib3d/camera_multiview_calibration/multiview_calibration.markdown
**Change Type:** added
**Context:** PR #22363: add multiview calibration [GSOC 2022]

**Code Changes:**
```diff
@@ -0,0 +1,252 @@
+Multi-view Camera Calibration Tutorial {#tutorial_multiview_camera_calibration}
+==========================
+
+@tableofcontents
+
+@prev_tutorial{tutorial_interactive_calibration}
+
+|    |    |
+| -: | :- |
```

Review comment:
Changed all images to jpg format
**File:** doc/tutorials/calib3d/camera_multiview_calibration/multiview_calibration.markdown
**Change Type:** added
**Context:** PR #22363: add multiview calibration [GSOC 2022]

**Code Changes:**
```diff
@@ -0,0 +1,252 @@
+Multi-view Camera Calibration Tutorial {#tutorial_multiview_camera_calibration}
+==========================
+
+@tableofcontents
+
+@prev_tutorial{tutorial_interactive_calibration}
+
+|    |    |
+| -: | :- |
```

Review comment:
I have several warnings in my markdown file, it says that latex math symbols like '\frac', \cdot', and '\choose' are unknown. Do you know how could I fix this?
**File:** modules/calib/src/multiview_calibration.cpp
**Change Type:** added
**Context:** PR #22363: add multiview calibration [GSOC 2022]

**Code Changes:**
```diff
@@ -0,0 +1,848 @@
+// This file is part of OpenCV project.
+// It is subject to the license terms in the LICENSE file found in the top-level directory
+// of this distribution and at http://opencv.org/license.html.
+
+#include "precomp.hpp"
+#include "opencv2/core/utils/logger.hpp"
+#include "opencv2/core/softfloat.hpp"
+
+namespace cv {
```

Review comment:
I think that's UB in C++.
**File:** modules/calib/src/multiview_calibration.cpp
**Change Type:** added
**Context:** PR #22363: add multiview calibration [GSOC 2022]

**Code Changes:**
```diff
@@ -0,0 +1,848 @@
+// This file is part of OpenCV project.
+// It is subject to the license terms in the LICENSE file found in the top-level directory
+// of this distribution and at http://opencv.org/license.html.
+
+#include "precomp.hpp"
+#include "opencv2/core/utils/logger.hpp"
+#include "opencv2/core/softfloat.hpp"
+
+namespace cv {
```

Review comment:
float cast does the same thing if you look at the implementation :( you can do something like: ```cpp float f = err; int32_t i = 0; std::memcpy(&i, &f, sizeof i); ``` It should generate the same assembly. Now that I think about it, `softfloat` could be fixed as well :)
**File:** modules/calib/src/multiview_calibration.cpp
**Change Type:** added
**Context:** PR #22363: add multiview calibration [GSOC 2022]

**Code Changes:**
```diff
@@ -0,0 +1,848 @@
+// This file is part of OpenCV project.
+// It is subject to the license terms in the LICENSE file found in the top-level directory
+// of this distribution and at http://opencv.org/license.html.
+
+#include "precomp.hpp"
+#include "opencv2/core/utils/logger.hpp"
+#include "opencv2/core/softfloat.hpp"
+
+namespace cv {
```

Review comment:
> std::memcpy There is `Cv32suf` for that purpose.
**File:** modules/calib/src/multiview_calibration.cpp
**Change Type:** added
**Context:** PR #22363: add multiview calibration [GSOC 2022]

**Code Changes:**
```diff
@@ -0,0 +1,848 @@
+// This file is part of OpenCV project.
+// It is subject to the license terms in the LICENSE file found in the top-level directory
+// of this distribution and at http://opencv.org/license.html.
+
+#include "precomp.hpp"
+#include "opencv2/core/utils/logger.hpp"
+#include "opencv2/core/softfloat.hpp"
+
+namespace cv {
```

Review comment:
Exactly, there is the same bug with strict aliasing. Softfloat's float operator creates Cv32suf(union), writes an int and reads back a float.
**File:** modules/calib/src/multiview_calibration.cpp
**Change Type:** added
**Context:** PR #22363: add multiview calibration [GSOC 2022]

**Code Changes:**
```diff
@@ -0,0 +1,848 @@
+// This file is part of OpenCV project.
+// It is subject to the license terms in the LICENSE file found in the top-level directory
+// of this distribution and at http://opencv.org/license.html.
+
+#include "precomp.hpp"
+#include "opencv2/core/utils/logger.hpp"
+#include "opencv2/core/softfloat.hpp"
+
+namespace cv {
```

Review comment:
OK, I'm not sure if we need this optimization at all. If there were some performance measurements that justify the usage of that function, then I'd like to see them. If not, I'll leave it turned off with `#define` and use good, non-optimized version instead.
**File:** modules/calib/include/opencv2/calib.hpp
**Change Type:** modified
**Context:** PR #22363: add multiview calibration [GSOC 2022]

**Code Changes:**
```diff
@@ -1122,6 +1122,47 @@ CV_EXPORTS_W double stereoCalibrate( InputArrayOfArrays objectPoints,
                                      OutputArray perViewErrors, int flags = CALIB_FIX_INTRINSIC,
                                      TermCriteria criteria = TermCriteria(TermCriteria::COUNT+TermCriteria::EPS, 30, 1e-6) );
 
+/** @brief Estimates intrinsics and extrinsics (camera pose) for multi-camera system a.k.a multiview calibraton.
+
+@param[in] objPoints Calibration pattern object points. Expected shape: NUM_FRAMES x NUM_POINTS x 3. Supported data type: CV_32F.
+@param[in] imagePoints Detected pattern points on camera images. Expected shape: NUM_CAMERAS x NUM_FRAMES x NUM_POINTS x 2.
+@param[in] imageSize   Images resolution.
+@param[in] detectionMask Pattern detection mask. Each value defines if i-camera observes calibration pattern in j moment of time.
```

Review comment:
Malformed documentation: > One could use the [\brief](https://www.doxygen.nl/manual/commands.html#cmdbrief) command with one of the above comment blocks. This command ends at the end of a paragraph, so the detailed description follows **after an empty line**. Ref: https://www.doxygen.nl/manual/docblocks.html The same as https://github.com/opencv/opencv/pull/23098#discussion_r1105320043 (1 week and the same again)
**File:** modules/calib/include/opencv2/calib.hpp
**Change Type:** modified
**Context:** PR #22363: add multiview calibration [GSOC 2022]

**Code Changes:**
```diff
@@ -1122,6 +1122,47 @@ CV_EXPORTS_W double stereoCalibrate( InputArrayOfArrays objectPoints,
                                      OutputArray perViewErrors, int flags = CALIB_FIX_INTRINSIC,
                                      TermCriteria criteria = TermCriteria(TermCriteria::COUNT+TermCriteria::EPS, 30, 1e-6) );
 
+/** @brief Estimates intrinsics and extrinsics (camera pose) for multi-camera system a.k.a multiview calibraton.
+
+@param[in] objPoints Calibration pattern object points. Expected shape: NUM_FRAMES x NUM_POINTS x 3. Supported data type: CV_32F.
+@param[in] imagePoints Detected pattern points on camera images. Expected shape: NUM_CAMERAS x NUM_FRAMES x NUM_POINTS x 2.
+@param[in] imageSize   Images resolution.
+@param[in] detectionMask Pattern detection mask. Each value defines if i-camera observes calibration pattern in j moment of time.
```

Review comment:
> `- Pattern` no dashes.
**File:** modules/calib/include/opencv2/calib.hpp
**Change Type:** modified
**Context:** PR #22363: add multiview calibration [GSOC 2022]

**Code Changes:**
```diff
@@ -1122,6 +1122,47 @@ CV_EXPORTS_W double stereoCalibrate( InputArrayOfArrays objectPoints,
                                      OutputArray perViewErrors, int flags = CALIB_FIX_INTRINSIC,
                                      TermCriteria criteria = TermCriteria(TermCriteria::COUNT+TermCriteria::EPS, 30, 1e-6) );
 
+/** @brief Estimates intrinsics and extrinsics (camera pose) for multi-camera system a.k.a multiview calibraton.
+
+@param[in] objPoints Calibration pattern object points. Expected shape: NUM_FRAMES x NUM_POINTS x 3. Supported data type: CV_32F.
+@param[in] imagePoints Detected pattern points on camera images. Expected shape: NUM_CAMERAS x NUM_FRAMES x NUM_POINTS x 2.
+@param[in] imageSize   Images resolution.
+@param[in] detectionMask Pattern detection mask. Each value defines if i-camera observes calibration pattern in j moment of time.
```

Review comment:
why do we need both parameters if there is `CALIB_USE_INTRINSIC_GUESS`?
**File:** modules/calib/include/opencv2/calib.hpp
**Change Type:** modified
**Context:** PR #22363: add multiview calibration [GSOC 2022]

**Code Changes:**
```diff
@@ -1122,6 +1122,47 @@ CV_EXPORTS_W double stereoCalibrate( InputArrayOfArrays objectPoints,
                                      OutputArray perViewErrors, int flags = CALIB_FIX_INTRINSIC,
                                      TermCriteria criteria = TermCriteria(TermCriteria::COUNT+TermCriteria::EPS, 30, 1e-6) );
 
+/** @brief Estimates intrinsics and extrinsics (camera pose) for multi-camera system a.k.a multiview calibraton.
+
+@param[in] objPoints Calibration pattern object points. Expected shape: NUM_FRAMES x NUM_POINTS x 3. Supported data type: CV_32F.
+@param[in] imagePoints Detected pattern points on camera images. Expected shape: NUM_CAMERAS x NUM_FRAMES x NUM_POINTS x 2.
+@param[in] imageSize   Images resolution.
+@param[in] detectionMask Pattern detection mask. Each value defines if i-camera observes calibration pattern in j moment of time.
```

Review comment:
fisheye has different `CALIB_` constant (which are used for flagsForIntrinsics). `CALIB_FIX_K4 = 1 << 7` vs `CALIB_FIX_K4 = 0x00800` So we can't properly handle mess of these models. Or we should have `flagsForIntrinsics` on per-camera basis.
**File:** modules/dnn/src/onnx/onnx_importer.cpp
**Change Type:** modified
**Context:** PR #22529: DNN: supports Scatter and ScatterND from ONNX

**Code Changes:**
```diff
@@ -181,6 +181,7 @@ class ONNXImporter
     void parseElementWise          (LayerParams& layerParams, const opencv_onnx::NodeProto& node_proto);
     void parseDepthToSpace         (LayerParams& layerParams, const opencv_onnx::NodeProto& node_proto);
     void parseRange                (LayerParams& layerParams, const opencv_onnx::NodeProto& node_proto);
+    void parseScatter              (LayerParams& layerParams, const opencv_onnx::NodeProto& node_proto);
     void parseSimpleLayers         (LayerParams& layerParams, const opencv_onnx::NodeProto& node_proto);
 
     // Domain: com.microsoft
@@ -3106,6 +3107,58 @@ void ONNXImporter::parseRange(LayerParams& layerParams, const opencv_onnx::NodeP
     constBlobsExtraInfo.insert(std::make_pair(node_proto.output(0), TensorInfo(1)));
```

Review comment:
`3 three` - it's most probably a typo.
**File:** modules/dnn/test/test_onnx_conformance_layer_filter__openvino.inl.hpp
**Change Type:** modified
**Context:** PR #22529: DNN: supports Scatter and ScatterND from ONNX
**Review Line:** 1591

**Code Changes:**
```diff
@@ -1588,6 +1588,10 @@ CASE(test_scatter_elements_with_duplicate_indices)
     // no filter
 CASE(test_scatter_elements_with_negative_indices)
     // no filter
+CASE(test_scatter_elements_with_reduction_max)
+    // no filter
+CASE(test_scatter_elements_with_reduction_min)
+    // no filter
 CASE(test_scatter_elements_without_axis)
     // no filter
```

Review comment:
Most probably the tests for scatter should be disabled for CUDA, Vulcan, OpenCL back-ends too. Also it's not clear, if it works works with Tim-VX.
**File:** modules/dnn/src/layers/scatter_layer.cpp
**Change Type:** added
**Context:** PR #22529: DNN: supports Scatter and ScatterND from ONNX

**Code Changes:**
```diff
@@ -0,0 +1,208 @@
+// This file is part of OpenCV project.
+// It is subject to the license terms in the LICENSE file found in the top-level directory
+// of this distribution and at http://opencv.org/license.html.
+
+#include "../precomp.hpp"
+#include "layers_common.hpp"
+
+#include <algorithm> // for std::max & std::min
+
```

Review comment:
Since in forward_impl we already know the type of the inputs, I would suggest to use them instead for cleaner signature, or pass Mats instead, and then `const T* input = inputMat.ptr<const T>()`, `memcpy` -> `inputMat.copyTo(outputMat)`, `total -> indices.total()`, etc.
**File:** modules/dnn/src/layers/scatterND_layer.cpp
**Change Type:** added
**Context:** PR #22529: DNN: supports Scatter and ScatterND from ONNX

**Code Changes:**
```diff
@@ -0,0 +1,202 @@
+// This file is part of OpenCV project.
+// It is subject to the license terms in the LICENSE file found in the top-level directory
+// of this distribution and at http://opencv.org/license.html.
+
+#include "../precomp.hpp"
+#include "layers_common.hpp"
+
+#include <algorithm> // for std::max & std::min
+
```

Review comment:
The same comment about signature here.
**File:** modules/dnn/src/layers/scatter_layer.cpp
**Change Type:** added
**Context:** PR #22529: DNN: supports Scatter and ScatterND from ONNX

**Code Changes:**
```diff
@@ -0,0 +1,208 @@
+// This file is part of OpenCV project.
+// It is subject to the license terms in the LICENSE file found in the top-level directory
+// of this distribution and at http://opencv.org/license.html.
+
+#include "../precomp.hpp"
+#include "layers_common.hpp"
+
+#include <algorithm> // for std::max & std::min
+
```

Review comment:
I think we can get rid of loops: Let's assume axis is 1, indices' shape is [2, 3] and input shape is [3, 4], then if we have current indices_offset, we can get input_offset by replacing the 'axis' dimension in indices_offset, which can be done given the product of shape dimensions before, in, and after the axis, I think. Something like `input_offset = (indices_offset % before_axis_prod) + (indices[indices_offset] * in_axis_prod) + (indices_offset / after_axis_prod)`. The last term can be zero if axis >= rank(indices). I might've missed something, so correct me if I'm wrong. Alternatively, we could add a benchmark and assess the performance of the current solution, if it satisfies our requirements, we can leave this as is.
**File:** modules/dnn/src/layers/scatterND_layer.cpp
**Change Type:** added
**Context:** PR #22529: DNN: supports Scatter and ScatterND from ONNX

**Code Changes:**
```diff
@@ -0,0 +1,202 @@
+// This file is part of OpenCV project.
+// It is subject to the license terms in the LICENSE file found in the top-level directory
+// of this distribution and at http://opencv.org/license.html.
+
+#include "../precomp.hpp"
+#include "layers_common.hpp"
+
+#include <algorithm> // for std::max & std::min
+
```

Review comment:
no-op rd can be special-cased with `std::copy`
**File:** modules/dnn/src/layers/scatterND_layer.cpp
**Change Type:** added
**Context:** PR #22529: DNN: supports Scatter and ScatterND from ONNX

**Code Changes:**
```diff
@@ -0,0 +1,202 @@
+// This file is part of OpenCV project.
+// It is subject to the license terms in the LICENSE file found in the top-level directory
+// of this distribution and at http://opencv.org/license.html.
+
+#include "../precomp.hpp"
+#include "layers_common.hpp"
+
+#include <algorithm> // for std::max & std::min
+
```

Review comment:
Do extra dimensions of indices matter?(not related to index tuple) I'm not sure I got the docs correctly, but it seems that we can interpret like array of indices and then we have 1 loop for data index restoration and 1 loop for update? I seem to be missing something, point me to the docs, please.
**File:** modules/dnn/src/onnx/onnx_importer.cpp
**Change Type:** modified
**Context:** PR #22529: DNN: supports Scatter and ScatterND from ONNX

**Code Changes:**
```diff
@@ -181,6 +181,7 @@ class ONNXImporter
     void parseElementWise          (LayerParams& layerParams, const opencv_onnx::NodeProto& node_proto);
     void parseDepthToSpace         (LayerParams& layerParams, const opencv_onnx::NodeProto& node_proto);
     void parseRange                (LayerParams& layerParams, const opencv_onnx::NodeProto& node_proto);
+    void parseScatter              (LayerParams& layerParams, const opencv_onnx::NodeProto& node_proto);
     void parseSimpleLayers         (LayerParams& layerParams, const opencv_onnx::NodeProto& node_proto);
 
     // Domain: com.microsoft
@@ -3106,6 +3107,58 @@ void ONNXImporter::parseRange(LayerParams& layerParams, const opencv_onnx::NodeP
     constBlobsExtraInfo.insert(std::make_pair(node_proto.output(0), TensorInfo(1)));
```

Review comment:
Looks like a duplicate of the function above.
**File:** modules/dnn/test/test_onnx_conformance_layer_filter__openvino.inl.hpp
**Change Type:** modified
**Context:** PR #22529: DNN: supports Scatter and ScatterND from ONNX
**Review Line:** 1591

**Code Changes:**
```diff
@@ -1588,6 +1588,10 @@ CASE(test_scatter_elements_with_duplicate_indices)
     // no filter
 CASE(test_scatter_elements_with_negative_indices)
     // no filter
+CASE(test_scatter_elements_with_reduction_max)
+    // no filter
+CASE(test_scatter_elements_with_reduction_min)
+    // no filter
 CASE(test_scatter_elements_without_axis)
     // no filter
```

Review comment:
Added into the deny lists of cuda, halide, vulkan and opencl. As for TIM-VX, it does not have a deny list yet and this could be done in a separate pull request.
**File:** modules/dnn/src/layers/scatter_layer.cpp
**Change Type:** added
**Context:** PR #22529: DNN: supports Scatter and ScatterND from ONNX

**Code Changes:**
```diff
@@ -0,0 +1,208 @@
+// This file is part of OpenCV project.
+// It is subject to the license terms in the LICENSE file found in the top-level directory
+// of this distribution and at http://opencv.org/license.html.
+
+#include "../precomp.hpp"
+#include "layers_common.hpp"
+
+#include <algorithm> // for std::max & std::min
+
```

Review comment:
It went much slower (from ~220ms to ~290ms) if passing mat. You could have a look at `forward_impl_mat` in case I did something inefficient.
**File:** modules/dnn/src/onnx/onnx_importer.cpp
**Change Type:** modified
**Context:** PR #22529: DNN: supports Scatter and ScatterND from ONNX

**Code Changes:**
```diff
@@ -181,6 +181,7 @@ class ONNXImporter
     void parseElementWise          (LayerParams& layerParams, const opencv_onnx::NodeProto& node_proto);
     void parseDepthToSpace         (LayerParams& layerParams, const opencv_onnx::NodeProto& node_proto);
     void parseRange                (LayerParams& layerParams, const opencv_onnx::NodeProto& node_proto);
+    void parseScatter              (LayerParams& layerParams, const opencv_onnx::NodeProto& node_proto);
     void parseSimpleLayers         (LayerParams& layerParams, const opencv_onnx::NodeProto& node_proto);
 
     // Domain: com.microsoft
@@ -3106,6 +3107,58 @@ void ONNXImporter::parseRange(LayerParams& layerParams, const opencv_onnx::NodeP
     constBlobsExtraInfo.insert(std::make_pair(node_proto.output(0), TensorInfo(1)));
```

Review comment:
It is now calling `parseScatterND` in `parseScatter` to remove duplicate.