diff --git a/hal/riscv-rvv/include/imgproc.hpp b/hal/riscv-rvv/include/imgproc.hpp index 58f750799f..ffe3f75f20 100644 --- a/hal/riscv-rvv/include/imgproc.hpp +++ b/hal/riscv-rvv/include/imgproc.hpp @@ -236,10 +236,8 @@ int integral(int depth, int sdepth, int sqdepth, uchar* tilted_data, [[maybe_unused]] size_t tilted_step, int width, int height, int cn); -// Diasbled due to accuracy issue. -// Details see https://github.com/opencv/opencv/issues/27407. -//#undef cv_hal_integral -//#define cv_hal_integral cv::rvv_hal::imgproc::integral +#undef cv_hal_integral +#define cv_hal_integral cv::rvv_hal::imgproc::integral /* ############ laplacian ############ */ int laplacian(const uint8_t* src_data, size_t src_step, diff --git a/hal/riscv-rvv/src/imgproc/integral.cpp b/hal/riscv-rvv/src/imgproc/integral.cpp index e0c7f44995..9a82538a2a 100644 --- a/hal/riscv-rvv/src/imgproc/integral.cpp +++ b/hal/riscv-rvv/src/imgproc/integral.cpp @@ -129,6 +129,11 @@ int integral(int depth, int sdepth, int sqdepth, return CV_HAL_ERROR_NOT_IMPLEMENTED; } + // CV_32F sqsum kept on generic path due to accumulation-order sensitivity, see #27407 + if (sqsum_data && (sdepth == CV_32F || sqdepth == CV_32F)) { + return CV_HAL_ERROR_NOT_IMPLEMENTED; + } + // Skip images that are too small if (!(width >> 8 || height >> 8)) { return CV_HAL_ERROR_NOT_IMPLEMENTED;