我在MATLAB 2010b中创建高斯金字塔。我想要显示类似图案提到here的图像。
我尝试使用imresize
,truesize
,但要获得相同尺寸的所有图像。有人可以帮我解决这个问题吗?
答案 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