Some classes to know about and main workflow (see StartTracking method in EyeTracker class):
- EyeTracker loads an implementation of EyeTrackingSystem. The EyeTrackingSystem creates and configures the CameraEye(s).
- EyeTracker starts an ImageGrabber (thread 1) which grabs ImageEye(s) from the CameraEye(s).
- ImageEye is a wrapper for an EmguCV Image<Gray, byte>, holds also the ImageEyeTimestamp.
- EyeTracker also starts an **EyeTrackerProcessor (**thread 2 and 3 + more optionally) ****which uses an implementation of IEyeTrackingPipeline to process ImageEye(s) and add EyeData to it. ****
- When requested, an implementation of CalibrationSession (thread 4) starts and also processes the ImageEye(s) to calculate the EyeCalibration including the EyePhisicalModel and the EyeData for the reference (zero) eye position. One limitation is that plugins can implement new ways to calibrate but they cannot change the calibration data structures.
- When requested RecordingSession (thread 5) starts and records data, videos, calibration and events, to a new folder.
Other important classes and what they do
- EyeTracerGui is the main graphical interface and communicates with EyeTracker via commands in EyeTrackerGuiViewModel.
- VideoPlayer allows to run the entire system with videos instead of cameras. Both CameraEye and VideoEye implement the interface IImageEyeSource which is how the ImageGrabber interfaces with them.
- EyeTrackerSettings manages the settings of OpenIris. They are built to work with the PropertyGrid control in the UI and it gets serialized into an xml file automatically.
- EyeTrackerPluginManager loads plugins from the main DLL and other DLLs that can be developed. It can load plugins in runtime. Don’t need to recompile OpenIris to create new plugins. There are three types of plugins:
- Classes inheriting from EyeTrackingSystem. Custom settings inheriting from EyeTrackingSystemSettings. It must create the CameraEye(s) but it can also include custom methods for pre-processing and postprocessing the images as well as custom UI and custom menu. It can also create custom implementations of VideoEye if there is something specially about the videos from this system like timestamps embedded in pixels.
- Classes inheriting from CalibrationSession. Custom settings inheriting from CalibrationSettings.
- Classes implementing the interface IEyeTrackingPipeline. Custom settings inheriting from EyeTrackingPipelineSettings.
- EyeTrackerRemoteService implements a remote service via TCP (or a more limited one via http). It publishes a series of methods and then a IEyeTrackerService can be instantiated to call the service remotely.