imshow: Warning: Image is too big to fit on screen; displaying at 6%
5 次查看(过去 30 天)
显示 更早的评论
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 个评论
采纳的回答
Walter Roberson
2017-3-21
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 个评论
Walter Roberson
2017-3-21
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.
更多回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!