Advertisement
Guest User

Code

a guest
Apr 22nd, 2019
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. print(1+2+3+4)
  2. print(3**2)
  3. print(int(16/4))
  4. import numpy as np
  5. import cv2
  6. import matplotlib.image as mpimg
  7. import matplotlib.pyplot as plt
  8. image = cv2.imread('gravels.jpg')
  9. print('Image size = ',image.shape)
  10. print('This image is ',type(image),'with dimensions',image.shape)
  11. cv2.imshow("image" ,image)
  12. cv2.waitKey(0)
  13. image2 = cv2.cvtColor(image,cv2.COLOR_BGR2RGB )
  14. print('Image 2 size =',image.shape)
  15. image3 = cv2.cvtColor(image2,cv2.COLOR_RGBA2GRAY )
  16. print('Image 3 size =',image.shape)
  17. cv2.imshow("image" ,image3)
  18. cv2.waitKey(0)
  19. image_copy=np.copy(image)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement