Difference between revisions of "Tiff file format for pre-processed quad-stereo sets"

From ElphelWiki
Jump to: navigation, search
(Created page with "==Image sets== Example tree of a single set: <font size='2'>'''1527256903_350165/''' ├── 1527256903_350165.kml ├── '''jp4''' │ ├── <font color='Royal...")
 
(TIFF stacks for ML)
(12 intermediate revisions by the same user not shown)
Line 3: Line 3:
 
  <font size='2'>'''1527256903_350165/'''
 
  <font size='2'>'''1527256903_350165/'''
 
  ├── 1527256903_350165.kml
 
  ├── 1527256903_350165.kml
  ├── '''jp4'''
+
  ├── '''jp4''' (source files directory)
 
  │  ├── <font color='RoyalBlue'>1527256903_350165_0.jp4</font>
 
  │  ├── <font color='RoyalBlue'>1527256903_350165_0.jp4</font>
 
  │  ├── <font color='RoyalBlue'>...</font>
 
  │  ├── <font color='RoyalBlue'>...</font>
Line 12: Line 12:
 
  ├── rating.txt
 
  ├── rating.txt
 
  ├── thumb.jpeg
 
  ├── thumb.jpeg
  └── '''v03'''
+
  └── '''v03''' (model version)
 
     ├── <font color='Indigo'>1527256903_350165-00-D0.0.jpeg</font>
 
     ├── <font color='Indigo'>1527256903_350165-00-D0.0.jpeg</font>
 
     ├── <font color='Indigo'>...</font>
 
     ├── <font color='Indigo'>...</font>
Line 26: Line 26:
 
     ├── <font color='DarkGoldenrod'>1527256903_350165.obj</font>
 
     ├── <font color='DarkGoldenrod'>1527256903_350165.obj</font>
 
     ├── <font color='DarkGoldenrod'>1527256903_350165.x3d</font>
 
     ├── <font color='DarkGoldenrod'>1527256903_350165.x3d</font>
     └── '''ml'''
+
     └── '''ml''' (directory with processed data files for ML)
 
         ├── <font color='ForestGreen'>1527256903_350165-ML_DATA-08B-O-FZ0.05-OFFS-2.00000.tiff</font>
 
         ├── <font color='ForestGreen'>1527256903_350165-ML_DATA-08B-O-FZ0.05-OFFS-2.00000.tiff</font>
 
         ├── <font color='ForestGreen'>1527256903_350165-ML_DATA-08B-O-FZ0.05-OFFS-1.00000.tiff</font>
 
         ├── <font color='ForestGreen'>1527256903_350165-ML_DATA-08B-O-FZ0.05-OFFS-1.00000.tiff</font>
Line 34: Line 34:
 
where:
 
where:
 
* <font color='RoyalBlue'>'''*.jp4'''</font> - source files, 0..3 - quad stereo camera #1, 4..7 - quad stereo camera #2, and so on if there are more cameras in the system.
 
* <font color='RoyalBlue'>'''*.jp4'''</font> - source files, 0..3 - quad stereo camera #1, 4..7 - quad stereo camera #2, and so on if there are more cameras in the system.
* <font color='Indigo'>'''*-D0.0.jpeg'''</font> - disparity = 0, images are undistorted to a common polynom
+
* <font color='Indigo'>'''*-D0.0.jpeg'''</font> - disparity = 0, images are undistorted to a distortion polynom common for each image
 
* <font color='OrangeRed'>'''*.corr-xml'''</font> - ImageJ plugin's settings file?
 
* <font color='OrangeRed'>'''*.corr-xml'''</font> - ImageJ plugin's settings file?
 
* <font color='Maroon'>'''*-DSI_COMBO.tiff'''</font> - Disparity Space Image - tiff stack
 
* <font color='Maroon'>'''*-DSI_COMBO.tiff'''</font> - Disparity Space Image - tiff stack
Line 40: Line 40:
 
* <font color='DarkGoldenrod'>'''*.x3d, *.png'''</font> - X3D format model with textures. The textures are shared with the OBJ format model
 
* <font color='DarkGoldenrod'>'''*.x3d, *.png'''</font> - X3D format model with textures. The textures are shared with the OBJ format model
 
* <font color='DarkGoldenrod'>'''*.obj, *.mtl, *.png'''</font> - OBJ format model with textures
 
* <font color='DarkGoldenrod'>'''*.obj, *.mtl, *.png'''</font> - OBJ format model with textures
* <font color='ForestGreen'>'''ml/*.tiff'''</font> - TIFF stack of pre-processed images for ML
+
* <font color='ForestGreen'>'''*.tiff'''</font> - TIFF stack of pre-processed images for ML
  
 
* *.kml, rating.txt, thumb.jpeg - files, related to the online viewer only
 
* *.kml, rating.txt, thumb.jpeg - files, related to the online viewer only
  
==Stacked TIFF==
+
==<font color='ForestGreen'>TIFF stacks for ML</font>==
 
+
* What's in each stack is described in the [https://community.elphel.com/files/presentations/Elphel_TP-CNN_slides.pdf presentation for CVPR2018, pp.19-21]:
 +
** 5 layers in the stack: ['''diagm-pair''', '''diago-pair''', '''hor-pairs''', '''vert-pairs''', '''other''']
 +
*** '''diagm-pair'''
 +
*** '''diago-pair'''
 +
*** '''hor-pairs'''
 +
*** '''vert-pairs'''
 +
*** '''other''' - encoded values: image disparity, estimated disparity and confidence for the estimated disparity
 
* The source files are processed using a plugin for ImageJ, the output file for each set is a tiff stack
 
* The source files are processed using a plugin for ImageJ, the output file for each set is a tiff stack
 
* There are a few ways to view the stack:
 
* There are a few ways to view the stack:
** just open with ImageJ
+
** Open with ImageJ - it has a native support for stacks, each stack has a name label stored (along with related xml info) in the ImageJ tiff tags. To read tiff tags in ImageJ, go '''Image > Show Info...'''
 +
** Use '''imagej_tiff.py''' from [https://git.elphel.com/Elphel/python3-imagej-tiff python3-imagej-tiff]
 +
*** Upon opening tiff the image shape will be '''(height,width,layer)''' - for further processing it needs to be reshaped to '''(height_in_tiles, width_in_tiles, tile_height, tile_width, layer)''':
 +
<font size='2'>tiff stack shape: (2178, 2916, 5)
 +
image data:  (242, 324, 9, 9, 4)
 +
values data: (242, 324, 3)</font>

Revision as of 13:42, 11 July 2018

Image sets

Example tree of a single set:

1527256903_350165/
├── 1527256903_350165.kml
├── jp4 (source files directory)
│   ├── 1527256903_350165_0.jp4
│   ├── ...
│   ├── 1527256903_350165_3.jp4
│   ├── 1527256903_350165_4.jp4
│   ├── ...
│   └── 1527256903_350165_7.jp4
├── rating.txt
├── thumb.jpeg
└── v03 (model version)
    ├── 1527256903_350165-00-D0.0.jpeg
    ├── ...
    ├── 1527256903_350165-07-D0.0.jpeg
    ├── 1527256903_350165.corr-xml
    ├── 1527256903_350165-DSI_COMBO.tiff
    ├── 1527256903_350165-EXTRINSICS.corr-xml
    ├── 1527256903_350165-img1-texture.png
    ├── ...
    ├── 1527256903_350165-img2001-texture.png
    ├── 1527256903_350165-img_infinity-texture.png
    ├── 1527256903_350165.mtl
    ├── 1527256903_350165.obj
    ├── 1527256903_350165.x3d
    └── ml (directory with processed data files for ML)
        ├── 1527256903_350165-ML_DATA-08B-O-FZ0.05-OFFS-2.00000.tiff
        ├── 1527256903_350165-ML_DATA-08B-O-FZ0.05-OFFS-1.00000.tiff
        ├── 1527256903_350165-ML_DATA-08B-O-FZ0.05-OFFS0.00000.tiff
        ├── 1527256903_350165-ML_DATA-08B-O-FZ0.05-OFFS1.00000.tiff
        └── 1527256903_350165-ML_DATA-08B-O-FZ0.05-OFFS2.00000.tiff

where:

  • *.jp4 - source files, 0..3 - quad stereo camera #1, 4..7 - quad stereo camera #2, and so on if there are more cameras in the system.
  • *-D0.0.jpeg - disparity = 0, images are undistorted to a distortion polynom common for each image
  • *.corr-xml - ImageJ plugin's settings file?
  • *-DSI_COMBO.tiff - Disparity Space Image - tiff stack
  • *-EXTRINSICS.corr-xml - extrinsic parameters of the multicamera system
  • *.x3d, *.png - X3D format model with textures. The textures are shared with the OBJ format model
  • *.obj, *.mtl, *.png - OBJ format model with textures
  • *.tiff - TIFF stack of pre-processed images for ML
  • *.kml, rating.txt, thumb.jpeg - files, related to the online viewer only

TIFF stacks for ML

  • What's in each stack is described in the presentation for CVPR2018, pp.19-21:
    • 5 layers in the stack: [diagm-pair, diago-pair, hor-pairs, vert-pairs, other]
      • diagm-pair
      • diago-pair
      • hor-pairs
      • vert-pairs
      • other - encoded values: image disparity, estimated disparity and confidence for the estimated disparity
  • The source files are processed using a plugin for ImageJ, the output file for each set is a tiff stack
  • There are a few ways to view the stack:
    • Open with ImageJ - it has a native support for stacks, each stack has a name label stored (along with related xml info) in the ImageJ tiff tags. To read tiff tags in ImageJ, go Image > Show Info...
    • Use imagej_tiff.py from python3-imagej-tiff
      • Upon opening tiff the image shape will be (height,width,layer) - for further processing it needs to be reshaped to (height_in_tiles, width_in_tiles, tile_height, tile_width, layer):
tiff stack shape: (2178, 2916, 5)
image data:  (242, 324, 9, 9, 4)
values data: (242, 324, 3)