HALCON连接多摄像头以及图像合并
(2012-12-07 19:57:46)
标签:
halcon机器视觉多摄像头it |
分类: G.工业技术 |
这个实例实现了2两个功能;
1. 利用halcon实现对多摄像头的连接并获取图像;
2 .实现多图像的合并
有兴趣的朋友可以研究下。
close_all_framegrabbers ()
dev_close_window ()
open_framegrabber ('DirectShow', 1, 1, 0, 0, 0, 0, 'default', -1,
'gray', -1, 'default', 'default', '0', -1, -1, AcqHandle1)
grab_image (ImageLeft, AcqHandle1)
open_framegrabber ('DirectShow', 1, 1, 0, 0, 0, 0, 'default', -1,
'gray', -1, 'default', 'default', '1', -1, -1, AcqHandle2)
grab_image (ImageRight, AcqHandle2)
concat_obj (ImageLeft, ImageRight, ImageConcat)
tile_images (ImageConcat, TiledImage, 2, 'vertical')
get_image_pointer1 (ImageLeft, PointerLeft, TypeLeft, WidthLeft,
HeightLeft)
get_image_pointer1 (ImageRight, PointerRight, TypeRight,
WidthRight, HeightRight)
get_image_pointer1 (TiledImage, PointerTile, TypeTile, WidthTile,
HeightTile)
dev_open_window (0, 0, WidthRight+WidthLeft, HeightRight, 'black',
WindowHandleTile)

加载中…