import cv2
from PIL import Image
import matplotlib.pyplot as plt
img_path = 'E:\\360MoveData\\Users\\Administrator\\Desktop\\111.JPG'
img_cv = cv2.imread(img_path)
cv2.imshow('111', img_cv)
cv2.waitKey()
img_PIL = Image.open(img_path)
plt.imshow(img_PIL)
plt.show()
img_PIL = Image.fromarray(cv2.cvtColor(img_cv,cv2.COLOR_BGR2RGB))
import numpy as np
img_cv = cv2.cvtColor(np.asarray(img_PIL), cv2.COLOR_RGB2BGR)
flag = isinstance(img_cv,np.ndarray)
from PIL import ImageFile
flag = isinstance(img_PIL,ImageFile.ImageFile)