clc, clear, close all

video_name = '14-38-34_still_60fps_lowres.mp4';
video_name = 'video_out_19-17-3.79.avi';
cutout_name = 'amplified_still_60fps_lowres.avi';
video = VideoReader(video_name);
cutout = VideoReader(cutout_name);
iFrame = readFrame(video);
cutFrame = readFrame(cutout);

a = readmatrix('forehead_19-17-3.79.txt');
a(1,:) = [];

imshow(iFrame)
% line(a(1:2,1)', a(1:2,2)', 'Color', 'red', 'LineWidth', 2)
% line(a(2:3,1)', a(2:3,2)', 'Color', 'red', 'LineWidth', 2)
% line(a(3:4,1)', a(3:4,2)', 'Color', 'red', 'LineWidth', 2)
% line([a(4,1) a(1,1)], [a(4,2) a(1,2)], 'Color', 'red', 'LineWidth', 2)

% figure()
% imshow(cutFrame)