pupil_recording_interface.VideoDisplay
- class pupil_recording_interface.VideoDisplay(name, flip=False, resolution=None, max_width=None, block=True, **kwargs)
Bases:
pupil_recording_interface.process.BaseProcess
Display for video stream.
This process displays camera frames produced by video streams. Previous processes in the pipeline can add overlays onto the frame, e.g., detected pupils or calibration markers, if they are created with
display=True
. This process should generally be the last in the pipeline.- __init__(name, flip=False, resolution=None, max_width=None, block=True, **kwargs)
Constructor.
- Parameters
name (str) – Name of the video display.
flip (bool) – If True, flip the image in the vertical direction. May be necessary for one of the eye camera streams.
resolution (Optional[tuple]) – If specified, scale the window to this resolution.
max_width (Optional[int]) – If specified, scale the window to this width if it would be wider.
Methods
Config
(*args, **kwargs)Configuration for this class.
__init__
(name[, flip, resolution, …])Constructor.
Close the window for this process.
Create a cv2.namedWindow.
from_config
(config, stream_config, device, …)Create a process from a ProcessConfig.
process
(packet, notifications)Process new data.
process_notifications
(notifications)Process new notifications.
process_packet
(packet)Process a new packet.
show_frame
(packet)Show video frame in window.
start
()Start the process.
stop
()Stop the process.
Attributes
process_type
- classmethod Config(*args, **kwargs)
Configuration for this class.
- close_window()
Close the window for this process.
- create_window()
Create a cv2.namedWindow.
- classmethod from_config(config, stream_config, device, **kwargs)
Create a process from a ProcessConfig.
- process(packet, notifications)
Process new data.
- process_notifications(notifications)
Process new notifications.
- process_packet(packet)
Process a new packet.
- show_frame(packet)
Show video frame in window.
- start()
Start the process.
- stop()
Stop the process.