Skip to content
Snippets Groups Projects
Commit c3c6328b authored by Guillaume HEUSCH's avatar Guillaume HEUSCH
Browse files

Merge branch...

Merge branch '24-retrieve-colors-from-all-channels-for-some-of-pulse-based-pad-preprocessors' into 'master'

Resolve "Retrieve colors from all channels for some of pulse-based PAD preprocessors"

Closes #24

See merge request !70
parents 55a11e79 96ade3b4
No related branches found
No related tags found
1 merge request!70Resolve "Retrieve colors from all channels for some of pulse-based PAD preprocessors"
Pipeline #
...@@ -134,7 +134,7 @@ class LiPulseExtraction(Preprocessor): ...@@ -134,7 +134,7 @@ class LiPulseExtraction(Preprocessor):
ldms = previous_ldms ldms = previous_ldms
# so do nothing ... # so do nothing ...
logger.warning("No mask detected in frame {}".format(i)) logger.warning("No mask detected in frame {}".format(i))
face_color[i] = 0 face_color[i] = [0, 0, 0]
continue continue
frame = frame_rotated frame = frame_rotated
...@@ -154,8 +154,8 @@ class LiPulseExtraction(Preprocessor): ...@@ -154,8 +154,8 @@ class LiPulseExtraction(Preprocessor):
ldms = numpy.array(ldms) ldms = numpy.array(ldms)
mask_points, mask = kp66_to_mask(frame, ldms, self.indent, self.debug) mask_points, mask = kp66_to_mask(frame, ldms, self.indent, self.debug)
#XXX : be sure that the 3 colors are returned !!
face_color[i] = compute_average_colors_mask(frame, mask, self.debug) face_color[i] = compute_average_colors_mask(frame, mask, self.debug)
logger.debug("Face color in frame {} = {}".format(i, face_color[i]))
previous_ldms = ldms previous_ldms = ldms
counter += 1 counter += 1
......
...@@ -130,7 +130,7 @@ class PPGSecure(Preprocessor): ...@@ -130,7 +130,7 @@ class PPGSecure(Preprocessor):
# get the mask and the green value in the different ROIs # get the mask and the green value in the different ROIs
masks = self._get_masks(frame, ldms) masks = self._get_masks(frame, ldms)
for k in range(5): for k in range(5):
green_mean[i, k] = compute_average_colors_mask(frame, masks[k], self.debug) green_mean[i, k] = compute_average_colors_mask(frame, masks[k], self.debug)[1]
previous_ldms = ldms previous_ldms = ldms
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment