<!--
{
  "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/ContoursObservation/Contour",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "Vision"
    ],
    "preciseIdentifier" : "s:6Vision19ContoursObservationV7ContourV"
  },
  "title" : "ContoursObservation.Contour"
}
-->

# ContoursObservation.Contour

An object that represents a detected contour in an image.

```
struct Contour
```

## Topics

### Inspecting a contour

[`var aspectRatio: Float`](/documentation/Vision/ContoursObservation/Contour/aspectRatio)

The aspect ratio of the contour, which is the image’s width divided by its height.

[`var boundingBox: NormalizedRect`](/documentation/Vision/ContoursObservation/Contour/boundingBox)

The bounding box of the region.

[`var boundingQuad: RectangleObservation`](/documentation/Vision/ContoursObservation/Contour/boundingQuad)

The bounding quadrilateral of the region.

[`var childContours: [ContoursObservation.Contour]`](/documentation/Vision/ContoursObservation/Contour/childContours)

An array of contours that this contour encloses.

[`var indexPath: IndexPath`](/documentation/Vision/ContoursObservation/Contour/indexPath)

The contour object’s index path.

[`var normalizedPath: CGPath`](/documentation/Vision/ContoursObservation/Contour/normalizedPath)

The contour object as a path in normalized coordinates.

[`var normalizedPoints: [simd_float2]`](/documentation/Vision/ContoursObservation/Contour/normalizedPoints)

The contour’s array of points in normalized coordinates.

[`var pointCount: Int`](/documentation/Vision/ContoursObservation/Contour/pointCount)

The contour’s number of points.

[`var points: [NormalizedPoint]`](/documentation/Vision/ContoursObservation/Contour/points)

The points of the region as an array of `NormalizedPoint`.

### Calculating area and perimeter

[`func calculateArea(useOrientedArea: Bool) -> Double`](/documentation/Vision/ContoursObservation/Contour/calculateArea(useOrientedArea:))

[`func calculatePerimeter() -> Double`](/documentation/Vision/ContoursObservation/Contour/calculatePerimeter())

### Getting the bounding circle

[`func boundingCircle() -> NormalizedCircle`](/documentation/Vision/ContoursObservation/Contour/boundingCircle())

### Getting the approximation

[`func polygonApproximation(epsilon: Float) throws -> ContoursObservation.Contour`](/documentation/Vision/ContoursObservation/Contour/polygonApproximation(epsilon:))

## Relationships

### Conforms To

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

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

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

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

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

---

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)