The quality of the image decrease when I read and display out in matlab, please advice.
The below are the commands that I had used: imread,imshow
Image Info: Format:JPEG Dimension:1,434 x 1,014 Size:487KB

댓글 수: 1

Adam
Adam 2014년 12월 1일
Try using image or imagesc instead, depending if you have full R, G, B data or just indexed data.
I never use imshow as it always seems to give appalling results.

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

 채택된 답변

Image Analyst
Image Analyst 2014년 12월 1일

0 개 추천

I don't know what Adam does with imshow() but it works fine for me and is my preferred method, unlike imagesc() which applies some colormap that you didn't ask for. Don't use pcolor - that's even worse. Anyway, why do you say the image quality decreases. Show me a screenshot of the image in imshow() and in some other program (like paint or Photoshop) so I can see why you think it's worse. It should display it exactly as it was stored on disk, just magnified or demagnified for display of course. Of course you may have stored a horrible image where you jpegged the heck out of it and it shows up with horrendous jpeg block artifacts, but that would be present in any program that displays it.

댓글 수: 11

Ian
Ian 2014년 12월 2일
이동: DGM 2023년 2월 5일
Image 1.jpg is the actual image, Image 2.jpg is from matlab. Thanks for your advices.
Image Analyst
Image Analyst 2014년 12월 2일
It looks like maybe the image is real big and it's being subsampled for display and dropping some lines. You can display full size, pixel for pixel. See attached demo for imscrollpanel.
Ian
Ian 2014년 12월 2일
이동: DGM 2023년 2월 5일
Thanks for your reply, lets say I want to plot the image together with the graph what can I do to retain the quality?
Image Analyst
Image Analyst 2014년 12월 2일
이동: DGM 2023년 2월 5일
I don't know exactly. Try export_fig() or change your renderer (painter, zbuffer, openGL) or call the Mathworks and tell them you're not happy with the quality of their graphics.
Ian
Ian 2014년 12월 2일
이동: DGM 2023년 2월 5일
thanks
Eric Auth
Eric Auth 2018년 4월 9일
Hello,
I know this is a (very) old thread, but I am having an issue currently where it seems some of the picture is shown differently with imshow() than when brought up on another program. _DSC1189 is a .tiff image of a firebrand - notice how the middle of the firebrand shows up (red) in Windows Photo Viewer and does not show up (black) when opened in Matlab using imshow(). Any suggestions are appreciated!
Image Analyst
Image Analyst 2018년 4월 10일
Attach the TIFF image. It looks like they're using different colormaps. It's not an RGB image is it? Because it looks like probably it's an indexed image and the colormaps are different.
Eric Auth
Eric Auth 2018년 4월 10일
Hmm it appears to be too large: even when compressed into a zip file
Image Analyst
Image Analyst 2018년 4월 11일
How large are they? Can you subsample them to make them smaller?
Eric Auth
Eric Auth 2018년 4월 12일
This is the best I can do. Taken a super small crop of the initial .tiff and zipped it with Adobe Photoshop (which changed to .tif) and then into a zip folder. Original .tiff image is 118 MB.
DGM
DGM 2023년 2월 5일
I know it's too late, but I saw this while cleaning up. There's a bunch of Photoshop metadata in that file, the purpose of which I don't understand. There is an included ICC profile, but there's also a 1x4236 numeric vector embedded by Photoshop. So... more profile data?
Maybe in another five years, someone will tell us what it all means.

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

추가 답변 (2개)

Jose
Jose 2022년 2월 23일

2 개 추천

A mitigation to a pixelated image display may be interpolation available from R2019b:
figure;
subplot(121); imshow('logo.tif')
subplot(122); imshow('logo.tif', 'Interpolation','bilinear')
I use it to display text pages converted to images.
My thanking to Steve Eddins:
meola22
meola22 2017년 5월 2일
편집: meola22 2017년 5월 3일

1 개 추천

Just stumbled upon the same problem and the solution is quite simple. All one needs to do is change the OpenGL from software to hardware. So just add this line of code:
opengl hardware
That fixed the pixelation problem for me.

댓글 수: 1

Eddy Philippe
Eddy Philippe 2022년 3월 4일
This improved it, thx! It's still not 100% perfect resizing (as I get i photoshop), so I'm still working on it.

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

카테고리

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

태그

질문:

Ian
2014년 12월 1일

댓글:

DGM
2023년 2월 5일

Community Treasure Hunt

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

Start Hunting!

Translated by