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 CenterFile Exchange에서 Images에 대해 자세히 알아보기

제품


릴리스

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by