Clear Filters
Clear Filters

Separate windows signal and peak detection

4 views (last 30 days)
Ilan Moshe
Ilan Moshe on 30 May 2021
Edited: Image Analyst on 5 Jul 2021
In the below picture, I have to detect each window, where each augmentation of the signal represents an air inspiration. So, it's important to separate each window in order to get an accurate breath rate.
%data_blue{i}.meanBlueLevels --> Original signal (subplot(2,1,1))
I tried to use the built function envelope with the 'peak' parameter, but I think it will be not have enough robustness ... (I should avoid using of any threshold.)
Any help is much appreciated. Thank you.

Answers (2)

Image Analyst
Image Analyst on 30 May 2021
Edited: Image Analyst on 30 May 2021
Attach your data. What if you just threshold? Why do you refuse to use a threshold? It looks like it would work well.
itsABreath = signal > 1; % Or whatever value works.
This will be true if the signal is more than 1 and false if it's less than 1.
If you have the Image Processing Toolbox, you can label each breath and then use regionprops(), or ismember() and find(), to find the starting and stopping index of each breath.
We've seen this before with audio signals and people wanted to determine the voiced and silent parts of the audio recording so you might search for silent, silence, voice, words, and things like that.
Image Analyst
Image Analyst on 5 Jul 2021
Edited: Image Analyst on 5 Jul 2021
Sorry, I didn't notice your comment. Are you still having trouble?
And scroll down to see @Aldema's suggestion.

Sign in to comment.

Alexis on 5 Jul 2021

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!