Skip to content
This repository was archived by the owner on Jul 26, 2020. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions sb_vision/tokens.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,11 +89,9 @@ def update_pixel_coords(

self.homography_matrix = homography_matrix

# The pixel_corners value we expose is in clockwise order starting with
# the bottom left corner of the marker (if it weren't rotated).
# AprilTags returns an array with the first being the top left. thus we need to
# shift the ordering of the values by one to match our output.
self.pixel_corners = [pixel_corners[3]] + pixel_corners[:3]
# pixel corners: counter-clockwise from the bottom-left corner (relative to the marker) of the marker.
# For example, if the marker is upside down, the first corner coordinate will be the in the top right.
self.pixel_corners = pixel_corners

# centre of marker: average the corners
self.pixel_centre = PixelCoordinate(*np.average(pixel_corners, axis=0))
Expand Down