Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
95 changes: 95 additions & 0 deletions meshroom/aliceVision/SfmExpanding.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,101 @@ class SfMExpanding(desc.AVCommandLineNode):
"by avoiding computation of the Bundle Adjustment on areas that are not changing.",
value=True,
),
desc.BoolParam(
name="useTemporalConstraint",
label="Temporal Constraint",
description="Add a temporal smoothness constraint to the bundle adjustment.",
value=False,
),
desc.FloatParam(
name="tscPositionWeight",
label="Temporal Constraint Position Weight",
description="",
Copy link

Copilot AI Dec 5, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Empty description field for user-facing parameter. All the temporal constraint weight parameters (lines 89, 98, 107, 116, 125, 134, 143, 152, 161) have empty descriptions. Users will not understand what these parameters control without documentation. Add meaningful descriptions explaining what each weight controls (C0 = continuity, C1 = velocity, C2 = acceleration constraints).

Copilot uses AI. Check for mistakes.
value=10.0,
range=(0.0, 100.0, 0.1),
advanced=True,
enabled=lambda node: node.useTemporalConstraint.value,
),
desc.FloatParam(
name="tscOrientationWeight",
label="Temporal Constraint Orientation Weight",
description="",
Copy link

Copilot AI Dec 5, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Empty description field for user-facing parameter. Add a meaningful description explaining what the orientation weight controls in the temporal constraint.

Suggested change
description="",
description="Weight of the temporal smoothness constraint applied to camera orientation during bundle adjustment.",

Copilot uses AI. Check for mistakes.
value=10.0,
range=(0.0, 100.0, 0.1),
advanced=True,
enabled=lambda node: node.useTemporalConstraint.value,
),
desc.FloatParam(
name="tscRegularizationWeight",
label="Temporal Constraint Regularization Weight",
description="",
Copy link

Copilot AI Dec 5, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Empty description field for user-facing parameter. Add a meaningful description explaining what the regularization weight controls.

Suggested change
description="",
description="Controls the strength of regularization applied to the temporal constraint. Higher values enforce smoother transitions between frames, reducing abrupt changes in pose or position.",

Copilot uses AI. Check for mistakes.
value=0.0,
range=(0.0, 100.0, 0.1),
advanced=True,
enabled=lambda node: node.useTemporalConstraint.value,
),
desc.FloatParam(
name="tscC0positionWeight",
label="Temporal Constraint C0 Position Weight",
description="",
Copy link

Copilot AI Dec 5, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Empty description field for user-facing parameter. Add a meaningful description explaining what C0 (continuity) position weight controls.

Suggested change
description="",
description="Controls the weight of the C0 continuity constraint on camera positions between consecutive frames. Higher values enforce smoother transitions in position, reducing abrupt changes.",

Copilot uses AI. Check for mistakes.
value=0.0,
range=(0.0, 1.0, 0.01),
advanced=True,
enabled=lambda node: node.useTemporalConstraint.value,
),
desc.FloatParam(
name="tscC1positionWeight",
label="Temporal Constraint C1 Position Weight",
description="",
Copy link

Copilot AI Dec 5, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Empty description field for user-facing parameter. Add a meaningful description explaining what C1 (first derivative/velocity) position weight controls.

Suggested change
description="",
description="Controls the weight of the C1 (first derivative/velocity) position constraint in temporal bundle adjustment. Higher values enforce smoother changes in camera position over time.",

Copilot uses AI. Check for mistakes.
value=1.0,
range=(0.0, 1.0, 0.01),
advanced=True,
enabled=lambda node: node.useTemporalConstraint.value,
),
desc.FloatParam(
name="tscC2positionWeight",
label="Temporal Constraint C2 Position Weight",
description="",
Copy link

Copilot AI Dec 5, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Empty description field for user-facing parameter. Add a meaningful description explaining what C2 (second derivative/acceleration) position weight controls.

Suggested change
description="",
description="Controls the influence of the second derivative (acceleration) of camera position in temporal constraints. Higher values enforce smoother changes in acceleration between consecutive frames.",

Copilot uses AI. Check for mistakes.
value=1.0,
range=(0.0, 1.0, 0.01),
advanced=True,
enabled=lambda node: node.useTemporalConstraint.value,
),
desc.FloatParam(
name="tscC0orientationWeight",
label="Temporal Constraint C0 Orientation Weight",
description="",
Copy link

Copilot AI Dec 5, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Empty description field for user-facing parameter. Add a meaningful description explaining what C0 (continuity) orientation weight controls.

Suggested change
description="",
description="Weight for enforcing C0 (continuity) in camera orientation between consecutive frames. Higher values increase the smoothness of orientation transitions.",

Copilot uses AI. Check for mistakes.
value=0.0,
range=(0.0, 1.0, 0.01),
advanced=True,
enabled=lambda node: node.useTemporalConstraint.value,
),
desc.FloatParam(
name="tscC1orientationWeight",
label="Temporal Constraint C1 Orientation Weight",
description="",
Copy link

Copilot AI Dec 5, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Empty description field for user-facing parameter. Add a meaningful description explaining what C1 (first derivative/velocity) orientation weight controls.

Suggested change
description="",
description="Weight for enforcing smoothness of camera orientation changes (first derivative/velocity) over time.",

Copilot uses AI. Check for mistakes.
value=1.0,
range=(0.0, 1.0, 0.01),
advanced=True,
enabled=lambda node: node.useTemporalConstraint.value,
),
desc.FloatParam(
name="tscC2orientationWeight",
label="Temporal Constraint C2 Orientation Weight",
description="",
Copy link

Copilot AI Dec 5, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Empty description field for user-facing parameter. Add a meaningful description explaining what C2 (second derivative/acceleration) orientation weight controls.

Suggested change
description="",
description="Weight for the temporal constraint on the second derivative (acceleration) of camera orientation. Higher values enforce smoother changes in orientation over time, reducing abrupt rotational accelerations between consecutive frames.",

Copilot uses AI. Check for mistakes.
value=1.0,
range=(0.0, 1.0, 0.01),
advanced=True,
enabled=lambda node: node.useTemporalConstraint.value,
),
desc.BoolParam(
name="exitAfterPoseInterpolation",
label="Only Pose Interpolation",
description="Exit after pose interpolation, before bundle adjustment. (for debug)",
value=False,
advanced=True,
enabled=lambda node: node.useTemporalConstraint.value,
),
desc.IntParam(
name="localBAGraphDistance",
label="LocalBA Graph Distance",
Expand Down
8 changes: 8 additions & 0 deletions meshroom/aliceVision/TracksSimulating.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,14 @@ class TracksSimulating(desc.AVCommandLineNode):
invalidate=True,
advanced=True,
),
desc.BoolParam(
name="randomNoiseVariancePerView",
label="Random Variance Per View",
description="Use different noise variance per view.",
value=False,
invalidate=True,
advanced=True,
),
desc.ChoiceParam(
name="verboseLevel",
label="Verbose Level",
Expand Down
14 changes: 14 additions & 0 deletions src/aliceVision/sfm/bundle/BundleAdjustment.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,19 @@ inline std::istream& operator>>(std::istream& in, EFeatureConstraint& m)
return in;
}

struct TemporalConstraintParams
{
double positionWeight = 10.0;
double orientationWeight = 10.0;
double regularizationWeight = 0.0;
double c0positionWeight = 0.0;
double c1positionWeight = 1.0;
double c2positionWeight = 1.0;
double c0orientationWeight = 0.0;
double c1orientationWeight = 1.0;
double c2orientationWeight = 1.0;
};

class BundleAdjustment
{
public:
Expand Down Expand Up @@ -102,6 +115,7 @@ class BundleAdjustment
REFINE_INTRINSICS_OPTICALOFFSET_IF_ENOUGH_DATA = 32, //< refine the optical offset only if we have a minimum number of cameras
REFINE_INTRINSICS_DISTORTION = 64, //< refine the distortion parameters
REFINE_STRUCTURE_AS_NORMALS = 128, //< Structure lies on a sphere (Pure rotation)
REFINE_TEMPORAL_SMOOTHNESS_CONSTRAINT = 256, //<
/// Refine all intrinsics parameters
REFINE_INTRINSICS_ALL = REFINE_INTRINSICS_FOCAL | REFINE_INTRINSICS_OPTICALOFFSET_IF_ENOUGH_DATA | REFINE_INTRINSICS_DISTORTION,
/// Refine all parameters
Expand Down
Loading
Loading