Owning Palette: Transforms VIs
Requires: Full Development System
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.
Use the pull-down menu to select an instance of this VI.
Add to the block diagram | Find on the palette |
X is a real vector. | |
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. | |
DCT {X} is the DCT of X. | |
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. |
X is the real input sequence. | |
DCT {X} is the DCT of X. | |
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. |
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.
The two-dimensional Discrete Cosine Transform DCT {X} of a matrix X is defined by the following equation:
where M and N are the number of rows and columns, respectively, of the input matrix X,
x(m,n) is the element of X with row number m and column number n,
y(u,v) is the element of DCT {X} with row number u and column number v.
This VI performs a two-dimensional DCT using the following two steps:
Refer to the Image Compression with DCT VI in the labview\examples\Signal Processing\Transforms directory for an example of using the DCT VI.