nareshmlx/opencv-pr huggingface dataset:
**File:** modules/dnn/src/onnx/onnx_importer.cpp
**Change Type:** modified
**Context:** PR #23061: DNN: make GEMM can be supported with transA and transB in CUDA
**Review Line:** 2059

**Code Changes:**
```diff
@@ -2056,6 +2056,7 @@ void ONNXImporter::parseGemm(LayerParams& layerParams, const opencv_onnx::NodePr
     }
 
     layerParams.set("bias_term", node_proto.input_size() == 3);
+    layerParams.set("is_matmul", true);
     addLayer(layerParams, node_proto);
 }
 
```

Review comment:
Why importer should know about that implementation details? Interfaces should be kept clear and stay implementation agnostic. Implementation should use inheritance instead of adding of new strange external parameters.
**File:** modules/dnn/src/onnx/onnx_importer.cpp
**Change Type:** modified
**Context:** PR #23061: DNN: make GEMM can be supported with transA and transB in CUDA
**Review Line:** 2059

**Code Changes:**
```diff
@@ -2056,6 +2056,7 @@ void ONNXImporter::parseGemm(LayerParams& layerParams, const opencv_onnx::NodePr
     }
 
     layerParams.set("bias_term", node_proto.input_size() == 3);
+    layerParams.set("is_matmul", true);
     addLayer(layerParams, node_proto);
 }
 
```

Review comment:
Because the implementation cannot tell whether the operator is matrix multiplication or inner product, it needs to be informed by the importer. If it is just 2D matrix multiplication, it can share the same code with inner product, but high-dimensional matrix multiplication cannot be implemented with inner product code. I haven't thought a better way to distinguish them than separating the implementation part of the matrix multiplication from the inner product.
**File:** modules/dnn/src/onnx/onnx_importer.cpp
**Change Type:** modified
**Context:** PR #23061: DNN: make GEMM can be supported with transA and transB in CUDA
**Review Line:** 2059

**Code Changes:**
```diff
@@ -2056,6 +2056,7 @@ void ONNXImporter::parseGemm(LayerParams& layerParams, const opencv_onnx::NodePr
     }
 
     layerParams.set("bias_term", node_proto.input_size() == 3);
+    layerParams.set("is_matmul", true);
     addLayer(layerParams, node_proto);
 }
 
```

Review comment:
> cannot tell whether the operator is matrix multiplication or inner product, it needs to be informed by the importer It is done by name/type of the layer: `layerParams.type = "InnerProduct";`
**File:** modules/dnn/src/onnx/onnx_importer.cpp
**Change Type:** modified
**Context:** PR #23061: DNN: make GEMM can be supported with transA and transB in CUDA
**Review Line:** 2059

**Code Changes:**
```diff
@@ -2056,6 +2056,7 @@ void ONNXImporter::parseGemm(LayerParams& layerParams, const opencv_onnx::NodePr
     }
 
     layerParams.set("bias_term", node_proto.input_size() == 3);
+    layerParams.set("is_matmul", true);
     addLayer(layerParams, node_proto);
 }
 
```

Review comment:
> It is done by name/type of the layer: `layerParams.type = "InnerProduct";` This solution can‘t be implemented to distinguish `MatMul`, `GEMM` and `InnerProduct`, because their `layerParams.type` are all `InnerProduct`. They all use the [`fully_connected_layer`](https://github.com/opencv/opencv/blob/4.x/modules/dnn/src/layers/fully_connected_layer.cpp) to implement. I still have to specific a parameter in importer. **MatMul** use `layerParams.type = "InnerProduct"`: https://github.com/opencv/opencv/blob/606c80344a156630d8348df6b7357971ea3f58fe/modules/dnn/src/onnx/onnx_importer.cpp#L2063-L2067 **GEMM** use `layerParams.type = "InnerProduct"`: https://github.com/opencv/opencv/blob/606c80344a156630d8348df6b7357971ea3f58fe/modules/dnn/src/onnx/onnx_importer.cpp#L2001-L2004 Other operators: https://github.com/opencv/opencv/blob/606c80344a156630d8348df6b7357971ea3f58fe/modules/dnn/src/caffe/caffe_io.cpp#L1069-L1070 https://github.com/opencv/opencv/blob/606c80344a156630d8348df6b7357971ea3f58fe/modules/dnn/src/darknet/darknet_io.cpp#L181-L185 https://github.com/opencv/opencv/blob/606c80344a156630d8348df6b7357971ea3f58fe/modules/dnn/src/tensorflow/tf_importer.cpp#L1001 https://github.com/opencv/opencv/blob/606c80344a156630d8348df6b7357971ea3f58fe/modules/dnn/src/torch/torch_importer.cpp#L597
**File:** modules/dnn/src/onnx/onnx_importer.cpp
**Change Type:** modified
**Context:** PR #22775: DNN: Make MatMul layer support 3D or 4D operation with const input
**Review Line:** 2036

**Code Changes:**
```diff
 }
 
-void ONNXImporter::parseMatMul(LayerParams& layerParams, const opencv_onnx::NodeProto& node_proto)
+void ONNXImporter::parseMatMul(LayerParams& layerParams, const opencv_onnx::NodeProto& node_proto_)
 {
+    opencv_onnx::NodeProto node_proto = node_proto_;
     CV_Assert(node_proto.input_size() == 2);
     layerParams.type = "InnerProduct";
     layerParams.set("bias_term", false);
@@ -2044,8 +2045,24 @@ void ONNXImporter::parseMatMul(LayerParams& layerParams, const opencv_onnx::Node
     {
```

Review comment:
const reference in signature and copy call on the first line looks very strange. I propose to pass `node_proto` as value, or, better, make a copy in else branch only to not degrade existing branch performance.
**File:** modules/dnn/src/onnx/onnx_importer.cpp
**Change Type:** modified
**Context:** PR #22775: DNN: Make MatMul layer support 3D or 4D operation with const input
**Review Line:** 2036

**Code Changes:**
```diff
 }
 
-void ONNXImporter::parseMatMul(LayerParams& layerParams, const opencv_onnx::NodeProto& node_proto)
+void ONNXImporter::parseMatMul(LayerParams& layerParams, const opencv_onnx::NodeProto& node_proto_)
 {
+    opencv_onnx::NodeProto node_proto = node_proto_;
     CV_Assert(node_proto.input_size() == 2);
     layerParams.type = "InnerProduct";
     layerParams.set("bias_term", false);
@@ -2044,8 +2045,24 @@ void ONNXImporter::parseMatMul(LayerParams& layerParams, const opencv_onnx::Node
     {
```

Review comment:
Agree, this `const reference` exists in many onnx op codes.
**File:** modules/dnn/src/onnx/onnx_importer.cpp
**Change Type:** modified
**Context:** PR #22775: DNN: Make MatMul layer support 3D or 4D operation with const input
**Review Line:** 2036

**Code Changes:**
```diff
 }
 
-void ONNXImporter::parseMatMul(LayerParams& layerParams, const opencv_onnx::NodeProto& node_proto)
+void ONNXImporter::parseMatMul(LayerParams& layerParams, const opencv_onnx::NodeProto& node_proto_)
 {
+    opencv_onnx::NodeProto node_proto = node_proto_;
     CV_Assert(node_proto.input_size() == 2);
     layerParams.type = "InnerProduct";
     layerParams.set("bias_term", false);
@@ -2044,8 +2045,24 @@ void ONNXImporter::parseMatMul(LayerParams& layerParams, const opencv_onnx::Node
     {
```

Review comment:
Then the second option is the best one: "better, make a copy in else branch only to not degrade existing branch performance"
**File:** samples/cpp/stereo_calib.cpp
**Change Type:** modified
**Context:** PR #23515: added aruco pattern support into stereo_calibration.cpp

**Code Changes:**
```diff
@@ -24,6 +24,7 @@
 #include "opencv2/imgcodecs.hpp"
 #include "opencv2/highgui.hpp"
 #include "opencv2/imgproc.hpp"
+#include "opencv2/objdetect/charuco_detector.hpp"
 
 #include <vector>
 #include <string>
@@ -40,21 +41,31 @@ using namespace std;
 static int print_help(char** argv)
```

Review comment:
The same as for interactive calibration and calibration.cpp. Users do not know dict codes, name selection is needed.
**File:** samples/cpp/stereo_calib.cpp
**Change Type:** modified
**Context:** PR #23515: added aruco pattern support into stereo_calibration.cpp

**Code Changes:**
```diff
@@ -24,6 +24,7 @@
 #include "opencv2/imgcodecs.hpp"
 #include "opencv2/highgui.hpp"
 #include "opencv2/imgproc.hpp"
+#include "opencv2/objdetect/charuco_detector.hpp"
 
 #include <vector>
 #include <string>
@@ -40,21 +41,31 @@ using namespace std;
 static int print_help(char** argv)
```

Review comment:
`type` check for `charuco` is needed. There are circles grid, radon board, etc
**File:** samples/cpp/stereo_calib.cpp
**Change Type:** modified
**Context:** PR #23515: added aruco pattern support into stereo_calibration.cpp

**Code Changes:**
```diff
@@ -24,6 +24,7 @@
 #include "opencv2/imgcodecs.hpp"
 #include "opencv2/highgui.hpp"
 #include "opencv2/imgproc.hpp"
+#include "opencv2/objdetect/charuco_detector.hpp"
 
 #include <vector>
 #include <string>
@@ -40,21 +41,31 @@ using namespace std;
 static int print_help(char** argv)
```

Review comment:
Please use constants from objdetect.
**File:** samples/cpp/stereo_calib.cpp
**Change Type:** modified
**Context:** PR #23515: added aruco pattern support into stereo_calibration.cpp

**Code Changes:**
```diff
@@ -24,6 +24,7 @@
 #include "opencv2/imgcodecs.hpp"
 #include "opencv2/highgui.hpp"
 #include "opencv2/imgproc.hpp"
+#include "opencv2/objdetect/charuco_detector.hpp"
 
 #include <vector>
 #include <string>
@@ -40,21 +41,31 @@ using namespace std;
 static int print_help(char** argv)
```

Review comment:
In case if user makes a typo the sample behaviour is undefined.
**File:** samples/cpp/stereo_calib.cpp
**Change Type:** modified
**Context:** PR #23515: added aruco pattern support into stereo_calibration.cpp

**Code Changes:**
```diff
@@ -24,6 +24,7 @@
 #include "opencv2/imgcodecs.hpp"
 #include "opencv2/highgui.hpp"
 #include "opencv2/imgproc.hpp"
+#include "opencv2/objdetect/charuco_detector.hpp"
 
 #include <vector>
 #include <string>
@@ -40,21 +41,31 @@ using namespace std;
 static int print_help(char** argv)
```

Review comment:
For input pattern size parameters we use number of inner corners. To create ChArUco board we use number of checkers.
**File:** samples/cpp/stereo_calib.cpp
**Change Type:** modified
**Context:** PR #23515: added aruco pattern support into stereo_calibration.cpp

**Code Changes:**
```diff
@@ -24,6 +24,7 @@
 #include "opencv2/imgcodecs.hpp"
 #include "opencv2/highgui.hpp"
 #include "opencv2/imgproc.hpp"
+#include "opencv2/objdetect/charuco_detector.hpp"
 
 #include <vector>
 #include <string>
@@ -40,21 +41,31 @@ using namespace std;
 static int print_help(char** argv)
```

Review comment:
Charuco and chessboard of the same physical size and layout should have the same parameters. I propose to use w and h as is, but mention the difference in gen_pattern.py documentation. Otherwise it confuses sample code users.
**File:** samples/cpp/stereo_calib.cpp
**Change Type:** modified
**Context:** PR #23515: added aruco pattern support into stereo_calibration.cpp

**Code Changes:**
```diff
@@ -24,6 +24,7 @@
 #include "opencv2/imgcodecs.hpp"
 #include "opencv2/highgui.hpp"
 #include "opencv2/imgproc.hpp"
+#include "opencv2/objdetect/charuco_detector.hpp"
 
 #include <vector>
 #include <string>
@@ -40,21 +41,31 @@ using namespace std;
 static int print_help(char** argv)
```

Review comment:
missed space at the end of the line.
**File:** samples/cpp/stereo_calib.cpp
**Change Type:** modified
**Context:** PR #23515: added aruco pattern support into stereo_calibration.cpp

**Code Changes:**
```diff
@@ -24,6 +24,7 @@
 #include "opencv2/imgcodecs.hpp"
 #include "opencv2/highgui.hpp"
 #include "opencv2/imgproc.hpp"
+#include "opencv2/objdetect/charuco_detector.hpp"
 
 #include <vector>
 #include <string>
@@ -40,21 +41,31 @@ using namespace std;
 static int print_help(char** argv)
```

Review comment:
Discussed the issue offline. Decided to remove +1, but add note about the board size units. Chessboard and radon board size are defined in inner corners, all other boards - in elements (circles or squares).
**File:** samples/cpp/stereo_calib.cpp
**Change Type:** modified
**Context:** PR #23515: added aruco pattern support into stereo_calibration.cpp

**Code Changes:**
```diff
@@ -24,6 +24,7 @@
 #include "opencv2/imgcodecs.hpp"
 #include "opencv2/highgui.hpp"
 #include "opencv2/imgproc.hpp"
+#include "opencv2/objdetect/charuco_detector.hpp"
 
 #include <vector>
 #include <string>
@@ -40,21 +41,31 @@ using namespace std;
 static int print_help(char** argv)
```

Review comment:
missing coma and space at the end of the line.
**File:** samples/cpp/stereo_calib.cpp
**Change Type:** modified
**Context:** PR #23515: added aruco pattern support into stereo_calibration.cpp

**Code Changes:**
```diff
@@ -24,6 +24,7 @@
 #include "opencv2/imgcodecs.hpp"
 #include "opencv2/highgui.hpp"
 #include "opencv2/imgproc.hpp"
+#include "opencv2/objdetect/charuco_detector.hpp"
 
 #include <vector>
 #include <string>
@@ -40,21 +41,31 @@ using namespace std;
 static int print_help(char** argv)
```

Review comment:
Not relevant changes
**File:** samples/cpp/stereo_calib.cpp
**Change Type:** modified
**Context:** PR #23515: added aruco pattern support into stereo_calibration.cpp

**Code Changes:**
```diff
@@ -24,6 +24,7 @@
 #include "opencv2/imgcodecs.hpp"
 #include "opencv2/highgui.hpp"
 #include "opencv2/imgproc.hpp"
+#include "opencv2/objdetect/charuco_detector.hpp"
 
 #include <vector>
 #include <string>
@@ -40,21 +41,31 @@ using namespace std;
 static int print_help(char** argv)
```

Review comment:
Missing space at the end of the line.
**File:** samples/cpp/stereo_calib.cpp
**Change Type:** modified
**Context:** PR #23515: added aruco pattern support into stereo_calibration.cpp
**Review Line:** 439

**Code Changes:**
```diff
+    else if (arucoDictName == "DICT_APRILTAG_16h5") { arucoDict = cv::aruco::DICT_APRILTAG_16h5; }
+    else if (arucoDictName == "DICT_APRILTAG_25h9") { arucoDict = cv::aruco::DICT_APRILTAG_25h9; }
+    else if (arucoDictName == "DICT_APRILTAG_36h10") { arucoDict = cv::aruco::DICT_APRILTAG_36h10; }
+    else if (arucoDictName == "DICT_APRILTAG_36h11") { arucoDict = cv::aruco::DICT_APRILTAG_36h11; }
+    else {
+        cout << "incorrect name of aruco dictionary \n";
+        return 1;
+    }
+
     if (!parser.check())
     {
```

Review comment:
No need in extra space at the end of the line.
**File:** samples/cpp/stereo_calib.cpp
**Change Type:** modified
**Context:** PR #23515: added aruco pattern support into stereo_calibration.cpp
**Review Line:** 53

**Code Changes:**
```diff
             "     (1: use stereoCalibrate(), 2: compute fundamental\n"
             "         matrix separately) stereo. \n"
             " Calibrate the cameras and display the\n"
             " rectified results along with the computed disparity images.   \n" << endl;
-    cout << "Usage:\n " << argv[0] << " -w=<board_width default=9> -h=<board_height default=6> -s=<square_size default=1.0> <image list XML/YML file default=stereo_calib.xml>\n" << endl;
+    cout << "Usage:\n " << argv[0] << " -w=<board_width default=9> -h=<board_height default=6>"
+        <<" -t=<pattern type: chessboard or charucoboard default=chessboard> -s=<square_size default=1.0> -ms=<marker size default=0.5>"
+        <<" -ad=<predefined aruco dictionary name default=DICT_4X4_50> -adf=<aruco dictionary file default=None>"
+        <<" <image list XML/YML file default=stereo_calib.xml>\n" << endl;
+    cout << "Available Aruco dictionaries: DICT_4X4_50, DICT_4X4_100, DICT_4X4_250, "
+        << "DICT_4X4_1000, DICT_5X5_50, DICT_5X5_100, DICT_5X5_250, DICT_5X5_1000, "
```

Review comment:
Need to add note that the board size is defined in inner corners for chessboard and in units for all other cases.
**File:** modules/dnn/src/onnx/onnx_importer.cpp
**Change Type:** modified
**Context:** PR #22554: DNN: Let Slice layer support non-sequential and negative axes
**Review Line:** 1340

**Code Changes:**
```diff
+    int axis = 0;
+    bool has_axes = false;
+    DictValue starts_, ends_, axes_, steps_;
 
+    // opset = 1
     if (inp_size == 1)
     {
-        if (layerParams.has("axes")) {
-            DictValue axes = layerParams.get("axes");
-            for (int i = 1; i < axes.size(); ++i) {
-                CV_Assert(axes.get<int>(i - 1) == axes.get<int>(i) - 1);
```

Review comment:
I propose to add a comment to explain this condition: // opset-1
**File:** modules/dnn/src/onnx/onnx_importer.cpp
**Change Type:** modified
**Context:** PR #22554: DNN: Let Slice layer support non-sequential and negative axes
**Review Line:** 1354

**Code Changes:**
```diff
+            has_axes = true;
         }
-    } else { // inp_size > 1
+    }
+    // opset > 1
+    else
+    {
         CV_Assert(inp_size >= 3);
-        for (int i = 1; i < inp_size; i++) {
+        for (int i = 1; i < inp_size; ++i)
+        {
```

Review comment:
I propose to add a comment to explain this condition: // opset > 1
**File:** modules/dnn/src/layers/nary_eltwise_layers.cpp
**Change Type:** modified
**Context:** PR #22478: DNN: Let part of the operators in nary_eltwise support CUDA
**Review Line:** 659

**Code Changes:**
```diff
+    Ptr<BackendNode> initCUDA(
+        void *context_,
+        const std::vector<Ptr<BackendWrapper>>& inputs,
+        const std::vector<Ptr<BackendWrapper>>& outputs
+    ) override
+    {
+        auto context = reinterpret_cast<csl::CSLContext*>(context_);
+
+        auto input_wrapper = inputs[0].dynamicCast<CUDABackendWrapper>();
+        for (int i = 1; i < inputs.size(); i++)
+        {
```

Review comment:
> I don't know if there is some way to get the shape of the input in supportBackend(). You can do this check in `initCUDA`. Take a look at `CudaBackendWrapper`, it should have the host mat and you can get the shape of input from the host mat.
**File:** modules/dnn/src/layers/nary_eltwise_layers.cpp
**Change Type:** modified
**Context:** PR #22478: DNN: Let part of the operators in nary_eltwise support CUDA
**Review Line:** 659

**Code Changes:**
```diff
+    Ptr<BackendNode> initCUDA(
+        void *context_,
+        const std::vector<Ptr<BackendWrapper>>& inputs,
+        const std::vector<Ptr<BackendWrapper>>& outputs
+    ) override
+    {
+        auto context = reinterpret_cast<csl::CSLContext*>(context_);
+
+        auto input_wrapper = inputs[0].dynamicCast<CUDABackendWrapper>();
+        for (int i = 1; i < inputs.size(); i++)
+        {
```

Review comment:
I do use it, but `initCUDA` is called after `supportBackend` so it doesn't fallback to the cpu backend.
**File:** modules/dnn/src/int8layers/pooling_layer.cpp
**Change Type:** modified
**Context:** PR #23349: DNN: optimize dnn vulkan backend
**Review Line:** 95

**Code Changes:**
```diff
-            pads_begin.assign(1, pads_begin[0]);
-            pads_end.assign(1, pads_end[0]);
+            kernel_size.resize(1, kernel_size[0]);
+            strides.resize(1, strides[0]);
+            pads_begin.resize(1, pads_begin[0]);
+            pads_end.resize(1, pads_end[0]);
         }
     }
 
```

Review comment:
This modification fixes the error reported by Visual Studio 2020.
**File:** doc/py_tutorials/py_calib3d/py_depthmap/py_depthmap.markdown
**Change Type:** modified
**Context:** PR #23572: (docs) Depthmap py_tutorial: add reference to cv.StereoBM class documentation

**Code Changes:**
```diff
@@ -44,7 +44,7 @@ from matplotlib import pyplot as plt
 imgL = cv.imread('tsukuba_l.png', cv.IMREAD_GRAYSCALE)
 imgR = cv.imread('tsukuba_r.png', cv.IMREAD_GRAYSCALE)
 
-stereo = cv.StereoBM_create(numDisparities=16, blockSize=15)
+stereo = cv.StereoBM.create(numDisparities=16, blockSize=15)
 disparity = stereo.compute(imgL,imgR)
 plt.imshow(disparity,'gray')
 plt.show()
@@ -63,6 +63,9 @@ There are some parameters when you get familiar with StereoBM, and you may need
```

Review comment:
`cv.` prefix is not needed. The setters and getters are methods of `cv.StereoBM` object.
**File:** modules/videoio/src/cap.cpp
**Change Type:** modified
**Context:** PR #23290: 4.x deprecated VideoCapture backends

**Code Changes:**
```diff
@@ -212,6 +212,19 @@ bool VideoCapture::open(const String& filename, int apiPreference, const std::ve
         CV_Error_(Error::StsError, ("could not open '%s'", filename.c_str()));
     }
 
+    if (cv::videoio_registry::checkDeprecatedBackend(apiPreference))
+    {
+        CV_LOG_DEBUG(NULL,
+            cv::format("VIDEOIO(%s): backend is removed from OpenCV",
+                cv::videoio_registry::getBackendName((VideoCaptureAPIs) apiPreference).c_str()));
+    }
```

Review comment:
> VideoBackendInfo It is overkill to use that structure for the list of removed backeds.
**File:** modules/videoio/src/cap.cpp
**Change Type:** modified
**Context:** PR #23290: 4.x deprecated VideoCapture backends

**Code Changes:**
```diff
@@ -212,6 +212,19 @@ bool VideoCapture::open(const String& filename, int apiPreference, const std::ve
         CV_Error_(Error::StsError, ("could not open '%s'", filename.c_str()));
     }
 
+    if (cv::videoio_registry::checkDeprecatedBackend(apiPreference))
+    {
+        CV_LOG_DEBUG(NULL,
+            cv::format("VIDEOIO(%s): backend is removed from OpenCV",
+                cv::videoio_registry::getBackendName((VideoCaptureAPIs) apiPreference).c_str()));
+    }
```

Review comment:
There are 2 `open()` methods for `VideoCapture` + 1 method of `VideoWriter`. Search for `getAvailableBackends`
**File:** modules/videoio/src/cap.cpp
**Change Type:** modified
**Context:** PR #23290: 4.x deprecated VideoCapture backends

**Code Changes:**
```diff
@@ -212,6 +212,19 @@ bool VideoCapture::open(const String& filename, int apiPreference, const std::ve
         CV_Error_(Error::StsError, ("could not open '%s'", filename.c_str()));
     }
 
+    if (cv::videoio_registry::checkDeprecatedBackend(apiPreference))
+    {
+        CV_LOG_DEBUG(NULL,
+            cv::format("VIDEOIO(%s): backend is removed from OpenCV",
+                cv::videoio_registry::getBackendName((VideoCaptureAPIs) apiPreference).c_str()));
+    }
```

Review comment:
It's better to stress that the backend removed from OpenCV.
**File:** modules/videoio/src/videoio_registry.cpp
**Change Type:** modified
**Context:** PR #23290: 4.x deprecated VideoCapture backends

**Code Changes:**
```diff
@@ -183,6 +183,18 @@ static const struct VideoBackendInfo builtin_backends[] =
     // dropped backends: MIL, TYZX
 };
 
+static const struct VideoDeprecatedBackendInfo deprecated_backends[] =
+{
+#ifdef _WIN32
+    {CAP_VFW, "Video for Windows"},
+#endif
+    {CAP_QT, "QuickTime"},
```

Review comment:
Redundant empty lines.
**File:** modules/videoio/src/cap.cpp
**Change Type:** modified
**Context:** PR #23290: 4.x deprecated VideoCapture backends

**Code Changes:**
```diff
@@ -212,6 +212,19 @@ bool VideoCapture::open(const String& filename, int apiPreference, const std::ve
         CV_Error_(Error::StsError, ("could not open '%s'", filename.c_str()));
     }
 
+    if (cv::videoio_registry::checkDeprecatedBackend(apiPreference))
+    {
+        CV_LOG_DEBUG(NULL,
+            cv::format("VIDEOIO(%s): backend is removed from OpenCV",
+                cv::videoio_registry::getBackendName((VideoCaptureAPIs) apiPreference).c_str()));
+    }
```

Review comment:
This message is not informative (it doesn't show even `id` or the `name`). Code comment is redundant here.
**File:** modules/videoio/src/videoio_registry.cpp
**Change Type:** modified
**Context:** PR #23290: 4.x deprecated VideoCapture backends

**Code Changes:**
```diff
@@ -183,6 +183,18 @@ static const struct VideoBackendInfo builtin_backends[] =
     // dropped backends: MIL, TYZX
 };
 
+static const struct VideoDeprecatedBackendInfo deprecated_backends[] =
+{
+#ifdef _WIN32
+    {CAP_VFW, "Video for Windows"},
+#endif
+    {CAP_QT, "QuickTime"},
```

Review comment:
> `WIN32` Must be `_WIN32`
**File:** modules/videoio/src/cap.cpp
**Change Type:** modified
**Context:** PR #23290: 4.x deprecated VideoCapture backends

**Code Changes:**
```diff
@@ -212,6 +212,19 @@ bool VideoCapture::open(const String& filename, int apiPreference, const std::ve
         CV_Error_(Error::StsError, ("could not open '%s'", filename.c_str()));
     }
 
+    if (cv::videoio_registry::checkDeprecatedBackend(apiPreference))
+    {
+        CV_LOG_DEBUG(NULL,
+            cv::format("VIDEOIO(%s): backend is removed from OpenCV",
+                cv::videoio_registry::getBackendName((VideoCaptureAPIs) apiPreference).c_str()));
+    }
```

Review comment:
> `VideoBackendShortInfo` That name is very confusing. `VideoBackendShortInfo` => `VideoDeprecatedBackendInfo`