PIL.Image.fromarray(img)
# cv2 images are already numpy arrays. So you do not need to convert it.
# Simply pass it to cv2 as a normal cv2 image.
import cv2
import numpy
imgarray = yourarrayhere # This would be your image array
cv2img = cv2.imshow(imgarray) # This work the same as passing an image