Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
J
jfxmap_python
Project
Project
Details
Activity
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
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
oscar
jfxmap_python
Commits
b37d1e79
Commit
b37d1e79
authored
Jan 11, 2022
by
oscar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交更新
parent
90d43165
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
2 deletions
+11
-2
trans_data.py
script/trans_data.py
+2
-2
getloc_coll.py
script/utils/getloc_coll.py
+9
-0
No files found.
script/trans_data.py
View file @
b37d1e79
...
...
@@ -11,7 +11,7 @@ from scipy.spatial.transform import Rotation as R
import
cv2
from
scipy.spatial
import
Delaunay
import
scipy
from
utils.getloc_coll
import
get_loc
,
get_world_loc
from
utils.getloc_coll
import
get_loc
,
get_world_loc
,
get_loc_from_origin
from
easydict
import
EasyDict
import
yaml
from
jfxmap_lib.jfxmap
import
init_jfxmap
,
get_map_data
...
...
@@ -503,7 +503,7 @@ if __name__ == '__main__':
drawpointcloud
=
[]
merge_geos
=
[
pcd
]
for
bbox
in
bboxes
:
lidar_loc
,
out_BL
,
out_center_BL
=
get_loc
([
bbox
[
4
][
0
],
bbox
[
4
][
1
],
bbox
[
4
][
2
],
bbox
[
6
][
0
],
bbox
[
6
][
1
],
bbox
[
6
][
2
],
bbox
[
2
]],
0
,
origin_Trans
,
origin_kitti2origin
)
out_center_BL
=
get_loc_from_origin
([
bbox
[
4
][
0
],
bbox
[
4
][
1
],
bbox
[
4
][
2
]],
0
,
origin_Trans
)
print
(
out_center_BL
)
angle
=
bbox
[
2
]
/
np
.
pi
*
180
mapInfo
=
get_map_data
(
out_center_BL
[
0
],
out_center_BL
[
1
],
angle
)
...
...
script/utils/getloc_coll.py
View file @
b37d1e79
...
...
@@ -202,6 +202,15 @@ def get_loc(boxes_3d, car_type, Trans, kitti2origin):
return
lidar_loc
,
out_BL
,
out_center_BL
def
get_loc_from_origin
(
lidar_loc
,
car_type
,
Trans
):
tmp_loc
=
np
.
ones
([
4
])
tmp_loc
[:
3
]
=
lidar_loc
[:
3
]
world_loc
=
np
.
dot
(
Trans
,
tmp_loc
)
out_BL
=
Inverse_v2
(
world_loc
[:
2
])
return
out_BL
def
get_world_loc
(
boxes_3d
,
Trans
,
kitti2origin
):
'''
...
...
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