Closed astamm closed 9 months ago
First note, please use latest version off github before filing any issues.
find_rotation_seed_unqiue()
and find_rotation_seed_coord()
are similar as you have described and difference are using curves directly or the srvf. There are times for each.
calc_shape_dist()
and curve_pair_align()
should perform the same operations. There might be a scaling bug in one of them that we need to track down. There was and adjustment in the package to change the way we use scale
.
That is correct curve_srvf_align()
aligns curves to the mean so it first computes the mean. We have done a lot of bugfixing on curve_karcher_mean()
this past week due to the changes in scale
so please check with latest off of the master branch.
Also these questions are better over e-mail or other forms than as an issue. Please use the issue for actual issues on a single function.
Hi @jdtuck. I am trying to use elastic distance with rotational invariance to compute both distances and karcher means for 3-dimensional curves.
Digging into the code, I find two functions
find_rotation_seed_unqiue()
andfind_rotation_seed_coord()
that seem to be the ones doing the actual optimisation (rotation, scale and alignment). I wonder what is the difference between the two? From the code, it seems that the former requires the SRVFs as input while the latter requires the original functions and also the former has the possibility to add a penalty term. Can you please expand?Also, I have the impression that
calc_shape_dist()
andcurve_pair_align()
should behind the scene perform the same optimisations, the former returning distances while the latter returning the aligned (possibly rotated and scaled) second curve. But when I use both functions on a curve and the same curve to which I applied a constant rotation,curve_pair_align()
correctly overlap the two curves ifrotation==TRUE
while, withcalc_shape_dist()
, I have to ask bothrotation==TRUE
andscale==TRUE
to make the curves overlap.Lastly, I found that both
curve_karcher_mean()
andcurve_srvf_align()
actually compute the Karcher mean. The latter calls the former as initialisation step from what I understand. Butcurve_karcher_mean()
seems buggy. The example that comes with the documentation produces a mean curve that does not seem to be in the middle of the sample for instance. As forcurve_srvf_align()
, there is the lineout = find_best_rotation(mu, q1n)
which is performed regardless of optional argumentrotated
which seems off.Can you clarify please as I am struggling to use and understand the differences between all these functions. I flag @araiari as well if she wants to jump into the conversation.
Thanks for your time.