Data containers
Defines some containers passed between objects of the yarPPG application.
Color
dataclass
Defines a color in RGB(A) format.
Source code in src\yarppg\containers.py
from_array(arr)
classmethod
RegionOfInterest
dataclass
Container for defining the region of interest (and background) in an image.
Source code in src\yarppg\containers.py
face_rect: tuple[int, int, int, int] | None = None
class-attribute
instance-attribute
Bounding box of the detected face (x, y, w, h).
RppgResult
dataclass
Container for rPPG computation results.
Calling np.array
on this container will return a 8-element vector containing
the rPPG signal value, RGB values of the ROI, RGB values of the background (or nans)
and the HR. to_series
produces a clearer representation of the values with named
indices.
Note that both __array__
and to_series
ignore the roi
attribute.
Source code in src\yarppg\containers.py
bg_mean: Color
instance-attribute
Mean color of the background.
hr: float = np.nan
class-attribute
instance-attribute
Heart rate estimate in frames per beat.
roi: RegionOfInterest
instance-attribute
Region of interest identified in the current frame.
roi_mean: Color
instance-attribute
Mean color of the ROI.
value: float
instance-attribute
Output value of the rPPG signal extractor.