<!--
{
  "availability" : [
    "iOS: 16.0.0 -",
    "iPadOS: 16.0.0 -",
    "macCatalyst: 16.0.0 -",
    "macOS: 13.0.0 -",
    "tvOS: 16.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 9.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Accelerate",
  "identifier" : "/documentation/Accelerate/vImageGetPerspectiveWarp(_:_:_:_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Function",
  "symbol" : {
    "kind" : "Function",
    "modules" : [
      "Accelerate"
    ],
    "preciseIdentifier" : "c:@F@vImageGetPerspectiveWarp"
  },
  "title" : "vImageGetPerspectiveWarp(_:_:_:_:)"
}
-->

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

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

```
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 [`vImage_PerpsectiveTransform`](/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 [`kvImageDoNotTile`](/documentation/Accelerate/kvImageDoNotTile); otherwise, pass [`kvImageNoFlags`](/documentation/Accelerate/kvImageNoFlags).

## Return Value

[`kvImageNoError`](/documentation/Accelerate/kvImageNoError); otherwise, one of the error codes in <doc://com.apple.documentation/documentation/Accelerate/data-types-and-constants>.

## Discussion

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)