nicetoolbox.visual.media.components.FaceLandmarksComponent¶
- class nicetoolbox.visual.media.components.FaceLandmarksComponent(visualizer_config, io, logger, component_name)[source]¶
Bases:
BodyJointsComponentClass for visualizing face landmarks data.
Methods
Calculate the middle of the eyes for the given dimension.
Visualize the body joints component.
- calculate_middle_eyes(dimension: int) Tuple[ndarray, List[str]]¶
Calculate the middle of the eyes for the given dimension.
- Parameters:
dimension (int) – The dimension for the middle eyes.
- Returns:
The middle eyes data and the camera names.
- Return type:
Tuple[np.ndarray, List[str]]
- visualize(frame_idx: int) None¶
Visualize the body joints component.
Combines the _log_data and _log_skeleton methods to visualize the body joints component in either 2D or 3D.
- Parameters:
frame_idx (int) – The frame index.