MATLAB Answers

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

57 views (last 30 days)
ARP
ARP on 21 Mar 2017
Answered: Shivam Plaha on 6 Feb 2018
Hi all,
I have a matrix of 12502 x 15 that I would like to convert into an image using imshow().
The output is the following:
>> imshow(Image)
Warning: Image is too big to fit on screen; displaying at 6%
> In images.internal.initSize (line 71)
In imshow (line 327)
>> whos Image
Name Size Bytes Class Attributes
Image 12502x15 1500240 double
Is there any sensible way to fix this? this matrix is actually way smaller than what I intend to use.
The matrix is fine, as I have copied the data into another program and plotted the gray scale image.
I have been reading other answers on the topic and they don't seem to guide to anything.
I am using version 2016b.
Please help!
thanks in advance

  0 Comments

Sign in to comment.

Accepted Answer

Walter Roberson
Walter Roberson on 21 Mar 2017
If you create a figure and axes ahead of time with Position covering most of the width of your screen you can probably get up to the range of 8 percent, maybe even as high as 20 percent if you have a tall screen. Also, image() has less overhead decoration than imshow.
But it is not clear what you mean by "fixing" the problem of displaying an image that your image is much much taller than your screen??
If what you are doing is capturing the displayed image in order to get a pseudo color or color scaled version of it, then do not go through displaying it at all. ind2rgb can be used to convert integer grayscale into rgb. im2uint8 can be used to convert double in 0 to 1 range into uint8. mat2gray can be used to rescale arbitrary range to 0/1.
im2uint8 is more complicated than you would expect: the seemingly obvious computations do not work out properly on the upper and lower edges of the range.

  1 Comment

Walter Roberson
Walter Roberson on 21 Mar 2017
I would not use imshow for that purpose. I would create an axes and set its Position properties and I would image() and then colormap(). For sufficiently new MATLAB I would also probably tell MATLAB to set the figure graphicssmoothing property off.

Sign in to comment.

More Answers (3)

ARP
ARP on 21 Mar 2017
maybe the axis helps. The error in displaying the image is so large that is hard to understand. See the attached image of what I get, and what it should look like.

  0 Comments

Sign in to comment.


ARP
ARP on 21 Mar 2017
Forgot to add, I previously created Image = mat2gray [data, [amin amax])
The problem is matter of scaling the image. it works for fine for only a few columns. When using 15 columns somehow gives and error

  0 Comments

Sign in to comment.


Sign in to answer this question.

Tags


Translated by