# noisy_shape_from_bounding_box¶

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

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

Parameters
• shape (menpo.shape.PointCloud) – The source pointcloud instance used in the alignment. Note that the bounding box of the shape will be used.

• bounding_box (menpo.shape.PointDirectedGraph) – The target bounding box 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_shape (menpo.shape.PointCloud) – The noisy shape.