python read image into numpy array code example
Example 1: open image in numpy
image = PIL.Image.open(pathToImage)
frame = numpy.asarray(image)
Example 2: pil image to numpy
>>> pix = numpy.array(pic)
image = PIL.Image.open(pathToImage)
frame = numpy.asarray(image)
>>> pix = numpy.array(pic)