image processing - Quantize dct cofficents in matlab -


Hello, I need to quantify DCT conferencing for an image, because matlab has 8 * 8 pixels of block size Can you help me with syntax, thanks.

There is an underlying function in MATLAB DCT.

You need the Signal Processing Tool box. To see if you have, type 'well' (without quotes) in the MATLAB command.

Code:

  image = image; % Define your image [m, n] = size (image); % Get the size of your image imvector = reshape (image, m * n, 1); % DCT imdct = dct (imvector) to resize your image to a vector; % Calculation DCT imagedct = reshape (imdct, m, n); Return result returned to the original form of your image  

Comments