1.threshold(Image : Region : MinGray, MaxGray : ):通过给定的阈值区间对图像进行分割
效果图:

read_image (Audi2, 'audi2')
fill_interlace (Audi2, ImageFilled, 'odd')
threshold (ImageFilled, Region, 0, 90)
2.binary_threshold(Image : Region : Method, LightDark : UsedThreshold):自动阈值分割,可以自动选择出'light' 区域或'dark' 区域,使用自动确定的全局阈值分割单通道图像,使用阈值方法Method有'max_separability' 和'smooth_histo'两个值,这两个值都是只应用在具有双峰直方图的图像(bin_threshold是过去时,新的应用程序应该使用binary_threshold)

reduce_domain (Image, RegionROI, ImageReduced)
binary_threshold (ImageReduced, RegionBackground, 'max_separability', 'dark', UsedThreshold)
3.dyn_threshold(OrigImage, ThresholdImage : RegionDynThresh : Offset, LightDark : ):使用局部阈值分割图像,首先需要对图像进行平滑处理(例如 mean_image, binomial_filter, gauss_filter等等),然后用原图与平滑后的图逐个像素作比较,可以根据参数分割出原图比平滑后的图灰度高(或者低)Offset个灰度值的区域。(Offset的值最好是在5到40之间)

本文详细介绍了Halcon中的多种阈值分割算子,包括threshold、binary_threshold、dyn_threshold、dual_threshold、auto_threshold、char_threshold、fast_threshold、hysteresis_threshold、local_threshold和watersheds_threshold。每个算子都通过具体示例进行说明,适用于不同的图像处理场景,帮助读者理解和应用这些功能强大的工具。
最低0.47元/天 解锁文章
8856

被折叠的 条评论
为什么被折叠?



