Changing ppi image resolution

2 vues (au cours des 30 derniers jours)
Wolfgang Vollrath
Wolfgang Vollrath le 4 Fév 2019
Commenté : Image Analyst le 7 Fév 2019
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

Réponses (1)

Image Analyst
Image Analyst le 4 Fév 2019
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 commentaires
Wolfgang Vollrath
Wolfgang Vollrath le 7 Fév 2019
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 le 7 Fév 2019
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.

Connectez-vous pour commenter.

Catégories

En savoir plus sur Images dans Help Center et File Exchange

Produits


Version

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by