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 view (last 30 days)
Show older comments
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;
0 Comments
Answers (0)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!