edge函数使用

BW = edge(I)
采用灰度或一个二值化图像I作为它的输入,并返回一个与I相同大小的二值化图像BW,在函数检测到边缘的地方为1,其他地方为0。

BW = edge(I,'sobel') 自动选择阈值用Sobel算子进行边缘检测。

BW = edge(I,'sobel',thresh) 根据所指定的敏感度阈值thresh,用Sobel算子进行边缘检测,它忽略了所有小于阈值的边缘。当thresh为空时,自动选择阈值。

BW = edge(I,'sobel',thresh,direction) 根据所指定的敏感度阈值thresh,在所指定的方向direction上,用Sobel 算子进行边缘检测。Direction可取的字符串值为horizontal(水平方向)、vertical(垂直方向)或both(两个方向)。

[BW,thresh] = edge(I,'sobel',...) 返回阈值

BW = edge(I,'prewitt') 自动选择阈值用prewitt算子进行边缘检测。

BW = edge(I,'prewitt',thresh) 根据所指定的敏感度阈值thresh,用prewitt算子进行边缘检测,它忽略了所有小于阈值的边缘。当thresh为空时,自动选择阈值。

BW = edge(I,'prewitt',thresh,direction) 根据所指定的敏感度阈值thresh,在所指定的方向direction上,用prewitt算子进行边缘检测。Direction可取的字符串值为horizontal(水平方向)、vertical(垂直方向)或both(两个方向)默认方向为both。

[BW,thresh] = edge(I,'prewitt',...) 返回阈值

BW = edge(I,'roberts') 自动选择阈值用roberts算子进行边缘检测。

BW = edge(I,'roberts',thresh) 根据所指定的敏感度阈值thresh,用Roberts算子进行边缘检测,它忽略了所有小于阈值的边缘。当thresh为空时,自动选择阈值。 Matlab中文论坛

[BW,thresh] = edge(I,'roberts',...) 返回阈值

BW = edge(I,'log') 自动选择阈值用LOG算子进行边缘检测。

……很多啊,你还是help edge一下,里面有很多举例

猜你喜欢

转载自blog.csdn.net/sinat_39372048/article/details/82628657