Changing ppi image resolution

2 ビュー (過去 30 日間)
Wolfgang Vollrath
Wolfgang Vollrath 2019 年 2 月 4 日
コメント済み: Image Analyst 2019 年 2 月 7 日
Let's IMG be an image with 200ppi pixel resolution. After some image processing I want to write the modified image back to disk with 300ppi pixel resolution. Apparently there is no way using the Image Processing Tool Box for doing this in a simple manner, e.g. just by setting some proper parameter in imwrite or imresize or any other related function to the desired pixel resolution.
WolVo

回答 (1 件)

Image Analyst
Image Analyst 2019 年 2 月 4 日
An image is just a bunch of pixels - a numerical array - with no spatial calibration unless you interpret it to have one.
If you want 1.5 times as many pixels to cover your field of view, why not just use imresize():
outputImage = imresize(inputImage, 1.5);
  2 件のコメント
Wolfgang Vollrath
Wolfgang Vollrath 2019 年 2 月 7 日
Right - mathematically just a bunch of pixels. But for the real world the attributed ppi resolution matters. E.g. for any given number of total pixels, it depends on the ppi setting how large in size an image will be printed. By this one can chose the size of the print by just changing the ppi value with the need to change the total number of pixels. A ppi value can be defined in all of the photographic image processing programs like Photoshop independent of the total number of pixels . It would be nice to have this feature also in Matlab so that one can write a processed image file with the same (or any arbitrarily chosen) ppi to disk.
Image Analyst
Image Analyst 2019 年 2 月 7 日
MATLAB is more of a programming environment and doesn't have a lot of interactive tools like ImageJ does, where you can specify a spatial calibration and have it automatically apply to the various tools. That would be nice, though I don't use the interactive applets built in to the MATLAB Apps tab that much, other than the Color Thresholder.
If you want the ppi written into the EXIF or IPTC metadata with the image in a disk file, I think there are options to do that, especially with the TIFF class.

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

カテゴリ

Help Center および File ExchangeImages についてさらに検索

製品


リリース

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by