NOTE: Out-dated gist. Use this one instead.
This file contains hidden or 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 argparse | |
| import csv | |
| import logging | |
| import os | |
| import traceback as tb | |
| import numpy as np | |
| import msgpack | |
This file contains hidden or 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 logging | |
| import time | |
| from pyglui import ui | |
| from plugin import Plugin | |
| from background_helper import IPC_Logging_Task_Proxy | |
| logger = logging.getLogger(__name__) |
This file contains hidden or 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 cv2 | |
| from pyglui import ui | |
| from pyglui.cygl.utils import draw_polyline, RGBA | |
| from OpenGL.GL import GL_POLYGON | |
| from circle_detector import CircleTracker | |
| from plugin import Plugin | |
This file contains hidden or 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
| { | |
| // Use IntelliSense to learn about possible attributes. | |
| // Hover to view descriptions of existing attributes. | |
| // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 | |
| "version": "0.2.0", | |
| "configurations": [ | |
| { | |
| "name": "Pupil Capture", | |
| "type": "python", | |
| "request": "launch", |
This file contains hidden or 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 |
This file contains hidden or 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 logging | |
| from pathlib import Path | |
| import cv2 | |
| from datetime import datetime | |
| from pupil_recording import PupilRecording | |
| from plugin import Plugin | |
| logger = logging.getLogger(__name__) |
This file contains hidden or 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
| fixations_on_surface_magazine_concord_caption_1487539793.5600355.csv | |
| Maximum difference: | |
| norm_pos_x 4.635625e-12 | |
| norm_pos_y 3.622880e-12 | |
| x_scaled 4.932872e-10 | |
| y_scaled 3.086825e-09 | |
| dtype: float64 | |
| fixations_on_surface_magazine_concord_image_1487539724.7831304.csv | |
| Maximum difference: |
This file contains hidden or 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
| # Part 1: Load file and visualize/transform single reference locations | |
| # Requires https://pypi.org/project/msgpack/ | |
| import sys | |
| import msgpack | |
| # Adjust the following variables to your recording | |
| world_video_resolution = (1280, 720) | |
| path_to_reference_locations = "/Volumes/32TB/users/ppr/recordings/2019_09_04/000/offline_data/reference_locations.msgpack" |
Third-party cameras - Pupil Capture supports third-party USB cameras that fulfill the following criteria:
- UVC compatible (Chapters below refer to this document)
- Support
Video Interface Class Code 0x0E CC_VIDEO(see A.1) - Support
Video Subclass Code 0x02 SC_VIDEOSTREAMING(see A.2) - Support for the
UVC_VS_FRAME_MJPEG (0x07)video streaming interface descriptor subtype (A.6) - Support
UVC_FRAME_FORMAT_COMPRESSEDframe format
Access Pupil cameras via libuvc These are the steps that pyuvc uses to access Pupil cameras: