i have recorded a rgb video and extract g frames vector i have plotted intensity peaks of g frame and calculated beats per minute but results are not in normal range.

1 Ansicht (letzte 30 Tage)
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 a=linspace(0,30,n); [pk,lk] = findpeaks(g,a); plot(a,g,lk,pk,'o') xlabel('Time[s]'); ylabel('Intensity[\infty units]'); BPM=(size(pk,2))*2; BPS=BPM/60;

Antworten (0)

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by