Skip to content

Commit

Permalink
Tile Spacing in Visualizer
Browse files Browse the repository at this point in the history
  • Loading branch information
Ragav Venkatesan committed Mar 3, 2017
1 parent 55c68dc commit 2fbfd19
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions yann/modules/visualizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ def save_images(imgs, prefix, is_color, verbose = 2):
X = curr_image.reshape((curr_image.shape[0],curr_image.shape[1] * \
curr_image.shape[2])),
img_shape = (curr_image.shape[1], curr_image.shape[2]),
tile_spacing = (5,5),
tile_spacing = (2,2),
tile_shape = tile_shape ))
if len(I.shape) == 3:
raster.append(rgb2gray(I))
Expand All @@ -88,7 +88,7 @@ def save_images(imgs, prefix, is_color, verbose = 2):
X = curr_image.reshape((curr_image.shape[0],curr_image.shape[1] * \
curr_image.shape[2])),
img_shape = (curr_image.shape[1], curr_image.shape[2]),
tile_spacing = (5,5),
tile_spacing = (2,2),
tile_shape = tile_shape )))
assert len(raster[i].shape) == 2
imsave(prefix + str(i) + ".jpg",raster[i], cmap = 'gray')
Expand All @@ -108,8 +108,8 @@ def save_images(imgs, prefix, is_color, verbose = 2):
remain_rows = np.ceil(tile_raster / remain)
tile_shape = (tile_raster + remain_rows, tile_raster)
tile_shape = (int(tile_shape[0]), int(tile_shape[1]))
raster.append(np.array(tile_raster_images(X = imgs, img_shape = (lt,lt),
tile_shape = tile_shape)))
raster.append(np.array(tile_raster_images(X = imgs, img_shape = (lt,lt),
tile_spacing = (2,2), tile_shape = tile_shape)))
is_color = False
imsave(prefix + "0.jpg",raster[0], cmap ='gray')
return raster
Expand Down

0 comments on commit 2fbfd19

Please sign in to comment.