myfirstgitrepo/heartrate/imageextract.m

11 lines
155 B
Matlab

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