Page 1 of 1

non-contact heart rate and respiration rate monitoring

Posted: Fri Jul 22, 2016 12:40 am
by almi
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

Re: non-contact heart rate and respiration rate monitoring

Posted: Sat Oct 22, 2016 9:50 pm
by almi
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

Re: non-contact heart rate and respiration rate monitoring

Posted: Sat Sep 16, 2017 7:22 pm
by cade
What's the status on this project? I'm interested in being able to track respiration/heart rate of small groups of people.

Re: non-contact heart rate and respiration rate monitoring

Posted: Sun Sep 17, 2017 5:43 pm
by almi
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.

Re: non-contact heart rate and respiration rate monitoring

Posted: Sun Jan 07, 2018 2:40 am
by tomf90
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

Re: non-contact heart rate and respiration rate monitoring

Posted: Sun Jan 07, 2018 4:36 pm
by almi
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.

Re: non-contact heart rate and respiration rate monitoring

Posted: Mon Jan 08, 2018 7:25 am
by tomf90
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

Re: non-contact heart rate and respiration rate monitoring

Posted: Mon Jan 08, 2018 4:08 pm
by almi
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.

Re: non-contact heart rate and respiration rate monitoring

Posted: Mon Jan 08, 2018 8:37 pm
by tomf90
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

Re: non-contact heart rate and respiration rate monitoring

Posted: Tue Jan 09, 2018 3:01 pm
by almi
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!

Re: non-contact heart rate and respiration rate monitoring

Posted: Tue Jan 23, 2018 3:10 pm
by yiannisk
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.

Re: non-contact heart rate and respiration rate monitoring

Posted: Tue Jan 23, 2018 5:26 pm
by almi
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).

Re: non-contact heart rate and respiration rate monitoring

Posted: Wed Jan 24, 2018 6:15 am
by yiannisk
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?

Re: non-contact heart rate and respiration rate monitoring

Posted: Wed Jan 24, 2018 4:43 pm
by almi
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?

Re: non-contact heart rate and respiration rate monitoring

Posted: Wed Jan 24, 2018 5:11 pm
by yiannisk
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.

Re: non-contact heart rate and respiration rate monitoring

Posted: Wed Jan 24, 2018 6:11 pm
by almi
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).

Re: non-contact heart rate and respiration rate monitoring

Posted: Wed Jan 24, 2018 6:36 pm
by yiannisk
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.

Re: non-contact heart rate and respiration rate monitoring

Posted: Wed Mar 21, 2018 3:53 pm
by almi
A small ALT-based biofeedback demonstration / an ‘artsy’
“Relaxation” installation:

https://youtu.be/xgvhUrNapjA

The details/explanations are here:
https://www.linkedin.com/pulse/non-cont ... -misharin/

As mentioned above, ambient light, including incandescent light,
is much, much, much less of an issue if there is a filter in front of the IR camera.
Kinects and Structure Sensors have such IR filter optics.

Re: non-contact heart rate and respiration rate monitoring

Posted: Tue Nov 06, 2018 8:38 am
by bonzadog
almi wrote:
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.
6.11.2018

I am really interested in the project and need to build such a device.
Cann the breathing be monitored in the different sleeping position?
Please send any further information --- many thanks !.

Re: non-contact heart rate and respiration rate monitoring

Posted: Tue Nov 06, 2018 3:32 pm
by almi
Respiration and heartbeats can be monitored for any position of a person.
Even when that person is completely hidden under a blanket.

You can follow the description of the ALT tech which you can find at https://github.com/lvetech/ALT to build your system provided you comply with the License linked at the bottom of the https://github.com/lvetech/ALT page. Some of the comments above might also be helpful.