Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def convert(self, img):
- for i in range(img.shape[0]):
- for j in range(img.shape[1]):
- if img.item(i, j) != 0:
- img.itemset((i, j), 255)
- return img
- a[a != 0] = 255
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement