Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def to_sepia(image):
- sepia = np.array(image)
- sepia[:, :, 0] = image[:, :, 0] * 0.272 + image[:, :, 1] * 0.534 + image[:, :, 2] * 0.131
- sepia[:, :, 1] = image[:, :, 0] * 0.349 + image[:, :, 1] * 0.686 + image[:, :, 2] * 0.168
- sepia[:, :, 2] = image[:, :, 0] * 0.393 + image[:, :, 1] * 0.769 + image[:, :, 2] * 0.189
- print(sepia)
- return sepia
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement