org.cyberlab.support
Class MatrixManipulations

java.lang.Object
  extended by org.cyberlab.support.MatrixManipulations

public class MatrixManipulations
extends java.lang.Object

Various matrix operations on OpenCV Mat objects, not available in the OpenCV library, used by the framework and made available to the framework user.

Author:
Mats-Gøran Karlsen

Constructor Summary
MatrixManipulations()
           
 
Method Summary
static void gramSchmidt(org.opencv.core.Mat matx)
          Orthonormalize a matrix using the stabilized Gram-Schmidt algorithm
static org.opencv.core.Mat matrixMult(org.opencv.core.Mat a, org.opencv.core.Mat b)
          Helper parameter performing standard matrix multiplications
static void normalize(org.opencv.core.Mat u)
          Normalize a matrix column
static org.opencv.core.Mat proj(org.opencv.core.Mat u, org.opencv.core.Mat v)
          Vector projection operator
static void zeroOutRow(org.opencv.core.Mat u)
          Helper function for setting all elements in a matrix row to 0
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MatrixManipulations

public MatrixManipulations()
Method Detail

gramSchmidt

public static void gramSchmidt(org.opencv.core.Mat matx)
Orthonormalize a matrix using the stabilized Gram-Schmidt algorithm

Parameters:
matx - Reference to the matrix

normalize

public static void normalize(org.opencv.core.Mat u)
Normalize a matrix column

Parameters:
u - Reference to the matrix column

proj

public static org.opencv.core.Mat proj(org.opencv.core.Mat u,
                                       org.opencv.core.Mat v)
Vector projection operator

Parameters:
u - First vector
v - Second vector
Returns:
Vector where v is projected orthogonally onto the vector u

zeroOutRow

public static void zeroOutRow(org.opencv.core.Mat u)
Helper function for setting all elements in a matrix row to 0

Parameters:
u - Reference to the specific matrix row

matrixMult

public static org.opencv.core.Mat matrixMult(org.opencv.core.Mat a,
                                             org.opencv.core.Mat b)
Helper parameter performing standard matrix multiplications

Parameters:
a - First matrix
b - Second matrix
Returns:
Resulting matrix