Loading README.md 0 → 100644 +1 −0 Original line number Diff line number Diff line blender_generate_image_and_depth.py +10 −6 Original line number Diff line number Diff line import bpy import numpy as np import os import sys ''' Copyright (C) 2020, Elphel Inc. SPDX-License-Identifier: GPL-3.0-or-later Author: Oleg K Dzhimiev <oleg@elphel.com> Usage: ~$ blender -b -P blender_generate_image_and_depth.py -- file1,file2,..,fileN Loading Loading @@ -35,6 +33,12 @@ Comment: ''' import numpy as np import os import sys import bpy model_output_folder = "output" scene = bpy.context.scene Loading exr2png.py +2 −0 Original line number Diff line number Diff line Loading @@ -17,6 +17,7 @@ def exr2arr(exrfile): if c in channels: channels_list.append(c) # the shape was incorrect #size = (dw.max.x - dw.min.x + 1, dw.max.y - dw.min.y + 1) size = (dw.max.y - dw.min.y + 1, dw.max.x - dw.min.x + 1) color_channels = file.channels(channels_list, Imath.PixelType(Imath.PixelType.FLOAT)) Loading @@ -27,6 +28,7 @@ def exr2arr(exrfile): if __name__ == "__main__": fname = "depth-0001.exr" arr = exr_to_array(fname) print(arr.shape) Loading Loading
blender_generate_image_and_depth.py +10 −6 Original line number Diff line number Diff line import bpy import numpy as np import os import sys ''' Copyright (C) 2020, Elphel Inc. SPDX-License-Identifier: GPL-3.0-or-later Author: Oleg K Dzhimiev <oleg@elphel.com> Usage: ~$ blender -b -P blender_generate_image_and_depth.py -- file1,file2,..,fileN Loading Loading @@ -35,6 +33,12 @@ Comment: ''' import numpy as np import os import sys import bpy model_output_folder = "output" scene = bpy.context.scene Loading
exr2png.py +2 −0 Original line number Diff line number Diff line Loading @@ -17,6 +17,7 @@ def exr2arr(exrfile): if c in channels: channels_list.append(c) # the shape was incorrect #size = (dw.max.x - dw.min.x + 1, dw.max.y - dw.min.y + 1) size = (dw.max.y - dw.min.y + 1, dw.max.x - dw.min.x + 1) color_channels = file.channels(channels_list, Imath.PixelType(Imath.PixelType.FLOAT)) Loading @@ -27,6 +28,7 @@ def exr2arr(exrfile): if __name__ == "__main__": fname = "depth-0001.exr" arr = exr_to_array(fname) print(arr.shape) Loading