Halcon学习笔记:xyz_attrib_to_object_model_3d示例

这篇Halcon学习笔记详细介绍了如何使用xyz_attrib_to_object_model_3d算子,从X、Y、Z图像生成3D对象模型,并附带属性信息。示例代码展示了该过程。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

Halcon学习笔记:xyz_attrib_to_object_model_3d——从X、Y和Z图像中创建3D对象模型同时附加属性

xyz_attrib_to_object_model_3d.hdev

  • This example program shows the usage of the procedure
  • xyz_attrib_to_object_model_3d.
  • It can be used to create 3D object models from X, Y and Z images,
  • and simultaneously attach attributes to every point.
  • 这个示例程序展示了 xyz_attrib_to_object_model_3d 算子的用法。
  • 它可以用于从X、Y和Z图像中创建3D对象模型,并同时将属性附加到每个点上。

源码

* 初始化
dev_update_off ()
dev_close_window ()
* 
* Read the digital surface model.
* 1、读取数字表面模型
read_image (Z, 'mreut_dgm_2.0.tif')
get_image_size (Z, Width, Height)
* 
* 2、读取包含灰色值的图像,这些灰色值将作为属性添加到3D对象模型中
read_image (AerialImage, 'mreut4_3.png')
* 
* Generate a label image with a second attribute.
* In this case, we label different terrain types very simply, just for demonstration purposes.
* 3、用第二个属性生成标签图像。
* 在这种情况下,我们很简单的为不同的地形类型标记,只是为了演示。
  * 1)将区域转换为标签图像
auto_threshold (AerialImage, Regions, 4)
region_to_label (Regions, LabelImage, 'byte', Width, Height)
* 
* Create a multichannel image from both attribute images.
* 4、从两个属性图像中创建一个多通道图像
compose2 (AerialImage, LabelImage, MultiChannelAttribImage)
* 
* Create images that contain X and Y coordinates in a regular grid.
* For a simple gray ramp, the input parameters of gen_image_surface_first_order are very simple:
* 5、在常规网格中创建包含X和Y坐标的图像。对于一个简单的灰色渐变,gen_image_surface_first_order 的输入参数非常简单:
  * 1)用一阶多项式创建两个倾斜(减变)的灰色表面(X Y)
GroundResolution 
评论 5
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值