Format of Camera and Pose XML Sequence File

The data folder in the File Driver sample contains a sequence (XML) file which encodes camera frame and pose information. The following table describes the structure of the XML sequence file:

Tags Attribute(s) Description
Sequence version The version number for the sequence file. The current version is 2.0.
This version is not backward compatible.
CameraCapture   loop The number of times the sequence will be played. Use -1 to specify an infinite playback loop. This is an optional attribute. By default, a sequence will be played only once unless the loop attribute provides the count.
fps Camera fps
pixelFormat Camera frame format (e.g. YUYV)
Intrinsics** w Camera frame width
h Camera frame height
fx Focal length x
fy Focal length y
px Principal point x
py Principal point y
rd Radial distortion values, r0 ~ r7 separated by ','
Elements   source='camera' The top level container for <Element> tag(s). The source is a mandatory attribute and, currently, it should be set to camera.

Element

 

 

  timestamp Timestamp for enclosed frame / pose and should be in nanoseconds.
  presTimestamp Optional attribute that controls how frames are rendered.
Frame   filename The frame filename. All camera frames (files) are stored in FileDriver/data/Camera/
Intrinsics   The per frame intrinsics (if available). Per frame intrinsics contain a comma separated width, height, principal point x, principal point y, focal length x, focal length y and radial distortion values r0 ~ r7.
Pose   x Translation values
y
z
r0 3*3 rotation values
r1
r2
r3
r4
r5
r6
r7
r8
TrackableStatus Validity Corresponds to TrackableResult::STATUS exposed by Vuforia DeviceTracker
Info Corresponds to TrackableResult::STATUS_INFO exposed by Vuforia DeviceTracker

**All the Intrinsics attributes listed are globally available and can be overridden by per frame Intrinsics tags.

NOTE: Attribute values that are not available (e.g., radial distortion, extrinsics, pose rotation and per frame intrinsic) should be set to 0.0f

Example: Sequence File

<?xml version='1.0' encoding='UTF-8'?>
<Sequence version = '2.0'>
<CameraCapture loop='2' fps='30.00' pixelFormat='YUYV' >
    <Intrinsics w='640' h='480' fx='506.724396' fy='504.880859' px='319.880646' py='239.459396'
rd='0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000' />
</CameraCapture>
<Elements source='camera'>
    <Element timestamp='481771871356193' presTimestamp='481771871356193' >
    <Frame filename='camera_frame_0000.png' > 
        <Intrinsics w='640' h='480' fx='506.724396' fy='504.880859' px='319.880646' py='239.459396'
rd='0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000' />
    </Frame>
    <Pose x='0.138495' y='0.516533' z='-0.281780' r0='0.999009' r1='-0.035182' r2='0.027262'
r3='-0.030745' r4='-0.102592' r5='0.994248' r6='-0.032183' r7='-0.994101' r8='-0.103572' > 
        <TrackableStatus validity='VALID' info='VALID' />
    </Pose>
</Element>
.......
......
</Elements>
</Sequence>