OpenCV 3 Computer Vision with Python Cookbook
上QQ阅读APP看书,第一时间看更新

How to do it...

The steps are as follows:

  1. Load an image to have something to work with and get its size:
orig = cv2.imread('../data/Lena.png')
orig_size = orig.shape[0:2]
  1. Now let's display our image. To do so, we need to call the cv2.imshow and cv2.waitKey functions:
cv2.imshow("Original image", orig)
cv2.waitKey(2000)