instant-ngp
instant-ngp copied to clipboard
--colmap_camera_params format
I want to provide camera intrinsics to the script colmap2nerf.py,
using the option --colmap_camera_params.
The help string says, Format: fx,fy,cx,cy,dist
https://github.com/NVlabs/instant-ngp/blob/51e4107edf48338e9ab0316d56a222e0adf87143/scripts/colmap2nerf.py#L33
However, this doesn't seem to work for me:
(ngp) C:\ngp\instant-ngp\drone_couch>python ..\scripts\colmap2nerf.py --colmap_matcher exhaustive --run_colmap --aabb_scale 16 --colmap_camera_params 410.89398,456.2263,366.95539,229.21969,0
running colmap with:
db=colmap.db
images="images"
sparse=colmap_sparse
text=colmap_text
warning! folders 'colmap_sparse' and 'colmap_text' will be deleted/replaced. continue? (Y/n)y
==== running: colmap feature_extractor --ImageReader.camera_model OPENCV --ImageReader.camera_params "410.89398,456.2263,366.95539,229.21969,0" --SiftExtraction.estimate_affine_shape=true --SiftExtraction.domain_size_pooling=true --ImageReader.single_camera 1 --database_path colmap.db --image_path "images"
456.2263 was unexpected at this time.
FATAL: command failed
Have I misunderstood how to format these?
Did you ever make this work?
Please provide clarity in the docs!
Not sure if this is the right way to do it or not.
I was getting an CameraModelVerifyParams
error.
Here it shows different number of params for different camera models:
https://github.com/colmap/colmap/blob/1f69517d360463bf2e8936fdd1f1e61f719ea6eb/scripts/python/read_write_model.py#L54
So e.g. PINHOLE camera model 4 params (because the model is checked against its predefined number of params https://github.com/colmap/colmap/blob/main/src/colmap/sensor/models.cc#L220), would run for me.
python ../../scripts/colmap2nerf.py --video.mkv --video_fps 2 --colmap_camera_params=fx,fy,cx,cy --colmap_camera_model=PINHOLE --run_colmap --aabb_scale 4
Bump on this thead