align_shape_with_bb

menpo.fitmultilevel.functions.align_shape_with_bb(shape, bounding_box)[source]

Returns the Similarity transform that aligns the provided shape with the provided bounding box.

Parameters:

shape: :class:`menpo.shape.PointCloud` :

The shape to be aligned.

bounding_box: (2, 2) ndarray :

The bounding box specified as:

np.array([[x_min, y_min], [x_max, y_max]])

Returns:

transform : :class: menpo.transform.Similarity

The align transform