Display Issues with Matlab Images in GUI
Afficher commentaires plus anciens
I have a MATLAB GUI where I have displayed an image on a set of axes, and it looks fine.
However, when the GUI is opened on some other computer with (presumably) different resolution settings, the image is stretched and becomes pixelated. I have tried setting up the axis size based on both pixel units and characters, neither of which preserve the smooth original appearance of the image across all computers.
Does anyone have a solution for this?
It seems crazy to me that there doesn't appear to be an easy way to have a simple image, with known pixel height and width, appear properly in a Matlab GUI regardless of monitor and resolution configuration.
Thanks in advance!
4 commentaires
David Barry
le 22 Déc 2016
Please upload your code so we can see how you are displaying the image.
Eric Cote
le 23 Déc 2016
David Barry
le 23 Déc 2016
Have you set the axes limits correctly? You could maybe try this instead of using image as it should sort out limits for you.
load('logo.mat');
imshow(thelogo, 'Parent', handles.axes1, 'Colormap', thecmap);
Can you upload a screenshot to demonstrate the issue?
Eric Cote
le 23 Déc 2016
Réponses (2)
David Barry
le 23 Déc 2016
1 vote
If you are running Windows (unlucky) then make sure your zoom settings are set to 100%. For some reason 125% seems to be the default on some OS. This has tripped me up at work where colleagues are on 125 and I'm designing GUI's on 100. This seemed to have an effect in later releases of MATLAB (maybe post 14b and HG2).

Image Analyst
le 23 Déc 2016
0 votes
I often have trouble with the GUI not looking like mine when I compile and deploy it. It's caused by different video adapters and different resolutions. Try making the units property of all your controls 'normalized'. It helps but does not fix everything. Then try experimenting with different axis options like "axis image" or "axis equal" etc. Even that may not fix everything, especially controls with text on them. I still don't have a 100% solution for me, or for you. Maybe you can try App Designer - I haven't tried it yet.
1 commentaire
Catégories
En savoir plus sur Graphics Object Properties dans Centre d'aide et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
