DSP  1.5.0
Digital Signal Processing
 All Classes Namespaces Functions
Static Public Member Functions | Public Attributes
DSP.Utilities Class Reference

List of all members.

Static Public Member Functions

static double MSE (ref double[] signal_1, ref double[] signal_2, int SizeToCompare)
static Boolean IsPowerOfTwo (UInt32 x)
 Verifies a number is a power of two.
static UInt32 NextPowerOfTwo (UInt32 x)
 Get Next power of number.
static Double[] triangularExtraction (ref Double[] value, uint width, uint height, uint num, int fill=-1)
static Double[] squareExtraction (ref Double[] value, uint width, uint height, uint num, int fill=-1)
 Make an extraction of square shape from the matrix starting from (0,0) coordinates.
static int ColorToGray (int color)
static void saveSignal (ref double[] signal, string fileName)
static double[] loadSignal (string fileName)

Public Attributes

const Double DDC_PI = 3.14159265358979323846

Member Function Documentation

static int DSP.Utilities.ColorToGray ( int  color) [static]

Convert a color to grayscale.

Parameters:
colorColor to convert
static Boolean DSP.Utilities.IsPowerOfTwo ( UInt32  x) [static]

Verifies a number is a power of two.

Parameters:
xNumber to check
Returns:
true if number is a power two (i.e.:1,2,4,8,16,...)
static double [] DSP.Utilities.loadSignal ( string  fileName) [static]

Load a signal from a file

Parameters:
signalSignal to load
fileNameName of the file
static double DSP.Utilities.MSE ( ref double[]  signal_1,
ref double[]  signal_2,
int  SizeToCompare 
) [static]

Calculate the Mean squared error.

Parameters:
signal_1First signal to compare
signal_2Second signal to compare
SizeToCompareMax size of element to compare. If size of one signal is less then this value function returns -1.
static UInt32 DSP.Utilities.NextPowerOfTwo ( UInt32  x) [static]

Get Next power of number.

Parameters:
xNumber to check
Returns:
A power of two number
static void DSP.Utilities.saveSignal ( ref double[]  signal,
string  fileName 
) [static]

Saves a signal into a file

Parameters:
signalSignal to save
fileNameName of the file
static Double [] DSP.Utilities.squareExtraction ( ref Double[]  value,
uint  width,
uint  height,
uint  num,
int  fill = -1 
) [static]

Make an extraction of square shape from the matrix starting from (0,0) coordinates.

Parameters:
valueMatrix to manage
widthWidth of the matrix
heightHeight of the matrix
numNumber of elements to extract
fillIf different from -1 fills the selected elements in the Matrix with this value
static Double [] DSP.Utilities.triangularExtraction ( ref Double[]  value,
uint  width,
uint  height,
uint  num,
int  fill = -1 
) [static]

Make an extraction of triangular shape from the matrix starting from (0,0) coordinates.

Parameters:
valueMatrix to manage
widthWidth of the matrix
heightHeight of the matrix
numNumber of elements to extract
fillIf different from -1 fills the selected elements in the Matrix with this value

The documentation for this class was generated from the following file:
 All Classes Namespaces Functions