pixel size of the image in matlab different from that of original pixel size

6 ビュー (過去 30 日間)
P Sai Venkat  Kushal
P Sai Venkat Kushal 2020 年 12 月 16 日
回答済み: Vinai Datta Thatiparthi 2020 年 12 月 21 日
I am using MATLAB 2019b
I am facing the issue where the pixel size of the image is different from what MATLAB is giving as the pixel size of the image. I have tried using imread funciton of MATLAB it is showing the pixel size given in MATLAB. I am facing this issue only incase of this image and not incase of other images.
Any kind of suggestion or advice is appreciated
  4 件のコメント
Walter Roberson
Walter Roberson 2020 年 12 月 20 日
Perhaps you are looking at the information for a file in a different directory?
My system says the image is 500 x 500 x 3
Uday Pradhan
Uday Pradhan 2020 年 12 月 20 日
Sai, please check the screenshot attached. The RGB_108.png which you have attached has dimensions 500 x 500 according to the Properties dialog.

サインインしてコメントする。

回答 (1 件)

Vinai Datta Thatiparthi
Vinai Datta Thatiparthi 2020 年 12 月 21 日
Hi Sai,
The image that you've shared on the community, I've also noticed that it's size is 500x500x3. Even in the properties of the image, you'll notice the "width" & "height" as 500 respectively. Also, notice that the "Bit Depth" is 24, indicating 3 channels, therefore resulting in size of the image as 500x500x3. For instance, in a grayscale image, the "Bit Depth" would have been 8 instead.
If the information from MATLAB and properties pane don't match, then a reasonable explanation could be that you're probably working on two different images (like was pointed out by @Walter).
Hope this helps!

Community Treasure Hunt

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

Start Hunting!

Translated by