Class

VNRecognizeTextRequest

An image analysis request that finds and recognizes text in an image.

Declaration

class VNRecognizeTextRequest : VNImageBasedRequest

Overview

By default, a text recognition request first locates all possible glyphs or characters in the input image, then analyzes each string. To specify or limit the languages sought in the request, set the recognitionLanguages property to an array containing the names of the languages of text you'd like to recognize. Vision returns the result of this request in a VNRecognizedTextObservation object.

Topics

Customizing Recognition Constraints

var customWords: [String]

An array of strings to supplement the recognized languages at the word recognition stage.

var minimumTextHeight: Float

The minimum height of the text expected to be recognized, relative to the image height.

var recognitionLevel: VNRequestTextRecognitionLevel

A value that determines whether the request prioritizes accuracy or speed in text recognition.

enum VNRequestTextRecognitionLevel

An enumeration of the tradeoff between fast and accurate text recognition.

Specifying Language

var recognitionLanguages: [String]

An array of languages to detect, in priority order.

var usesLanguageCorrection: Bool

A Boolean indicating whether Vision applies language correction during the recognition process.

Specifying a Revision

let VNRecognizeTextRequestRevision1: Int

A constant for specifying revision 1 of the text recognition algorithm.

See Also

Text Recognition

Structuring Recognized Text on a Document

Detect, recognize, and structure text on a business card or receipt using Vision and VisionKit.

Reading Phone Numbers in Real Time

Analyze and filter phone numbers from text recognized in live capture, building evidence over time.

Locating and Displaying Recognized Text on a Document

Overlay text recognition output from the document scanner onto an image, reporting progress throughout.

class VNRecognizedTextObservation

A request that detects and recognizes regions of text in an image.

Beta

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software