0

I am trying to show a .tif image in matlab and I use these two line of codes

a = imread('C:\Users\sepideh\Desktop\21_15.tif'); imshow(a)

that encounters this warning

Warning: Image is too big to fit on screen; displaying at 3%

In imuitools\private\initSize at 73 In imshow at 262

what is the cause of this warning and what can I do to fix that? the main trouble is it sometimes doesn't show the image and of course even if it shows the image CPU usage gets high that I can't zoom properly

Sepideh Abadpour
  • 2,550
  • 10
  • 52
  • 88

2 Answers2

0

Use normalized units and multiply by the image size.

You can try this:

plot_size = get(0,'ScreenSize');
fg = figure(1);
set(fg, 'Color', [1 1 1], 'Position', plot_size, 'Visible', 'on');
a = imread('C:\Users\sepideh\Desktop\21_15.tif');
imshow(a)

Or check the solution given here by @Jonas

Community
  • 1
  • 1
CsaByte
  • 724
  • 5
  • 7
  • set(gcf, 'Units','normalized','outerposition',[0 0 1 1]); – CsaByte Mar 25 '12 at 11:27
  • I tried your code.It encounters the same warning and the suggested solution encounters this error with my own image??? Out of memory. Type HELP MEMORY for your options. Error in ==> repmat at 92 B = A(mind,nind); – Sepideh Abadpour Mar 25 '12 at 13:50
-1

try "image(a)"

http://www.mathworks.com/help/matlab/ref/image.html

I succeeded with this.