Imtile resolution changes with figure height
显示 更早的评论
Hello, Im using imtile to create a montage from an array of images
out=imtile(IMarray,'GridSize',[r c]);
I display this on a fig via:
fig = uifigure('Name',['Montage ',char(tl)]);
fig.HandleVisibility='on';
fig.Position = [300 200 figW figH];
m = uimenu(fig,Label="My Save As");
m.MenuSelectedFcn = @app.mysavefunc;
app.figMontage=fig; % assign to public property so can be accessed
g = uigridlayout(fig);
%Create 3 x 2 Grid Layout
g.RowHeight = {'9x','1x','1x','1x'}; % g.RowHeight = {'6x','6x','1x','1x'};
g.ColumnWidth = {'1x','1x','1x','16x','0.8x'}; %g.ColumnWidth = {'1x','8x'};
%add UIAXES to 1st 2 rows, 1st 2columns
app.axMontage = uiaxes(g);
app.axMontage.Layout.Row = [1,2];
app.axMontage.Layout.Column = [1 5];
myImagesc(app,app.axMontage,out); axis(app.axMontage,'image'); drawnow;
So Ive noticed when y figure is 1500 x 600, the images look a lot better than when the figure is only 300 high - even though with the 300 height figure, the montage completely fits


2 个评论
It might be worth noting that the default behavior for imtile() sets the tile size to the geometry of the first image. If your images vary in size and you don't want any of them downsampled in the operations internal to imtile(), then you need to explicitly set ThumbnailSize in the call to imtile().
It's not really obvious from the example if your images do vary, but I figured I'd throw that out there.
Like Matt said though, even if there isn't any downsampling happening in the output of imtile(), if the composite image size exceeds the displayed size, then it must be downsampled for display.
Depending on what tool you're using to display the composite image (imshow() vs image()/imagesc()), the display interpolation is likely nearest-neighbor. That tends to accentuate aliasing in images with small features and hard edges. While imshow() supports bilinear display interpolation, it's not the default. See imshow. It might help ease some of the appearance, but if the image is being downsampled for display, it doesn't change the fact that it's being downsampled.
Jason
2025-11-14
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Basic Display 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!