How can I save an image and keeping the double precision values??

8 vues (au cours des 30 derniers jours)
Abdallah Talafhah
Abdallah Talafhah le 27 Avr 2021
Commenté : Jan le 27 Avr 2021
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??

Réponses (1)

Jan
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
Abdallah Talafhah
Abdallah Talafhah le 27 Avr 2021
what can I do to save the image that is a double precision basis?
Jan
Jan le 27 Avr 2021
You can save a binary file using fwrite(). But than these data are not interpreted as image file anymore.

Connectez-vous pour commenter.

Catégories

En savoir plus sur Images dans Help Center et File Exchange

Produits

Community Treasure Hunt

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

Start Hunting!

Translated by