SyntaxFix
Write A Post
Hire A Developer
Questions
You need to convert your image to a numpy array this way:
import numpy import PIL img = PIL.Image.open("foo.jpg").convert("L") imgarr = numpy.array(img)