Population
Image processing library in C++
Classes

Matrix In -> Matrix Out (gaussian inversion, eigen value/vector, orthogonalization...) More...

Classes

class  pop::LinearAlgebra
 class to act on matrix More...
 

Detailed Description

Matrix In -> Matrix Out (gaussian inversion, eigen value/vector, orthogonalization...)

I develop this module only for image processing purpose. So it is not the state of art of algorithms for linear algebra computing. However, this module provides some basic linear algebra operations as matrix inversion by gaussian elimination, find eigen vector (see the code below).

Mat2F32 m(3,3);
m(0,0)=1.5;m(0,1)=0;m(0,2)=1;
m(1,0)=-0.5;m(1,1)=0.5;m(1,2)=-0.5;
m(2,0)=-0.5;m(2,1)=0;m(2,2)=0;
VecF32 v_eigen_value = LinearAlgebra::eigenValue(m);
std::cout<<v_eigen_value<<std::endl;
Mat2F32 m_eigen_vector= LinearAlgebra::eigenVectorGaussianElimination(m,v_eigen_value);
std::cout<<m_eigen_vector<<std::endl;
std::cout<<m*m_eigen_vector.getCol(0)<<" is equal to "<<v_eigen_value(0)*m_eigen_vector.getCol(0)<<std::endl;
std::cout<<m*m_eigen_vector.getCol(1)<<" is equal to "<<v_eigen_value(1)*m_eigen_vector.getCol(1)<<std::endl;
std::cout<<m*m_eigen_vector.getCol(2)<<" is equal to "<<v_eigen_value(2)*m_eigen_vector.getCol(2)<<std::endl;