Esempio n. 1
0
def main_show():
    import matplotlib.pyplot as plt
    rng = np.random.RandomState(1)
    coords = prototype_coords(rng)
    img = render_coords(coords)
    img3 = render_coords(distort(coords, '3', rng))
    img6 = render_coords(distort(coords, '6', rng))
    plt.imshow(np.asarray([img, img3, img6]).T,
               cmap='gray',
               interpolation='nearest')
    plt.show()
Esempio n. 2
0
File: main.py Progetto: Afey/skdata
def main_show():
    import matplotlib.pyplot as plt
    rng = np.random.RandomState(1)
    coords = prototype_coords(rng)
    img = render_coords(coords)
    img3 = render_coords(distort(coords, '3', rng))
    img6 = render_coords(distort(coords, '6', rng))
    plt.imshow(np.asarray([img, img3, img6]).T,
               cmap='gray',
               interpolation='nearest')
    plt.show()
Esempio n. 3
0
def render_coords_uint8_channels(coords):
    n_points, n_dims = coords.shape
    assert n_dims == 2
    rval = render_coords(coords)
    rval *= 255
    rval = rval.astype('uint8')
    rval = rval[:, :, np.newaxis]
    return rval
Esempio n. 4
0
File: view.py Progetto: Afey/skdata
def render_coords_uint8_channels(coords):
    n_points, n_dims = coords.shape
    assert n_dims == 2
    rval = render_coords(coords)
    rval *= 255
    rval = rval.astype('uint8')
    rval = rval[:, :, np.newaxis]
    return rval