📅  最后修改于: 2022-03-11 14:45:56.430000             🧑  作者: Mango
import cv2
file = "myFile.jpj"
image = cv2.imread(file)
if image.any() != None:
if(len(image.shape)<2):
print ('grayscale')
elif len(image.shape)==3:
print ('Colored')
else:
print("cannot find image")