Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def convert_to_rgba(self, matrix):
- #print(matrix)
- new_matrix = []
- for x in range(0,len(matrix)):
- line = []
- for y in range(0,len(matrix[x])):
- #pixel
- pixel = matrix[x][y]
- new_pixel = [pixel[0],pixel[1],pixel[2], 255]
- line.append(new_pixel)
- new_matrix.append(line)
- return np.array(new_matrix)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement