SetSystem("use_window_thread", "true"); } public void ExcuteModel(HTuple hv_WindowHandle, HObject ho_image, HTuple hv_ModelID) { // Local control variables HTuple hv_Row1 = new HTuple(); HTuple hv_Column1 = new
相反,请将set_window_param的参数“flush”设置为“false”,并调用flush_buffer将缓冲区传输到图形窗口。 "int2_bits":图像缩放相关参数,-1为自动 "backing_store":定义是否刷新所有窗口 "icon_name":定义图形窗口的名称编号 "default_font" *):默认字体 "update_lut":是否使用系统默认颜色表 "use_window_thre...
注意凡是使用halcon线程函数的类中,在构造函数中添加如下代码 #ifdefined(_WIN32)SetSystem("use_window_thread","true");#endif Qt执行时竟然报上段代码的错误。VS打开pro运行没问题。 【一针见血的博客】 类的静态成员函数调用类非静态成员的方法
if (HalconAPI.isWindows) HOperatorSet.SetSystem("use_window_thread","true"); action(); } #endif #if !NO_EXPORT_MAIN // Main procedure /*===主要关注action函数===*/ private void action() { //定义halcon变量 HObject ho_Image, ho_Region; HTuple hv_Width = new HTuple(), hv_Height ...
为了避免编写用户代码来处理 HALCON 窗口的消息循环,可以指示 HALCON 通过 set_system(‘use_window_thread’,‘true’) 从一个特殊线程创建所有顶级 HALCON 窗口,然后也将关心消息循环。请注意,如果同时使用多个窗口,这可能会对性能产生负面影响,因为 HALCON 仅为所有窗口提供一个线程。
ha.set_system('use_window_thread', 'true') window = ha.open_window( row=row, column=col, width=width, height=height, father_window=0, mode='visible', machine='' ) ha.set_draw(window, 'fill') ha.set_line_width(window, 2) ...
SetSystem("height", 512); #if defined(_WIN32) SetSystem("use_window_thread","true"); #elif defined(__linux__) XInitThreads(); #endif #ifndef __APPLE__ action(); #else ret = apple_main(argc,argv); #endif returnret; } #endif #endif...
'tsp_no_object_result', 'tsp_store_empty_region', 'tsp_temporary_mem_cache', 'tsp_temporary_mem_reservoir', 'tsp_thread_num', 'tsp_tuple_string_operator_mode', 'tsp_width', 'tuple_string_operator_mode', 'update_lut', 'use_window_thread', 'width', 'write_halcon_files_encoding', ...
'use_window_thread': On Microsoft Windows systems, calling any of the HALCON graphics operators from a thread other than the one that created the output window requires that there be an active message loop for that window. Setting this parameter to'true'will automatically open all top-level HA...
1. 使用算子处理图像基本流程 *关闭当前窗体dev_close_window()*读取图像read_image(Image,'test.jpg')*图像尺寸get_image_size(Image,Width,Height)*打开窗体dev_open_window(0,0,Width,Height,'black',WindowHandle)*绘制轮廓不填充dev_set_draw('margin')*线宽dev_set_line_width(1)*字体set_display_font...