DESCRIPTION & FORMAT OF A .COM FILE
Centre for Vision, Speech & Signal Processing


  BEGINNERS
Description & Format Of A .com File

  .COM FORMAT
This page describes the purpose of the .com file, as well as it's format.

Description

The purpose of a .com file is to allow you to easily make animations of 3d surfaces by using AVS.

A .com file just specifes files with their associated rotation and translation, along with their viewpoints. So if you want a 25 frame animation, 25 files are specified along with the rotation, translation and viewpoint for each file.

A .com file is not just for AVS. It allows you to specify multiview sets of 3D points/meshes/range images. To find out about the class which parses this file format, refer to ComFileC.


Format Of A .com File

Below is shown the syntax of the file.

   NumberOfFiles
   FileName1
   FileName2
       :
       :
       :
   FileNameN

   [RTS]
   rt1.1 rt1.2 rt1.3 rt1.4 rt1.5 rt1.6 rt1.7
               :
               :
               :
   rtN.1 rtN.2 rtN.3 rtN.4 rtN.5 rtN.6 rtN.7

   [VIEWPOINTS]
   vp1.1 vp1.2 vp1.3
           :
           :
           :
   vpN.1 vpN.2 vpN.3

The sections with [****] are optional (Option Blocks). If these are not specified in the file then the defaults are instantiated for each of those option blocks when the file is read in.

The [RTS] section is where the rotations and translations are specified. These are in the form of Rigid Transforms. NO CHECKS are done to see if the rigid transforms specified are valid.

The [VIEWPOINTS] section is where the view point for each frame is specified. These are in the form of a 3d Vector.

No white spaces are allowed when specifying a tag within an option specifier. Eg

Invalid
  [ VIEWPOINTS ]

  [ R T S ]

  [
  RTS
  ]

However the tag within the option specifier, is not case sensitive. Eg

Valid
  [ViewPoints]

  [RtS]

If you have specified that there are 25 files (frames), then within each option block there must be 25 entries exactly.


Example .com File

  12
  rangeimage.tri
  rangeimage.tri
  rangeimage.tri
  rangeimage.tri
  rangeimage.tri
  rangeimage.tri
  rangeimage.tri
  rangeimage.tri
  rangeimage.tri
  rangeimage.tri
  rangeimage.tri
  rangeimage.tri

  [RTS]
  -0.0833512 -0.121251 -0.091382 0.976296 0.0578459 0.115692 0.173538
  -0.203959 1.19967 -0.669685 0.996843 0.0784753 0.0118397 0.00239705
  -0.171941 1.24854 -0.674171 0.996847 0.0788305 0.00804198 -0.00417028
  -0.157265 1.24687 -0.664513 0.996898 0.0782596 0.00731842 -0.00413964
  -0.144003 1.24197 -0.655021 0.996952 0.0776288 0.00677678 -0.00378239
  -0.134673 1.23489 -0.64481 0.997014 0.0768814 0.00639452 -0.00351898
  -0.100581 1.19662 -0.58764 0.997332 0.0727894 0.00497596 -0.00256034
  -0.0911814 1.2029 -0.582599 0.997317 0.0730259 0.00482687 -0.00134808
  -0.0905406 1.21472 -0.576966 0.997295 0.0733337 0.00486087 -0.00112889
  -0.0945321 1.2836 -0.516119 0.997249 0.0739398 0.00509746 -0.00069218
  -0.0915592 1.27937 -0.51302 0.997271 0.0736602 0.00493331 -0.000718624
  -0.0861977 1.24152 -0.481727 0.997451 0.0712065 0.00463557 -0.000651631

  [ViewPoints]
  1.0 1.0 3.0
  1.0 1.0 3.0
  1.0 1.0 3.0
  1.0 1.0 3.0
  1.0 1.0 3.0
  1.0 1.0 3.0
  1.0 1.0 3.0
  1.0 1.0 3.0
  1.0 1.0 3.0
  1.0 1.0 3.0
  1.0 1.0 3.0
  1.0 1.0 3.0
S.Cunnington@ee.surrey.ac.uk Last updated: Dec 18, 1998