nareshmlx/opencv-pr huggingface dataset:
**File:** modules/photo/src/seamless_cloning.cpp
**Change Type:** modified
**Context:** PR #26511: Add *_WIDE flags to cv::seamlessClone

**Code Changes:**
```diff
@@ -47,18 +47,17 @@
 using namespace std;
 using namespace cv;
 
-static Mat checkMask(InputArray _mask, Size size)
+static Mat checkMask(InputArray mask, Size size)
 {
-    Mat mask = _mask.getMat();
     Mat gray;
-    if (mask.channels() > 1)
```

Review comment:
there is related issues on some repos like https://github.com/OpenTalker/SadTalker/issues/542 let me investigate if ``` { p.x = dest.size().width / 2; p.y = dest.size().height / 2; } ``` works perfectly fine for different dimensions
**File:** modules/photo/include/opencv2/photo.hpp
**Change Type:** modified
**Context:** PR #26511: Add *_WIDE flags to cv::seamlessClone

**Code Changes:**
```diff
@@ -708,33 +708,74 @@ CV_EXPORTS_W void decolor( InputArray src, OutputArray grayscale, OutputArray co
 //! @{
 
 
-//! seamlessClone algorithm flags
-enum
+//! Flags for the seamlessClone algorithm
+enum SeamlessCloneFlags
 {
-    /** The power of the method is fully expressed when inserting objects with complex outlines into a new background*/
```

Review comment:
I propose to name it not _ALT, but _WIDE to have some meaning in the option name here and in all other places.
**File:** modules/imgcodecs/test/test_png.cpp
**Change Type:** modified
**Context:** PR #26181: Enable PNG exif orientation test

**Code Changes:**
```diff
@@ -109,100 +109,6 @@ TEST(Imgcodecs_Png, read_color_palette_with_alpha)
     EXPECT_EQ(img.at<Vec3b>(0, 1), Vec3b(255, 0, 0));
 }
 
-/**
- * Test for check whether reading exif orientation tag was processed successfully or not
- * The test info is the set of 8 images named testExifRotate_{1 to 8}.png
- * The test image is the square 10x10 points divided by four sub-squares:
- * (R corresponds to Red, G to Green, B to Blue, W to white)
- * ---------             ---------
```

Review comment:
The test itself is still disabled.
**File:** modules/imgcodecs/src/loadsave.cpp
**Change Type:** modified
**Context:** PR #26181: Enable PNG exif orientation test

**Code Changes:**
```diff
@@ -83,6 +83,9 @@ static Size validateInputImageSize(const Size& size)
 
 static inline int calcType(int type, int flags)
 {
+    if ( (flags & (IMREAD_COLOR | IMREAD_ANYCOLOR | IMREAD_ANYDEPTH)) == (IMREAD_COLOR | IMREAD_ANYCOLOR | IMREAD_ANYDEPTH))
+        return type;
+
     if( (flags & IMREAD_LOAD_GDAL) != IMREAD_LOAD_GDAL && flags != IMREAD_UNCHANGED )
     {
         if( (flags & IMREAD_ANYDEPTH) == 0 )
```

Review comment:
There is [cv::IMREAD_ANYCOLOR](https://docs.opencv.org/4.x/d8/d6a/group__imgcodecs__flags.html#gga61d9b0126a3e57d9277ac48327799c80ab6573b69300c092b61800222fe555953) option. It should presume alpha channel, if it's present in the original image.
**File:** modules/imgcodecs/src/loadsave.cpp
**Change Type:** modified
**Context:** PR #26181: Enable PNG exif orientation test

**Code Changes:**
```diff
@@ -83,6 +83,9 @@ static Size validateInputImageSize(const Size& size)
 
 static inline int calcType(int type, int flags)
 {
+    if ( (flags & (IMREAD_COLOR | IMREAD_ANYCOLOR | IMREAD_ANYDEPTH)) == (IMREAD_COLOR | IMREAD_ANYCOLOR | IMREAD_ANYDEPTH))
+        return type;
+
     if( (flags & IMREAD_LOAD_GDAL) != IMREAD_LOAD_GDAL && flags != IMREAD_UNCHANGED )
     {
         if( (flags & IMREAD_ANYDEPTH) == 0 )
```

Review comment:
see the issues #22090 #21695 related cv::IMREAD_ANYCOLOR
**File:** modules/imgcodecs/test/test_png.cpp
**Change Type:** modified
**Context:** PR #26181: Enable PNG exif orientation test

**Code Changes:**
```diff
@@ -109,100 +109,6 @@ TEST(Imgcodecs_Png, read_color_palette_with_alpha)
     EXPECT_EQ(img.at<Vec3b>(0, 1), Vec3b(255, 0, 0));
 }
 
-/**
- * Test for check whether reading exif orientation tag was processed successfully or not
- * The test info is the set of 8 images named testExifRotate_{1 to 8}.png
- * The test image is the square 10x10 points divided by four sub-squares:
- * (R corresponds to Red, G to Green, B to Blue, W to white)
- * ---------             ---------
```

Review comment:
when ``` m_img = imread(filename, IMREAD_ANYCOLOR); ASSERT_FALSE(m_img.empty()); EXPECT_EQ(4, m_img.channels()); ``` **the test fails ** [----------] 8 tests from ExifFiles/Imgcodecs_PNG_Exif [ RUN ] ExifFiles/Imgcodecs_PNG_Exif.exif_orientation/0, where GetParam() = "readwrite/testExifOrientation_1.png" C:\build\precommit_windows64\4.x\opencv\modules\imgcodecs\test\test_png.cpp(191): error: Expected equality of these values: 4 m_img.channels() Which is: 3 C:\build\precommit_windows64\4.x\opencv\modules\imgcodecs\test\test_png.cpp(196): error: Expected: (vec4.val[0]) <= (colorThresholdLow), actual: '\xFE' (254) vs 5 C:\build\precommit_windows64\4.x\opencv\modules\imgcodecs\test\test_png.cpp(198): error: Expected: (vec4.val[2]) >= (colorThresholdHigh), actual: '\0' vs 250 C:\build\precommit_windows64\4.x\opencv\modules\imgcodecs\test\test_png.cpp(202): error: Expected: (vec4.val[0]) <= (colorThresholdLow), actual: '\xFF' (255) vs 5 C:\build\precommit_windows64\4.x\opencv\modules\imgcodecs\test\test_png.cpp(203): error: Expected: (vec4.val[1]) >= (colorThresholdHigh), actual: '\0' vs 250 C:\build\precommit_windows64\4.x\opencv\modules\imgcodecs\test\test_png.cpp(208): error: Expected: (vec4.val[0]) >= (colorThresholdHigh), actual: '\x2' (2) vs 250 C:\build\precommit_windows64\4.x\opencv\modules\imgcodecs\test\test_png.cpp(209): error: Expected: (vec4.val[1]) <= (colorThresholdLow), actual: '\xFD' (253) vs 5 [ FAILED ] ExifFiles/Imgcodecs_PNG_Exif.exif_orientation/0, where GetParam() = "readwrite/testExifOrientation_1.png" (2 ms) [ RUN ] ExifFiles/Imgcodecs_PNG_Exif.exif_orientation/1, where GetParam() = "readwrite/testExifOrientation_2.png" C:\build\precommit_windows64\4.x\opencv\modules\imgcodecs\test\test_png.cpp(191): error: Expected equality of these values: 4 m_img.channels() Which is: 3 ```
**File:** modules/imgcodecs/test/test_exif.cpp
**Change Type:** added
**Context:** PR #26181: Enable PNG exif orientation test
**Review Line:** 52

**Code Changes:**
```diff
+ *
+ * Note:
+ * The flags parameter of the imread function is set as IMREAD_COLOR | IMREAD_ANYCOLOR | IMREAD_ANYDEPTH.
+ * Using this combination is an undocumented trick to load images similarly to the IMREAD_UNCHANGED flag,
+ * preserving the alpha channel (if present) while also applying the orientation.
+ */
+
+typedef testing::TestWithParam<string> Exif;
+
+TEST_P(Exif, exif_orientation)
+{
```

Review comment:
I propose to add it to documentation.
**File:** 3rdparty/kleidicv/CMakeLists.txt
**Change Type:** modified
**Context:** PR #26623: Update KleidiCV to version 0.3
**Review Line:** 9

**Code Changes:**
```diff
   option(KLEIDICV_ENABLE_SME2 "" OFF) # not compatible with some CLang versions in NDK
   include("${KLEIDICV_SOURCE_PATH}/adapters/opencv/CMakeLists.txt")
+  # HACK to suppress adapters/opencv/kleidicv_hal.cpp:343:12: warning: unused function 'from_opencv' [-Wunused-function]
+  target_compile_options( kleidicv_hal PRIVATE
+      $<TARGET_PROPERTY:kleidicv,COMPILE_OPTIONS>
+      "-Wno-old-style-cast" "-Wno-unused-function"
+  )
 endif()
-
```

Review comment:
Need to include through `-isystem` to avoid warnings from these external headers. https://gcc.gnu.org/onlinedocs/gcc/Directory-Options.html https://gcc.gnu.org/onlinedocs/cpp/System-Headers.html Example: https://github.com/opencv/opencv/blob/4.10.0/3rdparty/protobuf/CMakeLists.txt#L154
**File:** 3rdparty/kleidicv/CMakeLists.txt
**Change Type:** modified
**Context:** PR #26623: Update KleidiCV to version 0.3
**Review Line:** 9

**Code Changes:**
```diff
   option(KLEIDICV_ENABLE_SME2 "" OFF) # not compatible with some CLang versions in NDK
   include("${KLEIDICV_SOURCE_PATH}/adapters/opencv/CMakeLists.txt")
+  # HACK to suppress adapters/opencv/kleidicv_hal.cpp:343:12: warning: unused function 'from_opencv' [-Wunused-function]
+  target_compile_options( kleidicv_hal PRIVATE
+      $<TARGET_PROPERTY:kleidicv,COMPILE_OPTIONS>
+      "-Wno-old-style-cast" "-Wno-unused-function"
+  )
 endif()
-
```

Review comment:
The issue happens inside cpp file, not header. So the `-isystem` flag is not applicable here.
**File:** 3rdparty/kleidicv/CMakeLists.txt
**Change Type:** modified
**Context:** PR #26623: Update KleidiCV to version 0.3
**Review Line:** 9

**Code Changes:**
```diff
   option(KLEIDICV_ENABLE_SME2 "" OFF) # not compatible with some CLang versions in NDK
   include("${KLEIDICV_SOURCE_PATH}/adapters/opencv/CMakeLists.txt")
+  # HACK to suppress adapters/opencv/kleidicv_hal.cpp:343:12: warning: unused function 'from_opencv' [-Wunused-function]
+  target_compile_options( kleidicv_hal PRIVATE
+      $<TARGET_PROPERTY:kleidicv,COMPILE_OPTIONS>
+      "-Wno-old-style-cast" "-Wno-unused-function"
+  )
 endif()
-
```

Review comment:
Why does this widely used approach not work? https://github.com/opencv/opencv/blob/4.10.0/3rdparty/libjpeg-turbo/CMakeLists.txt#L11
**File:** 3rdparty/kleidicv/CMakeLists.txt
**Change Type:** modified
**Context:** PR #26623: Update KleidiCV to version 0.3
**Review Line:** 9

**Code Changes:**
```diff
   option(KLEIDICV_ENABLE_SME2 "" OFF) # not compatible with some CLang versions in NDK
   include("${KLEIDICV_SOURCE_PATH}/adapters/opencv/CMakeLists.txt")
+  # HACK to suppress adapters/opencv/kleidicv_hal.cpp:343:12: warning: unused function 'from_opencv' [-Wunused-function]
+  target_compile_options( kleidicv_hal PRIVATE
+      $<TARGET_PROPERTY:kleidicv,COMPILE_OPTIONS>
+      "-Wno-old-style-cast" "-Wno-unused-function"
+  )
 endif()
-
```

Review comment:
I tried it. Most probably the issue is that the ocv_disable_warning works well inside the cmake "project" scope, but does not outside.
**File:** 3rdparty/fastcv/src/fastcv_hal_imgproc.cpp
**Change Type:** modified
**Context:** PR #26619: FastCV-based HAL for OpenCV acceleration 2ndpost-2

**Code Changes:**
```diff
@@ -743,4 +743,253 @@ int fastcv_hal_warpPerspective(
         CV_HAL_RETURN_NOT_IMPLEMENTED(cv::format("Src type:%s is not supported", cv::typeToString(src_type).c_str()));
 
     CV_HAL_RETURN(status, hal_warpPerspective);
+}
+
+class FcvPyrLoop_Invoker : public cv::ParallelLoopBody
+{
+public:
+
```

Review comment:
I propose to add at least CV_Assert here. Just for the case, if invoker code will be changed incorrectly in future.
**File:** 3rdparty/fastcv/src/fastcv_hal_imgproc.cpp
**Change Type:** modified
**Context:** PR #26619: FastCV-based HAL for OpenCV acceleration 2ndpost-2

**Code Changes:**
```diff
@@ -743,4 +743,253 @@ int fastcv_hal_warpPerspective(
         CV_HAL_RETURN_NOT_IMPLEMENTED(cv::format("Src type:%s is not supported", cv::typeToString(src_type).c_str()));
 
     CV_HAL_RETURN(status, hal_warpPerspective);
+}
+
+class FcvPyrLoop_Invoker : public cv::ParallelLoopBody
+{
+public:
+
```

Review comment:
which param do you think we should add assert? or I can return CV_HAL_ERROR_NOT_IMPLEMENTED
**File:** 3rdparty/fastcv/src/fastcv_hal_imgproc.cpp
**Change Type:** modified
**Context:** PR #26619: FastCV-based HAL for OpenCV acceleration 2ndpost-2

**Code Changes:**
```diff
@@ -743,4 +743,253 @@ int fastcv_hal_warpPerspective(
         CV_HAL_RETURN_NOT_IMPLEMENTED(cv::format("Src type:%s is not supported", cv::typeToString(src_type).c_str()));
 
     CV_HAL_RETURN(status, hal_warpPerspective);
+}
+
+class FcvPyrLoop_Invoker : public cv::ParallelLoopBody
+{
+public:
+
```

Review comment:
which param do you think we should add assert? or I can raise some error messages as it already in parallel we can't return CV_HAL_ERROR_NOT_IMPLEMENTED
**File:** 3rdparty/fastcv/src/fastcv_hal_imgproc.cpp
**Change Type:** modified
**Context:** PR #26619: FastCV-based HAL for OpenCV acceleration 2ndpost-2

**Code Changes:**
```diff
@@ -743,4 +743,253 @@ int fastcv_hal_warpPerspective(
         CV_HAL_RETURN_NOT_IMPLEMENTED(cv::format("Src type:%s is not supported", cv::typeToString(src_type).c_str()));
 
     CV_HAL_RETURN(status, hal_warpPerspective);
+}
+
+class FcvPyrLoop_Invoker : public cv::ParallelLoopBody
+{
+public:
+
```

Review comment:
You can use just `CV_Error()` statement then. The branch should not be reachable in normal configuration.
**File:** 3rdparty/fastcv/include/fastcv_hal_imgproc.hpp
**Change Type:** modified
**Context:** PR #26619: FastCV-based HAL for OpenCV acceleration 2ndpost-2
**Review Line:** 117

**Code Changes:**
```diff
@@ -20,7 +20,12 @@
 #define cv_hal_gaussianBlurBinomial fastcv_hal_gaussianBlurBinomial
 #undef  cv_hal_warpPerspective
 #define cv_hal_warpPerspective      fastcv_hal_warpPerspective
-
+#undef  cv_hal_pyrdown
+#define cv_hal_pyrdown              fastcv_hal_pyrdown
+#undef  cv_hal_cvtBGRtoHSV
+#define cv_hal_cvtBGRtoHSV          fastcv_hal_cvtBGRtoHSV
+#undef  cv_hal_cvtBGRtoYUVApprox
+#define cv_hal_cvtBGRtoYUVApprox    fastcv_hal_cvtBGRtoYUVApprox
 ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
 /// @brief Calculate medianBlur filter
 /// @param src_data Source image data
@@ -88,33 +93,6 @@ int fastcv_hal_sobel(
```

Review comment:
Why is it removed? M.b. rebase issue?
**File:** 3rdparty/fastcv/src/fastcv_hal_imgproc.cpp
**Change Type:** modified
**Context:** PR #26619: FastCV-based HAL for OpenCV acceleration 2ndpost-2

**Code Changes:**
```diff
@@ -743,4 +743,253 @@ int fastcv_hal_warpPerspective(
         CV_HAL_RETURN_NOT_IMPLEMENTED(cv::format("Src type:%s is not supported", cv::typeToString(src_type).c_str()));
 
     CV_HAL_RETURN(status, hal_warpPerspective);
+}
+
+class FcvPyrLoop_Invoker : public cv::ParallelLoopBody
+{
+public:
+
```

Review comment:
I propose to use local variable on stack. new is redundant here. Also it's not deleted afterwards.
**File:** 3rdparty/fastcv/src/fastcv_hal_imgproc.cpp
**Change Type:** modified
**Context:** PR #26619: FastCV-based HAL for OpenCV acceleration 2ndpost-2
**Review Line:** 907

**Code Changes:**
```diff
+    int             scn,
+    bool            swapBlue,
+    bool            isFullRange,
+    bool            isHSV)
+{
+    if(width * height > 640 * 480)
+    {
+        CV_HAL_RETURN_NOT_IMPLEMENTED("input size not supported");
+    }
+    if(scn != 3 || depth != CV_8U)
+    {
```

Review comment:
Are you sure in sign? Does it work for small sizes only?
**File:** 3rdparty/fastcv/src/fastcv_hal_imgproc.cpp
**Change Type:** modified
**Context:** PR #26619: FastCV-based HAL for OpenCV acceleration 2ndpost-2

**Code Changes:**
```diff
@@ -743,4 +743,253 @@ int fastcv_hal_warpPerspective(
         CV_HAL_RETURN_NOT_IMPLEMENTED(cv::format("Src type:%s is not supported", cv::typeToString(src_type).c_str()));
 
     CV_HAL_RETURN(status, hal_warpPerspective);
+}
+
+class FcvPyrLoop_Invoker : public cv::ParallelLoopBody
+{
+public:
+
```

Review comment:
`!isHSV || !isFullRange`?
**File:** 3rdparty/fastcv/src/fastcv_hal_imgproc.cpp
**Change Type:** modified
**Context:** PR #26619: FastCV-based HAL for OpenCV acceleration 2ndpost-2

**Code Changes:**
```diff
@@ -743,4 +743,253 @@ int fastcv_hal_warpPerspective(
         CV_HAL_RETURN_NOT_IMPLEMENTED(cv::format("Src type:%s is not supported", cv::typeToString(src_type).c_str()));
 
     CV_HAL_RETURN(status, hal_warpPerspective);
+}
+
+class FcvPyrLoop_Invoker : public cv::ParallelLoopBody
+{
+public:
+
```

Review comment:
`!swapBlue`
**File:** 3rdparty/fastcv/src/fastcv_hal_imgproc.cpp
**Change Type:** modified
**Context:** PR #26619: FastCV-based HAL for OpenCV acceleration 2ndpost-2

**Code Changes:**
```diff
@@ -743,4 +743,253 @@ int fastcv_hal_warpPerspective(
         CV_HAL_RETURN_NOT_IMPLEMENTED(cv::format("Src type:%s is not supported", cv::typeToString(src_type).c_str()));
 
     CV_HAL_RETURN(status, hal_warpPerspective);
+}
+
+class FcvPyrLoop_Invoker : public cv::ParallelLoopBody
+{
+public:
+
```

Review comment:
The same for bools.
**File:** 3rdparty/fastcv/src/fastcv_hal_imgproc.cpp
**Change Type:** modified
**Context:** PR #26619: FastCV-based HAL for OpenCV acceleration 2ndpost-2

**Code Changes:**
```diff
@@ -743,4 +743,253 @@ int fastcv_hal_warpPerspective(
         CV_HAL_RETURN_NOT_IMPLEMENTED(cv::format("Src type:%s is not supported", cv::typeToString(src_type).c_str()));
 
     CV_HAL_RETURN(status, hal_warpPerspective);
+}
+
+class FcvPyrLoop_Invoker : public cv::ParallelLoopBody
+{
+public:
+
```

Review comment:
> The same for bools. Added the suggested fixes
**File:** 3rdparty/fastcv/include/fastcv_hal_imgproc.hpp
**Change Type:** modified
**Context:** PR #26619: FastCV-based HAL for OpenCV acceleration 2ndpost-2
**Review Line:** 117

**Code Changes:**
```diff
@@ -20,7 +20,12 @@
 #define cv_hal_gaussianBlurBinomial fastcv_hal_gaussianBlurBinomial
 #undef  cv_hal_warpPerspective
 #define cv_hal_warpPerspective      fastcv_hal_warpPerspective
-
+#undef  cv_hal_pyrdown
+#define cv_hal_pyrdown              fastcv_hal_pyrdown
+#undef  cv_hal_cvtBGRtoHSV
+#define cv_hal_cvtBGRtoHSV          fastcv_hal_cvtBGRtoHSV
+#undef  cv_hal_cvtBGRtoYUVApprox
+#define cv_hal_cvtBGRtoYUVApprox    fastcv_hal_cvtBGRtoYUVApprox
 ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
 /// @brief Calculate medianBlur filter
 /// @param src_data Source image data
@@ -88,33 +93,6 @@ int fastcv_hal_sobel(
```

Review comment:
> Why is it removed? M.b. rebase issue? It was added here by mistake, will be added in 3rd PR [opencv/opencv#26621](https://github.com/opencv/opencv/pull/26621)
**File:** 3rdparty/fastcv/src/fastcv_hal_imgproc.cpp
**Change Type:** modified
**Context:** PR #26619: FastCV-based HAL for OpenCV acceleration 2ndpost-2
**Review Line:** 907

**Code Changes:**
```diff
+    int             scn,
+    bool            swapBlue,
+    bool            isFullRange,
+    bool            isHSV)
+{
+    if(width * height > 640 * 480)
+    {
+        CV_HAL_RETURN_NOT_IMPLEMENTED("input size not supported");
+    }
+    if(scn != 3 || depth != CV_8U)
+    {
```

Review comment:
> Are you sure in sign? Does it work for small sizes only? Currently yes, we will add more resolutions later on.
**File:** 3rdparty/fastcv/src/fastcv_hal_imgproc.cpp
**Change Type:** modified
**Context:** PR #26617: FastCV-based HAL for OpenCV acceleration 2ndpost-1

**Code Changes:**
```diff
@@ -34,7 +34,7 @@ int fastcv_hal_medianBlur(
 
     INITIALIZATION_CHECK;
 
-    fcvStatus status;
+    fcvStatus status = FASTCV_SUCCESS;
     int fcvFuncType = FCV_MAKETYPE(ksize,depth);
 
     switch (fcvFuncType)
@@ -52,6 +52,101 @@ int fastcv_hal_medianBlur(
```

Review comment:
Can you get rid of memcopy?
**File:** 3rdparty/fastcv/src/fastcv_hal_imgproc.cpp
**Change Type:** modified
**Context:** PR #26617: FastCV-based HAL for OpenCV acceleration 2ndpost-1

**Code Changes:**
```diff
@@ -34,7 +34,7 @@ int fastcv_hal_medianBlur(
 
     INITIALIZATION_CHECK;
 
-    fcvStatus status;
+    fcvStatus status = FASTCV_SUCCESS;
     int fcvFuncType = FCV_MAKETYPE(ksize,depth);
 
     switch (fcvFuncType)
@@ -52,6 +52,101 @@ int fastcv_hal_medianBlur(
```

Review comment:
The same question on copy.
**File:** 3rdparty/fastcv/src/fastcv_hal_imgproc.cpp
**Change Type:** modified
**Context:** PR #26617: FastCV-based HAL for OpenCV acceleration 2ndpost-1

**Code Changes:**
```diff
@@ -34,7 +34,7 @@ int fastcv_hal_medianBlur(
 
     INITIALIZATION_CHECK;
 
-    fcvStatus status;
+    fcvStatus status = FASTCV_SUCCESS;
     int fcvFuncType = FCV_MAKETYPE(ksize,depth);
 
     switch (fcvFuncType)
@@ -52,6 +52,101 @@ int fastcv_hal_medianBlur(
```

Review comment:
OK, I got why you need extra buffer and memcpy. Please add comment why you did it into the code. it's not obvious for readers.
**File:** 3rdparty/fastcv/src/fastcv_hal_imgproc.cpp
**Change Type:** modified
**Context:** PR #26617: FastCV-based HAL for OpenCV acceleration 2ndpost-1

**Code Changes:**
```diff
@@ -34,7 +34,7 @@ int fastcv_hal_medianBlur(
 
     INITIALIZATION_CHECK;
 
-    fcvStatus status;
+    fcvStatus status = FASTCV_SUCCESS;
     int fcvFuncType = FCV_MAKETYPE(ksize,depth);
 
     switch (fcvFuncType)
@@ -52,6 +52,101 @@ int fastcv_hal_medianBlur(
```

Review comment:
The same proposal.
**File:** 3rdparty/fastcv/src/fastcv_hal_imgproc.cpp
**Change Type:** modified
**Context:** PR #26617: FastCV-based HAL for OpenCV acceleration 2ndpost-1

**Code Changes:**
```diff
@@ -34,7 +34,7 @@ int fastcv_hal_medianBlur(
 
     INITIALIZATION_CHECK;
 
-    fcvStatus status;
+    fcvStatus status = FASTCV_SUCCESS;
     int fcvFuncType = FCV_MAKETYPE(ksize,depth);
 
     switch (fcvFuncType)
@@ -52,6 +52,101 @@ int fastcv_hal_medianBlur(
```

Review comment:
when the input is ROI, we need additional lines to on top and bottom to be border, for example ksize is 3, we need 1 more line at top and 1 more line at bottom, the input height for fastcv function will become range.end-range.start+2, we use a tmp var to store this result and use memcpy to copy it back to dst. But now I have removed memcpy and use cv::Mat and copyTo function, will update the code later.
**File:** modules/calib3d/src/calibration.cpp
**Change Type:** modified
**Context:** PR #26490: Switch calibration.cpp to C++

**Code Changes:**
```diff
@@ -58,8 +58,6 @@
 
 namespace cv {
 
-static const char* cvDistCoeffErr = "Distortion coefficients must be 1x4, 4x1, 1x5, 5x1, 1x8, 8x1, 1x12, 12x1, 1x14 or 14x1 floating-point vector";
-
 static void initIntrinsicParams2D( const Mat& objectPoints,
                          const Mat& imagePoints, const Mat& npoints,
                          Size imageSize, OutputArray cameraMatrix,
@@ -165,51 +163,39 @@ static void subMatrix(const Mat& src, Mat& dst,
```

Review comment:
most probably is not needed.
**File:** modules/calib3d/src/calibration.cpp
**Change Type:** modified
**Context:** PR #26490: Switch calibration.cpp to C++

**Code Changes:**
```diff
@@ -58,8 +58,6 @@
 
 namespace cv {
 
-static const char* cvDistCoeffErr = "Distortion coefficients must be 1x4, 4x1, 1x5, 5x1, 1x8, 8x1, 1x12, 12x1, 1x14 or 14x1 floating-point vector";
-
 static void initIntrinsicParams2D( const Mat& objectPoints,
                          const Mat& imagePoints, const Mat& npoints,
                          Size imageSize, OutputArray cameraMatrix,
@@ -165,51 +163,39 @@ static void subMatrix(const Mat& src, Mat& dst,
```

Review comment:
Indeed: I just wanted to staty close to the 5.x version. I also removed the commented out `cout` code
**File:** modules/calib3d/src/solvepnp.cpp
**Change Type:** modified
**Context:** PR #19253: Unexpected exception in solvePnPRansac caused by input points

**Code Changes:**
```diff
@@ -311,18 +311,42 @@ bool solvePnPRansac(InputArray _opoints, InputArray _ipoints,
 
     opoints_inliers.resize(npoints1);
     ipoints_inliers.resize(npoints1);
-    result = solvePnP(opoints_inliers, ipoints_inliers, cameraMatrix,
-                      distCoeffs, rvec, tvec, useExtrinsicGuess,
-                      (flags == SOLVEPNP_P3P || flags == SOLVEPNP_AP3P) ? SOLVEPNP_EPNP : flags) ? 1 : -1;
+    try
+    {
+        result = solvePnP(opoints_inliers, ipoints_inliers, cameraMatrix,
```

Review comment:
I believe it is a little bit more complex. When 3D points are not planar, `cvFindExtrinsicCameraParams2` uses DLT algorithm which indeed requires at least 6 points. But with coplanar 3D points, `cvFindExtrinsicCameraParams2` should work with at least 4 points. --- BTW, see here: https://github.com/opencv/opencv/issues/8782 my previous comment about the behavior of `solvePnPRansac` and this PR: https://github.com/opencv/opencv/pull/9086 In my opinion, behavior of `solvePnPRansac` is still not totally clear / intuitive.