Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

cv2 check if image is grayscale

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'
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #check #image #grayscale
ADD COMMENT
Topic
Name
5+3 =