A boring Python + OpenCV example

Source: Internet
Author: User

OpenCV do not need to say more, first recommend a force tutorial:

Https://opencv-python-tutroals.readthedocs.io/en/latest/py_tutorials/py_tutorials.html

The example of tutorial is realized once, can have a basic understanding of OPENCV, but to do some practical things, still need to study deeply.

Today this article is very boring, just want to explain that the picture is essentially a three-dimensional array, using NumPy to create an array, with OPENCV display, the code is as follows.

ImportCv2ImportNumPy as Npimg3= Np.random.random ((600, 800, 3)) while1: Img3= Np.random.random ((600, 800, 3)) Img3*= 50IMG3=Img3.round () cv2.imshow ('img', IMG3)ifCv2.waitkey (1) & 0xff = = Ord ('Q'):         Breakcv2.destroyallwindows ()

This thing is fun, running out is a bunch of colored dots, like a TV without a signal.

A boring Python + OpenCV example

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.