How to solve the sum of two ResidualBlock

32 views
Skip to first unread message

taiping

unread,
May 31, 2017, 8:22:25 PM5/31/17
to Ceres Solver
Hi, 
I want to build problems of form like following formula,

Where function f and h are CostFunction.

Is it possible to implement like this? Or, Is there any alternatives to achieve this?

Thank you!

Regards,
Taiping

Albert Palomer

unread,
Jun 1, 2017, 1:28:49 AM6/1/17
to ceres-...@googlegroups.com
I guess you could program two different cost functions (f and h) and then add them to the problem as many times as necessary (the two additional blocks) . 

--
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/c27db504-815f-4ccf-a8a8-e52fd1684bd0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

taiping

unread,
Jun 1, 2017, 4:19:23 AM6/1/17
to Ceres Solver
Thank you for your quick responses.

I have tried your suggestions. It does not work any way. 

Thank you again.

在 2017年6月1日星期四 UTC+8下午1:28:49,Albert Palomer写道:
I guess you could program two different cost functions (f and h) and then add them to the problem as many times as necessary (the two additional blocks) . 
On Jun 1, 2017 2:22 AM, "taiping" <ziqia...@gmail.com> wrote:
Hi, 
I want to build problems of form like following formula,

Where function f and h are CostFunction.

Is it possible to implement like this? Or, Is there any alternatives to achieve this?

Thank you!

Regards,
Taiping

--
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.

Albert Palomer

unread,
Jun 1, 2017, 4:36:58 AM6/1/17
to ceres-...@googlegroups.com
Just in case we did not understand each other. Please find attached an example of how I would do such thing. I hope it helps you.


Albert Palomer Vila

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/e94c90ff-f4c6-499e-ae23-bd2d5eccb970%40googlegroups.com.
two_cost_functions.cpp

Taiping Z

unread,
Jun 1, 2017, 5:27:44 AM6/1/17
to ceres-...@googlegroups.com
Thank you so much for your sharing. 

Regards,
Taiping

--
You received this message because you are subscribed to a topic in the Google Groups "Ceres Solver" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ceres-solver/4DAzpHpvE04/unsubscribe.
To unsubscribe from this group and all its topics, 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/CAD3_OrUdY-WY2YvAAPmzL0yJqNg3EvwbhjHRFbjMFW7BCW8K-w%40mail.gmail.com.

Taiping Z

unread,
Jun 2, 2017, 6:52:08 AM6/2/17
to ceres-...@googlegroups.com
At last, your example works for me. Thank you, again.

Taiping
Reply all
Reply to author
Forward
0 new messages