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.

  • obj (Transformable) – A transformable object that has the centre 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. If False they are interpreted as radians.

transform (Affine) – An affine transform that implements the shearing.


ValueError – Shearing can only be applied on 2D objects