Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- M, N = I.shape
- for x in range(0, M):
- for y in range(0, N):
- if((I[x, y] * const) > 255):
- I[x, y] = 225
- elif((I[x, y] * const) < 0):
- I[x, y] = 0
- else:
- I[x, y] = I[x, y] * const
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement