Commit 567495ea authored by Oleg Dzhimiev's avatar Oleg Dzhimiev

minor

parent 57620a51
Pipeline #1519 canceled with stages
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
......@@ -35,6 +33,12 @@ Comment:
'''
import numpy as np
import os
import sys
import bpy
model_output_folder = "output"
scene = bpy.context.scene
......
......@@ -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))
......@@ -27,6 +28,7 @@ def exr2arr(exrfile):
if __name__ == "__main__":
fname = "depth-0001.exr"
arr = exr_to_array(fname)
print(arr.shape)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment