How to change resolution of an image ?

19 次查看(过去 30 天)
ABTJ
ABTJ 2020-4-28
回答: Charu 2025-1-23,11:46
What is the command/keyword for changing resolution(ppi) of image in matlab? How we can use that command? Please kindly give an example
  3 个评论
Image Analyst
Image Analyst 2020-4-28
You mean like if you printed it to paper or a PDF?
ABTJ
ABTJ 2020-4-29
please check the updated question, I have edited, it was pixels per inch , my intention wasn't dpi

请先登录,再进行评论。

回答(1 个)

Charu
Charu 2025-1-23,11:46
To change the resolution of an image in MATLAB, you can specify the pixels per inch (PPI) when saving the image in formats that support this feature, such as TIFF. This can be done using the imwrite function with the Resolution parameter provided by the Image Processing Toolbox. For example, in MATLAB R2024b, you can set the resolution as follows:
imwrite(imageData, 'outputimage.tiff', 'Resolution', [300, 300]);
Refer to this link of official documentation for further information.

类别

Help CenterFile Exchange 中查找有关 Get Started with MATLAB 的更多信息

产品


版本

R2015a

Community Treasure Hunt

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

Start Hunting!

Translated by