noisy_shape_from_shape

menpofit.fitter.noisy_shape_from_shape(reference_shape, shape, noise_type='uniform', noise_percentage=0.05, allow_alignment_rotation=False)[source]

Constructs and perturbs the optimal similarity transform between the provided reference shape and the target shape, by adding noise to its parameters. It returns the noisy version of the reference shape.

Parameters
  • reference_shape (menpo.shape.PointCloud) – The source reference shape instance used in the alignment.

  • shape (menpo.shape.PointDirectedGraph) – The target shape instance used in the alignment

  • noise_type ({'uniform', 'gaussian'}, optional) – The type of noise to be added.

  • noise_percentage (float in (0, 1) or list of len 3, optional) – The standard percentage of noise to be added. If float, then the same amount of noise is applied to the scale, rotation and translation parameters of the optimal similarity transform. If list of float it must have length 3, where the first, second and third elements denote the amount of noise to be applied to the scale, rotation and translation parameters, respectively.

  • allow_alignment_rotation (bool, optional) – If False, then the rotation is not considered when computing the optimal similarity transform between source and target.

Returns

noisy_reference_shape (menpo.shape.PointCloud) – The noisy reference shape.