*利用面积对白色划痕区域进行选择,大于150的区域认为是划痕 connection (RegionClosing1, ConnectedRegions1) select_shape (ConnectedRegions1, SelectedRegions1, 'area', 'and', 150, 99999) closing_circle (SelectedRegions1, RegionClosing2, 20) union2 (RegionOpening, RegionClosing2, RegionUnion2) *动态阈值提取灰度值比周围暗的区域 dyn_threshold