Problem when using imwrite command
2 ビュー (過去 30 日間)
古いコメントを表示
Majid Al-Sirafi
2016 年 6 月 25 日
コメント済み: Majid Al-Sirafi
2016 年 6 月 25 日
Hi every one I have a problem when I use imwrite command, for example suppose that I have first.jpg image, when I want to write it into a new image, for example second.jpg, as follows:
A=imread('first.jpg');
Imwrite(A,'secod.jpg');
The values of the pixels in the second.jpg is not exactly same as the values of the pixels in the first.jpg What is the wrong?
Regards
0 件のコメント
採用された回答
Walter Roberson
2016 年 6 月 25 日
What is wrong is that JPEG defaults to using lossy compression. If the compression level used for the file does not exactly match the default compression level used by imwrite() then you would get different results.
Moral of the story: never use regular JPEG for anything other than presentation purposes, where the human eye is the limitation; do not use regular JPEG for scientific analysis. Use a lossless format instead such as PNG or TIFF.
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Denoising and Compression についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!