
cv2.imread()
cv2.imshow()
cv2.imwrite()
Use the function cv2.imread() to read an image. The image should be in the working directory or a full path of image should be given.
Second argument is a flag which specifies the way image should be read.

cv2.IMREAD_COLOR : Loads a color image. Any transparency of image will be neglected. It is the default flag.
实际值为1,加载彩像。任何透明度的图像将被忽略(默认)
cv2.IMREAD_GRAYSCALE : Loads image in grayscale mode
实际值为0,灰度模式
cv2.IMREAD_UNCHANGED : Loads image as such including alpha channel

实际值为-1,加载图像,包括 Alpha 通道
1 0 -1
cv2.destroyAllWindows() # 消灭所有窗口
cv2.destroyAllWindow() # 消灭指定窗口
cv2.imwrite('name.png',img) # 保存图片
cv2.waitKey(0) # 等待时间 单位毫秒 0:无限等待
本文来自电脑杂谈,转载请注明本文网址:
http://www.pc-fly.com/a/jisuanjixue/article-63300-1.html
官二代吧
而咱们的071两栖舰航速20节追不上人家30的航速
还有的多了