save a probability matrix (range [0, 1]) as grayscale image with range [0,1]

조회 수: 2 (최근 30일)
Mina Gheiratmand
Mina Gheiratmand 2019년 12월 5일
댓글: Mina Gheiratmand 2019년 12월 5일
I need to save an mxn probability matrix (values in range [0, 1], single) as an image (png, tif, etc.). I want the values to stay in the [0 1] range and not scaled to 0-255 (uint8) or other like what imwrite does. Can it be done in Matlab? Thank you.

답변 (1개)

Walter Roberson
Walter Roberson 2019년 12월 5일
For the low level stuff:
The idea here is that to write floating point images as floating point, you are restricted to TIFF: none of the other image formats can handle floating point data without converting it (unless you want to count DICOM as an image format.)
Many image browsers cannot handle floating point TIFF images. I seem to recall that Windows Explorer can display floating point TIFF though.
  댓글 수: 1
Mina Gheiratmand
Mina Gheiratmand 2019년 12월 5일
This looks like a solution! Thank you very much for your quick reply! I will dig further into exporting to tiff for my use case and get back ...

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

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by