Final Change

This commit is contained in:
Alexandre VEROT 2023-02-19 18:47:11 +01:00
parent f1ca2455dc
commit ccfc387b45
3 changed files with 980 additions and 975 deletions

View File

@ -8,8 +8,8 @@ fps = 30;
%Load the data inside Octave from our first code
data = load("dataRGB");
greenchannel = data(:,2);
n = data(:,2);
greenchannel = data(:,3);
n = data(:,3);
%Numerization of the values
greenchannel_avg = mean(greenchannel);
@ -27,8 +27,13 @@ n = length(greenchannel_normalized);
fr = (0:n-1)*(fps/n);
power = abs(y).^2/n;
figure(1)
plot(fr, y,'linewidth',1)
ylim([-80 80])
xlim([0.75 4])
figure(2)
plot(fr, power,'linewidth',3);
plot(fr, power,'linewidth',1);
xlabel('Frequency')
ylabel('Power')
ylim([0 10])
xlim([0.75 4])

View File

@ -40,7 +40,7 @@ for i in range(num_frames):
if len(face) > 0:
x, y, w, h = face[0]
face = frame[y:y+h, x:x+w]
frame = cv2.rectangle(frame, (int(x*1.15), int(y*1)),
frame = cv2.rectangle(frame, (int(x*2), int(y*1)),
(x + int(w*0.7), y + int(h*0.2)), (0, 255, 0), 3)
# Show image to check if the rectangle is well positioned on the forehead
# cv2.imshow("Faces", frame)

1942
dataRGB

File diff suppressed because it is too large Load Diff