nicetoolbox.visual.media.components.BodyJointsComponent

class nicetoolbox.visual.media.components.BodyJointsComponent(visualizer_config: Dict, io, logger, component_name: str)[source]

Bases: Component

Class for visualizing body joint data.

Methods

calculate_middle_eyes

Calculate the middle of the eyes for the given dimension.

visualize

Visualize the body joints component.

calculate_middle_eyes(dimension: int) Tuple[ndarray, List[str]][source]

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[source]

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.