SEIN researchers used MATLAB, Simulink, and Computer Vision System Toolbox™ to build a system that automatically detects epileptic seizures by analyzing the movements of epilepsy patients using video data.
Dr. Kalitzin began by partitioning the project into three segments: image acquisition, processing and analysis, and system output. This facilitated a modular system design, enabling the researchers to focus on algorithm development and switch between various input formats and output options.
The team used Simulink and Computer Vision System Toolbox to acquire video data from existing AVI and MPEG files, enabling them to test their algorithms from hundreds of patient videos.
Epileptic seizures are characterized by specific kinds of patient movement: myoclonic seizures are distinguished by single jerks, tonic seizures by stiffening, and clonic seizures by repetitive, rhythmic jerks. SEIN researchers used Computer Vision System Toolbox to detect this motion in video sequences using optical flow techniques.
They estimated velocity fields using the Optical Flow block from Computer Vision System Toolbox and then averaged the velocity fields over multiple frames to reduce the amount of data to be processed. They also isolated positive and negative velocity elements to avoid mutual cancellation between pixels. The team then refined this algorithm by processing thousands of image streams of patients in various positions.
After developing the algorithm for detecting seizures, the team used MATLAB, Statistics and Machine Learning Toolbox™, Image Processing Toolbox™, and Signal Processing Toolbox™ to validate the results by comparing them to methods that rely on electromyography, EEG, and video.
Validation results were then used to adjust the sensitivity of the algorithm using a Simulink model. Depending on whether the application will be used for diagnosis or real-time patient monitoring, the model can be increased to detect all seizure-like events or reduced to lower the number of false positives.
Kalitzin plans to enhance the algorithm by automatically selecting a region of interest, which will minimize false positives caused by caregivers that enter the frame. SEIN researchers are also working with other hospitals on automated real-time monitoring of patients using Image Acquisition Toolbox™ to acquire video data from a web camera.