Adding Heartrate.m

This commit is contained in:
Vattana 2023-02-09 16:57:37 +01:00
parent 220388d3b4
commit 6ad5173614
3 changed files with 17 additions and 0 deletions

BIN
heartrate/code.avi Normal file

Binary file not shown.

11
heartrate/imageextract.m Normal file
View File

@ -0,0 +1,11 @@
v = VideoReader('code.avi');
n = 1;
while hasFrame(v)
img = readFrame(v);
imgw= imwrite(img,strcat('image',num2str(n),'.png'));
imr = imread(imgw)
n = n+1
end
n=n-1;

6
heartrate/main.m Normal file
View File

@ -0,0 +1,6 @@
%set variable
imgDirectory = 'img';
fps = 60;
windowDuration = 30;
windowShift = 1;
roi =