Image is too big to fit on screen!

Whenever I tried to display the image it shows only a thin dark line and returns in the command window "Warning: Image is too big to fit on screen; displaying at 0% ". What do I do to make it show the image?

댓글 수: 2

Image Analyst
Image Analyst 2012년 5월 4일
I have a general fix for this that will work for any warning. See my instructions below in the comments of my answer.
Aliyu Abdu
Aliyu Abdu 2012년 5월 4일
Thanks. The image I'm working on is 512 by 288, and I'm using the "imshow()" routine with the command ">>figure,imshow(img);". working with R2011a on windows 7. My previous question has been solved but most of the time I call the image to show it always display at 50%.

댓글을 달려면 로그인하십시오.

답변 (2개)

Image Analyst
Image Analyst 2012년 5월 4일

6 개 추천

% Turn off this warning "Warning: Image is too big to fit on screen; displaying at 33% "
% To set the warning state, you must first know the message identifier for the one warning you want to enable.
% Query the last warning to acquire the identifier. For example:
% warnStruct = warning('query', 'last');
% msgid_integerCat = warnStruct.identifier
% msgid_integerCat =
% MATLAB:concatenation:integerInteraction
warning('off', 'Images:initSize:adjustingMag');

댓글 수: 5

Lee how
Lee how 2017년 4월 27일
Great!
Misbah Abid
Misbah Abid 2018년 7월 25일
Bundle of thanks .Problem resolved .
Vijaya yaduvanshi
Vijaya yaduvanshi 2021년 3월 4일
thank you so much
jyotsna kosuru
jyotsna kosuru 2021년 5월 24일
excellent
Image Analyst
Image Analyst 2021년 5월 24일
See attached function that turns off a bunch of other unwanted warnings.

댓글을 달려면 로그인하십시오.

Alex Taylor
Alex Taylor 2012년 5월 4일

0 개 추천

The "thin dark line" that was displayed sounds like what happens when you accidentally display image data that has been shaped to be a vector.
im = imread('pout.tif');
imshow(im(:));
instead of
imshow(im);
When you make this mistake, it's easy to create a vector whose length is bigger than your screen in one dimension. I accidentally do this myself from time to time.

댓글 수: 11

Aliyu Abdu
Aliyu Abdu 2012년 5월 4일
I got it, thanks a lot indeed!
Nidhi Kumari
Nidhi Kumari 2018년 10월 14일
I have applied huffman encoding to compress an image and then i am displaying it but am only getting a thin vertical line. What to do?
Image Analyst
Image Analyst 2018년 10월 14일
Decompress the image back to a 2-D uncompressed image and display that.
SS
SS 2019년 5월 23일
Hello, I have applied huffman coding in an image. But when i am displaying it, it only displaying the title "Compressed image" with a white background, but it does not show the image. What can I do now?
Try using [] in imshow():
imshow(yourImage, []);
SS
SS 2019년 5월 23일
편집: SS 2019년 5월 23일
I have tried this code,
figure,imshow(comp,[]);title('compressed image')
But it shows, only the title
Image Analyst
Image Analyst 2019년 5월 24일
It looks like comp is all the same value. Please attach it in a .mat file.
SS
SS 2019년 5월 25일
편집: SS 2019년 5월 25일
This file contains my overall code that I am using.
Image Analyst
Image Analyst 2019년 5월 25일
Please attach 1.jpg. Previously you attached 1.png, which is different.
SS
SS 2019년 5월 25일
I am using this image
SS
SS 2019년 6월 13일
Please, Can you give me any solution of my problem?

댓글을 달려면 로그인하십시오.

카테고리

도움말 센터File Exchange에서 Display Image에 대해 자세히 알아보기

제품

질문:

2012년 5월 4일

댓글:

2021년 5월 24일

Community Treasure Hunt

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

Start Hunting!

Translated by