Altmetrics
Downloads
247
Views
141
Comments
0
Submitted:
23 February 2023
Posted:
24 February 2023
You are already at the latest version
ROI Name | ROI Description* | Associated Signals | Description of Signal |
ROI A |
ROI centred on Forehead xmin=xmin_bbox+(1/3)*bbox_w ymin=ymin_bbox+(1/10)*bbox_h width = (1/3)*bbox_w height = (1/5)*bbox_h |
SIGNAL 1.1 | Green (RGB) signal (FFT) |
SIGNAL 1.2 | Green (RGB) signal (Welch) | ||
SIGNAL 2.1 | Luminance (YCbCr) signal (FFT) | ||
SIGNAL 2.2 | Luminance (YCbCr) signal (Welch) | ||
ROI B |
Forehead ROI 50% larger than ROI A xmin= xmin_bbox+(1/3)*bbox_w ymin=ymin_bbox width = (1/3)*bbox_w height = (3/10)*bbox_h |
SIGNAL 3.1 | Green (RGB) signal (FFT) |
SIGNAL 3.2 | Green (RGB) signal (Welch) | ||
ROI C |
Face ROI comprises central 60% (width) and central 80% (height) of bbox xmin=xmin_bbox+(1/5)*bbox_w ymin=ymin_bbox+(1/10)*bbox_h width = (3/5)*bbox_w height = (4/5)*bbox_h |
SIGNAL 3.1 | Green (RGB) signal (FFT) |
SIGNAL 3.2 | Green (RGB) signal (Welch) |
SIG1 | SIG2 | SIG3 | SIG4 | |||||
FFT | Welch | FFT | Welch | FFT | Welch | FFT | Welch | |
Mean Error | 1.13 | 0.95 | 0.75 | 0.63 | 1.13 | 1.19 | 0.62 | 0.50 |
RMSE | 124.40 | 105.00 | 93.67 | 76.16 | 122.60 | 126.70 | 83.33 | 71.08 |
SIG1 | SIG2 | SIG3 | SIG4 | |||||
FFT | Welch | FFT | Welch | FFT | Welch | FFT | Welch | |
Mean Error | 0.02 | 0.02 | 0.02 | 0.02 | 0.02 | 0.02 | 0.02 | 0.02 |
RMSE | 2.54 | 2.49 | 2.54 | 2.49 | 2.59 | 2.49 | 2.49 | 2.42 |
SIG1 | SIG2 | SIG3 | SIG4 | |||||
FFT | Welch | FFT | Welch | FFT | Welch | FFT | Welch | |
Mean Error | 0.57 | 0.48 | 0.39 | 0.39 | 0.55 | 0.61 | 0.25 | 0.22 |
RMSE | 78.55 | 69.55 | 61.24 | 60.59 | 77.46 | 84.30 | 49.28 | 45.45 |
SIG1 | SIG2 | SIG3 | SIG4 | |||||
FFT | Welch | FFT | Welch | FFT | Welch | FFT | Welch | |
Mean Error | 0.03 | 0.03 | 0.03 | 0.03 | 0.03 | 0.03 | 0.03 | 0.03 |
RMSE | 3.41 | 3.70 | 3.43 | 3.57 | 3.34 | 3.37 | 3.42 | 3.76 |
SIG1 | SIG2 | SIG3 | SIG4 | |||||
FFT | Welch | FFT | Welch | FFT | Welch | FFT | Welch | |
Mean SNR | 0.08 | 0.09 | 0.09 | 0.11 | 0.08 | 0.09 | 0.14 | 0.16 |
SIG1 | SIG2 | SIG3 | SIG4 | |||||
FFT | Welch | FFT | Welch | FFT | Welch | FFT | Welch | |
Mean SNR | 0.12 | 0.12 | 0.16 | 0.16 | 0.12 | 0.13 | 0.22 | 0.23 |
SIG1 | SIG2 | SIG3 | SIG4 | |||||
FFT | Welch | FFT | Welch | FFT | Welch | FFT | Welch | |
r | -0.15 | -0.03 | -0.09 | -0.06 | -0.28 | -0.35 | -0.22 | -0.13 |
p | 0.29 | 0.84 | 0.56 | 0.68 | 0.05 | 0.01 | 0.13 | 0.35 |
SIG1 | SIG2 | SIG3 | SIG4 | |||||
FFT | Welch | FFT | Welch | FFT | Welch | FFT | Welch | |
r | 0.99 | 0.99 | 0.99 | 0.99 | 0.99 | 0.99 | 0.99 | 0.99 |
p | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 |
SIG1 | SIG2 | SIG3 | SIG4 | |||||
FFT | Welch | FFT | Welch | FFT | Welch | FFT | Welch | |
r | 0.03 | 0.09 | 0.08 | 0.20 | 0.18 | 0.03 | 0.36 | 0.47 |
p | 0.82 | 0.56 | 0.59 | 0.16 | 0.22 | 0.84 | 0.01 | 0.00 |
SIG1 | SIG2 | SIG3 | SIG4 | |||||
FFT | Welch | FFT | Welch | FFT | Welch | FFT | Welch | |
r | 0.99 | 0.98 | 0.99 | 0.98 | 0.99 | 0.99 | 0.99 | 0.98 |
p | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 |
SIG1 | SIG2 | SIG3 | SIG4 | |||||
FFT | Welch | FFT | Welch | FFT | Welch | FFT | Welch | |
r | -0.50 | -0.55 | -0.47 | -0.56 | -0.54 | -0.60 | -0.63 | -0.69 |
p | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 |
SIG1 | SIG2 | SIG3 | SIG4 | |||||
FFT | Welch | FFT | Welch | FFT | Welch | FFT | Welch | |
r | -0.45 | -0.43 | -0.44 | -0.46 | -0.48 | -0.43 | -0.45 | -0.52 |
p | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 |
SIG1′ | SIG2′ | SIG3′ | SIG4′ | |||||
FFT | Welch | FFT | Welch | FFT | Welch | FFT | Welch | |
Mean Error | 0.08 | 0.15 | 0.15 | 0.12 | 0.03 | 0.09 | 0.08 | 0.10 |
RMSE | 14.88 | 24.37 | 24.46 | 18.14 | 6.27 | 14.85 | 16.27 | 16.32 |
SIG1′ | SIG2′ | SIG3′ | SIG4′ | |||||
FFT | Welch | FFT | Welch | FFT | Welch | FFT | Welch | |
Mean Error | 0.01 | 0.02 | 0.02 | 0.09 | 0.01 | 0.02 | 0.00 | 0.01 |
RMSE | 1.71 | 3.12 | 5.41 | 13.66 | 2.19 | 1.73 | 0.32 | 1.05 |
SIG1′ | SIG2′ | SIG3′ | SIG4′ | |||||
FFT | Welch | FFT | Welch | FFT | Welch | FFT | Welch | |
Mean SNR | 0.27 | 0.28 | 0.26 | 0.27 | 0.35 | 0.35 | 0.36 | 0.36 |
SIG1′ | SIG2′ | SIG3′ | SIG4′ | |||||
FFT | Welch | FFT | Welch | FFT | Welch | FFT | Welch | |
Mean SNR | 0.55 | 0.55 | 0.43 | 0.43 | 0.68 | 0.68 | 0.63 | 0.62 |
SIG1′ | SIG2′ | SIG3′ | SIG4′ | |||||
FFT | Welch | FFT | Welch | FFT | Welch | FFT | Welch | |
r | 0.39 | 0.69 | 0.39 | 0.26 | 0.90 | 0.53 | 0.39 | 0.33 |
p | 0.06 | 0.00 | 0.06 | 0.22 | 0.00 | 0.01 | 0.06 | 0.12 |
SIG1′ | SIG2′ | SIG3′ | SIG4′ | |||||
FFT | Welch | FFT | Welch | FFT | Welch | FFT | Welch | |
r | 0.99 | 0.96 | 0.93 | 0.55 | 0.98 | 0.99 | 1.00 | 1.00 |
p | 0.00 | 0.00 | 0.00 | 0.01 | 0.00 | 0.00 | 0.00 | 0.00 |
SIG1′ | SIG2′ | SIG3′ | SIG4′ | |||||
FFT | Welch | FFT | Welch | FFT | Welch | FFT | Welch | |
r | 0.64 | 0.68 | 0.56 | 0.39 | 0.93 | 0.70 | 0.62 | 0.59 |
p | 0.00 | 0.00 | 0.00 | 0.01 | 0.00 | 0.00 | 0.00 | 0.00 |
Acronym | Expansion |
AC | Alternating Current |
AVI | Audio Video Interleaved |
bpm | beats per minute |
BR | Breathing Rate |
BVP | Blood Volume Pulse |
CCD | Charge-Coupled Device |
CMOS | Complementary Metal-Oxide-Semiconductor |
COHFACE | COntactless Heartbeat detection for trustworthy FACE Biometrics |
COG | Cyan, Orange and Green |
DC | Direct Current |
DFT | Discrete Fourier Transform |
ECG | Electrocardiograph, Electrocardiography, Electrocardiogram |
FFT | Fast Fourier Transform |
fps | frames per second |
FWHM | Full Width at Half Maximum |
GUI | Graphical User Interface |
HDF5 | Hierarchical Data Format 5 |
HeNe | Helium-Neon |
HR | Heart Rate |
HRV | Heart Rate Variability |
ICA | Independent Component Analysis |
ICU | Intensive Care Unit |
IDE | Integrated Development Environment |
JADE | Joint Approximation Diagonalization of Eigen-matrices |
KLT | Kanade-Lucas-Tomasi |
LED | Light Emitting Diode |
MATLAB | Matrix Laboratory |
MP4 | MPEG-4 Part 14 |
mW | milliwatt |
PCA | Principal Component Analysis |
PPG | Photoplethysmography |
RGB | Red, Green and Blue |
RMSE | Root-Mean-Square Error |
rPPG | Reflectance Photoplethysmography |
SACF | Summary Autocorrelation Function |
SNR | Signal-to-Noise Ratio |
SPA | Smoothness Priors Approach |
SaO2 | arterial Oxygen Saturation |
YCbCr | Luminance, blue-difference Chroma, and red-difference Chroma |
Video | Heart Rate Estimate | Ref. HR | |||||||
SIG1 | SIG2 | SIG3 | SIG4 | ||||||
FFT | Welch | FFT | Welch | FFT | Welch | FFT | Welch | ||
1 | 83.60 | 84.96 | 83.60 | 207.30 | 83.60 | 234.49 | 83.60 | 84.96 | 85 |
2 | 209.50 | 207.30 | 101.84 | 101.95 | 101.84 | 207.30 | 87.29 | 88.36 | 88 |
3 | 74.68 | 173.32 | 174.68 | 81.56 | 174.68 | 173.32 | 174.68 | 84.96 | 86 |
4 | 83.36 | 108.75 | 106.63 | 108.75 | 170.61 | 108.75 | 83.36 | 84.96 | 85 |
5 | 19.42 | 220.90 | 224.21 | 241.29 | 247.20 | 248.09 | 115.94 | 84.96 | 86 |
6 | 45.66 | 149.53 | 103.90 | 129.14 | 239.83 | 241.29 | 149.53 | 149.53 | 83 |
7 | 89.40 | 91.41 | 135.60 | 112.50 | 90.40 | 91.41 | 89.40 | 98.44 | 86 |
8 | 13.40 | 169.92 | 170.91 | 169.92 | 130.36 | 129.14 | 183.46 | 183.52 | 97 |
9 | 14.89 | 116.02 | 115.90 | 116.02 | 184.43 | 116.02 | 180.40 | 179.30 | 97 |
10 | 17.14 | 217.50 | 241.37 | 241.29 | 217.14 | 217.50 | 237.49 | 237.89 | 94 |
11 | 121.92 | 122.34 | 176.54 | 122.34 | 199.94 | 200.51 | 92.66 | 95.16 | 95 |
12 | 114.38 | 115.55 | 114.38 | 115.55 | 114.38 | 115.55 | 100.81 | 101.95 | 100 |
13 | 148.87 | 142.73 | 94.73 | 142.73 | 147.90 | 142.73 | 98.60 | 98.55 | 100 |
14 | 118.00 | 251.48 | 118.00 | 115.55 | 132.51 | 251.48 | 193.44 | 193.71 | 97 |
15 | 99.04 | 173.32 | 99.04 | 98.55 | 173.81 | 173.32 | 99.04 | 98.55 | 98 |
16 | 194.41 | 163.13 | 194.41 | 163.13 | 213.85 | 214.10 | 103.04 | 101.95 | 106 |
17 | 02.19 | 241.29 | 189.55 | 142.73 | 202.19 | 305.86 | 105.96 | 105.35 | 107 |
18 | 173.61 | 173.32 | 173.61 | 173.32 | 113.48 | 112.15 | 101.84 | 101.95 | 104 |
19 | 248.71 | 251.48 | 150.00 | 149.53 | 248.71 | 125.74 | 210.97 | 207.30 | 107 |
20 | 100.50 | 101.95 | 100.50 | 101.95 | 100.50 | 101.95 | 149.75 | 105.47 | 104 |
21 | 152.68 | 152.93 | 140.20 | 180.12 | 152.68 | 152.93 | 178.61 | 98.55 | 99 |
22 | 181.94 | 183.52 | 249.68 | 129.14 | 182.90 | 183.52 | 96.77 | 95.16 | 100 |
23 | 204.88 | 146.13 | 148.56 | 146.13 | 204.88 | 203.91 | 102.92 | 98.55 | 100 |
24 | 315.66 | 129.14 | 128.96 | 227.70 | 315.66 | 200.51 | 100.09 | 98.55 | 101 |
25 | 181.57 | 180.12 | 156.33 | 156.33 | 142.73 | 142.73 | 98.07 | 135.94 | 99 |
26 | 105.00 | 105.47 | 105.00 | 112.50 | 105.00 | 105.47 | 150.00 | 151.17 | 130 |
27 | 174.87 | 176.72 | 174.87 | 81.56 | 175.85 | 176.72 | 107.84 | 159.73 | 111 |
28 | 137.50 | 139.34 | 149.12 | 139.34 | 137.50 | 139.34 | 137.50 | 139.34 | 143 |
29 | 238.02 | 237.89 | 238.02 | 237.89 | 238.99 | 237.89 | 123.38 | 122.34 | 127 |
30 | 309.81 | 309.26 | 117.88 | 115.55 | 173.42 | 173.32 | 117.88 | 118.95 | 121 |
31 | 241.24 | 256.64 | 185.57 | 179.30 | 167.99 | 249.61 | 83.02 | 84.38 | 87 |
32 | 103.64 | 94.92 | 103.64 | 172.27 | 103.64 | 80.86 | 91.91 | 91.41 | 83 |
33 | 284.00 | 284.77 | 80.30 | 80.86 | 284.98 | 284.77 | 80.30 | 80.86 | 82 |
34 | 322.90 | 214.45 | 88.33 | 87.89 | 159.00 | 214.45 | 88.33 | 87.89 | 87 |
35 | 79.72 | 94.92 | 79.72 | 80.86 | 126.95 | 126.56 | 126.95 | 161.72 | 81 |
36 | 334.13 | 305.86 | 117.58 | 84.38 | 220.47 | 305.86 | 83.29 | 84.38 | 87 |
37 | 238.50 | 130.08 | 89.31 | 91.41 | 238.50 | 288.28 | 172.74 | 94.92 | 85 |
38 | 240.72 | 168.75 | 312.45 | 168.75 | 240.72 | 232.03 | 240.72 | 239.06 | 83 |
39 | 107.67 | 84.96 | 115.36 | 129.14 | 107.67 | 108.75 | 94.21 | 105.35 | 87 |
40 | 189.63 | 105.47 | 130.68 | 130.08 | 225.00 | 225.00 | 84.50 | 91.41 | 87 |
41 | 241.18 | 172.27 | 169.61 | 158.20 | 241.18 | 239.06 | 235.29 | 235.55 | 84 |
42 | 232.48 | 232.03 | 204.03 | 203.91 | 290.35 | 288.28 | 177.55 | 175.78 | 85 |
43 | 212.73 | 214.10 | 191.74 | 214.10 | 211.78 | 214.10 | 165.03 | 197.11 | 83 |
44 | 272.46 | 274.22 | 283.28 | 284.77 | 354.10 | 281.25 | 240.00 | 239.06 | 81 |
45 | 223.30 | 227.70 | 198.69 | 197.11 | 283.85 | 282.07 | 292.37 | 292.27 | 83 |
46 | 290.51 | 239.06 | 80.48 | 123.05 | 240.46 | 239.06 | 299.35 | 161.72 | 84 |
47 | 314.07 | 158.20 | 159.00 | 158.20 | 326.83 | 326.95 | 180.59 | 179.30 | 83 |
48 | 218.27 | 217.97 | 283.85 | 217.97 | 218.27 | 217.97 | 240.78 | 210.94 | 80 |
49 | 173.75 | 203.91 | 300.65 | 221.48 | 300.65 | 281.25 | 240.13 | 179.30 | 87 |
50 | 233.26 | 234.49 | 322.40 | 81.56 | 233.26 | 234.49 | 233.26 | 146.13 | 83 |
Video | Heart Rate Estimate | Ref. HR | |||||||
SIG1 | SIG2 | SIG3 | SIG4 | ||||||
FFT | Welch | FFT | Welch | FFT | Welch | FFT | Welch | ||
1 | 83.60 | 84.96 | 83.60 | 84.96 | 83.60 | 84.96 | 83.60 | 84.96 | 85 |
2 | 87.29 | 88.36 | 87.29 | 88.36 | 87.29 | 88.36 | 87.29 | 88.36 | 88 |
3 | 84.43 | 81.56 | 84.43 | 81.56 | 84.43 | 81.56 | 84.43 | 84.96 | 86 |
4 | 83.36 | 84.96 | 83.36 | 84.96 | 83.36 | 84.96 | 83.36 | 84.96 | 85 |
5 | 86.23 | 84.96 | 86.23 | 84.96 | 86.23 | 84.96 | 86.23 | 84.96 | 86 |
6 | 84.48 | 84.96 | 84.48 | 84.96 | 84.48 | 84.96 | 84.48 | 84.96 | 83 |
7 | 81.36 | 80.86 | 81.36 | 80.86 | 81.36 | 80.86 | 81.36 | 80.86 | 86 |
8 | 94.63 | 95.16 | 94.63 | 95.16 | 94.63 | 95.16 | 94.63 | 95.16 | 97 |
9 | 95.74 | 98.44 | 95.74 | 98.44 | 95.74 | 98.44 | 95.74 | 98.44 | 97 |
10 | 92.09 | 91.76 | 92.09 | 91.76 | 92.09 | 91.73 | 92.09 | 91.73 | 94 |
11 | 92.66 | 95.16 | 92.66 | 95.16 | 92.66 | 95.16 | 92.66 | 95.16 | 95 |
12 | 100.80 | 102.00 | 100.80 | 102.00 | 100.80 | 102.00 | 100.80 | 102.00 | 100 |
13 | 94.73 | 95.16 | 94.73 | 95.16 | 94.73 | 95.16 | 98.60 | 98.55 | 100 |
14 | 97.69 | 95.16 | 97.69 | 95.16 | 97.69 | 95.16 | 97.69 | 95.16 | 97 |
15 | 99.04 | 98.55 | 99.04 | 98.55 | 99.04 | 98.55 | 99.04 | 98.55 | 98 |
16 | 103.00 | 102.00 | 103.00 | 102.00 | 103.00 | 102.00 | 103.00 | 102.00 | 106 |
17 | 106.00 | 105.40 | 106.00 | 105.40 | 106.00 | 105.40 | 106.00 | 105.40 | 107 |
18 | 101.80 | 102.00 | 101.80 | 102.00 | 101.80 | 102.00 | 101.80 | 102.00 | 104 |
19 | 106.50 | 105.40 | 106.50 | 105.40 | 106.50 | 105.40 | 106.50 | 105.40 | 107 |
20 | 100.50 | 102.00 | 100.50 | 102.00 | 100.50 | 102.00 | 100.50 | 102.00 | 104 |
21 | 98.91 | 98.55 | 98.91 | 98.55 | 98.91 | 98.55 | 98.91 | 98.55 | 99 |
22 | 96.77 | 98.55 | 96.77 | 98.55 | 96.77 | 98.55 | 96.77 | 95.16 | 100 |
23 | 102.90 | 98.55 | 102.90 | 98.55 | 102.90 | 98.55 | 102.90 | 98.55 | 100 |
24 | 100.10 | 98.55 | 100.10 | 98.55 | 100.10 | 98.55 | 100.10 | 98.55 | 101 |
25 | 98.07 | 98.55 | 98.07 | 98.55 | 98.07 | 98.55 | 98.07 | 98.55 | 99 |
26 | 126.00 | 126.60 | 126.00 | 126.60 | 126.00 | 126.60 | 126.00 | 126.60 | 130 |
27 | 107.80 | 108.80 | 107.80 | 108.80 | 107.80 | 108.80 | 107.80 | 108.80 | 111 |
28 | 137.50 | 139.30 | 137.50 | 139.30 | 137.50 | 139.30 | 137.50 | 139.30 | 143 |
29 | 123.40 | 122.30 | 123.40 | 122.30 | 123.40 | 122.30 | 123.40 | 122.30 | 127 |
30 | 117.90 | 118.90 | 117.90 | 118.90 | 117.90 | 118.90 | 117.90 | 118.90 | 121 |
31 | 83.02 | 84.38 | 83.02 | 84.38 | 83.02 | 84.38 | 83.02 | 84.38 | 87 |
32 | 81.15 | 80.86 | 81.15 | 80.86 | 81.15 | 80.86 | 81.15 | 80.86 | 83 |
33 | 80.30 | 80.86 | 80.30 | 80.86 | 80.30 | 80.86 | 80.30 | 80.86 | 82 |
34 | 88.33 | 87.89 | 88.33 | 87.89 | 88.33 | 87.89 | 88.33 | 87.89 | 87 |
35 | 79.72 | 80.86 | 79.72 | 80.86 | 79.72 | 80.86 | 79.72 | 80.86 | 81 |
36 | 84.27 | 84.38 | 84.27 | 84.38 | 84.27 | 84.38 | 84.27 | 84.38 | 87 |
37 | 80.48 | 77.34 | 80.48 | 77.34 | 80.48 | 77.34 | 80.48 | 77.34 | 85 |
38 | 83.52 | 84.38 | 83.52 | 84.38 | 83.52 | 84.38 | 83.52 | 84.38 | 83 |
39 | 84.60 | 84.96 | 84.60 | 84.96 | 82.67 | 84.96 | 82.67 | 84.96 | 87 |
40 | 84.50 | 84.38 | 84.50 | 84.38 | 84.50 | 84.38 | 84.50 | 84.38 | 87 |
41 | 83.33 | 84.38 | 83.33 | 84.38 | 83.33 | 84.38 | 83.33 | 84.38 | 84 |
42 | 83.38 | 84.38 | 83.38 | 84.38 | 83.38 | 84.38 | 83.38 | 84.38 | 85 |
43 | 79.18 | 81.56 | 79.18 | 81.56 | 79.18 | 81.56 | 79.18 | 81.56 | 83 |
44 | 80.66 | 80.86 | 80.66 | 80.86 | 80.66 | 80.86 | 80.66 | 80.86 | 81 |
45 | 80.42 | 81.56 | 80.42 | 81.56 | 80.42 | 81.56 | 80.42 | 81.56 | 83 |
46 | 80.48 | 80.86 | 80.48 | 80.86 | 80.48 | 80.86 | 80.48 | 80.86 | 84 |
47 | 80.48 | 80.86 | 80.48 | 80.86 | 80.48 | 80.86 | 80.48 | 80.86 | 83 |
48 | 78.30 | 77.34 | 78.30 | 77.34 | 78.30 | 77.34 | 78.30 | 77.34 | 80 |
49 | 88.83 | 87.89 | 88.83 | 87.89 | 88.83 | 87.89 | 88.83 | 87.89 | 87 |
50 | 81.55 | 81.56 | 81.55 | 81.56 | 81.55 | 81.56 | 81.55 | 81.56 | 83 |
Video | Heart Rate Estimate | Ref. HR | |||||||
SIG1 | SIG2 | SIG3 | SIG4 | ||||||
FFT | Welch | FFT | Welch | FFT | Welch | FFT | Welch | ||
1 | 226.96 | 95.16 | 131.91 | 95.16 | 226.96 | 95.16 | 93.11 | 91.76 | 95 |
2 | 155.62 | 190.31 | 187.47 | 186.91 | 189.29 | 190.31 | 95.55 | 95.16 | 98 |
3 | 279.99 | 98.55 | 96.88 | 98.55 | 153.07 | 98.55 | 96.88 | 98.55 | 100 |
4 | 120.20 | 142.73 | 92.09 | 142.73 | 142.50 | 142.73 | 101.78 | 101.95 | 99 |
5 | 238.24 | 95.16 | 94.52 | 95.16 | 140.82 | 190.31 | 96.45 | 95.16 | 94 |
6 | 91.98 | 91.76 | 91.98 | 91.76 | 91.98 | 91.76 | 183.96 | 95.16 | 91 |
7 | 217.01 | 217.50 | 217.01 | 217.50 | 230.64 | 231.09 | 97.32 | 95.16 | 94 |
8 | 134.37 | 176.72 | 263.90 | 180.12 | 182.70 | 183.52 | 88.93 | 91.76 | 92 |
9 | 210.29 | 210.94 | 189.16 | 158.20 | 86.53 | 210.94 | 101.62 | 214.45 | 94 |
10 | 101.15 | 101.95 | 101.15 | 101.95 | 98.23 | 98.55 | 95.32 | 95.16 | 96 |
11 | 120.13 | 118.95 | 120.13 | 118.95 | 120.13 | 118.95 | 120.13 | 118.95 | 122 |
12 | 287.14 | 285.47 | 121.15 | 118.95 | 286.18 | 285.47 | 114.47 | 115.55 | 119 |
13 | 182.50 | 152.93 | 115.87 | 115.55 | 231.74 | 231.09 | 115.87 | 115.55 | 119 |
14 | 110.80 | 135.94 | 103.09 | 105.35 | 110.80 | 142.73 | 110.80 | 108.75 | 112 |
15 | 118.00 | 217.50 | 79.31 | 217.50 | 241.80 | 241.29 | 109.29 | 108.75 | 113 |
16 | 110.51 | 108.75 | 110.51 | 108.75 | 109.54 | 108.75 | 110.51 | 108.75 | 112 |
17 | 163.61 | 105.35 | 115.49 | 105.35 | 163.61 | 278.67 | 115.49 | 115.55 | 112 |
18 | 115.30 | 116.02 | 115.30 | 116.02 | 115.30 | 116.02 | 117.28 | 116.02 | 113 |
19 | 148.23 | 118.95 | 110.45 | 118.95 | 217.98 | 149.53 | 110.45 | 112.15 | 110 |
20 | 127.88 | 282.07 | 134.67 | 129.14 | 190.86 | 190.31 | 102.69 | 101.95 | 107 |
21 | 141.28 | 142.73 | 267.69 | 271.88 | 152.44 | 149.53 | 152.44 | 149.53 | 146 |
22 | 207.05 | 207.30 | 207.05 | 163.13 | 207.05 | 207.30 | 271.21 | 271.88 | 139 |
23 | 193.66 | 193.71 | 128.78 | 234.49 | 193.66 | 193.71 | 128.78 | 129.14 | 132 |
24 | 236.66 | 237.89 | 236.66 | 234.49 | 236.66 | 237.89 | 236.66 | 234.49 | 124 |
25 | 220.04 | 146.13 | 109.54 | 122.34 | 180.30 | 180.12 | 120.20 | 122.34 | 123 |
26 | 118.46 | 118.95 | 118.46 | 118.95 | 118.46 | 118.95 | 118.46 | 105.35 | 121 |
27 | 224.77 | 115.55 | 117.23 | 115.55 | 117.23 | 115.55 | 118.20 | 118.95 | 121 |
28 | 114.64 | 115.55 | 114.64 | 115.55 | 217.62 | 217.50 | 229.28 | 231.09 | 121 |
29 | 123.52 | 115.55 | 114.77 | 115.55 | 123.52 | 115.55 | 182.85 | 176.72 | 117 |
30 | 189.82 | 190.31 | 111.21 | 190.31 | 238.71 | 186.91 | 111.21 | 112.15 | 115 |
31 | 182.05 | 183.52 | 182.05 | 224.30 | 214.63 | 217.50 | 212.71 | 217.50 | 115 |
32 | 70.39 | 55.78 | 67.61 | 65.63 | 109.28 | 65.63 | 82.43 | 82.03 | 112 |
33 | 219.41 | 217.50 | 219.41 | 217.50 | 217.50 | 217.50 | 217.50 | 217.50 | 113 |
34 | 212.94 | 210.70 | 212.94 | 210.70 | 212.94 | 210.70 | 211.03 | 210.70 | 109 |
35 | 64.97 | 85.31 | 64.97 | 85.31 | 85.39 | 85.31 | 64.97 | 98.44 | 110 |
36 | 257.74 | 258.28 | 257.74 | 258.28 | 257.74 | 258.28 | 86.90 | 78.16 | 82 |
37 | 87.53 | 116.02 | 117.72 | 116.02 | 87.53 | 87.89 | 117.72 | 116.02 | 84 |
38 | 81.61 | 81.56 | 166.13 | 81.56 | 81.61 | 81.56 | 78.69 | 78.16 | 83 |
39 | 157.83 | 149.53 | 152.02 | 149.53 | 182.04 | 149.53 | 232.39 | 78.16 | 81 |
40 | 80.59 | 81.56 | 80.59 | 81.56 | 80.59 | 81.56 | 162.15 | 163.13 | 82 |
41 | 185.35 | 186.91 | 73.75 | 74.77 | 175.65 | 288.87 | 74.72 | 74.77 | 74 |
42 | 253.43 | 163.13 | 162.15 | 163.13 | 149.53 | 149.53 | 80.59 | 81.56 | 80 |
43 | 124.08 | 139.34 | 112.45 | 112.15 | 124.08 | 197.11 | 143.47 | 142.73 | 78 |
44 | 158.45 | 159.73 | 158.45 | 159.73 | 250.79 | 251.48 | 79.71 | 81.56 | 84 |
45 | 83.69 | 81.56 | 83.69 | 81.56 | 83.69 | 84.96 | 83.69 | 84.96 | 83 |
46 | 174.87 | 156.33 | 157.39 | 156.33 | 81.61 | 152.93 | 84.52 | 84.96 | 83 |
47 | 148.31 | 149.53 | 140.56 | 98.55 | 148.31 | 149.53 | 132.80 | 132.54 | 140 |
48 | 124.49 | 122.34 | 124.49 | 122.34 | 124.49 | 122.34 | 124.49 | 135.94 | 127 |
49 | 115.55 | 115.55 | 116.52 | 115.55 | 115.55 | 115.55 | 115.55 | 115.55 | 117 |
50 | 113.23 | 112.15 | 113.23 | 112.15 | 113.23 | 112.15 | 112.26 | 112.15 | 117 |
51 | 114.51 | 112.15 | 114.51 | 112.15 | 114.51 | 115.55 | 114.51 | 115.55 | 118 |
Video | Heart Rate Estimate | Ref. HR | |||||||
SIG1 | SIG2 | SIG3 | SIG4 | ||||||
FFT | Welch | FFT | Welch | FFT | Welch | FFT | Welch | ||
1 | 96.99 | 95.16 | 96.99 | 95.16 | 96.02 | 95.16 | 93.11 | 91.76 | 95 |
2 | 95.55 | 95.16 | 95.55 | 95.16 | 95.55 | 95.16 | 95.55 | 95.16 | 98 |
3 | 96.88 | 98.55 | 96.88 | 98.55 | 96.88 | 98.55 | 96.88 | 98.55 | 100 |
4 | 92.09 | 91.76 | 92.09 | 91.76 | 92.09 | 91.76 | 92.09 | 91.76 | 99 |
5 | 93.56 | 95.16 | 94.52 | 95.16 | 93.56 | 95.16 | 96.45 | 95.16 | 94 |
6 | 91.98 | 91.97 | 91.98 | 91.76 | 91.98 | 91.76 | 93.90 | 95.16 | 91 |
7 | 87.58 | 98.55 | 87.58 | 98.55 | 87.58 | 98.55 | 97.32 | 95.16 | 94 |
8 | 93.77 | 91.76 | 88.93 | 88.36 | 90.87 | 91.76 | 88.93 | 91.76 | 92 |
9 | 86.53 | 87.53 | 86.53 | 87.53 | 86.53 | 87.53 | 86.53 | 87.89 | 94 |
10 | 101.20 | 102.00 | 101.20 | 102.00 | 98.23 | 98.55 | 95.32 | 95.16 | 96 |
11 | 120.10 | 118.90 | 120.10 | 118.90 | 120.10 | 118.90 | 120.10 | 118.90 | 122 |
12 | 114.50 | 122.30 | 114.50 | 118.50 | 114.50 | 115.50 | 114.50 | 115.50 | 119 |
13 | 115.90 | 115.50 | 115.90 | 115.50 | 115.90 | 115.50 | 115.90 | 115.50 | 119 |
14 | 110.80 | 105.40 | 110.80 | 105.40 | 110.80 | 108.80 | 110.80 | 108.80 | 112 |
15 | 112.20 | 112.10 | 112.20 | 112.10 | 112.20 | 112.10 | 112.20 | 108.80 | 113 |
16 | 110.50 | 108.80 | 110.50 | 108.80 | 109.50 | 108.80 | 110.50 | 108.80 | 112 |
17 | 115.50 | 105.40 | 115.50 | 115.50 | 115.50 | 115.50 | 115.50 | 115.50 | 112 |
18 | 115.30 | 116.00 | 115.30 | 116.00 | 115.30 | 116.00 | 117.30 | 116.00 | 113 |
19 | 110.40 | 105.40 | 110.40 | 108.80 | 110.40 | 105.40 | 110.40 | 112.10 | 110 |
20 | 102.70 | 102.00 | 102.70 | 102.00 | 102.70 | 102.00 | 102.70 | 102.00 | 107 |
21 | 152.40 | 149.50 | 152.40 | 149.50 | 152.40 | 149.50 | 152.40 | 149.50 | 146 |
22 | 135.10 | 135.90 | 135.10 | 135.90 | 135.10 | 135.90 | 135.10 | 135.90 | 139 |
23 | 128.80 | 129.10 | 128.80 | 129.10 | 128.80 | 129.10 | 128.80 | 129.10 | 132 |
24 | 122.20 | 122.30 | 122.20 | 122.30 | 122.20 | 122.30 | 122.20 | 122.30 | 124 |
25 | 120.20 | 122.30 | 120.20 | 122.30 | 120.20 | 122.30 | 120.20 | 122.30 | 123 |
26 | 118.50 | 118.90 | 118.50 | 118.90 | 118.50 | 118.90 | 118.50 | 118.90 | 121 |
27 | 118.20 | 115.50 | 118.20 | 115.50 | 118.20 | 115.50 | 118.20 | 118.90 | 121 |
28 | 114.60 | 115.50 | 114.60 | 115.50 | 114.60 | 115.50 | 114.60 | 112.10 | 121 |
29 | 114.80 | 115.50 | 114.80 | 115.50 | 114.80 | 115.50 | 114.80 | 115.50 | 117 |
30 | 111.20 | 112.10 | 111.20 | 112.10 | 111.20 | 112.10 | 111.20 | 112.10 | 115 |
31 | 113.10 | 115.50 | 113.10 | 115.50 | 113.10 | 115.50 | 113.10 | 115.50 | 115 |
32 | 109.30 | 111.60 | 109.30 | 111.60 | 109.30 | 111.60 | 109.30 | 111.60 | 112 |
33 | 114.50 | 115.50 | 114.50 | 115.50 | 114.50 | 115.50 | 114.50 | 115.50 | 113 |
34 | 109.30 | 108.80 | 109.30 | 108.80 | 109.30 | 108.80 | 109.30 | 108.80 | 109 |
35 | 108.60 | 108.30 | 108.60 | 108.30 | 108.60 | 108.30 | 108.60 | 108.30 | 110 |
36 | 79.99 | 78.16 | 79.99 | 78.16 | 79.99 | 78.16 | 79.99 | 78.16 | 82 |
37 | 87.53 | 87.89 | 87.53 | 87.89 | 87.53 | 87.89 | 87.53 | 84.38 | 84 |
38 | 81.61 | 81.56 | 81.61 | 81.56 | 81.61 | 81.56 | 78.69 | 78.16 | 83 |
39 | 78.43 | 78.16 | 78.43 | 78.16 | 78.43 | 78.16 | 77.46 | 78.16 | 81 |
40 | 80.59 | 81.56 | 80.59 | 81.56 | 80.59 | 81.56 | 80.59 | 81.56 | 82 |
41 | 73.75 | 74.77 | 73.75 | 74.77 | 73.75 | 74.77 | 74.72 | 74.77 | 74 |
42 | 81.56 | 81.56 | 81.56 | 81.56 | 80.59 | 81.56 | 80.59 | 81.56 | 80 |
43 | 73.67 | 74.77 | 73.67 | 74.77 | 73.67 | 74.77 | 73.67 | 74.77 | 78 |
44 | 79.71 | 78.16 | 79.71 | 78.16 | 79.71 | 78.16 | 79.71 | 81.56 | 84 |
45 | 83.69 | 81.56 | 83.69 | 81.56 | 83.69 | 84.96 | 83.69 | 84.96 | 83 |
46 | 81.61 | 81.56 | 81.61 | 81.56 | 81.61 | 81.56 | 81.61 | 94.96 | 83 |
47 | 132.80 | 132.50 | 132.80 | 132.50 | 132.80 | 132.50 | 132.80 | 132.50 | 140 |
48 | 124.50 | 122.30 | 124.50 | 122.30 | 124.50 | 122.30 | 124.50 | 122.30 | 127 |
49 | 115.50 | 115.50 | 115.50 | 115.50 | 115.50 | 115.50 | 115.50 | 115.50 | 117 |
50 | 113.20 | 112.10 | 113.20 | 112.10 | 113.20 | 112.10 | 112.30 | 112.10 | 117 |
51 | 114.50 | 112.10 | 114.50 | 112.10 | 114.50 | 115.50 | 114.50 | 115.50 | 118 |
Video | Heart Rate Estimate | Ref. HR | |||||||
SIG1 | SIG2 | SIG3 | SIG4 | ||||||
FFT | Welch | FFT | Welch | FFT | Welch | FFT | Welch | ||
1* | 82.45 | 82.03 | 82.45 | 82.03 | 82.45 | 84.38 | 82.45 | 82.03 | 82.48 |
2 | 80.53 | 79.69 | 75.56 | 79.69 | 81.52 | 79.69 | 78.54 | 79.69 | 81.49 |
3 | 70.53 | 84.38 | 117.22 | 117.19 | 70.53 | 70.31 | 70.53 | 70.31 | 70.49 |
4 | 70.47 | 70.31 | 70.47 | 70.31 | 70.47 | 70.31 | 70.47 | 70.31 | 70.41 |
5 | 72.52 | 70.31 | 72.52 | 70.31 | 72.52 | 72.66 | 71.52 | 72.66 | 72.40 |
6 | 130.13 | 93.75 | 130.13 | 128.91 | 95.36 | 128.91 | 131.13 | 121.88 | 71.48 |
7 | 93.38 | 93.75 | 93.38 | 93.75 | 53.64 | 93.75 | 106.29 | 107.81 | 53.55 |
8 | 54.55 | 53.91 | 54.55 | 53.91 | 54.55 | 53.91 | 54.55 | 53.91 | 54.55 |
9 | 67.21 | 67.97 | 67.21 | 67.97 | 67.21 | 67.97 | 67.21 | 67.97 | 67.11 |
10 | 68.60 | 67.97 | 67.63 | 67.97 | 68.60 | 67.97 | 67.63 | 67.97 | 68.50 |
11 | 61.59 | 60.94 | 61.59 | 60.94 | 59.60 | 60.94 | 59.60 | 91.41 | 61.55 |
12 | 65.51 | 65.63 | 65.51 | 65.63 | 65.51 | 65.63 | 65.51 | 65.63 | 65.45 |
13 | 75.37 | 75.00 | 75.37 | 75.00 | 75.37 | 75.00 | 75.37 | 75.00 | 75.27 |
14 | 78.14 | 77.34 | 78.14 | 77.34 | 78.14 | 77.34 | 78.14 | 77.34 | 78.07 |
15 | 70.36 | 70.31 | 70.36 | 70.31 | 70.36 | 67.97 | 70.36 | 70.31 | 70.27 |
16 | 68.43 | 67.97 | 68.43 | 67.97 | 68.43 | 67.97 | 68.43 | 67.97 | 68.36 |
17 | 91.47 | 135.94 | 91.47 | 91.41 | 92.46 | 93.75 | 91.47 | 91.41 | 91.33 |
18 | 88.05 | 89.06 | 89.04 | 89.06 | 88.05 | 86.72 | 87.06 | 86.72 | 87.99 |
19 | 61.49 | 60.94 | 61.49 | 60.94 | 61.49 | 60.94 | 61.49 | 60.94 | 61.42 |
20 | 62.43 | 63.28 | 62.43 | 63.28 | 62.43 | 63.28 | 62.43 | 63.28 | 62.35 |
21 | 82.45 | 82.03 | 82.45 | 82.03 | 83.44 | 82.03 | 82.45 | 82.03 | 83.39 |
22 | 82.52 | 84.38 | 82.52 | 84.38 | 85.50 | 84.38 | 85.50 | 84.38 | 85.38 |
23 | 80.20 | 173.44 | 66.34 | 65.63 | 93.07 | 93.75 | 91.09 | 93.75 | 90.96 |
24 | 76.49 | 145.31 | 169.87 | 77.34 | 108.28 | 107.81 | 89.40 | 89.06 | 89.26 |
Video | Heart Rate Estimate | Ref. HR | |||||||
SIG1 | SIG2 | SIG3 | SIG4 | ||||||
FFT | Welch | FFT | Welch | FFT | Welch | FFT | Welch | ||
1 | 84.65 | 84.38 | 84.65 | 84.38 | 84.65 | 84.38 | 84.65 | 84.38 | 84.56 |
2 | 85.50 | 86.72 | 85.50 | 86.72 | 85.50 | 86.72 | 85.50 | 84.38 | 85.47 |
3 | 69.54 | 70.31 | 69.54 | 70.31 | 69.54 | 70.31 | 69.54 | 70.31 | 69.49 |
4 | 68.54 | 67.97 | 68.54 | 67.97 | 68.54 | 67.97 | 68.54 | 67.97 | 68.43 |
5 | 68.60 | 67.97 | 68.60 | 67.97 | 68.60 | 67.97 | 68.60 | 67.97 | 68.50 |
6 | 70.30 | 70.31 | 70.30 | 70.31 | 70.30 | 70.31 | 70.30 | 70.31 | 70.27 |
7 | 57.57 | 56.25 | 57.57 | 56.25 | 57.57 | 56.25 | 56.58 | 56.25 | 56.53 |
8 | 53.69 | 53.91 | 53.69 | 110.16 | 53.69 | 53.91 | 53.69 | 56.25 | 53.61 |
9 | 71.34 | 70.31 | 71.34 | 70.31 | 71.34 | 70.31 | 71.34 | 70.31 | 71.22 |
10 | 69.16 | 67.97 | 69.16 | 67.97 | 69.16 | 67.97 | 69.16 | 67.97 | 69.06 |
11 | 59.55 | 60.94 | 59.55 | 84.38 | 59.55 | 58.59 | 59.55 | 60.94 | 59.50 |
12 | 64.52 | 63.28 | 64.52 | 63.28 | 60.55 | 63.28 | 60.55 | 60.94 | 60.50 |
13 | 75.30 | 77.34 | 75.30 | 77.34 | 75.30 | 77.34 | 76.27 | 77.34 | 76.22 |
14 | 74.58 | 75.00 | 74.58 | 75.00 | 74.58 | 75.00 | 74.58 | 75.00 | 74.52 |
15 | 67.49 | 67.97 | 67.49 | 67.97 | 67.49 | 67.97 | 67.49 | 67.97 | 67.44 |
16 | 69.48 | 70.31 | 69.48 | 70.31 | 69.48 | 70.31 | 69.48 | 70.31 | 69.42 |
17 | 86.42 | 86.72 | 78.48 | 84.38 | 78.48 | 84.38 | 85.43 | 84.38 | 86.28 |
18 | 83.44 | 84.38 | 83.44 | 82.03 | 83.44 | 84.38 | 83.44 | 84.38 | 83.31 |
19 | 60.55 | 58.59 | 60.55 | 58.59 | 60.55 | 60.94 | 60.55 | 60.94 | 60.50 |
20 | 61.49 | 60.94 | 61.49 | 60.94 | 61.49 | 60.94 | 61.49 | 60.94 | 61.42 |
21 | 81.46 | 82.03 | 81.46 | 82.03 | 81.46 | 82.03 | 80.46 | 82.03 | 80.41 |
22 | 84.30 | 84.38 | 84.30 | 84.38 | 84.30 | 84.38 | 84.30 | 84.38 | 84.21 |
23 | 94.29 | 93.75 | 119.11 | 119.53 | 94.29 | 93.75 | 94.29 | 93.75 | 95.21 |
24 | 96.44 | 75.00 | 96.44 | 96.09 | 96.44 | 96.09 | 88.48 | 89.06 | 89.35 |
%STAGE 1: DETECT A FACE |
% Create a cascade detector object. |
faceDetector = vision.CascadeObjectDetector(); |
% Read a video frame and run the face detector. |
videoFileReader = vision.VideoFileReader(NAME4); |
videoFrame = step(videoFileReader); |
videoFrame = step(videoFileReader); |
bbox = step(faceDetector, videoFrame); |
fROI = [(bbox(1) + (1/3)*bbox(3)) (bbox(2) + 0.1*bbox(4)) ((1/3)*bbox(3)) (0.2*(bbox(4)))]; |
bfROI= [(bbox(1) + (1/3)*bbox(3)) (bbox(2) + 0.0*bbox(4)) ((1/3)*bbox(3)) (0.3*(bbox(4)))]; |
bbROI=[(bbox(1) + (0.2)*bbox(3)) (bbox(2) + 0.1*bbox(4)) ((0.6)*bbox(3)) (0.8*(bbox(4)))]; |
fROIPoints = bbox2points(fROI(1, :)); |
bfROIPoints = bbox2points(bfROI(1, :)); |
bbROIPoints = bbox2points(bbROI(1, :)); |
redChannel = videoFrame(:, :, 1); % red channel of video frame |
greenChannel = videoFrame(:, :, 2); % green channel of video frame |
blueChannel = videoFrame(:, :, 3); % blue channel of video frame |
YCbCr = rgb2ycbcr(videoFrame); |
YChannel = YCbCr(:,:,1); |
x1 = fROIPoints(:,1); |
y1 = fROIPoints(:,2); |
x2 = bfROIPoints(:,1); |
y2 = bfROIPoints(:,2); |
x3 = bbROIPoints(:,1); |
y3 = bbROIPoints(:,2); |
bw1 = poly2mask(x1, y1, size(videoFrame, 1), size(videoFrame, 2)); % creates binary mask based on polygon with vetices defined by x and y with vid frame dimensions |
bw2 = poly2mask(x2, y2, size(videoFrame, 1), size(videoFrame, 2)); |
bw3 = poly2mask(x3, y3, size(videoFrame, 1), size(videoFrame, 2)); |
p = 1; |
pSIG1(1, p) = mean2(redChannel(logical(bw1))); %bigger forehead ROI raw red signal vector |
pSIG2(1, p) = mean2(greenChannel(logical(bw1))); %bigger forehead ROI raw green signal vector |
pSIG3(1, p) = mean2(blueChannel(logical(bw1))); %bigger forehead ROI raw blue signal vector |
pSIG4(1, p) = mean2(YChannel(logical(bw1))); %bigger forehead ROI raw luminance signal vector |
pSIG5(1, p) = mean2(greenChannel(logical(bw2))); % bigger forehead ROI raw green signal vector |
pSIG6(1, p) = mean2(greenChannel(logical(bw3))); % 60%80% bounding box ROI raw green signal vector |
pSIG9(1, p) = fROIPoints(1,1); % x motion signal from first x coordinate of forehead ROI |
pSIG10(1, p) = fROIPoints(1,2); % y motion signal from first y coordinate of forehead ROI |
% Draw the returned bounding box around the detected face. |
videoFrame = insertShape(videoFrame, ‘Rectangle’, bbox); |
videoFrame = insertShape(videoFrame, ‘Rectangle’, fROI); % insert forehead ROI into video frame |
videoFrame = insertShape(videoFrame, ‘Rectangle’, bfROI); |
videoFrame = insertShape(videoFrame, ‘Rectangle’, bbROI); |
%figure; imshow(videoFrame); title(‘Detected face’); |
% Convert the first box into a list of 4 points |
% This is needed to be able to visualize the rotation of the object. |
bboxPoints = bbox2points(bbox(1, :)); |
%fROIPoints = bbox2points(fROI(1, :)); % convert fROI to four coordinates of rectangle |
% This establishes the ROI in first frame; the bbox coordinates are transformed to yield |
% the coordinates for a ROI at 60% width of bbox and 80% height; assumes that bounding box in |
% first frame is (unrotated) square/rectangle |
%STAGE 2: IDENTIFY FACIAL FEATURES TO TRACK |
% Detect feature points in the face region. |
points = detectMinEigenFeatures(rgb2gray(videoFrame), ‘ROI’, bbox); |
% Display the detected points. |
%figure, imshow(videoFrame), hold on, title(‘Detected features’); |
%plot(points); |
%STAGE 3: INITIALIZE A TRACKER TO TRACK THE POINTS |
% Create a point tracker and enable the bidirectional error constraint to |
% make it more robust in the presence of noise and clutter. |
pointTracker = vision.PointTracker(‘MaxBidirectionalError’, 2); |
% Initialize the tracker with the initial point locations and the initial |
% video frame. |
points = points.Location; |
initialize(pointTracker, points, videoFrame); |
%STAGE 4: INITIALIZE A VIDEO PLAYER TO DISPLAY THE RESULTS |
videoPlayer = vision.VideoPlayer(‘Position’,... |
[100 100 [size(videoFrame, 2), size(videoFrame, 1)]+30]); |
%STAGE 5: TRACK THE FACE |
% Make a copy of the points to be used for computing the geometric |
% transformation between the points in the previous and the current frames |
oldPoints = points; |
while ~isDone(videoFileReader) |
% get the next frame |
videoFrame = step(videoFileReader); |
% Track the points. Note that some points may be lost. |
[points, isFound] = step(pointTracker, videoFrame); |
visiblePoints = points(isFound, :); |
oldInliers = oldPoints(isFound, :); |
if size(visiblePoints, 1) >= 2 % need at least 2 points |
% Estimate the geometric transformation between the old points |
% and the new points and eliminate outliers |
[xform, oldInliers, visiblePoints] = estimateGeometricTransform(... |
oldInliers, visiblePoints, ‘similarity’, ‘MaxDistance’, 4); |
% Apply the transformation to the bounding box points |
bboxPoints = transformPointsForward(xform, bboxPoints); |
% Also apply the transformation to the ROI box points and other ROIs |
fROIPoints = transformPointsForward(xform, fROIPoints); |
fROIPoints = double(fROIPoints); %change fROIPoints from single to double |
bfROIPoints = transformPointsForward(xform, bfROIPoints); |
bfROIPoints = double(bfROIPoints); %change fROIPoints from single to double |
bbROIPoints = transformPointsForward(xform, bbROIPoints); |
bbROIPoints = double(bbROIPoints); %change fROIPoints from single to double |
x1 = fROIPoints(:,1); |
y1 = fROIPoints(:,2); |
x2 = bfROIPoints(:,1); |
y2 = bfROIPoints(:,2); |
x3 = bbROIPoints(:,1); |
y3 = bbROIPoints(:,2); |
bw1 = poly2mask(x1, y1, size(videoFrame, 1), size(videoFrame, 2)); |
bw2 = poly2mask(x2, y2, size(videoFrame, 1), size(videoFrame, 2)); |
bw3 = poly2mask(x3, y3, size(videoFrame, 1), size(videoFrame, 2)); |
%bw4 = poly2mask(x4, y4, size(videoFrame, 1), size(videoFrame, 2)); |
p = p + 1; |
gr(:,:,p) = fROIPoints; |
%monitor(:,:,p) = bROIPoints; |
redChannel = videoFrame(:, :, 1); % red channel of video frame |
greenChannel = videoFrame(:, :, 2); % green channel of video frame |
blueChannel = videoFrame(:, :, 3); % blue channel of video frame |
YCbCr = rgb2ycbcr(videoFrame); |
YChannel = YCbCr(:,:,1); |
pSIG1(1, p) = mean2(redChannel(logical(bw1))); %forehead ROI raw red signal |
pSIG2(1, p) = mean2(greenChannel(logical(bw1))); % forehead ROI raw green signal |
pSIG3(1, p) = mean2(blueChannel(logical(bw1))); %forehead ROI raw blue signal |
pSIG4(1, p) = mean2(YChannel(logical(bw1))); %forehead ROI raw luminance signal |
pSIG5(1, p) = mean2(greenChannel(logical(bw2))); % bforehead ROI raw green signal |
pSIG6(1, p) = mean2(greenChannel(logical(bw3))); % 60%80% bb box ROI raw green |
pSIG9(1, p) = fROIPoints(1,1); % x motion signal of forehead ROI |
pSIG10(1, p) = fROIPoints(1,2); % y motion signal of forehead ROI |
% Insert a bounding box around the object being tracked |
bboxPolygon = reshape(bboxPoints’, 1, []); |
videoFrame = insertShape(videoFrame, ‘Polygon’, bboxPolygon, ... |
‘LineWidth’, 2); |
% Also insert fROI box around the object being tracked, and insert for other Roys |
fROIPolygon = reshape(fROIPoints’, 1, []); |
videoFrame = insertShape(videoFrame, ‘Polygon’, fROIPolygon, ... |
‘LineWidth’, 2); |
bfROIPolygon = reshape(bfROIPoints’, 1, []); |
videoFrame = insertShape(videoFrame, ‘Polygon’, bfROIPolygon, ... |
‘LineWidth’, 2); |
bbROIPolygon = reshape(bbROIPoints’, 1, []); |
videoFrame = insertShape(videoFrame, ‘Polygon’, bbROIPolygon, ... |
‘LineWidth’, 2); |
% Display tracked points |
videoFrame = insertMarker(videoFrame, visiblePoints, ‘+’, ... |
‘Color’, ‘white’); |
% Reset the points |
oldPoints = visiblePoints; |
setPoints(pointTracker, oldPoints); |
end |
% Display the annotated video frame using the video player object |
step(videoPlayer, videoFrame); |
%break |
end |
% Clean up |
release(videoFileReader); |
release(videoPlayer); |
release(pointTracker); |
% STEP 6: SIGNAL DETRENDING, SPA |
pSIG1 = double(pSIG1’); |
pSIG2 = double(pSIG2’); |
pSIG3 = double(pSIG3’); |
pSIG4 = double(pSIG4’); |
pSIG5 = double(pSIG5’); |
pSIG6 = double(pSIG6’); |
pSIG9 = double(pSIG9’); |
pSIG10 = double(pSIG10’); |
T = length(pSIG1); |
lambda = 10; |
I = speye(T); |
D2 = spdiags(ones(T-2,1)*[1 -2 1],[0:2],T-2,T); |
dpSIG1 = (I-inv(I+lambda^2*D2’*D2))*pSIG1; |
dpSIG2 = (I-inv(I+lambda^2*D2’*D2))*pSIG2; |
dpSIG3 = (I-inv(I+lambda^2*D2’*D2))*pSIG3; |
dpSIG4 = (I-inv(I+lambda^2*D2’*D2))*pSIG4; |
dpSIG5 = (I-inv(I+lambda^2*D2’*D2))*pSIG5; |
dpSIG6 = (I-inv(I+lambda^2*D2’*D2))*pSIG6; |
dpSIG9 = (I-inv(I+lambda^2*D2’*D2))*pSIG9; |
dpSIG10 = (I-inv(I+lambda^2*D2’*D2))*pSIG10; |
% STEP 7: FILTERING |
fs = 29; |
[b, a] = butter(4, [0.8 6.0]/(fs/2), ‘bandpass’); |
fpSIG1 = filter(b, a, dpSIG1); |
fpSIG2 = filter(b, a, dpSIG2); |
fpSIG3 = filter(b, a, dpSIG3); |
fpSIG4 = filter(b, a, dpSIG4); |
fpSIG5 = filter(b, a, dpSIG5); |
fpSIG6 = filter(b, a, dpSIG6); |
fpSIG9 = filter(b, a, dpSIG9); |
fpSIG10 = filter(b, a, dpSIG10); |
% STEP 8: SIGNAL NORMALIZATION |
npSIG1 = (fpSIG1 - mean(fpSIG1))/std(fpSIG1); % remember to change these signals back to fSIG |
npSIG2 = (fpSIG2 - mean(fpSIG2))/std(fpSIG2); |
npSIG3 = (fpSIG3 - mean(fpSIG3))/std(fpSIG3); |
npSIG4 = (fpSIG4 - mean(fpSIG4))/std(fpSIG4); |
npSIG5 = (fpSIG5 - mean(fpSIG5))/std(fpSIG5); |
npSIG6 = (fpSIG6 - mean(fpSIG6))/std(fpSIG6); |
npSIG9 = (fpSIG9 - mean(fpSIG9))/std(fpSIG9); |
npSIG10 = (fpSIG10- mean(fpSIG10))/std(fpSIG10); |
% STEP 9: FFT OF R, G, and B SIGNALS + DISPLAY OF FFT OF EACH SIGNAL |
L = length(npSIG1); |
winvec = hann(L); |
F1 = fft(npSIG1.*winvec); |
F2 = fft(npSIG2.*winvec); |
F3 = fft(npSIG3.*winvec); |
F4 = fft(npSIG4.*winvec); |
F5 = fft(npSIG5.*winvec); |
F6 = fft(npSIG6.*winvec); |
F9 = fft(npSIG9.*winvec); |
F10 = fft(npSIG10.*winvec); |
A2 = abs(F1/L); |
A1 = A2(1:L/2+1); |
A1(2:end-1) = 2*A1(2:end-1); |
B2 = abs(F2/L); |
B1 = B2(1:L/2+1); |
B1(2:end-1) = 2*B1(2:end-1); |
C2 = abs(F3/L); |
C1 = C2(1:L/2+1); |
C1(2:end-1) = 2*C1(2:end-1); |
D2 = abs(F4/L); |
D1 = D2(1:L/2+1); |
D1(2:end-1) = 2*D1(2:end-1); |
E2 = abs(F5/L); |
E1 = E2(1:L/2+1); |
E1(2:end-1) = 2*E1(2:end-1); |
G2 = abs(F6/L); |
G1 = G2(1:L/2+1); |
G1(2:end-1) = 2*G1(2:end-1); |
J2 = abs(F9/L); |
J1 = J2(1:L/2+1); |
J1(2:end-1) = 2*J1(2:end-1); |
K2 = abs(F10/L); |
K1 = K2(1:L/2+1); |
K1(2:end-1) = 2*K1(2:end-1); |
% DISPLAY THREE FFTs |
f = 60*fs*(0:(L/2))/L; |
figure |
subplot(2,2,1) |
plot(f, B1.^2, ‘green’) |
title(‘fft of green signal of forehead ROI’) |
xlabel(‘f(Hz)’) |
ylabel(‘Power(f)’) |
subplot(2,2,2) |
plot(f, D1.^2) |
title(‘fft of luminance signal of forehead ROI’) |
xlabel(‘f(Hz)’) |
ylabel(‘Power(f)’) |
subplot(2,2,3) |
plot(f, E1.^2, ‘green’) |
title(‘fft of green signal of bigger forehead ROI’) |
xlabel(‘f(Hz)’) |
ylabel(‘Power(f)’) |
subplot(2,2,4) |
plot(f, G1.^2, ‘green’) |
title(‘fft of green signal of 60%80% bb ROI’) |
xlabel(‘f(Hz)’) |
ylabel(‘Power(f)’) |
figure |
subplot(2,2,1) |
plot(f, J1.^2) |
title(‘fft of x motion signal’) |
xlabel(‘f(Hz)’) |
ylabel(‘Power(f)’) |
subplot(2,2,2) |
plot(f, K1.^2) |
title(‘fft of y motion signal’) |
xlabel(‘f(Hz)’) |
ylabel(‘Power(f)’) |
%------------------------------WELCH |
[pxx1 f] = pwelch(npSIG2.*winvec, [], [], [], fs); |
[pxx2 f] = pwelch(npSIG4.*winvec, [], [], [], fs); |
[pxx3 f] = pwelch(npSIG5.*winvec, [], [], [], fs); |
[pxx4 f] = pwelch(npSIG6.*winvec, [], [], [], fs); |
[pxx7 f] = pwelch(npSIG9.*winvec, [], [], [], fs); |
[pxx8 f] = pwelch(npSIG10.*winvec, [], [], [], fs); |
figure |
subplot(2,2,1) |
plot(60*f, pxx1, ‘green’) |
title(‘Welch of green signal of forehead ROI’) |
xlabel(‘f(Hz)’) |
ylabel(‘Power(f)’) |
subplot(2,2,2) |
plot(60*f, pxx2) |
title(‘Welch of luminance signal of forehead ROI’) |
xlabel(‘f(Hz)’) |
ylabel(‘Power(f)’) |
subplot(2,2,3) |
plot(60*f, pxx3, ‘green’) |
title(‘Welch of green signal of bigger forehead ROI’) |
xlabel(‘f(Hz)’) |
ylabel(‘Power(f)’) |
subplot(2,2,4) |
plot(60*f, pxx4, ‘green’) |
title(‘Welch of green signal of 60%80% bb ROI’) |
xlabel(‘f(Hz)’) |
ylabel(‘Power(f)’) |
ROI Name | ROI Description | Associated Signals | Description of Signal |
ROI A | ROI centred on Forehead | SIGNAL 1.1 | Green (RGB) signal (FFT) |
SIGNAL 1.2 | Green (RGB) signal (Welch) | ||
SIGNAL 2.1 | Luminance (YCbCr) signal (FFT) | ||
SIGNAL 2.2 | Luminance (YCbCr) signal (Welch) | ||
ROI B | Forehead ROI 50% larger than ROI A | SIGNAL 3.1 | Green (RGB) signal (FFT) |
SIGNAL 3.2 | Green (RGB) signal (Welch) | ||
ROI C | Face ROI comprises central 60% (width) and central 80% (height) of bbox | SIGNAL 3.1 | Green (RGB) signal (FFT) |
SIGNAL 3.2 | Green (RGB) signal (Welch) |
Exercise 1 | ||||||||||
Sample table for recording rPPG HR estimates | ||||||||||
Video | Heart Rate Estimate | Ref. HR | ||||||||
SIG1 | SIG2 | SIG3 | SIG4 | |||||||
FFT | Welch | FFT | Welch | FFT | Welch | FFT | Welch | |||
1 | ||||||||||
2 | ||||||||||
3 | ||||||||||
4 | ||||||||||
5 | ||||||||||
6 | ||||||||||
7 | ||||||||||
8 | ||||||||||
9 | ||||||||||
10 |
Exercise 2 |
|
Exercise 3 | ||
Sample table for recording estimated HR vs. Ref. HR | ||
Trial | Est. HR | Ref. HR |
1 | ||
2 | ||
3 | ||
4 | ||
5 | ||
6 | ||
7 | ||
8 | ||
9 | ||
10 |
Exercise 1 |
|
Exercise 2 |
|
Exercise 3 |
|
Evaluation |
|
1 | For convenience of comparison, the lighting conditions – natural and studio – for COHFACE videos shall heretofore be referred to as ambient and dedicated
|
2 | The discussion of results focuses on mean error since its meaning is more intuitive than that of RMSE as a measure of agreement. Mean error also has the advantage of being defined relative to a reference. RMSE is, however, still useful as it facilitates comparison with the results of other studies which employ that measure. |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2024 MDPI (Basel, Switzerland) unless otherwise stated