In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-06 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/03 Report--
This article mainly introduces the example analysis of OpenCV image processing in python, which has a certain reference value, and interested friends can refer to it. I hope you can learn a lot after reading this article.
OpenCV is commonly used in dealing with pictures. In this article, let's take a look at its specific use.
1. The data reads the image.
# read color picture data img = cv2.imread (r "C:\ Users\ admin\ Desktop\ ztz.jpg") print (img)
2, the display of pictures, you can also create multiple windows.
Img = cv2.imread (r "C:\ Users\ admin\ Desktop\ ztz.jpg") # Image display, you can also create multiple windows # Parameter 1: picture name Custom Parameter 2: picture object cv2.imshow ('img', img) # waiting time for image display, millisecond: 0 indicates that any key terminates cv2.waitKey (0) cv2.destroyAllWindows ()
3, the attribute of the picture, the number of rows corresponds to the y on the axis, that is, it represents the height of the image. The number of columns corresponds to the y on the axis, that is, the height of the image.
Img = cv2.imread (r "C:\ Users\ admin\ Desktop\ ztz.jpg") print (img.shape) # number of rows, columns, color channels print (img.size) # Pixels of the picture Thank you for reading this article carefully. I hope the article "sample Analysis of OpenCV Image processing in python" shared by the editor will be helpful to you. At the same time, I hope you will support it and pay attention to the industry information channel. More related knowledge is waiting for you to learn!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.