Image acquisition

                                                            halcon打开USB摄像头
 
本人用的大街上卖的那种傻瓜式USB摄像头
 
基本步骤
 
 
 

dev_update_window( 'off')

set_system ( 'do_low_error', 'true')

close_all_framegrabbers()

AcqName : = 'DirectShow'

open_framegrabber (AcqName, 1, 1, 0, 0, 0, 0, 'default', - 1, 'rgb',\
                    - 1, 'false', 'default', 'default', - 1, - 1, AcqHandle)

grab_image(Image,AcqHandle)

get_image_size(Image,Width,Height)

dev_close_window()

dev_open_window( 0, 0,Width,Height, 'black',WindowHandle)

Button : = 0

*Button 不等于 1
while(Button # 1)   
    grab_image(Image,AcqHandle)
    dev_display(Image)
    wait_seconds( 0. 03)
     *按鼠标左键 button 等于 1
    dev_set_window (WindowHandle)
     *If Mode is set to '~give_error', the error will be 
     *ignored and the program continues with the next operator
    dev_set_check ( '~give_error')
    get_mposition(WindowHandle,Row,Column,Button)
    dev_set_check ( 'give_error')
endwhile





转载于:https://www.cnblogs.com/xiaomaLV2/archive/2012/06/01/2530645.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
引用\[1\]:Image Acquisition Toolbox是MATLAB的一个产品,用于图像和视频的采集和处理。它提供了一系列函数和工具,可以与各种图像和视频设备进行交互,包括相机、摄像机和其他图像采集设备。\[1\]引用\[2\]:在Windows上,MATLAB Image Acquisition Toolbox可以与Lucid Vision Labs的相机一起使用。Lucid Vision Labs提供了关于如何在Windows上使用MATLAB Image Acquisition Toolbox的指南。\[2\]引用\[3\]:对于Daheng Mercury USB3相机,MATLAB Image Acquisition Toolbox也提供了支持。可以通过iTeckTech网站上的指南了解如何在MATLAB中使用Daheng Mercury USB3相机。\[3\] 问题: MATLAB Image Acquisition Toolbox可以用于哪些相机? 回答: MATLAB Image Acquisition Toolbox可以与各种相机进行集成,包括Lucid Vision Labs的相机和Daheng Mercury USB3相机。\[2\]\[3\]它提供了与这些相机进行交互的函数和工具,使用户能够方便地进行图像和视频的采集和处理。 #### 引用[.reference_title] - *1* *2* *3* [Matlab 图像采集工具的使用 - Image Acquisition Toolbox【IAT】 + 大恒相机的应用【1】+多个摄像头支持](https://blog.csdn.net/yellow_hill/article/details/122126376)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insert_down28v1,239^v3^insert_chatgpt"}} ] [.reference_item] [ .reference_list ]
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值