diff --git a/adapters/opencv/kleidicv_hal.cpp b/adapters/opencv/kleidicv_hal.cpp index a4ec0112fe41f9795df7b967bc1d8b4c1c17dd4f..fafa50fc377eae7984d527831ef8ba0be891747a 100644 --- a/adapters/opencv/kleidicv_hal.cpp +++ b/adapters/opencv/kleidicv_hal.cpp @@ -647,7 +647,7 @@ int morphology_init(cvhalFilter2D **cvcontext, int operation, int src_type, #if !KLEIDICV_ENABLE_ALL_OPENCV_HAL // KleidiCV is not that fast on smaller kernels - if (kernel_width_sz < 5 || kernel_height < 5) { + if (kernel_width_sz < 5 || kernel_height_sz < 5) { return CV_HAL_ERROR_NOT_IMPLEMENTED; } #endif diff --git a/adapters/opencv/kleidicv_hal.h b/adapters/opencv/kleidicv_hal.h index ec8f232fa8e080f5aaf825f5c46ea4b5c3b7f0cb..ec420ebdc6a29027b1e14b7f9c99d68f3251b58d 100644 --- a/adapters/opencv/kleidicv_hal.h +++ b/adapters/opencv/kleidicv_hal.h @@ -236,6 +236,9 @@ static inline int kleidicv_threshold_with_fallback( #undef cv_hal_threshold #define cv_hal_threshold kleidicv_threshold_with_fallback +// TODO: implement 3x3 kernels and 8UC1 -> 16SC1 data type +#if KLEIDICV_ENABLE_ALL_OPENCV_HAL + // separable_filter_2d_init // no fallback, because it cannot be made sure that // separable_filter_2d_operation also uses the fallback @@ -254,6 +257,8 @@ static inline int kleidicv_threshold_with_fallback( #undef cv_hal_sepFilterFree #define cv_hal_sepFilterFree kleidicv::hal::separable_filter_2d_free +#endif // KLEIDICV_ENABLE_ALL_OPENCV_HAL + // gaussian_blur_binomial static inline int kleidicv_gaussian_blur_binomial_with_fallback( const uchar *src_data, size_t src_step, uchar *dst_data, size_t dst_step, diff --git a/conformity/opencv/tests.cpp b/conformity/opencv/tests.cpp index 926de68743d15d39c27fdb1ac19afb2894535492..bce00a81361e98e96fe059d77df18d3b3ca03623 100644 --- a/conformity/opencv/tests.cpp +++ b/conformity/opencv/tests.cpp @@ -23,9 +23,12 @@ static std::vector merge_tests( } std::vector all_tests = merge_tests({ + // clang-format off binary_op_tests_get, cvtcolor_tests_get, +#if KLEIDICV_ENABLE_ALL_OPENCV_HAL separable_filter_2d_tests_get, +#endif gaussian_blur_tests_get, rgb2yuv_tests_get, yuv2rgb_tests_get, @@ -36,6 +39,7 @@ std::vector all_tests = merge_tests({ scale_tests_get, min_max_tests_get, in_range_tests_get, + // clang-format on }); #if MANAGER diff --git a/doc/opencv.md b/doc/opencv.md index cd3c5c37c61fb85c122ab03a16b33d89763e23a0..ec4befa0c3387cf7513cff7825b5bd351bcac292 100644 --- a/doc/opencv.md +++ b/doc/opencv.md @@ -97,22 +97,6 @@ Notes on parameters: * `src.depth()` - only supports `CV_8U` depth. * `type` - currently only binary threshold operation is supported ([`cv::THRESH_BINARY`](https://docs.opencv.org/4.10.0/d7/d1b/group__imgproc__misc.html#ggaa9e58d2860d4afa658ef70a9b1115576a147222a96556ebc1d948b372bcd7ac59)). -### [`cv::sepFilter2D()`](https://docs.opencv.org/4.10.0/d4/d86/group__imgproc__filter.html#ga910e29ff7d7b105057d1625a4bf6318d) -Applies a separable linear filter to an image.\ -Currently only the 5x5 kernel size is supported with `CV_8U`, `CV_16U` or `CV_16S` depths for the source, destination and kernels.\ -In-place filtering is not supported. - -Notes on parameters: -* `src`, `dst`, `kernelX`, `kernelY` - the number of channels must match between source and destination. The types must match between source, destination and kernels. However, the kernels must have 1 channel. -* `anchor` - values other than `(-1, -1)` or the midpoints of the X and Y kernels respectively are not supported. -* `delta` - values other than `0.0` are not supported. -* `borderType` - pixel extrapolation method. -Supported [OpenCV border types](https://docs.opencv.org/4.10.0/d2/de8/group__core__array.html#ga209f2f4869e304c82d07739337eae7c5) are: - + `cv::BORDER_REPLICATE` - + `cv::BORDER_REFLECT` - + `cv::BORDER_WRAP` - + `cv::BORDER_REFLECT_101` - ### [`cv::GaussianBlur()`](https://docs.opencv.org/4.10.0/d4/d86/group__imgproc__filter.html#gaabe8c836e97159a9193fb0b11ac52cf1) Blurs an image using a Gaussian filter.\ The filter's standard deviation must be the same in horizontal and vertical directions (`sigmaX == sigmaY`).\