How can I view an undistorted JPG file in MATLAB?

1 view (last 30 days)
All that I want to do is view my original picture (saved as a JPG file) in MATLAB. Here is the code I am using:
img = imread('MyPicture.JPG');
image(img);
However, instead of displaying the exact version of the picture, MATLAB distorts it by shrinking the width. The original picture is, admittedly, abnormally wide (dimensions = 3172 x 972). How can I display the original picture without any distortions?

Accepted Answer

Kelly Kearney
Kelly Kearney on 7 Nov 2014
image(img);
axis equal;

More Answers (0)

Categories

Find more on Images in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!