Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- """
- For put ads into video
- """
- # import the necessary packages
- import numpy as np
- import cv2
- # read a image
- img = cv2.imread('taobao.png',1)
- # display a image
- cv2.namedWindow('image', cv2.WINDOW_NORMAL)
- cv2.imshow('image',img)
- # release resources
- k = cv2.waitKey(0)
- if k == 27: # wait for ESC key to exit
- cv2.destroyAllWindows()
- elif k == ord('s'): # wait for 's' key to save and exit
- cv2.imwrite('messigray.png',img)
- cv2.destroyAllWindows()
Add Comment
Please, Sign In to add comment