nareshmlx/opencv-pr huggingface dataset:
**File:** samples/dnn/dasiamrpn_tracker.cpp
**Change Type:** added
**Context:** PR #19078: Add DaSiamRPN tracker sample of c++ version

**Code Changes:**
```diff
@@ -0,0 +1,518 @@
+// DaSiamRPN tracker.
+// Original paper: https://arxiv.org/abs/1808.06048
+// Link to original repo: https://github.com/foolwood/DaSiamRPN
+// Links to onnx models:
+// - network:     https://www.dropbox.com/s/rr1lk9355vzolqv/dasiamrpn_model.onnx?dl=0
+// - kernel_r1:   https://www.dropbox.com/s/999cqx5zrfi7w4p/dasiamrpn_kernel_r1.onnx?dl=0
+// - kernel_cls1: https://www.dropbox.com/s/qvmtszx5h339a0w/dasiamrpn_kernel_cls1.onnx?dl=0
+
+#include <iostream>
```

Review comment:
applied clang-format
**File:** samples/dnn/dasiamrpn_tracker.cpp
**Change Type:** added
**Context:** PR #19078: Add DaSiamRPN tracker sample of c++ version

**Code Changes:**
```diff
@@ -0,0 +1,518 @@
+// DaSiamRPN tracker.
+// Original paper: https://arxiv.org/abs/1808.06048
+// Link to original repo: https://github.com/foolwood/DaSiamRPN
+// Links to onnx models:
+// - network:     https://www.dropbox.com/s/rr1lk9355vzolqv/dasiamrpn_model.onnx?dl=0
+// - kernel_r1:   https://www.dropbox.com/s/999cqx5zrfi7w4p/dasiamrpn_kernel_r1.onnx?dl=0
+// - kernel_cls1: https://www.dropbox.com/s/qvmtszx5h339a0w/dasiamrpn_kernel_cls1.onnx?dl=0
+
+#include <iostream>
```

Review comment:
I believe we can merge PR in its current state (when CI pass checks).
**File:** samples/dnn/dasiamrpn_tracker.cpp
**Change Type:** added
**Context:** PR #19078: Add DaSiamRPN tracker sample of c++ version

**Code Changes:**
```diff
@@ -0,0 +1,518 @@
+// DaSiamRPN tracker.
+// Original paper: https://arxiv.org/abs/1808.06048
+// Link to original repo: https://github.com/foolwood/DaSiamRPN
+// Links to onnx models:
+// - network:     https://www.dropbox.com/s/rr1lk9355vzolqv/dasiamrpn_model.onnx?dl=0
+// - kernel_r1:   https://www.dropbox.com/s/999cqx5zrfi7w4p/dasiamrpn_kernel_r1.onnx?dl=0
+// - kernel_cls1: https://www.dropbox.com/s/qvmtszx5h339a0w/dasiamrpn_kernel_cls1.onnx?dl=0
+
+#include <iostream>
```

Review comment:
I added 2 commits which include this fix. Please fetch latest changes from the branch in your fork.
**File:** modules/videoio/test/test_video_io.cpp
**Change Type:** modified
**Context:** PR #19364: VideoCapture test to ensure that cv::VideoCapture does not share output buffers

**Code Changes:**
```diff
@@ -616,4 +616,37 @@ static vector<Ext_Fourcc_API> generate_Ext_Fourcc_API_nocrash()
 
 INSTANTIATE_TEST_CASE_P(videoio, Videoio_Writer_bad_fourcc, testing::ValuesIn(generate_Ext_Fourcc_API_nocrash()));
 
+typedef testing::TestWithParam<VideoCaptureAPIs> safe_capture;
+
+TEST_P(safe_capture, frames_independency)
+{
+    VideoCaptureAPIs apiPref = GetParam();
+    if (!videoio_registry::hasBackend(apiPref))
```

Review comment:
It is a bad idea to require changing of such buffers. They can be allocated as read-only (any write attempt will raise a failure). For example, OpenCL read-only "map" from GPU decoder. --- Suggestion: - remove this block - rename test
**File:** modules/videoio/test/test_video_io.cpp
**Change Type:** modified
**Context:** PR #19364: VideoCapture test to ensure that cv::VideoCapture does not share output buffers

**Code Changes:**
```diff
@@ -616,4 +616,37 @@ static vector<Ext_Fourcc_API> generate_Ext_Fourcc_API_nocrash()
 
 INSTANTIATE_TEST_CASE_P(videoio, Videoio_Writer_bad_fourcc, testing::ValuesIn(generate_Ext_Fourcc_API_nocrash()));
 
+typedef testing::TestWithParam<VideoCaptureAPIs> safe_capture;
+
+TEST_P(safe_capture, frames_independency)
+{
+    VideoCaptureAPIs apiPref = GetParam();
+    if (!videoio_registry::hasBackend(apiPref))
```

Review comment:
I renamed the test and removed Mat modification as you suggested, but it's not what OpenCV users expect. Documentation does not provide any cases with read-only Mat object and a lot of examples do camera Mat modification.
**File:** modules/videoio/test/test_video_io.cpp
**Change Type:** modified
**Context:** PR #19364: VideoCapture test to ensure that cv::VideoCapture does not share output buffers

**Code Changes:**
```diff
@@ -616,4 +616,37 @@ static vector<Ext_Fourcc_API> generate_Ext_Fourcc_API_nocrash()
 
 INSTANTIATE_TEST_CASE_P(videoio, Videoio_Writer_bad_fourcc, testing::ValuesIn(generate_Ext_Fourcc_API_nocrash()));
 
+typedef testing::TestWithParam<VideoCaptureAPIs> safe_capture;
+
+TEST_P(safe_capture, frames_independency)
+{
+    VideoCaptureAPIs apiPref = GetParam();
+    if (!videoio_registry::hasBackend(apiPref))
```

Review comment:
One line check: ``` EXPECT_EQ(0, cv::norm(frames[i], hardCopies[i], NORM_INF)) << i; ```
**File:** modules/calib3d/include/opencv2/calib3d.hpp
**Change Type:** modified
**Context:** PR #19089: Added '@ref' to 3.4 Camera Calibration and 3D Reconstruction documentation
**Review Line:** 3193

**Code Changes:**
```diff
@@ -3189,7 +3190,7 @@ optimization. It stays at the center or at a different location specified when C
     @param P2 Output 3x4 projection matrix in the new (rectified) coordinate systems for the second
     camera.
     @param Q Output \f$4 \times 4\f$ disparity-to-depth mapping matrix (see reprojectImageTo3D ).
-    @param flags Operation flags that may be zero or CALIB_ZERO_DISPARITY . If the flag is set,
+    @param flags Operation flags that may be zero or @ref fisheye::CALIB_ZERO_DISPARITY . If the flag is set,
     the function makes the principal points of each camera have the same pixel coordinates in the
     rectified views. And if the flag is not set, the function may still shift the images in the
     horizontal or vertical direction (depending on the orientation of epipolar lines) to maximize the
@@ -3215,7 +3216,7 @@ optimization. It stays at the center or at a different location specified when C
     observed by the second camera.
```

Review comment:
fisheye has no enum `CALIB_ZERO_DISPARITY` #19089
**File:** modules/calib3d/include/opencv2/calib3d.hpp
**Change Type:** modified
**Context:** PR #19089: Added '@ref' to 3.4 Camera Calibration and 3D Reconstruction documentation
**Review Line:** 3193

**Code Changes:**
```diff
@@ -3189,7 +3190,7 @@ optimization. It stays at the center or at a different location specified when C
     @param P2 Output 3x4 projection matrix in the new (rectified) coordinate systems for the second
     camera.
     @param Q Output \f$4 \times 4\f$ disparity-to-depth mapping matrix (see reprojectImageTo3D ).
-    @param flags Operation flags that may be zero or CALIB_ZERO_DISPARITY . If the flag is set,
+    @param flags Operation flags that may be zero or @ref fisheye::CALIB_ZERO_DISPARITY . If the flag is set,
     the function makes the principal points of each camera have the same pixel coordinates in the
     rectified views. And if the flag is not set, the function may still shift the images in the
     horizontal or vertical direction (depending on the orientation of epipolar lines) to maximize the
@@ -3215,7 +3216,7 @@ optimization. It stays at the center or at a different location specified when C
     observed by the second camera.
```

Review comment:
See fisheye enum definition on lines 3005-3016
**File:** modules/calib3d/include/opencv2/calib3d.hpp
**Change Type:** modified
**Context:** PR #19089: Added '@ref' to 3.4 Camera Calibration and 3D Reconstruction documentation
**Review Line:** 3193

**Code Changes:**
```diff
@@ -3189,7 +3190,7 @@ optimization. It stays at the center or at a different location specified when C
     @param P2 Output 3x4 projection matrix in the new (rectified) coordinate systems for the second
     camera.
     @param Q Output \f$4 \times 4\f$ disparity-to-depth mapping matrix (see reprojectImageTo3D ).
-    @param flags Operation flags that may be zero or CALIB_ZERO_DISPARITY . If the flag is set,
+    @param flags Operation flags that may be zero or @ref fisheye::CALIB_ZERO_DISPARITY . If the flag is set,
     the function makes the principal points of each camera have the same pixel coordinates in the
     rectified views. And if the flag is not set, the function may still shift the images in the
     horizontal or vertical direction (depending on the orientation of epipolar lines) to maximize the
@@ -3215,7 +3216,7 @@ optimization. It stays at the center or at a different location specified when C
     observed by the second camera.
```

Review comment:
Fisheye test uses cv::CALIB_ZERO_DISPARITY. https://github.com/opencv/opencv/blob/1bfc75ac2337620af59c573339b159886b926057/modules/calib3d/test/test_fisheye.cpp#L404
**File:** modules/calib3d/include/opencv2/calib3d.hpp
**Change Type:** modified
**Context:** PR #19089: Added '@ref' to 3.4 Camera Calibration and 3D Reconstruction documentation
**Review Line:** 3193

**Code Changes:**
```diff
@@ -3189,7 +3190,7 @@ optimization. It stays at the center or at a different location specified when C
     @param P2 Output 3x4 projection matrix in the new (rectified) coordinate systems for the second
     camera.
     @param Q Output \f$4 \times 4\f$ disparity-to-depth mapping matrix (see reprojectImageTo3D ).
-    @param flags Operation flags that may be zero or CALIB_ZERO_DISPARITY . If the flag is set,
+    @param flags Operation flags that may be zero or @ref fisheye::CALIB_ZERO_DISPARITY . If the flag is set,
     the function makes the principal points of each camera have the same pixel coordinates in the
     rectified views. And if the flag is not set, the function may still shift the images in the
     horizontal or vertical direction (depending on the orientation of epipolar lines) to maximize the
@@ -3215,7 +3216,7 @@ optimization. It stays at the center or at a different location specified when C
     observed by the second camera.
```

Review comment:
need to check that first (constant value should be preserved) through adding of this value. BTW, this may break some users code which uses both: - `using namespace cv;` - `using namespace cv::fisheye;` AFAIK, there is an idea to unify API for different cameras models, including constants (probably will go to OpenCV 5.x+)
**File:** modules/calib3d/include/opencv2/calib3d.hpp
**Change Type:** modified
**Context:** PR #19089: Added '@ref' to 3.4 Camera Calibration and 3D Reconstruction documentation
**Review Line:** 3193

**Code Changes:**
```diff
@@ -3189,7 +3190,7 @@ optimization. It stays at the center or at a different location specified when C
     @param P2 Output 3x4 projection matrix in the new (rectified) coordinate systems for the second
     camera.
     @param Q Output \f$4 \times 4\f$ disparity-to-depth mapping matrix (see reprojectImageTo3D ).
-    @param flags Operation flags that may be zero or CALIB_ZERO_DISPARITY . If the flag is set,
+    @param flags Operation flags that may be zero or @ref fisheye::CALIB_ZERO_DISPARITY . If the flag is set,
     the function makes the principal points of each camera have the same pixel coordinates in the
     rectified views. And if the flag is not set, the function may still shift the images in the
     horizontal or vertical direction (depending on the orientation of epipolar lines) to maximize the
@@ -3215,7 +3216,7 @@ optimization. It stays at the center or at a different location specified when C
     observed by the second camera.
```

Review comment:
`cv::CALIB_ZERO_DISPARITY = 0x00400` (or `1<<10`) max cv::fisheye enum is `cv::fisheye::CALIB_FIX_PRINCIPAL_POINT = 1 << 9` therefore, `cv::fisheye::CALIB_ZERO_DISPARITY == cv::CALIB_ZERO_DISPARITY == 1<<10` Applying the change now.
**File:** modules/calib3d/include/opencv2/calib3d.hpp
**Change Type:** modified
**Context:** PR #19089: Added '@ref' to 3.4 Camera Calibration and 3D Reconstruction documentation

**Code Changes:**
```diff
@@ -567,15 +567,15 @@ or vector\<Point2f\> .
 a vector\<Point2f\> .
 @param method Method used to compute a homography matrix. The following methods are possible:
 -   **0** - a regular method using all the points, i.e., the least squares method
--   **RANSAC** - RANSAC-based robust method
--   **LMEDS** - Least-Median robust method
--   **RHO** - PROSAC-based robust method
+-   @ref RANSAC - RANSAC-based robust method
+-   @ref LMEDS - Least-Median robust method
+-   @ref RHO - PROSAC-based robust method
```

Review comment:
Fixes issue where fisheye::CALIB_ZERO_DISPARITY does not exit
**File:** modules/calib3d/include/opencv2/calib3d.hpp
**Change Type:** modified
**Context:** PR #19089: Added '@ref' to 3.4 Camera Calibration and 3D Reconstruction documentation

**Code Changes:**
```diff
@@ -567,15 +567,15 @@ or vector\<Point2f\> .
 a vector\<Point2f\> .
 @param method Method used to compute a homography matrix. The following methods are possible:
 -   **0** - a regular method using all the points, i.e., the least squares method
--   **RANSAC** - RANSAC-based robust method
--   **LMEDS** - Least-Median robust method
--   **RHO** - PROSAC-based robust method
+-   @ref RANSAC - RANSAC-based robust method
+-   @ref LMEDS - Least-Median robust method
+-   @ref RHO - PROSAC-based robust method
```

Review comment:
> = 0x00400 `= cv::CALIB_ZERO_DISPARITY` to ensure that the same value is used anywhere (implementation still uses `cv::CALIB_ZERO_DISPARITY` internally).
**File:** modules/calib3d/include/opencv2/calib3d.hpp
**Change Type:** modified
**Context:** PR #19089: Added '@ref' to 3.4 Camera Calibration and 3D Reconstruction documentation

**Code Changes:**
```diff
@@ -567,15 +567,15 @@ or vector\<Point2f\> .
 a vector\<Point2f\> .
 @param method Method used to compute a homography matrix. The following methods are possible:
 -   **0** - a regular method using all the points, i.e., the least squares method
--   **RANSAC** - RANSAC-based robust method
--   **LMEDS** - Least-Median robust method
--   **RHO** - PROSAC-based robust method
+-   @ref RANSAC - RANSAC-based robust method
+-   @ref LMEDS - Least-Median robust method
+-   @ref RHO - PROSAC-based robust method
```

Review comment:
That shows up weird in the docs. Just testing this before pushing: `TEST_F(fisheyeTest, stereoRectify)` `{` ` // For consistency purposes ` ` CV_Assert(cv::CALIB_ZERO_DISPARITY == cv::fisheye::CALIB_ZERO_DISPARITY)` Is that ok? or is it better to have explicit docs
**File:** modules/calib3d/include/opencv2/calib3d.hpp
**Change Type:** modified
**Context:** PR #19089: Added '@ref' to 3.4 Camera Calibration and 3D Reconstruction documentation

**Code Changes:**
```diff
@@ -567,15 +567,15 @@ or vector\<Point2f\> .
 a vector\<Point2f\> .
 @param method Method used to compute a homography matrix. The following methods are possible:
 -   **0** - a regular method using all the points, i.e., the least squares method
--   **RANSAC** - RANSAC-based robust method
--   **LMEDS** - Least-Median robust method
--   **RHO** - PROSAC-based robust method
+-   @ref RANSAC - RANSAC-based robust method
+-   @ref LMEDS - Least-Median robust method
+-   @ref RHO - PROSAC-based robust method
```

Review comment:
I believe check is ok here. But please use `CV_StaticAssert()` for that (in C++11 it is compilation error)
**File:** modules/calib3d/include/opencv2/calib3d.hpp
**Change Type:** modified
**Context:** PR #19089: Added '@ref' to 3.4 Camera Calibration and 3D Reconstruction documentation
**Review Line:** 1512

**Code Changes:**
```diff
 concatenated together.
 @param imageSize Size of the image used only to initialize the camera intrinsic matrix.
 @param cameraMatrix Input/output 3x3 floating-point camera intrinsic matrix
-\f$\cameramatrix{A}\f$ . If CV\_CALIB\_USE\_INTRINSIC\_GUESS
-and/or CALIB_FIX_ASPECT_RATIO are specified, some or all of fx, fy, cx, cy must be
+\f$\cameramatrix{A}\f$ . If @ref CV_CALIB_USE_INTRINSIC_GUESS
+and/or @ref CALIB_FIX_ASPECT_RATIO are specified, some or all of fx, fy, cx, cy must be
 initialized before calling the function.
 @param distCoeffs Input/output vector of distortion coefficients
 \f$\distcoeffs\f$.
@@ -1533,40 +1533,40 @@ parameters. Order of deviations values: \f$(R_0, T_0, \dotsc , R_{M - 1}, T_{M -
```

Review comment:
fixup: #19154
**File:** modules/photo/test/test_hdr.cpp
**Change Type:** modified
**Context:** PR #19127: Increased Photo_CalibrateDebevec.regression test tolerance to pass on arm64 with gcc 9.3.
**Review Line:** 231

**Code Changes:**
```diff
     diff = diff.mul(1.0f / response);
     double max;
     minMaxLoc(diff, NULL, &max);
-    ASSERT_FALSE(max > 0.1);
+#if defined(__arm__) || defined(__aarch64__)
+    ASSERT_LT(max, 0.131);
+#else
+    ASSERT_LT(max, 0.1);
+#endif
 }
 
```

Review comment:
Please use this guard for ARM tolerance values: `#if defined(__arm__) || defined(__aarch64__)`
**File:** modules/features2d/include/opencv2/features2d.hpp
**Change Type:** modified
**Context:** PR #10690: Fixed issue in ORB detection if firstLevel property is set above 0 - resolves #10561 ### This pullrequest changes Fixed pyramid buffer size...
**Review Line:** 311

**Code Changes:**
```diff
+    input_image_linear_size/pow(scaleFactor, nlevels - firstLevel).
     @param edgeThreshold This is size of the border where the features are not detected. It should
     roughly match the patchSize parameter.
-    @param firstLevel It should be 0 in the current implementation.
+    @param firstLevel The level of pytramid to put source image to. Previous layers are filled
+    with upscaled source image.
     @param WTA_K The number of points that produce each element of the oriented BRIEF descriptor. The
     default value 2 means the BRIEF where we take a random point pair and compare their brightnesses,
     so we get 0/1 response. Other possible values are 3 and 4. For example, 3 means that we take 3
```

Review comment:
please fix typo here
**File:** modules/features2d/src/orb.cpp
**Change Type:** modified
**Context:** PR #10690: Fixed issue in ORB detection if firstLevel property is set above 0 - resolves #10561 ### This pullrequest changes Fixed pyramid buffer size...
**Review Line:** 676

**Code Changes:**
```diff
@@ -673,7 +673,7 @@ class ORB_Impl : public ORB
     void setEdgeThreshold(int edgeThreshold_) { edgeThreshold = edgeThreshold_; }
     int getEdgeThreshold() const { return edgeThreshold; }
 
-    void setFirstLevel(int firstLevel_) { firstLevel = firstLevel_; }
+    void setFirstLevel(int firstLevel_) { CV_Assert(firstLevel >= 0);  firstLevel = firstLevel_; }
     int getFirstLevel() const { return firstLevel; }
 
     void setWTA_K(int wta_k_) { wta_k = wta_k_; }
@@ -1014,7 +1014,7 @@ void ORB_Impl::detectAndCompute( InputArray _image, InputArray _mask,
 
```

Review comment:
Parameter name contains underscore: `firstLevel_`, assertion - doesn't.
**File:** modules/imgproc/src/smooth.simd.hpp
**Change Type:** modified
**Context:** PR #18983: support SIMD for larger symmetric Bit-exact 16U gaussian blur

**Code Changes:**
```diff
@@ -1197,6 +1197,78 @@ void hlineSmoothONa_yzy_a<uint8_t, ufixedpoint16>(const uint8_t* src, int cn, co
             }
     }
 }
+template <>
+void hlineSmoothONa_yzy_a<uint16_t, ufixedpoint32>(const uint16_t* src, int cn, const ufixedpoint32* m, int n, ufixedpoint32* dst, int len, int borderType)
+{
+    int pre_shift = n / 2;
+    int post_shift = n - pre_shift;
+    int i = 0;
```

Review comment:
`src` is 16-bit here so after expansion hi part of each value will be zero, `m` is technically 32-bit but due to the nature of value and structure of `ufixedpoint32` hi part of `m` is also zero. Moreover sum of all values from `m` array should be equal to 2^16. Therefore the overall sum here should always be less than 2^32 so multiplication operator could provide the same result while requiring less instructions
**File:** samples/dnn/models.yml
**Change Type:** modified
**Context:** PR #18591: Scripts for downloading models in DNN samples - Relates: https://github.com/opencv/opencv/pull/12186 <cut/> ``` force_builders=linux,docs,C...

**Code Changes:**
```diff
@@ -1,11 +1,14 @@
-%YAML:1.0
-
+%YAML 1.0
+---
 ################################################################################
 # Object detection models.
 ################################################################################
 
 # OpenCV's face detection network
```

Review comment:
Let use `sha1` entry name (because there are several SHA implementations or user may want to pass `md5` instead).
**File:** samples/dnn/download_models.py
**Change Type:** added
**Context:** PR #18591: Scripts for downloading models in DNN samples - Relates: https://github.com/opencv/opencv/pull/12186 <cut/> ``` force_builders=linux,docs,C...
**Review Line:** 285

**Code Changes:**
```diff
+        if platform.system() == "Darwin":
+            #On Apple devices
+            temp_env = os.environ.get("TMPDIR", None)
+            if temp_env is None or not os.path.isdir(temp_env):
+                temp_dir = Path("/tmp")
+                print("Using world accessible cache directory. This may be not secure: ", temp_dir)
+            else:
+                temp_dir = temp_env
+        elif platform.system() == "Windows":
+            temp_dir = tempfile.gettempdir()
+        else:
```

Review comment:
We should wrap and reuse C++ implementation instead of adding duplicated logic.
**File:** samples/dnn/README.md
**Change Type:** modified
**Context:** PR #18591: Scripts for downloading models in DNN samples - Relates: https://github.com/opencv/opencv/pull/12186 <cut/> ``` force_builders=linux,docs,C...

**Code Changes:**
```diff
@@ -19,6 +19,36 @@ Check `-h` option to know which values are used by default:
 python object_detection.py opencv_fd -h
 ```
 
+### Sample models
+
+You can download sample models using ```download_models.py```. For example, the following command will download network weights for OpenCV Face Detector model and store them in FaceDetector folder:
+
+```bash
+python download_models.py --save_dir FaceDetector opencv_fd
```

Review comment:
Lets introduce more specific name here. It is unclear what is going to be saved here. May be test results? Something like: - `OPENCV_DOWNLOAD_DATA_PATH` - `OPENCV_DOWNLOAD_CACHE_DATA_PATH` P.S. `_DATA_PATH` is aligned with `OPENCV_TEST_DATA_PATH`
**File:** samples/dnn/download_models.py
**Change Type:** added
**Context:** PR #18591: Scripts for downloading models in DNN samples - Relates: https://github.com/opencv/opencv/pull/12186 <cut/> ``` force_builders=linux,docs,C...
**Review Line:** 285

**Code Changes:**
```diff
+        if platform.system() == "Darwin":
+            #On Apple devices
+            temp_env = os.environ.get("TMPDIR", None)
+            if temp_env is None or not os.path.isdir(temp_env):
+                temp_dir = Path("/tmp")
+                print("Using world accessible cache directory. This may be not secure: ", temp_dir)
+            else:
+                temp_dir = temp_env
+        elif platform.system() == "Windows":
+            temp_dir = tempfile.gettempdir()
+        else:
```

Review comment:
Lets rollback changes and add "TODO" here until we have resolved issues in #18931
**File:** modules/dnn/src/dnn.cpp
**Change Type:** modified
**Context:** PR #19035: dnn: add another color to Net::Impl::dump()

**Code Changes:**
```diff
@@ -4461,7 +4461,7 @@ string Net::Impl::dump()
             prevNode = itBackend->second;
         }
     }
-    string colors[] = {"#ffffb3", "#fccde5", "#8dd3c7", "#bebada", "#80b1d3", "#fdb462", "#ff4848", "#b35151"};
+    std::vector<string> colors = {"#ffffb3", "#fccde5", "#8dd3c7", "#bebada", "#80b1d3", "#fdb462", "#ff4848", "#b35151", "#b266ff"};
     string backend;
     switch (prefBackend)
     {
@@ -4613,6 +4613,7 @@ string Net::Impl::dump()
```

Review comment:
Does it make sense to replace to `std::vector<std::string>` and check `colorId < colors.size()`?
**File:** modules/dnn/src/dnn.cpp
**Change Type:** modified
**Context:** PR #19035: dnn: add another color to Net::Impl::dump()

**Code Changes:**
```diff
@@ -4461,7 +4461,7 @@ string Net::Impl::dump()
             prevNode = itBackend->second;
         }
     }
-    string colors[] = {"#ffffb3", "#fccde5", "#8dd3c7", "#bebada", "#80b1d3", "#fdb462", "#ff4848", "#b35151"};
+    std::vector<string> colors = {"#ffffb3", "#fccde5", "#8dd3c7", "#bebada", "#80b1d3", "#fdb462", "#ff4848", "#b35151", "#b266ff"};
     string backend;
     switch (prefBackend)
     {
@@ -4613,6 +4613,7 @@ string Net::Impl::dump()
```

Review comment:
btw, cppcheck found this here. arent there static analyzers running over the code on the buildbots ?