Created
July 17, 2019 11:13
-
-
Save papr/655cc5f005ca032b0eb602317e89f9ba to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import msgpack | |
ref_file_path = "reference_locations.msgpack" | |
with open(ref_file_path, "rb") as fh: | |
ref_locs = msgpack.unpack(fh, raw=False) | |
print("Reference location data format:", ref_locs["version"]) | |
# Reference locations | |
# ref_locs["data"] = [ref_loc, ...] | |
# ref_loc = [[screen_x, screen_y], frame_index, timestamp] | |
ref_loc = ref_locs["data"][0] # requires at least one reference location | |
[screen_x, screen_y], frame_index, timestamp = ref_loc |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment