Skip to content

Commit

Permalink
fix: use nanmean. (LASR-at-Home#143)
Browse files Browse the repository at this point in the history
  • Loading branch information
jws-1 authored Mar 11, 2024
1 parent 92e25e3 commit c7cbcbd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion common/helpers/cv2_pcl/src/cv2_pcl/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def seg_to_centroid(pcl: PointCloud2, xyseg: np.ndarray) -> np.ndarray:
# Extract points of interest
xyz_points = [pcl_xyz[x][y] for x, y in indices]

return np.mean(xyz_points, axis=0)
return np.nanmean(xyz_points, axis=0)


def bb_to_centroid(pcl: PointCloud2, x: int, y: int, w: int, h: int) -> np.ndarray:
Expand Down

0 comments on commit c7cbcbd

Please sign in to comment.