Пример #1
0
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
Пример #2
0
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
Пример #3
0
def myopen(filename):
    return rgb2lab(np.asarray(Image.open(filename)).astype(np.float32)/255.)
Пример #4
0
def myopen(filename):
    return rgb2lab(np.asarray(Image.open(filename)).astype(np.float32) / 255.)