1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-30 15:53:03 +04:00

Merge pull request #27378 from spacemit-com:4.x

Add canny, scharr and sobel for riscv-rvv hal. #27378

### Pull Request Readiness Checklist

See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request

- [x] I agree to contribute to the project under Apache 2 License.
- [x] To the best of my knowledge, the proposed patch is not based on a code under GPL or another license that is incompatible with OpenCV
- [x] The PR is proposed to the proper branch
- [ ] There is a reference to the original bug report and related work
- [ ] There is accuracy test, performance test and test data in opencv_extra repository, if applicable
      Patch to opencv_extra has the same branch name.
- [ ] The feature is well documented and sample code can be built with the project CMake
This commit is contained in:
damon-spacemit
2025-08-27 01:05:08 +08:00
committed by GitHub
parent ad560f69f4
commit ad22d482e6
4 changed files with 2460 additions and 0 deletions
+23
View File
@@ -241,6 +241,29 @@ int integral(int depth, int sdepth, int sqdepth,
//#undef cv_hal_integral
//#define cv_hal_integral cv::rvv_hal::imgproc::integral
/* ############ scharr ############ */
int scharr(const uint8_t *src_data, size_t src_step, uint8_t *dst_data, size_t dst_step, int width, int height, int src_depth, int dst_depth, int cn, int margin_left, int margin_top, int margin_right, int margin_bottom, int dx, int dy, double scale, double delta, int border_type);
#undef cv_hal_scharr
#define cv_hal_scharr cv::rvv_hal::imgproc::scharr
/* ############ sobel ############ */
int sobel(const uint8_t *src_data, size_t src_step, uint8_t *dst_data, size_t dst_step, int width, int height, int src_depth, int dst_depth, int cn, int margin_left, int margin_top, int margin_right, int margin_bottom, int dx, int dy, int ksize, double scale, double delta, int border_type);
#undef cv_hal_sobel
#define cv_hal_sobel cv::rvv_hal::imgproc::sobel
/* ############ canny ############ */
int canny(const uint8_t *src_data, size_t src_step,
uint8_t *dst_data, size_t dst_step,
int width, int height, int cn,
double low_thresh, double high_thresh,
int ksize, bool L2gradient);
#undef cv_hal_canny
#define cv_hal_canny cv::rvv_hal::imgproc::canny
#endif // CV_HAL_RVV_1P0_ENABLED
#if CV_HAL_RVV_071_ENABLED