meshroom.nodes.aliceVision.StructureFromMotion.StructureFromMotion

Inheritance diagram of meshroom.nodes.aliceVision.StructureFromMotion.StructureFromMotion

Category: Sparse Reconstruction

This node will analyze feature matches to understand the geometric relationship behind all the 2D observations, and infer the rigid scene structure (3D points) with the pose (position and orientation) and internal calibration of all cameras. The pipeline is a growing reconstruction process (called incremental SfM): it first computes an initial two-view reconstruction that is iteratively extended by adding new views.

1/ Fuse 2-View Matches into Tracks

It fuses all feature matches between image pairs into tracks. Each track represents a candidate point in space, visible from multiple cameras. However, at this step of the pipeline, it still contains many outliers.

2/ Initial Image Pair

It chooses the best initial image pair. This choice is critical for the quality of the final reconstruction. It should indeed provide robust matches and contain reliable geometric information. So, this image pair should maximize the number of matches and the repartition of the corresponding features in each image. But at the same time, the angle between the cameras should also be large enough to provide reliable geometric information.

3/ Initial 2-View Geometry

It computes the fundamental matrix between the 2 images selected and consider that the first one is the origin of the coordinate system.

4/ Triangulate

Now with the pose of the 2 first cameras, it triangulates the corresponding 2D features into 3D points.

5/ Next Best View Selection

After that, it selects all the images that have enough associations with the features that are already reconstructed in 3D.

6/ Estimate New Cameras

Based on these 2D-3D associations it performs the resectioning of each of these new cameras. The resectioning is a Perspective-n-Point algorithm (PnP) in a RANSAC framework to find the pose of the camera that validates most of the features associations. On each camera, a non-linear minimization is performed to refine the pose.

7/ Triangulate

From these new cameras poses, some tracks become visible by 2 or more resected cameras and it triangulates them.

8/ Optimize

It performs a Bundle Adjustment to refine everything: extrinsics and intrinsics parameters of all cameras as well as the position of all 3D points. It filters the results of the Bundle Adjustment by removing all observations that have high reprojection error or insufficient angles between observations.

9/ Loop from 5 to 9

As we have triangulated new points, we get more image candidates for next best views selection and we can iterate from 5 to 9. It iterates like that, adding cameras and triangulating new 2D features into 3D points and removing 3D points that became invalidated, until we cannot localize new views.

Online

https://alicevision.org/#photogrammetry/sfm

Inputs:

  • input (File)

  • featuresFolders (ListAttribute)

  • matchesFolders (ListAttribute)

  • describerTypes (ChoiceParam)

  • localizerEstimator (ChoiceParam)

  • observationConstraint (ChoiceParam)

  • localizerEstimatorMaxIterations (IntParam)

  • localizerEstimatorError (FloatParam)

  • lockScenePreviouslyReconstructed (BoolParam)

  • useLocalBA (BoolParam)

  • localBAGraphDistance (IntParam)

  • nbFirstUnstableCameras (IntParam)

  • maxImagesPerGroup (IntParam)

  • bundleAdjustmentMaxOutliers (IntParam)

  • maxNumberOfMatches (IntParam)

  • minNumberOfMatches (IntParam)

  • minInputTrackLength (IntParam)

  • minNumberOfObservationsForTriangulation (IntParam)

  • minAngleForTriangulation (FloatParam)

  • minAngleForLandmark (FloatParam)

  • maxReprojectionError (FloatParam)

  • minAngleInitialPair (FloatParam)

  • maxAngleInitialPair (FloatParam)

  • useOnlyMatchesFromInputFolder (BoolParam)

  • useRigConstraint (BoolParam)

  • rigMinNbCamerasForCalibration (IntParam)

  • lockAllIntrinsics (BoolParam)

  • minNbCamerasToRefinePrincipalPoint (IntParam)

  • filterTrackForks (BoolParam)

  • computeStructureColor (BoolParam)

  • useAutoTransform (BoolParam)

  • initialPairA (File)

  • initialPairB (File)

  • interFileExtension (ChoiceParam)

  • logIntermediateSteps (BoolParam)

  • verboseLevel (ChoiceParam)

Outputs:

  • output (File)

  • outputViewsAndPoses (File)

  • extraInfoFolder (File)

class meshroom.nodes.aliceVision.StructureFromMotion.StructureFromMotion
__init__()

Methods

__init__()

buildCommandLine(chunk)

postUpdate(node)

Method call after node's internal update on invalidation.

processChunk(chunk)

stopProcess(chunk)

update(node)

Method call before node's internal update on invalidation.

upgradeAttributeValues(attrValues, fromVersion)

Attributes

category

cgroupParsed

cmdCore

cmdMem

commandLine

commandLineRange

cpu

documentation

gpu

inputs

internalFolder

internalInputs

outputs

packageName

packageVersion

parallelization

ram

size