I have a directory of image files that represent inidvudal images in a 12x8 grid. Each file is named "VID1433_A11_00d00h00m.tif", "VID1433A2_1_00d00h00m.tif" etc.
I want to be able to arrange the images such that I have a grid of images that look like this:
A1_A2_A3_A4_A5_A6_A7_A8_A9_A10_A11_A12
B1_B2_B3_B4_B5_B6_B7_B8_B9_B10_B11_B12
C1_C2_C3_C4_C5_C6_C7_C8_C9_C10_C11_C12
D1_D2_D3_D4_D5_D6_D7_D8_D9_D10_D11_D12
E1_E2_E3_E4_E5_E6_E7_E8_E9_E10_E11_E12
F1_F2_F3_F4_F5_F6_F7_F8_F9_F10_F11_F12
G1_G2_G3_G4_G5_G6_G7_G8_G9_G10_G11_G12
H1_H2_H3_H4_H5_H6_H7_H8_H9_H10_H11_H12
So far I have this:
# Config:
images_dir = 'C:\\Users\\pateld1\\Pictures\\Incucyte\\P1'
result_grid_filename = './grid.jpg'
result_figsize_resolution = 40 # 1 = 100px
images_list = os.listdir(images_dir)
images_count = len(images_list)
print('Images: ', images_list)
print('Images count: ', images_count)
# Create plt plot:
fig, axes = plt.subplots(12, 8, figsize=(result_figsize_resolution, result_figsize_resolution))
Which creates a list of the image names & a figure of a 12x8 grid
How can I assign the images to a position in the grid based on their id, i.e. A1 to the 1x1 square, A2 to the 2x1 square etc.
I can upload the folder of images if need be