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

8 visualizaciones (últimos 30 días)
Abdallah Talafhah
Abdallah Talafhah el 27 de Abr. de 2021
Comentada: Jan el 27 de Abr. de 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??

Respuestas (1)

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

Iniciar sesión para comentar.

Categorías

Más información sobre Images en Help Center y File Exchange.

Etiquetas

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by