Advertisement
Guest User

Untitled

a guest
Jun 20th, 2019
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.26 KB | None | 0 0
  1. import cv2
  2. import numpy as np
  3.  
  4. imageSource = 'q4.jpg'
  5. img = cv2.imread(imageSource,cv2.COLOR_BGR2GRAY)
  6. cv2.imshow( "original", img )
  7.  
  8. result = img & 0b11111100
  9.  
  10. cv2.imshow( "out", result )
  11. cv2.imwrite('out.jpg',result)
  12. cv2.waitKey(0)
  13. cv2.destroyAllWindows()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement