필터 지우기
필터 지우기

I have a matix of class double but when i am converting it to an image by imwrite it's class changes to uint8 but i want it to be double type what should i do?

조회 수: 3 (최근 30일)
matix to image

답변 (2개)

Walter Roberson
Walter Roberson 2018년 11월 21일
There is no supported way to write double precision images in matlab . There are supported ways to write single precision tiff and dicom. Only tiff and png and dicom support double precision at all in their standards but matlab does not support creating them (unless possibly tiff support was added recently ) . One of the links above leads to aa File Exchange contribution that claims to support double precision tiff.
In my experience everyone who has asked for imwrite to support double precision has had a weak understanding of image file formats . The people who have had good reason to deal with double precision images have directly asked about the tiff class or about dicom transfer syntaxes.
  댓글 수: 10
Guillaume
Guillaume 2018년 11월 23일
And, yes I don't think matlab lets you access private chunks of a PNG. Perhaps, they ought to provide a PNG interface similar to the TIFF interface. Or since, libpng is shipped with matlab, you could always directly interact with it.
Walter Roberson
Walter Roberson 2018년 11월 23일
Hence my "at all".
Though looking again with jpeg II guess you could use aa private exif tag which would get you 4 bytes worth of chunk length . (matlab provides no way to write exif. there is aa fex contribution to call an external program to write exif)

댓글을 달려면 로그인하십시오.


Image Analyst
Image Analyst 2018년 11월 21일
Save it as a .mat file with save(). Any problem with that? What app is going to read these in after you write it out? If it's just MATLAB again, simply use save() and load().

카테고리

Help CenterFile Exchange에서 Image Processing Toolbox에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by