Display images in different sizes in MATLAB

前端 未结 1 921
梦如初夏
梦如初夏 2021-01-05 01:07

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

I tried to use imresize, truesize

相关标签:
1条回答
  • 2021-01-05 01:44

    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

    0 讨论(0)
提交回复
热议问题