halcon项目——图像拼接

分选机:
https://blog.csdn.net/weixin_45682889/article/details/105051376?utm_medium=distribute.pc_relevant.none-task-blog-BlogCommendFromMachineLearnPai2-2.channel_param&depth_1-utm_source=distribute.pc_relevant.none-task-blog-BlogCommendFromMachineLearnPai2-2.channel_param
*生成矩形
shape_trans (ConnectedRegions1, RegionTrans, ‘rectangle2’)

*文字分割
partition_rectangle (RegionTrans, Partitioned,74, 65)

图像拼接
https://www.cnblogs.com/amosyang/p/8478213.html
在这里插入图片描述

* This example shows how to use proj_match_points_distortion_ransac to
* match two images in a mosaicking application.
* 
* Initialization
dev_update_off ()
* Read and display the images
read_image (Image1, 'D:/项目/2020/1401CX/1.jpg')
read_image (Image2, 'D:/项目/2020/1401CX/2.jpg')
get_image_size (Image1, Width, Height)
dev_close_window ()
dev_open_window (0, 0, Width/2, Height/2, 'white', WindowHandle)
set_display_font (WindowHandle, 16, 'mono', 'true', 'false')
dev_display (Image1)
disp_message (WindowHandle, 'Image 1 to be matched', 'window', 12, 12, 'black', 'true')
disp_continue_message (WindowHandle, 'black', 'true')
stop ()
dev_display (Image2)
disp_message (WindowHandle, 'Image 2 to be matched', 'window', 12, 12, 'black', 'true')
disp_continue_message (WindowHandle, 'black', 'true')
stop ()
* 
* Extract points to be matched from the images
points_foerstner (Image1, 1, 2, 3, 50, 0.1, 'gauss', 'true', Rows1, Columns1, CoRRJunctions, CoRCJunctions, CoCCJunctions, RowArea, ColumnArea, CoRRArea, CoRCArea, CoCCArea)
points_foerstner (Image2, 1, 2, 3, 50, 0.1, 'gauss', 'true', Rows2, Columns2, CoRRJunctions, CoRCJunctions, CoCCJunctions, RowArea, ColumnArea, CoRRArea, CoRCArea, CoCCArea)
* 
* We will first perform a normal projective matching that does not take
* the radial distortions into account to show the errors that are caused
* by neglecting the radial distortions.
proj_match_points_ransac (Image1, Image2, Rows1, Columns1, Rows2, Columns2, 'ncc', 10, 0, 0, Height, Width, 0, 0.5, 'gold_standard', 2, 42, HomMat2DUnrectified, Points1Unrectified, Points2Unrectified)
* Construct a projective mosaic from the two unrectified images.
concat_obj (Image1, Image2, Images)
gen_projective_mosaic (Images, MosaicImageUnrectified, 1, 1, 2, HomMat2DUnrectified, 'default', 'false', MosaicMatrices2DUnrectified)
rgb1_to_gray (MosaicImageUnrectified, GrayImage)
threshold (MosaicImageUnrectified, Region, 1, 90)

connection (Region, ConnectedRegions)

  • 1
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值