Filter löschen
Filter löschen

How does the imreisze function works?

1 Ansicht (letzte 30 Tage)
John Doe
John Doe am 18 Mai 2020
Kommentiert: John Doe am 18 Mai 2020
Hello everyone. I was trying out the built-in hallway photo in MATLAB. I resized it by 1.5 times and 2 times than the original image. But somehow the 1.5 times version looks bigger to the naked eye? For low-res images, 1.5 times and 2 times resized images look their size though.
I was wondering if one could explain how the resize function is working here. Thanks!

Akzeptierte Antwort

Image Analyst
Image Analyst am 18 Mai 2020
If the image cannot fit fully on the screen, it will reduce the axes control until it will fit comfortably. Maybe the 1.5 just barely fit but the 2 would not and it resized the 2 to be smaller than the 1.5. You can always turn on the tick marks to see the actual pixel count:
axis('on', 'image');
Also, see attached zooming example.
  1 Kommentar
John Doe
John Doe am 18 Mai 2020
Thanks for the neat explanation.
If MATLAB resized the 2 to fit the window, then will it still be the double in size and greater than 1.5 if I save it?

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Images 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