SfM-Toy-Library icon indicating copy to clipboard operation
SfM-Toy-Library copied to clipboard

Using a calibrated camera

Open kozuch opened this issue 7 years ago • 2 comments

This is not an issue but rather a question.

I would like to use SfM with a calibrated camera - I looked at the source code a bit. I see there is a "bundle adjustment" done probably in all SfM libraries. Is it possible to plug in (=hard code) my camera parameters (focal length, principal point or maybe even some more?) to your code and get better results?

What I am looking for a classical "multiview" SfM where one has 100 photos of a single object but I need to reconstruct from continuous sequence (moving car) - I want to reconstruct from 2 consecutive frames (or maybe more, but the fewer the better) of a monocular sequence. I can imagine this can be done with bundle adjustment too but I guess when I know both my camera parameters and the exact camera translation/rotation then 3D reconstruction may be done without bungle adjustment (much simpler) and maybe even more accurately?

I know my absolute translation and want to employ OpenCV's recoverPose and then do very simple triangulation to get my 3D scene. Could you give me some hints please?

kozuch avatar Jul 06 '17 19:07 kozuch

@royshil Would you mind replying please?

kozuch avatar Jul 21 '17 15:07 kozuch

@kozuch Of course, just don't pass the focal into the Ceres cost function in: https://github.com/royshil/SfM-Toy-Library/blob/master/SfMToyLib/SfMBundleAdjustmentUtils.cpp The center of projection is anyway not optimized. Take a look at that file, and you'll figure it out before long.

royshil avatar Jul 21 '17 15:07 royshil