pierotofy / OpenSplat

Production-grade 3D gaussian splatting with CPU/GPU support for Windows, Mac and Linux 🚀
https://antimatter15.com/splat/?url=https://splat.uav4geo.com/banana.splat
GNU Affero General Public License v3.0
924 stars 87 forks source link

Problem with using COLMAP project #72

Closed Garshishka closed 7 months ago

Garshishka commented 7 months ago

Using datasets from here https://github.com/pierotofy/OpenSplat/issues/1#issue-2139060707 I got no problem using OpenSplat. But when I make my own point cloud in COLMAP (using banana images from example datasets) and then run them in OpenSplat i get an error "Unsupported camera model: 2". What can cause that? I'm using COLMAP-3.9.1-windows-cuda with GUI and "automatic reconstruction" function, if that's important.

Garshishka commented 7 months ago

After some experiments I think I got the problem. Don't use "Automatic reconstruction". It worked with this steps:

  1. Feature extraction: check "Shared for all images" and choose camera model PINHOLE. I had SIMPLE_RADIAL and it doesn't work
  2. Feature matching on default parameters
  3. Reconstruction
  4. Export model

With this it worked!

I think this issue can be closed now

Jonathan-Gore commented 7 months ago

Interesting, I'm having the exact same issue as you.

I'd love someone with more knowledge give some insight on why the camera model needs to be "PINHOLE" instead of "SIMPLE_RADIAL" before this issue closes. What implications does that have for the reconstruction?

The COLMAP documentation implies that this camera model choice results in less distortion correction: https://colmap.github.io/cameras.html

Additionally, if I can better understand why the "SIMPLE_RADIAL" camera cannot be used I would be happy to contribute a Readme about a COLMAP processing guide for use with Opensplat.

pierotofy commented 7 months ago

It should be relatively simple to add support for simple radial. One needs to look at the definition in colmap's source code and check how the undistortion model works. Then adjust https://github.com/pierotofy/OpenSplat/blob/main/colmap.cpp#L46 accordingly.

Jonathan-Gore commented 7 months ago

Ok, I'm willing to take a crack at that later today!

Jonathan-Gore commented 7 months ago

@Garshishka Support for Simple_Radial should be live if you're building from main! Let me know how it works if you end up using it.