Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

get trigger at peak #28

Open
stephanschulz opened this issue Nov 9, 2020 · 5 comments
Open

get trigger at peak #28

stephanschulz opened this issue Nov 9, 2020 · 5 comments

Comments

@stephanschulz
Copy link

Thank you again for posting this code.
I am able to make it run and I find it works great. I was even able to integrate it in to a openframeworks.cc application.

I was hoping you could point me to the right part of the code where I might be able to extract the moment of a peak. My goal is to make the heart beat readings audible by playing a sound every time we get a peak. The hope if that it will align more or less with the person's actual pulse.

Thank you for any advice.

@prouast
Copy link
Owner

prouast commented Nov 9, 2020

That's great to hear. To get those timings, you would need to add peak detection to the algorithm - this is currently not implemented.

@stephanschulz
Copy link
Author

Thanks for the info.

Am I assuming correctly to do that on the s_f.rows data?
If I get something useful working I will make a PR.

@stephanschulz
Copy link
Author

Again thank you for the tip about peak detection.
I forked your code and made an attempt to add it using this c++ implementation of the using z-scores peak detection algorithm https://stackoverflow.com/questions/22583391/peak-signal-detection-in-realtime-timeseries-data/46998001#46998001

The added code draws an additional graph showing the peaks and troughs of the s_f curve. It also draws a filled circle every time the most recent peak value equals 1.

All this was done to get me one step closer to visualizing the onset of the live heart beat.

Screen Shot 2020-11-13 at 9 11 01 AM

@prouast
Copy link
Owner

prouast commented Nov 18, 2020

Thanks for keeping me up to date on this, very cool to see.

@Jon-Zbw
Copy link

Jon-Zbw commented Aug 13, 2021

很高兴听到。要获得这些时间,您需要在算法中添加峰值检测--这目前还没有实现。

谢谢你让我了解最新情况,很酷。

Its pretty good!!!Do you have Python version?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants