Tiff file format for pre-processed quad-stereo sets
Python
← Older revision Revision as of 00:49, 13 July 2018 Line 110: Line 110: values data: (242, 324, 3)</font> values data: (242, 324, 3)</font> −[[File:Ml tiff stack python tile packing.jpeg|thumb|400px|Fig.4 Single layer packing]]+[[File:Ml tiff stack python tile packing.jpeg|thumb|400px|Fig.4 Single layer packing (actually, see the CVPR2018 presentation, p.23)]] '''2.''' Use '''pack_tile.py''' from [https://git.elphel.com/Elphel/python3-imagej-tiff python3-imagej-tiff] to: '''2.''' Use '''pack_tile.py''' from [https://git.elphel.com/Elphel/python3-imagej-tiff python3-imagej-tiff] to: * <font color='DarkGreen'>'''Pack image tiles for better structuring for ML'''</font> * <font color='DarkGreen'>'''Pack image tiles for better structuring for ML'''</font> OlegTiff file format for pre-processed quad-stereo sets
Python
← Older revision Revision as of 00:49, 13 July 2018 (One intermediate revision by the same user not shown)Line 110: Line 110: values data: (242, 324, 3)</font> values data: (242, 324, 3)</font> − +[[File:Ml tiff stack python tile packing.jpeg|thumb|400px|Fig.4 Single layer packing (actually, see the CVPR2018 presentation, p.23)]] '''2.''' Use '''pack_tile.py''' from [https://git.elphel.com/Elphel/python3-imagej-tiff python3-imagej-tiff] to: '''2.''' Use '''pack_tile.py''' from [https://git.elphel.com/Elphel/python3-imagej-tiff python3-imagej-tiff] to: * <font color='DarkGreen'>'''Pack image tiles for better structuring for ML'''</font> * <font color='DarkGreen'>'''Pack image tiles for better structuring for ML'''</font> Oleg07/12/18 [python3-imagej-tiff][master] by Oleg Dzhimiev: NaNs are already taken care of
Oleg Dzhimiev committed changes to the Elphel git project :
NaNs are already taken care of
NaNs are already taken care of
Tiff file format for pre-processed quad-stereo sets
Python
← Older revision Revision as of 20:20, 12 July 2018 Line 110: Line 110: values data: (242, 324, 3)</font> values data: (242, 324, 3)</font> − +[[File:Ml tiff stack python tile packing.jpeg|thumb|400px|Fig.4 Single layer packing]] '''2.''' Use '''pack_tile.py''' from [https://git.elphel.com/Elphel/python3-imagej-tiff python3-imagej-tiff] to: '''2.''' Use '''pack_tile.py''' from [https://git.elphel.com/Elphel/python3-imagej-tiff python3-imagej-tiff] to: * <font color='DarkGreen'>'''Pack image tiles for better structuring for ML'''</font> * <font color='DarkGreen'>'''Pack image tiles for better structuring for ML'''</font> OlegFile:Ml tiff stack python values.jpeg
Oleg uploaded a new version of File:Ml tiff stack python values.jpeg
New page
== Licensing =={{CC }} Oleg
Tiff file format for pre-processed quad-stereo sets
← Older revision
Revision as of 20:08, 12 July 2018
(2 intermediate revisions by the same user not shown)Line 60:
Line 60:
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...''' 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...'''
====Python==== ====Python====
−Use '''imagej_tiff.py''' from [https://git.elphel.com/Elphel/python3-imagej-tiff python3-imagej-tiff] to:+'''1.''' Use '''imagej_tiff.py''' from [https://git.elphel.com/Elphel/python3-imagej-tiff python3-imagej-tiff] to:
* <font color='DarkGreen'>'''Get tiff tags values (Pillow)'''</font> * <font color='DarkGreen'>'''Get tiff tags values (Pillow)'''</font>
* <font color='DarkGreen'>'''Parse Properties xml data stored by ImageJ in the tiff tags'''</font> * <font color='DarkGreen'>'''Parse Properties xml data stored by ImageJ in the tiff tags'''</font>
Line 109:
Line 109:
image data: (242, 324, 9, 9, 4) image data: (242, 324, 9, 9, 4)
values data: (242, 324, 3)</font> values data: (242, 324, 3)</font>
+
+
+'''2.''' Use '''pack_tile.py''' from [https://git.elphel.com/Elphel/python3-imagej-tiff python3-imagej-tiff] to:
+* <font color='DarkGreen'>'''Pack image tiles for better structuring for ML'''</font>
+ <font size=2>'''# The current packing is hardcoded in the script: (TY,TX,9,9,4) -> (TY,TX,100)'''
+ # Get tiles from a tiff stack
+ import pack_tile as pile
+ packed_tiles = pile.pack(tile)
+ # packed_tiles get stacked with '''estimated disparity''' (see '''test_nn_feed.py''')
+ packed_tiles = np.dstack((packed_tiles,values[:,:,0]))
Oleg
Tiff file format for pre-processed quad-stereo sets
← Older revision
Revision as of 20:08, 12 July 2018
(4 intermediate revisions by the same user not shown)Line 47:
Line 47:
[[File:Ml tiff stack imagej.jpeg|thumb|400px|Fig.1 Opened in ImageJ]] [[File:Ml tiff stack imagej.jpeg|thumb|400px|Fig.1 Opened in ImageJ]]
[[File:Ml tiff stack python values.jpeg|thumb|800px|Fig.2 Decoded 'value'-layers]] [[File:Ml tiff stack python values.jpeg|thumb|800px|Fig.2 Decoded 'value'-layers]]
+[[File:Ml tiff stack python data layers.jpeg|thumb|500px|Fig.3 Data layers]]
* 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]: * 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'''] ** 5 layers in the stack: ['''diagm-pair''', '''diago-pair''', '''hor-pairs''', '''vert-pairs''', '''other''']
Line 59:
Line 60:
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...''' 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...'''
====Python==== ====Python====
−Use '''imagej_tiff.py''' from [https://git.elphel.com/Elphel/python3-imagej-tiff python3-imagej-tiff] to:+'''1.''' Use '''imagej_tiff.py''' from [https://git.elphel.com/Elphel/python3-imagej-tiff python3-imagej-tiff] to:
* <font color='DarkGreen'>'''Get tiff tags values (Pillow)'''</font> * <font color='DarkGreen'>'''Get tiff tags values (Pillow)'''</font>
* <font color='DarkGreen'>'''Parse Properties xml data stored by ImageJ in the tiff tags'''</font> * <font color='DarkGreen'>'''Parse Properties xml data stored by ImageJ in the tiff tags'''</font>
Line 104:
Line 105:
−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)''', example:+Upon opening tiff the image will be a numpy array of shape '''(height,width,layer)''' - for further processing it is reshaped to '''(height_in_tiles, width_in_tiles, tile_height, tile_width, layer)''', example:
<font size='2'>tiff stack shape: (2178, 2916, 5) <font size='2'>tiff stack shape: (2178, 2916, 5)
image data: (242, 324, 9, 9, 4) image data: (242, 324, 9, 9, 4)
values data: (242, 324, 3)</font> values data: (242, 324, 3)</font>
+
+
+'''2.''' Use '''pack_tile.py''' from [https://git.elphel.com/Elphel/python3-imagej-tiff python3-imagej-tiff] to:
+* <font color='DarkGreen'>'''Pack image tiles for better structuring for ML'''</font>
+ <font size=2>'''# The current packing is hardcoded in the script: (TY,TX,9,9,4) -> (TY,TX,100)'''
+ # Get tiles from a tiff stack
+ import pack_tile as pile
+ packed_tiles = pile.pack(tile)
+ # packed_tiles get stacked with '''estimated disparity''' (see '''test_nn_feed.py''')
+ packed_tiles = np.dstack((packed_tiles,values[:,:,0]))
Oleg
07/12/18 [python3-imagej-tiff][master] by Oleg Dzhimiev: tested
Oleg Dzhimiev committed changes to the Elphel git project :
tested
tested
07/12/18 [python3-imagej-tiff][master] by Oleg Dzhimiev: added NaNs
Oleg Dzhimiev committed changes to the Elphel git project :
added NaNs
added NaNs
07/12/18 [python3-imagej-tiff][master] by Oleg Dzhimiev: simplified packing, next test
Oleg Dzhimiev committed changes to the Elphel git project :
simplified packing, next test
simplified packing, next test
07/12/18 [python3-imagej-tiff][master] by Oleg Dzhimiev: fixed packing to 4x faster
Oleg Dzhimiev committed changes to the Elphel git project :
fixed packing to 4x faster
fixed packing to 4x faster
07/12/18 [imagej-elphel][gpu] by AndreyFilippov: Using main camera -only DSI in the model where aux camera is occluded
AndreyFilippov committed changes to the Elphel git project :
Using main camera -only DSI in the model where aux camera is occluded
Using main camera -only DSI in the model where aux camera is occluded
Tiff file format for pre-processed quad-stereo sets
← Older revision
Revision as of 23:19, 11 July 2018
(One intermediate revision by the same user not shown)Line 47:
Line 47:
[[File:Ml tiff stack imagej.jpeg|thumb|400px|Fig.1 Opened in ImageJ]] [[File:Ml tiff stack imagej.jpeg|thumb|400px|Fig.1 Opened in ImageJ]]
[[File:Ml tiff stack python values.jpeg|thumb|800px|Fig.2 Decoded 'value'-layers]] [[File:Ml tiff stack python values.jpeg|thumb|800px|Fig.2 Decoded 'value'-layers]]
+[[File:Ml tiff stack python data layers.jpeg|thumb|500px|Fig.3 Data layers]]
* 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]: * 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'''] ** 5 layers in the stack: ['''diagm-pair''', '''diago-pair''', '''hor-pairs''', '''vert-pairs''', '''other''']
Line 104:
Line 105:
−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)''', example:+Upon opening tiff the image will be a numpy array of shape '''(height,width,layer)''' - for further processing it is reshaped to '''(height_in_tiles, width_in_tiles, tile_height, tile_width, layer)''', example:
<font size='2'>tiff stack shape: (2178, 2916, 5) <font size='2'>tiff stack shape: (2178, 2916, 5)
image data: (242, 324, 9, 9, 4) image data: (242, 324, 9, 9, 4)
values data: (242, 324, 3)</font> values data: (242, 324, 3)</font>
Oleg
Tiff file format for pre-processed quad-stereo sets
TIFF stacks for ML
← Older revision Revision as of 22:50, 11 July 2018 Line 47: Line 47: [[File:Ml tiff stack imagej.jpeg|thumb|400px|Fig.1 Opened in ImageJ]] [[File:Ml tiff stack imagej.jpeg|thumb|400px|Fig.1 Opened in ImageJ]] [[File:Ml tiff stack python values.jpeg|thumb|800px|Fig.2 Decoded 'value'-layers]] [[File:Ml tiff stack python values.jpeg|thumb|800px|Fig.2 Decoded 'value'-layers]] +[[File:Ml tiff stack python data layers.jpeg|thumb|500px|Fig.3 Data layers]] * 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]: * 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'''] ** 5 layers in the stack: ['''diagm-pair''', '''diago-pair''', '''hor-pairs''', '''vert-pairs''', '''other'''] OlegTiff file format for pre-processed quad-stereo sets
Python
← Older revision Revision as of 22:44, 11 July 2018 (4 intermediate revisions by the same user not shown)Line 45: Line 45: ==<font color='ForestGreen'>TIFF stacks for ML</font>== ==<font color='ForestGreen'>TIFF stacks for ML</font>== +[[File:Ml tiff stack imagej.jpeg|thumb|400px|Fig.1 Opened in ImageJ]] +[[File:Ml tiff stack python values.jpeg|thumb|800px|Fig.2 Decoded 'value'-layers]] * 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]: * 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'''] ** 5 layers in the stack: ['''diagm-pair''', '''diago-pair''', '''hor-pairs''', '''vert-pairs''', '''other'''] Line 58: Line 60: ====Python==== ====Python==== Use '''imagej_tiff.py''' from [https://git.elphel.com/Elphel/python3-imagej-tiff python3-imagej-tiff] to: Use '''imagej_tiff.py''' from [https://git.elphel.com/Elphel/python3-imagej-tiff python3-imagej-tiff] to: −* get tiff tags values (Pillow)+* <font color='DarkGreen'>'''Get tiff tags values (Pillow)'''</font> −* parse Properties xml data stored in the tiff tags used by ImageJ+* <font color='DarkGreen'>'''Parse Properties xml data stored by ImageJ in the tiff tags'''</font> −* get tile dimensions from Properties+* <font color='DarkGreen'>'''Get tiles dimensions from Properties'''</font> −* read layers as numpy arrays for further computations or plotting+* <font color='DarkGreen'>'''Convert layers to numpy arrays (split into tiles or optionally not split) for further computations and plotting'''</font> −Example:+Example (more examples are commented out in the __main__ section of the script): <font size='1' style='line-height:0.5;'>'''~$ python3 imagej_tiff.py 1527256903_350165-ML_DATA-08B-O-FZ0.05-OFFS0.00000.tiff''' <font size='1' style='line-height:0.5;'>'''~$ python3 imagej_tiff.py 1527256903_350165-ML_DATA-08B-O-FZ0.05-OFFS0.00000.tiff''' time: 1531344391.7055812 time: 1531344391.7055812 Oleg07/11/18 [python3-imagej-tiff][master] by Oleg Dzhimiev: still testing
Oleg Dzhimiev committed changes to the Elphel git project :
still testing
still testing
Pages
