Get the App
SLTechnology News&Howtos  ›  Development  › 

How to use waitKey in python

Shulou Source: shulou.com Published: 2022-05-31 17:43:59 11月11日 Update

This article mainly explains "how to use waitKey in python". Interested friends may wish to have a look. The method introduced in this paper is simple, fast and practical. Let the editor take you to learn how to use waitKey in python.

Description

1. Used to wait button. When the user presses the button, the sentence is executed and the return value is obtained.

2. The syntax is

Retval=cv2.waitKey ([delay])

Retval: indicates the return value; Delay: the time when the key was triggered, in ms.

Example

Import cv2lena=cv2.imread ("D:\ pmjcv\ lena.bmp") cv2.namedWindow ("lesson") cv2.imshow ("lesson", lena) key=cv2.waitKey () Python is mainly used for what Python is mainly used for:

1. Web development

2. Data science research

3. Web crawler

4. Embedded application development

5. Game development

6. Desktop application development.

At this point, I believe you have a deeper understanding of "how to use waitKey in python". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!

Tags: Development application content application development button learning practical deeper interest unit sentence example practicality practical embedded simple operation data method time more Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Linux Huawei MySQL OPPO Reno Shulou Technology