3DSelfie  Hansjoerg Hofer (1026632), Sebastian Metzler (0927550)
Histogram Class Reference

Public Member Functions

 Histogram (Texture2D binaryImage, Rect a1)
 A histogram of a binary image. More...
 
void draw ()
 Draws the histogram. More...
 
List< KeyValuePair< int, float > > findMin (float[] hist)
 Finds all local minima in the given histogram. More...
 
List< KeyValuePair< int, float > > findMax (float[] hist)
 Finds all local maxima in the given histogram. More...
 
List< KeyValuePair< int, float > > findCluster (float[] hist)
 Finds all clusters in the given histogram. More...
 
int[] findSimilarArea (int index, float eps, float[] hist)
 Finds all surrounding Values, which are not larger than the value with the given index by eps in the given histogram. More...
 

Public Attributes

float[] xHist
 
float[] yHist
 
int yOffset = 0
 

Detailed Description

Definition at line 5 of file Histogram.cs.

Constructor & Destructor Documentation

Histogram.Histogram ( Texture2D  binaryImage,
Rect  a1 
)

A histogram of a binary image.

Parameters
[in]binaryImageThe binary image to calculate the histogram of.
[in]a1The area in the binary image to calculate the histogram of.
Returns
Return_Description

Counts all white pixels in x and y direction respectively in the given area of the binary image and stores them in two arrays.

Definition at line 29 of file Histogram.cs.

Member Function Documentation

void Histogram.draw ( )

Draws the histogram.

Draws the histogram in y direction on the left side of the screen and the histogram in x direction on the top side of the screen.

Definition at line 61 of file Histogram.cs.

List<KeyValuePair<int, float> > Histogram.findCluster ( float[]  hist)

Finds all clusters in the given histogram.

Parameters
[in]histThe histogram to look for clusters.
Returns
Return_Description A list of KeyValuePairs, which contains the center indices and the size of all found clusters.

Finds all clusters of the given histogram, i.e. the center indices and sizes of all areas, which contain no values which are 0.

Definition at line 137 of file Histogram.cs.

List<KeyValuePair<int, float> > Histogram.findMax ( float[]  hist)

Finds all local maxima in the given histogram.

Parameters
[in]histThe histogram to look for maxima.
Returns
Return_Description A list of KeyValuePairs, which contains the indices and the values of all found local maxima.

Finds all values which are larger than or equals their direct neighbors in the given histogram.

Definition at line 111 of file Histogram.cs.

List<KeyValuePair<int, float> > Histogram.findMin ( float[]  hist)

Finds all local minima in the given histogram.

Parameters
[in]histThe histogram to look for minima.
Returns
Return_Description A list of KeyValuePairs, which contains the indices and the values of all found local minima.

Finds all values which are smaller as or equals their direct neighbors in the given histogram.

Definition at line 84 of file Histogram.cs.

int [] Histogram.findSimilarArea ( int  index,
float  eps,
float[]  hist 
)

Finds all surrounding Values, which are not larger than the value with the given index by eps in the given histogram.

Parameters
[in]indexThe index, where to look for similar values.
[in]epsThe value, by which similar values can be larger than the value with the given index.
[in]histThe histogram, where to look for similar values.
Returns
Return_Description

Finds all surrounding Values, which are not larger than the value with the given index by eps in the given histogram.

Definition at line 191 of file Histogram.cs.

Member Data Documentation

float [] Histogram.xHist

Definition at line 11 of file Histogram.cs.

float [] Histogram.yHist

Definition at line 12 of file Histogram.cs.

int Histogram.yOffset = 0

Definition at line 14 of file Histogram.cs.


The documentation for this class was generated from the following file: