Home > database >  Questions about the DCT transform image compression
Questions about the DCT transform image compression

Time:09-28

In the experimental stage, I DCT and inverse DCT, the picture is always very very white,, I feel very strange, then write the MATLAB code
RGB=imread (' C: \ Users \ lenovo \ Desktop \ 24 BMP '); % read picture
Subplot (2,1,1), imshow (RGB), title (' original RGB images');
R=RGB (:, :, 1);

G=RGB (:, :, 2);

B=RGB (:, :, 3);

Y=0.299 + 0.587 * * double (R) double (G) + 0.114 * double (B);
U=0.169 * double (R) - double (G) + 0.5 * 0.3316 * double (B);
V=0.5 * double (R) - 0.4186 * double (G) - 0.0813 * double (B);


FR=double (Y) - double (U) + 1.402 * 0.001 * double (V);
FG=double double (Y) to 0.344 * (U) to 0.714 * double (V);
FB=double (Y) double (U) + 0.001 + 1.772 * * double (V);

% RGB_rec=cat (3, FR, FG, FB).
RGB_rec=zeros (size (FR, 1), size (FR, 2), 3);
RGB_rec (:, :, 1)=R.
RGB_rec (:, :, 2)=G;
RGB_rec (:, :, 3)=B;
,1,2 subplot (2), imshow (RGB_rec), title (' new RGB image);;


Why, direct extraction of RGB three channels, and then directly back to print images is almost all white
  • Related