ankur6ue / gsoc2011sfm

Automatically exported from code.google.com/p/gsoc2011sfm
0 stars 0 forks source link

Tutorial #9 Option 0 - Possibly incorrect bundle adjustment #12

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Run Tutorial #9 and select option 0

What is the expected output? What do you see instead?
Expected: Similar results to Tutorial #9 option 1 (once it is working). 
Basically should show an accurate point cloud and camera positions, but all 
cameras are stacked on top of each other. 

Please use labels and text to provide additional information.

This I assume is the same bundle adjustment problem that you mentioned on the 
wiki, which you said you fixed, right? Maybe the tutorial just needs to be 
updated to use the corrected method.

Original issue reported on code.google.com by stephen....@gmail.com on 19 Aug 2011 at 5:12

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
I get a whole heap of LAPACK errors, if that helps:

(for example)
LAPACK error: the leading minor of order 1 is not positive definite, the 
factorization could not be completed for dpotf2/dpotrf in sba_Axb_Chol()

Also, I might be crazy, but I swear I got a good result once (image attached). 
But every other time I run it I get the same result with cameras piled on top 
of each other.

Original comment by stephen....@gmail.com on 19 Aug 2011 at 5:26

Attachments:

GoogleCodeExporter commented 9 years ago
Unfortunately this problem is still not solved... The lapack error is something 
I have too but this seems to be normal (I will ask Vincent if this is something 
he knows).

I never had a "good" result (except when using the whole sequence of the 312 
images), so this bundle adjustment starting to annoy me ;)

I set this issue as started, even if I have no clue how to fix this...

Original comment by thibault...@gmail.com on 19 Aug 2011 at 12:13

GoogleCodeExporter commented 9 years ago
OK, so I now understand what's going on. This dataset is only given with P 
matrix so I used KRT_from_P function to get the different camera matrix. But 
this function wasn't working well as sometimes the rotation matrix was not a 
rotation matrix. So when I converted the rotation matrix into rotation 
quaternion, the bundle adjustment wasn't working...
Now it's working well because I enforce the determinant using this 
transformation:
      K.col(0) = -K.col(0);
      R.row(0) = -R.row(0);
      t(0)     = -t(0);
Thanks again to Julien Michot!

Original comment by thibault...@gmail.com on 20 Aug 2011 at 2:51