- read_image (Image, '210923alfvkjbkq7kfh7vv.png')
- decompose3 (Image, ImageR, ImageG, ImageB)
- gen_rectangle1 (ROI_0, 653.946, 441.468, 910.38, 690.718)
- reduce_domain (ImageG, ROI_0, ImageReduced)
- threshold (ImageReduced, Region, 0, 50)
- opening_circle (Region, RegionOpening, 3.5)
- closing_circle (RegionOpening, RegionClosing, 3.5)
- connection (RegionClosing, ConnectedRegions)
- select_shape (ConnectedRegions, SelectedRegions, ['circularity','width'], 'and', [0.85,15], [1,25])
- gen_contour_region_xld (SelectedRegions, Contours, 'border')
- fit_circle_contour_xld (Contours, 'algebraic', -1, 0, 0, 3, 2, Row, Column, Radius, StartPhi, EndPhi, PointOrder)
- gen_circle_contour_xld (ContCircle, Row, Column, Radius, StartPhi, EndPhi, 'positive', 1)
- gen_cross_contour_xld (Cross, Row, Column, 16, rad(45))
- gen_region_polygon_filled (Region2, Row, Column)
- shape_trans (Region2, RegionTrans, 'rectangle1')
- smallest_rectangle1 (RegionTrans, Row1, Col1, Row2, Col2)
- RowSteps := Row2 - Row1
- ColSteps := Col2 - Col1
- RowTL := Row1 - 5*RowSteps
- ColTL := Col1 - 2*ColSteps
- RowBR := Row2 + 4*RowSteps
- ColBR := Col2 + 2*ColSteps
- gen_rectangle1 (Rectangle, RowTL, ColTL, RowBR, ColBR)
- partition_rectangle (Rectangle, Partitioned, ColSteps, RowSteps)
复制代码
|