How can I resize an image without changing the pixel dimensions of that image?

조회 수: 1 (최근 30일)
shivasmic
shivasmic 2019년 4월 10일
답변: Walter Roberson 2019년 4월 10일
I want to change the size of the images in my dataset such that no information is lost from them that is resizing without resampling. Resolution might change.

답변 (1개)

Walter Roberson
Walter Roberson 2019년 4월 10일
The closest you can get to that is one of the following:
  • imwrite() a .png with XResolution and YResolution options
  • imwrite() a .tif file with Resolution option
  • imwrite() a .jpg file, and use external software to add an EXIF header with resolution
  • dicomwrite() a DICOM image with resolution properties set in a manner that is appropriate for the modality of the images
  • use the Tiff() class to create a tiff image with control over exactly what tags are written out
  • use geotiffwrite() of a .tif file with referencing information that indicates resolution
In all of those cases except geotiffwrite(), writing in resolution information is pretty much just decoration. Except, that is, that for some models of printer, if you send the printer an image directly (without creating a page description in postscript or pdf) then the printer might use the resolution information to figure out what size to print the image as.
Chances are relatively high that it is not possible to do what you really want to do.

카테고리

Help CenterFile Exchange에서 Images에 대해 자세히 알아보기

제품


릴리스

R2013a

Community Treasure Hunt

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

Start Hunting!

Translated by