Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SIMPLE_PINHOLE camera model is probably suboptimal #68

Open
russss opened this issue Feb 9, 2025 · 5 comments
Open

SIMPLE_PINHOLE camera model is probably suboptimal #68

russss opened this issue Feb 9, 2025 · 5 comments

Comments

@russss
Copy link
Contributor

russss commented Feb 9, 2025

I've got another big LED rig to play with (similar to before but with more pixels), but even after improving the LED detection and running 18 scans, marimapper seemed to perform worse. I've replaced my Macbook Pro webcam with an external industrial 4K camera with a manual wide-angle lens, and I began to suspect this was the cause.

Sure enough, changing the COLMAP camera model from SIMPLE_PINHOLE to SIMPLE_RADIAL massively improved the SfM solution. The PINHOLE models don't correct for lens distortion, and my lens clearly has a decent amount.

I'm going to test a few more camera models and see what works best.

@russss
Copy link
Contributor Author

russss commented Feb 9, 2025

Here's the performance and runtime of a selection of camera models on this 300-LED rig. (The 18 scans are probably a bit excessive now.)

Model LEDs Identified RMS Error Runtime
SIMPLE_PINHOLE 120 1.34 2.9s
SIMPLE_RADIAL 299 2.89 6.4s
OPENCV 299 1.50 2.2s
FULL_OPENCV 299 1.02 8.3s

Not sure where the 300th LED went, I think I might have an off-by-one somewhere or it was hiding, but I can manually place that one...

Notably OPENCV is both faster and much better than SIMPLE_PINHOLE, but FULL_OPENCV is fantastic.

Image

@TheMariday
Copy link
Owner

TheMariday commented Feb 10, 2025

Thank you so much for this.

I don't have time to respond to this in full right now but I wanted to say thank you for giving me a wonderful table with wonderful results.

I'll try and give this a spin this weekend and see if I can replicate your results.

This might be very promising! Especially by the looks of it, it's not a huge amount of increasing process overhead.

My main curiosity is how it behaves with smaller systems and less observations.

Perhaps they could be an option to enable this or disable this depending on setup.

@TheMariday
Copy link
Owner

TheMariday commented Feb 11, 2025

Gave this a test on a small rig and interestingly OPENCV failed to reconstruct all views.

SIMPLE_RADIAL seems to perform well though on small sets

Also on smaller sets, it seems to have a similar speed performance on my machine

@TheMariday
Copy link
Owner

I've pushed the radial for now, but want to have a deeper dive into this soon

@russss
Copy link
Contributor Author

russss commented Feb 11, 2025

Aha, I suspect what's happening here is that the more parameters the camera model has, the more scans are needed for it to successfully solve for them.

So perhaps we could automatically choose the model based on the number of scans taken - but this would presumably require re-initialising the incremental mapping every time the model changes.

The SIMPLE_RADIAL model only has one more parameter than SIMPLE_PINHOLE so that one is probably worth it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants