Edge detection at a certain degree without using specific filter

3 次查看(过去 30 天)
I am using MATLAB. I want to do edge detection, But I need the edges at a certain degree (i.e 37 or 59 etc), and I don not want to use specific filters such as sobel, canny, etc. how can i do that?

回答(1 个)

Pratham Shah
Pratham Shah 2023-3-28
This is the example to detect diagonal images. If you want to detect edges of soecific angle you may make your own filter and use 'imfilter'. For 37 or 59 degree you have to make a filter of more size i.e 5x5 or 7x7 or 9x9
diag=[-1 -1 0 ;-1 0 1;0 1 1];
det=imfilter(I,diag);
Hope this helps :)

Community Treasure Hunt

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

Start Hunting!

Translated by