-
-
Notifications
You must be signed in to change notification settings - Fork 56.2k
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
base: 4.x
Are you sure you want to change the base?
Conversation
The PR triggers oom killer on Muse Pi v30 board:
The issue is stable. |
|
This comment was marked as outdated.
This comment was marked as outdated.
Thanks a lot for the fix. There is still failed test on CI:
the function under test heavily use Sobel filter. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got some build warnings from the toolchain:
/home/tao/workspace/fytao/k1/worktree/spacemit-imgproc-canny_scharr_sobel/opencv/hal/riscv-rvv/src/imgproc/sobel.cpp: In function 'int cv::rvv_hal::imgproc::sobel(const uint8_t*, size_t, uint8_t*, size_t, int, int, int, int, int, int, int, int, int, int, int, int, double, double, int)':
/home/tao/workspace/fytao/k1/worktree/spacemit-imgproc-canny_scharr_sobel/opencv/hal/riscv-rvv/src/imgproc/sobel.cpp:1051:48: warning: declaration of 'vrowx' shadows a previous local [-Wshadow]
1051 | vint16m8_t vrowx = __riscv_vle16_v_i16m8(target_trow + x, vl);
| ^~~~~
/home/tao/workspace/fytao/k1/worktree/spacemit-imgproc-canny_scharr_sobel/opencv/hal/riscv-rvv/src/imgproc/sobel.cpp:884:40: note: shadowed declaration is here
884 | vint16m8_t vrowx;
| ^~~~~
/home/tao/workspace/fytao/k1/worktree/spacemit-imgproc-canny_scharr_sobel/opencv/hal/riscv-rvv/src/imgproc/sobel.cpp:1868:48: warning: declaration of 'vrowx' shadows a previous local [-Wshadow]
1868 | vint16m8_t vrowx = __riscv_vle16_v_i16m8(target_trow + x, vl);
| ^~~~~
/home/tao/workspace/fytao/k1/worktree/spacemit-imgproc-canny_scharr_sobel/opencv/hal/riscv-rvv/src/imgproc/sobel.cpp:1710:40: note: shadowed declaration is here
1710 | vint16m8_t vrowx;
| ^~~~~
/home/tao/workspace/fytao/k1/worktree/spacemit-imgproc-canny_scharr_sobel/opencv/hal/riscv-rvv/src/imgproc/sobel.cpp:2679:50: warning: declaration of 'vrowx' shadows a previous local [-Wshadow]
2679 | vfloat32m8_t vrowx = __riscv_vle32_v_f32m8(target_trow + x, vl);
| ^~~~~
/home/tao/workspace/fytao/k1/worktree/spacemit-imgproc-canny_scharr_sobel/opencv/hal/riscv-rvv/src/imgproc/sobel.cpp:2519:42: note: shadowed declaration is here
2519 | vfloat32m8_t vrowx;
| ^~~~~
Besides, sanity checks failed from performance testings. Check with
# Get opencv_extra
git clone https://github.com/opencv/opencv_extra
export OPENCV_TEST_DATA_PATH=/path/to/opencv_extra/testdata
./build/bin/opencv_perf_imgproc --gtest_filter="*Img_Aperture_L2_thresholds*:*scharr*:*sobel*"
@damon-spacemit Friendly reminder |
Pull Request Readiness Checklist
See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request
Patch to opencv_extra has the same branch name.