how can i save pixel changes in image?
조회 수: 1 (최근 30일)
이전 댓글 표시
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
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/150983/image.jpeg)
rgbValues2 =
232 240 253
rgbValues1 =
10 240 253
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/150984/image.jpeg)
pixelvalue =
182 194 208
redvalue =
182
why is that?? shouldn't be the pixelvalue=10 240 253??
댓글 수: 0
채택된 답변
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
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Image Segmentation and Analysis에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!