I am using a GUI created by someone else and it's working great with the sample images I uploaded from their github, which are about 10MB .jpg files that are 3684 x 4912 x 3 in size. I am trying my own .jpg files which are 178KB and 688 x 917 x 3 in size, and they are all pixelated. Is there a way to remedy this without code? Is there a setting somewhere that will improve the image quality? Or do I need to start with a better quality image to begin with? These are images that I swiped from the web and a powerpoint file, so I am thinkng I just need better quality images.

 채택된 답변

Star Strider
Star Strider 2023년 4월 19일

0 개 추천

JPEG images have problems because of the discrete cosine transform used to encode them. See the Wikipedia section on JPEG compression for details.
For best results, use PNG.

댓글 수: 8

Daniel
Daniel 2023년 4월 19일
Agreed, but also, you'll run into blockiness sooner on smaller images. OP's images are about 1/4 the size in each dimension of the reference images, so for equivalent compression ratios, they'll get blocky 4x as fast.
Either way, I think the answer is "yes, you probably just need better quality images with more pixels" (as long as the compression ratio on those images isn't ridiculous, which will also cause blockiness per Star Strider's answer).
Julie
Julie 2023년 4월 19일
I did try a PNG file, the same file that I had uploaded as JPG. The image was processed but had the same pixelated look as the JPG file. I agree with Daniel that more pixels will fix this problem. I've written to the author because they have trained the GUI on 12000 images so they should have an idea what the limitations are. If they ever respond.
Star, thank you so much for writing back right away! That's good to know about JPG vs PNG and I will keep it in mind when I'm using this program. The author used all JPG files as samples so I did the same, but ti's good to know that I can also use PNG and that it might even be better to use PNG. Just not for these low quality images that I have.
Star Strider
Star Strider 2023년 4월 19일
As always, my pleasure!
Enrique
Enrique 2023년 4월 25일
Does someone know if it is possible to insert a vector image (.pdf or .svg) to solve the pixel problem?
I have tried with .svg but simulink converts it to a very pixelated image. :(
Daniel
Daniel 2023년 4월 27일
@Enrique, since the original poster's question has been answered, you'll get a lot more traction with the community if you post your question in its own thread.
Julie
Julie 2023년 4월 27일
Yes I actually contacted the author of the GUI who changed the code so the GUI will upload TIFF images now, less lossy and more compatible with our slide imaging program. She agreed that the GUI was trained on larger images and the lack of information in the images will compromise the ability of the GUI to classify the images. Thank you everyone for your help.
DGM
DGM 2024년 9월 23일
If the GUI utilizes uiimage() components for image display, then you will likely see JPG artifacts regardless of the original image format. Using larger images will simply make them less visually conspicuous, but they'll still be there.
I don't have enough information here to be certain, but that's a quite plausible explanation.

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

추가 답변 (0개)

카테고리

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

제품

릴리스

R2023a

질문:

2023년 4월 19일

댓글:

DGM
2024년 9월 23일

Community Treasure Hunt

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

Start Hunting!

Translated by