简体   繁体   English

用无损模式用imwrite()保存的图像不可见

[英]Image saved with imwrite() with lossless mode is not visible

I want to save my image as JPEG so I used imwrite function in MATLAB. 我想将图像保存为JPEG,所以我在MATLAB中使用了imwrite函数。 But because JPEG follows lossy format, I am not getting exact intensity values when the file is saved as .jpg 但是因为JPEG遵循有损格式,所以当文件另存为.jpg时我无法获得确切的强度值

I tried 我试过了

imwrite(a, 'a.jpg', 'Mode', 'lossless');

So I got the exact intensity values but the image is not visible in respective folder. 所以我得到了确切的强度值,但是图像在相应的文件夹中不可见。 It is visible only in the MATLAB environment. 仅在MATLAB环境中可见。

I must save my image in JPEG format only. 我只能将图像保存为JPEG格式。 So please suggest me any other alternative to save image as JPEG which can save image with same intensity values. 因此,请向我建议将图像另存为JPEG的任何其他选择,它可以保存强度值相同的图像。

The basic issue is that despite the fact that the image was saved correctly, no image viewer recognizes the lossless format. 基本问题是,尽管事实上已正确保存了图像,但没有图像查看器能够识别无损格式。 It seems to be the original jpeg format that nobody uses today because of the poorer compression (better than BMP but poorer than lossy jpeg). 由于压缩效果较差(比BMP更好,但比有损jpeg要差),这似乎是当今没人使用的原始jpeg格式。 I assume you must use jpeg because some software or website you use need this format, but it will most likely not decode lossless correctly. 我认为您必须使用jpeg,因为您使用的某些软件或网站需要此格式,但很可能无法正确解码无损。 jpeg loses data, I don't see a way around it. jpeg丢失数据,我看不到解决方法。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM