- The kernel masks suggested by you do not sum to 0, which means you will end up changing the pixel intensities, the masks [-1 0 1 ; -2 0 2; -1 0 1] and [-1 -2 -1 ; 0 0 0 ; 1 2 1] sum to 0 and are mathematically calculating the 2nd derivative in X and y direction
- Edge detection is about finding differences in pixel intensities in X and Y direction and your suggested mask is certainly not doing that
Edge detection with edge function in matlab
3 次查看(过去 30 天)
显示 更早的评论
Dear Forum Member,
I have a problem on detecting edge using edge function in matlab, i know that i can detect edge using canny method, the step is : # Image Smhoothing # Edge strength detection -> here we can use different operator, sobel,prewitt etc # Non maxima suppression to do thinning # and finally hysterisis thresholding
when i use edge function in matlab i am aware that there are several choise of operator, but can i define my own custom direction kernel for sobel operator ?
because usually sobel use this direction kernel, i think this is the default in matlab function:
maskX = [-1 0 1 ; -2 0 2; -1 0 1]; maskY = [-1 -2 -1 ; 0 0 0 ; 1 2 1] ;
in my case i want to change the direction kernel to this one :
maskX = [5 5 5 ; -3 0 -3; -3 -3 -3]; maskY = [5 5 5 ; -3 0 -3 ; -3 -3 -3] ;
0 个评论
回答(1 个)
Sarvesh Kale
2023-1-31
You cannot use maskX = [5 5 5 ; -3 0 -3; -3 -3 -3]; maskY = [5 5 5 ; -3 0 -3 ; -3 -3 -3] ; as your masks, here are the following reasons
Hope the above explanation helps.
0 个评论
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!