Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import cv2
- import numpy as np
- imageSource = 'q4.jpg'
- img = cv2.imread(imageSource,cv2.COLOR_BGR2GRAY)
- cv2.imshow( "original", img )
- result = img & 0b11111100
- cv2.imshow( "out", result )
- cv2.imwrite('out.jpg',result)
- cv2.waitKey(0)
- cv2.destroyAllWindows()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement