Advertisement
Guest User

Untitled

a guest
May 25th, 2019
148
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.19 KB | None | 0 0
  1. import cv2
  2. import numpy as np
  3.  
  4. img = cv2.imread("veidz.jpg")
  5.  
  6. alpha = 2.0
  7. beta = -160
  8.  
  9. new = alpha * img + beta
  10. new = np.clip(new, 0, 255).astype(np.uint8)
  11.  
  12. cv2.imwrite("cleaned.png", new)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement