1-基于激光三角的量块点云重建

dev_update_off ()

gen_image_const (ImageConstX, 'real', 832, 1500)
gen_image_const (ImageConstY, 'real', 832, 1500)
gen_image_const (ImageConstZ, 'real', 832, 1500)
* Image Acquisition 01: Code generated by Image Acquisition 01
for Index := 0 to 1500 - 1 by 1
    read_image (Image, 'cal.bmp')
    * Image Acquisition 01: Do something
    get_image_size (Image, Width, Height)
    gen_rectangle1 (ROI_0, 172, 23, 387, 790)
    reduce_domain (Image, ROI_0, Image)
    * Z-Map图
    threshold (Image, RegionThresh, 200, 255)
    opening_rectangle1 (RegionThresh, RegionOpening, 5, 1)
    closing_rectangle1 (RegionOpening, RegionClosing, 10, 1)
    Points:=[]
    for IndexWidth := 1 to Width by 1
        gen_region_line (RegionLines1, 0, IndexWidth, Height, IndexWidth)
        intersection (RegionClosing, RegionLines1, RegionIntersection)
        area_center (RegionIntersection, Area, PointRow, Column)
        if (Area==0)
            PointInter:=0
        else
            PointInter:=PointRow
        endif
        tuple_concat (Points, PointRow, Points)
    endfor
    
    for IndexCol := 0 to Width-1 by 1
        tuple_greater (Points[IndexCol], 0, Greater)
        if (Greater==0)
            GrayPoint:=0
        else
            GrayPoint:=Points[IndexCol]
        endif
        set_grayval (ImageConstZ, Index, IndexCol, GrayPoint)
    endfor 
    **********************************************
    
    * X-Map图
    for IndexWidthX := 1 to Width-1 by 1
        set_grayval (ImageConstX, Index, IndexWidthX, IndexWidthX)
    endfor
    
    * X-Map图
    for IndexWidthX := 1 to Width-1 by 1
        set_grayval (ImageConstY, Index, IndexWidthX, Index)
    endfor
    
endfor

xyz_to_object_model_3d (ImageConstX, ImageConstY, ImageConstZ, ObjectModel3D)
dev_open_window (0, 0, 832/2, 1500/2, 'black', WindowHandle)
visualize_object_model_3d (WindowHandle, ObjectModel3D, [], [], ['lut','color_attrib','disp_pose'], ['color1','coord_z','true'], '三摄模组点云图', '', [], PoseOut)

原始图片

重建点云

关注公众号,更多知识内容


 

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值