Hello All, I am trying to implement forward and inverse DCT based on Y. Arai, T. Agui, and M. Nakajima, "A Fast DCT-SQ Scheme for Images," Trans. of the IEICE, vol. E-71, no. 11, pp. 1095-1097, Nov. 1988 paper. Both flow graphs for the forward and inverse DCT are given in the paper. When I tried to implement the forward DCT I got a different result from the DCT given in MATLAB. I know that my problem is in scaling. When I used the scalings in W. B. Pennebaker and J. L. Mitchell. JPEG Still Image Data Compression Standard book the forward DCT output was similar to the MATLAB's dct (they differ by 10^-13). But then the inverse DCT output deviated so much. According to ARAI's paper the scaling is done accoridng: s(n) = 2*C(n)/cos(n*pi/16) where C(0) = 1/sqrt(2) & 1 for n>0 Accroding to Pennebaker's book the scaling is done accroding: s(n) = 1/[4*cos(n*pi/16)] & s(0) = 1/[2*sqrt(2)] Furthermore, In ARAI they divided the s(n)'s by 8 or 16 and these are the outputs of the real DFT algorithm. Because the idea is to get the real DFT and then do the scaling to have the DCT. If some can know the problem or knows the correct scalings of the inverse DCT please let me know, I would be grateful!
DCT Scalings
Started by ●July 28, 2007