Skip to content

Using known camera positions

Simon edited this page Apr 22, 2021 · 49 revisions

WIP (experimental feature, don´t expect it to work right away. Some tinkering is required.)

(matchFromKnownCameraPoses in the FeatureMatching node is not available in the 2019 release. )

In most of the cases using known camera positions is only useful for research. If you are looking for a way to improve accuracy: your own calculated camera poses are probably not precise enough. Using previously computed Meshroom sfm files will work though.

modifying existing cameras.sfm file

  1. Compute the default pipeline with a set of images to the SFM node.
  2. Open the SFM node folder
  3. Inspect the cameras.sfm file (you can compare it to the cameraInit.sfm to see what lines need to be added with your known camera positions.) Create a new cameras.sfm file with your known camera data in a new folder somewhere.

When creating your own sfm file, remove

`"featuresFolders":... and "matchesFolders": (leaving this in the sfm file messes up the paths).

[set "locked": "0" to "locked": "1" ]

Create a new cameras.sfm file with your known camera positions in a new folder somewhere. Rotation format Make sure your new sfm file uses the correct syntax and you did not miss any quotation marks (...).

  • disconnect CameraInit and FeatureExtraction
  • Input the new cameras.sfm in FeatureExtraction
  • make sure the node shows advanced settings (click on ... in the upper right border of the node settings)
  • in FeatureMatching you can now select "Match from known camera poses" (only in MR2020.x)
  • in StructureFromMotion "Lock Scene previously reconstructed" and "Force Lock of all Intrinsic Camera Parameters"

knownc

-> https://github.com/alicevision/meshroom/issues/1240

References: latest #829 #1167

#399, #740, #453, #475, #300, #787, #788, #747, #807, #721, #725, #1128

(Note: pose and rotation values may change from the 16+ digits after the decimal point)

Note: The creators of scAnt (an open-source platform for thecreation of 3D models of arthropods(and other small objects)) wrote their own script to create a sfm file with estimated poses. It can be used as reference: https://github.com/evo-biomech/scAnt/blob/master/scripts/estimate_camera_positions.py

Clone this wiki locally