why after I use the imwrite function, the pixels in the image are changed diferrent? before I convert from double matrix to uint8 matrix ?

조회 수: 10 (최근 30일)
embed1=uint8(blkproc(embed1,[8 8],@idct2));
imwrite(embed1,'embeddct.jpg');
AA=imread('embeddct.jpg');

답변 (1개)

Looky
Looky 2017년 11월 8일
편집: Looky 2017년 11월 8일
This is likely a result from the compression/decompression process involved when saving to a jpg file. Choose a better suited file format like '.bmp' if you want the exact equality of saved and loaded data.
imwrite(embed1,'embeddct.bmp');
AA=imread('embeddct.bmp');
Edit: Here is a better explanation of this problem and how to fix it.

카테고리

Help CenterFile Exchange에서 Convert Image Type에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by