How to solve JPEG compression error ?

2 views (last 30 days)
Hello everyone,
While running my code, I am getting the following error. Can anyone please tell me how can I fix this error? Thanks
??? Error using ==> image Error using ==> image TrueColor CData contains element out of range 0.0 <= value <= 1.0
Error in ==> wavelet_compression_exercise at 11 image(G);

Accepted Answer

Image Analyst
Image Analyst on 6 Jul 2014
It's telling you that G has pixels outside the range of 0-1. Try im2double(G) or mat2gray(G).

More Answers (0)

Categories

Find more on Denoising and Compression in Help Center and File Exchange

Tags

Products

Community Treasure Hunt

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

Start Hunting!