フィルターのクリア

for finding peak. i tried findpeaks(). but its not working

6 ビュー (過去 30 日間)
Archana R
Archana R 2014 年 8 月 6 日
コメント済み: Image Analyst 2014 年 8 月 6 日
for the given
waveform
  2 件のコメント
Adam
Adam 2014 年 8 月 6 日
You need to give more information really. In what way does it not work? Assuming the waveform you show there is in discrete form in an array I would think findpeaks should work ok.
I sometimes find myself wanting to write my own peak-finding algorithm after trying findpeaks, but that usually comes from me identifying something specific about its output that I don't like and can't seem to paramaterise well enough to give what I want. For a general case it should be fine though.
Image Analyst
Image Analyst 2014 年 8 月 6 日
So now you have two threads on the same question. Why did you want that? What was wrong with your original discussion you had started in http://www.mathworks.com/matlabcentral/answers/146486-hi-i-have-a-signal-i-want-to-calculate-peak-and-area-of-the-signal

サインインしてコメントする。

回答 (2 件)

Nir Rattner
Nir Rattner 2014 年 8 月 6 日
編集済み: Nir Rattner 2014 年 8 月 6 日
Assuming that the image provided is the input format for the signal, you can use the “find” function with a threshold to get all of the black pixels which represent the signal. You may need to use the “smooth” function to get remove some of the unwanted blurriness and noise from the signal. At that point you can simply use the “findpeaks” function with the “y” data:
I = imread('PPG.jpg');
% Threshold to pull signal pixels
[y, x] = find(I(:, :, 1) < 150);
% Smooth to remove image artifacts
ySmooth = size(I, 1) - smooth(x, y, 0.02);
plot(x, ySmooth, 'r');
hold on;
axis equal;
% Find peaks of Y Data
[peaks, locations] = findpeaks(ySmooth);
plot(x(locations), ySmooth(locations), 'o');

Chad Greene
Chad Greene 2014 年 8 月 6 日

カテゴリ

Help Center および File ExchangeDescriptive Statistics についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by