《zw版·Halcon-delphi系列原创教程》 3d汽车模型自动区域分割
目前,图像分析,在3D设计,机器视觉方面拥有很广。
这个Halcon脚本是3d汽车模型自动区域分割,很简单才20多行。
ps,有兴趣的网友,可以自己改为delphi、vc、vb版时间,其实opencv版本的也不难,不过代码应该不低于200行,由此可见Halcon的彪悍
* Prepare windows
dev_update_off ()
dev_close_window ()
dev_open_window (, , , , 'black', WindowHandle1)
dev_open_window (, , , , 'black', WindowHandle2)
set_display_font (WindowHandle1, , 'mono', 'true', 'false')
set_display_font (WindowHandle2, , 'mono', 'true', 'false')
* Read 3D object model
read_object_model_3d ('bmc_mini', 'm', [], [], ObjectModel3D, Status)
*
* Calculate the connected components based on the mesh
* information. The parameter 'Value' is ignored for the
* feature 'mesh'.
connection_object_model_3d (ObjectModel3D, 'mesh', , ObjectModel3DConnected)
*
* Display the object model 3D
Pose := [0.08,0.05,1.0,188.0,50.0,0.0,]
CamParam := [0.01,,7e-,7e-,,,,]
disp_object_model_3d_safe (WindowHandle1, ObjectModel3D, CamParam, Pose, 'colored', )
disp_object_model_3d_safe (WindowHandle2, ObjectModel3DConnected, CamParam, Pose, 'colored', )
disp_message (WindowHandle1, 'The complete model', 'window', , , 'black', 'true')
disp_message (WindowHandle2, 'The connected components', 'window', , , 'black', 'true')
clear_object_model_3d ([ObjectModel3D,ObjectModel3DConnected])
【《zw版·Halcon-delphi系列原创教程》,网址,cnblogs.com/ziwang/】