How can I save an image and keeping the double precision values??
8 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
I have a problem as follows:
I'm working on a data hiding code, using a cover image and a secret message to embedd in it, after applying the dct2 on the cover image i added the secret file, but after adding the file, the cover image represented as a matrix has a double values, so the problem is when i save the file as a image to send, matlab doesn't use a double presision values when saving the image, but integers.
so how can I save an image and keeping the double precision values??
0 commentaires
Réponses (1)
Jan
le 27 Avr 2021
You can't. Most image file formats are defined with integer types. You can write single precision data to TIFF files, but as far as I know no doubles. JPEG, GIF and PNG work with integer types only. So this is not a problem of Matlab.
2 commentaires
Jan
le 27 Avr 2021
You can save a binary file using fwrite(). But than these data are not interpreted as image file anymore.
Voir également
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!