Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

System of linear equation with opencv, c++

Can you explain to me how many and what methods are there in opencv c++ to solve systems of linear equations? if there are already existing tool or function already written, I can list the most efficient? My system has to solve an equation concerning the processing of digital images

like image 901
user3198312 Avatar asked Jan 24 '14 11:01

user3198312


1 Answers

if you have a system A*x = B your solution is x=A^(-1)*B. OpenCV allows you to use three different invert() method parameter choices:

  1. Gaussian elimination with the optimal pivot element chosen.

  2. singular value decomposition (SVD) method.

  3. Cholesky decomposition; the matrix must be symmetrical and positive-definite.

more information here: http://docs.opencv.org/modules/core/doc/operations_on_arrays.html#invert

edit: in addition there is a solve() method with additional methods:

http://docs.opencv.org/modules/core/doc/operations_on_arrays.html#solve

edit 2: there is a short performance comparison for all the three methods:

Fastest method in inverse of matrix

like image 54
Micka Avatar answered Oct 21 '22 09:10

Micka