/
Calibrate cameras

Calibrate cameras

When you first connect up your Vicon system and start Vicon Shogun Live, notice that in both the System panel and in the Cameras view, icons give you feedback on the current status of the cameras. The cyan icons indicate that although the cameras are connected, they are not yet calibrated.

Tip
To make it easy to tell when cameras have been disconnected, camera views for disconnected cameras display a red border.

To calibrate your Vicon cameras, complete these procedures in this order:

With Shogun Live 1.6 and later, to avoid having to recalibrate the whole system when you make changes such as adding or moving some of the cameras, you can Calibrate or recalibrate selected cameras.

See also the Vicon video: 4 - Shogun Live - System Calibration.

Important - Before you begin camera calibration, ensure that:
  • Cameras have fully warmed up to a stable operating temperature. Vicon recommends a minimum 30–60 minute warm-up period. To ensure strobe activity, which can accelerate the warm-up period, connect up the Vicon system and run Vicon Shogun Live.
  • The Grayscale Mode for all cameras is set to Auto. To do this, in the System panel, click the Vicon Cameras heading to select all cameras and in the Optical Setup section below, change Grayscale Mode to Auto.

Mask cameras

You mask cameras, including supported video cameras, during camera calibration to eliminate any unwanted reflections in the capture volume, so that they are not mistaken for markers by the cameras. Before you start masking, you can see these reflections represented by light pixels in the Cameras views. During masking, blue pixels are drawn in the Cameras views, enabling you to see how much of the view is masked.

To mask reflections:

  1. Ensure you have removed any objects likely to cause reflections, such as the calibration device or markers, from the capture volume.
  2. To ensure the required panels are displayed, in the View settings , select System Setup.

  3. In the System panel, SHIFT+click or drag to ensure all the cameras are selected, including any video cameras in your Vicon system.
  4. If your Vicon system includes video cameras, in the Video Setup section, click Activate Video Calibration to start video calibration mode.

    If your system does not include video cameras, go straight to the next step.

  5. On the Camera Calibration tab, click Mask All.

    The button displays Stop and at the top of the workspace, Auto Mask Active is displayed.

    In the Cameras views, any video cameras are displayed as black, blank screens.

    Shogun Live starts recording the data visible to each of the connected cameras. Any camera masks created are displayed as blue cells in the Cameras views for affected cameras. If no data is visible to a particular camera, Shogun Live does not create any masks for it. Both optical and video cameras are masked.

  6. After about 5–10 seconds, select Stop Masking.
  7. In the Cameras view for each camera, ensure that any unwanted reflections are eliminated. (Each view should either be completely blank or should contain some blue pixels.)

When you've masked all the reflections, you can capture a wand wave.

If you need to add equipment or make other changes after you've finished masking, see Change masking.

Change masking

If you add equipment or markers into the volume after you’ve finished auto-masking, or if you have an issue with specific camera(s), you'll need to add to any masking that you've already completed. To do this, you can keep your original masking and use further auto-masking to add to it and/or manually paint out any additional reflections.

To add to existing auto-masking:

  1. To display the required panels, in the View settings , select System Setup.

  2. If you want to apply additional masking to only some cameras, make sure you've selected the relevant cameras.
  3. On the Camera Calibration tab, in the Masking section, ensure the advanced options are displayed and clear the Clear Previous Masks check box.

    This prevents your original masking from being overwritten.

  4. If you want to add the new masking to selected cameras only, in the Masking section, click Selected.

    The Selected button now displays Stop and Auto Mask Active is displayed at the top of the Workspace.

  5. When masking is complete, click Stop.

    In the Cameras views, notice the additional masking, which is displayed as blue cells.

To manually add masking:

  1. To display the required panels, in the View settings , click System Setup.

  2. In the Camera Calibration panel, go to the Masking section, display the advanced options and click Manual Mask Paint.

    Manual Mask Painting Active is displayed at the top of the Workspace.

  3. Use the following shortcuts to select and mask:
    • To select an area: Alt+click and drag.
    • To mask: Click the pencil icon next to the pin button or press Alt+E.

    • To erase masking: Select the masked area (see above) and click the eraser or press Alt+R.

  4. When you have finished manual masking, select Stop.

When you've masked all the reflections, you can capture a wand wave.

Capture a wand wave

During camera calibration, after you have masked any reflections, you calibrate the cameras by waving a wand (the calibration device) throughout the volume to enable the cameras to capture movements over the whole area.

Important
  • If you are calibrating one or more supported video cameras, the calibration device must be an Active Wand.
  • The minimum frame rate supported by the Active Wand is 50 Hz.

To capture a wand wave:

  1. In the Camera Calibration panel, go to the Wand Wave section, display the advanced options and in the wand list, ensure the type of wand that you are using is selected (this will normally be one of the Active Wand options).

  2. To start collecting wand data, click Wave All.
    The button displays Stop and in the menu bar, the text Camera Calibration Active is displayed, next to a flashing red circle.
  3. Have someone wave the wand throughout the capture volume, covering depth as well as height, while you watch the Cameras views for all cameras to ensure you get full coverage. Ensure that the markers (LEDs) on the wand remain visible to all the cameras as much as possible while the wand is moved throughout the volume.

    As an indication that sufficient wand wave data has been collected for a particular camera, the display in the each view changes from orange to blue.

  4. In the table in the bottom half of the Camera Calibration tab, notice that the Wand Count column changes from red to green as sufficient data per camera is captured. This helps you concentrate on waving the wand for cameras that need more data.

    (tick) Tip: By default, camera calibration stops automatically when each camera has seen enough of the wand to ensure calibration. To adjust this or turn it off, at the top right of the Camera Calibration tab, ensure the advanced options are displayed .

  5. In the Image Error column below, in addition to displaying the values, Shogun Live grades the status of each camera between red (poor) and green (excellent), depending on how much the cameras see the wand.
    In the volume, the display on Vicon optical cameras changes to indicate their calibration status:
    • Valkyrie, Vantage, Vero, Viper and ViperX cameras: The status lights turn magenta and blink during calibration, becoming green and then blue when fully calibrated.
    • Valkyrie and Vantage cameras only: In addition to the above changes, on the display, a progress bar indicates the fraction of the required wand data that has been received from the camera.

  6. When enough data has been collected, Shogun Live starts processing the wand wave data. Depending on the number of cameras and the length of your wand wave capture, this may take a few minutes. The progress bar indicates the calibration progress, and table below indicates the calibration results.

    In the Log, you are warned if your wand wave has insufficient spread across cameras to give a good calibration. The warning displays both the camera User ID (the number you can provide for the camera in the camera's properties, and URN (the Device ID, found in the camera's Advanced properties ).

  7. When the wand wave is finished, an .xcp and an .x2d file is created in C:\ProgramData\Vicon\Calibrations. If your calibration included Vicon video cameras, two x2d files are created. The files are:

    • LatestCalibration.x2d, which contains the wand wave without any Vicon video cameras

    • LatestCalibration_withVideo.x2d, which contains the wand wave including Vicon video cameras.

Note
After a wand wave, Vicon video cameras do not produce video files as they are not needed for calibration.

Set the volume origin

After you have captured a wand wave, you set the volume origin and axes so the cameras and volume in Shogun Live reflect the actual positions of the cameras in relation to the capture volume, as well as to each other.

  1. To enable you to see the axes in relation to the volume, in the Workspace, change the view to 3D View.

  2. Place the calibration device on the capture volume floor in the position you want the volume origin to be and in the orientation you want the axes to be (reflected in the axes displayed in the 3D View).

    • X: red line
    • Y: green line
    • Z: blue line
  3. In the Camera Calibration panel, to to the Wand Wave section, ensure the advanced options are displayed and in the wand list, ensure the appropriate Active Wand is selected.

    (tick) Tip: If you're working in a Y-up coordinate system, go to the Volume Setup section, display theAdvanced properties and select Legacy Y-Up Scene Orientation.

  4. In the Volume Setup section, click Start Set Origin.
    The button displays Set Origin.
  5. After a few seconds, click Set Origin.
  6. In the 3D View, display the View Filters and in the Volume options, ensure that Cameras is selected.

  7. In the 3D View, Perspective view, all of the cameras shift as a group, so the origin of the capture volume is aligned with the wand.

Set the origin with a custom L-frame

To improve calibration stability and consistency over time, you can use a custom L-frame to set the origin of your system.

As described in Set the volume origin, you can use a Vicon Active Wand to set up your volume coordinate system quickly and easily. However, using a larger, custom calibration object (in this case, markers embedded in the volume floor and/or wall) can improve calibration stability and consistency over time.

A typical way to use a custom L-frame would be to keep markers on a wall, hidden during camera masking, then when you're ready to set the coordinate system for your volume, make the markers visible and use the custom L-Frame as described in the following steps.

See also: Vicon Shogun 1.3 Live Tutorial - Custom L-Frame Workflow on YouTube.

To create a custom L-frame:

  1. With the system calibrated, set the origin as normal (see Set the volume origin), including setting the floor offset (see Set the floor plane), as required.
  2. Position a number of markers on the edge of the volume and select them.

  3. In the Tracking panel (displayed as a tab on the right in the Default layout), click the Setup tab, enter a name for the custom L-frame and click Create.

    The new custom L-frame prop is displayed in the 3D View.
  4. Pause the real-time and in the Tracking panel on the right, select the prop you just created.

  5. To display the Object Manipulator, press M. (For more information on the Object Manipulator, see Move props.) In the Workspace (3D View), the Object Manipulator is displayed.

  6. It is important to reset the object's position before exporting. In the Tracking panel on the right, ensure that the custom L-frame is still selected. Then set the Object Manipulator to Global and change all the values to zero, so the origin matches that of the L-frame. Click the activated buttons to reset the origin.

  7. In the Tracking panel, with the custom L-Frame selected, right-click and then select Export.

  8. Navigate to Users\Public\Documents\Vicon\CalibrationObjects and click Select Folder.

    The custom L-frame is automatically saved as a VSK.

To use the custom L-frame:

  1. Click the Play button or Exit Review to resume the real time.
  2. In the Camera Calibration panel, go to the Volume Setup section and ensure the advanced options are displayed .

  3. To the left of the wand list, ensure the Synchronize button is not selected .

  4. In the wand list, select the new custom L-frame.

  5. Click Set Origin. The new custom L-frame is used to set the origin.

Set the floor plane

The final stage in calibrating your Vicon cameras is to set the floor plane, using markers in the volume to automatically define it.

The position of the virtual floor that is derived during setting the origin is extrapolated from the position of the wand in relation to floor of the volume. As the wand is a small object compared with the size of the volume, any slight discrepancy from the wand being level has a large effect over the rest of the volume when you set the origin. To account for any discrepancy, you set a floor plane, which takes a much larger area into account, so that the virtual floor lines up correctly with the actual floor plane.

To set the floor plane:

  1. Ensure you have completed the rest of the camera calibration procedure and set the origin (see Set the volume origin).

  2. Turn off the calibration object or remove it from the volume.
  3. Place a minimum of four 14 mm Vicon markers across the floor of your capture volume.

    (If you are not using 14 mm markers or have changed the default 7 mm floor plane setting, see Adjust the Set Floor Plane settings.)

  4. On the Camera Calibration tab, go to the Volume Setup section, ensure the advanced options are displayed and click Start Set Floor Plane.
    The button displays Set Floor Plane.

  5. After a few seconds, click Set Floor Plane.
  6. In the 3D View, display the View Filters and in the Volume options, ensure that Cameras is selected.

    In the Perspective view, note that the cameras shift as a group slightly along one or more rotation axes to better reflect an average of the markers scattered across the floor, taking into account any offsets that you specified.

    In C:\ProgramData\Vicon\Calibrations, the LatestCalibration.xcp file is updated. This file is automatically used for every subsequent capture.

    (tick) Tip: To more accurately visualize the size of your volume in Shogun Live, you can change the size and shape of the floor grid. To do this, in the Camera Calibration panel, go to the Volume Setup section, ensure the advanced options are displayed and under Set Floor Grid, change the values (in mm) to give the required result.

Your Vicon cameras are now calibrated and ready to capture data.

Adjust the Set Floor Plane settings

If you are not using 14 mm markers, to enable you to set the floor plane accurately, select Advanced parameters , then select the ellipsis next to Start Set Floor Plane, and change the Height offset value to an appropriate value. The Height offset is the amount (in mm) by which to adjust the floor plane (the default is 7 mm). Because Shogun finds the centers of the markers, set a Height offset that accounts for the size of the markers (for example, for 14 mm markers, the Height offset is 7 mm). If the markers include a base, take this into account in your calculations.

Check video overlay

If your system includes supported video cameras, after you have completed the other steps in Calibrate cameras, you can check that your video calibration is accurate by viewing a video overlay.

To check a video overlay:

  1. In the System panel, expand the Video Cameras section and select one or more video cameras.

    The Cameras view displays the video data for the selected video camera(s).

  2. In the Cameras view, select View Filters and in the 3D Data section, select the 3D option.

    In the view pane, a 3D overlay is displayed. Because this displays a flat overlay on a 3D View, the edges appear distorted.

  3. To remove the distorted appearance, select Distort 3D.

    The 3D perspective is flattened to match the video.

  4. Check that the video of the markers and the 3D perspective line up accurately.

    (tick) Tip: To check your calibration, from View Filters, under Data, select Camera Rays. If you select one or more cameras, this displays lines (rays) to everything the selected camera(s) can see. If you select one or more markers, this option displays lines from all cameras that can see the selected marker(s).

Auto number cameras (optional)

The Auto Number Cameras feature numbers the currently connected Vicon cameras in ascending order, according to their position in the capture volume. You may want to do this after you calibrate your Vicon system, so that your cameras are logically numbered before you begin capture.

Automatic numbering starts with the camera that is furthest from the volume origin. The cameras are then numbered in a clockwise direction around the volume. If your cameras are positioned at different levels, the cameras in the level that contains the most cameras are numbered first.

To automatically number Vicon cameras:

  1. Ensure that the cameras are positioned as required and that you have calibrated the cameras and set the volume origin (see Calibrate cameras).
  2. To enable you to check the camera numbering for all cameras, in the System panel, ensure that you can see the list of Vicon cameras.
  3. In the Camera Calibration panel, go to the Volume Setup section, ensure the advanced options are displayed , and in the Auto Number Cameras section, select Auto Number Cameras.

    The cameras are automatically numbered in ascending order, according to their position in the volume.

    In C:\ProgramData\Vicon\Calibrations, the LatestCalibration.xcp file is updated.

  4. In the volume, check that the cameras are now numbered as required.

Related content


© Copyright Vicon Motion Systems. All rights reserved.

Vicon trademarks