Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @staticmethod
- def normalizeBinary(image):
- for column in image:
- for pixel in range(len(column)):
- total_color = 0
- for color in column[pixel]:
- total_color += color
- if total_color/3 < 255/2:
- column[pixel] = 0
- else:
- column[pixel] = 1
- return image
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement