tf.signal.idct
Stay organized with collections
Save and categorize content based on your preferences.
Computes the 1D Inverse Discrete Cosine Transform (DCT) of input
.
tf.signal.idct(
input, type=2, n=None, axis=-1, norm=None, name=None
)
Currently only Types I, II and III are supported. Type III is the inverse of
Type II, and vice versa.
Note that you must re-normalize by 1/(2n) to obtain an inverse if norm
is
not 'ortho'
. That is:
signal == idct(dct(signal)) * 0.5 / signal.shape[-1]
.
When norm='ortho'
, we have:
signal == idct(dct(signal, norm='ortho'), norm='ortho')
.
Args |
input
|
A [..., samples] float32 /float64 Tensor containing the
signals to take the DCT of.
|
type
|
The IDCT type to perform. Must be 1, 2 or 3.
|
n
|
For future expansion. The length of the transform. Must be None .
|
axis
|
For future expansion. The axis to compute the DCT along. Must be -1 .
|
norm
|
The normalization to apply. None for no normalization or 'ortho'
for orthonormal normalization.
|
name
|
An optional name for the operation.
|
Returns |
A [..., samples] float32 /float64 Tensor containing the IDCT of
input .
|
Raises |
ValueError
|
If type is not 1 , 2 or 3 , n is not None, axisis
not -1, or normis not Noneor 'ortho'`.
|
Scipy Compatibility
Equivalent to scipy.fftpack.idct
for Type-I, Type-II and Type-III DCT.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2020-10-01 UTC.
[null,null,["Last updated 2020-10-01 UTC."],[],[],null,["# tf.signal.idct\n\n\u003cbr /\u003e\n\n|------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------|\n| [TensorFlow 1 version](/versions/r1.15/api_docs/python/tf/signal/idct) | [View source on GitHub](https://github.com/tensorflow/tensorflow/blob/v2.1.0/tensorflow/python/ops/signal/dct_ops.py#L168-L209) |\n\nComputes the 1D [Inverse Discrete Cosine Transform (DCT)](https://en.wikipedia.org/wiki/Discrete_cosine_transform#Inverse_transforms) of `input`.\n\n#### View aliases\n\n\n**Compat aliases for migration**\n\nSee\n[Migration guide](https://www.tensorflow.org/guide/migrate) for\nmore details.\n\n[`tf.compat.v1.signal.idct`](/api_docs/python/tf/signal/idct), [`tf.compat.v1.spectral.idct`](/api_docs/python/tf/signal/idct)\n\n\u003cbr /\u003e\n\n tf.signal.idct(\n input, type=2, n=None, axis=-1, norm=None, name=None\n )\n\nCurrently only Types I, II and III are supported. Type III is the inverse of\nType II, and vice versa.\n\nNote that you must re-normalize by 1/(2n) to obtain an inverse if `norm` is\nnot `'ortho'`. That is:\n`signal == idct(dct(signal)) * 0.5 / signal.shape[-1]`.\nWhen `norm='ortho'`, we have:\n`signal == idct(dct(signal, norm='ortho'), norm='ortho')`.\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Args ---- ||\n|---------|-----------------------------------------------------------------------------------------------------|\n| `input` | A `[..., samples]` `float32`/`float64` `Tensor` containing the signals to take the DCT of. |\n| `type` | The IDCT type to perform. Must be 1, 2 or 3. |\n| `n` | For future expansion. The length of the transform. Must be `None`. |\n| `axis` | For future expansion. The axis to compute the DCT along. Must be `-1`. |\n| `norm` | The normalization to apply. `None` for no normalization or `'ortho'` for orthonormal normalization. |\n| `name` | An optional name for the operation. |\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Returns ------- ||\n|---|---|\n| A `[..., samples]` `float32`/`float64` `Tensor` containing the IDCT of `input`. ||\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Raises ------ ||\n|--------------|--------------------------------------------------------------------------------------------------------|\n| `ValueError` | If `type` is not `1`, `2` or `3`, `n` is not `None,`axis`is not`-1`, or`norm`is not`None`or`'ortho'\\`. |\n\n\u003cbr /\u003e\n\n#### Scipy Compatibility\n\nEquivalent to [scipy.fftpack.idct](https://docs.scipy.org/doc/scipy-0.14.0/reference/generated/scipy.fftpack.idct.html)\nfor Type-I, Type-II and Type-III DCT."]]