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

# RecognizedText

Text recognized in an image through a text recognition request.

```
struct RecognizedText
```

## Topics

### Getting the bounding box

[`func boundingBox(for: Range<String.Index>) -> RectangleObservation?`](/documentation/Vision/RecognizedText/boundingBox(for:))

Calculates the bounding box around the characters in the range of a string.

### Inspecting the recognized text

[`var string: String`](/documentation/Vision/RecognizedText/string)

The top candidate for recognized text.

[`var confidence: Float`](/documentation/Vision/RecognizedText/confidence)

A normalized confidence score for the text recognition result.

## Relationships

### Conforms To

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

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

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

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

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

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

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

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

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

---

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)