better detection of -45 degree line edges using kernel

6 views (last 30 days)
Hi... From a grayscale image Im using this kernel to detect -45 line edges
kernel=[2 -1 -1;-1 2 -1;-1 -1 2];
Ledgeimage = imfilter(MygrayscaleIMage ,kernel);
But line edges detected are not as bright and clear when compared with canny edge filter. Is there anything more I have to do if want to detect line edges as bright as canny.Because canny is detecting every line edges and I want to detect only -45 degree lines

Answers (2)

bym
bym on 9 Nov 2011
maybe take a look at
hough()
houghlines()

David Young
David Young on 9 Nov 2011
First, this is a bar detector, not an edge detector, so it isn't comparable with the Canny edge detector.
Second, an important part of the Canny detector is smoothing with a Gaussian kernel to select the right scale. You might improve the performance of your detector if you do some smoothing too.
Third, the Canny process follows up the convolution (which is what the call to imfilter does) with a thresholding step. If you want a binary output image, you will also need to do thresholding.

Products

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!