基於matlab的經典圖像邊緣檢測算法


 

圖像邊緣檢測算法

(1)Robert算子邊緣檢測

(2)Sobel算子邊緣檢測

(3)Prewitt算子邊緣檢測

(4)LOG算子邊緣檢測

(5)Canny邊緣檢測

 

 

 

 

 

 

Matlab的實現。

其實還只是掉包俠,一點算法沒有寫

爭取有空用openCV寫一遍

I=imread('1.jpg');
I0=rgb2gray(I);
subplot(231);
imshow(I);

BW1=edge(I0,'Roberts',0.16);
subplot(232);
imshow(BW1);
title('Robert算子邊緣檢測')

BW2=edge(I0,'Sobel',0.16);
subplot(233);
imshow(BW2);
title('Sobel算子邊緣檢測')

BW3=edge(I0,'Prewitt',0.16);
subplot(234);
imshow(BW3);
title('Prewitt算子邊緣檢測');

BW4=edge(I0,'LOG',0.012);
subplot(235);
imshow(BW4);
title('LOG算子邊緣檢測')

BW5=edge(I0,'Canny',0.2);
subplot(236);
imshow(BW5);
title('Canny算子邊緣檢測')

  

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM