Evaluating the Overall amount of Variation in an SSM

38 views
Skip to first unread message

Steven A

unread,
Jun 16, 2021, 11:41:09 AM6/16/21
to scalismo
Is there a method to evaluate the coefficients created from a statistical shape model into a single value for overall variation represented within that model?

Marcel Luethi

unread,
Jun 17, 2021, 2:34:29 AM6/17/21
to Steven A, scalismo
Hi Steven

Yes, there are two different ways to do that: Either you sum up the variances of all the points, or you sum up the eigenvalues of the KL basis. Both should give you the same results (as the eigenvalue associated to the i-th basis function in the KL-Expansion is the amount of variance represented by this basis function).

Here is the corresponding code:
def computeTotalVarianceFromPoints(ssm : StatisticalMeshModel) : Double = {
val variances = for (pId <- ssm.referenceMesh.pointSet.pointIds) yield {
// variances (x,y,z) for point with id pId
breeze.linalg.sum(breeze.linalg.diag(ssm.gp.cov(pId, pId)))
}
variances.sum
}

def computeTotalVarianceFromKLBasis(ssm : StatisticalMeshModel) : Double = {
ssm.gp.klBasis.map(basis => basis.eigenvalue).sum
}

Best regards,

Marcel

On Wed, Jun 16, 2021 at 5:41 PM Steven A <steve...@gmail.com> wrote:
Is there a method to evaluate the coefficients created from a statistical shape model into a single value for overall variation represented within that model?

--
You received this message because you are subscribed to the Google Groups "scalismo" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scalismo+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/scalismo/d4c730f0-ebf0-463f-bbfa-d46ba2fa14c2n%40googlegroups.com.

Steven A

unread,
Jun 17, 2021, 5:28:13 PM6/17/21
to scalismo
Ok thank you very much.
Reply all
Reply to author
Forward
0 new messages