设置首页收藏本站
授权版本:2024_10
开启左侧

How to break continuous grabbing from the camera?

[复制链接]
Evgeniy 发表于 2021-11-22 17:02:33 | 显示全部楼层 |阅读模式
Hi, colleagues.

I am working with my web camera. And I start grabbing from this camera. But I do it like that:


dev_open_window(0, 0, 640, 480, 'black', WindowHandle)
open_framegrabber ('DirectShow', 1, 1, 0, 0, 0, 0, 'default', \
                   8, 'rgb', -1, 'false', 'default', \
                   '[0] Logitech HD Webcam C270', 0, -1, AcqHandle)

status:=true

while (status)
    grab_image (Image, AcqHandle)
    * Do something
    dev_display(Image)
endwhile
close_framegrabber (AcqHandle)



I I need to press any key  for quit from 'while' code.
I just want to know: is it possible to stop 'while' the code with key pressing?
Can you help me?
奖励计划已经开启,本站鼓励作者发布最擅长的技术内容和资源,流量变现就在现在,[点我]加入吧~~~Go
绝地武士 发表于 2021-11-22 17:45:02 | 显示全部楼层
  1. get_mbutton — Wait until a mouse button is pressed.
  2. 1: Left button,
  3. 2: Middle button,
  4. 4: Right button,
  5. 8: Shift key,
  6. 16: Ctrl key,
  7. 32: Alt key.
复制代码
It will cause blockage.

or use serial communication, send some chars to terminated it from other program (use open_serial.)

simulation software:https://www.51halcon.com/forum.p ... &tid=289&fromuid=25

奖励计划已经开启,本站鼓励作者发布最擅长的技术内容和资源,流量变现就在现在,[点我]加入吧~~~Go
 楼主| Evgeniy 发表于 2021-11-25 02:16:31 | 显示全部楼层
Hi, Jedi Knight!

Thank you for your answer.

But I need the solution without freezing the process )))
奖励计划已经开启,本站鼓励作者发布最擅长的技术内容和资源,流量变现就在现在,[点我]加入吧~~~Go
您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表