在MATLAB中显示不同大小的图像

时间:2012-10-20 01:22:49

标签: matlab image-processing resize plot gaussian

我在MATLAB 2010b中创建高斯金字塔。我想要显示类似图案提到here的图像。

我尝试使用imresizetruesize,但要获得相同尺寸的所有图像。有人可以帮我解决这个问题吗?

1 个答案:

答案 0 :(得分:9)

您可以使用“imshow with True Size for multiple images”FEX file来回答您的问题......

编辑:下面的代码将在图的右下角生成子图:

clear imagesCellArray
mand = imread('mandelbrot_set.jpg'); % read image
dim = 3;

[imagesCellArray{1:dim,1:dim}] = deal(mand); % create smaller images by imresize
 for iRow = 1:dim
    for iCol = 1:dim
       imagesCellArray{iRow,iCol} = imresize(imagesCellArray{iRow,iCol},1/(1.5*(iCol*iRow)));
    end
 end

 % plot with imshowTruesize - true aspect ratio is preserved
 margins = [25 25];
 Handles = imshowTruesize(imagesCellArray,margins);
 for iRow = 1:dim
    for iCol = 1:dim
       axis(Handles.hSubplot(iRow,iCol),'on')
    end
 end

enter image description here