Tags: aspect, automatically, figure, helloif, image, imshow, itselfso, ltpicgt, matlab, modifies, pictures, programming, ratio, thefigureimshow, window

image() and imshow()

On Programmer » Matlab

3,910 words with 6 Comments; publish: Thu, 01 May 2008 19:39:00 GMT; (200264.65, « »)

Hello

If I use the

figure;

imshow(<pic> );

I see that the figure window automatically modifies itself

so that the pictures aspect ratio are preserved and the

image doesnot look stretched out or it does not

necessarily fill the axis created intially by the figure

window. I get the image shown in its true aspect ratio and

resolution.But, if I use the ;

figure;

image(<pic> );

I see that the picture accomodates itself in the figures

axis and the aspect ratio and the original resolution is

lost.

How can we make the image() imitate the imshow()

Thanks

Vihang

All Comments

Leave a comment...

  • 6 Comments
    • In article <fmt41v$pjo$1.matlab.questionfor.info.fred.mathworks.com>,

      Vihang Patil <vihang_patil.matlab.questionfor.info.yahoo.com> wrote:

      >resolution.But, if I use the ;

      >figure;

      >image(<pic> );

      >I see that the picture accomodates itself in the figures

      >axis and the aspect ratio and the original resolution is

      >lost.

      >How can we make the image() imitate the imshow()

      axis equal

      --

      We regret to announce that sub-millibarn resolution bio-hyperdimensional

      plasmatic space polyimaging has been delayed until the release

      of Windows Vista SP2.

      #1; Thu, 01 May 2008 19:40:00 GMT
    • > axis equal

      > --

      Dear Walter

      This does not give me the desired results.

      For example

      Download the image found here

      http://bit.uni-koblenz.de/vibi/imag...mbs/t_lenna.jpg

      I = imread('t_lenna.jpg');

      figure,imshow(I); %displays me the image the same size as

      % the original

      figure,image(I);

      axis equal; %does not show me the actual size of the image.

      %Image does not resize the figure window

      Vihang

      #2; Thu, 01 May 2008 19:41:00 GMT
    • In article <fmt96u$ce4$1.matlab.questionfor.info.fred.mathworks.com>,

      Vihang Patil <vihang_patil.matlab.questionfor.info.yahoo.com> wrote:

      >This does not give me the desired results.

      >figure,image(I);

      >axis equal; %does not show me the actual size of the image.

      >%Image does not resize the figure window

      Ah, try axis image

      --

      "I was very young in those days, but I was also rather dim."

      -- Christopher Priest

      #3; Thu, 01 May 2008 19:42:00 GMT
    • roberson.matlab.questionfor.info.ibd.nrc-cnrc.gc.ca (Walter Roberson) wrote in

      message <fmta12$d7k$1.matlab.questionfor.info.canopus.cc.umanitoba.ca>...

      > In article <fmt96u$ce4$1.matlab.questionfor.info.fred.mathworks.com>,

      > Vihang Patil <vihang_patil.matlab.questionfor.info.yahoo.com> wrote:

      >

      >

      >

      > Ah, try axis image

      > --

      > "I was very young in those days, but I was also rather

      dim."

      > -- Christopher Priest

      Nope that doesnt work either. I thing I am not able to

      propogate my question properly.

      Please try the following;

      Download the image found here

      http://bit.uni-koblenz.de/vibi/imag...mbs/t_lenna.jpg

      I = imread('t_lenna.jpg');

      figure,imshow(I); %displays me the image the same size as

      % the original, as can be seen either in MSPAINT or Windows

      % Picture and Fax Viewer

      figure,image(I);

      axis equal;

      axis image; %none of these show me the way imshow shows the

      %image

      %Image does not resize the figure window

      Vihang

      #4; Thu, 01 May 2008 19:43:00 GMT
    • I = imread('t_lenna.jpg');

      figure,imshow(I);

      figure,image(I);

      truesize;

      axis off;

      #5; Thu, 01 May 2008 19:44:00 GMT
    • "Volkan " <volkan.matlab.questionfor.info.buyukgungor.gmail.com> wrote in message

      <fmv0iq$svn$1.matlab.questionfor.info.fred.mathworks.com>...

      > I = imread('t_lenna.jpg');

      > figure,imshow(I);

      > figure,image(I);

      > truesize;

      > axis off;

      Dear Volkan

      Yes, truesize is what I was looking for. Thank You.

      Vihang

      #6; Thu, 01 May 2008 19:45:00 GMT