shear_about_centre¶
-
menpo.transform.
shear_about_centre
(obj, phi, psi, degrees=True)[source]¶ Return an affine transform that implements shearing (distorting) an object about its centre. The given object must be transformable and must implement a method to provide the object centre.
Parameters: - obj (
Transformable
) – A transformable object that has thecentre
method. - phi (float) – The angle of shearing in the X direction.
- psi (float) – The angle of shearing in the Y direction.
- degrees (bool, optional) – If
True
, then phi and psi are interpreted as degrees. IfFalse
they are interpreted as radians.
Returns: transform (
Affine
) – An affine transform that implements the shearing.Raises: ValueError
– Shearing can only be applied on 2D objects- obj (