Processing 2D data

The 2D data is processed when the Pre-process 2D data option is enabled on the Processing page in Project Options. When reprocessing 2D data in a file, the 3D, 6DOF and skeleton data must also be reprocessed for the changes to have any effect.

The following pre-processing and filtering methods for 2D data are available:

  • Pixel masks

  • Marker size filtering

  • Circularity filter (a legacy filtering method, only supported by Oqus cameras)

How to use pixel masks

Pixel masks can be used to remove markers in specific areas of the camera views. Pixel masks can be added by freehand drawing with the Pixel Mask Tool. Pixel masks can be applied in real time while in preview mode or capturing, or by post-processing a recorded capture.

Adding and applying pixel masks

You can add pixel masks by freehand drawing with the Pixel Mask Tool in the 2D view window. The Pixel Mask Tool is activated by clicking the brush icon in the 2D view toolbar. Hover with the mouse above the Pixel Mask Tool icon to display a tooltip with the available mouse interactions. Once the Pixel Mask Tool is activated, the cursor is displayed as a paint brush and can be used for the following actions:

  • To add a masked area, click and hold the left mouse button and draw on the camera feed. Masked areas are indicated by a blue color.

  • To erase a masked area, hold the Shift key while drawing (the brush tip is shown in red when used as eraser).

  • To change the brush size, hold the Alt key (showing a ± symbol at the brush tip), and

    • Click and hold the left mouse button and drag left-to-right or vice versa to increase or decrease the brush size, or

    • Scroll up or down with the mouse wheel to increase or decrease the brush size.

Pixel masks can also be managed through the QTM Scripting Interface.

The way pixel masks are stored and applied depends on if QTM is in Preview mode or File mode.

  • Preview mode

    The pixel masks are stored for each camera in the project settings and applied in real time or during capturing. For applying the pixel masks in real time:

    1. Enable the Pre-process 2D data option under Project Options > Processing

    2. Make sure that the Pixel masks option is enabled on the 2D Preprocessing and filtering page.

  • File mode

    The pixel masks are stored for each camera in the file, and the file needs to be reprocessed to apply the masks.

    1. In the File reprocessing dialog, enable the Pre-process 2D data option.

    2. Make sure that the Pixel masks option is enabled on the 2D Preprocessing and filtering page.

    The 3D, 6DOF and skeleton data must also be reprocessed for the change to have any effect.

Filtering is applied to any markers that overlap with a masked area. Markers excluded by the filter are displayed with a white rectangular box around them, and are not used for any further tracking.

The position of pixel masks corresponds to the non-linearized view of the cameras. To correctly display the masked areas:

  1. Right-click in the 2D view window and open the 2D View settings dialog.

  2. Make sure the Show linearized data option is unchecked.

Undoing and removing pixel masks

Pixel masks can be removed in the following ways:

  • Hold the Shift key and draw with the mouse to locally erase masked areas.

  • Right-click with the mouse in the 2D view window and click Clear pixel mask for this camera or Clear pixel masks for all cameras.

To undo already applied pixel masks in a file, you need to reprocess the file with the Pre-process 2D data option enabled.

  • If you want to redo the filtering with modified pixel masks, make sure the Pixel masks option is enabled.

  • Alternatively, disable the Pixel masks option to undo the filtering entirely.

The 3D, 6DOF and skeleton data must also be reprocessed for the change to have any effect.

How to use marker size filtering

The 2D data can be filtered on the size of the markers. Set the minimum and/or maximum size in subpixels for the markers in the file with the options: Minimum marker size and Maximum marker size.

To apply the marker size filter, the file must be reprocessed with the Pre-process 2D data step enabled, and one or both of the Minimum marker size and Maximum marker size options enabled. Markers excluded by the filter are displayed with a white rectangular box around them in the 2D view, and the 2D data is not shown in the Data info window.

To undo the size filtering, reprocess the file with the Pre-process 2D data step enabled and the Minimum marker size and Maximum marker size options disabled.

If the marker size filter is changed when processing a file, the 3D, 6DOF and skeleton data must also be reprocessed for the change to have any effect.

How to use circularity filtering (Oqus only)

The circularity filter can be used to correct or delete bad or partially hidden markers. It is only available when the Marker circularity filtering option is enabled for the camera, see chapter Marker circularity filtering (Oqus only).

The quality of 3D data and how to use the filter depends a lot on the number of cameras in the system. If you have three or more cameras covering the same markers, it is usually better to try to remove the non-circular markers. Because then you have enough data to create the 3D data anyway. However, if there is usually just two cameras viewing the same markers the data can become more complete by correcting the non-circular markers. This will result in more 3D data, which otherwise cannot be calculated.

The filter has two options: Correct center point of non-circular markers and Discard non-circular markers.. One of the options must be selected for the 2D preprocessing. Use the following advice to set the settings for the different options.

  • Correct center point of non-circular markers

    Any markers that have been filtered out by the camera as non-circular will be fitted to a circle if possible and merged markers are also corrected.

    • Circularity level

      In this mode you can set the Circularity level, in the camera settings, depending on how many markers you have. Try to find a level where the camera has time to process the markers.

    • Effect on 3D data

      This mode will give you more exact 3D data than the unfiltered data, because the corrected markers have more exact center points than the camera data. It has most effect if only two cameras can see the marker. For example you can use this mode to improve the accuracy of the calibration, since the wand markers are partially hidden by the stick.

      Corrected merged markers are always used by the 3D tracker. Uncorrected non-circular markers will not be used by the 3D tracker if two other cameras with circular markers can see the marker.

  • Discard non-circular markers

    All markers that have been detected as non-circular by the camera are removed from the 3D tracker.

    • Circularity level

      Check the dark yellow markers in the 2D data to find out which markers are not used by the 3D tracker. Then set the level, in the camera settings, according to how much you want to delete.

    • Effect on 3D data

      This mode will give you less 2D data than the unfiltered data and actually most of the time it is better to try to correct the markers. The biggest advantage with this mode is that it is faster than correcting the markers. So if you have many cameras that can see each marker you will not loose much 3D data and it will also be more exact.

If you change this option when processing a file, you must also reprocess the 3D, 6DOF and skeleton data for the change to have any effect.