nareshmlx/opencv-pr huggingface dataset:
**File:** modules/ts/src/ts_tags.cpp
**Change Type:** modified
**Context:** PR #27360: Added extra test tag for Qualcomm DSP (disabled by default)
**Review Line:** 58

**Code Changes:**
```diff
@@ -55,6 +55,7 @@ static std::vector<std::string>& getTestTagsSkipList()
 #if defined(_DEBUG)
         testSkipWithTags.push_back(CV_TEST_TAG_DEBUG_VERYLONG);
 #endif
+        testSkipWithTags.push_back(CV_TEST_TAG_DSP);
         initialized = true;
     }
     return testSkipWithTags;
```

Review comment:
This is "skip list". It should not contain target device by default. Also tags of external tests could by filtered in / filtered out through command-line parameters. So we don't need this patch.
**File:** modules/ts/src/ts_tags.cpp
**Change Type:** modified
**Context:** PR #27360: Added extra test tag for Qualcomm DSP (disabled by default)
**Review Line:** 58

**Code Changes:**
```diff
@@ -55,6 +55,7 @@ static std::vector<std::string>& getTestTagsSkipList()
 #if defined(_DEBUG)
         testSkipWithTags.push_back(CV_TEST_TAG_DEBUG_VERYLONG);
 #endif
+        testSkipWithTags.push_back(CV_TEST_TAG_DSP);
         initialized = true;
     }
     return testSkipWithTags;
```

Review comment:
I want the test to be disabled by default. DSP is available not in all Qualcomm chipsets. We do not have reliable way to check it till initialize FastCV API. What is alternative then? BTW, there is CV_TEST_TAG_OPENCL.
**File:** modules/imgproc/include/opencv2/imgproc.hpp
**Change Type:** modified
**Context:** PR #27631: Added Rect2f support to Subdiv2D class

**Code Changes:**
```diff
@@ -1112,13 +1112,27 @@ class CV_EXPORTS_W Subdiv2D
      */
     CV_WRAP Subdiv2D(Rect rect);
 
-    /** @brief Creates a new empty Delaunay subdivision
+    /** @overload */
+    CV_WRAP Subdiv2D(Rect2f rect);
+
+    /** @overload
+
```

Review comment:
It's not correct. The rectangle coordinates are integer, but the further computation is done in floats.
**File:** modules/imgcodecs/src/loadsave.cpp
**Change Type:** modified
**Context:** PR #17753: imquery() and overloaded imread() functions

**Code Changes:**
```diff
@@ -218,10 +218,11 @@ ImageCodecInitializer& getCodecs()
  * Find the decoders
  *
  * @param[in] filename File to search
+ * @param[out] result_code. See cv::ImreadResults
  *
  * @return Image decoder to parse image file.
 */
-static ImageDecoder findDecoder( const String& filename ) {
+static ImageDecoder findDecoder( const String& filename, int& result_code ) {
```

Review comment:
Here is the correct way to implement this function: ``` if (image.kind() == _InputArray::MAT) { Mat& img = image.getMatRef(); return imread_(filename, flags, img, index); } else { Mat img; int ret = imread_(filename, flags, img, index); if (ret == IMREAD_SUCCESS) img.copyTo(image); return ret; } ```
**File:** modules/imgcodecs/src/loadsave.cpp
**Change Type:** modified
**Context:** PR #17753: imquery() and overloaded imread() functions

**Code Changes:**
```diff
@@ -218,10 +218,11 @@ ImageCodecInitializer& getCodecs()
  * Find the decoders
  *
  * @param[in] filename File to search
+ * @param[out] result_code. See cv::ImreadResults
  *
  * @return Image decoder to parse image file.
 */
-static ImageDecoder findDecoder( const String& filename ) {
+static ImageDecoder findDecoder( const String& filename, int& result_code ) {
```

Review comment:
mats shoud not be empty before calling this function
**File:** modules/imgcodecs/src/loadsave.cpp
**Change Type:** modified
**Context:** PR #17753: imquery() and overloaded imread() functions
**Review Line:** 643

**Code Changes:**
```diff
+        {
+            counter++;
+            mats.push_back(page);
+        }
+    }
+    return counter == count;
 }
 
 size_t imcount(const String& filename, int flags)
 {
     CV_TRACE_FUNCTION();
```

Review comment:
If we asked for more images than multipage page count and we successfully read existing images should this be false ?
**File:** 3rdparty/fastcv/include/fastcv_hal_core.hpp
**Change Type:** modified
**Context:** PR #27210: Add SVDf32 support in FastCV HAL
**Review Line:** 226

**Code Changes:**
```diff
@@ -219,4 +222,32 @@ int fastcv_hal_mul32f(
     int             height,
     double          scale);
 
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+/// Performs singular value decomposition of MxN matrix A=U∗Σ∗V^T.
+///
+/// @param src      Pointer to input MxN matrix A stored in column major order.
+///                 After finish of work src will be filled with rows of U or not modified (depends of flag CV_HAL_SVD_MODIFY_A).
+/// @param src_step Number of bytes between two consequent columns of matrix A.
+/// @param w        Pointer to array for singular values of matrix A (i. e. first N diagonal elements of matrix Σ).
```

Review comment:
Please do not use non-ASCI symbols. They case troubles with some tools.
**File:** modules/imgproc/src/color_hsv.dispatch.cpp
**Change Type:** modified
**Context:** PR #24444: fix race condition in oclCvtColorBGR2HSV (color_hsv.dispatch.cpp) by using a mutex

**Code Changes:**
```diff
@@ -10,6 +10,7 @@
 
 #include "color_hsv.simd.hpp"
 #include "color_hsv.simd_declarations.hpp" // defines CV_CPU_DISPATCH_MODES_ALL=AVX2,...,BASELINE based on CMakeLists.txt content
+#include <atomic>
 
 namespace cv {
 
@@ -274,38 +275,45 @@ bool oclCvtColorBGR2HSV( InputArray _src, OutputArray _dst, int bidx, bool full
 
```

Review comment:
Lets try to apply `thread_local` for `UMat` variables only. No need to touch other tables (there is no problem with them). Use dedicated `initializedUMat` for that.
**File:** modules/imgproc/src/color_hsv.dispatch.cpp
**Change Type:** modified
**Context:** PR #24444: fix race condition in oclCvtColorBGR2HSV (color_hsv.dispatch.cpp) by using a mutex

**Code Changes:**
```diff
@@ -10,6 +10,7 @@
 
 #include "color_hsv.simd.hpp"
 #include "color_hsv.simd_declarations.hpp" // defines CV_CPU_DISPATCH_MODES_ALL=AVX2,...,BASELINE based on CMakeLists.txt content
+#include <atomic>
 
 namespace cv {
 
@@ -274,38 +275,45 @@ bool oclCvtColorBGR2HSV( InputArray _src, OutputArray _dst, int bidx, bool full
 
```

Review comment:
> initializedUMat I am not sure what you mean by the last part
**File:** modules/imgproc/src/color_hsv.dispatch.cpp
**Change Type:** modified
**Context:** PR #24444: fix race condition in oclCvtColorBGR2HSV (color_hsv.dispatch.cpp) by using a mutex

**Code Changes:**
```diff
@@ -10,6 +10,7 @@
 
 #include "color_hsv.simd.hpp"
 #include "color_hsv.simd_declarations.hpp" // defines CV_CPU_DISPATCH_MODES_ALL=AVX2,...,BASELINE based on CMakeLists.txt content
+#include <atomic>
 
 namespace cv {
 
@@ -274,38 +275,45 @@ bool oclCvtColorBGR2HSV( InputArray _src, OutputArray _dst, int bidx, bool full
 
```

Review comment:
Split initialization on 2 parts: - regular CPU buffers (like `int sdiv_table[256];`) - they don't need `thread-local` at all. - OpenCL related stuff which causes problems and needs thread-local variables (also put it under condition that this data is really needed - CPU-only processing doesn't need that at all).
**File:** modules/imgproc/src/color_hsv.dispatch.cpp
**Change Type:** modified
**Context:** PR #24444: fix race condition in oclCvtColorBGR2HSV (color_hsv.dispatch.cpp) by using a mutex

**Code Changes:**
```diff
@@ -10,6 +10,7 @@
 
 #include "color_hsv.simd.hpp"
 #include "color_hsv.simd_declarations.hpp" // defines CV_CPU_DISPATCH_MODES_ALL=AVX2,...,BASELINE based on CMakeLists.txt content
+#include <atomic>
 
 namespace cv {
 
@@ -274,38 +275,45 @@ bool oclCvtColorBGR2HSV( InputArray _src, OutputArray _dst, int bidx, bool full
 
```

Review comment:
probably, even better solution would be to merge all 3 tables together (of course, 3 pointers can be initialized to point to different parts of the joint table) and then we can convert it to UMat on-fly: ``` int rgb2hsv_tab[256*3]; volatile bool rgb2hsv_initialized = false; if (!rgb2hsv_initialized) { ... } if (use_opencl) { UMat rgb2hsv_utab = Mat(1, 256*3, CV_32S, rgb2hsv_tab).getUMat(); ... // run opencl kernel with rgb2hsv_utab as one of the parameters } ``` yes, it means extra copy, but compared to the processed data it should be a tiny overhead, and much easier to handle than static thread-local UMat's.
**File:** modules/imgproc/src/color_hsv.dispatch.cpp
**Change Type:** modified
**Context:** PR #24444: fix race condition in oclCvtColorBGR2HSV (color_hsv.dispatch.cpp) by using a mutex

**Code Changes:**
```diff
@@ -10,6 +10,7 @@
 
 #include "color_hsv.simd.hpp"
 #include "color_hsv.simd_declarations.hpp" // defines CV_CPU_DISPATCH_MODES_ALL=AVX2,...,BASELINE based on CMakeLists.txt content
+#include <atomic>
 
 namespace cv {
 
@@ -274,38 +275,45 @@ bool oclCvtColorBGR2HSV( InputArray _src, OutputArray _dst, int bidx, bool full
 
```

Review comment:
I'm not experienced enough to say the roundtrip-lateny will be more than we'd like, but it think so. But I like the safety and simplicity of your approach, so I guess I'll profile it.
**File:** modules/imgproc/src/color_hsv.dispatch.cpp
**Change Type:** modified
**Context:** PR #24444: fix race condition in oclCvtColorBGR2HSV (color_hsv.dispatch.cpp) by using a mutex

**Code Changes:**
```diff
@@ -10,6 +10,7 @@
 
 #include "color_hsv.simd.hpp"
 #include "color_hsv.simd_declarations.hpp" // defines CV_CPU_DISPATCH_MODES_ALL=AVX2,...,BASELINE based on CMakeLists.txt content
+#include <atomic>
 
 namespace cv {
 
@@ -274,38 +275,45 @@ bool oclCvtColorBGR2HSV( InputArray _src, OutputArray _dst, int bidx, bool full
 
```

Review comment:
> probably, even better solution would be to merge all 3 tables together (of course, 3 pointers can be initialized to point to different parts of the joint table) and then we can convert it to UMat on-fly: > > ``` > int rgb2hsv_tab[256*3]; > volatile bool rgb2hsv_initialized = false; > if (!rgb2hsv_initialized) { ... } > if (use_opencl) { > UMat rgb2hsv_utab = Mat(1, 256*3, CV_32S, rgb2hsv_tab).getUMat(); > ... // run opencl kernel with rgb2hsv_utab as one of the parameters > } > ``` > > yes, it means extra copy, but compared to the processed data it should be a tiny overhead, and much easier to handle than static thread-local UMat's. also... we are in oclCvtColorBGR2HSV which is "guarded" by CV_OCL_RUN. so i guess i can drop ```if (use_opencl)```
**File:** modules/imgproc/src/color_hsv.dispatch.cpp
**Change Type:** modified
**Context:** PR #24444: fix race condition in oclCvtColorBGR2HSV (color_hsv.dispatch.cpp) by using a mutex

**Code Changes:**
```diff
@@ -10,6 +10,7 @@
 
 #include "color_hsv.simd.hpp"
 #include "color_hsv.simd_declarations.hpp" // defines CV_CPU_DISPATCH_MODES_ALL=AVX2,...,BASELINE based on CMakeLists.txt content
+#include <atomic>
 
 namespace cv {
 
@@ -274,38 +275,45 @@ bool oclCvtColorBGR2HSV( InputArray _src, OutputArray _dst, int bidx, bool full
 
```

Review comment:
I neither like unecessary round-trips nor messing with the memory model, so i came up with this: ```c++ if(_src.depth() == CV_8U) { static std::mutex mtx; { std::unique_lock<std::mutex> lock(mtx); static UMat sdiv_data; static UMat hdiv_data180; static UMat hdiv_data256; static int combined_table[256]; static volatile bool initialized180 = false, initialized256 = false; static volatile bool initialized = hrange == 180 ? initialized180 : initialized256; if (!initialized) { int * const hdiv_table = hrange == 180 ? combined_table : &combined_table[128], hsv_shift = 12; UMat & hdiv_data = hrange == 180 ? hdiv_data180 : hdiv_data256; combined_table[0] = 0; int v = 255 << hsv_shift; if (!initialized180 && !initialized256) { for(int i = 1; i < 256; i++ ) combined_table[i] = saturate_cast<int>(v/(1.*i)); Mat(1, 256, CV_32SC1, combined_table).copyTo(sdiv_data); } v = hrange << hsv_shift; for (int i = 1; i < 256; i++ ) hdiv_table[i] = saturate_cast<int>(v/(6.*i)); Mat(1, 256, CV_32SC1, hdiv_table).copyTo(hdiv_data); initialized = true; } h.setArg(ocl::KernelArg::PtrReadOnly(sdiv_data)); h.setArg(hrange == 256 ? ocl::KernelArg::PtrReadOnly(hdiv_data256) : ocl::KernelArg::PtrReadOnly(hdiv_data180)); } } ```
**File:** modules/imgproc/src/color_hsv.dispatch.cpp
**Change Type:** modified
**Context:** PR #24444: fix race condition in oclCvtColorBGR2HSV (color_hsv.dispatch.cpp) by using a mutex

**Code Changes:**
```diff
@@ -10,6 +10,7 @@
 
 #include "color_hsv.simd.hpp"
 #include "color_hsv.simd_declarations.hpp" // defines CV_CPU_DISPATCH_MODES_ALL=AVX2,...,BASELINE based on CMakeLists.txt content
+#include <atomic>
 
 namespace cv {
 
@@ -274,38 +275,45 @@ bool oclCvtColorBGR2HSV( InputArray _src, OutputArray _dst, int bidx, bool full
 
```

Review comment:
Proposed code locks mutex on each call. That should be properly avoided.
**File:** modules/imgproc/src/color_hsv.dispatch.cpp
**Change Type:** modified
**Context:** PR #24444: fix race condition in oclCvtColorBGR2HSV (color_hsv.dispatch.cpp) by using a mutex

**Code Changes:**
```diff
@@ -10,6 +10,7 @@
 
 #include "color_hsv.simd.hpp"
 #include "color_hsv.simd_declarations.hpp" // defines CV_CPU_DISPATCH_MODES_ALL=AVX2,...,BASELINE based on CMakeLists.txt content
+#include <atomic>
 
 namespace cv {
 
@@ -274,38 +275,45 @@ bool oclCvtColorBGR2HSV( InputArray _src, OutputArray _dst, int bidx, bool full
 
```

Review comment:
This breaks bare metal build configurations without any threading support (see `OPENCV_DISABLE_THREAD_SUPPORT`) Use OpenCV wrappers instead. Reuse `cv::getInitializationMutex()` instead of creation of new one.
**File:** modules/imgproc/src/color_hsv.dispatch.cpp
**Change Type:** modified
**Context:** PR #24444: fix race condition in oclCvtColorBGR2HSV (color_hsv.dispatch.cpp) by using a mutex

**Code Changes:**
```diff
@@ -10,6 +10,7 @@
 
 #include "color_hsv.simd.hpp"
 #include "color_hsv.simd_declarations.hpp" // defines CV_CPU_DISPATCH_MODES_ALL=AVX2,...,BASELINE based on CMakeLists.txt content
+#include <atomic>
 
 namespace cv {
 
@@ -274,38 +275,45 @@ bool oclCvtColorBGR2HSV( InputArray _src, OutputArray _dst, int bidx, bool full
 
```

Review comment:
Oh i understand. thx for the info. is there a list of features i should usually test for? i started to test for WITH_OPENCL=OFF and i will keep in mind that there are targets without thread support... are there more configurations i should keep in mind?
**File:** modules/imgproc/src/color_hsv.dispatch.cpp
**Change Type:** modified
**Context:** PR #24444: fix race condition in oclCvtColorBGR2HSV (color_hsv.dispatch.cpp) by using a mutex

**Code Changes:**
```diff
@@ -10,6 +10,7 @@
 
 #include "color_hsv.simd.hpp"
 #include "color_hsv.simd_declarations.hpp" // defines CV_CPU_DISPATCH_MODES_ALL=AVX2,...,BASELINE based on CMakeLists.txt content
+#include <atomic>
 
 namespace cv {
 
@@ -274,38 +275,45 @@ bool oclCvtColorBGR2HSV( InputArray _src, OutputArray _dst, int bidx, bool full
 
```

Review comment:
Done 031abea. Tested locally by running opencv_test_improc with following build configuration. Btw. i found ```cv::utils::lock_guard``` but it doesn't seem necessary since there is C++11 support. ```shell cmake -DINSTALL_BIN_EXAMPLES=OFF -DBUILD_SHARED_LIBS=ON -DWITH_OPENCL=ON -DBUILD_opencv_java=OFF -DBUILD_opencv_js=OFF -DBUILD_opencv_python2=OFF -DBUILD_opencv_python3=OFF -DBUILD_EXAMPLES=OFF -DBUILD_PACKAGE=OFF -DBUILD_TESTS=ON -DBUILD_PERF_TESTS=ON -DBUILD_DOCS=OFF -DBUILD_opencv_videoio=ON -DBUILD_opencv_highgui=ON -DBUILD_opencv_ts=ON -DBUILD_opencv_imgcodecs=ON -DBUILD_opencv_plot=OFF -DBUILD_opencv_tracking=OFF -DBUILD_opencv_video=OFF -DBUILD_opencv_world=ON -DCMAKE_C_FLAGS=-DOPENCV_DISABLE_THREAD_SUPPORT -DCMAKE_CXX_FLAGS=-DOPENCV_DISABLE_THREAD_SUPPORT ../opencv ```
**File:** modules/imgproc/src/color_hsv.dispatch.cpp
**Change Type:** modified
**Context:** PR #24444: fix race condition in oclCvtColorBGR2HSV (color_hsv.dispatch.cpp) by using a mutex

**Code Changes:**
```diff
@@ -10,6 +10,7 @@
 
 #include "color_hsv.simd.hpp"
 #include "color_hsv.simd_declarations.hpp" // defines CV_CPU_DISPATCH_MODES_ALL=AVX2,...,BASELINE based on CMakeLists.txt content
+#include <atomic>
 
 namespace cv {
 
@@ -274,38 +275,45 @@ bool oclCvtColorBGR2HSV( InputArray _src, OutputArray _dst, int bidx, bool full
 
```

Review comment:
`std::lock_guard` => `cv::AutoLock` Did you measure performance changes due to added of `.copyTo()` calls?
**File:** modules/imgproc/src/color_hsv.dispatch.cpp
**Change Type:** modified
**Context:** PR #24444: fix race condition in oclCvtColorBGR2HSV (color_hsv.dispatch.cpp) by using a mutex

**Code Changes:**
```diff
@@ -10,6 +10,7 @@
 
 #include "color_hsv.simd.hpp"
 #include "color_hsv.simd_declarations.hpp" // defines CV_CPU_DISPATCH_MODES_ALL=AVX2,...,BASELINE based on CMakeLists.txt content
+#include <atomic>
 
 namespace cv {
 
@@ -274,38 +275,45 @@ bool oclCvtColorBGR2HSV( InputArray _src, OutputArray _dst, int bidx, bool full
 
```

Review comment:
done: [8cbf9c7](https://github.com/opencv/opencv/pull/24444/commits/8cbf9c70e398cdf8357564ef0e5ab8df7f5d0eef)
**File:** modules/imgproc/src/color_hsv.dispatch.cpp
**Change Type:** modified
**Context:** PR #24444: fix race condition in oclCvtColorBGR2HSV (color_hsv.dispatch.cpp) by using a mutex

**Code Changes:**
```diff
@@ -10,6 +10,7 @@
 
 #include "color_hsv.simd.hpp"
 #include "color_hsv.simd_declarations.hpp" // defines CV_CPU_DISPATCH_MODES_ALL=AVX2,...,BASELINE based on CMakeLists.txt content
+#include <atomic>
 
 namespace cv {
 
@@ -274,38 +275,45 @@ bool oclCvtColorBGR2HSV( InputArray _src, OutputArray _dst, int bidx, bool full
 
```

Review comment:
> `std::lock_guard` => `cv::AutoLock` > > Did you measure performance changes due to added of `.copyTo()` calls? I compared the current HEAD of 4.x with the branch of the PR (which i updated to the least 4.x HEAD) . I used follwing build configuration for both branches: ```bash cmake -DINSTALL_BIN_EXAMPLES=OFF -DBUILD_SHARED_LIBS=ON -DWITH_OPENCL=ON -DBUILD_opencv_java=OFF -DBUILD_opencv_js=OFF -DBUILD_opencv_python2=OFF -DBUILD_opencv_python3=OFF -DBUILD_EXAMPLES=OFF -DBUILD_PACKAGE=OFF -DBUILD_TESTS=ON -DBUILD_PERF_TESTS=ON -DBUILD_DOCS=OFF -DBUILD_opencv_videoio=ON -DBUILD_opencv_highgui=ON -DBUILD_opencv_ts=ON -DBUILD_opencv_imgcodecs=ON -DBUILD_opencv_plot=OFF -DBUILD_opencv_tracking=OFF -DBUILD_opencv_video=OFF -DBUILD_opencv_world=ON -DENABLE_PROFILING=ON ../opencv ``` And the following test program: https://github.com/kallaballa/OpenCV-Issues/blob/main/src/oclCvtColorBGR2HSV-race/perf-test.cpp Without patch it takes: ~14.8s With patch it takes: ~15.2s So there is a slow-down. I'll optimize a bit and measure again.
**File:** modules/imgproc/src/color_hsv.dispatch.cpp
**Change Type:** modified
**Context:** PR #24444: fix race condition in oclCvtColorBGR2HSV (color_hsv.dispatch.cpp) by using a mutex

**Code Changes:**
```diff
@@ -10,6 +10,7 @@
 
 #include "color_hsv.simd.hpp"
 #include "color_hsv.simd_declarations.hpp" // defines CV_CPU_DISPATCH_MODES_ALL=AVX2,...,BASELINE based on CMakeLists.txt content
+#include <atomic>
 
 namespace cv {
 
@@ -274,38 +275,45 @@ bool oclCvtColorBGR2HSV( InputArray _src, OutputArray _dst, int bidx, bool full
 
```

Review comment:
When profiling i had suspicious results and so i increased the iterations by 10x. This gave me * 154.483s for patched without copy. * 156.108s for patch with copy. * 153.803s without patch. I think the differences are still quite influenced by variance. anyway it is not much. should i continue?
**File:** modules/imgproc/src/color_hsv.dispatch.cpp
**Change Type:** modified
**Context:** PR #24444: fix race condition in oclCvtColorBGR2HSV (color_hsv.dispatch.cpp) by using a mutex

**Code Changes:**
```diff
@@ -10,6 +10,7 @@
 
 #include "color_hsv.simd.hpp"
 #include "color_hsv.simd_declarations.hpp" // defines CV_CPU_DISPATCH_MODES_ALL=AVX2,...,BASELINE based on CMakeLists.txt content
+#include <atomic>
 
 namespace cv {
 
@@ -274,38 +275,45 @@ bool oclCvtColorBGR2HSV( InputArray _src, OutputArray _dst, int bidx, bool full
 
```

Review comment:
I meassured also the variant no-static/no-thread_local/no-locking: 155.512s
**File:** modules/imgproc/src/color_hsv.dispatch.cpp
**Change Type:** modified
**Context:** PR #24444: fix race condition in oclCvtColorBGR2HSV (color_hsv.dispatch.cpp) by using a mutex

**Code Changes:**
```diff
@@ -10,6 +10,7 @@
 
 #include "color_hsv.simd.hpp"
 #include "color_hsv.simd_declarations.hpp" // defines CV_CPU_DISPATCH_MODES_ALL=AVX2,...,BASELINE based on CMakeLists.txt content
+#include <atomic>
 
 namespace cv {
 
@@ -274,38 +275,45 @@ bool oclCvtColorBGR2HSV( InputArray _src, OutputArray _dst, int bidx, bool full
 
```

Review comment:
Please always reuse OpenCV performance tests or add them if something is missing. Avoid using of hand-written tests cases > suspicious results Provided measurement code has bug due to async execution of `cvtColor(UMat)` (code should schedule OpenCL kernels, but do not wait the final result). P.S. Mat to UMat coping is synchronous call in current API - forces wait of OpenCL execution queue.
**File:** doc/tutorials/tutorials.markdown
**Change Type:** modified
**Context:** PR #19305: Test writing documentation

**Code Changes:**
```diff
@@ -11,6 +11,6 @@ OpenCV Tutorials {#tutorial_root}
 - @subpage tutorial_table_of_content_gapi - graph-based approach to computer vision algorithms building
 - @subpage tutorial_table_of_content_other - other modules (ml, objdetect, stitching, video, photo)
 - @subpage tutorial_table_of_content_ios - running OpenCV on an iDevice
-@cond CUDA_MODULES
+- @cond CUDA_MODULES
 - @subpage tutorial_table_of_content_gpu - utilizing power of video card to run CV algorithms
 @endcond
```

Review comment:
I'd suggest adding this tutorial to the introduction group
**File:** doc/tutorials/tutorials.markdown
**Change Type:** modified
**Context:** PR #19305: Test writing documentation

**Code Changes:**
```diff
@@ -11,6 +11,6 @@ OpenCV Tutorials {#tutorial_root}
 - @subpage tutorial_table_of_content_gapi - graph-based approach to computer vision algorithms building
 - @subpage tutorial_table_of_content_other - other modules (ml, objdetect, stitching, video, photo)
 - @subpage tutorial_table_of_content_ios - running OpenCV on an iDevice
-@cond CUDA_MODULES
+- @cond CUDA_MODULES
 - @subpage tutorial_table_of_content_gpu - utilizing power of video card to run CV algorithms
 @endcond
```

Review comment:
Remove unrelated changes.
**File:** README.md
**Change Type:** modified
**Context:** PR #26733: Add usage instructions to README - ## How to Run This Project 1. Make sure you have installed all required dependencies (CMake, Python, etc...
**Review Line:** 44

**Code Changes:**
```diff
+## How to Run This Project
+
+1. Make sure you have installed all required dependencies (CMake, Python, etc.).
+2. Clone the repository and open the project in your preferred IDE or command line.
+3. Build the project using CMake or your IDE’s build settings.
+4. Run the executable or Python scripts depending on your setup.
```

Review comment:
Not needed in the main readme. Documentation reference is enough.
**File:** doc/js_tutorials/js_setup/js_intro/js_intro.markdown
**Change Type:** modified
**Context:** PR #26733: Add usage instructions to README - ## How to Run This Project 1. Make sure you have installed all required dependencies (CMake, Python, etc...
**Review Line:** 25

**Code Changes:**
```diff
 
 OpenCV.js Tutorials
 -----------------------
 
-OpenCV introduces a new set of tutorials that will guide you through various functions available in OpenCV.js. **This guide is mainly focused on OpenCV 3.x version**.
+OpenCV introduces a new set of tutorials to guide you through various functions available in OpenCV.js. **This guide is mainly focused on OpenCV 3.x versions.**
 
 The purpose of OpenCV.js tutorials is to:
--# Help with adaptability of OpenCV in web development
--# Help the web community, developers and computer vision researchers to interactively access a variety of web-based OpenCV examples to help them understand specific vision algorithms.
+1. Help with the adaptability of OpenCV in web development.
```

Review comment:
Statement on 3.x is not correct any more.