Computes the Discrete Cosine Transform (DCT) of the input sequence X. Wire data to the X input to determine the polymorphic instance to use or manually select the instance.


icon

Inputs/Outputs

  • c1ddbl.png X

    X is a real vector.

  • ci32.png DCT size

    DCT size is the length of the DCT you want to perform.

    If DCT size is greater than the number of elements in X, this VI adds zeros to the end of X to match the size of DCT size. If DCT size is less than the number of elements in X, this VI uses only the leading DCT size elements in X to perform the DCT. If DCT size is less than or equal to zero, this VI uses the length of X as the DCT size.

  • i1ddbl.png DCT {X}

    DCT {X} is the DCT of X.

  • ii32.png error

    error returns any error or warning from the VI. You can wire error to the Error Cluster From Error Code VI to convert the error code or warning into an error cluster.

  • 1D DCT

    The one-dimensional Discrete Cosine Transform DCT {X} of a sequence X is defined by the following equations:

    and

    where N is the length of X,

    xn is the nth element of X, yk is the kth element of DCT {X}.

    This VI applies a fast DCT algorithm instead of calculating the Discrete Cosine Transform directly. LabVIEW implements this fast DCT algorithm using an FFT technique.

    Examples

    Refer to the following example files included with LabVIEW.

    • labview\examples\Signal Processing\Transforms\Image Compression with DCT.vi