nareshmlx/opencv-pr huggingface dataset:
**File:** modules/calib3d/src/calibinit.cpp
**Change Type:** modified
**Context:** PR #24546: Check Checkerboard Corners

**Code Changes:**
```diff
@@ -479,8 +479,7 @@ bool findChessboardCorners(InputArray image_, Size pattern_size,
 
     bool found = false;
 
-    const int min_dilations = 0;
-    const int max_dilations = 7;
+    const bool is_plain = (flags & CALIB_CB_PLAIN) != 0;
 
     int type = image_.type(), depth = CV_MAT_DEPTH(type), cn = CV_MAT_CN(type);
     Mat img = image_.getMat();
```

Review comment:
sorry I had not ... understood .. I put now(flags & CALIB_CB_PLAIN) != 0
**File:** modules/calib3d/src/calibinit.cpp
**Change Type:** modified
**Context:** PR #24546: Check Checkerboard Corners

**Code Changes:**
```diff
@@ -479,8 +479,7 @@ bool findChessboardCorners(InputArray image_, Size pattern_size,
 
     bool found = false;
 
-    const int min_dilations = 0;
-    const int max_dilations = 7;
+    const bool is_plain = (flags & CALIB_CB_PLAIN) != 0;
 
     int type = image_.type(), depth = CV_MAT_DEPTH(type), cn = CV_MAT_CN(type);
     Mat img = image_.getMat();
```

Review comment:
There is some unicode symbol before parenthesis: ```suggestion const bool is_plain = (flags & CALIB_CB_PLAIN) != 0; ```
**File:** modules/calib3d/src/calibinit.cpp
**Change Type:** modified
**Context:** PR #24546: Check Checkerboard Corners

**Code Changes:**
```diff
@@ -479,8 +479,7 @@ bool findChessboardCorners(InputArray image_, Size pattern_size,
 
     bool found = false;
 
-    const int min_dilations = 0;
-    const int max_dilations = 7;
+    const bool is_plain = (flags & CALIB_CB_PLAIN) != 0;
 
     int type = image_.type(), depth = CV_MAT_DEPTH(type), cn = CV_MAT_CN(type);
     Mat img = image_.getMat();
```

Review comment:
sorry about that I just push the fix
**File:** samples/cpp/videocapture_obsensor.cpp
**Change Type:** modified
**Context:** PR #24666: add support Orbbec Gemini2 and Gemini2 XL camera

**Code Changes:**
```diff
@@ -1,3 +1,7 @@
+/**
+ * attention: Astra2, Gemini2, and Gemini2L cameras currently only support Windows and Linux kernel versions no higher than 4.15, and higher versions of Linux kernel may have exceptions.
+*/
+
 #include <opencv2/videoio.hpp>
 #include <opencv2/highgui.hpp>
 #include <opencv2/imgproc.hpp>
@@ -21,6 +25,11 @@ int main()
     Mat image;
```

Review comment:
Chinese comments should be removed
**File:** samples/cpp/videocapture_obsensor.cpp
**Change Type:** modified
**Context:** PR #24666: add support Orbbec Gemini2 and Gemini2 XL camera

**Code Changes:**
```diff
@@ -1,3 +1,7 @@
+/**
+ * attention: Astra2, Gemini2, and Gemini2L cameras currently only support Windows and Linux kernel versions no higher than 4.15, and higher versions of Linux kernel may have exceptions.
+*/
+
 #include <opencv2/videoio.hpp>
 #include <opencv2/highgui.hpp>
 #include <opencv2/imgproc.hpp>
@@ -21,6 +25,11 @@ int main()
     Mat image;
```

Review comment:
The Chinese comment has been removed
**File:** CMakeLists.txt
**Change Type:** modified
**Context:** PR #24666: add support Orbbec Gemini2 and Gemini2 XL camera

**Code Changes:**
```diff
@@ -5,7 +5,6 @@
 #      $ cmake <PATH_TO_OPENCV_ROOT>
 #
 # ----------------------------------------------------------------------------
-
 # Disable in-source builds to prevent source tree corruption.
 if(" ${CMAKE_SOURCE_DIR}" STREQUAL " ${CMAKE_BINARY_DIR}")
   message(FATAL_ERROR "
@@ -468,6 +467,7 @@ OCV_OPTION(WITH_ONNX "Include Microsoft ONNX Runtime support" OFF
 OCV_OPTION(WITH_TIMVX "Include Tim-VX support" OFF
```

Review comment:
The statement about kernel version is not clear. Do you mean, that camera requires kernel 4.15 or older? Please add reference to the camera documentation, ticket or whatever to track support status.
**File:** modules/videoio/include/opencv2/videoio.hpp
**Change Type:** modified
**Context:** PR #24666: add support Orbbec Gemini2 and Gemini2 XL camera

**Code Changes:**
```diff
@@ -128,7 +128,7 @@ enum VideoCaptureAPIs {
        CAP_INTEL_MFX    = 2300,         //!< Intel MediaSDK
        CAP_XINE         = 2400,         //!< XINE engine (Linux)
        CAP_UEYE         = 2500,         //!< uEye Camera API
-       CAP_OBSENSOR     = 2600,         //!< For Orbbec 3D-Sensor device/module (Astra+, Femto)
+       CAP_OBSENSOR     = 2600,         //!< For Orbbec 3D-Sensor device/module (Astra+, Femto, Astra2, Gemini2, Gemini2L, Gemini2XL, Femto Mega) attention: Astra2, Gemini2, and Gemini2L cameras currently only support Windows and Linux kernel versions no higher than 4.15, and higher versions of Linux kernel may have exceptions.
      };
 
 
```

Review comment:
I have resolved this issue.
**File:** cmake/OpenCVCompilerOptimizations.cmake
**Change Type:** modified
**Context:** PR #24642: build: merge multiple features specified at once

**Code Changes:**
```diff
@@ -353,7 +353,7 @@ elseif(ARM OR AARCH64)
     ocv_update(CPU_NEON_DOTPROD_IMPLIES "NEON")
     ocv_update(CPU_NEON_FP16_FLAGS_ON "-march=armv8.2-a+fp16")
     ocv_update(CPU_NEON_FP16_IMPLIES "NEON")
-    ocv_update(CPU_NEON_BF16_FLAGS_ON "-march=armv8.2-a+fp16+bf16")
+    ocv_update(CPU_NEON_BF16_FLAGS_ON "-march=armv8.2-a+bf16")
     ocv_update(CPU_NEON_BF16_IMPLIES "NEON")
     set(CPU_BASELINE "NEON;FP16" CACHE STRING "${HELP_CPU_BASELINE}")
     set(CPU_DISPATCH "NEON_FP16;NEON_BF16;NEON_DOTPROD" CACHE STRING "${HELP_CPU_DISPATCH}")
@@ -480,6 +480,23 @@ macro(ocv_check_compiler_optimization OPT)
```

Review comment:
`ocv_cpu_aarch64_baseline_` prefix
**File:** modules/calib3d/src/calibinit.cpp
**Change Type:** modified
**Context:** PR #24702: Empty vectors before filling them in ChessBoardDetector::processQuads
**Review Line:** 1941

**Code Changes:**
```diff
     for (int k = 0; k < 4; ++k)
@@ -1937,6 +1938,7 @@ bool ChessBoardDetector::processQuads(std::vector<cv::Point2f>& out_corners, int
         if (count > 0 || (-count > (int)out_corners.size()))
         {
             // copy corners to output array
+            out_corners.clear();
             out_corners.reserve(n);
             for (int i = 0; i < n; ++i)
                 out_corners.push_back(corner_group[i]->pt);
```

Review comment:
There is `out_corners.resize(0);` at the function beginning (line 1886). M.b. it should be replaced with clear() call and the condition may be reduced.
**File:** modules/calib3d/src/calibinit.cpp
**Change Type:** modified
**Context:** PR #24702: Empty vectors before filling them in ChessBoardDetector::processQuads
**Review Line:** 1941

**Code Changes:**
```diff
     for (int k = 0; k < 4; ++k)
@@ -1937,6 +1938,7 @@ bool ChessBoardDetector::processQuads(std::vector<cv::Point2f>& out_corners, int
         if (count > 0 || (-count > (int)out_corners.size()))
         {
             // copy corners to output array
+            out_corners.clear();
             out_corners.reserve(n);
             for (int i = 0; i < n; ++i)
                 out_corners.push_back(corner_group[i]->pt);
```

Review comment:
Right, there is one line 1886 but what if you enter this block (1938 to 1951), fill out_corners and actually fail the condition like 1946? You then can push_back again in the next loop iteration (from loop at 1899) while `out_corners` has not been cleared.
**File:** cmake/FindONNX.cmake
**Change Type:** modified
**Context:** PR #24601: Fix path to ONNX Runtime include folder
**Review Line:** 15

**Code Changes:**
```diff
@@ -11,7 +11,9 @@ if(ONNXRT_ROOT_DIR)
   find_library(ORT_LIB onnxruntime
     ${ONNXRT_ROOT_DIR}/lib
     CMAKE_FIND_ROOT_PATH_BOTH)
+  # The location of headers varies across different versions of ONNX Runtime
   find_path(ORT_INCLUDE onnxruntime_cxx_api.h
+    ${ONNXRT_ROOT_DIR}/include/onnxruntime/
     ${ONNXRT_ROOT_DIR}/include/onnxruntime/core/session
     CMAKE_FIND_ROOT_PATH_BOTH)
 endif()
```

Review comment:
I think it make sense to hold both path if it's possible...
**File:** cmake/FindONNX.cmake
**Change Type:** modified
**Context:** PR #24601: Fix path to ONNX Runtime include folder
**Review Line:** 15

**Code Changes:**
```diff
@@ -11,7 +11,9 @@ if(ONNXRT_ROOT_DIR)
   find_library(ORT_LIB onnxruntime
     ${ONNXRT_ROOT_DIR}/lib
     CMAKE_FIND_ROOT_PATH_BOTH)
+  # The location of headers varies across different versions of ONNX Runtime
   find_path(ORT_INCLUDE onnxruntime_cxx_api.h
+    ${ONNXRT_ROOT_DIR}/include/onnxruntime/
     ${ONNXRT_ROOT_DIR}/include/onnxruntime/core/session
     CMAKE_FIND_ROOT_PATH_BOTH)
 endif()
```

Review comment:
Would it break compatibility with older ONNX RT versions we currently support? Does it make sense to keep both paths?
**File:** cmake/FindONNX.cmake
**Change Type:** modified
**Context:** PR #24601: Fix path to ONNX Runtime include folder
**Review Line:** 15

**Code Changes:**
```diff
@@ -11,7 +11,9 @@ if(ONNXRT_ROOT_DIR)
   find_library(ORT_LIB onnxruntime
     ${ONNXRT_ROOT_DIR}/lib
     CMAKE_FIND_ROOT_PATH_BOTH)
+  # The location of headers varies across different versions of ONNX Runtime
   find_path(ORT_INCLUDE onnxruntime_cxx_api.h
+    ${ONNXRT_ROOT_DIR}/include/onnxruntime/
     ${ONNXRT_ROOT_DIR}/include/onnxruntime/core/session
     CMAKE_FIND_ROOT_PATH_BOTH)
 endif()
```

Review comment:
Yes,, that's exactly my point
**File:** cmake/FindONNX.cmake
**Change Type:** modified
**Context:** PR #24601: Fix path to ONNX Runtime include folder
**Review Line:** 15

**Code Changes:**
```diff
@@ -11,7 +11,9 @@ if(ONNXRT_ROOT_DIR)
   find_library(ORT_LIB onnxruntime
     ${ONNXRT_ROOT_DIR}/lib
     CMAKE_FIND_ROOT_PATH_BOTH)
+  # The location of headers varies across different versions of ONNX Runtime
   find_path(ORT_INCLUDE onnxruntime_cxx_api.h
+    ${ONNXRT_ROOT_DIR}/include/onnxruntime/
     ${ONNXRT_ROOT_DIR}/include/onnxruntime/core/session
     CMAKE_FIND_ROOT_PATH_BOTH)
 endif()
```

Review comment:
Comment in file would help further generations understand why we need both
**File:** cmake/FindONNX.cmake
**Change Type:** modified
**Context:** PR #24601: Fix path to ONNX Runtime include folder

**Code Changes:**
```diff
@@ -11,7 +11,9 @@ if(ONNXRT_ROOT_DIR)
   find_library(ORT_LIB onnxruntime
     ${ONNXRT_ROOT_DIR}/lib
     CMAKE_FIND_ROOT_PATH_BOTH)
+  # The location of headers varies across different versions of ONNX Runtime
   find_path(ORT_INCLUDE onnxruntime_cxx_api.h
+    ${ONNXRT_ROOT_DIR}/include/onnxruntime/
     ${ONNXRT_ROOT_DIR}/include/onnxruntime/core/session
     CMAKE_FIND_ROOT_PATH_BOTH)
 endif()
```

Review comment:
We should not force C++14 unconditionally. E.g, if there is already request for C++17 from the user. It is better to emit warning similar to OpenCVFindProtobuf.cmake
**File:** cmake/FindONNX.cmake
**Change Type:** modified
**Context:** PR #24601: Fix path to ONNX Runtime include folder

**Code Changes:**
```diff
@@ -11,7 +11,9 @@ if(ONNXRT_ROOT_DIR)
   find_library(ORT_LIB onnxruntime
     ${ONNXRT_ROOT_DIR}/lib
     CMAKE_FIND_ROOT_PATH_BOTH)
+  # The location of headers varies across different versions of ONNX Runtime
   find_path(ORT_INCLUDE onnxruntime_cxx_api.h
+    ${ONNXRT_ROOT_DIR}/include/onnxruntime/
     ${ONNXRT_ROOT_DIR}/include/onnxruntime/core/session
     CMAKE_FIND_ROOT_PATH_BOTH)
 endif()
```

Review comment:
https://github.com/opencv/opencv/pull/24372
**File:** cmake/FindONNX.cmake
**Change Type:** modified
**Context:** PR #24601: Fix path to ONNX Runtime include folder

**Code Changes:**
```diff
@@ -11,7 +11,9 @@ if(ONNXRT_ROOT_DIR)
   find_library(ORT_LIB onnxruntime
     ${ONNXRT_ROOT_DIR}/lib
     CMAKE_FIND_ROOT_PATH_BOTH)
+  # The location of headers varies across different versions of ONNX Runtime
   find_path(ORT_INCLUDE onnxruntime_cxx_api.h
+    ${ONNXRT_ROOT_DIR}/include/onnxruntime/
     ${ONNXRT_ROOT_DIR}/include/onnxruntime/core/session
     CMAKE_FIND_ROOT_PATH_BOTH)
 endif()
```

Review comment:
Looking at [this](https://github.com/Kumataro/opencv/blob/17fe2b40d5b74a1de4f88e7f03487d9e846d6a76/cmake/OpenCVFindProtobuf.cmake#L82-L84) - `CMAKE_CXX_STANDARD` will be always `11` at this point, because of [this](https://github.com/opencv/opencv/blob/4.x/cmake/OpenCVDetectCXXCompiler.cmake#L219-L220) My point is even though I use compiler with `c++17` support I see in build summary that opencv detected only `C++11` is it forced somewhere? And how in this case user can change that?
**File:** modules/dnn/src/onnx/onnx_importer.cpp
**Change Type:** modified
**Context:** PR #24613: Make default axis of softmax in onnx "-1" without opset option - Try to solve problem: https://github.com/opencv/opencv/pull/24476#discussi...
**Review Line:** 2794

**Code Changes:**
```diff
-        axis = layerParams.get<int>("axis", -1);
-    } else {
+    if (onnx_opset != 0 && onnx_opset <= 11) {
         axis = layerParams.get<int>("axis", 1);
+    } else {
+        axis = layerParams.get<int>("axis", -1);
     }
     layerParams.set<int>("axis", axis);
     layerParams.type = "Softmax";
@@ -3962,7 +3962,7 @@ void ONNXImporter::buildDispatchMap_ONNX_AI(int opset_version)
     dispatch["Concat"] = &ONNXImporter::parseConcat;
```

Review comment:
Is it possible to make the one in `SoftmaxLayerImpl` to be `-1`?
**File:** modules/dnn/src/onnx/onnx_importer.cpp
**Change Type:** modified
**Context:** PR #24613: Make default axis of softmax in onnx "-1" without opset option - Try to solve problem: https://github.com/opencv/opencv/pull/24476#discussi...
**Review Line:** 2791

**Code Changes:**
```diff
     const std::string& layer_type = node_proto.op_type();
     int axis;
-    if (layerParams.has("opset") && layerParams.get<int>("opset") > 11) {
-        axis = layerParams.get<int>("axis", -1);
-    } else {
+    if (onnx_opset != 0 && onnx_opset <= 11) {
         axis = layerParams.get<int>("axis", 1);
+    } else {
+        axis = layerParams.get<int>("axis", -1);
     }
     layerParams.set<int>("axis", axis);
```

Review comment:
Should we update `parseQSoftmax` too? (may be in a separate PR?)
**File:** modules/dnn/src/layers/softmax_layer.cpp
**Change Type:** modified
**Context:** PR #24613: Make default axis of softmax in onnx "-1" without opset option - Try to solve problem: https://github.com/opencv/opencv/pull/24476#discussi...
**Review Line:** 79

**Code Changes:**
```diff
@@ -76,7 +76,7 @@ class SoftMaxLayerImpl CV_FINAL : public SoftmaxLayer
 
     SoftMaxLayerImpl(const LayerParams& params)
     {
-        axisRaw = params.get<int>("axis", 1);
+        axisRaw = params.get<int>("axis", -1);
         logSoftMax = params.get<bool>("log_softmax", false);
         setParamsFrom(params);
     }
```

Review comment:
`axisRaw` should be normalize in `finalize` to avoid negative value.
**File:** modules/dnn/src/layers/softmax_layer.cpp
**Change Type:** modified
**Context:** PR #24613: Make default axis of softmax in onnx "-1" without opset option - Try to solve problem: https://github.com/opencv/opencv/pull/24476#discussi...
**Review Line:** 79

**Code Changes:**
```diff
@@ -76,7 +76,7 @@ class SoftMaxLayerImpl CV_FINAL : public SoftmaxLayer
 
     SoftMaxLayerImpl(const LayerParams& params)
     {
-        axisRaw = params.get<int>("axis", 1);
+        axisRaw = params.get<int>("axis", -1);
         logSoftMax = params.get<bool>("log_softmax", false);
         setParamsFrom(params);
     }
```

Review comment:
`axisRaw` was defined here before, and I can move it to `finalize` if necessary
**File:** modules/dnn/src/layers/softmax_layer.cpp
**Change Type:** modified
**Context:** PR #24613: Make default axis of softmax in onnx "-1" without opset option - Try to solve problem: https://github.com/opencv/opencv/pull/24476#discussi...
**Review Line:** 79

**Code Changes:**
```diff
@@ -76,7 +76,7 @@ class SoftMaxLayerImpl CV_FINAL : public SoftmaxLayer
 
     SoftMaxLayerImpl(const LayerParams& params)
     {
-        axisRaw = params.get<int>("axis", 1);
+        axisRaw = params.get<int>("axis", -1);
         logSoftMax = params.get<bool>("log_softmax", false);
         setParamsFrom(params);
     }
```

Review comment:
No, I mean `axisRaw` get its value here but normalize in `finalize()`. However, if the softmax kernel `softmax()` and `logSoftmax()` supports negative axis, it is fine.
**File:** modules/dnn/src/layers/softmax_layer.cpp
**Change Type:** modified
**Context:** PR #24613: Make default axis of softmax in onnx "-1" without opset option - Try to solve problem: https://github.com/opencv/opencv/pull/24476#discussi...
**Review Line:** 79

**Code Changes:**
```diff
@@ -76,7 +76,7 @@ class SoftMaxLayerImpl CV_FINAL : public SoftmaxLayer
 
     SoftMaxLayerImpl(const LayerParams& params)
     {
-        axisRaw = params.get<int>("axis", 1);
+        axisRaw = params.get<int>("axis", -1);
         logSoftMax = params.get<bool>("log_softmax", false);
         setParamsFrom(params);
     }
```

Review comment:
Yes, kernel will normalize axis again.
**File:** modules/dnn/src/onnx/onnx_importer.cpp
**Change Type:** modified
**Context:** PR #24613: Make default axis of softmax in onnx "-1" without opset option - Try to solve problem: https://github.com/opencv/opencv/pull/24476#discussi...
**Review Line:** 2791

**Code Changes:**
```diff
     const std::string& layer_type = node_proto.op_type();
     int axis;
-    if (layerParams.has("opset") && layerParams.get<int>("opset") > 11) {
-        axis = layerParams.get<int>("axis", -1);
-    } else {
+    if (onnx_opset != 0 && onnx_opset <= 11) {
         axis = layerParams.get<int>("axis", 1);
+    } else {
+        axis = layerParams.get<int>("axis", -1);
     }
     layerParams.set<int>("axis", axis);
```

Review comment:
Let me try to change it in QSoftmax
**File:** modules/dnn/src/onnx/onnx_importer.cpp
**Change Type:** modified
**Context:** PR #24613: Make default axis of softmax in onnx "-1" without opset option - Try to solve problem: https://github.com/opencv/opencv/pull/24476#discussi...
**Review Line:** 2791

**Code Changes:**
```diff
     const std::string& layer_type = node_proto.op_type();
     int axis;
-    if (layerParams.has("opset") && layerParams.get<int>("opset") > 11) {
-        axis = layerParams.get<int>("axis", -1);
-    } else {
+    if (onnx_opset != 0 && onnx_opset <= 11) {
         axis = layerParams.get<int>("axis", 1);
+    } else {
+        axis = layerParams.get<int>("axis", -1);
     }
     layerParams.set<int>("axis", axis);
```

Review comment:
Please create dedicated PR for parseQSoftmax.
**File:** modules/gapi/include/opencv2/gapi/infer/onnx.hpp
**Change Type:** modified
**Context:** PR #24068: G-API: Support CoreML Execution Providers for ONNXRT Backend

**Code Changes:**
```diff
@@ -32,6 +32,65 @@ namespace onnx {
  */
 namespace ep {
 
+/**
+ * @brief This structure provides functions
+ * that fill inference options for ONNX CoreML Execution Provider.
+ * Please follow https://onnxruntime.ai/docs/execution-providers/CoreML-ExecutionProvider.html#coreml-execution-provider
+ */
+struct GAPI_EXPORTS_W_SIMPLE CoreML {
```

Review comment:
`CoreML`
**File:** doc/tutorials/dnn/dnn_android/dnn_android.markdown
**Change Type:** modified
**Context:** PR #24680: Update Android mobilenet tutorial

**Code Changes:**
```diff
@@ -1,107 +1 @@
-# How to run deep networks on Android device {#tutorial_dnn_android}
-
-@tableofcontents
-
-@prev_tutorial{tutorial_dnn_openvino}
-@next_tutorial{tutorial_dnn_yolo}
-
-|    |    |
-| -: | :- |
```

Review comment:
Please add reference to previous pages rather than external video.
**File:** doc/tutorials/dnn/dnn_android/dnn_android.markdown
**Change Type:** modified
**Context:** PR #24680: Update Android mobilenet tutorial

**Code Changes:**
```diff
@@ -1,107 +1 @@
-# How to run deep networks on Android device {#tutorial_dnn_android}
-
-@tableofcontents
-
-@prev_tutorial{tutorial_dnn_openvino}
-@next_tutorial{tutorial_dnn_yolo}
-
-|    |    |
-| -: | :- |
```

Review comment:
Please add details on model loading and in-memory parsing. It's not popular for desktop apps. I propose to use more focused code snippets for it.
**File:** doc/tutorials/dnn/dnn_android/dnn_android.markdown
**Change Type:** modified
**Context:** PR #24680: Update Android mobilenet tutorial

**Code Changes:**
```diff
@@ -1,107 +1 @@
-# How to run deep networks on Android device {#tutorial_dnn_android}
-
-@tableofcontents
-
-@prev_tutorial{tutorial_dnn_openvino}
-@next_tutorial{tutorial_dnn_yolo}
-
-|    |    |
-| -: | :- |
```

Review comment:
I recommend to use 4.9.0. It's the first release version.
**File:** doc/tutorials/dnn/dnn_android/dnn_android.markdown
**Change Type:** modified
**Context:** PR #24680: Update Android mobilenet tutorial

**Code Changes:**
```diff
@@ -1,107 +1 @@
-# How to run deep networks on Android device {#tutorial_dnn_android}
-
-@tableofcontents
-
-@prev_tutorial{tutorial_dnn_openvino}
-@next_tutorial{tutorial_dnn_yolo}
-
-|    |    |
-| -: | :- |
```

Review comment:
added ![image](https://github.com/opencv/opencv/assets/22337800/cf1ac47c-cf15-4616-ad43-c3f7d0bb4a5c)
**File:** doc/tutorials/dnn/dnn_android/dnn_android.markdown
**Change Type:** modified
**Context:** PR #24680: Update Android mobilenet tutorial

**Code Changes:**
```diff
@@ -1,107 +1 @@
-# How to run deep networks on Android device {#tutorial_dnn_android}
-
-@tableofcontents
-
-@prev_tutorial{tutorial_dnn_openvino}
-@next_tutorial{tutorial_dnn_yolo}
-
-|    |    |
-| -: | :- |
```

Review comment:
added ![image](https://github.com/opencv/opencv/assets/22337800/31a1e88f-08a7-48a7-8f0c-7df7cf76401c)
**File:** platforms/android/build_sdk.py
**Change Type:** modified
**Context:** PR #24592: Android sample for VideoWriter

**Code Changes:**
```diff
@@ -215,7 +215,7 @@ def clean_library_build_dir(self):
         for d in ["CMakeCache.txt", "CMakeFiles/", "bin/", "libs/", "lib/", "package/", "install/samples/"]:
             rm_one(d)
 
-    def build_library(self, abi, do_install):
+    def build_library(self, abi, do_install, no_media_ndk):
         cmd = [self.cmake_path, "-GNinja"]
         cmake_vars = dict(
             CMAKE_TOOLCHAIN_FILE=self.get_toolchain_file(),
@@ -260,6 +260,9 @@ def build_library(self, abi, do_install):
```

Review comment:
I propose to enable media_ndk by default and invert the option. Current target supports what we want by default.
**File:** samples/android/CMakeLists.txt
**Change Type:** modified
**Context:** PR #24592: Android sample for VideoWriter

**Code Changes:**
```diff
@@ -13,6 +13,7 @@ add_subdirectory(image-manipulations)
 add_subdirectory(camera-calibration)
 add_subdirectory(color-blob-detection)
 add_subdirectory(mobilenet-objdetect)
+add_subdirectory(video-recorder)
 add_subdirectory(tutorial-1-camerapreview)
 add_subdirectory(tutorial-2-mixedprocessing)
 add_subdirectory(tutorial-3-cameracontrol)
```

Review comment:
`video-recorder`
**File:** samples/android/video-recorder/src/org/opencv/samples/recorder/RecorderActivity.java
**Change Type:** added
**Context:** PR #24592: Android sample for VideoWriter

**Code Changes:**
```diff
@@ -0,0 +1,340 @@
+package org.opencv.samples.recorder;
+
+import org.opencv.android.CameraActivity;
+import org.opencv.android.CameraBridgeViewBase.CvCameraViewFrame;
+import org.opencv.android.OpenCVLoader;
+import org.opencv.android.Utils;
+import org.opencv.core.Mat;
+import org.opencv.core.Size;
+import org.opencv.imgproc.Imgproc;
```

Review comment:
It leads to memory leak. GC does not know about native part. Please make the variable class-wide and not re-create each time.
**File:** samples/android/video-recorder/src/org/opencv/samples/recorder/RecorderActivity.java
**Change Type:** added
**Context:** PR #24592: Android sample for VideoWriter

**Code Changes:**
```diff
@@ -0,0 +1,340 @@
+package org.opencv.samples.recorder;
+
+import org.opencv.android.CameraActivity;
+import org.opencv.android.CameraBridgeViewBase.CvCameraViewFrame;
+import org.opencv.android.OpenCVLoader;
+import org.opencv.android.Utils;
+import org.opencv.core.Mat;
+import org.opencv.core.Size;
+import org.opencv.imgproc.Imgproc;
```

Review comment:
The same issue with memory leak.