Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
bob.rppg.base
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
bob
bob.rppg.base
Commits
35215aab
Commit
35215aab
authored
6 years ago
by
Guillaume HEUSCH
Browse files
Options
Downloads
Patches
Plain Diff
[cvpr14] return 3 mean colors in compute_average_color mask, instead of green only
parent
23457d9c
No related branches found
No related tags found
1 merge request
!8
Resolve "Potential bug when computing average color from mask"
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
bob/rppg/cvpr14/extract_utils.py
+4
-4
4 additions, 4 deletions
bob/rppg/cvpr14/extract_utils.py
with
4 additions
and
4 deletions
bob/rppg/cvpr14/extract_utils.py
+
4
−
4
View file @
35215aab
...
@@ -281,8 +281,8 @@ def compute_average_colors_mask(image, mask, plot=False):
...
@@ -281,8 +281,8 @@ def compute_average_colors_mask(image, mask, plot=False):
Returns
Returns
-------
-------
color:
:obj:`float`
color:
numpy.ndarray
The average
green
color inside the mask ROI.
The average
RGB
color
s
inside the mask ROI.
"""
"""
if
plot
:
if
plot
:
...
@@ -293,8 +293,8 @@ def compute_average_colors_mask(image, mask, plot=False):
...
@@ -293,8 +293,8 @@ def compute_average_colors_mask(image, mask, plot=False):
pyplot
.
title
(
'
Mask overlaid on the original frame
'
)
pyplot
.
title
(
'
Mask overlaid on the original frame
'
)
pyplot
.
show
()
pyplot
.
show
()
green
=
image
[
1
,
mask
]
[
red
,
green
,
blue
]
=
image
[
:
,
mask
]
return
numpy
.
mean
(
green
)
return
numpy
.
array
([
numpy
.
mean
(
red
),
numpy
.
mean
(
green
),
numpy
.
mean
(
blue
)]
)
def
compute_average_colors_wholeface
(
image
,
plot
=
False
):
def
compute_average_colors_wholeface
(
image
,
plot
=
False
):
"""
computes the average green color within the provided face image
"""
computes the average green color within the provided face image
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment