bundle adjusting CSM and floating intrinsics

9 views
Skip to first unread message

James Hollingsworth

unread,
Jul 2, 2025, 10:26:12 AMJul 2
to Ames Stereo Pipeline Support
Hi Oleg,

I'm bundle adjusting a CSM linescan camera using dense GCPs (50k)... everything goes quickly (on 24 cores), and the solution is pretty good. However, my residuals at the edges of the image are a little high (~12 piels), so I thought I'd try bundle_adjust while floating optical center and/or distortion.

However, when I try this I noticed "Writing initial condition files" takes quite a long time (longer than without floating intrinsic, even though I'm using the same number of gcps). When it finally does write these initial files, they don't look any larger in size than the ones generated without floating.

Finally, when it does move on to "Starting the Ceres optimizer", it takes ~6 mins to move onto the 1st iteration, then another 6 mins for the next, etc. This doesn't seem right to me... without floating intrinsics, it's 1e-1s per iteration... floating just oc, it's 6 mins per iteration. That's a big difference.

Could this be a bug?

Cheers, J

Alexandrov, Oleg (ARC-TI)[KBR Wyle Services, LLC]

unread,
Jul 2, 2025, 12:48:17 PMJul 2
to James Hollingsworth, Ames Stereo Pipeline Support
Floating intrinsics in bundle adjustment takes notably longer than just optimizing poses, because each iteration requires creating new on-the-fly copy of the models for each thread. Some lens distortion models can also be slow if the distortion operation requires a solver.

So, I don't think it is a bug. You say with 50k points it takes 6 minutes per iteration. This is slower than what I recall, but not by a large factor. 

You can take a look at the distortion type in the CSM json file. After cross-checking with the code, it looks that the ones with type 0, 2, 4, and 5 use a solver for each distortion iteration. Maybe you have one of those. Type 7 (radial-tangential distortion) is what I use a lot and should be faster I think.

If this is a big problem in practice you can share privately a testcase and I can try to take a look.


From: ames-stereo-pi...@googlegroups.com <ames-stereo-pi...@googlegroups.com> on behalf of James Hollingsworth <hollings...@gmail.com>
Sent: Wednesday, July 2, 2025 7:26 AM
To: Ames Stereo Pipeline Support <ames-stereo-pi...@googlegroups.com>
Subject: [EXTERNAL] [BULK] bundle adjusting CSM and floating intrinsics
 
CAUTION: This email originated from outside of NASA.  Please take care when clicking links or opening attachments.  Use the "Report Message" button to report suspicious messages to the NASA SOC.



--
You received this message because you are subscribed to the Google Groups "Ames Stereo Pipeline Support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ames-stereo-pipeline...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/ames-stereo-pipeline-support/0974c877-d828-4362-a5b1-0e6e9472f9ean%40googlegroups.com.
Message has been deleted

James Hollingsworth

unread,
Jul 8, 2025, 5:30:30 PMJul 8
to Ames Stereo Pipeline Support
The linescan camera was for a large image (55k lines) so maybe that's also why it was slow at each iteration. I'm using radtan too. I s surprised that floating oc alone made the iterations slow too. Anyhow, good to know this was normal behaviour for you... 
Thanks again Oleg!
Reply all
Reply to author
Forward
0 new messages