Return the Inverse Discrete Cosine Transform of an arbitrary type sequence.
Parameters: | x : array_like
type : {1, 2, 3}, optional
n : int, optional
axis : int, optional
norm : {None, ‘ortho’}, optional
overwrite_x : bool, optional
|
---|---|
Returns: | idct : ndarray of real
|
See also
Notes
For a single dimension array x, idct(x, norm='ortho') is equal to MATLAB idct(x).
‘The’ IDCT is the IDCT of type 2, which is the same as DCT of type 3.
IDCT of type 1 is the DCT of type 1, IDCT of type 2 is the DCT of type 3, and IDCT of type 3 is the DCT of type 2. For the definition of these types, see dct.
Examples
The Type 1 DCT is equivalent to the DFT for real, even-symmetrical inputs. The output is also real and even-symmetrical. Half of the IFFT input is used to generate half of the IFFT output:
>>> ifft(array([ 30., -8., 6., -2., 6., -8.])).real
array([ 4., 3., 5., 10., 5., 3.])
>>> idct(array([ 30., -8., 6., -2.]), 1) / 6
array([ 4., 3., 5., 10.])