Last active
August 2, 2022 19:03
-
-
Save Zemke/04bae45d29ab97372ebbd6ce48ef47d6 to your computer and use it in GitHub Desktop.
image grid with numpy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# unordered | |
# c = color channel if available | |
np.concatenate(np.reshape(img, (img_rows,-1,img_width,c), axis=1) | |
# ordered | |
# n = number of tiled images that should make up a row in the grid | |
np.vstack([np.concatenate(img[i:i+n], axis=1) for i in range(0, len(img), n)]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment