📜  cv2 检查图像是否为灰度 - Python 代码示例

📅  最后修改于: 2022-03-11 14:47:13.557000             🧑  作者: Mango

代码示例1
from scipy.misc import imread, imsave, imresize
image = imread(f_name)
if(len(image.shape)<3):
      print 'gray'
elif len(image.shape)==3:
      print 'Color(RGB)'
else:
      print 'others'