Skip to content

Commit

Permalink
Pass 3D points in triangulate command
Browse files Browse the repository at this point in the history
  • Loading branch information
roomrys committed Jan 23, 2025
1 parent 956e110 commit 674538d
Showing 1 changed file with 2 additions and 12 deletions.
14 changes: 2 additions & 12 deletions sleap/gui/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -3772,20 +3772,10 @@ def do_action(cls, context: CommandContext, params: dict):
calib=session.camera_cluster,
excluded_views=frame_group.excluded_views,
) # F x T x N x 3

# Reproject onto all views
pts_reprojected = reproject(
points_3d,
calib=session.camera_cluster,
excluded_views=frame_group.excluded_views,
) # M=include x F=1 x T x N x 2

# Sqeeze back to the original shape
points_reprojected = np.squeeze(pts_reprojected, axis=1) # M=include x TxNx2

# Update or create/insert ("upsert") instance points

frame_group.upsert_points(
points_3d=points_reprojected,
points=points_3d,
instance_groups=instance_groups,
exclude_complete=True,
)
Expand Down

0 comments on commit 674538d

Please sign in to comment.