nareshmlx/opencv-pr huggingface dataset:
**File:** modules/dnn/src/layers/attention_layer.cpp
**Change Type:** modified
**Context:** PR #27238: Rotary positional embeddings

**Code Changes:**
```diff
@@ -24,6 +24,105 @@ static void packWeight(size_t num_heads, size_t head_size, size_t input_hidden_s
     }
 }
 
+
+static void rotationKernel(
+    float* data, const float* rotation_table,
+    size_t seq_len, size_t d
+)
+{
```

Review comment:
CV_SIMD_WIDTH is compile time constant. It may not work correctly with _SCALABLE branch. please use `VTraits<xxx>::max_nlanes` instead. For fixed-size SIMD it works in the same way.
**File:** modules/dnn/test/test_layers.cpp
**Change Type:** modified
**Context:** PR #27238: Rotary positional embeddings
**Review Line:** 746

**Code Changes:**
```diff
@@ -743,6 +743,32 @@ TEST_F(Layer_RNN_Test, get_set_test)
     EXPECT_EQ(shape(outputs[1]), shape(nT, nS, nH));
 }
 
+TEST(Layer_MHARoPe_Test_Accuracy_with_, Pytorch)
+{
+    Mat QKV = blobFromNPY(_tf("mha_rope.QKV.npy"));
+    Mat QKV_bias = blobFromNPY(_tf("mha_rope.QKV_bias.npy"));
+    std::vector<int> qkv_hidden_sizes = { 256, 256, 256 };
+    LayerParams mhaParams;
```

Review comment:
This is a little tricky due to compatibility issues with onnx runtime on my dev machine (apple silicon) I have just checked, do_rotary flag is ignored. so i can't produce a reference output of the corresponding onnx (with `do_rotary=1`) model locally. I also opened an issue at https://github.com/microsoft/onnxruntime maybe i get feedback on this soon
**File:** modules/dnn/src/layers/attention_layer.cpp
**Change Type:** modified
**Context:** PR #27238: Rotary positional embeddings

**Code Changes:**
```diff
@@ -24,6 +24,105 @@ static void packWeight(size_t num_heads, size_t head_size, size_t input_hidden_s
     }
 }
 
+
+static void rotationKernel(
+    float* data, const float* rotation_table,
+    size_t seq_len, size_t d
+)
+{
```

Review comment:
Yes, it does not work, because `w` value is not known in compile time. `VTraits<xxx>::max_nlanes` is compile time constant. It's equal to `CV_SIMD_WIDTH` for fixed SIMD size architectures (x86). RISC-V RVV vector size is not known in compile time, but we know maximum vector length and use it for intermediate buffers to fit any feasible vector size.
**File:** modules/dnn/src/layers/attention_layer.cpp
**Change Type:** modified
**Context:** PR #27238: Rotary positional embeddings

**Code Changes:**
```diff
@@ -24,6 +24,105 @@ static void packWeight(size_t num_heads, size_t head_size, size_t input_hidden_s
     }
 }
 
+
+static void rotationKernel(
+    float* data, const float* rotation_table,
+    size_t seq_len, size_t d
+)
+{
```

Review comment:
I have replaced CV_SIMD_WIDTH with VTraits<v_float32>::max_nlanes for both CV_SIMD and CV_SIMD_SCALABLE branch
**File:** modules/videoio/src/cap_obsensor/obsensor_uvc_stream_channel.cpp
**Change Type:** modified
**Context:** PR #27230: videoio: add Orbbec Gemini 330 camera support
**Review Line:** 69

**Code Changes:**
```diff
 #define fourCc2Int(a, b, c, d) \
@@ -62,6 +66,7 @@ const std::map<uint32_t, FrameFormat> fourccToOBFormat = {
     {fourCc2Int('M', 'J', 'P', 'G'), FRAME_FORMAT_MJPG},
     {fourCc2Int('Y', '1', '6', ' '), FRAME_FORMAT_Y16},
     {fourCc2Int('Y', '1', '4', ' '), FRAME_FORMAT_Y14},
+    {fourCc2Int('Z', '1', '6', ' '), FRAME_FORMAT_Y16}
 };
 
 StreamType parseUvcDeviceNameToStreamType(const std::string& devName)
@@ -204,7 +209,6 @@ DepthFrameUnpacker::~DepthFrameUnpacker() {
     delete[] outputDataBuf_;
```

Review comment:
`fourCc2Int('Y', '1', '6', ' ')` and `fourCc2Int('Z', '1', '6', ' ')` are both mapped to `FRAME_FORMAT_Y16`?
**File:** modules/videoio/src/cap_obsensor/obsensor_uvc_stream_channel.cpp
**Change Type:** modified
**Context:** PR #27230: videoio: add Orbbec Gemini 330 camera support
**Review Line:** 69

**Code Changes:**
```diff
 #define fourCc2Int(a, b, c, d) \
@@ -62,6 +66,7 @@ const std::map<uint32_t, FrameFormat> fourccToOBFormat = {
     {fourCc2Int('M', 'J', 'P', 'G'), FRAME_FORMAT_MJPG},
     {fourCc2Int('Y', '1', '6', ' '), FRAME_FORMAT_Y16},
     {fourCc2Int('Y', '1', '4', ' '), FRAME_FORMAT_Y14},
+    {fourCc2Int('Z', '1', '6', ' '), FRAME_FORMAT_Y16}
 };
 
 StreamType parseUvcDeviceNameToStreamType(const std::string& devName)
@@ -204,7 +209,6 @@ DepthFrameUnpacker::~DepthFrameUnpacker() {
     delete[] outputDataBuf_;
```

Review comment:
Still not working.
**File:** modules/videoio/src/cap_obsensor/obsensor_uvc_stream_channel.cpp
**Change Type:** modified
**Context:** PR #27230: videoio: add Orbbec Gemini 330 camera support

**Code Changes:**
```diff
@@ -35,19 +35,23 @@
 
 namespace cv {
 namespace obsensor {
+const ObExtensionUnit OBSENSOR_COMMON_XU_UNIT = { XU_UNIT_ID_COMMON, { 0xA55751A1, 0xF3C5, 0x4A5E, { 0x8D, 0x5A, 0x68, 0x54, 0xB8, 0xFA, 0x27, 0x16 } } };
+const ObExtensionUnit OBSENSOR_G330_XU_UNIT = { XU_UNIT_ID_G330, { 0xC9606CCB, 0x594C, 0x4D25, { 0xaf, 0x47, 0xcc, 0xc4, 0x96, 0x43, 0x59, 0x95 } } };
+
 const uint8_t OB_EXT_CMD0[16] = { 0x47, 0x4d, 0x04, 0x00, 0x02, 0x00, 0x52, 0x00, 0x5B, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00 };
 const uint8_t OB_EXT_CMD1[16] = { 0x47, 0x4d, 0x04, 0x00, 0x02, 0x00, 0x54, 0x00, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
 const uint8_t OB_EXT_CMD2[16] = { 0x47, 0x4d, 0x04, 0x00, 0x02, 0x00, 0x56, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00 };
```

Review comment:
Why do you need resize and crop for the camera frames? I propose to return them in original size. Also resized does not support in-place processing. The code always triggers srcMat realloc.
**File:** 3rdparty/hal_rvv/hal_rvv_1p0/transpose.hpp
**Change Type:** added
**Context:** PR #27229: HAL: implemented cv_hal_transpose in hal_rvv
**Review Line:** 208

**Code Changes:**
```diff
+        0, 0, 0, 0,
+        0, 0, 0, 0,
+        0, 0, 0, 0,
+        0
+    };
+    Transpose2dFunc func = tab[element_size];
+    if (!func) {
+        return CV_HAL_ERROR_NOT_IMPLEMENTED;
+    }
+
+    func(src_data, src_step, dst_data, dst_step, src_width, src_height);
```

Review comment:
`element_size` may trigger out-of-bound access issue. I propose to add range check before.
**File:** 3rdparty/hal_rvv/hal_rvv_1p0/transpose.hpp
**Change Type:** added
**Context:** PR #27229: HAL: implemented cv_hal_transpose in hal_rvv
**Review Line:** 208

**Code Changes:**
```diff
+        0, 0, 0, 0,
+        0, 0, 0, 0,
+        0, 0, 0, 0,
+        0
+    };
+    Transpose2dFunc func = tab[element_size];
+    if (!func) {
+        return CV_HAL_ERROR_NOT_IMPLEMENTED;
+    }
+
+    func(src_data, src_step, dst_data, dst_step, src_width, src_height);
```

Review comment:
It is checked before calling hal: https://github.com/opencv/opencv/blob/e37819c2ac1b8ec2beac917bba0d885c79195603/modules/core/src/matrix_transform.cpp#L181
**File:** 3rdparty/fastcv/src/fastcv_hal_core.cpp
**Change Type:** modified
**Context:** PR #27184: FastCV gemm hal

**Code Changes:**
```diff
@@ -623,4 +623,119 @@ int fastcv_hal_SVD32f(
     }
 
     CV_HAL_RETURN(status, fastcv_hal_SVD32f);
+}
+
+int fastcv_hal_gemm32f(
+    const float*    src1,
+    size_t          src1_step,
+    const float*    src2,
```

Review comment:
It's redundant.
**File:** 3rdparty/fastcv/src/fastcv_hal_core.cpp
**Change Type:** modified
**Context:** PR #27184: FastCV gemm hal

**Code Changes:**
```diff
@@ -623,4 +623,119 @@ int fastcv_hal_SVD32f(
     }
 
     CV_HAL_RETURN(status, fastcv_hal_SVD32f);
+}
+
+int fastcv_hal_gemm32f(
+    const float*    src1,
+    size_t          src1_step,
+    const float*    src2,
```

Review comment:
`dst_temp1 = cv::Mat(height_a, width_d, CV_32FC1);` Why do you need roi `cv::Rect(0, 0, width_d, height_a)` here?
**File:** 3rdparty/fastcv/src/fastcv_hal_core.cpp
**Change Type:** modified
**Context:** PR #27184: FastCV gemm hal

**Code Changes:**
```diff
@@ -623,4 +623,119 @@ int fastcv_hal_SVD32f(
     }
 
     CV_HAL_RETURN(status, fastcv_hal_SVD32f);
+}
+
+int fastcv_hal_gemm32f(
+    const float*    src1,
+    size_t          src1_step,
+    const float*    src2,
```

Review comment:
As optimization hint: A*B = B_transopsed * A_transposed.
**File:** 3rdparty/fastcv/src/fastcv_hal_core.cpp
**Change Type:** modified
**Context:** PR #27184: FastCV gemm hal

**Code Changes:**
```diff
@@ -623,4 +623,119 @@ int fastcv_hal_SVD32f(
     }
 
     CV_HAL_RETURN(status, fastcv_hal_SVD32f);
+}
+
+int fastcv_hal_gemm32f(
+    const float*    src1,
+    size_t          src1_step,
+    const float*    src2,
```

Review comment:
Hi Alex u mean line no 669 ?
**File:** 3rdparty/fastcv/src/fastcv_hal_core.cpp
**Change Type:** modified
**Context:** PR #27184: FastCV gemm hal

**Code Changes:**
```diff
@@ -623,4 +623,119 @@ int fastcv_hal_SVD32f(
     }
 
     CV_HAL_RETURN(status, fastcv_hal_SVD32f);
+}
+
+int fastcv_hal_gemm32f(
+    const float*    src1,
+    size_t          src1_step,
+    const float*    src2,
```

Review comment:
Hi Alex we added it here in case the original dst has some padding, i.e. stride > width*sizeof(datatype), since in case of inplace, we are making dst_temp of width * height size
**File:** 3rdparty/fastcv/src/fastcv_hal_core.cpp
**Change Type:** modified
**Context:** PR #27184: FastCV gemm hal

**Code Changes:**
```diff
@@ -623,4 +623,119 @@ int fastcv_hal_SVD32f(
     }
 
     CV_HAL_RETURN(status, fastcv_hal_SVD32f);
+}
+
+int fastcv_hal_gemm32f(
+    const float*    src1,
+    size_t          src1_step,
+    const float*    src2,
```

Review comment:
No need to reset local pointers before return call.
**File:** 3rdparty/fastcv/src/fastcv_hal_core.cpp
**Change Type:** modified
**Context:** PR #27184: FastCV gemm hal

**Code Changes:**
```diff
@@ -623,4 +623,119 @@ int fastcv_hal_SVD32f(
     }
 
     CV_HAL_RETURN(status, fastcv_hal_SVD32f);
+}
+
+int fastcv_hal_gemm32f(
+    const float*    src1,
+    size_t          src1_step,
+    const float*    src2,
```

Review comment:
`copyTo()` handles strides correctly. No need in roi.
**File:** doc/tutorials/calib3d/camera_calibration_pattern/camera_calibration_pattern.markdown
**Change Type:** modified
**Context:** PR #27221: minor changes in calib3d docs for clarity

**Code Changes:**
```diff
@@ -11,7 +11,7 @@ Create calibration pattern {#tutorial_camera_calibration_pattern}
 | Compatibility | OpenCV >= 3.0 |
 
 
-The goal of this tutorial is to learn how to create calibration pattern.
+The goal of this tutorial is to learn how to create a calibration pattern.
 
 You can find a chessboard pattern in https://github.com/opencv/opencv/blob/4.x/doc/pattern.png
 
@@ -47,14 +47,14 @@ create a ChAruco board pattern in charuco_board.svg with 7 rows, 5 columns, squa
```

Review comment:
the measurement units
**File:** platforms/android/build_sdk.py
**Change Type:** modified
**Context:** PR #27239: Android-SDK: check flag IPP package

**Code Changes:**
```diff
@@ -380,7 +380,40 @@ def get_ndk_dir():
         return android_sdk_ndk_bundle
     return None
 
+def check_cmake_flag_enabled(cmake_file, flag_name, strict=True):
+    print(f"Checking build flag '{flag_name}' in: {cmake_file}")
+    
+    if not os.path.isfile(cmake_file):
+        msg = f"ERROR: File {cmake_file} does not exist."
+        if strict:
```

Review comment:
It makes sense to move key name to the function parameters. E.g. check_cmake_flag_enabled(cmake_file, "HAVE_IPP") The same function may be used for KleidiCV and other dependencies.
**File:** platforms/android/build_sdk.py
**Change Type:** modified
**Context:** PR #27239: Android-SDK: check flag IPP package

**Code Changes:**
```diff
@@ -380,7 +380,40 @@ def get_ndk_dir():
         return android_sdk_ndk_bundle
     return None
 
+def check_cmake_flag_enabled(cmake_file, flag_name, strict=True):
+    print(f"Checking build flag '{flag_name}' in: {cmake_file}")
+    
+    if not os.path.isfile(cmake_file):
+        msg = f"ERROR: File {cmake_file} does not exist."
+        if strict:
```

Review comment:
I propose to add command line option, e.g. "--strict-dependencies" to make the check optional.
**File:** platforms/android/build_sdk.py
**Change Type:** modified
**Context:** PR #27239: Android-SDK: check flag IPP package

**Code Changes:**
```diff
@@ -380,7 +380,40 @@ def get_ndk_dir():
         return android_sdk_ndk_bundle
     return None
 
+def check_cmake_flag_enabled(cmake_file, flag_name, strict=True):
+    print(f"Checking build flag '{flag_name}' in: {cmake_file}")
+    
+    if not os.path.isfile(cmake_file):
+        msg = f"ERROR: File {cmake_file} does not exist."
+        if strict:
```

Review comment:
Move into ``` for i, abi in enumerate(ABIs): ``` and check configuration.
**File:** samples/cpp/macbeth_chart_detection.cpp
**Change Type:** added
**Context:** PR #26906: Adding macbeth chart detector to objdetect module from opencv_contrib

**Code Changes:**
```diff
@@ -0,0 +1,194 @@
+#include <opencv2/core.hpp>
+#include <opencv2/highgui.hpp>
+#include <opencv2/objdetect.hpp>
+#include <opencv2/dnn.hpp>
+#include <iostream>
+#include "../dnn/common.hpp"
+
+using namespace std;
+using namespace cv;
```

Review comment:
`getChartsRGB()` 1) returns matrix as a value, 2) that needs to be further reshaped. `getRefColor()` 1) returns matrix via output parameter 2) that does not need to be reshaped. please, align API and output shapes in both cases.
**File:** samples/cpp/macbeth_chart_detection.cpp
**Change Type:** added
**Context:** PR #26906: Adding macbeth chart detector to objdetect module from opencv_contrib
**Review Line:** 178

**Code Changes:**
```diff
+                }
+            }
+            else if (key == 27) exit(0);
+        }
+        if(found){
+            cout<<"Reference colors: "<<tgt<<endl<<"--------------------"<<endl;
+            cout<<"Actual colors: "<<src<<endl<<endl;
+        }
+    }
+    else{
+        found = processFrame(image, detector, src, tgt, nc);
```

Review comment:
don't print colors on each frame. print them in the end.
**File:** samples/cpp/macbeth_chart_detection.cpp
**Change Type:** added
**Context:** PR #26906: Adding macbeth chart detector to objdetect module from opencv_contrib

**Code Changes:**
```diff
@@ -0,0 +1,194 @@
+#include <opencv2/core.hpp>
+#include <opencv2/highgui.hpp>
+#include <opencv2/objdetect.hpp>
+#include <opencv2/dnn.hpp>
+#include <iostream>
+#include "../dnn/common.hpp"
+
+using namespace std;
+using namespace cv;
```

Review comment:
there is still missing branch that processes still images
**File:** samples/cpp/macbeth_chart_detection.cpp
**Change Type:** added
**Context:** PR #26906: Adding macbeth chart detector to objdetect module from opencv_contrib

**Code Changes:**
```diff
@@ -0,0 +1,194 @@
+#include <opencv2/core.hpp>
+#include <opencv2/highgui.hpp>
+#include <opencv2/objdetect.hpp>
+#include <opencv2/dnn.hpp>
+#include <iostream>
+#include "../dnn/common.hpp"
+
+using namespace std;
+using namespace cv;
```

Review comment:
why do we wait for another key press after user pressed ESC?
**File:** samples/cpp/macbeth_chart_detection.cpp
**Change Type:** added
**Context:** PR #26906: Adding macbeth chart detector to objdetect module from opencv_contrib

**Code Changes:**
```diff
@@ -0,0 +1,194 @@
+#include <opencv2/core.hpp>
+#include <opencv2/highgui.hpp>
+#include <opencv2/objdetect.hpp>
+#include <opencv2/dnn.hpp>
+#include <iostream>
+#include "../dnn/common.hpp"
+
+using namespace std;
+using namespace cv;
```

Review comment:
please remove this printf(). When the pattern is detected, patches are outlined anyway. No need to create extra noise in terminal
**File:** samples/cpp/macbeth_chart_detection.cpp
**Change Type:** added
**Context:** PR #26906: Adding macbeth chart detector to objdetect module from opencv_contrib

**Code Changes:**
```diff
@@ -0,0 +1,194 @@
+#include <opencv2/core.hpp>
+#include <opencv2/highgui.hpp>
+#include <opencv2/objdetect.hpp>
+#include <opencv2/dnn.hpp>
+#include <iostream>
+#include "../dnn/common.hpp"
+
+using namespace std;
+using namespace cv;
```

Review comment:
`getChartsRGB()` and `getRefColors()` still use different ways to return data. Can `getRefColors()` return Mat as return value?
**File:** samples/cpp/macbeth_chart_detection.cpp
**Change Type:** added
**Context:** PR #26906: Adding macbeth chart detector to objdetect module from opencv_contrib
**Review Line:** 175

**Code Changes:**
```diff
+                }
+                else{
+                    cout<<"No color chart detected!!"<<endl;
+                }
+            }
+            else if (key == 27) exit(0);
+        }
+        if(found){
+            cout<<"Reference colors: "<<tgt<<endl<<"--------------------"<<endl;
+            cout<<"Actual colors: "<<src<<endl<<endl;
+        }
```

Review comment:
1) when user presses ESCAPE, he does not get colors printed. 2) what if the board was never detected?
**File:** samples/cpp/macbeth_chart_detection.cpp
**Change Type:** added
**Context:** PR #26906: Adding macbeth chart detector to objdetect module from opencv_contrib

**Code Changes:**
```diff
@@ -0,0 +1,194 @@
+#include <opencv2/core.hpp>
+#include <opencv2/highgui.hpp>
+#include <opencv2/objdetect.hpp>
+#include <opencv2/dnn.hpp>
+#include <iostream>
+#include "../dnn/common.hpp"
+
+using namespace std;
+using namespace cv;
```

Review comment:
`processFrame()` should return bool and colors need to be printed only when the chart is detected
**File:** samples/cpp/macbeth_chart_detection.cpp
**Change Type:** added
**Context:** PR #26906: Adding macbeth chart detector to objdetect module from opencv_contrib
**Review Line:** 153

**Code Changes:**
```diff
+
+    Mat src, tgt;
+    bool found = false;
+    if (isVideo){
+        cout<<"To print the actual colors and reference colors for current frame press SPACEBAR. To resume press SPACEBAR again"<<endl;
+
+        while (cap.grab())
+        {
+            Mat frame;
+            cap.retrieve(frame);
+
```

Review comment:
put `bool found = false;` before while loop
**File:** modules/objdetect/src/mcc/checker_detector.hpp
**Change Type:** added
**Context:** PR #26906: Adding macbeth chart detector to objdetect module from opencv_contrib
**Review Line:** 48

**Code Changes:**
```diff
+    typedef std::vector<Point> PointsVector;
+    typedef std::vector<PointsVector> ContoursVector;
+
+public:
+    CCheckerDetectorImpl();
+    CCheckerDetectorImpl(const dnn::Net& _net){
+        net = _net;
+    }
+    virtual ~CCheckerDetectorImpl();
+
+    bool process(InputArray image, const std::vector<Rect> &regionsOfInterest,
```

Review comment:
Adding a fix in this PR https://github.com/opencv/opencv/pull/27246
**File:** 3rdparty/fastcv/src/fastcv_hal_imgproc.cpp
**Change Type:** modified
**Context:** PR #27217: Optimize gaussian blur performance in FastCV HAL

**Code Changes:**
```diff
@@ -536,30 +536,88 @@ class FcvGaussianBlurLoop_Invoker : public cv::ParallelLoopBody
 {
     public:
 
-    FcvGaussianBlurLoop_Invoker(const cv::Mat& _src, cv::Mat& _dst, int _ksize, int _borderType, int _fcvBorderValue) :
-        cv::ParallelLoopBody(), src(_src),dst(_dst), ksize(_ksize), borderType(_borderType), fcvBorderValue(_fcvBorderValue)
+    FcvGaussianBlurLoop_Invoker(const cv::Mat& _src, cv::Mat& _dst, int _ksize, int _borderType) :
+        cv::ParallelLoopBody(), src(_src),dst(_dst), ksize(_ksize), borderType(_borderType)
     {
         width       = src.cols;
```

Review comment:
Build warning: ``` [660/2676] Building CXX object 3rdparty/fastcv/CMakeFiles/fastcv_hal.dir/src/fastcv_hal_imgproc.cpp.o /mnt/Projects/Projects/opencv/3rdparty/fastcv/src/fastcv_hal_imgproc.cpp:671:58: warning: overlapping comparisons always evaluate to true [-Wtautological-overlap-compare] 671 | if( border_type != cv::BorderTypes::BORDER_CONSTANT || | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~ 672 | border_type != cv::BorderTypes::BORDER_REPLICATE || | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1 warning generated. ```
**File:** 3rdparty/fastcv/src/fastcv_hal_imgproc.cpp
**Change Type:** modified
**Context:** PR #27182: Parallel_for in box Filter and support for 32f box filter in Fastcv hal

**Code Changes:**
```diff
@@ -314,6 +314,69 @@ int fastcv_hal_sobel(
     CV_HAL_RETURN(status, hal_sobel);
 }
 
+class FcvBoxLoop_Invoker : public cv::ParallelLoopBody
+{
+public:
+
+    FcvBoxLoop_Invoker(cv::Mat src_, int width_, int height_, cv::Mat dst_, int bdr_, int knl_, int normalize_, int stripeHeight_, int nStripes_, int depth_) :
+        cv::ParallelLoopBody(), src(src_), width(width_), height(height_), dst(dst_), bdr(bdr_), knl(knl_), normalize(normalize_), stripeHeight(stripeHeight_), nStripes(nStripes_), depth(depth_)
```

Review comment:
`stripeHeight = nThreads * 10;` sounds strange. More threads -> larger piece for each thread.
**File:** 3rdparty/fastcv/src/fastcv_hal_imgproc.cpp
**Change Type:** modified
**Context:** PR #27182: Parallel_for in box Filter and support for 32f box filter in Fastcv hal

**Code Changes:**
```diff
@@ -314,6 +314,69 @@ int fastcv_hal_sobel(
     CV_HAL_RETURN(status, hal_sobel);
 }
 
+class FcvBoxLoop_Invoker : public cv::ParallelLoopBody
+{
+public:
+
+    FcvBoxLoop_Invoker(cv::Mat src_, int width_, int height_, cv::Mat dst_, int bdr_, int knl_, int normalize_, int stripeHeight_, int nStripes_, int depth_) :
+        cv::ParallelLoopBody(), src(src_), width(width_), height(height_), dst(dst_), bdr(bdr_), knl(knl_), normalize(normalize_), stripeHeight(stripeHeight_), nStripes(nStripes_), depth(depth_)
```

Review comment:
``` if(inPlace) dst_temp = cv::Mat(height, width, src_depth); else dst_temp = cv::Mat(height, width, src_depth, (void*)dst_data, dst_step); ``` Why do you need roi `cv::Rect(0, 0, width, height)` here?
**File:** 3rdparty/fastcv/src/fastcv_hal_imgproc.cpp
**Change Type:** modified
**Context:** PR #27182: Parallel_for in box Filter and support for 32f box filter in Fastcv hal

**Code Changes:**
```diff
@@ -314,6 +314,69 @@ int fastcv_hal_sobel(
     CV_HAL_RETURN(status, hal_sobel);
 }
 
+class FcvBoxLoop_Invoker : public cv::ParallelLoopBody
+{
+public:
+
+    FcvBoxLoop_Invoker(cv::Mat src_, int width_, int height_, cv::Mat dst_, int bdr_, int knl_, int normalize_, int stripeHeight_, int nStripes_, int depth_) :
+        cv::ParallelLoopBody(), src(src_), width(width_), height(height_), dst(dst_), bdr(bdr_), knl(knl_), normalize(normalize_), stripeHeight(stripeHeight_), nStripes(nStripes_), depth(depth_)
```

Review comment:
Hi Alex we added it in case the original dst has some padding (stride > width * sizeof(datatype)), so to only access the width * height data part
**File:** 3rdparty/fastcv/src/fastcv_hal_imgproc.cpp
**Change Type:** modified
**Context:** PR #27182: Parallel_for in box Filter and support for 32f box filter in Fastcv hal

**Code Changes:**
```diff
@@ -314,6 +314,69 @@ int fastcv_hal_sobel(
     CV_HAL_RETURN(status, hal_sobel);
 }
 
+class FcvBoxLoop_Invoker : public cv::ParallelLoopBody
+{
+public:
+
+    FcvBoxLoop_Invoker(cv::Mat src_, int width_, int height_, cv::Mat dst_, int bdr_, int knl_, int normalize_, int stripeHeight_, int nStripes_, int depth_) :
+        cv::ParallelLoopBody(), src(src_), width(width_), height(height_), dst(dst_), bdr(bdr_), knl(knl_), normalize(normalize_), stripeHeight(stripeHeight_), nStripes(nStripes_), depth(depth_)
```

Review comment:
Hi Alex We tested this and found it having good speed, since usually threads are 8 as per our experiments. Please guide what optimizations we can do here.
**File:** 3rdparty/fastcv/src/fastcv_hal_imgproc.cpp
**Change Type:** modified
**Context:** PR #27182: Parallel_for in box Filter and support for 32f box filter in Fastcv hal

**Code Changes:**
```diff
@@ -314,6 +314,69 @@ int fastcv_hal_sobel(
     CV_HAL_RETURN(status, hal_sobel);
 }
 
+class FcvBoxLoop_Invoker : public cv::ParallelLoopBody
+{
+public:
+
+    FcvBoxLoop_Invoker(cv::Mat src_, int width_, int height_, cv::Mat dst_, int bdr_, int knl_, int normalize_, int stripeHeight_, int nStripes_, int depth_) :
+        cv::ParallelLoopBody(), src(src_), width(width_), height(height_), dst(dst_), bdr(bdr_), knl(knl_), normalize(normalize_), stripeHeight(stripeHeight_), nStripes(nStripes_), depth(depth_)
```

Review comment:
`copyTo()` handles strides correctly. No need to use roi. It creates redundant cv::Mat object.