C# Class Forensics.Luminousity

Show file Open project: Algorithmix/Papyrus

Public Methods

Method Description
LinearWeighting ( int length ) : double[]

Generates an array of linearly decreasing values of size length

Luma ( Bgra color ) : double

Converts an multichannel pixel into a single one with the Luma Wieghting

RepresentativeLuma ( Bgra colors, double weightings ) : double

Given an array of pixels, a weighted average of the Luma value for that array is returned

RepresentativeLuminousity ( byte>.Image image, int buffer, int signal_size, Direction direction ) : double[]

Given an image, and parameters, this function will scan all the columns or rows for the given direction to determine the representative luminousity along a particular edge

ScanRowFromBottom ( byte>.Image image, int col, int buffer, int signal_size, double weighting ) : double

Scans the row to determine the representative luminousity of the right most edge

ScanRowFromLeft ( byte>.Image image, int row, int buffer, int signal_size, double weighting ) : double

Scans the row to determine the representative luminousity of the left most edge

ScanRowFromRight ( byte>.Image image, int row, int buffer, int signal_size, double weighting ) : double

Scans the row to determine the representative luminousity of the right most edge

ScanRowFromTop ( byte>.Image image, int col, int buffer, int signal_size, double weighting ) : double

Scans the row to determine the representative luminousity of the top most edge

Method Details

LinearWeighting() public static method

Generates an array of linearly decreasing values of size length
public static LinearWeighting ( int length ) : double[]
length int Size of the array, also determines the steepness of the linear descent
return double[]

Luma() public static method

Converts an multichannel pixel into a single one with the Luma Wieghting
public static Luma ( Bgra color ) : double
color Bgra Pixel
return double

RepresentativeLuma() public static method

Given an array of pixels, a weighted average of the Luma value for that array is returned
public static RepresentativeLuma ( Bgra colors, double weightings ) : double
colors Bgra Array of pixels to be Luma-ed and averaged
weightings double A double array of weightings
return double

RepresentativeLuminousity() public static method

Given an image, and parameters, this function will scan all the columns or rows for the given direction to determine the representative luminousity along a particular edge
public static RepresentativeLuminousity ( byte>.Image image, int buffer, int signal_size, Direction direction ) : double[]
image byte>.Image Image
buffer int number of pixels to ignore, because they are assumed to be residual pixels
signal_size int number of pixels to be sampled
direction Direction Scan Direction
return double[]

ScanRowFromBottom() public static method

Scans the row to determine the representative luminousity of the right most edge
public static ScanRowFromBottom ( byte>.Image image, int col, int buffer, int signal_size, double weighting ) : double
image byte>.Image Image to analyzed
col int Number of the row to be scanned
buffer int Number off residual pixels to be skipped
signal_size int Number of pixels to be sampled to determine the representative Luminousity
weighting double Weighting to average samples set with
return double

ScanRowFromLeft() public static method

Scans the row to determine the representative luminousity of the left most edge
public static ScanRowFromLeft ( byte>.Image image, int row, int buffer, int signal_size, double weighting ) : double
image byte>.Image Image to analyzed
row int Number of the row to be scanned
buffer int Number off residual pixels to be skipped
signal_size int Number of pixels to be sampled to determine the representative Luminousity
weighting double Weighting to average samples set with
return double

ScanRowFromRight() public static method

Scans the row to determine the representative luminousity of the right most edge
public static ScanRowFromRight ( byte>.Image image, int row, int buffer, int signal_size, double weighting ) : double
image byte>.Image Image to analyzed
row int Number of the row to be scanned
buffer int Number off residual pixels to be skipped
signal_size int Number of pixels to be sampled to determine the representative Luminousity
weighting double Weighting to average samples set with
return double

ScanRowFromTop() public static method

Scans the row to determine the representative luminousity of the top most edge
public static ScanRowFromTop ( byte>.Image image, int col, int buffer, int signal_size, double weighting ) : double
image byte>.Image Image to analyzed
col int Number of the row to be scanned
buffer int Number off residual pixels to be skipped
signal_size int Number of pixels to be sampled to determine the representative Luminousity
weighting double Weighting to average samples set with
return double