halcon图像拼接

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
read_image (Image, 'D:/Working/工程项目/多张图像拼接/1.0D-3.5HZ_C001H001S0001/1.tif')
dev_open_window_fit_image (Image, 0, 0, -1, -1, WindowHandle)
dev_display (Image)
 
 
get_image_size (Image, Width, Height)
get_image_type (Image, Type)
*截取部分图像
gen_rectangle1 (Rectangle, 416, 0, 416+30, Width)
reduce_domain (Image, Rectangle, ImageReduced)
*生成空白图像
gen_image_const (Image1, Type, Width, 5000)
gen_image_const (Image2, Type, Width, 5000)
gen_image_const (Image3, Type, Width, 5000)
compose3 (Image1, Image2, Image3, MultiChannelImage)
*绘制位置1
overpaint_gray (MultiChannelImage, ImageReduced)
*平移
hom_mat2d_identity (HomMat2DIdentity)
hom_mat2d_translate (HomMat2DIdentity, 300, 0, HomMat2DTranslate)
affine_trans_image (ImageReduced, ImageAffinTrans, HomMat2DTranslate, 'constant', 'true')
get_image_size (ImageAffinTrans, Width1, Height1)
 
affine_trans_region (Rectangle, RegionAffineTrans, HomMat2DTranslate, 'constant')
reduce_domain (ImageAffinTrans, RegionAffineTrans, ImageReduced1)
*绘制位置2
overpaint_gray (MultiChannelImage, ImageReduced1)
write_image (MultiChannelImage, 'tiff', 0, 'fuck1')
read_image (Image4, 'C:/Users/Administrator/Desktop/2020-04-21-13-15-42-750.tif')
count_channels (Image4, Channels)

  

posted @   黄晓魚  阅读(1428)  评论(0编辑  收藏  举报
编辑推荐:
· Linux系列:如何用heaptrack跟踪.NET程序的非托管内存泄露
· 开发者必知的日志记录最佳实践
· SQL Server 2025 AI相关能力初探
· Linux系列:如何用 C#调用 C方法造成内存泄露
· AI与.NET技术实操系列(二):开始使用ML.NET
阅读排行:
· 被坑几百块钱后,我竟然真的恢复了删除的微信聊天记录!
· 没有Manus邀请码?试试免邀请码的MGX或者开源的OpenManus吧
· 【自荐】一款简洁、开源的在线白板工具 Drawnix
· 园子的第一款AI主题卫衣上架——"HELLO! HOW CAN I ASSIST YOU TODAY
· Docker 太简单,K8s 太复杂?w7panel 让容器管理更轻松!
点击右上角即可分享
微信分享提示