read_image (Image, ‘printer_chip/printer_chip_01’)
*与轮廓(xld)相关关键字 contour polygon
dev_set_color (‘red’)
gen_rectangle1 (Rectangle, 18, 750, 277, 870)
dev_set_color (‘green’)
gen_rectangle1 (Rectangle1, 100, 760, 200, 860)
difference (Rectangle, Rectangle1, RegionDifference)
点、轮廓、区域
*区域——>轮廓
*‘border’ 边界像素的边界
*‘center’ 边界像素的中心
*‘border_holes’ 边界像素的边界并包含区域内“孔”的轮廓
dev_set_color (‘red’)
gen_contour_region_xld (RegionDifference, Contours1, ‘border’)
dev_set_color (‘green’)
gen_contour_region_xld (RegionDifference, Contours2, ‘center’)
dev_set_color (‘pink’)
gen_contour_region_xld (RegionDifference, Contours3, ‘border_holes’)
*区域——>点
get_region_points (RegionDifference, Rows, Columns)
*轮廓——>点
get_contour_xld (Contours1, Row, Col)
*轮廓——>区域
gen_region_contour_xld (Contours3, Region, ‘filled’)
*点——>轮廓
dev_set_draw (‘fill’)
gen_contour_polygon_xld (Contour, Row, Col)
*点——>区域
dev_set_draw (‘fill’)
gen_region_points (Region1, Row, Col)
edges_color_sub_pix (Image, Edges, ‘canny’, 1, 20, 40)