diff --git a/adapters/opencv/opencv-4.11.patch b/adapters/opencv/opencv-4.11.patch index 563f3deec03dee21066385e2cc6ebd50acd1500f..30962741c0d7da2feea1cc40ca6f3d5188dabb65 100644 --- a/adapters/opencv/opencv-4.11.patch +++ b/adapters/opencv/opencv-4.11.patch @@ -185,36 +185,6 @@ index dfc718bf87..c1f953f230 100644 } interpolation &= ~WARP_RELATIVE_MAP; -diff --git a/modules/imgproc/src/smooth.dispatch.cpp b/modules/imgproc/src/smooth.dispatch.cpp -index f7dafbd956..13c1341716 100644 ---- a/modules/imgproc/src/smooth.dispatch.cpp -+++ b/modules/imgproc/src/smooth.dispatch.cpp -@@ -655,6 +655,25 @@ void GaussianBlur(InputArray _src, OutputArray _dst, Size ksize, - ocl_GaussianBlur_8UC1(_src, _dst, ksize, CV_MAT_DEPTH(type), kx, ky, borderType) - ); - -+ { -+ Mat src = _src.getMat(); -+ Mat dst = _dst.getMat(); -+ -+ Point ofs; -+ Size wsz(src.cols, src.rows); -+ if(!(borderType & BORDER_ISOLATED)) -+ src.locateROI( wsz, ofs ); -+ -+ if (sigma1 == 0.0 && sigma2 == 0.0 && ksize.height == ksize.width) { -+ CALL_HAL(gaussianBlurBinomial, cv_hal_gaussianBlurBinomial, src.ptr(), src.step, dst.ptr(), dst.step, src.cols, src.rows, sdepth, cn, -+ ofs.x, ofs.y, wsz.width - src.cols - ofs.x, wsz.height - src.rows - ofs.y, ksize.width, borderType&~BORDER_ISOLATED); -+ } -+ -+ CALL_HAL(gaussianBlur, cv_hal_gaussianBlur, src.ptr(), src.step, dst.ptr(), dst.step, src.cols, src.rows, sdepth, cn, -+ ofs.x, ofs.y, wsz.width - src.cols - ofs.x, wsz.height - src.rows - ofs.y, ksize.width, ksize.height, -+ sigma1, sigma2, borderType&~BORDER_ISOLATED); -+ } -+ - if(sdepth == CV_8U && ((borderType & BORDER_ISOLATED) || !_src.isSubmatrix())) - { - std::vector fkx, fky; diff --git a/modules/imgproc/test/test_imgwarp_strict.cpp b/modules/imgproc/test/test_imgwarp_strict.cpp index 673c6f03e6..56d9e0b554 100644 --- a/modules/imgproc/test/test_imgwarp_strict.cpp diff --git a/conformity/opencv/test_gaussian_blur.cpp b/conformity/opencv/test_gaussian_blur.cpp index 776fbec2bf6499cedc230569d8d3e80d7e2e2226..d40bddd67631e741d39735ee3c8b5f7b200d6233 100644 --- a/conformity/opencv/test_gaussian_blur.cpp +++ b/conformity/opencv/test_gaussian_blur.cpp @@ -15,7 +15,8 @@ cv::Mat exec_gaussian_blur(cv::Mat& input) { cv::Mat input_mat = input.rowRange(0, input.rows - 2).clone(); cv::Size kernel(KernelSize, KernelSize); cv::Mat result; - cv::GaussianBlur(input_mat, result, kernel, sigma, sigma, BorderType); + cv::GaussianBlur(input_mat, result, kernel, sigma, sigma, BorderType, + cv::ALGO_HINT_APPROX); return result; } diff --git a/scripts/benchmark/build.sh b/scripts/benchmark/build.sh index c061f7480cc774d79c461695fec1a0a48ce0c3b2..237ad1374da2fe099375ce9c5ec20a2c8bc1a3f0 100755 --- a/scripts/benchmark/build.sh +++ b/scripts/benchmark/build.sh @@ -42,6 +42,7 @@ KLEIDICV_SOURCE_PATH="$(realpath "${SCRIPT_PATH}/..")" export COMMON_CMAKE_ARGS="\ -DANDROID_ABI=arm64-v8a \ -DBUILD_PERF_TESTS=ON \ + -DOPENCV_ALGO_HINT_DEFAULT=ALGO_HINT_APPROX \ " # ------------------------------------------------------------------------------ diff --git a/scripts/ci-opencv.sh b/scripts/ci-opencv.sh index 248b393f041cd31f71e7083b9b07056c5aaa91fa..8482cbc9808d5b7c35795c9ed1ac0826e6bbdbdd 100755 --- a/scripts/ci-opencv.sh +++ b/scripts/ci-opencv.sh @@ -51,6 +51,7 @@ EXTRA_CMAKE_ARGS="\ -DWITH_ADE=OFF \ -DWITH_LAPACK=OFF \ -DOPENCV_PYTHON_SKIP_DETECTION=ON \ + -DOPENCV_ALGO_HINT_DEFAULT=ALGO_HINT_APPROX \ -DCMAKE_COMPILE_WARNING_AS_ERROR=ON \ -DCMAKE_CXX_FLAGS=-Wno-nontrivial-memcall" \ ./scripts/build-opencv.sh diff --git a/scripts/run_opencv_conformity_checks.sh b/scripts/run_opencv_conformity_checks.sh index ab7183d1d55b6f77189fea0f555b3e4251c0e75f..6002ed2a76221e9708b12aa68742866460aa7657 100755 --- a/scripts/run_opencv_conformity_checks.sh +++ b/scripts/run_opencv_conformity_checks.sh @@ -59,6 +59,7 @@ common_cmake_args=( "-DWITH_ADE=OFF" "-DWITH_LAPACK=OFF" "-DOPENCV_PYTHON_SKIP_DETECTION=ON" + "-DOPENCV_ALGO_HINT_DEFAULT=ALGO_HINT_APPROX" ) if [[ -n "${OPENCV_VERSION}" ]]; then