nareshmlx/opencv-pr huggingface dataset:
**File:** doc/tutorials/introduction/crosscompilation/crosscompile_with_multiarch.markdown
**Change Type:** added
**Context:** PR #24629: doc: add crosscompile_with_multiarch

**Code Changes:**
```diff
@@ -0,0 +1,595 @@
+# MultiArch cross-compilation with Ubuntu/Debian{#tutorial_crosscompile_with_multiarch}
+
+@prev_tutorial{tutorial_arm_crosscompile_with_cmake}
+@next_tutorial{tutorial_building_tegra_cuda}
+
+[TOC]
+
+|    |    |
+| -: | :- |
```

Review comment:
x86 is not needed for cross-compilation
**File:** doc/tutorials/introduction/crosscompilation/crosscompile_with_multiarch.markdown
**Change Type:** added
**Context:** PR #24629: doc: add crosscompile_with_multiarch

**Code Changes:**
```diff
@@ -0,0 +1,595 @@
+# MultiArch cross-compilation with Ubuntu/Debian{#tutorial_crosscompile_with_multiarch}
+
+@prev_tutorial{tutorial_arm_crosscompile_with_cmake}
+@next_tutorial{tutorial_building_tegra_cuda}
+
+[TOC]
+
+|    |    |
+| -: | :- |
```

Review comment:
There is a mix of terminal snippets - starting with `$` and without. Prefer avoid `$` as documentation does not support copy-to-clipboard option.
**File:** doc/tutorials/introduction/crosscompilation/crosscompile_with_multiarch.markdown
**Change Type:** added
**Context:** PR #24629: doc: add crosscompile_with_multiarch

**Code Changes:**
```diff
@@ -0,0 +1,595 @@
+# MultiArch cross-compilation with Ubuntu/Debian{#tutorial_crosscompile_with_multiarch}
+
+@prev_tutorial{tutorial_arm_crosscompile_with_cmake}
+@next_tutorial{tutorial_building_tegra_cuda}
+
+[TOC]
+
+|    |    |
+| -: | :- |
```

Review comment:
Yes, docker is one of selections. However there are another container technology. I felt that it would be better to include other container technologies. > it is better to use VMs or Container(e.g. Docker).
**File:** doc/tutorials/introduction/crosscompilation/crosscompile_with_multiarch.markdown
**Change Type:** added
**Context:** PR #24629: doc: add crosscompile_with_multiarch

**Code Changes:**
```diff
@@ -0,0 +1,595 @@
+# MultiArch cross-compilation with Ubuntu/Debian{#tutorial_crosscompile_with_multiarch}
+
+@prev_tutorial{tutorial_arm_crosscompile_with_cmake}
+@next_tutorial{tutorial_building_tegra_cuda}
+
+[TOC]
+
+|    |    |
+| -: | :- |
```

Review comment:
(Sorry if I misread the comments here.) OK, I will replace here. ``` Good: Host and Target are 23.04. Good: Host and Target are 23.10. Not Good: Host is 23.04, and Target is 23.10. Not Good: Host is 23.10, and Target is 23.04. ```
**File:** doc/tutorials/introduction/crosscompilation/crosscompile_with_multiarch.markdown
**Change Type:** added
**Context:** PR #24629: doc: add crosscompile_with_multiarch

**Code Changes:**
```diff
@@ -0,0 +1,595 @@
+# MultiArch cross-compilation with Ubuntu/Debian{#tutorial_crosscompile_with_multiarch}
+
+@prev_tutorial{tutorial_arm_crosscompile_with_cmake}
+@next_tutorial{tutorial_building_tegra_cuda}
+
+[TOC]
+
+|    |    |
+| -: | :- |
```

Review comment:
Maybe something like this? ### Step3) Update dpkg setting Update dpkg settings to support foreign architectures. Execute `dpkg --add-architecture` with a target architecture: ``` sudo dpkg --add-architecture arm64 sudo dpkg --add-architecture armhf ``` And the following comand shows what foreign architectures are supported. ``` sudo dpkg --print-architecture ``` ``` arm64 armhf ```
**File:** doc/tutorials/introduction/crosscompilation/crosscompile_with_multiarch.markdown
**Change Type:** added
**Context:** PR #24629: doc: add crosscompile_with_multiarch

**Code Changes:**
```diff
@@ -0,0 +1,595 @@
+# MultiArch cross-compilation with Ubuntu/Debian{#tutorial_crosscompile_with_multiarch}
+
+@prev_tutorial{tutorial_arm_crosscompile_with_cmake}
+@next_tutorial{tutorial_building_tegra_cuda}
+
+[TOC]
+
+|    |    |
+| -: | :- |
```

Review comment:
Technically, you do not need -dev packages on the target system. binary part is enough.
**File:** doc/tutorials/introduction/crosscompilation/crosscompile_with_multiarch.markdown
**Change Type:** added
**Context:** PR #24629: doc: add crosscompile_with_multiarch

**Code Changes:**
```diff
@@ -0,0 +1,595 @@
+# MultiArch cross-compilation with Ubuntu/Debian{#tutorial_crosscompile_with_multiarch}
+
+@prev_tutorial{tutorial_arm_crosscompile_with_cmake}
+@next_tutorial{tutorial_building_tegra_cuda}
+
+[TOC]
+
+|    |    |
+| -: | :- |
```

Review comment:
Debian with capital letter here and in the following places. The same for Ubuntu.
**File:** doc/tutorials/introduction/crosscompilation/crosscompile_with_multiarch.markdown
**Change Type:** added
**Context:** PR #24629: doc: add crosscompile_with_multiarch
**Review Line:** 65

**Code Changes:**
```diff
+
+If you want to enable Python 3 wrapper, install these packages too.
+
+@code{.bash}
+sudo apt install -y \
+    python3-dev \
+    python3-numpy
+@endcode
+
+## Working folder structure
+
```

Review comment:
Why not `python3-minimal`?
**File:** doc/tutorials/introduction/crosscompilation/crosscompile_with_multiarch.markdown
**Change Type:** added
**Context:** PR #24629: doc: add crosscompile_with_multiarch
**Review Line:** 65

**Code Changes:**
```diff
+
+If you want to enable Python 3 wrapper, install these packages too.
+
+@code{.bash}
+sudo apt install -y \
+    python3-dev \
+    python3-numpy
+@endcode
+
+## Working folder structure
+
```

Review comment:
`python3-dev` might conflict with `libpython3-dev:aarch64`
**File:** modules/java/generator/android-21/java/org/opencv/android/JavaCamera2View.java
**Change Type:** modified
**Context:** PR #24649: Refactor JavaCamera2View to add option to override Camera2 session request options

**Code Changes:**
```diff
@@ -45,6 +45,7 @@ public class JavaCamera2View extends CameraBridgeViewBase {
 
     protected ImageReader mImageReader;
     protected int mPreviewFormat = ImageFormat.YUV_420_888;
+    protected int mRequestTemplate = CameraDevice.TEMPLATE_PREVIEW;
 
     protected CameraDevice mCameraDevice;
     protected CameraCaptureSession mCaptureSession;
@@ -155,6 +156,35 @@ public void onError(CameraDevice cameraDevice, int error) {
 
```

Review comment:
```suggestion protected CameraCaptureSession.StateCallback allocateSessionStateCallback() { ```
**File:** modules/java/generator/android-21/java/org/opencv/android/JavaCamera2View.java
**Change Type:** modified
**Context:** PR #24649: Refactor JavaCamera2View to add option to override Camera2 session request options

**Code Changes:**
```diff
@@ -45,6 +45,7 @@ public class JavaCamera2View extends CameraBridgeViewBase {
 
     protected ImageReader mImageReader;
     protected int mPreviewFormat = ImageFormat.YUV_420_888;
+    protected int mRequestTemplate = CameraDevice.TEMPLATE_PREVIEW;
 
     protected CameraDevice mCameraDevice;
     protected CameraCaptureSession mCaptureSession;
@@ -155,6 +156,35 @@ public void onError(CameraDevice cameraDevice, int error) {
 
```

Review comment:
Mistype is here too.
**File:** modules/gapi/CMakeLists.txt
**Change Type:** modified
**Context:** PR #24224: Ported VAS OT into OpenCV G-API

**Code Changes:**
```diff
@@ -88,6 +88,7 @@ set(gapi_srcs
     src/api/kernels_imgproc.cpp
     src/api/kernels_video.cpp
     src/api/kernels_nnparsers.cpp
+    src/api/kernels_ot.cpp
     src/api/kernels_streaming.cpp
     src/api/kernels_stereo.cpp
     src/api/render.cpp
@@ -130,6 +131,7 @@ set(gapi_srcs
     src/backends/cpu/gcpustereo.cpp
```

Review comment:
Please don't name folders like that. Note that public include headers is part of the public API. It is not user's concern if the OT algorithm is "ported" or not. OT's domain is streaming, so I'd assume users to include `opencv2/gapi/streaming/ot.hpp` (or may be `/ot/vasot.hpp`, if multiple OT flavors are possible).
**File:** modules/gapi/CMakeLists.txt
**Change Type:** modified
**Context:** PR #24224: Ported VAS OT into OpenCV G-API

**Code Changes:**
```diff
@@ -88,6 +88,7 @@ set(gapi_srcs
     src/api/kernels_imgproc.cpp
     src/api/kernels_video.cpp
     src/api/kernels_nnparsers.cpp
+    src/api/kernels_ot.cpp
     src/api/kernels_streaming.cpp
     src/api/kernels_stereo.cpp
     src/api/render.cpp
@@ -130,6 +131,7 @@ set(gapi_srcs
     src/backends/cpu/gcpustereo.cpp
```

Review comment:
Don't distinguish it as a "ported algorithm" please. `src/streaming/ot` would be enough.
**File:** modules/gapi/CMakeLists.txt
**Change Type:** modified
**Context:** PR #24224: Ported VAS OT into OpenCV G-API

**Code Changes:**
```diff
@@ -88,6 +88,7 @@ set(gapi_srcs
     src/api/kernels_imgproc.cpp
     src/api/kernels_video.cpp
     src/api/kernels_nnparsers.cpp
+    src/api/kernels_ot.cpp
     src/api/kernels_streaming.cpp
     src/api/kernels_stereo.cpp
     src/api/render.cpp
@@ -130,6 +131,7 @@ set(gapi_srcs
     src/backends/cpu/gcpustereo.cpp
```

Review comment:
Why ``` ${CMAKE_CURRENT_BINARY_DIR}/3rdparty/vasot ``` needs to be added?
**File:** modules/gapi/CMakeLists.txt
**Change Type:** modified
**Context:** PR #24224: Ported VAS OT into OpenCV G-API

**Code Changes:**
```diff
@@ -88,6 +88,7 @@ set(gapi_srcs
     src/api/kernels_imgproc.cpp
     src/api/kernels_video.cpp
     src/api/kernels_nnparsers.cpp
+    src/api/kernels_ot.cpp
     src/api/kernels_streaming.cpp
     src/api/kernels_stereo.cpp
     src/api/render.cpp
@@ -130,6 +131,7 @@ set(gapi_srcs
     src/backends/cpu/gcpustereo.cpp
```

Review comment:
One IOS build is failing: https://github.com/opencv/opencv/actions/runs/6937152923/job/18870654308?pr=24224#step:7:297 ``` CMake Error at modules/gapi/CMakeLists.txt:388 (add_subdirectory): add_subdirectory not given a binary directory but the given source directory "/Users/opencv-cn/GHA-OCV-1/_work/opencv/opencv/opencv/modules/gapi/3rdparty/vasot" is not a subdirectory of "/Users/opencv-cn/GHA-OCV-1/_work/opencv/opencv/opencv/modules/world". When specifying an out-of-tree source a binary directory must be explicitly specified. Call Stack (most recent call first): modules/world/CMakeLists.txt:13 (include) modules/world/CMakeLists.txt:32 (include_one_module) ```
**File:** modules/gapi/CMakeLists.txt
**Change Type:** modified
**Context:** PR #24224: Ported VAS OT into OpenCV G-API

**Code Changes:**
```diff
@@ -88,6 +88,7 @@ set(gapi_srcs
     src/api/kernels_imgproc.cpp
     src/api/kernels_video.cpp
     src/api/kernels_nnparsers.cpp
+    src/api/kernels_ot.cpp
     src/api/kernels_streaming.cpp
     src/api/kernels_stereo.cpp
     src/api/render.cpp
@@ -130,6 +131,7 @@ set(gapi_srcs
     src/backends/cpu/gcpustereo.cpp
```

Review comment:
Basically it means the static build may be broken because of that.. but what makes OT different from any other source-level subdirectory in this case?
**File:** modules/gapi/CMakeLists.txt
**Change Type:** modified
**Context:** PR #24224: Ported VAS OT into OpenCV G-API

**Code Changes:**
```diff
@@ -88,6 +88,7 @@ set(gapi_srcs
     src/api/kernels_imgproc.cpp
     src/api/kernels_video.cpp
     src/api/kernels_nnparsers.cpp
+    src/api/kernels_ot.cpp
     src/api/kernels_streaming.cpp
     src/api/kernels_stereo.cpp
     src/api/render.cpp
@@ -130,6 +131,7 @@ set(gapi_srcs
     src/backends/cpu/gcpustereo.cpp
```

Review comment:
What if.. 1. You move `gapi/3rdparty` under `gapi/src/3rdparty`? 2. You remove all the CMakeListst.txt from the VAS OT 3. You just add `gapi/src/3rdparty/include` to the INCLUDE directories for the `opencv_gapi` target? In this case the OT code will be indistinguishable from the rest adn wouldn't require any special handling. There's literally no point in having a separate build target for that.
**File:** cmake/OpenCVCompilerOptimizations.cmake
**Change Type:** modified
**Context:** PR #24420: added detection & dispatching of some modern NEON instructions (NEON_FP16, NEON_BF16)

**Code Changes:**
```diff
@@ -331,7 +331,9 @@ if(X86 OR X86_64)
 elseif(ARM OR AARCH64)
   ocv_update(CPU_NEON_TEST_FILE "${OpenCV_SOURCE_DIR}/cmake/checks/cpu_neon.cpp")
   ocv_update(CPU_FP16_TEST_FILE "${OpenCV_SOURCE_DIR}/cmake/checks/cpu_fp16.cpp")
-  ocv_update(CPU_NEON_DOTPROD_TEST_FILE "${OpenCV_SOURCE_DIR}/cmake/checks/cpu_dotprod.cpp")
+  ocv_update(CPU_NEON_FP16_TEST_FILE "${OpenCV_SOURCE_DIR}/cmake/checks/cpu_neon_fp16.cpp")
+  ocv_update(CPU_NEON_BF16_TEST_FILE "${OpenCV_SOURCE_DIR}/cmake/checks/cpu_neon_bf16.cpp")
+  ocv_update(CPU_NEON_DOTPROD_TEST_FILE "${OpenCV_SOURCE_DIR}/cmake/checks/cpu_neon_dotprod.cpp")
   if(NOT AARCH64)
     ocv_update(CPU_KNOWN_OPTIMIZATIONS "VFPV3;NEON;FP16")
```

Review comment:
> FP16_SIMD;BF16_SIMD How does scope of these instructions correlate with other platforms? ... and available universal intrinsics? Until it is unclear, it is better to add `ARM_` prefix.
**File:** modules/videoio/src/cap_ffmpeg_impl.hpp
**Change Type:** modified
**Context:** PR #24657: Added warning, if FFmpeg pipeline was interrupted by timeout
**Review Line:** 439

**Code Changes:**
```diff
+
+    if(!metadata)
+    {
+        CV_LOG_WARNING(NULL, "Stream timeout without metadata passed");
+        return 0;
+    }
 
     if (metadata->timeout_after_ms == 0)
     {
@@ -442,9 +446,15 @@ inline int _opencv_ffmpeg_interrupt_callback(void *ptr)
     timespec now;
```

Review comment:
Both messages should be visible by default - `_WARNING()` is more applicable here than `_DEBUG()` --- missing `return -1`?
**File:** modules/videoio/src/cap_ffmpeg_impl.hpp
**Change Type:** modified
**Context:** PR #24657: Added warning, if FFmpeg pipeline was interrupted by timeout
**Review Line:** 439

**Code Changes:**
```diff
+
+    if(!metadata)
+    {
+        CV_LOG_WARNING(NULL, "Stream timeout without metadata passed");
+        return 0;
+    }
 
     if (metadata->timeout_after_ms == 0)
     {
@@ -442,9 +446,15 @@ inline int _opencv_ffmpeg_interrupt_callback(void *ptr)
     timespec now;
```

Review comment:
There is `CV_Assert(metadata);` later in the code. Looks like it's not expected case or assert is mistake. I'll try to debug.
**File:** modules/objdetect/include/opencv2/objdetect/face.hpp
**Change Type:** modified
**Context:** PR #24599: Migrate Android Face Detection sample to DNN.
**Review Line:** 106

**Code Changes:**
```diff
+     *  @param nms_threshold the threshold to suppress bounding boxes of IoU bigger than the given value
+     *  @param top_k keep top K bboxes before NMS
+     *  @param backend_id the id of backend
+     *  @param target_id the id of target device
+     */
+    CV_WRAP static Ptr<FaceDetectorYN> create(const String& framework,
+                                              const std::vector<uchar>& bufferModel,
+                                              const std::vector<uchar>& bufferConfig,
+                                              const Size& input_size,
+                                              float score_threshold = 0.9f,
+                                              float nms_threshold = 0.3f,
```

Review comment:
Do you export the face detection onnx model to some other framework formats that have seperated weight and net arch?
**File:** modules/objdetect/include/opencv2/objdetect/face.hpp
**Change Type:** modified
**Context:** PR #24599: Migrate Android Face Detection sample to DNN.
**Review Line:** 106

**Code Changes:**
```diff
+     *  @param nms_threshold the threshold to suppress bounding boxes of IoU bigger than the given value
+     *  @param top_k keep top K bboxes before NMS
+     *  @param backend_id the id of backend
+     *  @param target_id the id of target device
+     */
+    CV_WRAP static Ptr<FaceDetectorYN> create(const String& framework,
+                                              const std::vector<uchar>& bufferModel,
+                                              const std::vector<uchar>& bufferConfig,
+                                              const Size& input_size,
+                                              float score_threshold = 0.9f,
+                                              float nms_threshold = 0.3f,
```

Review comment:
No, I just follow `readNet` api for consistency.
**File:** modules/objdetect/src/face_detect.cpp
**Change Type:** modified
**Context:** PR #24599: Migrate Android Face Detection sample to DNN.
**Review Line:** 72

**Code Changes:**
```diff
+        net.setPreferableTarget(target_id);
+
+        inputW = input_size.width;
+        inputH = input_size.height;
+
+        padW = (int((inputW - 1) / divisor) + 1) * divisor;
+        padH = (int((inputH - 1) / divisor) + 1) * divisor;
+
+        scoreThreshold = score_threshold;
+        nmsThreshold = nms_threshold;
+        topK = top_k;
```

Review comment:
padW and padH names are confusing. Maybe rename them to paddedW or alignedW?
**File:** modules/calib3d/src/calibinit.cpp
**Change Type:** modified
**Context:** PR #24597: Fix bug in ChessBoardDetector::findQuadNeighbors

**Code Changes:**
```diff
@@ -1630,7 +1630,7 @@ void ChessBoardDetector::findQuadNeighbors()
                     {
                         // check edge lengths, make sure they're compatible
                         // edges that are different by more than 1:4 are rejected
-                        float ediff = cur_quad.edge_len - q_k.edge_len;
+                        const float ediff = fabs(cur_quad.edge_len - q_k.edge_len);
                         if (ediff > 32*cur_quad.edge_len ||
                             ediff > 32*q_k.edge_len)
                         {
```

Review comment:
If `q_k.edge_len` > `cur_quad.edge_len` then `ediff` < 0 and condition `ediff > 32*cur_quad.edge_len` is always `false`
**File:** modules/calib3d/src/calibinit.cpp
**Change Type:** modified
**Context:** PR #24597: Fix bug in ChessBoardDetector::findQuadNeighbors

**Code Changes:**
```diff
@@ -1630,7 +1630,7 @@ void ChessBoardDetector::findQuadNeighbors()
                     {
                         // check edge lengths, make sure they're compatible
                         // edges that are different by more than 1:4 are rejected
-                        float ediff = cur_quad.edge_len - q_k.edge_len;
+                        const float ediff = fabs(cur_quad.edge_len - q_k.edge_len);
                         if (ediff > 32*cur_quad.edge_len ||
                             ediff > 32*q_k.edge_len)
                         {
```

Review comment:
why not `ediff = abs(..)`?
**File:** modules/calib3d/src/calibinit.cpp
**Change Type:** modified
**Context:** PR #24597: Fix bug in ChessBoardDetector::findQuadNeighbors

**Code Changes:**
```diff
@@ -1630,7 +1630,7 @@ void ChessBoardDetector::findQuadNeighbors()
                     {
                         // check edge lengths, make sure they're compatible
                         // edges that are different by more than 1:4 are rejected
-                        float ediff = cur_quad.edge_len - q_k.edge_len;
+                        const float ediff = fabs(cur_quad.edge_len - q_k.edge_len);
                         if (ediff > 32*cur_quad.edge_len ||
                             ediff > 32*q_k.edge_len)
                         {
```

Review comment:
Added minus instead of calling `abs` function for better performance. But now profile it and time difference is not noticeable at all
**File:** samples/android/qr-detection/res/values/strings.xml
**Change Type:** added
**Context:** PR #24598: Add android QR detection sample

**Code Changes:**
```diff
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+    <string name="app_name">OpenCV QR Detector</string>
+</resources>
```

Review comment:
I suggest `OpenCV QR Detection`
**File:** modules/dnn/include/opencv2/dnn/dnn.hpp
**Change Type:** modified
**Context:** PR #24569: Add support for custom padding in DNN preprocessing

**Code Changes:**
```diff
@@ -1212,7 +1212,7 @@ CV__DNN_INLINE_NS_BEGIN
         CV_WRAP Image2BlobParams();
         CV_WRAP Image2BlobParams(const Scalar& scalefactor, const Size& size = Size(), const Scalar& mean = Scalar(),
                             bool swapRB = false, int ddepth = CV_32F, DataLayout datalayout = DNN_LAYOUT_NCHW,
-                            ImagePaddingMode mode = DNN_PMODE_NULL);
+                            ImagePaddingMode mode = DNN_PMODE_NULL, Scalar borderValue = 0.0);
 
         CV_PROP_RW Scalar scalefactor; //!< scalefactor multiplier for input image values.
         CV_PROP_RW Size size;    //!< Spatial size for output image.
@@ -1221,6 +1221,7 @@ CV__DNN_INLINE_NS_BEGIN
```

Review comment:
`borderValue` is better. It's consistent with other API functions.
**File:** modules/dnn/include/opencv2/dnn/dnn.hpp
**Change Type:** modified
**Context:** PR #24569: Add support for custom padding in DNN preprocessing

**Code Changes:**
```diff
@@ -1212,7 +1212,7 @@ CV__DNN_INLINE_NS_BEGIN
         CV_WRAP Image2BlobParams();
         CV_WRAP Image2BlobParams(const Scalar& scalefactor, const Size& size = Size(), const Scalar& mean = Scalar(),
                             bool swapRB = false, int ddepth = CV_32F, DataLayout datalayout = DNN_LAYOUT_NCHW,
-                            ImagePaddingMode mode = DNN_PMODE_NULL);
+                            ImagePaddingMode mode = DNN_PMODE_NULL, Scalar borderValue = 0.0);
 
         CV_PROP_RW Scalar scalefactor; //!< scalefactor multiplier for input image values.
         CV_PROP_RW Size size;    //!< Spatial size for output image.
@@ -1221,6 +1221,7 @@ CV__DNN_INLINE_NS_BEGIN
```

Review comment:
`borderValue`
**File:** modules/dnn/src/dnn_utils.cpp
**Change Type:** modified
**Context:** PR #24569: Add support for custom padding in DNN preprocessing
**Review Line:** 199

**Code Changes:**
```diff
@@ -196,7 +196,7 @@ void blobFromImagesWithParamsImpl(InputArrayOfArrays images_, Tmat& blob_, const
                 int bottom = size.height - top - rh;
                 int left = (size.width - rw)/2;
                 int right = size.width - left - rw;
-                copyMakeBorder(images[i], images[i], top, bottom, left, right, BORDER_CONSTANT);
+                copyMakeBorder(images[i], images[i], top, bottom, left, right, BORDER_CONSTANT, param.borderValue);
             }
             else
             {
```

Review comment:
I propose to get rid of copy and use ROI.
**File:** modules/dnn/include/opencv2/dnn/dnn.hpp
**Change Type:** modified
**Context:** PR #24569: Add support for custom padding in DNN preprocessing

**Code Changes:**
```diff
@@ -1212,7 +1212,7 @@ CV__DNN_INLINE_NS_BEGIN
         CV_WRAP Image2BlobParams();
         CV_WRAP Image2BlobParams(const Scalar& scalefactor, const Size& size = Size(), const Scalar& mean = Scalar(),
                             bool swapRB = false, int ddepth = CV_32F, DataLayout datalayout = DNN_LAYOUT_NCHW,
-                            ImagePaddingMode mode = DNN_PMODE_NULL);
+                            ImagePaddingMode mode = DNN_PMODE_NULL, Scalar borderValue = 0.0);
 
         CV_PROP_RW Scalar scalefactor; //!< scalefactor multiplier for input image values.
         CV_PROP_RW Size size;    //!< Spatial size for output image.
@@ -1221,6 +1221,7 @@ CV__DNN_INLINE_NS_BEGIN
```

Review comment:
Not sure that this is a good naming for a public field (as the other names too).
**File:** modules/dnn/include/opencv2/dnn/dnn.hpp
**Change Type:** modified
**Context:** PR #24569: Add support for custom padding in DNN preprocessing

**Code Changes:**
```diff
@@ -1212,7 +1212,7 @@ CV__DNN_INLINE_NS_BEGIN
         CV_WRAP Image2BlobParams();
         CV_WRAP Image2BlobParams(const Scalar& scalefactor, const Size& size = Size(), const Scalar& mean = Scalar(),
                             bool swapRB = false, int ddepth = CV_32F, DataLayout datalayout = DNN_LAYOUT_NCHW,
-                            ImagePaddingMode mode = DNN_PMODE_NULL);
+                            ImagePaddingMode mode = DNN_PMODE_NULL, Scalar borderValue = 0.0);
 
         CV_PROP_RW Scalar scalefactor; //!< scalefactor multiplier for input image values.
         CV_PROP_RW Size size;    //!< Spatial size for output image.
@@ -1221,6 +1221,7 @@ CV__DNN_INLINE_NS_BEGIN
```

Review comment:
please use `borderValue` everywhere.