一、閾值分割
閾值分割算子眾多:
threshold :這是最基本最簡單的閾值算子。
binary_threshold :它是自動閾值算子,自動選出暗(dark)的區域,或者自動選出亮(light)的區域,理解起來並沒有難度。
dyn_threshold :該算子和dual_threshold和var_threshold的理解參考下文鏈接。
Halcon閾值化算子dual_threshold和var_threshold的理解
動態閾值需要一張模糊的圖片做對比,因此需要預處理圖像的算子。
預處理算子:
mean_image、binomial_filter:對圖像的一般預處理,用於消除噪聲。
median_image:抑制小斑點或者細線。
smooth_image:平滑圖像。
anisotropic_diffusion:平滑圖像的同時保留邊緣。
threshold_sub_pix :通過閾值分割,從圖像中提取具有亞像素精度的灰度邊緣。它不返回區域,而是將灰度值小於閾值的區域與灰度值大於閾值的區域分隔開。(XLD)
有個跟它非常類似的算子——edges_sub_pix。
二、XLD拼接
XLD合並操作:
union_collinear_contours_xld:合並在同一直線的XLD
union_cocircular_contours_xld:合並在同圓的XLD
union_adjacent_contours_xld:合並鄰近的XLD
以union_adjacent_contours_xld為例,用圖例說明一下XLD合並算子的原理。