Can't convert to NVM output with OPENCV camera model

562 views
Skip to first unread message

Greg Anders

unread,
Jun 13, 2017, 1:20:35 PM6/13/17
to COLMAP
Is there a reason that model_converter cannot convert to .nvm format when using a camera model other than SIMPLE_RADIAL? We would like to use the OPENCV camera model to estimate our camera's intrinsic parameters (we are using only one camera) and we would also like to convert to .nvm format so that we can make use of OpenMVS, but as it stands now it looks like this is not possible.

Is this something that can be changed in a future release? Or is there some fundamental incompatibility here?

Johannes Schönberger

unread,
Jun 13, 2017, 1:25:04 PM6/13/17
to col...@googlegroups.com
Hi,

VisualSFM only supports a single camera model, which is SIMPLE_RADIAL.

If OpenMVS supports the PMVS format, then you can use the image_undistorter to create the necessary output.

Note that COLMAP ships with a pretty good built-in dense reconstruction pipeline. Is there a reason to switch to openMVS?

Cheers,
Johannes

> On Jun 13, 2017, at 7:20 PM, Greg Anders <greg.p...@gmail.com> wrote:
>
> Is there a reason that model_converter cannot convert to .nvm format when using a camera model other than SIMPLE_RADIAL? We would like to use the OPENCV camera model to estimate our camera's intrinsic parameters (we are using only one camera) and we would also like to convert to .nvm format so that we can make use of OpenMVS, but as it stands now it looks like this is not possible.
>
> Is this something that can be changed in a future release? Or is there some fundamental incompatibility here?
>
> --
> You received this message because you are subscribed to the Google Groups "COLMAP" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to colmap+un...@googlegroups.com.
> To post to this group, send email to col...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/colmap/6dc5efe2-7215-4b3b-aea8-867049a04df7%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

Johannes Schönberger

unread,
Jun 13, 2017, 1:26:20 PM6/13/17
to col...@googlegroups.com
Alternatively, you could also use the image_undistorer first to undistort the OPENCV model to a PINHOLE model. Then you can use the model_converter on the "sparse" folder in the output directory of the image_undistorter to convert to NVM.

Cheers,
Johannes
> To view this discussion on the web visit https://groups.google.com/d/msgid/colmap/466F2DC6-4C78-446A-B5F2-C619E021AAB2%40demuc.de.

Greg Anders

unread,
Jun 13, 2017, 2:00:38 PM6/13/17
to COLMAP
Thanks for the prompt reply.

We are just experimenting with different MVS methods right now, and we wanted to give OpenMVS a try since their approach is a little different than the one employed by COLMAP.

As far as I know, OpenMVS does not support the PMVS format. It expects the camera poses and image points as its input. COLMAP obviously supplies this, but not in a format natively supported by OpenMVS. OpenMVS has support for VisualSFM (i.e., NVM format) and for OpenMVG.

I tried your alternative method of using image_undistorter first and then using model_converter on the PINHOLE model solution, but I still get the same error ("NVM only supports `SIMPLE_RADIAL` camera model").

Johannes Schönberger

unread,
Jun 13, 2017, 2:22:28 PM6/13/17
to col...@googlegroups.com
You can make it work by manually modifying the cameras.txt and replacing PINHOLE with SIMPLE_RADIAL. Additionally, you need to transform the parameters, e.g., if the line is ``1 PINHOLE 2592 1728 3369.97 3369.97 1296 864`` then it should be ``1 SIMPLE_RADIAL 2592 1728 3369.97 1296 864 0``. Note that the pinhole model has two focal length parameters, if they differ you have to e.g. average them, since SIMPLE_RADIAL only has one parameter.
> To view this discussion on the web visit https://groups.google.com/d/msgid/colmap/6d462cab-6d3f-4a79-950c-b1d3a369fd24%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages