<!--
{
  "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/countourAtIndexPath(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Vision"
    ],
    "preciseIdentifier" : "s:6Vision19ContoursObservationV19countourAtIndexPathyAC7ContourVSg10Foundation0fG0VF"
  },
  "title" : "countourAtIndexPath(_:)"
}
-->

# countourAtIndexPath(_:)

Retrieves the contour object at the specified index, irrespective of hierarchy.

```
func countourAtIndexPath(_ indexPath: IndexPath) -> ContoursObservation.Contour?
```

## Parameters

`indexPath`

The index of the contour to retrieve. Valid values are in the range of `0` to `contourCount - 1`.

## Return Value

The contour object at the specified index path, or `nil` if the index path is invalid.

## 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)