I implemented a simple perspective transform using govips bindings it looks like this:
func DistortPerspective(ref *vips.ImageRef, tiepoints []float64) error {