I have recorded a rgb video and extract g frames vector and calculate it's mean now I want to calculate beats per minute kindly help how can I calculate BPM
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
vid= VideoReader('output.avi');
numFrames = vid.NumberOfFrames;
n=numFrames;
for x = 1:n
vidFrame = read(vid,x);
G = vidFrame(330:680, 500:780,2);
g(x)=mean2(G);
end
0 Kommentare
Antworten (1)
Bjorn Gustavsson
am 18 Jun. 2021
In order to estimate frequencies you have to look at the time-variation of your signal, depending on the variability of this you might get away with a single Fourier-transform of your time-series, but if your signal has a varying frequency (heart-rate of a resting person that then starts running, or a melody being played on a piano for example) you might be better off looking at its stft using the spectrogram function. My advice is to have a look at the help and documentaion to spectrogram.
HTH
0 Kommentare
Siehe auch
Kategorien
Mehr zu Time-Frequency Analysis finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!