在MATLAB中显示不同大小的图像 [英] Display images in different sizes in MATLAB

查看:1229
本文介绍了在MATLAB中显示不同大小的图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在MATLAB 2010b中创建高斯金字塔。我希望在此处中显示相同图案的图像。

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

我试图使用 imresize truesize 但获取所有图像大小相同。有没有人可以帮我解决这个问题?

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

推荐答案

你可以使用imshow with True Size for multiple images FEX文件来回答你的问题.. 。

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

这篇关于在MATLAB中显示不同大小的图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆