Shunya UETA

Software Engineer As Data Scientist

How to concat image using skimage

Posted at — Jun 17, 2019

When you need to concat same size image to make figure.

skimage & numpy combination is too powerfull to concat images.

This is sample script.

from skimage import data, io
import numpy as np

img = skimage.data.astronaut()
imgs= [img for i in range(10)]

skimage.io.imsave("sample_h.png",np.hstack(imgs))
skimage.io.imsave("sample_v.png",np.vstack(imgs))

After that you can get below images.

Via Gist: https://gist.github.com/hurutoriya/fedf059ad3db5c67b16d8d5dd6d3df70

comments powered by Disqus