Advertisement
Guest User

Untitled

a guest
Mar 20th, 2018
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.28 KB | None | 0 0
  1. M, N = I.shape
  2.    
  3.     for x in range(0, M):
  4.         for y in range(0, N):
  5.             if((I[x, y] * const) > 255):
  6.                 I[x, y] = 225
  7.             elif((I[x, y] * const) < 0):
  8.                 I[x, y] = 0
  9.             else:
  10.                     I[x, y] = I[x, y] * const
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement