image() and imread() displays lower quality image
조회 수: 17 (최근 30일)
이전 댓글 표시
Apologies if I'm misusing any image-processing terms; I'm not very familiar with them.
When I display an image in Matlab using the imread() function, the displayed image is noticably lower quality than the original image before I load it into Matlab. To clarify, this doesn't have anything to do with saving an image through Matlab; I am loading an image that when viewed in another image viewing program (Windows Photo Viewer, Adobe Illustrator, etc) seems to have one level of quality, but when loaded and displayed in Matlab seems to lose that quality.
I've attached the original image and a screenshot comparison of the original image (on the left) and Matlab's display of the image (on the right). My code is as follows:
cadPic = imread('original.png');
image(cadPic)
I've tried various combinations of image(), imread(), and imshow(). I've also tried converting the original image from an int8 RGB triplet into a double, with this method:
I've also tried to use the
axis image
command specified by this answer, with no effect. I can manually resize the image in Adobe Illustrator without seeing this kind of quality loss, so I'm not sure if the solution in that answer applies to this case.
댓글 수: 2
Walter Roberson
2019년 1월 16일
It looks to me to be a challenge with aliasing on lines that are only one pixel wide with an image that is several times screen size.
I am not sure how the other programs are coping with this. It is possible, I suppose, that they have algorithms to detect lines and prioritize those.
I agree that the output leaves rather something to be desired.
채택된 답변
Image Analyst
2019년 1월 16일
I think the image is just being subsampled for display. If you zoom in you'll probably see all the details. See attached zoom demo.
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Convert Image Type에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!