PanTiltZoom camera tracking
→
Return to Tracking Configuration
Introduction
The PTZ-Tracking is based on so called pan-tilt-zoom cameras. The tracking provides the current orientation of the camera in terms of pan and tilt using Sony's PTZ protocol. Note, that in the folder
<UnifeyeInstallationDirectory>/examples/UnifeyeSDK-DemoHTML/PTZ-Test, there is an example HTML page showing how to control (pan, tilt, zoom) a connected PTZ-camera programmatically (as this needs to be done fully via means of
ConfigurableModule and
ConfigurableProperty).
Configuration
The XML sample below specifies the content of the PTZ configuration file.
- In the Sensor section a
Sensor of type VISCASensorSource has to be defined with a unique SensorID.
- The
Parameters section defines parameters which are specific for PTZ Tracking, such as
-
Com: COM port to which the camera control wire is connected to the PC
-
Baud: baud rate for the camera COM interface
-
DeviceID
-
Type: D70 and D100 are possible types of Sony PTZ camera types that can be configured. D70 devices provide movement/tracking updates while rotating to a new position (standard case) whereas D100 devices can only be navigated to one position without delivering intermediate tracking updates.
- Then a
SensorCOS has to be added for the camera.
- A
SensorCOS consists of a unique SensorCOSID. No further parameters are needed.
<?xml version="1.0"?>
<TrackingData>
<Sensors>
<Sensor type="VISCASensorSource">
<SensorID>Visca1</SensorID>
<Parameters>
<VISCAParameters>
<Com>COM1</Com>
<Baud>9600</Baud>
<DeviceID>1</DeviceID>
<Type>D70</Type>
</VISCAParameters>
</Parameters> <!-- Sensor specific parameters -->
<SensorCOS>
<SensorCosID>VISCA</SensorCosID>
<Parameters></Parameters>
</SensorCOS>
</Sensor>
</Sensors>
<Connections>
<COS>
<Fuser type="BestQualityFuser">
<Parameters></Parameters>
</Fuser>
<!-- Es gibt 1-n SensorCoses -->
<SensorSource trigger="1">
<SensorID>Visca1</SensorID> <!-- Who tracks... -->
<SensorCosID>VISCA</SensorCosID> <!-- what? -->
<HandEyeCalibration>
<TranslationOffset>
<x>0.0</x>
<y>0.0</y>
<z>0.0</z>
</TranslationOffset>
<RotationOffset>
<x>0.0</x>
<y>0.0</y>
<z>0.0</z>
<w>1.0</w>
</RotationOffset>
</HandEyeCalibration>
<COSOffset>
<TranslationOffset>
<x>0.0</x>
<y>0.0</y>
<z>-5000.0</z>
</TranslationOffset>
<RotationOffset>
<x>0.0</x>
<y>0.0</y>
<z>0.0</z>
<w>1.0</w>
</RotationOffset>
</COSOffset>
</SensorSource>
</COS>
</Connections>
</TrackingData>
Using PTZ tracking configuration files
To activate PTZ tracking within the Unifeye SDK you simply have to load an according tracking configuration file and use the API function setTrackingData() (see
http://doxygen.metaio.com/UnifeyeSDK/UnifeyeSDK_doxygen/group__Configuration.html). You can also load the according tracking configuration file within the Unifeye GUI using the Tracking Configuration Tool.
→
Return to Tracking Configuration
--
SupportMetaio - 2011-01-21