opencv 如何禁止键盘
时间: 2023-10-23 14:09:53 浏览: 62
基于opencv的虚拟键盘
在OpenCV中,可以通过设置键盘绑定函数的参数来控制键盘输入的等待时间。如果将等待时间设为0,即cvWaitKey(0),程序将会无限期地等待键盘输入。如果将等待时间设为一个正整数,即cvWaitKey(delay),程序将会等待指定的毫秒数后继续执行。所以,要禁止键盘输入,只需将等待时间设为0即可。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* *3* [【OpenCV】OpenCV输入处理(鼠标事件_键盘事件_滑块事件)](https://blog.csdn.net/Taily_Duan/article/details/51006797)[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^v92^chatsearchT0_1"}}] [.reference_item style="max-width: 50%"]
- *2* [cv2.waitKey(10) & 0xff == 27的解释](https://blog.csdn.net/weixin_45534930/article/details/121569077)[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^v92^chatsearchT0_1"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文