C# 클래스 Algorithmix.Utility

파일 보기 프로젝트 열기: Algorithmix/Papyrus

공개 메소드들

메소드 설명
Absolute ( double input ) : double[]

Converts an array of positive and negative values to just their absolute values

Convolute ( double xx, double hh, int indicies ) : double[]

Performs 1D convolution an a given input array xx, with a convolution kernel hh

Distance ( Bgr color1, Bgr color2 ) : double

Determines the cartesian distance between two colors

Distance ( Color pixelA, Color pixelB ) : double

Returns the Cartesian Distance between from the first the second parameter

GetKernelIndicies ( double kernel, int startingKernelIndex ) : int[]

Generates the time indicies of kernel given the starting position

IntToBgr ( int color ) : Bgr

Takes an integer, returns a BGR color

IsBound ( Bitmap image, int xx, int yy ) : bool

Determines whether the given x and y coordinates are bound with in the given the given image

IsEqual ( Bgr color1, Bgr color2 ) : bool

Checks if two colors are equal

Max ( double array ) : int>.Tuple
Reverse ( double original ) : double[]
Reverse ( int original ) : int[]
SlopeFromPoints ( Point p1, Point p2 ) : double
Threshold ( double input, double threshold ) : double[]

Thresholds the input array by a factor of the maximum value. The Maximum value is defined as the maximum EXCLUDING the first and the Last - because the first and the last are implicit features All values that are less than factor*max(input) are set to zero, others are set to max

메소드 상세

Absolute() 공개 정적인 메소드

Converts an array of positive and negative values to just their absolute values
public static Absolute ( double input ) : double[]
input double values
리턴 double[]

Convolute() 공개 정적인 메소드

Performs 1D convolution an a given input array xx, with a convolution kernel hh
public static Convolute ( double xx, double hh, int indicies ) : double[]
xx double series input
hh double convolution kernel
indicies int time index of the kernel
리턴 double[]

Distance() 공개 정적인 메소드

Determines the cartesian distance between two colors
public static Distance ( Bgr color1, Bgr color2 ) : double
color1 Bgr First Color
color2 Bgr Second Color
리턴 double

Distance() 공개 정적인 메소드

Returns the Cartesian Distance between from the first the second parameter
public static Distance ( Color pixelA, Color pixelB ) : double
pixelA Color Pixel of given color from
pixelB Color Pixel of given color to
리턴 double

GetKernelIndicies() 공개 정적인 메소드

Generates the time indicies of kernel given the starting position
public static GetKernelIndicies ( double kernel, int startingKernelIndex ) : int[]
kernel double The convolution kernel
startingKernelIndex int the starting time of the kernel (-1 etc.)
리턴 int[]

IntToBgr() 공개 정적인 메소드

Takes an integer, returns a BGR color
public static IntToBgr ( int color ) : Bgr
color int an integer between 0 and 0xFFFFFF inclusive
리턴 Bgr

IsBound() 공개 정적인 메소드

Determines whether the given x and y coordinates are bound with in the given the given image
public static IsBound ( Bitmap image, int xx, int yy ) : bool
image System.Drawing.Bitmap Bit map image to checked
xx int X position of the pixel or Column
yy int Y position of the pixel or Row
리턴 bool

IsEqual() 공개 정적인 메소드

Checks if two colors are equal
public static IsEqual ( Bgr color1, Bgr color2 ) : bool
color1 Bgr first color
color2 Bgr second color
리턴 bool

Max() 공개 정적인 메소드

public static Max ( double array ) : int>.Tuple
array double
리턴 int>.Tuple

Reverse() 공개 정적인 메소드

public static Reverse ( double original ) : double[]
original double
리턴 double[]

Reverse() 공개 정적인 메소드

public static Reverse ( int original ) : int[]
original int
리턴 int[]

SlopeFromPoints() 공개 정적인 메소드

public static SlopeFromPoints ( Point p1, Point p2 ) : double
p1 Point
p2 Point
리턴 double

Threshold() 공개 정적인 메소드

Thresholds the input array by a factor of the maximum value. The Maximum value is defined as the maximum EXCLUDING the first and the Last - because the first and the last are implicit features All values that are less than factor*max(input) are set to zero, others are set to max
public static Threshold ( double input, double threshold ) : double[]
input double Array to be thresholded
threshold double Multiplier value, if this value is 0.5, then we threshold by half the max
리턴 double[]