TiledLayout or Montage for combining my images?

9 vues (au cours des 30 derniers jours)
Martin Vrátný
Martin Vrátný le 21 Juil 2023
Commenté : Martin Vrátný le 22 Juil 2023
Hello,
I've been trying to make use of a montage command in matlab, but if i use it like so
montage(my_imageDatastore,"Size", [14 4]);
then it fills the montage row by row and that is a problem for me. I know that i can swtich the size dimensions, but then the imgs are really small and not suitable for .png export.
This next code snippet does what i need. I need to preserve the columns so that i can compare images in rows.
tiledlayout(1,4,"TileSpacing","none","Padding","tight")
ax1 = nexttile;
imshow(imtile(TEMPLATES,'GridSize',[14 1]),'Border','tight');
ax2 = nexttile;
imshow(imtile(D1_randn,'GridSize',[14 1]),'Border','tight');
ax3 = nexttile;
imshow(imtile(D1_wini_randn,'GridSize',[14 1]),'Border','tight');
ax4 = nexttile;
imshow(imtile(D1_wini,'GridSize',[14 1]),'Border','tight');
this code have a different problem, which is that it has a lot of space between the columns
This img is exported from 'montage' command .
This img is exported from 'tiledlayout' code snippet.
I would live to combine these two approaches, preserve the columns and have no white space between the columns.
Am i doing this with right tools? Did i miss some parameters that easily fix my issue?
Thanks in advance for any tips.

Réponse acceptée

Image Analyst
Image Analyst le 21 Juil 2023
Doesn't imtile return an image? Just stitch those together, like
bigImage = [tile1, tile2, tile3, tile4];
imshow(bigImage);

Plus de réponses (0)

Produits


Version

R2022a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by