本帖最后由 mediation 于 2019-9-30 11:26 编辑
read_image (Image120051kduutbgr88fby8uu, 'F:/002-龚惠斌/021-光检学习/00---案例学习/106-污痕/120051kduutbgr88fby8uu.jpeg')
rgb1_to_gray (Image120051kduutbgr88fby8uu, GrayImage)
threshold (GrayImage, Region, 10, 255)
connection (Region, ConnectedRegions)
select_shape (ConnectedRegions, SelectedRegions, 'outer_radius', 'and', 310, 325)
opening_circle (SelectedRegions, RegionOpening, 30.5)
gen_contour_region_xld(RegionOpening, Contours, 'border')
fit_circle_contour_xld (Contours, 'algebraic', -1, 0, 0, 3, 2, Row, Column, Radius, StartPhi, EndPhi, PointOrder)
polar_trans_image_ext (GrayImage, PolarTransImage, Row, Column, StartPhi, EndPhi, 135, 195, 6.28319*200, 80, 'nearest_neighbor')
emphasize (PolarTransImage, ImageEmphasize, 411, 31, 3)
threshold (ImageEmphasize, Region3, 0, 35)
connection (Region3, ConnectedRegions1)
select_shape (ConnectedRegions1, SelectedRegions1, 'area', 'and', 200, 99999)
polar_trans_region_inv (SelectedRegions1, XYTransRegion, Row, Column, StartPhi, EndPhi, 130, 195, Width, Height, 790, 660, 'nearest_neighbor')
|