Main Content

2-D IDCT

Compute 2-D inverse discrete cosine transform (IDCT)

  • 2-D IDCT block

Libraries:
Computer Vision Toolbox / Transforms

Description

The 2-D IDCT block calculates the two-dimensional inverse discrete cosine transform of the input signal. The equation for the two-dimensional IDCT of an input signal is:

f(x,y)=2MNm=0M1n=0N1C(m)C(n)F(m,n)cos(2x+1)mπ2Mcos(2y+1)nπ2N,

where F(m,n) is the discrete cosine transform (DCT) of the signal f(x,y). If m=n=0, then C(m)=C(n)=1/2. Otherwise C(m)=C(n)=1.

Ports

Input

expand all

Specify input data as a vector or matrix of intensity values. The number of elements in the input data must be a power of two.

Data Types: single | double | int8 | int16 | int32 | uint8 | uint16 | uint32 | fixed point

Output

expand all

Output data containing the 2-D IDCT of the input, returned as a matrix or vector. The size and data type of the output are the same as those of the input.

Data Types: single | double | int8 | int16 | int32 | uint8 | uint16 | uint32 | fixed point

Parameters

expand all

Main

Specify how the block computes the sine and cosine terms to find the 2-D IDCT.

  • Table lookup — The block computes and stores the trigonometric values before the simulation starts. This option requires more memory than the Trigonometric fcn option.

  • Trigonometric fcn — The block computes the sine and cosine values during the simulation.

Data Types

For details on the fixed-point block parameters, see Specify Fixed-Point Attributes for Blocks (DSP System Toolbox).

Select this parameter to prevent the fixed-point tools from overriding the data types you specify in this block. For more information, see Lock the Output Data Type Setting (Fixed-Point Designer).

Block Characteristics

Data Types

double | fixed point | integer | single

Multidimensional Signals

no

Variable-Size Signals

no

More About

expand all

References

[1] Wen-Hsiung Chen, C. Smith, and S. Fralick. “A Fast Computational Algorithm for the Discrete Cosine Transform.” IEEE Transactions on Communications 25, no. 9 (September 1977): 1004–9. https://doi.org/10.1109/TCOM.1977.1093941.

[2] Zhongde Wang. “Fast Algorithms for the Discrete W Transform and for the Discrete Fourier Transform.” IEEE Transactions on Acoustics, Speech, and Signal Processing 32, no. 4 (August 1984): 803–16. https://doi.org/10.1109/TASSP.1984.1164399.

Extended Capabilities

C/C++ Code Generation
Generate C and C++ code using Simulink® Coder™.

Version History

Introduced before R2006a

See Also

Blocks

Functions