Inspiration

Silent strokes are non-symptomatic strokes that often go undetected and can become full-blown strokes if left untreated. According to the American Heart Association/American Stroke Association, 8 to 11 million Americans are estimated to be affected by silent strokes every year. Additionally, research by Leary M.C. et al found that the incidence of silent strokes are 1.6% of the US population between 30-39 and upwards to 16.4% of the US population between 70-79. Diagnosis is typically found accidentally when screening via MRI and CT for other neurological diseases.

Signs of silent stroke degeneration are imbalance or clumsiness in a limb that lasts for several days. Silent strokes can develop into full-blown strokes with worsened symptoms presented as memory problems, weakness or loss of muscle control, and partial paralysis.

Gait analysis is a common clinical assessment for neurological symptoms diagnosed by physicians. In addition, quantitative research has found that healthy individuals have a 30 degree hip flexion (the angle of which the hip bends when taking a step forward). Patients who cannot bend their hip 30 degrees when stepping forward indicate that they may have neurological damage. Patients who do not have even bending of the hip on each side of the leg (caused by imbalance) can also be experiencing an indicator for neurological damage.

There is a need to screen for silent strokes and stroke-like symptoms in the elderly population to identify and prevent further physiological and neurological degradations from the disease. We propose a diagnostic medical device that measures how far the hip bends when walking. Our vision is for this portable device to be used either at home or during annual check ups for the elderly population or individuals who suspect they may have had a silent stroke.

This project blends the biomedical engineering and electrical engineering knowledge of our team. Additionally, this is a very meaningful project, as one of our team members has a family history of stroke.

What it does

Our project performs object detection on the test subject's left and right side profiles as they are walking, and it simultaneously calculates the angles between their hips & knees and the floor. With normal motor function, the test subject is expected to have a 30 degree hip flexion (with some tolerance). After running the test, the test subject will see a message displayed on the monitor that tells them whether or not they should see a family physician.

How we built it

This project combines the biomedical engineering and electrical engineering backgrounds of our team members. The hardware we used includes the OpenMV-H7 (a machine vision camera) and a Raspberry Pi 3 Model B with a 16GB SD card.

To calculate the hip angle of a test subject, we programmed an object detection algorithm in Python for the OpenMV camera. The test subject has four rectangular pieces of white paper taped to their body: one on their left hip, one on their right hip, one on their left knee, and one on their right knee. The test subject walks back and forth in a straight line, alternating between their left and right side profiles facing the camera at all times. For each side profile of the test subject, our object detection script calculates the angle between the test subject’s hip & knee and the floor (see uploaded sketch in Project Media / Image Gallery), which should be horizontally parallel to the subject’s hip.

A separate Python script on the Raspberry Pi performs test runs, and each test run collects 6 samples of the hip angle (3 on each side). Then, the averages of the hip angle of each side profile is calculated and compared to the expected 30 degree angle with a +/- 7 degree tolerance (note: tolerance was calculated during our own test runs and was included because the angle at which someone naturally stands affects how much their hip bends).

Finally, a GUI on a monitor attached to the Raspberry Pi displays a message that indicates whether the test subject has normal or abnormal motor function. In accordance to the American Heart Association/American Stroke Association, those with abnormal motor function are recommended to see their family physician and inquire about the possibility of the occurrence of a silent stroke. Imbalance or clumsiness in a limb can last up to a few days before recovering, but many people never see a doctor for it. It is important to identify silent strokes, which often go undetected, using this medical device before a full-blown stroke occurs.

Challenges we ran into

The biggest challenge we ran into was setting up the test run algorithm on the Raspberry Pi. Although the hip angle value from the object detection algorithm is correct (the hip angle value from the OpenMV camera), the Raspberry Pi script receives multi-digit numbers as separate digits one at a time, and those separate digits are converted into non-sensible numbers. To further explain, the camera takes the hip angle and converts it into a string (i.e., the camera sends "34" as a string to the Raspberry Pi via a USB port). Then, the Raspberry Pi receives the string one character at a time but also adds newline (i.e., "b'3" "b'4").

When multiple hip angle values are sent, the values should look like "24" and then "25". However, the Raspberry Pi adds a newline between each hip angle value, so the output looks like "b'2" "b'5" "\r" "\n" "b'2" "b'4". This challenge affects the comparison between the expected hip angle and the recorded hip angle.

Accomplishments that we're proud of

Our biggest accomplishments for this project were connecting an IoT (internet of things) device (the Raspberry Pi) to a camera, have a functional object detection script for the camera, and have a functional GUI that integrates multiple functions between the camera and the Raspberry Pi. We are especially proud that the object detection is fully functional and can detect white rectangular markers on a patient's body and that the algorithm successfully calculates the angle of the hip bend. In addition, neither of us had any experience connecting devices for microcontrollers via virtual ports, and we were able to successfully transfer bytes between the camera and raspberry pi. Lastly, we were able to successfully create a GUI that collects data and outputs a response that the user can easily read. Overall, this project was the second Python-based project we both have ever done, and we are proud of the work that we created in the the last 24 hours.

What we learned

We learned three main things: how the raspberry pi communicates with other devices, how to implement a standalone GUI for the raspberry pi, and how to create a object detection script. We learned how strings and integers can be sent through a USB port for a continuous running script that outputs one specific variable. In addition, we learned how to use greyscale values to improve processing time and frame rate of our camera for object detection, and we learned more about detecting blobs and using their centers in order to draw a linear regression. We also learned one way to make a standalone GUI using tkinter for raspberry pi, and we better understood object oriented programming due to the restrictions of tkinter coding structure. Overall, we have gained a much better grasp on the utility of python for microcontrollers and hope that we can use the knowledge we gained moving forward in our hardware based curriculum and extracurriculars

What's next for Silent Stroke Detector

Given more time, we will fix the Raspberry Pi's test run algorithm so that the hip angle values from the OpenMV's object detection algorithm are read correctly. We also would like to improve the design of the GUI by making it more eye-appealing and by displaying the difference between a test subject's expected hip angle of 30 degrees and their recorded left and right hip angles. Finally, since our vision is for this project to be a portable medical device, we would like to build a case that safely carries the Raspberry Pi and props up the OpenMV camera.

Built With

Share this project:

Updates