almi
Posts: 19
Joined: Thu Jul 21, 2016 12:22 am

non-contact heart rate and respiration rate monitoring

Fri Jul 22, 2016 12:40 am

Hi,

I have built a simple Raspberry Pi + Pi NoIR camera based system for non-contact real-time heart rate and respiration rate monitoring.
I have posted a short description of the tech with data here: https://www.linkedin.com/pulse/use-arti ... t-misharin

almi
Posts: 19
Joined: Thu Jul 21, 2016 12:22 am

Re: non-contact heart rate and respiration rate monitoring

Sat Oct 22, 2016 9:50 pm

I am working on several applications of this technology. Some of them are:

“What has happened while we slept?"
(https://www.linkedin.com/pulse/what-has ... r-misharin)
shows that ALT can detect heartbeats and respiration even when a person is completely covered by a thick blanket, and that ALT uses motion detection algorithm which allows detecting small body movements.

“When your heart beats”
(https://www.linkedin.com/pulse/when-you ... r-misharin)
discusses potential applications of the ALT technology in medical imaging, including non-contact analog of the seismocardiography method of monitoring the mechanical activity of a heart.

This is still a research project.
My intention is to release it under an open source license at some point.
Let me know if this tech is something of interest to you / your projects, I will be happy to have a discussion.
  • Image

cade
Posts: 2
Joined: Mon Jul 31, 2017 8:47 pm

Re: non-contact heart rate and respiration rate monitoring

Sat Sep 16, 2017 7:22 pm

What's the status on this project? I'm interested in being able to track respiration/heart rate of small groups of people.

almi
Posts: 19
Joined: Thu Jul 21, 2016 12:22 am

Re: non-contact heart rate and respiration rate monitoring

Sun Sep 17, 2017 5:43 pm

cade, all:
The invitation above stands. If you are thinking about using the ALT tech in any of your projects, send me a message. I will be happy to talk.
cade:
Monitoring respiration rates and heart rates of several people looks possible to do using ALT.

tomf90
Posts: 12
Joined: Sun Dec 10, 2017 5:36 pm

Re: non-contact heart rate and respiration rate monitoring

Sun Jan 07, 2018 2:40 am

This is a very interesting monitoring device that you're creating!.. How are you progressing? I was hoping to implement a breathing and heart rate monitor within my baby monitor for my engineering project at university and this is the only thing I can find that seems capable of doing that accurately. Have you made a tutorial i could follow or is it open source yet? If not, any suggestions you could give me would be very appreciated. Many thanks, Tom

almi
Posts: 19
Joined: Thu Jul 21, 2016 12:22 am

Re: non-contact heart rate and respiration rate monitoring

Sun Jan 07, 2018 4:36 pm

https://github.com/lvetech/ALT
Note: The license is for the noncommercial use only.
The ALT technology includes both the software and the hardware components.

Beauty of ALT is in its simplicity. )
As always, anybody can ask me any questions related to the ALT tech and its use in any projects.

tomf90
Posts: 12
Joined: Sun Dec 10, 2017 5:36 pm

Re: non-contact heart rate and respiration rate monitoring

Mon Jan 08, 2018 7:25 am

Do I just need to download the source code .tar files or do you have a tutorial I can follow or is it just the simple-ALT-raw.py page?

Thanks, Tom

almi
Posts: 19
Joined: Thu Jul 21, 2016 12:22 am

Re: non-contact heart rate and respiration rate monitoring

Mon Jan 08, 2018 4:08 pm

simple-ALT-raw.py
is all you need to capture ALT data from the Pi NoIR camera’s video stream.
Simple. )

One would also need a light source for ALT.
For example, light emitter of any structured light -based depth-sensing camera can be used as such.
E.g., Kinect for Xbox 360 can be connected to a Raspberry Pi and libfreenect (https://github.com/OpenKinect/libfreenect) can be used to activate/deactivate its light emitter.

tomf90
Posts: 12
Joined: Sun Dec 10, 2017 5:36 pm

Re: non-contact heart rate and respiration rate monitoring

Mon Jan 08, 2018 8:37 pm

Ah brilliant!

Two quick questions, i'm currently using the Pi NOIR cam to stream video, can this use the camera module at the same time or does it need its own independent camera? Also, just about to order an Xbox 360 kinect, i'm assuming I need the one with the PSU as it wont be able to be powered directly from the RPI?

Thanks, Tom

almi
Posts: 19
Joined: Thu Jul 21, 2016 12:22 am

Re: non-contact heart rate and respiration rate monitoring

Tue Jan 09, 2018 3:01 pm

Please consult the “Picamera” library documentation (http://picamera.readthedocs.io).
E.g. "3.13. Recording to a network stream”:
http://picamera.readthedocs.io/en/relea ... ork-stream

I use Kinect with its own power supply.

good luck!

yiannisk
Posts: 8
Joined: Sat Mar 28, 2015 5:19 pm

Re: non-contact heart rate and respiration rate monitoring

Tue Jan 23, 2018 3:10 pm

Very interesting project.

I was just wondering if this can be used without a pi camera but using a normal usb web camera.
Secondly, I saw the simple-ALT-raw.py code and what I understood is (I can not run the code without a pi camera) that this code finally save the sSAD data. How do you process this data in order to get the heart rate?

Thanks.

almi
Posts: 19
Joined: Thu Jul 21, 2016 12:22 am

Re: non-contact heart rate and respiration rate monitoring

Tue Jan 23, 2018 5:26 pm

You can make an ALT system using a USB camera provided that the ALT system has a light source element which produces the additional light texture which is captured by the USB camera (the light texture is “visible” to the USB camera). Light spots produced by Kinect for Xbox 360 are “visible” to the Pi NoIR camera. Note also that the “picamera” library does not work with USB cameras: http://picamera.readthedocs.io/en/relea ... usb-webcam.

You can calculate a fast Fourier transform of a sSAD data series in order to obtain heart rate and respiration rate information. See https://docs.scipy.org/doc/numpy-1.13.0 ... .rfft.html.
https://github.com/lvetech/ALT/blob/mas ... xample.jpg shows a "power FFT spectrum" calculated for a sSAD data series (e.g. sSAD_fft_power = np.abs(np.fft.rfft(sSAD_data))**2).

yiannisk
Posts: 8
Joined: Sat Mar 28, 2015 5:19 pm

Re: non-contact heart rate and respiration rate monitoring

Wed Jan 24, 2018 6:15 am

Thank you. I guess using visible light texture with USB cam is not a problem in my project.

How long does it take to get the first measurement? Do I have to wait for as long as the experimentDurationHours variable is (half hour) or can I get results within 2-5 sec?

almi
Posts: 19
Joined: Thu Jul 21, 2016 12:22 am

Re: non-contact heart rate and respiration rate monitoring

Wed Jan 24, 2018 4:43 pm

yiannisk wrote: ...
How long does it take to get the first measurement?
...

Generally, it depends on the type and the quality of the results you want to obtain.
For example, if you want to get a hart rate based on FFT, than your data set better cover at least several heartbeats. The longer your data set the better the “accuracy” of your FFT-based measurements (provided the heart rate stays constant during those measurements).
As another example, you can calculate an “instant heart rate" by finding the inverse of the time interval between two consecutive heartbeats and multiplying it by 60 (to get a "beats per minute" value). So, you need just two heartbeats in this case.

In “simple-ALT-raw.py”, the whole “experimentDurationHours” is split into the “timeSliceDurationMinutes” intervals. The ALT data is saved for each of these intervals in a separate folder right after the interval has ended.

What are you working on?

yiannisk
Posts: 8
Joined: Sat Mar 28, 2015 5:19 pm

Re: non-contact heart rate and respiration rate monitoring

Wed Jan 24, 2018 5:11 pm

I am working on an art installation, so accuracy is not critical. So you can constantly update the heart rate while he/she stays on camera and have better the results.

almi
Posts: 19
Joined: Thu Jul 21, 2016 12:22 am

Re: non-contact heart rate and respiration rate monitoring

Wed Jan 24, 2018 6:11 pm

ALT is “sensitive” to changes in the ambient illumination
(the changes, I guess, might be present in an art installation).
If you are using using a Kinect for Xbox 360 or an Occipital Structure Sensor (https://structure.io/) as a light source element and a Pi NoIR camera as a camera element for an ALT setup and if there are substantial and rapid ambient light variations which can be picked up by the Pi NoIR camera (e.g. incandescent light), you can put an optical filter in front of the camera to reduce the effect of the light variations
(the filter which lets into the camera mostly the wavelengths around those on which the Kinect’s or the Sensor’s light emitter operates).
Alternatively, you can capture the IR video stream directly from the Kinect or the Sensor and process the frames in that stream to get the ALT data. Both Kinect and Sensor already have built-in IR filter optics.

Respiration and body movements might also be an interesting source of “biofeedback” (for an art installation or otherwise).

yiannisk
Posts: 8
Joined: Sat Mar 28, 2015 5:19 pm

Re: non-contact heart rate and respiration rate monitoring

Wed Jan 24, 2018 6:36 pm

That would be a problem, because it is a light installation, so there will be a lot of light changes. It seems that I will have to go to a more traditional "index finger" detection process. But I will have in mind this approach for a future work.

Return to “Automation, sensing and robotics”

Who is online

Users browsing this forum: RzLi and 15 guests