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

# contourAtIndex(_:)

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

## Declaration

```swift
func contourAtIndex(_ index: Int) -> ContoursObservation.Contour?
```

## Parameters

- `index`: 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, or nil if the index is invalid.

## See Also

### Getting the contours

- [ContoursObservation.Contour](vision/contoursobservation/contour.md)
- [countourAtIndexPath(_:)](vision/contoursobservation/countouratindexpath(_:).md)
