NEW!  Version 3 of iPi Motion Capture is available. iPi Motion Capture 3 delivers new features for improved workflow including support of Kinect 2, improved arms tracking, simplified calibration and others. Read more >>

This documentation corresponds to version 2 of iPi Motion Capture. The latest documentation for version 3 can be found at https://docs.ipisoft.com/

Calibration

From iPiSoft Wiki
(Difference between revisions)
Jump to: navigation, search
(Created page with 'Calibration is the process of computing accurate camera positions and orientations from a video of user waving a small glowing object (called “marker”). This step is essentia…')
 
(Step 2: Record calibration video)
 
(28 intermediate revisions by 4 users not shown)
Line 1: Line 1:
Calibration is the process of computing accurate camera positions and orientations from a video of user waving a small glowing object (called “marker”). This step is essential and required for multi-camera system setup.
+
{{:Calibration Definition}}
  
VERY IMPORTANT: Once you calibrated the camera system, you should not move your cameras for subsequent video shoots. If you move at least one camera, you need to perform calibration again.
+
=== Importance of high frame rate ===
  
== Glowing Marker ==
+
You should record calibration video at the same resolution as your action video and at the same (or higher) frame rate.
 +
 
 +
Calibration at a different resolution may lead to reduced accuracy because cameras usually have different minor distortions at different resolutions (caused by internal scaling algorithm).
 +
 
 +
Calibration at low frame rate may lead to reduced accuracy because of increased synchronization errors.
 +
 
 +
=== Glowing Marker ===
  
 
Mini Maglite flashlight is recommended for calibration. This is a very common flashlight in US and many other countries. Removing flashlight reflector converts it into an ideal glowing marker easily detectable by motion capture software.  
 
Mini Maglite flashlight is recommended for calibration. This is a very common flashlight in US and many other countries. Removing flashlight reflector converts it into an ideal glowing marker easily detectable by motion capture software.  
+
 
 +
[[Image:Maglite.jpg]]
 +
 
 
If you cannot get a Mini Maglite, you can use some other similar flashlight.  
 
If you cannot get a Mini Maglite, you can use some other similar flashlight.  
  
== Step 1: Running iPi Recorder in calibration mode ==
+
[[Image:Noname_flashlight.jpg|250px]]
 +
 
 +
=== Step 1: Running [[iPi Recorder]] in calibration mode ===
 +
 
 +
Run [[iPi Recorder]] and choose one of the darkening modes in "darkening for calibration" list (for Sony PS Eye cameras)
 +
 
 +
[[File:calibration-darkening.png]]
 +
 
 +
or set Exposure to reasonably small value (for DirectShow-compatible web cameras)
 +
 
 +
[[File:calibration-exposure.png]]
  
Run iPiRecorder and turn on Calibration mode checkbox (for Sony PS Eye cameras) or set Exposure to reasonably small value (for DirectShow-compatible web cameras).
 
 
 
This is important because it helps to reduce motion blur during calibration.  
 
This is important because it helps to reduce motion blur during calibration.  
 +
 
Video will look dim in calibration mode.
 
Video will look dim in calibration mode.
  
Important: Do not turn off the light in the room during calibration! This will not help the software but will make it harder for you to see what is happening on recorded video when you view it later.  
+
:'''Important!''' Do not turn off the light in the room during calibration! This will not help the software but will make it harder for you to see what is happening on recorded video when you view it later.
  
== Step 2: Record calibration video ==
+
=== Step 2: Record calibration video ===
  
 
Start video recording.
 
Start video recording.
First couple of seconds of calibration video should contain background only (no marker).
 
Then move slowly the marker through your entire capture volume (front-top-right-bottom-left-back-top-right-bottom-left).  Start from top and move the marker in a descending spiral motion.
 
  
Put the marker to the ground at each corner and at the center of capture volume.
+
Move the marker slowly through your entire capture volume (front-top-right-bottom-left-back-top-right-bottom-left).  Start from top and move the marker in a descending spiral motion.
  
== Step 3: stop recording and check recorded video ==
+
'''Tip.''' The exact trajectory of the marker is not so important, just try to cover the whole capture volume, or at least its perimeter.
 +
 
 +
'''Tip.''' For successful calibration, several hundred frames are sufficient. Much more frames (like several thousands) will not produce more accurate results, but instead will increase the processing time and possible number of marker detection errors. So generally it is not recommended to record calibration videos of more than 1 minute length.
 +
 
 +
'''Tip.''' You should make the marker visible to as much cameras as possible at all times. Hold the marker in the straight arm away from your body. In a circle configuration, when approaching the boundary of the capture area, position the marker inside the area, and your body outside.
 +
 
 +
[[File:Calibration1.jpg]]
 +
 
 +
[[File:Calibration2.jpg]]
 +
 
 +
[[File:Calibration3.jpg]]
 +
 
 +
Put the marker to the ground at each corner and at the center of capture volume. At least 4-5 ground points are needed for the correct detection of the groundplane.
 +
 
 +
[[File:Calibration_ground1.jpg]]
 +
 
 +
[[File:Calibration_ground2.jpg]]
 +
 
 +
=== Step 3: stop recording and check recorded video ===
  
* First two seconds of video do not contain marker
 
 
* There is no significant motion blur (image of marker looks like a round spot rather than an ellipse or a luminescent line)
 
* There is no significant motion blur (image of marker looks like a round spot rather than an ellipse or a luminescent line)
 
* Most of the time marker is visible in at least 3 cameras and not completely obscured by human body
 
* Most of the time marker is visible in at least 3 cameras and not completely obscured by human body
  
== Step 4: Take note of height of your first camera over the ground. ==
+
=== Step 4: Take note of height of your first camera over the ground. ===
 
   
 
   
 
Take note of height of your first camera over the ground. You will need this parameter later. If you cannot measure this height accurately, then at least make a rough estimation.
 
Take note of height of your first camera over the ground. You will need this parameter later. If you cannot measure this height accurately, then at least make a rough estimation.
  
== Step 5: process calibration video in iPiStudio ==
+
=== Step 5: process calibration video in [[iPi Mocap Studio]] ===
  
 
Strictly speaking, you can postpone processing calibration video until after you finished recording other videos (e.g. your action videos). However, it is a good idea to process your calibration video as soon as it was recorded because it helps you ensure that you have good calibration. (Later on, incorrectly recorded calibration video may affect your ability to process action videos. )
 
Strictly speaking, you can postpone processing calibration video until after you finished recording other videos (e.g. your action videos). However, it is a good idea to process your calibration video as soon as it was recorded because it helps you ensure that you have good calibration. (Later on, incorrectly recorded calibration video may affect your ability to process action videos. )
  
 
To process calibration video please do the following:  
 
To process calibration video please do the following:  
* Load your calibration video to iPiStudio
+
* Load your calibration video to [[iPi Mocap Studio]]
* VERY IMPORTANT: Adjust the Region of Interest to cover the part of video that contains the glowing marker.
+
* '''Important.''' Adjust the Region of Interest to cover the part of video that contains the glowing marker.
 
* Set the Diagonal Field of View (FOV) for your cameras on the “Scene” tab. If you use Sony PlayStation Eye or Logitech QuickCam 9000 cameras, leave the FOV value at the default 75 degrees.  
 
* Set the Diagonal Field of View (FOV) for your cameras on the “Scene” tab. If you use Sony PlayStation Eye or Logitech QuickCam 9000 cameras, leave the FOV value at the default 75 degrees.  
* Set initial positions of cameras. Move and rotate virtual cameras so that their positions and orientations very roughly correspond to real positions and orientations. Click “Calibrate” button on “Calibration” tab and wait while the system finishes calibration.  
+
* Go to “Calibration” tab. Check “Auto detect initial camera positions” checkbox. Click “Calibrate” button and wait while the system finishes calibration.
* Calibration algorithm may occasionally fail to find correct camera position. In particular, this may happen if left and right cameras are swapped. If this happens, move virtual cameras using camera orbit control on “Scene” tab and click “Calibrate” again. This will cause calibration (but not marker tracking) to be repeated.
+
* Calibration algorithm may occasionally fail to find correct camera positions. If this happens, you should manually adjust initial camera positions to roughly match your configuration. The main thing is the correct order of the cameras around the capture area, and their approximate view directions.
 +
** Reset camera positions with one of the standard half-circle or full circle configurations that best suits your configuration.
 +
** For each camera that requires adjusting, switch to this camera using the toolbar button, and correct its position using controls on the “Scene” tab.
 +
** Uncheck “Auto detect initial camera positions” checkbox.
 +
** Click “Calibrate” button. This will rerun calibration process, without recomputing marker positions.
 +
 
 +
Follow video tutorial:
 +
 
 +
<html><iframe title="YouTube video player" width="640" height="390" src="http://www.youtube.com/embed/bko8gPKhOaE" frameborder="0" allowfullscreen></iframe></html>
  
Follow video tutorial: [http://www.youtube.com/watch?v=bko8gPKhOaE Calibration Tutorial]
 
  
 
Resulting scene should look like this:
 
Resulting scene should look like this:
+
 
 +
[[File:Calibration_result1.jpg]]
 +
 
 
Green points designate correctly detected 3D marker positions.  
 
Green points designate correctly detected 3D marker positions.  
 
Red points designate misdetected marker positions.  
 
Red points designate misdetected marker positions.  
 
10-20% of red points should be considered normal. Calibration is good if you have at least 70% of green points.
 
10-20% of red points should be considered normal. Calibration is good if you have at least 70% of green points.
  
== Step 6: Define ground plane ==
+
'''Tip.''' When doing manual camera positioning before the calibration, you may find useful to match model's position with the actor on a video:
 +
* Select the frame where the actor is standing relatively straight.
 +
* Show the model by checking the "View > Skin" menu item.
 +
* Adjust the camera position to fit the model with the actor's image.
 +
 
 +
=== Step 6: Define ground plane ===
  
 
You need at least 3 points in 3D space to define ground plane. For each point, click on it in 3D view and press “Mark as ground” button.
 
You need at least 3 points in 3D space to define ground plane. For each point, click on it in 3D view and press “Mark as ground” button.
 
+
 
 +
[[File:Calibration_ground3.png]]
 +
 
 +
[[File:Calibration_ground4.png]]
 +
 
 
WARNING: If you do not mark ground points then the ground plane is incorrect and there is no sense in using Foot tracking option and camera heights values.
 
WARNING: If you do not mark ground points then the ground plane is incorrect and there is no sense in using Foot tracking option and camera heights values.
  
== Step 7: Set scene scale using camera height as reference ==
+
=== Step 7: Set scene scale using camera height as reference ===
  
 
Now cameras in your scene are properly oriented relative to other cameras and relative to ground plane. But you still need to find one more parameter: scene scale.  
 
Now cameras in your scene are properly oriented relative to other cameras and relative to ground plane. But you still need to find one more parameter: scene scale.  
 +
 
Use camera #1 height over ground to set correct scene scale.  
 
Use camera #1 height over ground to set correct scene scale.  
 +
 +
[[File:Calibration_scale1.png]]
 
   
 
   
 
Note: Height of camera can only be used if ground plane is properly defined. If ground plane is not defined, you can use distance between camera #1 and #2 to set scene scale.
 
Note: Height of camera can only be used if ground plane is properly defined. If ground plane is not defined, you can use distance between camera #1 and #2 to set scene scale.
 
  
 +
[[File:Calibration_scale2.png]]
 +
 +
=== Step 8: Save calibration result into *.scene.xml file ===
  
== Step 8: Save calibration result into *.scene.xml file ==
+
[[File:Calibration_xml.png]]

Latest revision as of 12:05, 2 June 2014

Calibration is a process of computing accurate camera positions and orientations from a video of user waving a small glowing object called marker (for color/color+depth cameras) or a slim rectangular board called calibration board (for depth sensors). This step is essential and required for multi-camera system setup.

Important. Once you calibrated the camera system, you should not move your cameras for subsequent video shoots. If you move at least one camera, you need to perform calibration again.

Contents

Importance of high frame rate

You should record calibration video at the same resolution as your action video and at the same (or higher) frame rate.

Calibration at a different resolution may lead to reduced accuracy because cameras usually have different minor distortions at different resolutions (caused by internal scaling algorithm).

Calibration at low frame rate may lead to reduced accuracy because of increased synchronization errors.

Glowing Marker

Mini Maglite flashlight is recommended for calibration. This is a very common flashlight in US and many other countries. Removing flashlight reflector converts it into an ideal glowing marker easily detectable by motion capture software.

Maglite.jpg

If you cannot get a Mini Maglite, you can use some other similar flashlight.

Noname flashlight.jpg

Step 1: Running iPi Recorder in calibration mode

Run iPi Recorder and choose one of the darkening modes in "darkening for calibration" list (for Sony PS Eye cameras)

Calibration-darkening.png

or set Exposure to reasonably small value (for DirectShow-compatible web cameras)

Calibration-exposure.png

This is important because it helps to reduce motion blur during calibration.

Video will look dim in calibration mode.

Important! Do not turn off the light in the room during calibration! This will not help the software but will make it harder for you to see what is happening on recorded video when you view it later.

Step 2: Record calibration video

Start video recording.

Move the marker slowly through your entire capture volume (front-top-right-bottom-left-back-top-right-bottom-left). Start from top and move the marker in a descending spiral motion.

Tip. The exact trajectory of the marker is not so important, just try to cover the whole capture volume, or at least its perimeter.

Tip. For successful calibration, several hundred frames are sufficient. Much more frames (like several thousands) will not produce more accurate results, but instead will increase the processing time and possible number of marker detection errors. So generally it is not recommended to record calibration videos of more than 1 minute length.

Tip. You should make the marker visible to as much cameras as possible at all times. Hold the marker in the straight arm away from your body. In a circle configuration, when approaching the boundary of the capture area, position the marker inside the area, and your body outside.

Calibration1.jpg

Calibration2.jpg

Calibration3.jpg

Put the marker to the ground at each corner and at the center of capture volume. At least 4-5 ground points are needed for the correct detection of the groundplane.

Calibration ground1.jpg

Calibration ground2.jpg

Step 3: stop recording and check recorded video

  • There is no significant motion blur (image of marker looks like a round spot rather than an ellipse or a luminescent line)
  • Most of the time marker is visible in at least 3 cameras and not completely obscured by human body

Step 4: Take note of height of your first camera over the ground.

Take note of height of your first camera over the ground. You will need this parameter later. If you cannot measure this height accurately, then at least make a rough estimation.

Step 5: process calibration video in iPi Mocap Studio

Strictly speaking, you can postpone processing calibration video until after you finished recording other videos (e.g. your action videos). However, it is a good idea to process your calibration video as soon as it was recorded because it helps you ensure that you have good calibration. (Later on, incorrectly recorded calibration video may affect your ability to process action videos. )

To process calibration video please do the following:

  • Load your calibration video to iPi Mocap Studio
  • Important. Adjust the Region of Interest to cover the part of video that contains the glowing marker.
  • Set the Diagonal Field of View (FOV) for your cameras on the “Scene” tab. If you use Sony PlayStation Eye or Logitech QuickCam 9000 cameras, leave the FOV value at the default 75 degrees.
  • Go to “Calibration” tab. Check “Auto detect initial camera positions” checkbox. Click “Calibrate” button and wait while the system finishes calibration.
  • Calibration algorithm may occasionally fail to find correct camera positions. If this happens, you should manually adjust initial camera positions to roughly match your configuration. The main thing is the correct order of the cameras around the capture area, and their approximate view directions.
    • Reset camera positions with one of the standard half-circle or full circle configurations that best suits your configuration.
    • For each camera that requires adjusting, switch to this camera using the toolbar button, and correct its position using controls on the “Scene” tab.
    • Uncheck “Auto detect initial camera positions” checkbox.
    • Click “Calibrate” button. This will rerun calibration process, without recomputing marker positions.

Follow video tutorial:


Resulting scene should look like this:

Calibration result1.jpg

Green points designate correctly detected 3D marker positions. Red points designate misdetected marker positions. 10-20% of red points should be considered normal. Calibration is good if you have at least 70% of green points.

Tip. When doing manual camera positioning before the calibration, you may find useful to match model's position with the actor on a video:

  • Select the frame where the actor is standing relatively straight.
  • Show the model by checking the "View > Skin" menu item.
  • Adjust the camera position to fit the model with the actor's image.

Step 6: Define ground plane

You need at least 3 points in 3D space to define ground plane. For each point, click on it in 3D view and press “Mark as ground” button.

Calibration ground3.png

Calibration ground4.png

WARNING: If you do not mark ground points then the ground plane is incorrect and there is no sense in using Foot tracking option and camera heights values.

Step 7: Set scene scale using camera height as reference

Now cameras in your scene are properly oriented relative to other cameras and relative to ground plane. But you still need to find one more parameter: scene scale.

Use camera #1 height over ground to set correct scene scale.

Calibration scale1.png

Note: Height of camera can only be used if ground plane is properly defined. If ground plane is not defined, you can use distance between camera #1 and #2 to set scene scale.

Calibration scale2.png

Step 8: Save calibration result into *.scene.xml file

Calibration xml.png

Personal tools