Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

SmartProjectionParams

SmartProjectionParams is a structure used to configure the behavior of “smart” factors like SmartProjectionFactor, SmartProjectionPoseFactor, and SmartStereoFactor. These factors implicitly manage the triangulation of a 3D point observed by multiple cameras.

Parameters include:

  • linearizationMode: Determines the type of linear factor produced when .linearize() is called.

    • HESSIAN (Default): Creates a RegularHessianFactor by marginalizing out the point.

    • IMPLICIT_SCHUR: Creates a RegularImplicitSchurFactor.

    • JACOBIAN_Q: Creates a JacobianFactorQ.

    • JACOBIAN_SVD: Creates a JacobianFactorSVD.

  • degeneracyMode: How to handle cases where triangulation fails or is ill-conditioned.

    • IGNORE_DEGENERACY (Default): Factor might become ill-conditioned.

    • ZERO_ON_DEGENERACY: Return a zero-information factor (Hessian/Jacobian) if triangulation fails.

    • HANDLE_INFINITY: Treat the point as being at infinity (uses Unit3 representation).

  • triangulation: A gtsam.TriangulationParameters struct containing parameters for the triangulateSafe function:

    • rankTolerance: Rank tolerance threshold for SVD during triangulation.

    • enableEPI: Use Essential matrix check for epipolar inconsistency (only for Point3 landmarks).

    • landmarkDistanceThreshold: If point distance is greater than this, use point-at-infinity.

    • dynamicOutlierRejectionThreshold: If non-zero, dynamically rejects measurements based on reprojection error (threshold in sigmas).

  • retriangulationThreshold: If the change in camera poses between linearizations exceeds this threshold (Frobenius norm difference), the point is re-triangulated.

  • throwCheirality / verboseCheirality: Flags inherited from projection factors to control exception handling when a point is behind a camera.

Open In Colab

Creating and Modifying Params

Default Parameters:
linearizationMode: 0
   degeneracyMode: 0
rankTolerance = 1
enableEPI = 0
landmarkDistanceThreshold = -1
dynamicOutlierRejectionThreshold = -1
useLOST = 0
noise model


Custom Parameters:
linearizationMode: 2
   degeneracyMode: 1
rankTolerance = 1e-08
enableEPI = 0
landmarkDistanceThreshold = -1
dynamicOutlierRejectionThreshold = 1
useLOST = 0
noise model

Usage

These SmartProjectionParams objects are passed to the constructors of smart factors, like SmartProjectionPoseFactor.

Smart Factor created with custom params:
SmartProjectionPoseFactor, z = 
 SmartProjectionFactor
linearizationMode: 2
triangulationParameters:
rankTolerance = 1e-08
enableEPI = 0
landmarkDistanceThreshold = -1
dynamicOutlierRejectionThreshold = 1
useLOST = 0
noise model

result:
no point, status = 1

SmartFactorBase, z = 
  keys = { }