SignalProcessingExtensions.DiscreteCosineTransform Method

Computes the type-II discrete cosine transform of a vector.

Definition

Namespace: Numerics.NET.SignalProcessing
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 10.9.0
C#
public static Vector<double> DiscreteCosineTransform(
	this Vector<double> x,
	bool orthonormal = true
)

Parameters

x  Vector<Double>
The vector to transform.
orthonormal  Boolean  (Optional)
Optional. Specifies whether the transform should be orthogonal/unitary. The default is true.

Return Value

Vector<Double>
The discrete cosine transform (DCT) of x.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type Vector<Double>. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).

Remarks

When orthonormal is false, coefficient k is twice the sum of x[j] cos(pi (j + 1/2) k / N). The orthonormal form uses scale sqrt(1/N) for k=0 and sqrt(2/N) for the remaining cosine sums.

See Also