read_image (Image, 'D:/图像文件/图片/图片/电容/20230609-142029-0.bmp')
*region
binary_threshold (Image, Region, 'max_separability', 'light', UsedThreshold)
* threshold (Image, Regions, 98, 255)
* auto_threshold (Image, Regions3, 2)
*xld
gen_contour_region_xld (Region, Contours, 'border')
*膨胀
dilation_rectangle1 (Region, RegionDilation, 10, 10)
*腐蚀
erosion_rectangle1 (Region, RegionErosion, 11, 11)
connection (Region, ConnectedRegions)
select_shape (RegionErosion, SelectedRegions, 'area', 'and', 460, 99999)
opening_rectangle1 (ConnectedRegions, RegionOpening1, 10, 10)
*开运算(先进行腐蚀运算再进行膨胀运算,可以消除离散点和"毛刺",可以将两个物体分开。)
read_image (Image1, 'D:/图像文件/企业微信截图_16984616481389.png')
binary_threshold (Image1, Region1, 'max_separability', 'light', UsedThreshold1)
opening_rectangle1 (Region1, RegionOpening, 10, 10)
*闭运算(先进行膨胀运算再进行腐蚀运行,可以填充图像的内部孔洞和图像的凹角点,可以把两个邻近的目标连接起来。)
read_image (Image2, 'D:/图像文件/企业微信截图_16984617656136.png')
binary_threshold (Image2, Region2, 'max_separability', 'light', UsedThreshold1)
closing_rectangle1 (Region2, RegionClosing, 10, 10)
area_center (RegionClosing, Area, Row, Column)