필터 지우기
필터 지우기

Automatic Signal segmentation for feature extraction

조회 수: 14 (최근 30일)
Radons
Radons 2018년 1월 21일
댓글: Image Analyst 2022년 11월 4일
Hi,
Does anyone know how to do signal segmentation on the raw signal? I need to segment the raw signal into 8 different segments so that i can do feature extraction on individual segments.
  댓글 수: 2
Star Strider
Star Strider 2018년 1월 21일
What is the corresponding time vector that corresponds to those samples, or the sampling frequency?
Radons
Radons 2018년 1월 21일
It is sampled at 1Khz

댓글을 달려면 로그인하십시오.

채택된 답변

Image Analyst
Image Analyst 2018년 1월 21일
Attach some signals so we can play with them.
Assuming the "tall" parts of the signal are not uniformly spaced (in which case you could extract them trivially with indexing at fixed indexes), then you need to find the center of the quiet parts. I'd start by thresholding the absolute value of the signal to find the low/quiet parts. You should have 9 of them, unless your tall signal parts hit the edge of your range. If you don't have 9, then I'd call imdilate repeatedly until you get exactly 9 quiet regions. Then I'd call regionprops() to get the centroid (middle index) of the quiet parts, and then I'd loop over the regions extracting the tall regions into cells. They need to be in cells because each region might have a different number of elements. Something like (untested)
quietParts = abs(signal) < threshold;
[~, numRegions] = bwlabel(quietParts);
while numRegions > 9
quietParts = imdilate(quietParts, [1,1,1]);
[~, numRegions] = bwlabel(quietParts);
end
% Now we should have the quiet parts. Find the centroids.
props = regionprops(quietParts, 'Centroid');
% Extract each tall signal part into a cell
for k = 1 : length(props)-1
index1 = round(props(k).Centroid;
index2 = round(props(k+1).Centroid;
individualSignals{k} = signal(index1:index2);
end
Note, the code above requires the Image Processing Toolbox.
  댓글 수: 19
Cey
Cey 2022년 11월 4일
thank you for your help @Walter Roberson
Image Analyst
Image Analyst 2022년 11월 4일
@Cey by now I imagine you've found one. You can just use trial and error until you get the right one. If you have any more questions, start your own discussion thread so we're not bugging @Radons on his 4 years old question with emails about activity on it.

댓글을 달려면 로그인하십시오.

추가 답변 (1개)

Hristo Zhivomirov
Hristo Zhivomirov 2019년 10월 13일
Hi, Radons!
I think that this the most suitable, easy-to-use and straightforward way.
Also, you can use the example.m file as reference.
All best,
Hristo

카테고리

Help CenterFile Exchange에서 Get Started with Signal Processing Toolbox에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by