1、直接保存 write_image( image , 'bmp' , 0 , 'C:/桌面/1' ) 2、窗口保存 //带文字,region保存 dump_window_image( image , 20000) //图像名,窗口句柄 write_image( image , 'bmp' , 0 , 'C:/桌面/1' ) 3、裁剪后保存,改变尺寸 crop_domain (ImageReduced, ImagePart) write_image (Imag...
//Check for mouse events 该函数会跳入analyze_graph_event函数,在这里,通过while循环不断读取鼠标位置(GetMpositionSubPix),计算位置、旋转变换,输出和显示图形(dump_image_output,DispObj), 这些循环里记得加入跳出条件。 由于halcon的源程序是通过“continue”按钮响应的,这里没有,建议采用事件方式退出。 即if(even...
dump_window_image (Image, WindowHandle) 把WindowHandle所代表的窗口内所有的像素保存成图像 因此只要把图片、region、字符提示都显示在图像窗口上,用了这个算子就会将整个窗口像截屏一样保存到DumpImage内。 HALCON自带例子: dev_update_window ('off') read_image (Image, 'clip') get_image_size ...
5. 保存可视化结果 如果你需要保存可视化结果,可以使用dump_window函数将当前窗口内容保存为图像文件。 dump_window(WindowHandle, 'png', 'output_image.png') 示例代码 以下是一个完整的示例代码,展示如何读取并可视化 3D 点云: * 读取 3D 点云数据 read_object_model_3d('point_cloud.ply', 'mm', [], ...
dump_window (WindowHandle, 'png', 'C:/Documents and Settings/Administrator/桌面/sadaharu2_gray.png') write_image (Amp, 'png', 0 , 'C:/Documents and Settings/Administrator/桌面/sadaharu2_canny2.png') write_region(Margin,'C:/Documents and Settings/Administrator/桌面/sadaharu2_canny3.tif')...
disp_image(Image : : WindowHandle : ) Descriptiondisp_image displays the gray values of an image in the output window. The gray value pixels of the definition domain (set_comprise(::WindowHandle,'object':)) or of the whole image (set_comprise(::WindowHandle,'image':)) are used. ...
Image (output_object) image → object (byte) Saved image.WindowHandle (input_control) window → (handle) Window handle.ResultIf the window is valid dump_window_image returns 2 (H_MSG_TRUE). If necessary an exception is raised.Possible Predecessors...
dump_window (WindowHandle, 'png', 'C:/Documents and Settings/Administrator/桌面/sadaharu2_gray.png') write_image (Amp, 'png', 0 , 'C:/Documents and Settings/Administrator/桌面/sadaharu2_canny2.png') write_region(Margin,'C:/Documents and Settings/Administrator/桌面/sadaharu2_canny3.tif')...
调试的时候发现运行到visualize_object_model_3d里dump_image_output算子出的错。有大神知道怎么解决吗?
watersheds_threshold (ImageScaleMax, Basins, 10) 下面会有一个数据集,是一系列一堆色子放在一起的图片(1000*1000) 识别的效果如下: 本文是使用Halcon编写算法,下一篇博客会再提供一篇用开源视觉库OpenCV 编写的算法。 1 2 3 4 5 6 7 8 9 10