diff --git a/adapters/opencv/kleidicv_hal.cpp b/adapters/opencv/kleidicv_hal.cpp index 4a6f0c68b9d99330eb8dfce0c9928a702671bad9..14afc0e3b6b27c4891e6c847a795389a71357f3e 100644 --- a/adapters/opencv/kleidicv_hal.cpp +++ b/adapters/opencv/kleidicv_hal.cpp @@ -347,7 +347,11 @@ int separable_filter_2d_init(cvhalFilter2D **context, int src_type, return CV_HAL_ERROR_NOT_IMPLEMENTED; } - if (anchor_x != -1 || anchor_y != -1) { + if (anchor_x > -1 && anchor_x != (kernelx_length >> 1)) { + return CV_HAL_ERROR_NOT_IMPLEMENTED; + } + + if (anchor_y > -1 && anchor_y != (kernely_length >> 1)) { return CV_HAL_ERROR_NOT_IMPLEMENTED; } diff --git a/doc/opencv.md b/doc/opencv.md index 57a7a5ef29ecac0c34b721ada04d32ad3e0e7498..431a8e21ad7a3d65670cae047304139c28807d89 100644 --- a/doc/opencv.md +++ b/doc/opencv.md @@ -104,7 +104,7 @@ In-place filtering 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)` are not supported. +* `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: