【區域與區域】
交集:intersection (區域1, 區域2, 交集圖)
並集:union2(區域1,區域2,並集圖)
補集(差異的區域):difference(大區域,小區域,補集圖),或 complement (Region, 整幅圖內Region的補集)
【收集篩選的Region】
area_center (ConnectedRegions, Area, Row, Column) *先創建空Region,用來收集篩選的Region gen_empty_region (EmptyRegion) for i := 0 to |Row|-1 by 1
if (滿足某個條件) *把滿足條件的Region收集到EmptyRegion中,注意select_obj的索引從1開始 select_obj (ConnectedRegions, ObjectSelected, i+1) union2 (ObjectSelected, EmptyRegion, EmptyRegion) endif endfor *最終EmptyRegion集結了所有滿足條件的Region
【圖與區域】
圖縮放到區域中:reduce_domain (圖, 區域, 縮放到區域的圖)
【灰度圖的交、補】
即共同部分,差異部分。
* 開、閉運算后,求不同部分、相同部分 gray_opening_shape (Image, ImageOpening, 7, 7, 'octagon') gray_closing_shape (Image, ImageClosing, 7, 7, 'octagon') dyn_threshold (ImageOpening, ImageClosing, RegionDynThresh, 75, 'not_equal') dyn_threshold (ImageOpening, ImageClosing, RegionDynThresh, 75, 'equal')