opencv-Getting|opencv-Getting Started with Images
1.opencv库简单的操作图片
# coding = utf-8 # 书籍:<<学习opencv>> import cv2 from matplotlib import pyplot as plt import numpy as np # 读取图片 img = cv2.imread("girl.jpg", cv2.IMREAD_GRAYSCALE) # 保存图片 # cv2.imwrite("girl.png", img) # 在名为xxx的窗口下展示图片 # cv2.imshow("image", img) # cv2.namedWindow("image", cv2.WINDOW_NORMAL) # 等待按键事件退出 # k = cv2.waitKey() # if k == 27: #cv2.destroyAllWindows() # elif k == ord('s'): #cv2.imwrite("girl.bmp", img) plt.imshow(img, cmap='gray', interpolation='bicubic') # plt.xticks([]), plt.yticks([]) plt.show()
【opencv-Getting|opencv-Getting Started with Images】转载于:https://www.cnblogs.com/loveprogramme/p/9432807.html
推荐阅读
- Hacking|Hacking with iOS: SwiftUI Edition - SnowSeeker 项目(一)
- LeetCode(03)Longest|LeetCode(03)Longest Substring Without Repeating Characters
- performSelectorOnMainThread:withObject:waitUntilDone:参数设置为NO或YES的区别
- 前沿论文|论文精读(Neural Architecture Search without Training)
- ZOMBIES|ZOMBIES WITH RADISH
- 清晨朗读327(How|清晨朗读327:How Successful People Network with Each Other)
- 40
- Supported|Supported orientations has no common orientation with the application 解决方案
- Git|Git branching strategy integated with testing/QA process - Stack Overflow
- Mixed|Mixed Supervised Object Detection with Robust Objectness Transfer讲解