For a single dimension array x
, idct(x, norm='ortho')
is equal to MATLAB idct(x)
.
correspondence with the inverse direct Fourier transform. To recover it you must specify orthogonalize=False
.
For norm="ortho"
both the dct
and idct
are scaled by the same overall factor in both directions. By default, the transform is also orthogonalized which for types 1, 2 and 3 means the transform definition is modified to give orthogonality of the IDCT matrix (see dct
for the full definitions).
'The' IDCT is the IDCT-II, which is the same as the normalized DCT-III.
The IDCT is equivalent to a normal DCT except for the normalization and type. DCT type 1 and 4 are their own inverse and DCTs 2 and 3 are each other's inverses.
The input array.
Type of the DCT (see Notes). Default type is 2.
Length of the transform. If n < x.shape[axis]
, x
is truncated. If n > x.shape[axis]
, x
is zero-padded. The default results in n = x.shape[axis]
.
Axis along which the idct is computed; the default is over the last axis (i.e., axis=-1
).
Normalization mode (see Notes). Default is "backward".
If True, the contents of x
can be destroyed; the default is False.
Maximum number of workers to use for parallel computation. If negative, the value wraps around from os.cpu_count()
. See ~scipy.fft.fft
for more details.
Whether to use the orthogonalized IDCT variant (see Notes). Defaults to True
when norm=="ortho"
and False
otherwise.
The transformed input array.
Return the Inverse Discrete Cosine Transform of an arbitrary type sequence.
dct
Forward DCT
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:
>>> from scipy.fft import ifft, idct
... ifft(np.array([ 30., -8., 6., -2., 6., -8.])).real array([ 4., 3., 5., 10., 5., 3.])
>>> idct(np.array([ 30., -8., 6., -2.]), 1) array([ 4., 3., 5., 10.])See :
The following pages refer to to this document either explicitly or contain code examples using this.
scipy.fft._realtransforms.dct
scipy.fft._realtransforms.idctn
scipy.fft._realtransforms.idct
Hover to see nodes names; edges to Self not shown, Caped at 50 nodes.
Using a canvas is more power efficient and can get hundred of nodes ; but does not allow hyperlinks; , arrows or text (beyond on hover)
SVG is more flexible but power hungry; and does not scale well to 50 + nodes.
All aboves nodes referred to, (or are referred from) current nodes; Edges from Self to other have been omitted (or all nodes would be connected to the central node "self" which is not useful). Nodes are colored by the library they belong to, and scaled with the number of references pointing them