roberts算子


*读取图片
read_image (Image, 'fabrik') *提取边缘
roberts (Image, ImageRoberts, 'roberts_max')
*二值化 threshold (ImageRoberts, Region, 9, 255) *提取骨架
skeleton (Region, Skeleton) dev_display (Image) dev_set_color ('red') dev_display (Skeleton)

=============================================

Roberts算子,又称罗伯茨算子,是一种最简单的算子,是一种利用局部差分算子寻找边缘的算子。

他采用对角线方向相邻两象素之差近似梯度幅值检测边缘。

检测垂直边缘的效果好于斜向边缘,定位精度高,对噪声敏感,无法抑制噪声的影响。 

 

roberts(Image : ImageRoberts : FilterType : )

Description

roberts calculates the first derivative of an image and is used as an edge operator. If the following mask describes a part of the image,

A B

C D
the different filter types are defined as follows:
'roberts_max' max(| A - D |,| B - C |)
'gradient_max' max(| A + B - (C + D)|,| A + C - (B + D)|)
'gradient_sum' |A + B - (C + D)| + |A + C - (B + D)|
If an overflow occurs the result is clipped. The result of the operator is stored at the pixel with the coordinates of "D".

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM