I'm ussing the function imread from matplotlib, but when i execute it, i found this error:
import matplotlib.pyplot as plt
data = plt.imread("s_img.jpg")
"SyntaxError: (unicode error) 'unicodeescape' codec can't decode bytes in
position 2-3: truncated \UXXXXXXXX escape"
Then i tried in the opening this way:
import matplotlib.pyplot as plt
data = plt.imread(r"s_img.jpg")
this works, but when i tried to modified the image data structure, shows me an error:
data[:,:, 1] = 0
ValueError: assignment destination is read-only
I dont know how to deal with this. My goal is to modify the colors of the images and any other structure, and then use it to build a image classificator.