Re: I have a question



cklin.cis84@xxxxxxxxx wrote:
1. I want to get the transform of the follow IDCT matrix F(k1, k2) such
that

F(k1, k2) = Sum(n1 = 0 to N1 - 1) Sum(n2 = 0 to N2 - 1)
*f(n1, n2)
*cos(PI(2n1+1)*k1)/2N1)
*cos(PI(2n2+1)*k2)/2N2)

This is the DCT (DCT-II), not the IDCT.

But, when I using the FFTW package, the document of FFTW in section
4.7.3 only states the 1D IDCT formula. Does there any available formula the
2D IDCT used in FFTW.

The 2d IDCT is just the 1d IDCT (DCT-III) performed on the rows and
then the columns (or vice versa...the order doesn't matter). Similarly
for the 2d DCT-II, etc.

2. As question 1. , we also need the DCT II matrix such as

H(n1, n2) = Sum(k1 = 0 to N1 - 1) Sum(k2 = 0 to N2 - 1)
*h(k1, k2)
*cos(PI(2k1+1)*n1)/2N1)
*cos(PI(2k2+1)*n2)/2N2)

You'll notice that this is the same as your "IDCT" formula above. All
you did was to change the variable names. That's why both of them are
the DCT-II (DCT), not the IDCT.

The 1D DCT II formula in FFTW is

Y_k = 2* Sum(j=0 to j < N-1 ) X_j cos[pi * (j + 1/2) k/n].

If we want to using 2D DCT II of FFTW, does it just mulpies the h(k1,
k2) by 1/4 and plug the mulpied h(k1, k2) matrix into 2D DCT II of FFTW, and
we will get H(n1, n2) exactly?

By inspection, the 1d DCT-II in FFTW differs from your formula by a
factor of 2. So yes, you just multiply FFTW's 2d DCT-II by 1/4 and you
will get the formula you want above.

Cordially,
Steven G. Johnson

.



Relevant Pages

  • I have a question
    ... I have a question about how to use of the DCT II and DCT III ... I want to get the transform of the follow IDCT matrix F ... But, when I using the FFTW package, the document of FFTW in section ... only states the 1D IDCT formula. ...
    (sci.image.processing)
  • Re: Fastcode IDCT B&V 0.1.0
    ... DCT is hard to grasp at first. ... the maximum value of a quantization factor is 255. ... Some libraries split the dequantization and IDCT step. ... integrated it to use the fast integer method, because by multiplying the ...
    (borland.public.delphi.language.basm)