显示模型

dev_set_draw ('margin')
read_image (Image, 'Desktop/k.tiff')

xPitch:=0.05
yPitch:=0.05
get_image_size (Image, Width, Height)

min_max_gray (Image, Image, 0, Min, Max, Range)
threshold (Image, Region,Min+1, Max)//剔除无效点
reduce_domain (Image, Region, zMap)
gen_image_surface_first_order (xMap, 'real', 0, xPitch, 0, 0, 0, Width, Height)
gen_image_surface_first_order (yMap, 'real', yPitch, 0, 0, 0, 0, Width, Height)

gen_rectangle1 (ROI, 1768.53, 1748.95, 2371.5, 1905.26)

xyz_to_object_model_3d (xMap, yMap, zMap, ObjectModel3D)

visualize_object_model_3d (WindowHandle, ObjectModel3D, [], [], \
                           ['lut','color_attrib','disp_pose'], \
                           ['color1','coord_z','true'], [], [], [], PoseOut)

reduce_object_model_3d_by_view (ROI, ObjectModel3D, [], [], ObjectModel3DReduced)
paraName:=['primitive_type','fitting_algorithm']
paraVal:=['plane','least_squares_tukey']
fit_primitives_object_model_3d (ObjectModel3DReduced, paraName, paraVal, planeFitted)

distance_object_model_3d (ObjectModel3DReduced, planeFitted, [], 0, [], [])

get_object_model_3d_params (ObjectModel3DReduced, '&distance', pointsDis)
flatness:=abs(max(pointsDis)-min(pointsDis))



Logo

华为开发者空间,是为全球开发者打造的专属开发空间,汇聚了华为优质开发资源及工具,致力于让每一位开发者拥有一台云主机,基于华为根生态开发、创新。

更多推荐