在使用Halcon自身软件,或者使用HalconDotNet.hWindowControl在连续采集图像、绑定鼠标事件或高速刷新图像时会出现闪烁问题
Halcon代码可以设置
set_window_param
read_image (Image1n, 'E:/Halcon数据/资源图片/左.bmp')
dev_close_window ()
get_image_pointer1 (Image1n, Pointer, Type, Width, Height)
dev_open_window (0, 0, Width/8, Height/8, 'black', WindowHandle)
dev_display (Image1n)
set_window_param (WindowHandle, 'flush', 'false')
gen_empty_obj (C)
for Index := 1 to Height/2 by 1
gen_circle_contour_xld (ContCircle, Height/2,Width/2, Index, 0, 6.28318, 'positive', 1)
concat_obj (C, ContCircle, C)
dev_display (Image1n)
dev_display (C)
flush_buffer (WindowHandle)
endfor
联合编程
HSystem.SetSystem("flush_graphic", "true");
hWindowControl1.HalconWindow.DispObj(obj);
HSystem.SetSystem("flush_graphic", "false");