save a probability matrix (range [0, 1]) as grayscale image with range [0,1]
2 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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.
0 commentaires
Réponses (1)
Walter Roberson
le 5 Déc 2019
For the low level stuff:
But you can just use https://www.mathworks.com/matlabcentral/fileexchange/30519-export-image-to-tif-or-tiff-file-of-selected-data-type
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.
Voir également
Catégories
En savoir plus sur Explore and Edit Images with Image Viewer App dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!