Display images in different sizes in MATLAB

江枫思渺然 提交于 2019-11-30 03:41:20

问题


I am creating gaussian pyramid in MATLAB 2010b. I want to show images like same patterned mentioned here.

I tried to use imresize, truesize but getting all images in same size. Could anybody please help me on this issue?


回答1:


You can use "imshow with True Size for multiple images" FEX file to answer your question...

EDIT : The code below will produce the subplot at the bottom right part of the figure:

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



来源:https://stackoverflow.com/questions/12984439/display-images-in-different-sizes-in-matlab

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!