<!--
{
  "availability" : [
    "iOS: 18.0.0 -",
    "iPadOS: 18.0.0 -",
    "macOS: 15.0.0 -",
    "tvOS: 18.0.0 -",
    "visionOS: 2.0.0 -",
    "watchOS: 27.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Vision",
  "identifier" : "/documentation/Vision/DetectHorizonRequest",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "Vision"
    ],
    "preciseIdentifier" : "s:6Vision20DetectHorizonRequestV"
  },
  "title" : "DetectHorizonRequest"
}
-->

# DetectHorizonRequest

An image-analysis request that determines the horizon angle in an image.

```
struct DetectHorizonRequest
```

## Overview

This request generates a [`HorizonObservation`](/documentation/Vision/HorizonObservation) object that describes the horizon the request detects.

## Topics

### Creating a request

[`init(_:)`](/documentation/Vision/DetectHorizonRequest/init(_:))

Creates a horizon-detection request.

### Performing a request

[`perform(on:orientation:)`](/documentation/Vision/ImageProcessingRequest/perform(on:orientation:)-80bya)

Performs the request on an image URL and produces observations.

[`perform(on:orientation:)`](/documentation/Vision/ImageProcessingRequest/perform(on:orientation:)-3f3f1)

Performs the request on image data and produces observations.

[`perform(on:orientation:)`](/documentation/Vision/ImageProcessingRequest/perform(on:orientation:)-qxxx)

Performs the request on a Core Graphics image and produces observations.

[`perform(on:orientation:)`](/documentation/Vision/ImageProcessingRequest/perform(on:orientation:)-xspx)

Performs the request on a pixel buffer and produces observations.

[`perform(on:orientation:)`](/documentation/Vision/ImageProcessingRequest/perform(on:orientation:)-3hddl)

Performs the request on a Core Media buffer and produces observations.

[`perform(on:orientation:)`](/documentation/Vision/ImageProcessingRequest/perform(on:orientation:)-85ex1)

Performs the request on a Core Image image and produces observations.

### Understanding the result

[`HorizonObservation`](/documentation/Vision/HorizonObservation)

The horizon angle information that an image-analysis request detects.

### Getting the revision

[`revision`](/documentation/Vision/DetectHorizonRequest/revision-swift.property)

The algorithm or implementation the request uses.

[`supportedRevisions`](/documentation/Vision/DetectHorizonRequest/supportedRevisions)

The collection of revisions the request supports.

[`Revision`](/documentation/Vision/DetectHorizonRequest/Revision-swift.enum)

A type that describes the algorithm or implementation that the request performs.

## Relationships

### Conforms To

[`Hashable`](/documentation/Swift/Hashable)

[`Equatable`](/documentation/Swift/Equatable)

[`SendableMetatype`](/documentation/Swift/SendableMetatype)

[`Sendable`](/documentation/Swift/Sendable)

[`CustomStringConvertible`](/documentation/Swift/CustomStringConvertible)

[`VisionRequest`](/documentation/Vision/VisionRequest)

[`ImageProcessingRequest`](/documentation/Vision/ImageProcessingRequest)

---

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)