nicetoolbox.visual.media.components.HandJointsComponent

class nicetoolbox.visual.media.components.HandJointsComponent(visualizer_config, io, logger, component_name)[source]

Bases: BodyJointsComponent

Class for visualizing hand joints data.

Initialize the HandJointsComponent by calling the BodyJointsComponent constructor.

Parameters:
  • visualizer_config (dict) – The visualizer configuration settings.

  • io – The input/output object.

  • logger – The logger object.

  • component_name (str) – The name of the component.

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

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.