【数字图像处理原理与实践matlab】——边缘检测

边缘检测

  • 利用梯度算子进行边缘检测

    • BW =edge( I,type,thresh,direction,‘nothinning’)

    • type: ‘roberts’、‘sobel’、‘prewitt’(算子选择)

    • thresh:敏感度预置参数。灰度低于预置的边缘将不会被检测到。(系统自动设定参数)

    • direction:‘vertical’、‘horizontal’、‘both’

    • ‘nothinning’:无细节处理,默认’thinning’

      I = imread('C:\Users\Lenovo\Desktop\lena.jpg');
      I= rgb2gray(I);
      BW1 = edge(I,'roberts');
      BW2 = edge(I,'sobel');
      BW3 = edge(I,'prewitt');
      figure
      subplot(2,2,1),imshow(I),title('orignal')
      subplot(2,2,2),imshow(BW1),title('roberts')
      subplot(2,2,3),imshow(BW2),title('sobel')
      subplot(2,2,4),imshow(BW3),title('prewitt')
      
  • 带方向的边缘检测:Robinson算子

  • N=[1,2,1
        0,0,0
        -1,-2,-1];
    edge_n = imfilter(I,N,'symme
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值