imgproc: add RVV optimization for spatialGradient

This commit is contained in:
Tiansuanyu
2026-05-18 22:25:43 +08:00
parent cd4d732442
commit 8798e7948a
4 changed files with 295 additions and 0 deletions

View File

@@ -113,6 +113,13 @@ void spatialGradient( InputArray _src, OutputArray _dx, OutputArray _dy,
// TODO: Allow for other kernel sizes
CV_Assert(ksize == 3);
CALL_HAL(spatialGradient, cv_hal_spatialGradient,
src.data, src.step,
dx.ptr<short>(), dx.step,
dy.ptr<short>(), dy.step,
src.cols, src.rows,
ksize, borderType);
// Get dimensions
const int H = src.rows,
W = src.cols;