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 thiscase, 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