Camera Calibration
→
Return to Overview
Every camera has several internal parameters (so called intrinsic paramaters) defined by the optical system (e.g. camera chip, camera lens, etc.). For getting a high quality and accurate tracking and augmentation a camera calibration is recommended. This includes parameters like focal length or distortion values. If you want to achieve highly accurate augmentations, you should provide such parameters the camera you want to use. However in an online case it is almost impossible to provide a camera calibration for all potential cameras. That's why calibration is an optional step for the Unifeye Viewer. You do not have to provide a camera calibration in order to get the tracking to work. Default values will be used internally if you omit this step. However if you use it, augmentation will be better and usually more stable.
Unifeye Viewer does not provide tools for creating camera calibration files (as usually they are not used in online cases). You can measure the intrinsic parameters of the camera by using tools provided by Unifeye SDK or Unifeye Design (e.g the Sextant tool) if needed.
Remarks for Shockwave
The Unifeye Viewer Xtra requires an image/frame source for tracking. In order to neutralize the intrinsic properties of the camera, you can use the Unifeye Viewer Xtra method "setCameraParameters()" and set the camera property of Shockwave 3D called "fov" (field-of-view).
The camera parameters passed to "setCameraParameters()" can vary for different cameras and need to be measured. You do not necessarily need to call "setCameraParameters()" for an augmentation. The Unifeye Viewer Xtra will automatically be initialized with parameters that work well for most cameras. If you do use "setCameraParameters()" please note that if you specify undistortion values different from 0, an undistortion of the image will occur. This task consumes some processing power and can be omitted for usual webcam scenarios by specifying 0 as undistortion values.
Besides calling "setCameraParameters()", it is mandatory to setup the virtual 3D camera of the Shockwave 3D renderer. You should always reset it’s position and rotation to (0,0,0) and setup its field-of-view. The field-of-view can be calculated from the width and height of the output image of the currently active webcam. Please refer to the example applications for details regarding this process.
Remarks for Flash
The Unifeye Viewer SWC file for Flash always uses default parameters for the camera calibration currently. Please note that for getting an appropriate augmentation also setting the virtual 3D camera of the used Flash renderer (e.g. Papervision) is vital. This includes the position (which should be set to (0,0,0)), the rotation and the field of view. The field of view can be calculated from the width and height of the image of the currently active webcam.
Scene Setup
- Camera
- Locate it at the origin.
- Look straight down the negative space of the z-axis (e.g.: lookAt(0,0,-1)).
- Set it's (vertical) field-of-view to
21.8805748 degrees (valid from version 3.1 on).
- Important: The tracking pose refers to coordinate system according to the right-hand rule. If the 3d-engine uses a left-hand oriented system instead you either have to mirror its output or transform the tracking pose accordingly.
- Objects
- Create a container node as parent for your scene's objects.
- Apply the pose from the tracking to that container node.
- If the 3d-engine does not allow direct manipulation of the object's matricies, then decompose the pose matrix and apply the values for rotation and translation to your object container manually.
Please refer to the example applications for further details.
→
Return to Overview
--
SupportMetaio - 2010-08-12