You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The vector u = [uc ul^T uq]^T of the sphere is the eigenvector associated with the minimal eigenvalue of the general eigenvalue problem Au = lambda Cu (in the code A = m_matA and C = matC).
The method computes M = inv(C) A to solve the standard eigenvalue problem Mu = lambda u by using the self-adjoint eigensolver on M^T M. However, I think that the eigenvectors of M and M^T M are not the same (they are if M is symmetric, which is not the case here).
I propose to use the Eigen::GeneralizedEigenSolver to solve Au = Bu and then take the real part of u (I think the imaginary part is null since A and C are symmetric).
I quickly tested it, and it gives visual results that are slightly better (when I look at points projected onto their locally fitted sphere).
The text was updated successfully, but these errors were encountered:
Thanks a lot.
Seems to be fine.
To be able to review it, could you please add mathematical details in the user documentation associated to this function ?
I believe there is an error in
SphereFitImpl::finalize()
when solving the eigenvalue problem:https://github.com/poncateam/ponca/blob/d2cda8378fcc27c8f27be1f94bca85f90e35796a/Ponca/src/Fitting/sphereFit.hpp#L68C28-L76C28.
The vector
u = [uc ul^T uq]^T
of the sphere is the eigenvector associated with the minimal eigenvalue of the general eigenvalue problemAu = lambda Cu
(in the codeA = m_matA
andC = matC
).The method computes
M = inv(C) A
to solve the standard eigenvalue problemMu = lambda u
by using the self-adjoint eigensolver onM^T M
. However, I think that the eigenvectors ofM
andM^T M
are not the same (they are ifM
is symmetric, which is not the case here).I propose to use the
Eigen::GeneralizedEigenSolver
to solveAu = Bu
and then take the real part ofu
(I think the imaginary part is null sinceA
andC
are symmetric).I quickly tested it, and it gives visual results that are slightly better (when I look at points projected onto their locally fitted sphere).
The text was updated successfully, but these errors were encountered: