#include <ImFusion/US/MotionTrajectoryModel.h>
A motion model that extends rigid motion with possible waypoint parametrization.
More...
A motion model that extends rigid motion with possible waypoint parametrization.
This class extends the functionality of SimpleMotionModel in RigidPose mode by combining it with a spline-based MotionModel. The base rigid motion is defined by the first 6 parameters and handled by SimpleMotionModel. The remaining parameters are used to define waypoints.
- Note
- The first 6 parameters define the global rigid transformation.
- Rigid transformation is distributed symmetrically.
- The remaining parameters are divided into k blocks of 6 values.
- Each block defines the pose in position and euler angles for waypoints used by MotionModel.
- The number of control points (numberOfControlPoints()) does not necessarily match the number of blocks. The motion will be calculated based on these waypoints, and for each control point, the pose matrix will be interpolated.
- Control points are interpolated across the frame range, excluding the first and last frames.
- The base rigid transformation (first 6 parameters) is distributed symmetrically across the full motion.
- Waypoints influence only the internal frames.
- Warning
- setParameters(std::vector<double>) is not overridden. Parameters are exposed as-is:
- pars[0..5]: Rigid motion parameters.
- pars[6..]: k blocks of 6 parameters (position + Euler angles).
- See also
- SimpleMotionModel
-
MotionModel
|
|
int | m_numCtrlPoints = 1 |
| | Control points of underlying MotionModel; Should not exceed the size of a model.
|
|
bool | m_modelOpt = false |
| | Optimize motion control points.
|
|
const int | m_size |
| | Size of the model, regularly the number of frames.
|
|
std::vector< double > | m_pars |
| | Full motion parameter vector - not necessarily the exposed ones.
|
|
mat4 | m_relShift |
| | Generic helper matrix to incorporate optional shifts. Considered by rigidMotion().
|
|
std::vector< Param > | m_params |
| | List of all registered Parameter and SubProperty instances.
|
◆ ParametricMotionModel()
| ImFusion::US::ParametricMotionModel::ParametricMotionModel |
( |
int | size | ) |
|
|
explicit |
- Parameters
-
| size | The number of frames in the motion sequence. |
◆ name()
| std::string ImFusion::US::ParametricMotionModel::name |
( |
| ) |
const |
|
inlineoverridevirtual |
◆ configure()
| void ImFusion::US::ParametricMotionModel::configure |
( |
const Properties * | p | ) |
|
|
overridevirtual |
◆ configuration()
| void ImFusion::US::ParametricMotionModel::configuration |
( |
Properties * | p | ) |
const |
|
overridevirtual |
◆ defineMotion()
| std::vector< mat4 > ImFusion::US::ParametricMotionModel::defineMotion |
( |
| ) |
const |
|
overridevirtual |
◆ fitMatrices()
| mat4 ImFusion::US::ParametricMotionModel::fitMatrices |
( |
const std::vector< mat4 > & | mat | ) |
|
|
overridevirtual |
Sets the parameters based on the given motion sequence.
- Warning
- If mat.size() > m_size, the behavior is undefined. Ensure the input sequence does not exceed the model size.
Implements ImFusion::US::MotionTrajectoryModel.
◆ setNumberOfControlPoints()
| void ImFusion::US::ParametricMotionModel::setNumberOfControlPoints |
( |
int | p, |
|
|
bool | opt = false ) |
Function defining the number of control points and optimization flag.
- If opt == false: Control points are distributed uniformly over the normalized time interval (0, 1), excluding the start and end frames.
- If opt == true: Control points are distributed non-uniformly based on the Manhattan norm of each parameter block.
- Parameters
-
| p | Number of control points to use (must be 0 < p < m_size). |
| opt | Whether to optimize the distribution of control points based on waypoint motion. |
The documentation for this class was generated from the following file:
- ImFusion/US/MotionTrajectoryModel.h