Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import cv2
- import numpy as np
- img = cv2.imread("veidz.jpg")
- alpha = 2.0
- beta = -160
- new = alpha * img + beta
- new = np.clip(new, 0, 255).astype(np.uint8)
- cv2.imwrite("cleaned.png", new)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement