Pappu19

Lab-1

Sep 16th, 2021 (edited)
191
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.40 KB | None | 0 0
  1. Lab-1
  2. Name of Experiment: Introduction to digital Image Processing using python(OpenCV)
  3. ---Read an Image from PC
  4. ---Show the Image display
  5. ---Dimension of Image
  6. ---RGB to Gray
  7.  
  8.  
  9. import cv2
  10.  
  11. img = cv2.imread('Image.png')
  12. #img = cv2.imread('Image.png',0)  Gray
  13.  
  14. print(img)
  15. cv2.imshow('Image', img)
  16.  
  17. cv2.waitKey(0)        
  18.  
  19. cv2.destroyAllWindows()
  20.  
  21. dimension = img.shape
  22.  
  23. print(dimension)
Add Comment
Please, Sign In to add comment