convert image to 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)
Example 3: from image to numpy array
import cv2
im = cv2.imread("abc.tiff",mode='RGB')
print type(im)