How can I save an image and keeping the double precision values??
8 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
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 comentarios
Respuestas (1)
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
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.
Ver también
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!