NotConvergedException in alignment phase

59 views
Skip to first unread message

wastell.c...@gmail.com

unread,
Nov 12, 2020, 9:08:39 AM11/12/20
to scalismo
Hi,

while trying to do alignment phase I get this error:

ALIGNMENT PHASE...
300
299
298
297
Exception in thread "main" breeze.linalg.NotConvergedException: 
at breeze.linalg.svd$.breeze$linalg$svd$$doSVD_Double(svd.scala:110)
at breeze.linalg.svd$Svd_DM_Impl$.apply(svd.scala:40)
at breeze.linalg.svd$Svd_DM_Impl$.apply(svd.scala:39)
at breeze.generic.UFunc.apply(UFunc.scala:48)
at breeze.generic.UFunc.apply$(UFunc.scala:46)
at breeze.linalg.svd$.apply(svd.scala:23)
at scalismo.registration.LandmarkRegistration$.computeRigidNDTransformParams(LandmarkRegistration.scala:253)
at scalismo.registration.LandmarkRegistration$.rigidSimilarity3DCommon(LandmarkRegistration.scala:57)
at scalismo.registration.LandmarkRegistration$.similarity3DLandmarkRegistration(LandmarkRegistration.scala:148)
at com.example.ssm$.ICPRigidAlignScale$1(ssm.scala:191)
at com.example.ssm$.$anonfun$main$5(ssm.scala:208)
at scala.collection.immutable.Range.foreach$mVc$sp(Range.scala:156)
at com.example.ssm$.ssm_building$1(ssm.scala:149)
at com.example.ssm$.$anonfun$main$2(ssm.scala:100)
at scala.runtime.java8.JFunction1$mcVI$sp.apply(JFunction1$mcVI$sp.java:12)
at scala.collection.immutable.List.foreach(List.scala:389)
at com.example.ssm$.$anonfun$main$1(ssm.scala:94)
at scala.runtime.java8.JFunction1$mcVI$sp.apply(JFunction1$mcVI$sp.java:12)
at scala.collection.immutable.List.foreach(List.scala:389)
at com.example.ssm$.main(ssm.scala:87)
at com.example.ssm.main(ssm.scala)

There might be that its loss function does not get satisfied with some proximity criterion, but I was wondering in that case why it just stops after 4 rounds of trying?

Thanks in advance
Best,
Chris

wastell.c...@gmail.com

unread,
Nov 12, 2020, 5:56:42 PM11/12/20
to scalismo
Actually the error comes from this line of code where I'm trying to find a similarity registration transformation, I guess the problem should be that I'm always giving the center as (0,0,0):

val bestTransform = if (scale) LandmarkRegistration.similarity3DLandmarkRegistration(naTargetLms, refLms, center = Point(0, 0, 0))

what is the advise for setting the value of center?

Behzad Vafaeian

unread,
Nov 13, 2020, 1:12:34 AM11/13/20
to wastell.c...@gmail.com, scalismo
Hi,
 Are the landmarks you chose in correspondence? maybe double check the order.


--
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/146f9526-cd1d-4741-8753-2a41f911f323n%40googlegroups.com.

wastell.c...@gmail.com

unread,
Nov 13, 2020, 5:14:41 AM11/13/20
to scalismo
Hi, Thank you for your answer, yes I checked the order of all landmarks for every mesh. they're in good order.
actually when I do the alignment using rigid3DLandmarkRegistration, it works okay with the same landmarks, so that's why I guess the issue should be with similarity3DLandmarkRegistration. like my code bellow, if I put scale=false, then it works okay, but putting int true, comes to the exception:

val bestTransform = if (scale) LandmarkRegistration.similarity3DLandmarkRegistration(naTargetLms, refLms, center = Point(0, 0, 0))

else LandmarkRegistration.rigid3DLandmarkRegistration(naTargetLms, refLms, center = Point(0, 0, 0))



Marcel Luethi

unread,
Nov 13, 2020, 8:00:06 AM11/13/20
to wastell.c...@gmail.com, scalismo
Dear Chris

This does indeed sound like a bug.
Unfortunately I will not find the time to investigate it before Monday. Could you open an issue on github with  example code that reproduces it? I will then look at it on Monday.

Best regards,

Marcel

wastell.c...@gmail.com

unread,
Nov 14, 2020, 7:20:05 PM11/14/20
to scalismo
Hi Marcel,

Actually the exception is resolved without me doing much of a change in the code. for the moment I have no clues why that's not throwing the same exception anymore, but if I could reproduce it again I'll put that as an issue on github so that I can make sure that it has not been because of an issue in my side not taking your time investigating on that.

Thank you,
Best,
Chris

Reply all
Reply to author
Forward
0 new messages