Document.Windsurf
Class CovarianceMatrix

java.lang.Object
  extended by Document.Windsurf.CovarianceMatrix

public class CovarianceMatrix
extends java.lang.Object

Class for computing the covariance matrix of H, S, and V image components.


Constructor Summary
CovarianceMatrix()
           
 
Method Summary
static double average(double[][] matrix)
          Computes the average value of a bi-dimensional double array.
static double average(java.util.Vector<java.lang.Double> v)
          Computes the average value of a double vector.
static double[][] covariance(double[][] H, double[][] S, double[][] V)
          Computes the covariance matrix for three HSV matrices.
static double[][] covariance(java.util.Vector<java.lang.Double> H, java.util.Vector<java.lang.Double> S, java.util.Vector<java.lang.Double> V)
          Computes the covariance matrix for three HSV vectors.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CovarianceMatrix

public CovarianceMatrix()
Method Detail

covariance

public static double[][] covariance(double[][] H,
                                    double[][] S,
                                    double[][] V)
Computes the covariance matrix for three HSV matrices.

Parameters:
H - Matrix containing H(ue) components.
S - Matrix containing S(aturation) components.
V - Matrix containing V(alue) components.
Returns:
Covariance matrix as a bi-dimensional array.

covariance

public static double[][] covariance(java.util.Vector<java.lang.Double> H,
                                    java.util.Vector<java.lang.Double> S,
                                    java.util.Vector<java.lang.Double> V)
Computes the covariance matrix for three HSV vectors.

Parameters:
H - Vector containing H(ue) components.
S - Vector containing S(aturation) components.
V - Vector containing V(alue) components.
Returns:
Covariance matrix as a bi-dimensional array.

average

public static double average(double[][] matrix)
Computes the average value of a bi-dimensional double array.

Parameters:
matrix - Bi-dimensional double array.
Returns:
Average value of the given bi-dimensional double array.

average

public static double average(java.util.Vector<java.lang.Double> v)
Computes the average value of a double vector.

Parameters:
v - Double vector.
Returns:
Average value of the given double vector.