nareshmlx/opencv-pr huggingface dataset:
**File:** modules/dnn/test/test_misc.cpp
**Change Type:** modified
**Context:** PR #24569: Add support for custom padding in DNN preprocessing

**Code Changes:**
```diff
@@ -93,6 +93,39 @@ TEST(blobFromImageWithParams_4ch, NHWC_scalar_scale)
     }
 }
 
+TEST(blobFromImageWithParams_CustomPadding, letter_box)
+{
+    Mat img(40, 20, CV_8UC4, Scalar(0, 1, 2, 3));
+
+    // Custom padding value that you have added
+    Scalar customPaddingValue(5, 6, 7, 8); // Example padding value
```

Review comment:
It makes sense to use different value for different channels and check each channel value.
**File:** modules/dnn/test/test_misc.cpp
**Change Type:** modified
**Context:** PR #24569: Add support for custom padding in DNN preprocessing
**Review Line:** 126

**Code Changes:**
```diff
+    Mat blob = dnn::blobFromImageWithParams(img, param);
+
+    // Create target blob for comparison
+    Mat targetBlob = dnn::blobFromImage(targetImg, 1.0, targetSize);
+
+    EXPECT_EQ(0, cvtest::norm(targetBlob, blob, NORM_INF));
+}
+
 TEST(blobFromImageWithParams_4ch, letter_box)
 {
     Mat img(40, 20, CV_8UC4, cv::Scalar(0,1,2,3));
```

Review comment:
Where is the check for `customPaddingValue`?
**File:** modules/dnn/test/test_misc.cpp
**Change Type:** modified
**Context:** PR #24569: Add support for custom padding in DNN preprocessing
**Review Line:** 126

**Code Changes:**
```diff
+    Mat blob = dnn::blobFromImageWithParams(img, param);
+
+    // Create target blob for comparison
+    Mat targetBlob = dnn::blobFromImage(targetImg, 1.0, targetSize);
+
+    EXPECT_EQ(0, cvtest::norm(targetBlob, blob, NORM_INF));
+}
+
 TEST(blobFromImageWithParams_4ch, letter_box)
 {
     Mat img(40, 20, CV_8UC4, cv::Scalar(0,1,2,3));
```

Review comment:
What do you mean? Be more specific please.
**File:** modules/dnn/test/test_misc.cpp
**Change Type:** modified
**Context:** PR #24569: Add support for custom padding in DNN preprocessing
**Review Line:** 126

**Code Changes:**
```diff
+    Mat blob = dnn::blobFromImageWithParams(img, param);
+
+    // Create target blob for comparison
+    Mat targetBlob = dnn::blobFromImage(targetImg, 1.0, targetSize);
+
+    EXPECT_EQ(0, cvtest::norm(targetBlob, blob, NORM_INF));
+}
+
 TEST(blobFromImageWithParams_4ch, letter_box)
 {
     Mat img(40, 20, CV_8UC4, cv::Scalar(0,1,2,3));
```

Review comment:
There is no connection of `customPaddingValue` with the rest of test. If it's changed - test fails. So I recommend something like that: ```cpp TEST(blobFromImageWithParams_CustomPadding, letter_box) { Mat img(40, 20, CV_8UC4, Scalar(0, 1, 2, 3)); // Custom padding value that you have added Scalar customPaddingValue(0, 1, 2, 3); // Example padding value Size targetSize(20, 20); Mat targetImg = img.clone(); cv::copyMakeBorder(targetImg, targetImg, 0, 0, targetSize.width / 2, targetSize.width / 2, BORDER_CONSTANT, customPaddingValue); // Set up Image2BlobParams with your new functionality Image2BlobParams param; param.size = targetSize; param.paddingmode = DNN_PMODE_LETTERBOX; param.borderValue = customPaddingValue; // Use your new feature here // Create blob with custom padding Mat blob = dnn::blobFromImageWithParams(img, param); // Create target blob for comparison Mat targetBlob = dnn::blobFromImage(targetImg, 1.0, targetSize); EXPECT_EQ(0, cvtest::norm(targetBlob, blob, NORM_INF)); } ```
**File:** modules/dnn/test/test_misc.cpp
**Change Type:** modified
**Context:** PR #24569: Add support for custom padding in DNN preprocessing
**Review Line:** 110

**Code Changes:**
```diff
+    Mat targetImg = img.clone();
+
+    cv::copyMakeBorder(
+        targetImg, targetImg, 0, 0,
+        targetSize.width / 2,
+        targetSize.width / 2,
+        BORDER_CONSTANT,
+        customPaddingValue);
+
+    // Set up Image2BlobParams with your new functionality
+    Image2BlobParams param;
```

Review comment:
`targetSize` vs `borderSize` - that is a mess. Test should not depend on exact values of its input parameters.
**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:
> `images[i], images[i]` Operation is not in-place. We should not use the same argument for `src` and `dst` - this is anti-pattern and bad practice.
**File:** modules/imgcodecs/src/loadsave.cpp
**Change Type:** modified
**Context:** PR #21966: support use memory buffer as input to read multi-page image
**Review Line:** 994

**Code Changes:**
```diff
+    }
+
+    if (!decoder->setSource(buf_row))
+    {
+        filename = tempfile();
+        FILE* f = fopen(filename.c_str(), "wb");
+        if (!f)
+            return 0;
+        size_t bufSize = buf_row.total() * buf.elemSize();
+        if (fwrite(buf_row.ptr(), 1, bufSize, f) != bufSize)
+        {
```

Review comment:
where is this file removed?
**File:** modules/imgcodecs/src/loadsave.cpp
**Change Type:** modified
**Context:** PR #21966: support use memory buffer as input to read multi-page image
**Review Line:** 994

**Code Changes:**
```diff
+    }
+
+    if (!decoder->setSource(buf_row))
+    {
+        filename = tempfile();
+        FILE* f = fopen(filename.c_str(), "wb");
+        if (!f)
+            return 0;
+        size_t bufSize = buf_row.total() * buf.elemSize();
+        if (fwrite(buf_row.ptr(), 1, bufSize, f) != bufSize)
+        {
```

Review comment:
Lines 1001/1003 with `CV_Error()` doesn't reach `remove()` call (or any internal `CV_Error()` from inner functions). RAII should be used to properly handle resource release.
**File:** modules/imgcodecs/src/grfmt_tiff.cpp
**Change Type:** modified
**Context:** PR #22436: 4-bit_palette_color
**Review Line:** 315

**Code Changes:**
```diff
@@ -312,6 +312,18 @@ bool TiffDecoder::readHeader()
                 result = true;
                 break;
             }
+            case 4:
+                //support 4-bit palette.
+                if (photometric == PHOTOMETRIC_PALETTE)
+                {
+                    CV_Check((int)sample_format, sample_format == SAMPLEFORMAT_UINT || sample_format == SAMPLEFORMAT_INT, "");
+                    int depth = sample_format == SAMPLEFORMAT_INT ? CV_8S : CV_8U;
```

Review comment:
Please add 4-bit support to error message in default branch.
**File:** modules/imgcodecs/src/grfmt_tiff.cpp
**Change Type:** modified
**Context:** PR #22436: 4-bit_palette_color
**Review Line:** 315

**Code Changes:**
```diff
@@ -312,6 +312,18 @@ bool TiffDecoder::readHeader()
                 result = true;
                 break;
             }
+            case 4:
+                //support 4-bit palette.
+                if (photometric == PHOTOMETRIC_PALETTE)
+                {
+                    CV_Check((int)sample_format, sample_format == SAMPLEFORMAT_UINT || sample_format == SAMPLEFORMAT_INT, "");
+                    int depth = sample_format == SAMPLEFORMAT_INT ? CV_8S : CV_8U;
```

Review comment:
ok, I've pushed the changed, 4-bit is only supported in palette mode.
**File:** modules/dnn/test/test_onnx_importer.cpp
**Change Type:** modified
**Context:** PR #24553: Add yolov5n to tests

**Code Changes:**
```diff
@@ -2585,28 +2585,15 @@ TEST_P(Test_ONNX_layers, CumSum)
     testONNXModels("cumsum_3d_dim_2");
 }
 
-// This test is mainly to test:
-//  1. identity node with constant input
-//  2. limited support to range operator (all inputs are constant)
-//  3. parseExpand with multiple broadcast axes
-//  4. 1D mat dimension issue with the output of range operator
-TEST_P(Test_ONNX_layers, YOLOv7)
```

Review comment:
You need to create PR with the model link in opencv_extra. PR should be created with the same branch name. Test models are downloaded by this script and listedt inside of it: https://github.com/opencv/opencv_extra/blob/4.x/testdata/dnn/download_models.py
**File:** modules/dnn/test/test_onnx_importer.cpp
**Change Type:** modified
**Context:** PR #24553: Add yolov5n to tests

**Code Changes:**
```diff
@@ -2585,28 +2585,15 @@ TEST_P(Test_ONNX_layers, CumSum)
     testONNXModels("cumsum_3d_dim_2");
 }
 
-// This test is mainly to test:
-//  1. identity node with constant input
-//  2. limited support to range operator (all inputs are constant)
-//  3. parseExpand with multiple broadcast axes
-//  4. 1D mat dimension issue with the output of range operator
-TEST_P(Test_ONNX_layers, YOLOv7)
```

Review comment:
Please remove it from test.
**File:** modules/dnn/test/test_onnx_importer.cpp
**Change Type:** modified
**Context:** PR #24553: Add yolov5n to tests

**Code Changes:**
```diff
@@ -2585,28 +2585,15 @@ TEST_P(Test_ONNX_layers, CumSum)
     testONNXModels("cumsum_3d_dim_2");
 }
 
-// This test is mainly to test:
-//  1. identity node with constant input
-//  2. limited support to range operator (all inputs are constant)
-//  3. parseExpand with multiple broadcast axes
-//  4. 1D mat dimension issue with the output of range operator
-TEST_P(Test_ONNX_layers, YOLOv7)
```

Review comment:
And there is already YOLOv5n, no need for 5m version: https://github.com/opencv/opencv/blob/0e151e3c8837441c961d7f4788c733d634cd4964/modules/dnn/perf/perf_net.cpp#L275
**File:** modules/dnn/test/test_onnx_importer.cpp
**Change Type:** modified
**Context:** PR #24553: Add yolov5n to tests

**Code Changes:**
```diff
@@ -2585,28 +2585,15 @@ TEST_P(Test_ONNX_layers, CumSum)
     testONNXModels("cumsum_3d_dim_2");
 }
 
-// This test is mainly to test:
-//  1. identity node with constant input
-//  2. limited support to range operator (all inputs are constant)
-//  3. parseExpand with multiple broadcast axes
-//  4. 1D mat dimension issue with the output of range operator
-TEST_P(Test_ONNX_layers, YOLOv7)
```

Review comment:
I think they differ in number of repeated blocks or something.
**File:** modules/dnn/test/test_onnx_importer.cpp
**Change Type:** modified
**Context:** PR #24553: Add yolov5n to tests

**Code Changes:**
```diff
@@ -2585,28 +2585,15 @@ TEST_P(Test_ONNX_layers, CumSum)
     testONNXModels("cumsum_3d_dim_2");
 }
 
-// This test is mainly to test:
-//  1. identity node with constant input
-//  2. limited support to range operator (all inputs are constant)
-//  3. parseExpand with multiple broadcast axes
-//  4. 1D mat dimension issue with the output of range operator
-TEST_P(Test_ONNX_layers, YOLOv7)
```

Review comment:
Accuracy test is a good addition. For now there is only performance test for YOLOv5 as I see. So I suggest replace YOLOv5m to YOLOv5n.
**File:** modules/dnn/test/test_onnx_importer.cpp
**Change Type:** modified
**Context:** PR #24553: Add yolov5n to tests

**Code Changes:**
```diff
@@ -2585,28 +2585,15 @@ TEST_P(Test_ONNX_layers, CumSum)
     testONNXModels("cumsum_3d_dim_2");
 }
 
-// This test is mainly to test:
-//  1. identity node with constant input
-//  2. limited support to range operator (all inputs are constant)
-//  3. parseExpand with multiple broadcast axes
-//  4. 1D mat dimension issue with the output of range operator
-TEST_P(Test_ONNX_layers, YOLOv7)
```

Review comment:
Let’s start from the motivation. If both 5n and 5m models consist of the same layers and there is no difference in the testing perspective which one to test - use 5n. Tests are needed to cover OpenCV implementation. For demonstration object_detection.py sample should be used. So if you can, please keep test run 5n but put a link to yopo5m to the sample as it’s done here: https://github.com/opencv/opencv/pull/24496
**File:** modules/dnn/test/test_onnx_importer.cpp
**Change Type:** modified
**Context:** PR #24553: Add yolov5n to tests

**Code Changes:**
```diff
@@ -2585,28 +2585,15 @@ TEST_P(Test_ONNX_layers, CumSum)
     testONNXModels("cumsum_3d_dim_2");
 }
 
-// This test is mainly to test:
-//  1. identity node with constant input
-//  2. limited support to range operator (all inputs are constant)
-//  3. parseExpand with multiple broadcast axes
-//  4. 1D mat dimension issue with the output of range operator
-TEST_P(Test_ONNX_layers, YOLOv7)
```

Review comment:
`Mat preds = net.forward()`
**File:** modules/dnn/test/test_onnx_importer.cpp
**Change Type:** modified
**Context:** PR #24553: Add yolov5n to tests

**Code Changes:**
```diff
@@ -2585,28 +2585,15 @@ TEST_P(Test_ONNX_layers, CumSum)
     testONNXModels("cumsum_3d_dim_2");
 }
 
-// This test is mainly to test:
-//  1. identity node with constant input
-//  2. limited support to range operator (all inputs are constant)
-//  3. parseExpand with multiple broadcast axes
-//  4. 1D mat dimension issue with the output of range operator
-TEST_P(Test_ONNX_layers, YOLOv7)
```

Review comment:
```suggestion std::string weightPath = findDataFile("dnn/yolov5n.onnx", false); ```
**File:** modules/dnn/test/test_onnx_importer.cpp
**Change Type:** modified
**Context:** PR #24553: Add yolov5n to tests

**Code Changes:**
```diff
@@ -2585,28 +2585,15 @@ TEST_P(Test_ONNX_layers, CumSum)
     testONNXModels("cumsum_3d_dim_2");
 }
 
-// This test is mainly to test:
-//  1. identity node with constant input
-//  2. limited support to range operator (all inputs are constant)
-//  3. parseExpand with multiple broadcast axes
-//  4. 1D mat dimension issue with the output of range operator
-TEST_P(Test_ONNX_layers, YOLOv7)
```

Review comment:
Trailing whitespace
**File:** modules/dnn/test/test_onnx_importer.cpp
**Change Type:** modified
**Context:** PR #24553: Add yolov5n to tests

**Code Changes:**
```diff
@@ -2585,28 +2585,15 @@ TEST_P(Test_ONNX_layers, CumSum)
     testONNXModels("cumsum_3d_dim_2");
 }
 
-// This test is mainly to test:
-//  1. identity node with constant input
-//  2. limited support to range operator (all inputs are constant)
-//  3. parseExpand with multiple broadcast axes
-//  4. 1D mat dimension issue with the output of range operator
-TEST_P(Test_ONNX_layers, YOLOv7)
```

Review comment:
There is a quite a number of tests with `_tf` as reader. Which one to use in general ?
**File:** modules/dnn/test/test_onnx_importer.cpp
**Change Type:** modified
**Context:** PR #24553: Add yolov5n to tests

**Code Changes:**
```diff
@@ -2585,28 +2585,15 @@ TEST_P(Test_ONNX_layers, CumSum)
     testONNXModels("cumsum_3d_dim_2");
 }
 
-// This test is mainly to test:
-//  1. identity node with constant input
-//  2. limited support to range operator (all inputs are constant)
-//  3. parseExpand with multiple broadcast axes
-//  4. 1D mat dimension issue with the output of range operator
-TEST_P(Test_ONNX_layers, YOLOv7)
```

Review comment:
They are locally defined methods to keep paths shorter. However this model is located in a different folder: https://github.com/opencv/opencv/blob/7783c229771259e16e70c047af074c29c66eb324/modules/dnn/test/test_onnx_importer.cpp#L15C1-L20C1 So `findDataFile` is a general method.
**File:** modules/dnn/test/test_onnx_importer.cpp
**Change Type:** modified
**Context:** PR #24553: Add yolov5n to tests

**Code Changes:**
```diff
@@ -2585,28 +2585,15 @@ TEST_P(Test_ONNX_layers, CumSum)
     testONNXModels("cumsum_3d_dim_2");
 }
 
-// This test is mainly to test:
-//  1. identity node with constant input
-//  2. limited support to range operator (all inputs are constant)
-//  3. parseExpand with multiple broadcast axes
-//  4. 1D mat dimension issue with the output of range operator
-TEST_P(Test_ONNX_layers, YOLOv7)
```

Review comment:
Wrong fixture. Use `Test_ONNX_nets`: `TEST_P(Test_ONNX_nets, YOLOv5n)`
**File:** modules/dnn/test/test_onnx_importer.cpp
**Change Type:** modified
**Context:** PR #24553: Add yolov5n to tests

**Code Changes:**
```diff
@@ -2585,28 +2585,15 @@ TEST_P(Test_ONNX_layers, CumSum)
     testONNXModels("cumsum_3d_dim_2");
 }
 
-// This test is mainly to test:
-//  1. identity node with constant input
-//  2. limited support to range operator (all inputs are constant)
-//  3. parseExpand with multiple broadcast axes
-//  4. 1D mat dimension issue with the output of range operator
-TEST_P(Test_ONNX_layers, YOLOv7)
```

Review comment:
Please also fix for `TEST_P(Test_ONNX_layers, YOLOv7)` -> `TEST_P(Test_ONNX_nets, YOLOv7)`
**File:** modules/dnn/test/test_onnx_importer.cpp
**Change Type:** modified
**Context:** PR #24553: Add yolov5n to tests
**Review Line:** 2691

**Code Changes:**
```diff
+
+    std::vector<Rect2d> refBoxes{Rect2d(108.088f, 239.293f, 266.196f, 607.658f),
+                                 Rect2d(392.028f, 89.9233f, 579.152f, 190.447f),
+                                 Rect2d(120.278f, 159.76, 214.481f, 241.473f)};
+    testYOLO(weightPath, refClassIds, refScores, refBoxes);
+}
+
 TEST_P(Test_ONNX_layers, Tile)
 {
     testONNXModels("tile", pb);
```

Review comment:
There is a duplicated code with `YOLOv7`. I suggest add a method such as `testYOLO` which accepts a path to tested model and reference predictions.
**File:** modules/dnn/test/test_onnx_importer.cpp
**Change Type:** modified
**Context:** PR #24553: Add yolov5n to tests
**Review Line:** 2691

**Code Changes:**
```diff
+
+    std::vector<Rect2d> refBoxes{Rect2d(108.088f, 239.293f, 266.196f, 607.658f),
+                                 Rect2d(392.028f, 89.9233f, 579.152f, 190.447f),
+                                 Rect2d(120.278f, 159.76, 214.481f, 241.473f)};
+    testYOLO(weightPath, refClassIds, refScores, refBoxes);
+}
+
 TEST_P(Test_ONNX_layers, Tile)
 {
     testONNXModels("tile", pb);
```

Review comment:
YOLOv7 inference return std::vector<Mat>, and it is requited to take 3rd element and reshape it for further postprocessing; YOLOv5n inference return just Mat object. We can: 1. replace YOLOv7 onnx file to make t return only one object 2. write common method which accepts network outputs (direct outputs for yolov5n and processed outputs for yolov7) and reference predictions
**File:** modules/dnn/test/test_onnx_importer.cpp
**Change Type:** modified
**Context:** PR #24553: Add yolov5n to tests
**Review Line:** 2691

**Code Changes:**
```diff
+
+    std::vector<Rect2d> refBoxes{Rect2d(108.088f, 239.293f, 266.196f, 607.658f),
+                                 Rect2d(392.028f, 89.9233f, 579.152f, 190.447f),
+                                 Rect2d(120.278f, 159.76, 214.481f, 241.473f)};
+    testYOLO(weightPath, refClassIds, refScores, refBoxes);
+}
+
 TEST_P(Test_ONNX_layers, Tile)
 {
     testONNXModels("tile", pb);
```

Review comment:
I have pushed a commit with my view. Let's see if tests pass
**File:** modules/calib3d/src/usac/ransac_solvers.cpp
**Change Type:** modified
**Context:** PR #24499: Replace double atomic in USAC

**Code Changes:**
```diff
@@ -733,7 +733,7 @@ class Ransac {
             const bool is_prosac = params->getSampler() == SamplingMethod::SAMPLING_PROSAC;
             std::atomic_bool success(false);
             std::atomic_int num_hypothesis_tested(0), thread_cnt(0), max_number_inliers(0), subset_size, termination_length;
-            std::atomic<double> best_score_all(std::numeric_limits<double>::max());
+            std::atomic<float> best_score_all(std::numeric_limits<float>::max());
             std::vector<Score> best_scores(MAX_THREADS), best_scores_not_LO;
             std::vector<Mat> best_models(MAX_THREADS), best_models_not_LO, K1_apx, K2_apx;
             std::vector<int> num_tested_models_threads(MAX_THREADS), growth_function, non_random_inliers;
@@ -782,15 +782,16 @@ class Ransac {
```

Review comment:
I propose to use float here. It has the same 4 bytes, but the conversion is more accurate and range is better too.
**File:** modules/calib3d/src/usac/ransac_solvers.cpp
**Change Type:** modified
**Context:** PR #24499: Replace double atomic in USAC

**Code Changes:**
```diff
@@ -733,7 +733,7 @@ class Ransac {
             const bool is_prosac = params->getSampler() == SamplingMethod::SAMPLING_PROSAC;
             std::atomic_bool success(false);
             std::atomic_int num_hypothesis_tested(0), thread_cnt(0), max_number_inliers(0), subset_size, termination_length;
-            std::atomic<double> best_score_all(std::numeric_limits<double>::max());
+            std::atomic<float> best_score_all(std::numeric_limits<float>::max());
             std::vector<Score> best_scores(MAX_THREADS), best_scores_not_LO;
             std::vector<Mat> best_models(MAX_THREADS), best_models_not_LO, K1_apx, K2_apx;
             std::vector<int> num_tested_models_threads(MAX_THREADS), growth_function, non_random_inliers;
@@ -782,15 +782,16 @@ class Ransac {
```

Review comment:
replaced int with float
**File:** modules/calib3d/src/usac/ransac_solvers.cpp
**Change Type:** modified
**Context:** PR #24499: Replace double atomic in USAC

**Code Changes:**
```diff
@@ -733,7 +733,7 @@ class Ransac {
             const bool is_prosac = params->getSampler() == SamplingMethod::SAMPLING_PROSAC;
             std::atomic_bool success(false);
             std::atomic_int num_hypothesis_tested(0), thread_cnt(0), max_number_inliers(0), subset_size, termination_length;
-            std::atomic<double> best_score_all(std::numeric_limits<double>::max());
+            std::atomic<float> best_score_all(std::numeric_limits<float>::max());
             std::vector<Score> best_scores(MAX_THREADS), best_scores_not_LO;
             std::vector<Mat> best_models(MAX_THREADS), best_models_not_LO, K1_apx, K2_apx;
             std::vector<int> num_tested_models_threads(MAX_THREADS), growth_function, non_random_inliers;
@@ -782,15 +782,16 @@ class Ransac {
```

Review comment:
there seems to be a warning if I do this: "warning: overflow in implicit constant conversion [-Woverflow]"
**File:** samples/android/camera-calibration/src/org/opencv/samples/cameracalibration/CameraCalibrationActivity.java
**Change Type:** modified
**Context:** PR #24575: Drop OpenCV Manager from samples initialization

**Code Changes:**
```diff
@@ -13,12 +13,10 @@
 
 package org.opencv.samples.cameracalibration;
 
-import org.opencv.android.BaseLoaderCallback;
 import org.opencv.android.CameraActivity;
 import org.opencv.android.CameraBridgeViewBase;
 import org.opencv.android.CameraBridgeViewBase.CvCameraViewFrame;
 import org.opencv.android.CameraBridgeViewBase.CvCameraViewListener2;
-import org.opencv.android.LoaderCallbackInterface;
```

Review comment:
`} else {` ?
**File:** samples/android/camera-calibration/src/org/opencv/samples/cameracalibration/CameraCalibrationActivity.java
**Change Type:** modified
**Context:** PR #24575: Drop OpenCV Manager from samples initialization

**Code Changes:**
```diff
@@ -13,12 +13,10 @@
 
 package org.opencv.samples.cameracalibration;
 
-import org.opencv.android.BaseLoaderCallback;
 import org.opencv.android.CameraActivity;
 import org.opencv.android.CameraBridgeViewBase;
 import org.opencv.android.CameraBridgeViewBase.CvCameraViewFrame;
 import org.opencv.android.CameraBridgeViewBase.CvCameraViewListener2;
-import org.opencv.android.LoaderCallbackInterface;
```

Review comment:
samples/android/15-puzzle/src/org/opencv/samples/puzzle15/Puzzle15Activity.java has check here. We need to define a unified variant of code.
**File:** samples/android/15-puzzle/src/org/opencv/samples/puzzle15/Puzzle15Activity.java
**Change Type:** modified
**Context:** PR #24575: Drop OpenCV Manager from samples initialization

**Code Changes:**
```diff
@@ -1,8 +1,6 @@
 package org.opencv.samples.puzzle15;
 
-import org.opencv.android.BaseLoaderCallback;
 import org.opencv.android.CameraActivity;
-import org.opencv.android.LoaderCallbackInterface;
 import org.opencv.android.OpenCVLoader;
 import org.opencv.core.Mat;
 import org.opencv.android.CameraBridgeViewBase;
@@ -16,6 +14,7 @@
```

Review comment:
Applied for all samples.