Skip to content
This repository was archived by the owner on Jul 26, 2020. It is now read-only.
Open
Changes from 3 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
7 changes: 2 additions & 5 deletions sb_vision/tokens.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,11 +89,8 @@ 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: clockwise from the top left corner (relative to the marker) of the marker
self.pixel_corners = pixel_corners

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