matlab调用Susan函数
时间: 2024-06-08 15:11:10 浏览: 67
Susan算子是一种边缘检测算法,Matlab中可以通过调用Image Processing Toolbox中的edge函数来实现。具体操作步骤如下:
1. 读取图像并转换为灰度图像
```
I = imread('test.jpg');
Igray = rgb2gray(I);
```
2. 调用edge函数进行Susan算子边缘检测
```
bw = edge(Igray,'Susan',0.2);
```
其中,第一个参数为灰度图像,第二个参数为算子类型,这里选择Susan算子,第三个参数为算子的阈值,可以根据实际情况调整。
3. 显示边缘检测结果
```
imshow(bw);
```
完整代码如下:
```
I = imread('test.jpg');
Igray = rgb2gray(I);
bw = edge(Igray,'Susan',0.2);
imshow(bw);
```
阅读全文
相关推荐















