baseline constraint for stereo cameras

99 views
Skip to first unread message

Ahmed Shaban Ahmed

unread,
Mar 8, 2018, 4:50:20 AM3/8/18
to Ceres Solver
Hi all, 

I want to add constraint on the baseline between two stereo cameras so as the baseline in the first camera will be the same value at the last pair. to maintain the scale. 
I'm using it in bundle adjustment problem, I added GPS cost function alongside with reprojection error cost function and it gave me good results. but when I add stereo baseline constraint, the result get worse. 
Any advice to develop a solution for this problem ? 

thanks in advance !  

Sameer Agarwal

unread,
Mar 8, 2018, 6:14:06 PM3/8/18
to ceres-...@googlegroups.com
Ahmed,
What do you mean by baseline in the first camera and the last pair?

--
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/c2b0fa50-e795-4bdd-965a-ac0b4835929c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ahmed Shaban Ahmed

unread,
Mar 8, 2018, 9:49:24 PM3/8/18
to Ceres Solver
Sameer,
Sorry if it wasn't clear enough, baseline is the distance between the two lenses in stereo camera.
So I want it to be fixed in all cameras, from the first camera to the last one.
I meant by pair (the pair of lenses).
Ahmed.

Sameer Agarwal

unread,
Mar 11, 2018, 4:57:14 PM3/11/18
to ceres-...@googlegroups.com
Ahmed,
Now that I understand that you are using a stereo camera, then the right thing to do is to model the camera differently instead of trying to do it as two cameras with their own extrinsics.

I recommend modeling the two cameras's extrinsics as two rigid transformations. The first one say, models the rotation and translation to say the center of your stereo camera rig. And then based on how the stereo rig is structured, you can have another rigid transformation, which goes from the center of the rig to each camera but it only has say the distance from the center of the stereo rig as a parameter that can be changed.

So your parameter block then will consist of a rotation, a translation and a scalar that represents the distance from the center of the rig to each of the two stereo cameras.

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.

Ahmed Shaban Ahmed

unread,
Mar 12, 2018, 4:58:56 AM3/12/18
to Ceres Solver
Sameer, 
Thanks for your advice, I've just managed to get good results by tweaking the cost function of the stereo camera and by using ScaledLoss function to add weights to  my cost functions (reprojection_cost, GPS_cost & stereo_cost). 
I'll consider using the suggested model by you, hope it'll give me better results. 
Thanks again ! 
Ahmed. 
Reply all
Reply to author
Forward
0 new messages