---
title: "vImageGetPerspectiveWarp(_:_:_:_:)"
framework: accelerate
role: symbol
role_heading: Function
path: "accelerate/vimagegetperspectivewarp(_:_:_:_:)"
---

# vImageGetPerspectiveWarp(_:_:_:_:)

Returns a projective-transformation structure that defines the mapping between a source quadrilateral and a destination quadrilateral.

## Declaration

```swift
func vImageGetPerspectiveWarp(_ srcPoints: UnsafePointer<(Float, Float)>, _ destPoints: UnsafePointer<(Float, Float)>, _ transform: UnsafeMutablePointer<vImage_PerpsectiveTransform>, _ flags: vImage_Flags) -> vImage_Error
```

## Parameters

- `srcPoints`: The four source points.
- `destPoints`: The four destination points.
- `transform`: On output, a doc://com.apple.accelerate/documentation/Accelerate/vImage_PerpsectiveTransform structure that describes the transformation from the source points to the destination points.
- `flags`: The options to use when performing the operation. If your code implements its own tiling or its own multithreading, pass doc://com.apple.accelerate/documentation/Accelerate/kvImageDoNotTile; otherwise, pass doc://com.apple.accelerate/documentation/Accelerate/kvImageNoFlags.

## Mentioned in

Transforming an image in three dimensions

## Return Value

Return Value kvImageNoError; otherwise, one of the error codes in Data Types and Constants.

## See Also

### Computing a projective transformation from source and destination quadrilaterals

- [Transforming an image in three dimensions](accelerate/transforming-an-image-in-three-dimensions.md)
- [vImage_PerpsectiveTransform](accelerate/vimage_perpsectivetransform.md)
