8

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?

bla
  • 25,846
  • 10
  • 70
  • 101
sattu
  • 632
  • 1
  • 22
  • 37

1 Answers1

9

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

enter image description here

bla
  • 25,846
  • 10
  • 70
  • 101
  • I am not able to convert the given code to display the images which you shown under imshowTruesize title(4th one). It is displaying the result same as the highlighted one(3rd one).. – sattu Oct 21 '12 at 05:08
  • Try the code I added to the answer, it should produce the bottom right figure. Additionally, if this answered your question you can choose to accept it by clicking the V sign just below the # of votes – bla Oct 21 '12 at 06:43