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

4 vues (au cours des 30 derniers jours)
ARP
ARP le 21 Mar 2017
Déplacé(e) : DGM le 20 Fév 2023
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

Réponse acceptée

Walter Roberson
Walter Roberson le 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.
  3 commentaires
ARP
ARP le 21 Mar 2017
Déplacé(e) : DGM le 20 Fév 2023
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
Walter Roberson
Walter Roberson le 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.

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Images dans Help Center et File Exchange

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by