pose_stickmen_12_to_pose_stickmen_12

menpo.landmark.pose_stickmen_12_to_pose_stickmen_12(x, return_mapping=False)[source]

Apply the ‘stickmen’ 12-point semantic labels.

The semantic labels applied are as follows:

  • torso
  • right_upper_arm
  • left_upper_arm
  • right_lower_arm
  • left_lower_arm
  • head
Parameters:
  • x (LandmarkGroup or PointCloud or ndarray) – The input landmark group, pointcloud or array to label. If a pointcloud is passed, then only the connectivity information is propagated to the pointcloud (a subclass of PointCloud may be returned).
  • return_mapping (bool, optional) – Only applicable if a PointCloud or ndarray is passed. Returns the mapping dictionary which maps labels to indices into the resulting PointCloud (which is then used to for building a LandmarkGroup. This parameter is only provided for internal use so that other labellers can piggyback off one another.
Returns:

  • x_labelled (LandmarkGroup or PointCloud) – If a LandmarkGroup was passed, a LandmarkGroup is returned. This landmark group will contain specific labels and these labels may refer to sub-pointclouds with specific connectivity information.

    If a PointCloud was passed, a PointCloud is returned. Only the connectivity information is propagated to the pointcloud (a subclass of PointCloud may be returned).

  • mapping_dict (ordereddict {str -> int ndarray}, optional) – Only returned if return_mapping==True. Used for building LandmarkGroup.

Raises:

: :map:`LabellingError` – If the given landmark group/pointcloud contains less than the expected number of points.