MATLAB: How to make sure image resolution

image analysisimage resolution

Hi everyone, i have one problem about image resolution. I have took an image which has resolution 4000 pixels of width and 3000 pixels of height (the appearanced is landscape when viewed in photo viewer). Unfortunately, when I load in Matlab (using imread), the resolution is changing itself. Its become 3000 pixels of width and 4000 pixels of height, and when it show using imshow its become potrait. I appreciate if anyone could help me out figuring how it can be happened. Thanks and best wishes

Best Answer

Some cameras store the orientation in the EXIF data, which Matlab generally ignores. In my PhotoAnnotation tool I used an external tool to extract this from the file, but depending on the release you're using you might be able to use native Matlab tools.