功能:两幅图A和B,将A的一侧和B的一侧按照6个经验offset参数拼接在一起;
其中,旋转拼接为上下方向拼接,效率比循环拼接较高
算法库:halcon;
注:算法前提是较精准的机械精度
法1:旋转拼接(耗时313ms)
dev_update_off ()
read_image (Image1, '11.jpg')
read_image (Image2, '22.jpg')
access_channel (Image1, Image1, 1)
access_channel (Image2, Image2, 1)
get_image_size (Image2, Width, Height)
count_seconds (Seconds1)
*根据实际情况旋转或不旋转,旋转后:第一张图片的rectangle1区域和第二张图片rectangle1区域进行上下方向拼接!
rotate_image (Image1, Image1Rotate, -90, 'constant')
rotate_image (Image2, Image2Rotate, -90, 'constant')
get_image_size (Image1Rotate, Width1, Height1)
get_image_size (Image2Rotate, Width2, Hei