def a(): print 'a' import Image print 'a' import numpy as np print 'a' print 'imported' a = Image.open('window_exp_1_1.jpg') print 'opened' b = np.asarray(a) c = b.astype(np.float32)/255. from color.color import rgb2lab print '0..1' d = rgb2lab(c) print d[0,0] return d
def a(): print 'a' import Image print 'a' import numpy as np print 'a' print 'imported' a = Image.open('window_exp_1_1.jpg') print 'opened' b = np.asarray(a) c = b.astype(np.float32) / 255. from color.color import rgb2lab print '0..1' d = rgb2lab(c) print d[0, 0] return d
def myopen(filename): return rgb2lab(np.asarray(Image.open(filename)).astype(np.float32)/255.)
def myopen(filename): return rgb2lab(np.asarray(Image.open(filename)).astype(np.float32) / 255.)