Hi!
I’m trying solve a non linear least square problem with Ceres library. The
residuals is basically dot products (s1*x + s2*y + s3*z + s4), distanses of an
(x,y,z) point and a (s1,s2,s3,s4) plane. x,y,z depends on other parameters
nonlinearly. I want to estimate the parameters of the planes as well but to do
so, I need an equality constraint for them (s1^2 + s2^2 + s3^2 = 1), otherwise
lowering all the parameters will always lower the residuals. I know Ceres does not support explicitly equality constraints, but is there a working around method for this?
Thanks in advance!
Gergely
Two ways of doing this.
You can always normalize the plane parameters before using them. That way the residual does not depend on the norm of the parameters.
Another idea is to use the homogeneous vector parameterization.
Sameer
--
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...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ceres-solver/0c34ee68-63e9-4acd-9704-a8bea5d5fae6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Well, the homogeneous vector parameterization is basically the same as dividing with the length. But the good news that it worked nicely, thanks!
I guess it worth to mention that this is because the cost function is linear in the pane parameters, so the jacobian will not depend on the actual values of the plane's parameters either (if I'm not mistaken). If this wasnt true, the derivates would depend on the plane parameters.
Meanwhile I got another idea for this. The initial length of the plane's norm vector should be 1, then instead of giving these parameter (s1,s2,s3) to the solver, we can give another 3 parameters to it (yaw,pitch,roll) and calculate the current norm vector as Rot(y,p,r)*s_init. This way we only allow rotational transformation on the normal vector, so it's length will be always 1.
2016. október 4., kedd 18:25:16 UTC+2 időpontban Sameer Agarwal a következőt írta:Two ways of doing this.
You can always normalize the plane parameters before using them. That way the residual does not depend on the norm of the parameters.Another idea is to use the homogeneous vector parameterization.
Sameer
On Tue, Oct 4, 2016, 9:01 AM Fürnstáhl Gergely <g.fur...@gmail.com> wrote:--Hi!
I’m trying solve a non linear least square problem with Ceres library. The residuals is basically dot products (s1*x + s2*y + s3*z + s4), distanses of an (x,y,z) point and a (s1,s2,s3,s4) plane. x,y,z depends on other parameters nonlinearly. I want to estimate the parameters of the planes as well but to do so, I need an equality constraint for them (s1^2 + s2^2 + s3^2 = 1), otherwise lowering all the parameters will always lower the residuals. I know Ceres does not support explicitly equality constraints, but is there a working around method for this?
Thanks in advance!
Gergely
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...@googlegroups.com.--
To view this discussion on the web visit https://groups.google.com/d/msgid/ceres-solver/0c34ee68-63e9-4acd-9704-a8bea5d5fae6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
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...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ceres-solver/fd44462e-da56-47eb-bf25-971ca92e52bb%40googlegroups.com.