nareshmlx/opencv-pr huggingface dataset:
**File:** modules/calib/include/opencv2/calib.hpp
**Change Type:** modified
**Context:** PR #26221: Reworked multiview calibration interface

**Code Changes:**
```diff
@@ -449,7 +449,7 @@ enum { CALIB_USE_INTRINSIC_GUESS = 0x00001, //!< Use user provided intrinsics as
        // for stereo rectification
        CALIB_ZERO_DISPARITY      = 0x00400, //!< Deprecated synonim of @ref STEREO_ZERO_DISPARITY. See @ref stereoRectify.
        CALIB_USE_LU              = (1 << 17), //!< use LU instead of SVD decomposition for solving. much faster but potentially less precise
-       CALIB_USE_EXTRINSIC_GUESS = (1 << 22), //!< For stereo calibration only. Use user provided extrinsics (R, T) as initial point for optimization
+       CALIB_USE_EXTRINSIC_GUESS = (1 << 22), //!< For stereo and multi-view calibration. Use user provided extrinsics (R, T) as initial point for optimization
        // fisheye only flags
        CALIB_RECOMPUTE_EXTRINSIC = (1 << 23), //!< For fisheye model only. Recompute board position on each calibration iteration
        CALIB_CHECK_COND          = (1 << 24), //!< For fisheye model only. Check SVD decomposition quality for each frame during extrinsics estimation
@@ -1236,16 +1236,14 @@ CV_EXPORTS_W double registerCameras( InputArrayOfArrays objectPoints1,
```

Review comment:
`std::vector<Size>` => `const std::vector<Size>&`? Also, shall I specify size for each single image even if they are the same? Can I just pass a vector of a single Size?
**File:** modules/calib/src/multiview_calibration.cpp
**Change Type:** modified
**Context:** PR #26221: Reworked multiview calibration interface
**Review Line:** 510

**Code Changes:**
```diff
-        const std::vector<Size> &imageSize, InputArray detectionMask,
-        OutputArrayOfArrays Rs, OutputArrayOfArrays Ts, std::vector<Mat> &Ks, std::vector<Mat> &distortions,
-        OutputArrayOfArrays rvecs0, OutputArrayOfArrays tvecs0, InputArray isFisheye,
-        OutputArray perFrameErrors, OutputArray initializationPairs, bool useIntrinsicsGuess, InputArray flagsForIntrinsics) {
+//TODO: use Input/OutputArrays for imagePoints(?)
+double calibrateMultiview(
+        InputArrayOfArrays objPoints, const std::vector<std::vector<Mat>> &imagePoints,
+        const std::vector<cv::Size>& imageSize, InputArray detectionMask, InputArray models,
+        InputOutputArrayOfArrays Rs, InputOutputArrayOfArrays Ts,
+        InputOutputArrayOfArrays Ks, InputOutputArrayOfArrays distortions,
+        int flags, InputArray flagsForIntrinsics,
```

Review comment:
Does this algorithm requires all images at once? If not, it would be more convenient (and efficient) to make iterative interface, e.g.: ```.cpp MultiviewCalib calib(...); for(...) { calib.addFrame(...); } SomeResult res = calib.getResults(); ```
**File:** modules/calib/src/multiview_calibration.cpp
**Change Type:** modified
**Context:** PR #26221: Reworked multiview calibration interface
**Review Line:** 510

**Code Changes:**
```diff
-        const std::vector<Size> &imageSize, InputArray detectionMask,
-        OutputArrayOfArrays Rs, OutputArrayOfArrays Ts, std::vector<Mat> &Ks, std::vector<Mat> &distortions,
-        OutputArrayOfArrays rvecs0, OutputArrayOfArrays tvecs0, InputArray isFisheye,
-        OutputArray perFrameErrors, OutputArray initializationPairs, bool useIntrinsicsGuess, InputArray flagsForIntrinsics) {
+//TODO: use Input/OutputArrays for imagePoints(?)
+double calibrateMultiview(
+        InputArrayOfArrays objPoints, const std::vector<std::vector<Mat>> &imagePoints,
+        const std::vector<cv::Size>& imageSize, InputArray detectionMask, InputArray models,
+        InputOutputArrayOfArrays Rs, InputOutputArrayOfArrays Ts,
+        InputOutputArrayOfArrays Ks, InputOutputArrayOfArrays distortions,
+        int flags, InputArray flagsForIntrinsics,
```

Review comment:
The algorithm does not use frames, but point coordinates only. The first step calibrates intrinsics and build spanning tree. The second step makes global optimization for all frames. So iterative API is not possible here.
**File:** samples/cpp/multiview_calibration_sample.cpp
**Change Type:** modified
**Context:** PR #25022: Add Charuco board support to multiview calibration sample (C++)

**Code Changes:**
```diff
@@ -7,12 +7,14 @@
 #include <opencv2/calib3d.hpp>
 #include <opencv2/imgcodecs.hpp>
 #include <opencv2/imgproc.hpp>
+#include <opencv2/objdetect.hpp>
 #include <iostream>
 #include <fstream>
 
 // ! [detectPointsAndCalibrate_signature]
-static void detectPointsAndCalibrate (cv::Size pattern_size, float pattern_scale, const std::string &pattern_type,
```

Review comment:
It does not work, if not all Charuco corners are detected/labeled correctly. corners array will contain (-1,-1) and it'll be used in calibration pipeline.
**File:** samples/cpp/multiview_calibration_sample.cpp
**Change Type:** modified
**Context:** PR #25022: Add Charuco board support to multiview calibration sample (C++)

**Code Changes:**
```diff
@@ -7,12 +7,14 @@
 #include <opencv2/calib3d.hpp>
 #include <opencv2/imgcodecs.hpp>
 #include <opencv2/imgproc.hpp>
+#include <opencv2/objdetect.hpp>
 #include <iostream>
 #include <fstream>
 
 // ! [detectPointsAndCalibrate_signature]
-static void detectPointsAndCalibrate (cv::Size pattern_size, float pattern_scale, const std::string &pattern_type,
```

Review comment:
I put it to be (-1, -1) on purpose, as internally, I would check whether the point is inside the image frame x in (0, width-1), y in (0, height-1). If not, this point will be discarded. I design the input of the method to be like this so that I only need to feed in a single copy of the objective points. Otherwise, I would need to have a copy of the objective function for every frame and for every camera
**File:** doc/tutorials/dnn/dnn_yolo/dnn_yolo.markdown
**Change Type:** modified
**Context:** PR #25710: Merged yolo_detector and object detection sample

**Code Changes:**
```diff
@@ -150,13 +150,12 @@ Once we have our ONNX graph of the model, we just simply can run with OpenCV's s
 3. Run the following command:
 
 @code{.cpp}
-./bin/example_dnn_yolo_detector --input=<path_to_your_input_file> \
-                                --classes=<path_to_class_names_file> \
+./bin/example_dnn_object_detection <model_name> --input=<path_to_your_input_file> \
+                                --labels=<path_to_class_names_file> \
                                 --thr=<confidence_threshold> \
                                 --nms=<non_maximum_suppression_threshold> \
```

Review comment:
Yolo detector sample was removed in the PR.
**File:** samples/dnn/object_detection.cpp
**Change Type:** modified
**Context:** PR #25710: Merged yolo_detector and object detection sample

**Code Changes:**
```diff
@@ -1,68 +1,114 @@
+//![includes]
 #include <fstream>
 #include <sstream>
 
 #include <opencv2/dnn.hpp>
 #include <opencv2/imgproc.hpp>
+#include <opencv2/imgcodecs.hpp>
 #include <opencv2/highgui.hpp>
 
```

Review comment:
`test_name` -> `yolo_name` or something similar.
**File:** samples/dnn/object_detection.cpp
**Change Type:** modified
**Context:** PR #25710: Merged yolo_detector and object detection sample

**Code Changes:**
```diff
@@ -1,68 +1,114 @@
+//![includes]
 #include <fstream>
 #include <sstream>
 
 #include <opencv2/dnn.hpp>
 #include <opencv2/imgproc.hpp>
+#include <opencv2/imgcodecs.hpp>
 #include <opencv2/highgui.hpp>
 
```

Review comment:
postrpocessing type from yaml file should be used here to support yolonas like models.
**File:** samples/dnn/object_detection.cpp
**Change Type:** modified
**Context:** PR #25710: Merged yolo_detector and object detection sample

**Code Changes:**
```diff
@@ -1,68 +1,114 @@
+//![includes]
 #include <fstream>
 #include <sstream>
 
 #include <opencv2/dnn.hpp>
 #include <opencv2/imgproc.hpp>
+#include <opencv2/imgcodecs.hpp>
 #include <opencv2/highgui.hpp>
 
```

Review comment:
The same relevant for python code. Also there conditions are different.
**File:** modules/imgcodecs/include/opencv2/imgcodecs.hpp
**Change Type:** modified
**Context:** PR #26152: Documentation update for imagecodecs

**Code Changes:**
```diff
@@ -222,9 +222,9 @@ enum ImwriteHDRCompressionFlags {
 
 @anchor imread
 
-The function imread loads an image from the specified file and returns it. If the image cannot be
-read (because of missing file, improper permissions, unsupported or invalid format), the function
-returns an empty matrix ( Mat::data==NULL ).
+The `imread` function loads an image from the specified file and returns OpenCV matrix. If the image cannot be
+read (because of a missing file, improper permissions, or unsupported/invalid format), the function
+returns an empty matrix.
```

Review comment:
`Mat::data = NULL` is bad check. `Mat::empty()` should be used instead.
**File:** modules/imgcodecs/src/grfmt_sunras.cpp
**Change Type:** modified
**Context:** PR #26152: Documentation update for imagecodecs
**Review Line:** 25

**Code Changes:**
```diff
 #include "grfmt_sunras.hpp"
@@ -60,6 +22,7 @@ SunRasterDecoder::SunRasterDecoder()
     m_encoding = RAS_STANDARD;
     m_maptype = RMT_NONE;
     m_maplength = 0;
+    m_buf_supported = true;
 }
 
 
@@ -82,7 +45,12 @@ bool  SunRasterDecoder::readHeader()
 {
```

Review comment:
Please extend existing test to cover the new feature.
**File:** modules/imgcodecs/src/grfmt_sunras.cpp
**Change Type:** modified
**Context:** PR #26152: Documentation update for imagecodecs
**Review Line:** 25

**Code Changes:**
```diff
 #include "grfmt_sunras.hpp"
@@ -60,6 +22,7 @@ SunRasterDecoder::SunRasterDecoder()
     m_encoding = RAS_STANDARD;
     m_maptype = RMT_NONE;
     m_maplength = 0;
+    m_buf_supported = true;
 }
 
 
@@ -82,7 +45,12 @@ bool  SunRasterDecoder::readHeader()
 {
```

Review comment:
when `m_buf_supported = false;` imencode function writes the data into a temporary file. so tests already cover the functionality of `m_buf_supported = true;`
**File:** modules/dnn/src/layers/gatherND.cpp
**Change Type:** added
**Context:** PR #26106: Support for GatherND layer
**Review Line:** 71

**Code Changes:**
```diff
+        MatShape output_shape;
+        output_shape.reserve(q - 1 + r - batch_dims - last_indices_dim);
+        for (int i = 0; i < q - 1; ++i)
+            output_shape.push_back(indices[i]);
+        for (int i = batch_dims + last_indices_dim; i < r; ++i)
+            output_shape.push_back(data[i]);
+
+        outputs.assign(1, output_shape);
+        return false;
+    }
+
```

Review comment:
makes sense to use `output_shape.reserve()` before the loops.
**File:** modules/dnn/src/layers/gatherND.cpp
**Change Type:** added
**Context:** PR #26106: Support for GatherND layer

**Code Changes:**
```diff
@@ -0,0 +1,185 @@
+#include "../precomp.hpp"
+#include <opencv2/dnn/shape_utils.hpp>
+
+namespace cv { namespace dnn {
+
+class GatherNDLayerImpl CV_FINAL : public GatherNDLayer
+{
+public:
+    GatherNDLayerImpl(const LayerParams& params)
```

Review comment:
please add default branch with assert. It might be useful for debugging,
**File:** modules/dnn/src/layers/gatherND.cpp
**Change Type:** added
**Context:** PR #26106: Support for GatherND layer
**Review Line:** 126

**Code Changes:**
```diff
+    }
+
+    template <typename iT, typename dT>
+    void forward_impl(const Mat& data, const Mat& indices, Mat& out)
+    {
+        CV_Assert(out.isContinuous());
+        CV_Assert(indices.isContinuous());
+        CV_Assert(data.isContinuous());
+
+
+        const iT* indices_ptr = indices.ptr<iT>();
```

Review comment:
check also indices and data
**File:** modules/dnn/src/layers/gatherND.cpp
**Change Type:** added
**Context:** PR #26106: Support for GatherND layer

**Code Changes:**
```diff
@@ -0,0 +1,185 @@
+#include "../precomp.hpp"
+#include <opencv2/dnn/shape_utils.hpp>
+
+namespace cv { namespace dnn {
+
+class GatherNDLayerImpl CV_FINAL : public GatherNDLayer
+{
+public:
+    GatherNDLayerImpl(const LayerParams& params)
```

Review comment:
you do not need vector here. just: ``` int* sliced_indices = indices_ptr + i * last_indices_dim; ```
**File:** modules/dnn/src/layers/gatherND.cpp
**Change Type:** added
**Context:** PR #26106: Support for GatherND layer

**Code Changes:**
```diff
@@ -0,0 +1,185 @@
+#include "../precomp.hpp"
+#include <opencv2/dnn/shape_utils.hpp>
+
+namespace cv { namespace dnn {
+
+class GatherNDLayerImpl CV_FINAL : public GatherNDLayer
+{
+public:
+    GatherNDLayerImpl(const LayerParams& params)
```

Review comment:
`break` is missing: ``` 2024-09-03T16:01:13.0386984Z /home/ci/opencv/modules/dnn/src/layers/gatherND.cpp:95:17: warning: this statement may fall through [-Wimplicit-fallthrough=] 2024-09-03T16:01:13.0388547Z 95 | switch (dtype) { 2024-09-03T16:01:13.0389213Z | ^~~~~~ 2024-09-03T16:01:13.0390112Z /home/ci/opencv/modules/dnn/src/layers/gatherND.cpp:105:13: note: here 2024-09-03T16:01:13.0391087Z 105 | case CV_64S: 2024-09-03T16:01:13.0391668Z | ^~~~ ```
**File:** modules/dnn/src/layers/gatherND.cpp
**Change Type:** added
**Context:** PR #26106: Support for GatherND layer

**Code Changes:**
```diff
@@ -0,0 +1,185 @@
+#include "../precomp.hpp"
+#include <opencv2/dnn/shape_utils.hpp>
+
+namespace cv { namespace dnn {
+
+class GatherNDLayerImpl CV_FINAL : public GatherNDLayer
+{
+public:
+    GatherNDLayerImpl(const LayerParams& params)
```

Review comment:
``` /home/ci/opencv/modules/dnn/src/layers/gatherND.cpp:99:56: error: 'float16_t' was not declared in this scope; did you mean 'float_t'? 2024-09-03T15:59:18.3161177Z 99 | case CV_16F: forward_impl<int32_t, float16_t>(data, indices, out); break; ```
**File:** modules/dnn/src/layers/gatherND.cpp
**Change Type:** added
**Context:** PR #26106: Support for GatherND layer

**Code Changes:**
```diff
@@ -0,0 +1,185 @@
+#include "../precomp.hpp"
+#include <opencv2/dnn/shape_utils.hpp>
+
+namespace cv { namespace dnn {
+
+class GatherNDLayerImpl CV_FINAL : public GatherNDLayer
+{
+public:
+    GatherNDLayerImpl(const LayerParams& params)
```

Review comment:
I propose to use s16 branch for `CV_16F` case to be hardware independent.
**File:** modules/dnn/src/onnx/onnx_importer.cpp
**Change Type:** modified
**Context:** PR #26106: Support for GatherND layer
**Review Line:** 3217

**Code Changes:**
```diff
     // URL: https://github.com/microsoft/onnxruntime/blob/master/docs/ContribOperators.md
@@ -3213,6 +3214,15 @@ void ONNXImporter::parseHardmax(LayerParams& layerParams, const opencv_onnx::Nod
     addLayer(layerParams, node_proto);
 }
 
+void ONNXImporter::parseGatherND(LayerParams& layerParams, const opencv_onnx::NodeProto& node_proto)
+{
+    CV_Assert(node_proto.input_size() == 2);
+    layerParams.type = "GatherND";
+    int batch_dims = layerParams.get<int>("batch_dims", 0);
+    layerParams.set("batch_dims", batch_dims);
```

Review comment:
Looks like you can simply use `parseSimpleLayers` to parse `GatherND` since it does not take extra operations.
**File:** modules/dnn/src/layers/gatherND.cpp
**Change Type:** added
**Context:** PR #26106: Support for GatherND layer

**Code Changes:**
```diff
@@ -0,0 +1,185 @@
+#include "../precomp.hpp"
+#include <opencv2/dnn/shape_utils.hpp>
+
+namespace cv { namespace dnn {
+
+class GatherNDLayerImpl CV_FINAL : public GatherNDLayer
+{
+public:
+    GatherNDLayerImpl(const LayerParams& params)
```

Review comment:
int16_t is better here to ensure size.
**File:** modules/dnn/src/onnx/onnx_importer.cpp
**Change Type:** modified
**Context:** PR #26106: Support for GatherND layer
**Review Line:** 3217

**Code Changes:**
```diff
     // URL: https://github.com/microsoft/onnxruntime/blob/master/docs/ContribOperators.md
@@ -3213,6 +3214,15 @@ void ONNXImporter::parseHardmax(LayerParams& layerParams, const opencv_onnx::Nod
     addLayer(layerParams, node_proto);
 }
 
+void ONNXImporter::parseGatherND(LayerParams& layerParams, const opencv_onnx::NodeProto& node_proto)
+{
+    CV_Assert(node_proto.input_size() == 2);
+    layerParams.type = "GatherND";
+    int batch_dims = layerParams.get<int>("batch_dims", 0);
+    layerParams.set("batch_dims", batch_dims);
```

Review comment:
I propose to leave this as it is, for new parser it makes sence
**File:** modules/dnn/src/layers/gatherND.cpp
**Change Type:** added
**Context:** PR #26106: Support for GatherND layer

**Code Changes:**
```diff
@@ -0,0 +1,185 @@
+#include "../precomp.hpp"
+#include <opencv2/dnn/shape_utils.hpp>
+
+namespace cv { namespace dnn {
+
+class GatherNDLayerImpl CV_FINAL : public GatherNDLayer
+{
+public:
+    GatherNDLayerImpl(const LayerParams& params)
```

Review comment:
This leads to crush during build time
**File:** modules/dnn/src/layers/gatherND.cpp
**Change Type:** added
**Context:** PR #26106: Support for GatherND layer

**Code Changes:**
```diff
@@ -0,0 +1,185 @@
+#include "../precomp.hpp"
+#include <opencv2/dnn/shape_utils.hpp>
+
+namespace cv { namespace dnn {
+
+class GatherNDLayerImpl CV_FINAL : public GatherNDLayer
+{
+public:
+    GatherNDLayerImpl(const LayerParams& params)
```

Review comment:
I just pushed fix. `indices_ptr` has template type `iT*` and `sliced_indices` should. It's not always `int`. The solution with vector just hides the problem.
**File:** samples/dnn/text_detection.cpp
**Change Type:** modified
**Context:** PR #25326: Improved and refactored text detection sample in dnn module

**Code Changes:**
```diff
@@ -1,21 +1,28 @@
 /*
-    Text detection model: https://github.com/argman/EAST
-    Download link: https://www.dropbox.com/s/r2ingd0l3zt8hxs/frozen_east_text_detection.tar.gz?dl=1
+    Text detection model (EAST): https://github.com/argman/EAST
+    Download link for EAST model: https://www.dropbox.com/s/r2ingd0l3zt8hxs/frozen_east_text_detection.tar.gz?dl=1
 
-    Text recognition models can be downloaded directly here:
+    DB detector model:
+    https://drive.google.com/uc?export=download&id=17_ABp79PlFt9yPCxSaarVc_DKTmrSGGf
```

Review comment:
Not necessary comment
**File:** samples/dnn/text_detection.cpp
**Change Type:** modified
**Context:** PR #25326: Improved and refactored text detection sample in dnn module

**Code Changes:**
```diff
@@ -1,21 +1,28 @@
 /*
-    Text detection model: https://github.com/argman/EAST
-    Download link: https://www.dropbox.com/s/r2ingd0l3zt8hxs/frozen_east_text_detection.tar.gz?dl=1
+    Text detection model (EAST): https://github.com/argman/EAST
+    Download link for EAST model: https://www.dropbox.com/s/r2ingd0l3zt8hxs/frozen_east_text_detection.tar.gz?dl=1
 
-    Text recognition models can be downloaded directly here:
+    DB detector model:
+    https://drive.google.com/uc?export=download&id=17_ABp79PlFt9yPCxSaarVc_DKTmrSGGf
```

Review comment:
The only generic parameter is `Size(width, height)`. Please update `TextDetectionModel_EAST_Impl` constructor with the rest of preprocessing options so in sample you just need to call `detector.setInputSize()` https://github.com/opencv/opencv/blob/f2c3d4dfe3843898d969a45e43d981e8af967bd5/modules/dnn/src/model.cpp#L1115
**File:** samples/dnn/text_detection.cpp
**Change Type:** modified
**Context:** PR #25326: Improved and refactored text detection sample in dnn module

**Code Changes:**
```diff
@@ -1,21 +1,28 @@
 /*
-    Text detection model: https://github.com/argman/EAST
-    Download link: https://www.dropbox.com/s/r2ingd0l3zt8hxs/frozen_east_text_detection.tar.gz?dl=1
+    Text detection model (EAST): https://github.com/argman/EAST
+    Download link for EAST model: https://www.dropbox.com/s/r2ingd0l3zt8hxs/frozen_east_text_detection.tar.gz?dl=1
 
-    Text recognition models can be downloaded directly here:
+    DB detector model:
+    https://drive.google.com/uc?export=download&id=17_ABp79PlFt9yPCxSaarVc_DKTmrSGGf
```

Review comment:
Same request as for EAST. Let's move magic constants to `TextDetectionModel_DB` constructor
**File:** samples/dnn/text_detection.cpp
**Change Type:** modified
**Context:** PR #25326: Improved and refactored text detection sample in dnn module

**Code Changes:**
```diff
@@ -1,21 +1,28 @@
 /*
-    Text detection model: https://github.com/argman/EAST
-    Download link: https://www.dropbox.com/s/r2ingd0l3zt8hxs/frozen_east_text_detection.tar.gz?dl=1
+    Text detection model (EAST): https://github.com/argman/EAST
+    Download link for EAST model: https://www.dropbox.com/s/r2ingd0l3zt8hxs/frozen_east_text_detection.tar.gz?dl=1
 
-    Text recognition models can be downloaded directly here:
+    DB detector model:
+    https://drive.google.com/uc?export=download&id=17_ABp79PlFt9yPCxSaarVc_DKTmrSGGf
```

Review comment:
Why `frame2` is required?
**File:** samples/dnn/models.yml
**Change Type:** modified
**Context:** PR #25326: Improved and refactored text detection sample in dnn module
**Review Line:** 312

**Code Changes:**
```diff
+  width: 736
+  height: 736
+  rgb: false
+  sample: "text_detection"
+
+East:
+  load_info:
+    url: "https://www.dropbox.com/s/r2ingd0l3zt8hxs/frozen_east_text_detection.tar.gz?dl=1"
+    sha1: "fffabf5ac36f37bddf68e34e84b45f5c4247ed06"
+    download_name: "frozen_east_text_detection.tar.gz"
+    download_sha: "3ca8233d6edd748f7ed23246c8ca24cbf696bb94"
```

Review comment:
Exception: Hash mismatch: expected fffabf5ac36f37bddf68e34e84b45f5c4247ed06 vs actual of 3ca8233d6edd748f7ed23246c8ca24cbf696bb94
**File:** samples/dnn/text_detection.cpp
**Change Type:** modified
**Context:** PR #25326: Improved and refactored text detection sample in dnn module

**Code Changes:**
```diff
@@ -1,21 +1,28 @@
 /*
-    Text detection model: https://github.com/argman/EAST
-    Download link: https://www.dropbox.com/s/r2ingd0l3zt8hxs/frozen_east_text_detection.tar.gz?dl=1
+    Text detection model (EAST): https://github.com/argman/EAST
+    Download link for EAST model: https://www.dropbox.com/s/r2ingd0l3zt8hxs/frozen_east_text_detection.tar.gz?dl=1
 
-    Text recognition models can be downloaded directly here:
+    DB detector model:
+    https://drive.google.com/uc?export=download&id=17_ABp79PlFt9yPCxSaarVc_DKTmrSGGf
```

Review comment:
There is imageTextR.png, ImageTextN.png with text left.jpg, box_in_scene.png with book covers. They are better candidates for test image.
**File:** samples/dnn/text_detection.py
**Change Type:** modified
**Context:** PR #25326: Improved and refactored text detection sample in dnn module

**Code Changes:**
```diff
@@ -1,55 +1,82 @@
 '''
-    Text detection model: https://github.com/argman/EAST
-    Download link: https://www.dropbox.com/s/r2ingd0l3zt8hxs/frozen_east_text_detection.tar.gz?dl=1
+    Text detection model (EAST): https://github.com/argman/EAST
+    Download link for EAST model: https://www.dropbox.com/s/r2ingd0l3zt8hxs/frozen_east_text_detection.tar.gz?dl=1
 
-    CRNN Text recognition model taken from here: https://github.com/meijieru/crnn.pytorch
-    How to convert from pb to onnx:
-    Using classes from here: https://github.com/meijieru/crnn.pytorch/blob/master/models/crnn.py
```

Review comment:
There is no model option in command line params
**File:** samples/dnn/text_detection.py
**Change Type:** modified
**Context:** PR #25326: Improved and refactored text detection sample in dnn module
**Review Line:** 119

**Code Changes:**
```diff
+    stdImgSize = 512
+    imgWidth = min(frame.shape[:2])
+    fontSize = (stdSize*imgWidth)/stdImgSize
+    fontThickness = max(1,(stdWeight*imgWidth)//stdImgSize)
+
+    if(args.alias == "DB"):
+        # DB Detector initialization
+        detector = cv2.dnn_TextDetectionModel_DB(args.model)
+        detector.setBinaryThreshold(args.binary_threshold)
+        detector.setPolygonThreshold(args.polygon_threshold)
+        detector.setUnclipRatio(args.unclip_ratio)
```

Review comment:
There is no alias option in command line params