Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
obj2rgbd
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Elphel
obj2rgbd
Commits
567495ea
Commit
567495ea
authored
Feb 27, 2020
by
Oleg Dzhimiev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
minor
parent
57620a51
Pipeline
#1519
canceled with stages
Changes
3
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
6 deletions
+13
-6
README.md
README.md
+1
-0
blender_generate_image_and_depth.py
blender_generate_image_and_depth.py
+10
-6
exr2png.py
exr2png.py
+2
-0
No files found.
README.md
0 → 100644
View file @
567495ea
blender_generate_image_and_depth.py
View file @
567495ea
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:
Usage:
~$ blender -b -P blender_generate_image_and_depth.py -- file1,file2,..,fileN
~$ blender -b -P blender_generate_image_and_depth.py -- file1,file2,..,fileN
...
@@ -35,6 +33,12 @@ Comment:
...
@@ -35,6 +33,12 @@ Comment:
'''
'''
import
numpy
as
np
import
os
import
sys
import
bpy
model_output_folder
=
"output"
model_output_folder
=
"output"
scene
=
bpy
.
context
.
scene
scene
=
bpy
.
context
.
scene
...
...
exr2png.py
View file @
567495ea
...
@@ -17,6 +17,7 @@ def exr2arr(exrfile):
...
@@ -17,6 +17,7 @@ def exr2arr(exrfile):
if
c
in
channels
:
if
c
in
channels
:
channels_list
.
append
(
c
)
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.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
)
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
))
color_channels
=
file
.
channels
(
channels_list
,
Imath
.
PixelType
(
Imath
.
PixelType
.
FLOAT
))
...
@@ -27,6 +28,7 @@ def exr2arr(exrfile):
...
@@ -27,6 +28,7 @@ def exr2arr(exrfile):
if
__name__
==
"__main__"
:
if
__name__
==
"__main__"
:
fname
=
"depth-0001.exr"
fname
=
"depth-0001.exr"
arr
=
exr_to_array
(
fname
)
arr
=
exr_to_array
(
fname
)
print
(
arr
.
shape
)
print
(
arr
.
shape
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment