Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 9 commits into
base: 4.x
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions hal/riscv-rvv/include/imgproc.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,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
Expand Down
Loading