Why am i getting different result from matrix grayscale in my base and matrix value from imwrite the grayscale data in my base?
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Please help me, i have matrixes value in my base. There are grayscale value from rgb2gray and matrix value from imread image where the image is result from imwrite grayscale value in my base. But, after i check it the value are different each other. Please tell me why they are different?
4 commentaires
Walter Roberson
le 19 Juin 2018
Are you perhaps using jpeg? The values stored for jpg will not match what you asked imwrite to save unless you tell it to use lossless compression.
Réponses (1)
Walter Roberson
le 19 Juin 2018
When you write data to a JPEG image, never expect to be able to read back exactly the same data again, unless you used 'Mode', 'lossless'. (Note: in my decades, I have only ever seen one genuine lossless jpeg that wasn't not just an artificial image to prove that JPEG can write lossless images.)
We recommend that you write using PNG or TIFF or BMP images.
0 commentaires
Voir également
Catégories
En savoir plus sur Denoising and Compression dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!