Fill gaps in trial data
When Nexus reconstructs each marker on a subject, ideally it produces a smooth trajectory throughout the trial. Realistically, there may be frames with breaks in trajectories due to some markers that could not be reconstructed or spurious data.
Tip
Auto Gap Fill attempts to fill all gaps in the trial data. For the best results, you are likely to need to change the default property settings, including the gap size. For data containing large gaps, review and manually fill the large gaps first, using the tools in the Label/Edit Tools pane, and/or by cropping out any unwanted frames with large gaps that occur at the start or end of the trial.
For information on cropping frames at the start and end of the trial data, see Crop trials.
For more information, see the following topics.
In addition, a Vicon Nexus 2 tutorial video, showing gap-filling operations, including many additional tips and examples, is available on YouTube.
As the videos were recorded using an earlier version of Nexus 2, you may notice small differences in the user interface.
For additional tips, see Improve manual labeling in the Vicon Nexus Reference Guide.
Manually fill gaps in trial data
You can manually fill any gaps in the reconstructed and labeled trial data by using the tools in the Label/Edit Tools pane.
As well as automatically filling gaps (see Automatically fill gaps in trials), you can manually fill gaps to correct any errors or inconsistencies in the reconstructed and labeled trial data.
To manually fill gaps in reconstructed and labeled data:
- Display reconstructed and labeled markers, ensure Nexus is in Offline mode, and display a 3D Perspective view and optionally a Graph view, as described in Review trial data using the time bar.
- Unless you have already cropped your trial (see Crop trials), to simplify cleaning up your data, set the region of interest of the trial that you wish to analyze. For example, if the capture includes the subject entering and leaving the capture volume, Vicon recommends that you set the range of frames to exclude these parts of the capture, as they are likely to include large gaps. To do this, on the time bar, move the blue range indicator triangles to select a range of frames and then right-click and click Zoom to Region-of-Interest.
- In the Subjects tree, ensure that the desired subject is selected (when selected, there is a check mark in the check box).
In the Label/Edit tools pane, in the Gap Filling section, any markers whose trajectories contain gaps within the selected range of frames are listed in the Trajectory column, with the number of gaps for each trajectory identified in the #Gaps column and the largest gap length in the Max Gap Length column.Tip: To jump to the largest gap for a particular trajectory, double-click in its Max Gap Length column. To change the sort order of the columns, click the column headings.
- In the Trajectory column, click the trajectory whose gaps you want to fill.
Nexus automatically selects the gap by placing the current time in the middle of the gap and positioning the gap range selectors (blue cones) at the start and end of the gap. A red dotted line is displayed to preview the shape of the trajectory if a spline fill editing operation is run.
If you can't see a red dotted line, in the Label/Edit Tools pane, in the Gap Filling section, hover the mouse pointer over the Fill button in the Spline Fill area to display a tooltip. - In the Range section, view the range values to identify the size of the gap and use the buttons to navigate between the gaps in the selected trajectory:
- Prev Gap: Navigate to the previous gap in the selected trajectory. This button is available only if there are gaps in the trajectory before this point.
- Left edit range: The frame before the start gap range selector, indicating the start of the gap that will be filled in.
- Right edit range: The frame after the end gap range selector, indicating the end of the gap that will be filled in.
- Next Gap: Navigate to the next gap in the selected trajectory. This button is available only if there are gaps in the trajectory after this point.
- Prev Gap: Navigate to the previous gap in the selected trajectory. This button is available only if there are gaps in the trajectory before this point.
- If required (for example, if the data leading up to the gap is noisy), to extend the edit range beyond the gap, in the 3D Perspective view, drag the gap range selectors (blue cones).
Tip: If you need to adjust the size of the cones for easier viewing or selection, open the Options dialog box (press F7) and click Trajectory Editor. Adjust the value of Radius as required (the default is 10 pixels).
- Use the appropriate fill tool to generate data to fill the selected gap.
The fill options are:Tip: If your chosen tool is unavailable, hover the mouse pointer over the unavailable button to display a tooltip that explains how to use it.
- Spline Fill: Performs a cubic spline interpolation operation to fill the currently selected gaps. Use it when you have suitable frames with no gaps on either side of the gap. If there are gaps in these frames, the fill is rejected and you will need to choose a different gap-filling method. For more information, see Fill gaps with Spline Fill.
- Pattern Fill: Uses the shape of another trajectory without a gap to fill the selected gap. Use this tool only if there is a suitable marker with a trajectory similar to the one whose gap you wish to fill. This is typically the case when the trajectories originated from markers attached to the same segment, such as those attached to the ankle or heel. For more information, see Fill gaps with Pattern Fill.
- Rigid Body Fill: This option is the Nexus equivalent of the Replace 4 option, which is available in BodyBuilder. Use this option when a rigid or semi-rigid relationship exists between markers. For more information, see Fill gaps with Rigid Body Fill.
- Kinematic Fill: This option uses information about the connection of markers to segments in the labeling skeleton template (VST). For this option to be available, you may first need to run the Kinematic Fit pipeline operation, by clicking the KinFit button on the Nexus toolbar. For more information, see Fill gaps with Kinematic Fill.
- Cyclic Fill: For trials that contain captured data that is cyclic in nature (for example, when a motion on a treadmill or other repetitive motion is captured), this option uses patterns from a missing marker from earlier or later gait cycles to fill gaps. (If you want to modify the supplied operations, you can change and run the Fill Gaps - Cyclic pipeline operation instead.) For more information, see Fill gaps with Cyclic Fill.
Tip: For data with smaller gaps, you could use a processing pipeline containing the Fill gaps (Woltring) operation to automatically fill gaps.
- In the chosen gap fill area, click the appropriate option:
- To have Nexus fill the selected gap, click Fill.
- To have Nexus fill all the gaps in the selected trajectory with the currently chosen type of gap filling, click All. This feature is particularly useful when, for example, you have 7 gaps in LASI and you want to fill them all with a Rigid Fill from the other pelvic markers (RASI, RPSI, LPSI).
- For Pattern Fill or Rigid Body Fill, you can click Auto before clicking Fill or All.
When all gaps for the selected trajectory have been successfully filled, the entry for the trajectory is automatically removed from the Trajectory list and Nexus selects the next trajectory. - Repeat steps 4–8 to fill all the gaps for all trajectories.
- On the Nexus toolbar, click the Save button to save the trial. You can then perform any other processing that is required, such as running pipelines.
Tip
To save time, you can create custom pipelines that include the type of gap-filling operations that you commonly perform, such as Rigid fills for Pelvis and Head markers. For more information, see Example of creating a custom pipeline for gap-filling.
Use the gap filling options
The following information provides instructions on how to use the Vicon Nexus gap-filling options. (For detailed information about the Nexus gap-filling algorithms, see the FAQ What Gap Filling Algorithms are used in Nexus 2? on the Vicon website.)
Fill gaps with Spline Fill
- Ensure the required gap is selected (see Manually fill gaps in trial data).
- Under Spline Fill, in the Maximum gap length field, specify the maximum number of frames to spline fill (the default is 100 frames).
- Click the appropriate button:
- To have Nexus fill the selected gap, click Fill.
- To have Nexus spline fill all the gaps in the selected trajectory, click All.
Fill gaps with Pattern Fill
- Ensure the required gap is selected (see Manually fill gaps in trial data).
- Under Pattern Fill, click Pick Source or Auto:
If you click Pick Source:- The shape of the pointer changes to include a tooltip to guide you in the selection of markers in the 3D Perspective view. Initially, a tooltip with the text Pick source marker hangs from the cursor.
- In the 3D Perspective view, click a source marker whose trajectory is to be used to fill the gap of the target marker.
A green dotted line is displayed to preview the shape of the trajectory if a pattern fill editing operation is run with the selected source model.
Nexus displays the name of the source marker at the bottom of the Pattern Fill section, so you can confirm that you have selected the desired trajectory. - In the Pattern Fill section, click Fill to have Nexus fill the selected gap (or All to fill all gaps in the selected trajectory), with the shape of the filled-in trajectory being similar to the trajectory of the source marker.
- A suggested donor trajectory is listed in the space above the Auto button and the suggested fill is displayed in green in the 3D Perspective window. You can also view the suggested fill options as colored dotted lines in the Graph view.
- Do one of the following:
- To accept the suggested donor, click Fill or All; or
To reject the suggestion and manually pick a source, click the Clear selected donor button
, click Pick Source, then click (or CTRL+click to multi select), the required trajectory, and then click Fill or All.
Fill gaps with Rigid Body Fill
This option is the Nexus equivalent of the Replace 4 option, which is available in BodyBuilder.
Use it when a rigid or semi-rigid relationship exists between markers. For example:
- Pelvis (LASI, RASI, LPSI, RPSI)
- Head (LFHD, RFHD, LBHD, RBHD)
- Ensure the required gap is selected (see Manually fill gaps in trial data).
- In the Rigid Body Fill area, click Pick Source or Auto.
If you click Pick Source:- Click (or CTRL+click to multi select), the required trajectory
- Click Fill or All.
- Three trajectories are listed in the space above the Auto button and the suggested fill is displayed in green in the 3D Perspective window. You can also view the suggested fill options as colored dotted lines in the Graph view.
- Do one of the following:
- To accept the suggested donor, click Fill or All; or
To reject the suggestion and manually pick a source, click the Clear selected donor button
, click Pick Source, then click (or CTRL+click to multi select), the required trajectory, and then click Fill or All.
Fill gaps with Kinematic Fill
This option uses information about the connection of markers to segments in the labeling skeleton (VSK).
- To provide the required kinematic data, ensure you have clicked the KinFit button or run a pipeline operation that includes kinematic fitting.
- Ensure the required gap is selected (see Manually fill gaps in trial data).
- In the Kinematic Fill area, click Pick Segment and in the 3D Perspective view select the segment from which the kinematics will be copied.
The suggested fill is displayed in purple in the 3D Perspective view. You can also view the suggested fill options as colored dotted lines in the Graph view. - Do one of the following:
- To accept the suggested donor, click Fill or All; or
To reject the suggestion and try again, click the Clear selected donor button
, click Pick Segment, then click (or CTRL+click to multi select), the required trajectory, and then click Fill or All.
Fill gaps with Cyclic Fill
- Ensure you have captured a trial containing repetitive motion.
- Select the gap/range that is to be filled (see Manually fill gaps in trial data).
- In the 3D Perspective view and the Graph of the marker component, preview the gap fill solution provided by Nexus.
- If the suggested solution is acceptable, in the Label/Edit Tools pane, ensure Gap Filling is expanded.
- In theCyclic Fill area, select the required option:
- Fill Fills the currently selected range
- All Attempts to fill all gaps in the selected trajectory.
Automatically fill gaps in trial data
You can automatically fill gaps using the Auto Gap Fill button on the Nexus toolbar or the equivalent Auto-Intelligent Gap Fill pipeline in the Pipeline tools pane. This enables you to quickly fill gaps in your trial, without having to choose which fill method is best for each gap. You can do this in a one-click operation or, if you want to modify the supplied operations, by changing and running the Auto Intelligent Gap Fill pipeline.
Tip
Auto Gap Fill attempts to fill all gaps in the trial data. For this operation to work well, you are likely to need to change the default property settings, including the gap size. For data containing large gaps, you are advised to review and manually fill the large gaps first, using the tools in the Label/Edit Tools pane (see Manually fill gaps in trial data), and/or cropping out any unwanted frames with large gaps that occur at the start or end of the trial. For information on cropping frames at the start and end of the trial data, see Crop trials.
To automatically fill gaps in trial data:
- Display reconstructed and labeled markers in either of the following ways:
- Ensure that a trial you have just captured has been reconstructed and labeled; or
- From the Data Management tab, open a previously captured, reconstructed and labeled trial.
- In the Resources pane, ensure Nexus is in Offline mode.
- Display a 3D Perspective view and optionally a Graph view.
Tip: Using a split layout with both a 3D Perspective and a Graph enables you to view the results of your editing actions and to select specific trajectories, frame ranges, and gaps in trajectories. Since the graphs indicate what changes have been made to the data and by which tool, you can immediately see the results of any edits you have made and determine if you want to change it again or adjust the data using one of the tools in the Label/Edit Tools pane.
- In the Nexus tool bar, click Auto Gap Fill.
Nexus assesses each gap one-by-one in series and fills all the gaps.
To use the Auto Intelligent Gap Fill pipeline:
- On the Tools pane, click the Pipelines button.
- From the Current Pipeline list, select the Auto Intelligent Gap Fill pipeline.
- From the list of operations below, select the gap-filling operations that you want to use. If required, in the Properties pane, modify the relevant settings to suit your particular trial.
For more information on an operation, either view its tooltip by clicking on its name and then hovering the mouse pointer over it or see the FAQ What gap-filling algorithms are used in Nexus 2? on the Vicon website. - Either click the Run button or use the Auto Gap Fill button on the tool bar, as described above, to run the pipeline with any changes you have made.
- On the Nexus toolbar, click the Save button to save the trial. This will enable you to load the edited trial data. You can then perform any other processing, such as manually filling any remaining gaps.
You can run the pipeline either on an individual trial in the Pipeline Tools pane or on multiple files using the Batch Processing Interface.
Example of creating a custom pipeline for gap-filling
The following steps describe how to make a custom pipeline for speeding up gap-filling operations. (For a reminder of how to create and run pipelines, see Work with pipelines.)
To create a custom gap-filling pipeline:
-
Create a new pipeline (for example, called Head and Pelvis Fill), which contains two Rigid Body fill operations.
-
Click on each operation in turn and in the Properties pane, customize the fills so that Pelvis and Head markers will be filled appropriately. For example:
Pelvis Rigid Fill propertiesHead Rigid Fill properties
- Save the pipeline.
-
Add a new button to the Nexus toolbar (Window menu > Toolbar) to give quick access to your custom pipeline.
Now, with one mouse click, you can automatically fill any Pelvis and Head gaps.