Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Pinard Clement
drone-depth-validation-set
Commits
2ea68296
Commit
2ea68296
authored
Aug 04, 2020
by
Clément Pinard
Browse files
bug fix
parent
cd0bdaa7
Changes
2
Hide whitespace changes
Inline
Side-by-side
meshlab_xml_writer.py
View file @
2ea68296
...
...
@@ -72,7 +72,7 @@ def add_meshes_to_project(input_mlp, output_mlp, model_paths, labels=None, trans
mesh
.
set
(
"filename"
,
m
)
matrix
=
etree
.
SubElement
(
mesh
,
"MLMatrix44"
)
matrix
.
text
=
"
\n
"
+
"
\n
"
.
join
(
" "
.
join
(
str
(
element
)
for
element
in
row
)
+
" "
for
row
in
t
)
+
"
\n
"
group
.
insert
(
start_index
+
1
,
mesh
)
group
.
insert
(
start_index
,
mesh
)
to_modify
.
write
(
output_mlp
,
pretty_print
=
True
)
...
...
videos_to_colmap.py
View file @
2ea68296
...
...
@@ -167,6 +167,10 @@ def process_video_folder(videos_list, existing_pictures, output_video_folder, im
set it as the first valid GPS position of the first outdoor video'''
centroid
=
raw_positions
[
metadata
[
"location_valid"
]
==
1
].
iloc
[
0
].
values
zero_centered_positions
=
raw_positions
.
values
-
centroid
radius
=
np
.
max
(
np
.
abs
(
zero_centered_positions
))
if
radius
>
1000
:
print
(
"Warning, your positions coordinates are most likely too high, have you configured the right GPS system ?"
)
print
(
"It should be the same as the one used for the Lidar point cloud"
)
metadata
[
"x"
],
metadata
[
"y"
],
metadata
[
"z"
]
=
zero_centered_positions
.
transpose
()
except
Exception
:
# No metadata found, construct a simpler dataframe without location
...
...
@@ -184,6 +188,10 @@ def process_video_folder(videos_list, existing_pictures, output_video_folder, im
metadata
[
"camera_model"
]
=
"OPENCV"
metadata
[
"picture_hfov"
]
=
height
metadata
[
"picture_vfov"
]
=
height
metadata
[
"frame_quat_w"
]
=
np
.
NaN
metadata
[
"frame_quat_x"
]
=
np
.
NaN
metadata
[
"frame_quat_y"
]
=
np
.
NaN
metadata
[
"frame_quat_z"
]
=
np
.
NaN
videos_summary
[
"generic"
]
+=
1
if
include_lowfps_thorough
:
by_time
=
metadata
.
set_index
(
pd
.
to_datetime
(
metadata
[
"time"
],
unit
=
"us"
))
...
...
Write
Preview
Supports
Markdown
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