GUI Imshow Quality Loss

6 Ansichten (letzte 30 Tage)
James Clancy
James Clancy am 27 Apr. 2020
Beantwortet: Rahul am 4 Dez. 2024
Hello, I am trying to create a high quality image background for my GUI using the UIAxes method. However, even when I get the picture to the same size of the axes, the quality is lowered. I also cannot figure out how to get the fix specified here to work: https://www.mathworks.com/matlabcentral/answers/342392-quality-for-image-in-matlab-gui
Does anyone have a suggestion/prior experience getting a high quality background image on their GUI?

Antworten (1)

Rahul
Rahul am 4 Dez. 2024
To obtain high quality images on a 'UIaxis', the following MATLAB Answer suggests scaling the axis based on the true size of the image incase 'image' or 'imagesc' functions are being used.
Here is an example:
im1 = imread('im1.png');
imagesc(im1);
axis image
Alternatively, 'imshow' function can be used to display an image on a 'UIaxis'. This function provides properties like 'InitialMagnification' and 'Interpolation' which can be used to improve the scaling of the image. Here is an example:
figure;
ax = axes;
imshow('im1.png', 'Parent', ax);
title('Original Image');
figure;
ax1 = axes;
imshow('im1.png', 'Parent', ax1, 'InitialMagnification', 'fit', 'Interpolation', 'bilinear');
title('Image after bilinear interpolation');
This is also mentioned in detail in this MATLAB Answer:
The following MathWorks documentations can be referred to know more:
Thanks.

Kategorien

Mehr zu Display Image finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by