1.基于halcon算法平台;
2.提供深度图源文件以及解压密码;
3.代码预览:
/******************************
- @文档名称: 基于点云的平面断差测量。
- @作者: hugo
- @版本: 1.1
- @日期: 2021-6-20
- @描述: 该方法支持点云的平面的断差测量。
- @来源:欢迎关注微信公众号 【robotvision】 获取更多机器人视觉知识。
**********************************/
dev_update_window ('on')
dev_get_window (WindowHandle)
read_image (imageReal, './replay_38893_2021-6-7.tif')
xResolution:=0.06
yResolution:=0.06
zResolution:=0.001
ScaleFactor:=[xResolution,yResolution,zResolution]
*采样区域1
create_drawing_object_rectangle2 (300, 120, rad(90), 30, 20, DrawID)
set_drawing_object_params (DrawID, 'color', 'forest green')
set_drawing_object_params (DrawID, 'line_width', 1)
attach_drawing_object_to_window (WindowHandle, DrawID)
.............
*对指定区域进行高度滤波
filter_surface_zdatas (Rectangle, imageReal, ImageReduced1, Region1, grayArray, rowArray, rolumnArray)
filter_surface_zdatas (Rectangle1, imageReal, ImageReduced2, Region2, grayArray1, rowArray1, columnArray)
*拟合指定区域的平面 方法1
fit_surface_regions (Region1, ImageReduced1, imageSurface)
*输入已经拟合的平面 方法2
*IntensityImageToPiontsCloudImage (imageSurface, ScaleFactor, 1, 0, SampledObjectModel3D, ObjectModelPlane, zScale)
*TransPose1 := [ Column-Length21, Row-Length11,d,0,0,0,0]
*rigid_trans_object_model_3d (ObjectModelPlane, TransPose1, _ObjectModelPlane)
stop()
视频演示
04 点云高度差 断差