Why imwrite doesn't work??
9 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
I have a .mat file of Lena(greyscale) and i want to use imwrite to trnsfer it to a jpeg file. so i used:
load Lena;
imwrite (Lena, 'lena.jpg')
there is a jpeg file being generated but it is all white (all values are 255). I don't know why is that?
4 Commenti
Stephen23
il 1 Mar 2018
Modificato: Stephen23
il 1 Mar 2018
"found that the input matrix for imwrite should in [0,1] "
This is not correct: the input range actually depends on the image data class. If you have an image of class double then dividing by 255 may work, see my answer for another solution.
Vedere anche
Categorie
Scopri di più su Denoising and Compression in Help Center e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!