halcon中将xld轮廓或者region区域绘制在图像上并保存

1)单通道图像的绘制

draw_circle (WindowHandle, Row, Column, Radius)
gen_circle (Circle, Row, Column, Radius)
paint_region (Circle, Image, ImageR, 0, 'fill')
paint_region (Circle, Image, ImageG, 255, 'fill')
paint_region (Circle, Image, ImageB, 0, 'fill')
compose3 (ImageR, ImageG, ImageB, MultiChannelImage)
*保存图像
write_image (MultiChannelImage1,'bmp' , 0, 'C:/Users/世纪森林/Desktop/picture/region转图像.bmp')

2)多通道图像的绘制

draw_circle (WindowHandle, Row, Column, Radius)
gen_circle (Circle, Row, Column, Radius)
paint_region (Circle, MultiChannelImage1, ImageResult, [0,255,0], 'fill')



posted @ 2024-11-10 09:39  double64  阅读(43)  评论(0编辑  收藏  举报