nareshmlx/opencv-pr huggingface dataset:
**File:** modules/objdetect/test/test_charucodetection.cpp
**Change Type:** modified
**Context:** PR #23153: ChArUco pre460 pattern support

**Code Changes:**
```diff
@@ -12,15 +12,19 @@ namespace opencv_test { namespace {
  * @brief Get a synthetic image of Chessboard in perspective
  */
 static Mat projectChessboard(int squaresX, int squaresY, float squareSize, Size imageSize,
-                             Mat cameraMatrix, Mat rvec, Mat tvec) {
+                             Mat cameraMatrix, Mat rvec, Mat tvec, bool legacyPattern) {
 
     Mat img(imageSize, CV_8UC1, Scalar::all(255));
     Mat distCoeffs(5, 1, CV_64FC1, Scalar::all(0));
 
```

Review comment:
Resolved: I removed the for-loop over BBF by splitting the test case into black-box-first and white-box-first.
**File:** modules/objdetect/src/aruco/aruco_board.cpp
**Change Type:** modified
**Context:** PR #23153: ChArUco pre460 pattern support

**Code Changes:**
```diff
@@ -229,7 +229,8 @@ struct GridBoardImpl : public Board::Impl {
         Board::Impl(_dictionary),
         size(_size),
         markerLength(_markerLength),
-        markerSeparation(_markerSeparation)
+        markerSeparation(_markerSeparation),
+        legacyPattern(false)
     {
         CV_Assert(size.width*size.height > 0 && markerLength > 0 && markerSeparation > 0);
     }
```

Review comment:
Name must be `legacyPattern`, value is `false`
**File:** modules/objdetect/test/test_charucodetection.cpp
**Change Type:** modified
**Context:** PR #23153: ChArUco pre460 pattern support
**Review Line:** 194

**Code Changes:**
```diff
 
 void CV_CharucoPoseEstimation::run(int) {
     int iter = 0;
     Mat cameraMatrix = Mat::eye(3, 3, CV_64FC1);
-    Size imgSize(500, 500);
+    Size imgSize(750, 750);
     aruco::DetectorParameters params;
     params.minDistanceToBorder = 3;
     aruco::CharucoBoard board(Size(4, 4), 0.03f, 0.015f, aruco::getPredefinedDictionary(aruco::DICT_6X6_250));
+    board.setLegacyPattern(legacyPattern);
     aruco::CharucoDetector detector(board, aruco::CharucoParameters(), params);
```

Review comment:
Why are test parameters changed?
**File:** modules/objdetect/test/test_charucodetection.cpp
**Change Type:** modified
**Context:** PR #23153: ChArUco pre460 pattern support
**Review Line:** 201

**Code Changes:**
```diff
     aruco::CharucoBoard board(Size(4, 4), 0.03f, 0.015f, aruco::getPredefinedDictionary(aruco::DICT_6X6_250));
+    board.setLegacyPattern(legacyPattern);
     aruco::CharucoDetector detector(board, aruco::CharucoParameters(), params);
 
-    cameraMatrix.at<double>(0, 0) = cameraMatrix.at< double >(1, 1) = 650;
+    cameraMatrix.at<double>(0, 0) = cameraMatrix.at< double >(1, 1) = 1000;
     cameraMatrix.at<double>(0, 2) = imgSize.width / 2;
     cameraMatrix.at<double>(1, 2) = imgSize.height / 2;
 
     Mat distCoeffs(5, 1, CV_64FC1, Scalar::all(0));
+
```

Review comment:
Why are test parameters changed?
**File:** modules/objdetect/test/test_charucodetection.cpp
**Change Type:** modified
**Context:** PR #23153: ChArUco pre460 pattern support
**Review Line:** 201

**Code Changes:**
```diff
     aruco::CharucoBoard board(Size(4, 4), 0.03f, 0.015f, aruco::getPredefinedDictionary(aruco::DICT_6X6_250));
+    board.setLegacyPattern(legacyPattern);
     aruco::CharucoDetector detector(board, aruco::CharucoParameters(), params);
 
-    cameraMatrix.at<double>(0, 0) = cameraMatrix.at< double >(1, 1) = 650;
+    cameraMatrix.at<double>(0, 0) = cameraMatrix.at< double >(1, 1) = 1000;
     cameraMatrix.at<double>(0, 2) = imgSize.width / 2;
     cameraMatrix.at<double>(1, 2) = imgSize.height / 2;
 
     Mat distCoeffs(5, 1, CV_64FC1, Scalar::all(0));
+
```

Review comment:
> Why are test parameters changed? Test parameter change was required in `CV_CharucoPoseEstimation` because the aruco detection had trouble to detect the all aruco code in the low resolution test image at maximum angle. The pose estimation test fails if not all codes are properly detected. But the failure is not actually due to charuco pose estimation which is under test here. Root cause for the test failure was the too small artifical image with too low resolution. Some aruco codes were indistinguishable, depending on the order and exact position on the projected board, so the detection issue is not real a failure of the aruco detection. The code is truely not recognizable with these generation parameters, so it's correct behavior not to detect it. Increasing the cameraMatrix and thus the resolution of the artifical image yields more clear aruco codes for all poses tested in the pose estimation test procedure.
**File:** modules/objdetect/test/test_charucodetection.cpp
**Change Type:** modified
**Context:** PR #23153: ChArUco pre460 pattern support
**Review Line:** 194

**Code Changes:**
```diff
 
 void CV_CharucoPoseEstimation::run(int) {
     int iter = 0;
     Mat cameraMatrix = Mat::eye(3, 3, CV_64FC1);
-    Size imgSize(500, 500);
+    Size imgSize(750, 750);
     aruco::DetectorParameters params;
     params.minDistanceToBorder = 3;
     aruco::CharucoBoard board(Size(4, 4), 0.03f, 0.015f, aruco::getPredefinedDictionary(aruco::DICT_6X6_250));
+    board.setLegacyPattern(legacyPattern);
     aruco::CharucoDetector detector(board, aruco::CharucoParameters(), params);
```

Review comment:
See answer below regarding focal length in the camera matrix. The artifically projected board was too small for all codes to be recognizable.
**File:** modules/objdetect/test/test_charucodetection.cpp
**Change Type:** modified
**Context:** PR #23153: ChArUco pre460 pattern support
**Review Line:** 201

**Code Changes:**
```diff
     aruco::CharucoBoard board(Size(4, 4), 0.03f, 0.015f, aruco::getPredefinedDictionary(aruco::DICT_6X6_250));
+    board.setLegacyPattern(legacyPattern);
     aruco::CharucoDetector detector(board, aruco::CharucoParameters(), params);
 
-    cameraMatrix.at<double>(0, 0) = cameraMatrix.at< double >(1, 1) = 650;
+    cameraMatrix.at<double>(0, 0) = cameraMatrix.at< double >(1, 1) = 1000;
     cameraMatrix.at<double>(0, 2) = imgSize.width / 2;
     cameraMatrix.at<double>(1, 2) = imgSize.height / 2;
 
     Mat distCoeffs(5, 1, CV_64FC1, Scalar::all(0));
+
```

Review comment:
See attached some debug images of the test (required some additional code to create debug output). The aruco detection simply fails with the smaller original settings. Aruco id=1 is not recognized. My guess is due to the low resolution and the aliased artifical image, but I did not dig deeper as I understood this test case as not meant for aruco tests but for the charuco pose accuracy, and it's clear that aruco works better at higher resolution (second image) so it's due to image quality, not the pose. I do wonder a bit why the same aruco pattern is detected at the original resolution with the other chessboard pattern (black box in upper left, new variant) at the same settings although the aruco code is even smaller - see the third image. My guess is that it's just random chance that it works here and not in the other image due it being an aliased artifical image. ![original_legacy_d0 200000y-55p-30](https://user-images.githubusercontent.com/108057787/217106183-ced1eb1c-0921-464a-8d29-9be4d3ea3e2a.png) ![legacy_d0 200000y-55p-30](https://user-images.githubusercontent.com/108057787/217106330-7bb7b6f0-53a7-4ffe-8459-008d8a1decd0.png) ![original_d0 200000y-55p-30](https://user-images.githubusercontent.com/108057787/217107365-3d61ff65-93e5-4aef-aada-167ab7b830c2.png)
**File:** modules/objdetect/test/test_charucodetection.cpp
**Change Type:** modified
**Context:** PR #23153: ChArUco pre460 pattern support
**Review Line:** 201

**Code Changes:**
```diff
     aruco::CharucoBoard board(Size(4, 4), 0.03f, 0.015f, aruco::getPredefinedDictionary(aruco::DICT_6X6_250));
+    board.setLegacyPattern(legacyPattern);
     aruco::CharucoDetector detector(board, aruco::CharucoParameters(), params);
 
-    cameraMatrix.at<double>(0, 0) = cameraMatrix.at< double >(1, 1) = 650;
+    cameraMatrix.at<double>(0, 0) = cameraMatrix.at< double >(1, 1) = 1000;
     cameraMatrix.at<double>(0, 2) = imgSize.width / 2;
     cameraMatrix.at<double>(1, 2) = imgSize.height / 2;
 
     Mat distCoeffs(5, 1, CV_64FC1, Scalar::all(0));
+
```

Review comment:
Here zoomed into both versions, old test settings vs. new test settings, showing the difference a bit more clearly. ![image](https://user-images.githubusercontent.com/108057787/217169867-29ca2b53-87aa-4f8e-93f4-58dbff8f83ea.png)
**File:** modules/objdetect/test/test_charucodetection.cpp
**Change Type:** modified
**Context:** PR #23153: ChArUco pre460 pattern support

**Code Changes:**
```diff
@@ -12,15 +12,19 @@ namespace opencv_test { namespace {
  * @brief Get a synthetic image of Chessboard in perspective
  */
 static Mat projectChessboard(int squaresX, int squaresY, float squareSize, Size imageSize,
-                             Mat cameraMatrix, Mat rvec, Mat tvec) {
+                             Mat cameraMatrix, Mat rvec, Mat tvec, bool legacyPattern) {
 
     Mat img(imageSize, CV_8UC1, Scalar::all(255));
     Mat distCoeffs(5, 1, CV_64FC1, Scalar::all(0));
 
```

Review comment:
I do have a small patch ready and working for the three relevant loops in `test_charucodetection.cpp`. It also requires to increase the virtual image resolution for the distance in `CV_CharucoDiamondDetection` which is otherwise unaffected by this PR. Debug image output code would also be included (but disabled) in the patch. Please advise if I should include it here or not.
**File:** modules/objdetect/include/opencv2/objdetect/aruco_board.hpp
**Change Type:** modified
**Context:** PR #23153: ChArUco pre460 pattern support

**Code Changes:**
```diff
@@ -146,6 +146,18 @@ class CV_EXPORTS_W_SIMPLE CharucoBoard : public Board {
     CV_WRAP CharucoBoard(const Size& size, float squareLength, float markerLength,
                          const Dictionary &dictionary, InputArray ids = noArray());
 
+    /** @brief set legacy chessboard pattern.
+     *
+     * Legacy setting creates chessboard patterns starting with a white box in the upper left corner
+     * if there is an even row count of chessboard boxes, otherwise it starts with a black box.
+     * This setting ensures compatibility to patterns created with OpenCV versions prior OpenCV 4.6.0.
+     * See https://github.com/opencv/opencv/issues/23152.
```

Review comment:
Documentation/comments should be more clear now. I had the parameter change to `legacyParamter` per directions in the other comment, but I am happy to change it again to anything else like `chessboardPatternCompatibility` if this would be the accepted name?
**File:** modules/objdetect/include/opencv2/objdetect/aruco_board.hpp
**Change Type:** modified
**Context:** PR #23153: ChArUco pre460 pattern support
**Review Line:** 146

**Code Changes:**
```diff
@@ -146,6 +146,18 @@ class CV_EXPORTS_W_SIMPLE CharucoBoard : public Board {
     CV_WRAP CharucoBoard(const Size& size, float squareLength, float markerLength,
                          const Dictionary &dictionary, InputArray ids = noArray());
 
+    /** @brief set legacy chessboard pattern.
+     *
+     * Legacy setting creates chessboard patterns starting with a white box in the upper left corner
```

Review comment:
Sorry, there is useful information for discussion here. Please don't mark as resolved for now.
**File:** modules/objdetect/test/test_charucodetection.cpp
**Change Type:** modified
**Context:** PR #23153: ChArUco pre460 pattern support

**Code Changes:**
```diff
@@ -12,15 +12,19 @@ namespace opencv_test { namespace {
  * @brief Get a synthetic image of Chessboard in perspective
  */
 static Mat projectChessboard(int squaresX, int squaresY, float squareSize, Size imageSize,
-                             Mat cameraMatrix, Mat rvec, Mat tvec) {
+                             Mat cameraMatrix, Mat rvec, Mat tvec, bool legacyPattern) {
 
     Mat img(imageSize, CV_8UC1, Scalar::all(255));
     Mat distCoeffs(5, 1, CV_64FC1, Scalar::all(0));
 
```

Review comment:
I was more thinking of just explicitly listing the values to be iterated over: ```diff -for(double distance = 0.2; distance <= 0.3; distance += 0.1) { +for(double distance : {0.2, 0.3}) { ```
**File:** modules/objdetect/test/test_charucodetection.cpp
**Change Type:** modified
**Context:** PR #23153: ChArUco pre460 pattern support

**Code Changes:**
```diff
@@ -12,15 +12,19 @@ namespace opencv_test { namespace {
  * @brief Get a synthetic image of Chessboard in perspective
  */
 static Mat projectChessboard(int squaresX, int squaresY, float squareSize, Size imageSize,
-                             Mat cameraMatrix, Mat rvec, Mat tvec) {
+                             Mat cameraMatrix, Mat rvec, Mat tvec, bool legacyPattern) {
 
     Mat img(imageSize, CV_8UC1, Scalar::all(255));
     Mat distCoeffs(5, 1, CV_64FC1, Scalar::all(0));
 
```

Review comment:
I created a separate PR for this: https://github.com/opencv/opencv/pull/23271. I think listing the values `0.2` and `0.3` explicitly is more straightforward than using a temporary value (`int i`), at least for these small `for` loops. The other PR is only in draft because this PR here needs to be merged first, or there will be a conflict. Both PRs require the Charuco test pattern resolution to be increased.
**File:** modules/objdetect/include/opencv2/objdetect/aruco_board.hpp
**Change Type:** modified
**Context:** PR #23153: ChArUco pre460 pattern support
**Review Line:** 146

**Code Changes:**
```diff
@@ -146,6 +146,18 @@ class CV_EXPORTS_W_SIMPLE CharucoBoard : public Board {
     CV_WRAP CharucoBoard(const Size& size, float squareLength, float markerLength,
                          const Dictionary &dictionary, InputArray ids = noArray());
 
+    /** @brief set legacy chessboard pattern.
+     *
+     * Legacy setting creates chessboard patterns starting with a white box in the upper left corner
```

Review comment:
I'm interest as well to understand when this pul request will be close?
**File:** modules/dnn/src/layers/size_layer.cpp
**Change Type:** added
**Context:** PR #27656: Added Size layer to new DNN engine

**Code Changes:**
```diff
@@ -0,0 +1,70 @@
+// 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.
+// Copyright (C) 2025, BigVision LLC, all rights reserved.
+// Third party copyrights are property of their respective owners.
+
+#include "../precomp.hpp"
+#include "layers_common.hpp"
+#include <opencv2/dnn/shape_utils.hpp>
```

Review comment:
Why not just `Mat::total()*Mat::channels()`?
**File:** modules/dnn/src/layers/size_layer.cpp
**Change Type:** added
**Context:** PR #27656: Added Size layer to new DNN engine

**Code Changes:**
```diff
@@ -0,0 +1,70 @@
+// 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.
+// Copyright (C) 2025, BigVision LLC, all rights reserved.
+// Third party copyrights are property of their respective owners.
+
+#include "../precomp.hpp"
+#include "layers_common.hpp"
+#include <opencv2/dnn/shape_utils.hpp>
```

Review comment:
That's incorrect for ND cv::Mat. Use `total`: https://github.com/opencv/opencv/blob/649dc297cb6949ad324aa5fcac67dc0456915802/modules/dnn/include/opencv2/dnn/shape_utils.hpp#L155
**File:** modules/dnn/src/layers/det_layer.cpp
**Change Type:** added
**Context:** PR #27658: Added Determinant (Det) layer to new DNN engine
**Review Line:** 7

**Code Changes:**
```diff
+// 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.
+// Copyright (C) 2025, BigVision LLC, all rights reserved.
+// Third party copyrights are property of their respective owners.
+
+#include "../precomp.hpp"
+#include "layers_common.hpp"
+#include <opencv2/dnn/shape_utils.hpp>
+
+namespace cv {
+namespace dnn {
```

Review comment:
please, add the link to onnx.ai (description of Det) and specify which opset's are supported
**File:** modules/dnn/src/layers/det_layer.cpp
**Change Type:** added
**Context:** PR #27658: Added Determinant (Det) layer to new DNN engine

**Code Changes:**
```diff
@@ -0,0 +1,143 @@
+// 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.
+// Copyright (C) 2025, BigVision LLC, all rights reserved.
+// Third party copyrights are property of their respective owners.
+
+#include "../precomp.hpp"
+#include "layers_common.hpp"
+#include <opencv2/dnn/shape_utils.hpp>
```

Review comment:
remove all cv::. We are already inside cv namespace
**File:** modules/dnn/src/layers/det_layer.cpp
**Change Type:** added
**Context:** PR #27658: Added Determinant (Det) layer to new DNN engine
**Review Line:** 123

**Code Changes:**
```diff
+                } else {
+                    A.convertTo(temp, CV_32F);
+                    det = determinant(temp);
+                }
+
+                if (type == CV_32F)
+                    reinterpret_cast<float*>(outp)[b] = static_cast<float>(det);
+                else if (type == CV_64F)
+                    reinterpret_cast<double*>(outp)[b] = det;
+                else if (type == CV_16F)
+                    reinterpret_cast<hfloat*>(outp)[b] = saturate_cast<hfloat>(det);
```

Review comment:
add support for bfloat and hfloat: 1) declare temporary `Mat temp;` outside of `for (int bi = r.start ...)` loop. 2) replace double det = cv::determinant(A); with ``` double det; if (type == CV_32F || type == CV_64F) { det = determinant(A); } else { A.convertTo(temp, CV_32F); det = determinant(temp); } ``` 3) add 2 more branches to store determinant to hfloat/bfloat
**File:** samples/dnn/alpha_matting.cpp
**Change Type:** added
**Context:** PR #27593: Add Alpha matting samples (C++ and Python)

**Code Changes:**
```diff
@@ -0,0 +1,201 @@
+/*
+ * 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.
+ *
+ * Copyright (C) 2025, Bigvision LLC.
+ *
+ * @file alpha_matting.cpp
+ * @brief MODNet Alpha Matting using OpenCV DNN
+ *
```

Review comment:
There is no need of explicitly adding findFile here.
**File:** samples/dnn/alpha_matting.cpp
**Change Type:** added
**Context:** PR #27593: Add Alpha matting samples (C++ and Python)
**Review Line:** 12

**Code Changes:**
```diff
+ * @file alpha_matting.cpp
+ * @brief MODNet Alpha Matting using OpenCV DNN
+ *
+ * This sample demonstrates human portrait alpha matting using MODNet model.
+ * MODNet is a trimap-free portrait matting method that can produce high-quality
+ * alpha mattes for portrait images in real-time.
+ *
+ * Reference:
+ *      Github: https://github.com/ZHKKKe/MODNet
+ *
+ * Usage:
```

Review comment:
Add link to original github implementation
**File:** samples/dnn/alpha_matting.cpp
**Change Type:** added
**Context:** PR #27593: Add Alpha matting samples (C++ and Python)

**Code Changes:**
```diff
@@ -0,0 +1,201 @@
+/*
+ * 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.
+ *
+ * Copyright (C) 2025, Bigvision LLC.
+ *
+ * @file alpha_matting.cpp
+ * @brief MODNet Alpha Matting using OpenCV DNN
+ *
```

Review comment:
Move the composting in processImage function. Return only resized alpha_mask
**File:** samples/dnn/alpha_matting.py
**Change Type:** added
**Context:** PR #27593: Add Alpha matting samples (C++ and Python)
**Review Line:** 11

**Code Changes:**
```diff
+
+MODNet Alpha Matting with OpenCV DNN
+
+This sample demonstrates human portrait alpha matting using MODNet model.
+MODNet is a trimap-free portrait matting method that can produce high-quality
+alpha mattes for portrait images in real-time.
+
+Reference:
+    Github: https://github.com/ZHKKKe/MODNet
+
+To download the MODNet model, run:
```

Review comment:
Add github url to original implementation here
**File:** samples/dnn/alpha_matting.py
**Change Type:** added
**Context:** PR #27593: Add Alpha matting samples (C++ and Python)

**Code Changes:**
```diff
@@ -0,0 +1,177 @@
+"""
+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.
+
+Copyright (C) 2025, Bigvision LLC.
+
+MODNet Alpha Matting with OpenCV DNN
+
+This sample demonstrates human portrait alpha matting using MODNet model.
```

Review comment:
define the function out of apply_modnet
**File:** samples/dnn/alpha_matting.py
**Change Type:** added
**Context:** PR #27593: Add Alpha matting samples (C++ and Python)

**Code Changes:**
```diff
@@ -0,0 +1,177 @@
+"""
+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.
+
+Copyright (C) 2025, Bigvision LLC.
+
+MODNet Alpha Matting with OpenCV DNN
+
+This sample demonstrates human portrait alpha matting using MODNet model.
```

Review comment:
Move the overlay and imshow functions into main. apply_modnet should return alpha_mask and composite
**File:** samples/dnn/alpha_matting.py
**Change Type:** added
**Context:** PR #27593: Add Alpha matting samples (C++ and Python)

**Code Changes:**
```diff
@@ -0,0 +1,177 @@
+"""
+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.
+
+Copyright (C) 2025, Bigvision LLC.
+
+MODNet Alpha Matting with OpenCV DNN
+
+This sample demonstrates human portrait alpha matting using MODNet model.
```

Review comment:
move composting to apply_modnet function, just return alpha_mask
**File:** samples/dnn/alpha_matting.cpp
**Change Type:** added
**Context:** PR #27593: Add Alpha matting samples (C++ and Python)
**Review Line:** 12

**Code Changes:**
```diff
+ * @file alpha_matting.cpp
+ * @brief MODNet Alpha Matting using OpenCV DNN
+ *
+ * This sample demonstrates human portrait alpha matting using MODNet model.
+ * MODNet is a trimap-free portrait matting method that can produce high-quality
+ * alpha mattes for portrait images in real-time.
+ *
+ * Reference:
+ *      Github: https://github.com/ZHKKKe/MODNet
+ *
+ * Usage:
```

Review comment:
Added original GitHub link.
**File:** samples/dnn/alpha_matting.py
**Change Type:** added
**Context:** PR #27593: Add Alpha matting samples (C++ and Python)
**Review Line:** 11

**Code Changes:**
```diff
+
+MODNet Alpha Matting with OpenCV DNN
+
+This sample demonstrates human portrait alpha matting using MODNet model.
+MODNet is a trimap-free portrait matting method that can produce high-quality
+alpha mattes for portrait images in real-time.
+
+Reference:
+    Github: https://github.com/ZHKKKe/MODNet
+
+To download the MODNet model, run:
```

Review comment:
Added original GitHub link.
**File:** samples/dnn/alpha_matting.cpp
**Change Type:** added
**Context:** PR #27593: Add Alpha matting samples (C++ and Python)

**Code Changes:**
```diff
@@ -0,0 +1,201 @@
+/*
+ * 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.
+ *
+ * Copyright (C) 2025, Bigvision LLC.
+ *
+ * @file alpha_matting.cpp
+ * @brief MODNet Alpha Matting using OpenCV DNN
+ *
```

Review comment:
Moved compositing to `processImage`; now returning only resized `alpha_mask`.