Trying to model my problem without using DynamicAutoDiffCostFunction

52 views
Skip to first unread message

Mihai Bujanca

unread,
Aug 27, 2017, 11:26:12 AM8/27/17
to Ceres Solver
I am struggling to formulate my problem in a way that allows me to use AutoDiffCostFunction, but I am pretty sure it is possible.

My optimisation problem is a non-rigid ICP, where given a target and a source 3d point, I need to estimate parameters for a couple of transfomations that go into transforming the source onto the target.

Given N (large number, changing at every frame) parameters, I know that I will only require K (constant) of them per each pair of target-source. The problem that arises however is that I'm the indices of the parameters are not in one block, but they are retrieved through KNN.


double *mutable_epsilon_[KNN_NEIGHBOURS];
double *parameters_;
double **mutable_epsilon(int *index_list)
{
for(int i = 0; i < KNN_NEIGHBOURS; i++)
mutable_epsilon_[i] = &(parameters_[index_list[i]]);
return mutable_epsilon_;
}
double *mutable_params()
{
return parameters_;
}



Then I want to use mutable_epsilon_ in my optimisation and have the changes propagate to parameters_.

The alternative, would, of course, be to send in parameters_ straight away, but the problem with that is that parameters will have a variable number at each frame, and only K if them would be used anyway.

What would be the best approach here?

Keir Mierle

unread,
Oct 14, 2017, 4:45:18 AM10/14/17
to ceres-...@googlegroups.com
Unfortunately Ceres may not be a good fit here, since changing the cost function underneath Ceres during optimization will lead to a Bad Time. However, if you run a series of independent Ceres optimizations where the underlying cost function does not change, then it could work. In between each Ceres shot, you would re-compute the set of points to optimize over.

--
You received this message because you are subscribed to the Google Groups "Ceres Solver" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ceres-solver+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ceres-solver/57526f51-e2b6-4abc-8266-3fd5f9d382a1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages