"imshow" distorts jpeg
이전 댓글 표시
I am using the following code to display an image on an axis in a Matlab GUI.
axes(handles.axis1);
imshow('my_image.jpg');
This is distorting my image. (There is text on the image which becomes difficult to read). However it seems that Matlab is trying to keep the dimension ratio, because stretching the axis in one direction does not change the output of imshow at all.
I have tried using XData and YData to manually resize the jpeg, with limited success. If I open the jpeg directly, it looks perfect, so it must be something Matlab is doing.
Does anyone have any suggestions? I don't really have a firm grasp on what Matlab is doing when I call the imshow function, so please point out of I'm completely off-base. Thanks.
-Matt
댓글 수: 2
Walter Roberson
2013년 1월 15일
Are you being given a warning about the image being too large to view?
Matt
2013년 1월 15일
채택된 답변
추가 답변 (2개)
Jurgen
2013년 1월 15일
Are you displaying at the proper size? fine detail can be lost (aliasing) if your display size is too small, try maximizing it with e.g.:
figure;imshow('my_image.jpg')
vcmorini
2017년 4월 27일
0 개 추천
카테고리
도움말 센터 및 File Exchange에서 Display Image에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!