why does imwrite change the image's pixel size?

4 Ansichten (letzte 30 Tage)
Safa Ridene
Safa Ridene am 6 Okt. 2018
Kommentiert: Image Analyst am 31 Aug. 2020
I know it's odd, but imwrite command happens to change my image's pixel size. Does anyone have a proper explanation for this? Thank you
  6 Kommentare
Safa Ridene
Safa Ridene am 7 Okt. 2018
Thank you for your responses, I changed the config as mentioned in the link but it didn't solve the problem. I think Matlab has a default value for the pixel scale but I couldn't figure out how to change it.
Walter Roberson
Walter Roberson am 7 Okt. 2018
You should probably not be using imwrite for ArcGIS.
MATLAB has no default for pixel scale. Only a small number of image formats accept scale information for imwrite and if it is not provided by the user then imwrite does not emit it into the image. imwrite is rather restricted in the metadata it can write.

Melden Sie sich an, um zu kommentieren.

Antworten (1)

JESUS MARTINEZ
JESUS MARTINEZ am 1 Apr. 2020
Hi, Sorry to bump into this thread but I have similar issue.
I am using some filters and I am feeding with an image of 50x50 pixels aprox, but the imwrite outputs a much larger file of 400x400 pixels aprox or so.
ITs frustrating cause I am trying to measure specific areas (in pixels) in both images but due to the resize...Its not apples to apples any longer.
Any help? thanks
  6 Kommentare
Ishtiaque Ahmed khan
Ishtiaque Ahmed khan am 30 Aug. 2020
@Jesus Martinez
Hello,
May I please know how you resolved the problem?
I am having same issue.
Please help.
Image Analyst
Image Analyst am 31 Aug. 2020
Start your own question and attach your image and code.

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Get Started with Image Processing Toolbox 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