Alignment¶
alignment ¶
estimate_alignment ¶
estimate_alignment(
trajectory: Trajectory,
other: Trajectory,
alignment_settings: AlignmentSettings = AlignmentSettings(),
matching_settings: MatchingSettings = MatchingSettings(),
) -> AlignmentResult
Estimates the alignment between two trajectories.
Performs Helmert, Leverarm, and Time shift estimation depending on the configuration. This function only estimates the alignment parameters, it does not apply them to the trajectory.
Parameters:
-
trajectory(Trajectory) –Trajectory to align.
-
other(Trajectory) –Reference trajectory to align to.
-
alignment_settings(AlignmentSettings, default:AlignmentSettings()) –Settings for the alignment process. Defaults to AlignmentSettings().
-
matching_settings(MatchingSettings, default:MatchingSettings()) –Settings for the matching process. Defaults to MatchingSettings().
Returns:
-
AlignmentResult(AlignmentResult) –Result of the alignment process.
Source code in trajectopy\processing\alignment.py
apply_alignment ¶
apply_alignment(
trajectory: Trajectory,
alignment_result: AlignmentResult,
inplace: bool = True,
) -> Trajectory
Transforms trajectory using alignment parameters.
After computing the alignment parameters needed to align two trajectories, they can be applied to arbitrary trajectories.
Parameters:
-
trajectory(Trajectory) –Trajectory to apply alignment to.
-
alignment_result(AlignmentResult) –Alignment result containing transformation parameters.
-
inplace(bool, default:True) –Perform in-place. Defaults to True.
Returns:
-
Trajectory(Trajectory) –Aligned trajectory.
Source code in trajectopy\processing\alignment.py
adopt_first_pose ¶
adopt_first_pose(
trajectory: Trajectory,
other: Trajectory,
inplace: bool = True,
) -> Trajectory
Transform trajectory so that the first pose is identical in both.
Parameters:
-
trajectory(Trajectory) –Trajectory to transform.
-
other(Trajectory) –Reference trajectory.
-
inplace(bool, default:True) –Perform transformation in place. Defaults to True.
Returns:
-
Trajectory(Trajectory) –Transformed trajectory.
Source code in trajectopy\processing\alignment.py
adopt_first_position ¶
adopt_first_position(
trajectory: Trajectory,
other: Trajectory,
inplace: bool = True,
) -> Trajectory
Transform trajectory so that the first position is identical in both.
Parameters:
-
trajectory(Trajectory) –Trajectory to transform.
-
other(Trajectory) –Reference trajectory.
-
inplace(bool, default:True) –Perform transformation in place. Defaults to True.
Returns:
-
Trajectory(Trajectory) –Transformed trajectory.
Source code in trajectopy\processing\alignment.py
adopt_first_orientation ¶
adopt_first_orientation(
trajectory: Trajectory,
other: Trajectory,
inplace: bool = True,
) -> Trajectory
Transform trajectory so that the first orientation is identical in both.
Parameters:
-
trajectory(Trajectory) –Trajectory to transform.
-
other(Trajectory) –Reference trajectory.
-
inplace(bool, default:True) –Perform transformation in place. Defaults to True.
Returns:
-
Trajectory(Trajectory) –Transformed trajectory.
Source code in trajectopy\processing\alignment.py
align ¶
align(
trajectory: Trajectory,
other: Trajectory,
alignment_settings: AlignmentSettings = AlignmentSettings(),
matching_settings: MatchingSettings = MatchingSettings(),
inplace: bool = True,
) -> Trajectory
Aligns the trajectory with another trajectory.
Parameters:
-
trajectory(Trajectory) –Trajectory to align.
-
other(Trajectory) –Reference trajectory.
-
alignment_settings(AlignmentSettings, default:AlignmentSettings()) –Settings for the alignment process. Defaults to AlignmentSettings().
-
matching_settings(MatchingSettings, default:MatchingSettings()) –Settings for the matching process. Defaults to MatchingSettings().
-
inplace(bool, default:True) –Perform in-place. Defaults to True.
Returns:
-
Trajectory(Trajectory) –Aligned trajectory.