文章來源地址http://www.zghlxwxcb.cn/news/detail-511595.html
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)//剔除無效點(diǎn)
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))
文章來源:http://www.zghlxwxcb.cn/news/detail-511595.html
到了這里,關(guān)于Halcon3d 點(diǎn)云計(jì)算平面度的文章就介紹完了。如果您還想了解更多內(nèi)容,請?jiān)谟疑辖撬阉鱐OY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!