---
title: "countourAtIndexPath(_:)"
framework: vision
role: symbol
role_heading: Instance Method
path: "vision/contoursobservation/countouratindexpath(_:)"
---

# countourAtIndexPath(_:)

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

## Declaration

```swift
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

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

## See Also

### Getting the contours

- [ContoursObservation.Contour](vision/contoursobservation/contour.md)
- [contourAtIndex(_:)](vision/contoursobservation/contouratindex(_:).md)
