MCPcopy Create free account
hub / github.com/10Ring/LAA-Net / affine_transform

Function affine_transform

package_utils/transform.py:63–69  ·  view source on GitHub ↗

This function apply the affine transform to each point given by an affine matrix

(pt, t)

Source from the content-addressed store, hash-verified

61
62
63def affine_transform(pt, t):
64 """
65 This function apply the affine transform to each point given by an affine matrix
66 """
67 new_pt = np.array([pt[0], pt[1], 1.]).T
68 new_pt = np.dot(t, new_pt)
69 return new_pt[:2]
70
71
72def draw_landmarks(image, landmarks):

Callers 1

_align_faceMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected