How to make the aspect ratio of the zoom-in window fixed?
9 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
So I'm using AppDesigner to dipslay a sequence of 2D images. All of these images have the same dimensions. Within each image there are regions of interest that I would like to zoom-in to. After setting the axis sytle to image using the follow command
axis(app.UIAxes,'image');
Now, when I zoom-in, the shape of the pixels is preserved which is a desired behavior. In addition, I want is that the zoom-in window shown in blue in the image below to preserve the aspect ration of the image dimentions shown in red. Where when I expand the zoom-in window, it only grows or shrinks with the aspect ratio of the image.
How can I do that?
0 Kommentare
Antworten (1)
Ameer Hamza
am 18 Jun. 2020
You can use daspect() to keep the aspect ratio of the image constant when zooming on a particular region. Also see my answer here: https://www.mathworks.com/matlabcentral/answers/550149-allow-zooming-to-resize-the-axes-and-maintain-axis-equal
Siehe auch
Kategorien
Mehr zu Interaction Control 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!