neon_usb
¶
pupil_labs.neon_usb package.
Library for connecting to Neon via USB
Modules:
-
cameras– -
frame– -
pyrav4l2– -
queue_utils– -
usb_utils–
Classes:
-
Frame– -
IMU–Cython wrapper for Neon USB IMU device.
-
IMUData–Data from the Inertial Measurement Unit (IMU).
-
SceneCamera–Provides an interface for handling the Neon scene camera.
Functions:
-
get_all_items–Retrieve all items from a queue and always at least one.
Frame
dataclass
¶
IMU
¶
IMU(*args, **kwargs)
Cython wrapper for Neon USB IMU device.
Methods:
-
get_imu_data–Get the latest IMU data from the device.
-
start_sensors–Start the IMU sensors.
-
stop_sensors–Stop the IMU sensors.
IMUData
¶
Bases: NamedTuple
Data from the Inertial Measurement Unit (IMU).
Contains gyroscope, accelerometer, and rotation data from the IMU sensor.
Attributes:
-
accel_data(Data3D) –Accelerometer data in m/s².
-
datetime(datetime) –Get timestamp as a datetime object.
-
gyro_data(Data3D) –Gyroscope data in deg/s.
-
quaternion(Quaternion) –Rotation represented as a quaternion.
-
timestamp_unix_ns(int) –Get timestamp in nanoseconds since Unix epoch.
-
timestamp_unix_seconds(float) –Timestamp in seconds since Unix epoch.
SceneCamera
¶
SceneCamera(spec: CameraSpec = NEON_SCENE_CAMERA_SPEC)
Bases: Camera
Provides an interface for handling the Neon scene camera.
The class is assuming that no more than one Neon device is connected to the computer at the same time.
The camera stream will be started right away. If the object fails to grab frames, it will automatically try to reinitialize.
Methods:
-
get_intrinsics–Retrieve the scene camera intrinsics of the Neon device
Source code in src/pupil_labs/neon_usb/cameras/scene.py
34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 | |
get_intrinsics
staticmethod
¶
get_intrinsics() -> SceneIntrinsics
Retrieve the scene camera intrinsics of the Neon device
Returns:
-
SceneIntrinsics–Tuple containing camera matrix and distortion coefficients of scene camera.
Source code in src/pupil_labs/neon_usb/cameras/scene.py
64 65 66 67 68 69 70 71 72 73 74 75 76 77 | |
get_all_items
¶
Retrieve all items from a queue and always at least one.
Source code in src/pupil_labs/neon_usb/queue_utils.py
13 14 15 16 17 18 19 20 21 22 23 24 | |