read image as numpy array code example
Example 1: open image in numpy
image = PIL.Image.open(pathToImage)
frame = numpy.asarray(image)
Example 2: from image to numpy array
import cv2
im = cv2.imread("abc.tiff",mode='RGB')
print type(im)
image = PIL.Image.open(pathToImage)
frame = numpy.asarray(image)
import cv2
im = cv2.imread("abc.tiff",mode='RGB')
print type(im)