TiledLayout or Montage for combining my images?

3 次查看(过去 30 天)
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.

采纳的回答

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

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Graphics 的更多信息

产品


版本

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by