Jump to: navigation, search

Difference between revisions of "Panohead XML data file"

(RelaxNG validation)
 
(19 intermediate revisions by 2 users not shown)
Line 7: Line 7:
 
There are several commercial complete panoheads (Gigapan, Rodeon...) wich generate a data file containing all shooting positions.
 
There are several commercial complete panoheads (Gigapan, Rodeon...) wich generate a data file containing all shooting positions.
  
The free project [http://trac.gbiloba.org/papywizard Papywizard], build arround a Merlin/Orion astronomic mount and which turns it into a panormaic head, is also able to generate such file.
+
The free project [http://www.papywizard.org Papywizard], build around a Merlin/Orion astronomic mount and which turns it into a panoramic head, is also able to generate such file.
  
 
''What about Klaus & Josef controller?''
 
''What about Klaus & Josef controller?''
Line 13: Line 13:
 
'''Autopano Pro''' is able to read such files, to correctly place orphan images, images without control points, often found in hi-resolution panos with deep blue sky.
 
'''Autopano Pro''' is able to read such files, to correctly place orphan images, images without control points, often found in hi-resolution panos with deep blue sky.
  
It could be very usefull to build some sort of '''standard'''. This standard should take into account all teh specificities of current formats, to be usable in all cases, and should be evolutive, to incorporate future hardware features.
+
It could be very useful to build some sort of '''standard'''. This standard should take into account all the specifities of current formats, to be usable in all cases, and should be evolutive, to incorporate future hardware features.
  
 
== Choices ==
 
== Choices ==
Line 21: Line 21:
 
Papywizard project already generates such format, so will be used as base. On the other hand, all modifications and propositions described here will be implemented in Papywizard, and supported by Autopano Pro.
 
Papywizard project already generates such format, so will be used as base. On the other hand, all modifications and propositions described here will be implemented in Papywizard, and supported by Autopano Pro.
  
== Description ==
+
== Current version ==
 +
 
 +
Current version is 'c'.
  
 
=== General ===
 
=== General ===
Line 27: Line 29:
 
This file is split in two parts: a header ('''<header>''' tag), containing general informations, and a section, containing the list of all shooting positions ('''<shoot>''' tag).
 
This file is split in two parts: a header ('''<header>''' tag), containing general informations, and a section, containing the list of all shooting positions ('''<shoot>''' tag).
  
The exact content of the header depends of the shoting mode.
+
The exact content of the header depends of the shooting mode.
  
 
In the ''shoot'' section, each image contains a unique identifier, the '''id''' attribute, which is a simple integer, starting to 1. When mulitple exposures are made at the same position (exposure bracketing, mirror lockup...), the '''bracket''' attribute is incremented, then reset to 1 at the next position.
 
In the ''shoot'' section, each image contains a unique identifier, the '''id''' attribute, which is a simple integer, starting to 1. When mulitple exposures are made at the same position (exposure bracketing, mirror lockup...), the '''bracket''' attribute is incremented, then reset to 1 at the next position.
Line 49: Line 51:
 
|[headOrientation]||Head orientation, in ('''up''', '''left''', '''right''', '''down''')
 
|[headOrientation]||Head orientation, in ('''up''', '''left''', '''right''', '''down''')
 
|-
 
|-
|[cameraOrientation]||Camera orientation, in ('''portrait''', '''landscape''', '''custom''')||the ''<pict><position>roll'' attribute contains the real angle
+
|[cameraOrientation]||Camera orientation, in ('''portrait''', '''landscape''', '''custom''')||the ''roll'' attribute contains the real angle '''relative to the head'''
 
|-
 
|-
|[intent]||Intent of the bracketing, in ('''exposure''', '''focus''', '''white balance''', '''movement''')
+
|[ratio]||Ratio of the sensor, in ('''3:2''', '''4:3''', '''5:4''', '''16:9''')
|-
+
|[ratio]||Ratio of the sensor, in ('''3:2''', '''4:3''', '''5:4''')
+
 
|-
 
|-
 
|[lensType]||Type of the lens, in ('''rectilinear''', '''fisheye''')
 
|[lensType]||Type of the lens, in ('''rectilinear''', '''fisheye''')
Line 59: Line 59:
  
 
   <?xml version="1.0" encoding="utf-8"?>
 
   <?xml version="1.0" encoding="utf-8"?>
   <papywizard version="a">
+
   <papywizard version="b">
 
       <header>
 
       <header>
 
           <general>
 
           <general>
Line 70: Line 70:
 
               <cameraOrientation>[cameraOrientation]</cameraOrientation>
 
               <cameraOrientation>[cameraOrientation]</cameraOrientation>
 
               <stabilizationDelay>[float]</stabilizationDelay>
 
               <stabilizationDelay>[float]</stabilizationDelay>
 +
              <counter>[int]</counter>
 
               <startTime>[dateTime]</startTime>
 
               <startTime>[dateTime]</startTime>
 
               <endTime>[dateTime]</endTime>
 
               <endTime>[dateTime]</endTime>
Line 75: Line 76:
 
           <camera>
 
           <camera>
 
               <timeValue>[float]</timeValue>
 
               <timeValue>[float]</timeValue>
               <bracketing nbPicts="[int]" intent="[intent]"/>
+
               <bracketing nbPicts="[int]"/>
 
               <sensor coef="[float]" ratio="[ratio]"/>
 
               <sensor coef="[float]" ratio="[ratio]"/>
 
           </camera>
 
           </camera>
 
           <lens type="[lensType]">
 
           <lens type="[lensType]">
               <focal>[float]</focal> rectilinear only
+
               <focal>[float]</focal>
 
           </lens>
 
           </lens>
 
    
 
    
Line 104: Line 105:
 
     <element name="papywizard"  xmlns="http://relaxng.org/ns/structure/1.0"  datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
 
     <element name="papywizard"  xmlns="http://relaxng.org/ns/structure/1.0"  datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
 
         <attribute name="version">
 
         <attribute name="version">
             <value>a</value>
+
             <value>c</value>
 
         </attribute>
 
         </attribute>
 
         <element name="header">
 
         <element name="header">
Line 142: Line 143:
 
                 <element name="stabilizationDelay">
 
                 <element name="stabilizationDelay">
 
                     <data type="float" />
 
                     <data type="float" />
 +
                </element>
 +
                <element name="counter">
 +
                    <data type="int" />
 
                 </element>
 
                 </element>
 
                 <element name="startTime">
 
                 <element name="startTime">
 
                     <data type="string">
 
                     <data type="string">
                         <param name="pattern">\d{4}-\d{2}-\d{2}_\d{2}h\d{2}m\d{2}s</param>
+
                         <param name="pattern">\s*\d{4}-\d{2}-\d{2}_\d{2}h\d{2}m\d{2}s\s*</param>
 
                     </data>
 
                     </data>
 
                 </element>
 
                 </element>
 
                 <element name="endTime">
 
                 <element name="endTime">
 
                     <data type="string">
 
                     <data type="string">
                         <param name="pattern">\d{4}-\d{2}-\d{2}_\d{2}h\d{2}m\d{2}s</param>
+
                         <param name="pattern">\s*\d{4}-\d{2}-\d{2}_\d{2}h\d{2}m\d{2}s\s*</param>
 
                     </data>
 
                     </data>
 
                 </element>
 
                 </element>
Line 161: Line 165:
 
                     <attribute name="nbPicts">
 
                     <attribute name="nbPicts">
 
                         <data type="int" />
 
                         <data type="int" />
                    </attribute>
 
                    <attribute name="intent">
 
                    <choice>
 
                        <value>exposure</value>
 
                        <value>focus</value>
 
                        <value>white balance</value>
 
                        <value>movement</value>
 
                    </choice>
 
 
                     </attribute>
 
                     </attribute>
 
                 </element>
 
                 </element>
Line 180: Line 176:
 
                         <value>4:3</value>
 
                         <value>4:3</value>
 
                         <value>5:4</value>
 
                         <value>5:4</value>
 +
                        <value>16:9</value>
 
                     </choice>
 
                     </choice>
 
                     </attribute>
 
                     </attribute>
Line 191: Line 188:
 
                     </choice>
 
                     </choice>
 
                 </attribute>
 
                 </attribute>
                 <optional>
+
                 <element name="focal">
                    <element name="focal"> <!-- only if type is "rectilinear" -->
+
                    <data type="float" />
                        <data type="float" />
+
                </element>
                    </element>
+
                </optional>
+
 
             </element>
 
             </element>
 
             <choice>
 
             <choice>
Line 237: Line 232:
 
                     <element name="time">
 
                     <element name="time">
 
                         <data type="string">
 
                         <data type="string">
                             <param name="pattern">\d{4}-\d{2}-\d{2}_\d{2}h\d{2}m\d{2}s</param>
+
                             <param name="pattern">\s*\d{4}-\d{2}-\d{2}_\d{2}h\d{2}m\d{2}s\s*</param>
 
                         </data>
 
                         </data>
 
                     </element>
 
                     </element>
Line 256: Line 251:
 
     </element>
 
     </element>
  
== Example ==
+
== ChangeLog ==
 +
 
 +
=== Version 'c' ===
 +
 
 +
Used by Papywizard >= 2.1.18
 +
 
 +
* added '''<counter>''' tag
 +
 
 +
=== [[Panohead XML data file version 'b'|Version 'b']] ===
 +
 
 +
Used by Papywizard >= 2.1.11
 +
 
 +
* '''<focal>''' tag is now mandatory, even for fisheye
 +
* removed '''intent''' attribute from '''<bracketing>''' tag
 +
* added '''16:9''' value to '''ratio''' attribute of '''<sensor>''' tag
 +
 
 +
=== [[Panohead XML data file version 'a'|Version 'a']] ===
  
 +
* Initial release
  
 
[[fr:Fichier de données]]
 
[[fr:Fichier de données]]

Latest revision as of 08:40, 23 September 2010

The goal of this document is to describe the specifications of an open data file format for motorized panoheads.

Goals

There are several commercial complete panoheads (Gigapan, Rodeon...) wich generate a data file containing all shooting positions.

The free project Papywizard, build around a Merlin/Orion astronomic mount and which turns it into a panoramic head, is also able to generate such file.

What about Klaus & Josef controller?

Autopano Pro is able to read such files, to correctly place orphan images, images without control points, often found in hi-resolution panos with deep blue sky.

It could be very useful to build some sort of standard. This standard should take into account all the specifities of current formats, to be usable in all cases, and should be evolutive, to incorporate future hardware features.

Choices

It is important that this data file is readable by humans, so has to be ascii. XML format seems to be the best choice, as there are a lot of tools to create and manipulate it, from all languages and all plateforms.

Papywizard project already generates such format, so will be used as base. On the other hand, all modifications and propositions described here will be implemented in Papywizard, and supported by Autopano Pro.

Current version

Current version is 'c'.

General

This file is split in two parts: a header (<header> tag), containing general informations, and a section, containing the list of all shooting positions (<shoot> tag).

The exact content of the header depends of the shooting mode.

In the shoot section, each image contains a unique identifier, the id attribute, which is a simple integer, starting to 1. When mulitple exposures are made at the same position (exposure bracketing, mirror lockup...), the bracket attribute is incremented, then reset to 1 at the next position.

Details

Naming conventions
Var Meaning Notes
[int] integer
[float] float
[str] string
[dateTime] date and time, as YYYY-MM-DD_HHhMMmSSs
[mode] shooting mode, in (mosaic, preset)
[headOrientation] Head orientation, in (up, left, right, down)
[cameraOrientation] Camera orientation, in (portrait, landscape, custom) the roll attribute contains the real angle relative to the head
[ratio] Ratio of the sensor, in (3:2, 4:3, 5:4, 16:9)
[lensType] Type of the lens, in (rectilinear, fisheye)
  <?xml version="1.0" encoding="utf-8"?>
  <papywizard version="b">
      <header>
          <general>
              <title>[str]</title>
              <gps>[str]</gps>
              <comment>[str]</comment>
          </general>
          <shooting mode="[mode]">
              <headOrientation>[headOrientation]</headOrientation>
              <cameraOrientation>[cameraOrientation]</cameraOrientation>
              <stabilizationDelay>[float]</stabilizationDelay>
              <counter>[int]</counter>
              <startTime>[dateTime]</startTime>
              <endTime>[dateTime]</endTime>
          </shooting>
          <camera>
              <timeValue>[float]</timeValue>
              <bracketing nbPicts="[int]"/>
              <sensor coef="[float]" ratio="[ratio]"/>
          </camera>
          <lens type="[lensType]">
              <focal>[float]</focal>
          </lens>
  
          <mosaic>
              <nbPicts pitch="[int]" yaw="[int]"/>
              <overlap minimum="[float]" pitch="[float]" yaw="[float]"/>
          </mosaic>
          or
          <preset name="[str]" />
  
      </header>
      <shoot>
          <pict id="[int]" bracket="[int]">
              
              <position pitch="[float]" yaw="[float]" roll="[float]"/>
          </pict>
          ...
      </shoot>
  </papywizard>

RelaxNG validation

   <?xml version="1.0" encoding="utf-8"?>
   <element name="papywizard"  xmlns="http://relaxng.org/ns/structure/1.0"  datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
       <attribute name="version">
           <value>c</value>
       </attribute>
       <element name="header">
           <element name="general">
               <element name="title">
                   <data type="string" />
               </element>
               <element name="gps">
                   <data type="string" />
               </element>
               <element name="comment">
                   <data type="string" />
               </element>
           </element>
           <element name="shooting">
               <attribute name="mode">
                   <choice>
                       <value>mosaic</value>
                       <value>preset</value>
                   </choice>
               </attribute>
               <element name="headOrientation">
                   <choice>
                       <value>up</value>
                       <value>left</value>
                       <value>right</value>
                       <value>down</value>
                   </choice>
               </element>
               <element name="cameraOrientation">
                   <choice>
                       <value>portrait</value>
                       <value>landscape</value>
                       <value>custom</value>
                   </choice>
               </element>
               <element name="stabilizationDelay">
                   <data type="float" />
               </element>
               <element name="counter">
                   <data type="int" />
               </element>
               <element name="startTime">
                   
                       <param name="pattern">\s*\d{4}-\d{2}-\d{2}_\d{2}h\d{2}m\d{2}s\s*</param>
                   
               </element>
               <element name="endTime">
                   
                       <param name="pattern">\s*\d{4}-\d{2}-\d{2}_\d{2}h\d{2}m\d{2}s\s*</param>
                   
               </element>
           </element>
           <element name="camera">
               <element name="timeValue">
                   <data type="float" />
               </element>
               <element name="bracketing">
                   <attribute name="nbPicts">
                       <data type="int" />
                   </attribute>
               </element>
               <element name="sensor">
                   <attribute name="coef">
                       <data type="float" />
                   </attribute>
                   <attribute name="ratio">
                   <choice>
                       <value>3:2</value>
                       <value>4:3</value>
                       <value>5:4</value>
                       <value>16:9</value>
                   </choice>
                   </attribute>
               </element>
           </element>
           <element name="lens">
               <attribute name="type">
                   <choice>
                       <value>rectilinear</value>
                       <value>fisheye</value>
                   </choice>
               </attribute>
               <element name="focal">
                   <data type="float" />
               </element>
           </element>
           <choice>
               <element name="mosaic">
                   <element name="nbPicts">
                       <attribute name="yaw">
                           <data type="int" />
                       </attribute>
                       <attribute name="pitch">
                           <data type="int" />
                       </attribute>
                   </element>
                   <element name="overlap">
                       <attribute name="minimum">
                           <data type="float" />
                       </attribute>
                       <attribute name="yaw">
                           <data type="float" />
                       </attribute>
                       <attribute name="pitch">
                           <data type="float" />
                       </attribute>
                   </element>
               </element>
               <element name="preset">
                   <attribute name="name">
                       <data type="string" />
                   </attribute>
               </element>
           </choice>
       </element>
       <element name="shoot">
           <zeroOrMore>
               <element name="pict">
                   <attribute name="id">
                       <data type="int" />
                   </attribute>
                   <attribute name="bracket">
                       <data type="int" />
                   </attribute>
                   <element name="time">
                       
                           <param name="pattern">\s*\d{4}-\d{2}-\d{2}_\d{2}h\d{2}m\d{2}s\s*</param>
                       
                   </element>
                   <element name="position">
                       <attribute name="yaw">
                           <data type="float" />
                       </attribute>
                       <attribute name="pitch">
                           <data type="float" />
                       </attribute>
                       <attribute name="roll">
                           <data type="float" />
                       </attribute>
                   </element>
               </element>
           </zeroOrMore>
       </element>
   </element>

ChangeLog

Version 'c'

Used by Papywizard >= 2.1.18

  • added <counter> tag

Version 'b'

Used by Papywizard >= 2.1.11

  • <focal> tag is now mandatory, even for fisheye
  • removed intent attribute from <bracketing> tag
  • added 16:9 value to ratio attribute of <sensor> tag

Version 'a'

  • Initial release