Ask Your Question
0

Cholesky decomposition with OpenCV

asked 2013-10-10 09:57:38 -0600

imikbox gravatar image

updated 2013-10-10 11:31:39 -0600

Moster gravatar image

Hi there,

I have a prolem using the Cholesky decomposition in OpenCV. I have the positive definite matrix A with

A =

 8312069  34511.344  -306.38861

 34511.313  8231020.5  -112.6131

 -306.38861  -112.6131  1

The function call Mat L = A.inv(DECOMP_CHOLESKY) should give me the Matrix L, which satisfies A = LL'. However, I'm getting a matrix with awkwardly small values and for which A = LL' does not hold. What could there possibly be wrong, the usage is dead simple ... ?? (The decomposition of A works fine in MATLAB).

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
2

answered 2013-10-11 01:41:05 -0600

Nghia gravatar image

updated 2013-10-11 01:41:58 -0600

L is the inverse of A (using Cholesky Decomposition), not the actual Cholesky Decomposition. To confirm this do:

cout << L * A << endl; // this is inv(A) * A.

You'll get the identity matrix (or very close to it).

edit flag offensive delete link more

Comments

this makes sense. I totaly misunderstood the description .. thanks for pointing this out.

imikbox gravatar imageimikbox ( 2013-10-14 07:19:32 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2013-10-10 09:57:38 -0600

Seen: 1,302 times

Last updated: Oct 11 '13