how can i save pixel changes in image?

1 回表示 (過去 30 日間)
amira hl
amira hl 2015 年 6 月 8 日
回答済み: David Young 2015 年 6 月 8 日
hi
i made pixel value changes in an image , then i save it in a new name, then i wanted to use the new in another code, i checked the pixel values and
rgbValues2 =
232 240 253
rgbValues1 =
10 240 253
pixelvalue =
182 194 208
redvalue =
182
why is that?? shouldn't be the pixelvalue=10 240 253??

採用された回答

David Young
David Young 2015 年 6 月 8 日
Could be because JPEG compression loses information, so a write followed by a read only returns an approximation to the original. Try using a lossless format, such as BMP, instead of JPEG.
Also, do you need to write the image out to a file and read it back anyway? It's usually much more efficient simply to pass the image between functions or scripts in memory, using the name of the variable that refers to it.

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeImages についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by