how to save image in png format by keeping data values?
2 次查看(过去 30 天)
显示 更早的评论
hi...i apply dwt on redchannel of an image and after that i change pixel value of hh and hl bands and apply idwt and after obtain new image i save it in png format. in extraction part the value of hh band is correct but HL band has changed.Why is this happening?while png format is losseless
2 个评论
Image Analyst
2016-8-16
Is HL integer or floating point? (Sorry, I'm not that familiar with wavelets.) And can PNG handle floating point - I don't know since I only use PNG for integer images.
回答(1 个)
Image Analyst
2016-8-16
Why do you need PNG format? If you just need to recall it in MATLAB, use a .mat file. Otherwise, if other programs, like Photoshop need to use it, then convert it to uint8.
image8 = uint8(255 * mat2gray(HLImage));
imwrite(image8, filename);
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Discrete Multiresolution Analysis 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!