Halcon快速入门笔记14

read_image (Image1, ‘I:/Halcon练习/练习14/1.png’)
get_image_size(Image1, Width, Height)
dev_close_window()
dev_open_window(0, 0, Width/2, Height/2, ‘black’, WindowHandle)
dev_display(Image1)
*框选ROI区域
draw_rectangle1(WindowHandle, Row1, Column1, Row2, Column2)
gen_rectangle1(Rectangle, Row1, Column1, Row2, Column2)
*图像处理
reduce_domain(Image1, Rectangle, ImageReduced)
mean_image(ImageReduced, ImageMean, 21, 21)
dyn_threshold (ImageReduced, ImageMean, RegionDynThresh, 5, ‘light’)
*connection(RegionDynThresh, ConnectedRegions)

本文来自博客园,作者:{视觉人机器视觉},转载请注明原文链接:https://www.cnblogs.com/visionman/p/17405202.html
浙公网安备 33010602011771号