Skip to content

Commit

Permalink
Addresses #358 (#360)
Browse files Browse the repository at this point in the history
  • Loading branch information
holger-motional authored Apr 21, 2020
1 parent 3758022 commit ae022ab
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions python-sdk/nuscenes/map_expansion/map_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -1070,15 +1070,12 @@ def render_map_in_image(self,
if len(points) == 0 or points.shape[1] < 3:
continue

# Grab the depths before performing the projection (z axis points away from the camera).
depths = points[2, :]

# Take the actual picture (matrix multiplication with camera-matrix + renormalization).
points = view_points(points, cam_intrinsic, normalize=True)

# Skip polygons where all points are outside the image.
# Leave a margin of 1 pixel for aesthetic reasons.
inside = np.ones(depths.shape[0], dtype=bool)
inside = np.ones(points.shape[1], dtype=bool)
inside = np.logical_and(inside, points[0, :] > 1)
inside = np.logical_and(inside, points[0, :] < im.size[0] - 1)
inside = np.logical_and(inside, points[1, :] > 1)
Expand Down

0 comments on commit ae022ab

Please sign in to comment.