analysis
Class PixelPairFeatureAnalyzer

java.lang.Object
  extended by analysis.PixelPairFeatureAnalyzer

public class PixelPairFeatureAnalyzer
extends java.lang.Object

This feature analyzer assumes that the pairs exist in some sort of spatial structure, with the notion of horizontally and vertically adjacent pairs. Thus, specification of that structure's width and height is required.

Author:
Jonathan L Dautrich Jr.

Field Summary
private  java.util.ArrayList<PixelPairFeatures> features
           
private  java.util.ArrayList<DEPixelPair> pairs
           
private  int pairStructureHeight
           
private  int pairStructureWidth
           
static double w1
           
static double w2
           
 
Constructor Summary
PixelPairFeatureAnalyzer(java.util.ArrayList<DEPixelPair> pairs, int pairStructureHeight, int pairStructureWidth)
           
 
Method Summary
private  void analyzeFeatures(PixelPairFeatures feature)
          Sets certain features of the specified PixelPairFeatures object using information from the contained DEPixelPair and its surroundings.
private  int getAvg(int row, int col)
          Retrieves the average value of the PixelPair at the specified row / column.
 java.util.ArrayList<PixelPairFeatures> getFeatures()
           
private  void setAvgSquareAverageDiffs(PixelPairFeatures feature)
          Computes and sets the avgSquareAdjacentAverageDiffs for the DEPixelPair in question.
private  void setWeightedCombination1(PixelPairFeatures feature)
           
private  int squareDiff(DEPixelPair pair, int row, int col)
          Specifies one PixelPair by pair value, and the other by row/col value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

w1

public static final double w1
See Also:
Constant Field Values

w2

public static final double w2
See Also:
Constant Field Values

pairs

private java.util.ArrayList<DEPixelPair> pairs

features

private java.util.ArrayList<PixelPairFeatures> features

pairStructureHeight

private int pairStructureHeight

pairStructureWidth

private int pairStructureWidth
Constructor Detail

PixelPairFeatureAnalyzer

public PixelPairFeatureAnalyzer(java.util.ArrayList<DEPixelPair> pairs,
                                int pairStructureHeight,
                                int pairStructureWidth)
Method Detail

analyzeFeatures

private void analyzeFeatures(PixelPairFeatures feature)
Sets certain features of the specified PixelPairFeatures object using information from the contained DEPixelPair and its surroundings.

Parameters:
feature -

setAvgSquareAverageDiffs

private void setAvgSquareAverageDiffs(PixelPairFeatures feature)
Computes and sets the avgSquareAdjacentAverageDiffs for the DEPixelPair in question.

Parameters:
feature -

setWeightedCombination1

private void setWeightedCombination1(PixelPairFeatures feature)

squareDiff

private int squareDiff(DEPixelPair pair,
                       int row,
                       int col)
Specifies one PixelPair by pair value, and the other by row/col value. Returns the square of the difference of the two averages.

Parameters:
pair -
row -
col -
Returns:

getAvg

private int getAvg(int row,
                   int col)
Retrieves the average value of the PixelPair at the specified row / column.

Parameters:
row -
col -
Returns:

getFeatures

public java.util.ArrayList<PixelPairFeatures> getFeatures()