menpo / menpo3d

Tools for manipulating 3D meshes within the Menpo project.
http://www.menpo.org
Other
164 stars 55 forks source link

the cholesky_AAt in Non-Rigid ICP can't work #67

Open AzureSilent opened 4 years ago

AzureSilent commented 4 years ago

Hello, When there are many vertices whose matching reliability weight is set to 0, the Hessian ATA is not full rank. So only the slow solve method scipy_spsolve can work. The sksparse.cholmod.cholesky_AAt just throw an ERROR: sksparse.cholmod.CholmodNotPositiveDefiniteError: c:\cholmod-scikit-sparse-window\suitesparse-metis-for-windows-1.3.1\suitesparse\cholmod\supernodal\t_cholmod_super_numeric.c:911: matrix not positive definite (code 1)

how do you handle with this? or I got the wrong version of scikit-sparse?

jiaxiangshang commented 3 years ago

I am also meeting this problem, have u solved?

patricksnape commented 3 years ago

The easiest thing to do would be to add some regularization to allow the matrix to be invertible. So just add a small number to the diagonal.

jiaxiangshang commented 3 years ago

Really thanks for your help

mihaoning commented 3 years ago

hello,may i ask how to add numbers to the diagonal of a sparse matrix?and how to avoid ill-conditioned matrix?thanks a lot!

patricksnape commented 3 years ago

Something like sparse_matrix.diagonal() += 1e-6?