Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
ftl
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Admin message
Maintenance moved to Monday 17.3. at 13:00. ETA 60 - 90 minutes.
Show more breadcrumbs
Nicolas Pope
ftl
Commits
cd88513b
Commit
cd88513b
authored
5 years ago
by
Nicolas Pope
Browse files
Options
Downloads
Patches
Plain Diff
Fix pose problems
parent
753eb63d
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Pipeline
#23024
passed
5 years ago
Stage: all
Stage: deploy
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
SDK/Python/blender_script.py
+6
-2
6 additions, 2 deletions
SDK/Python/blender_script.py
with
6 additions
and
2 deletions
SDK/Python/blender_script.py
+
6
−
2
View file @
cd88513b
...
...
@@ -253,7 +253,7 @@ ftlImageWrite.argtypes = [c_void_p, c_int, c_int, c_int, c_int, c_void_p]
ftlPoseWrite
=
ftl
.
ftlPoseWrite
ftlPoseWrite
.
restype
=
c_int
ftlPoseWrite
.
argtypes
=
[
c_void_p
,
c_void_p
]
ftlPoseWrite
.
argtypes
=
[
c_void_p
,
c_int
,
c_void_p
]
ftlDestroyStream
=
ftl
.
ftlDestroyStream
ftlDestroyStream
.
restype
=
c_int
...
...
@@ -282,7 +282,11 @@ def render_and_save(filename, cameras):
ftlCheck
(
ftlIntrinsicsWriteRight
(
c_void_p
(
stream
),
c_int
(
i
),
c_int
(
int
(
image
.
intrinsics
.
width
)),
c_int
(
int
(
image
.
intrinsics
.
height
)),
c_float
(
image
.
intrinsics
.
fx
),
c_float
(
image
.
intrinsics
.
cx
),
c_float
(
image
.
intrinsics
.
cy
),
c_float
(
image
.
intrinsics
.
baseline
),
c_float
(
image
.
intrinsics
.
min_depth
),
c_float
(
image
.
intrinsics
.
max_depth
)))
# This line needs fixing
ftlCheck
(
ftlPoseWrite
(
stream
,
image
.
pose
.
astype
(
np
.
float32
).
ctypes
.
data_as
(
c_void_p
)))
M
=
np
.
identity
(
4
,
dtype
=
np
.
float32
)
M
[
0
:
3
,
0
:
4
]
=
image
.
pose
M
=
np
.
transpose
(
M
)
M
=
np
.
linalg
.
inv
(
M
)
ftlCheck
(
ftlPoseWrite
(
stream
,
c_int
(
i
),
M
.
ctypes
.
data_as
(
c_void_p
)))
ftlCheck
(
ftlImageWrite
(
stream
,
c_int
(
i
),
0
,
5
,
0
,
image
.
imL
.
ctypes
.
data_as
(
c_void_p
)))
ftlCheck
(
ftlImageWrite
(
stream
,
c_int
(
i
),
2
,
5
,
0
,
image
.
imR
.
ctypes
.
data_as
(
c_void_p
)))
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment