descriptor
TypeScriptget descriptor(): RequestDescriptorSwift declarationvar descriptor: RequestDescriptor { get }An enum that identifies the request and request revision.
struct · iOS 26.0+ · SDK 27.1
struct RecognizeDocumentsRequestAn image-analysis request to scan an image of a document and provide information about its structure. This request scans a document and extracts different groups of text and barcodes within the document image. Use this request to understand different types of structured texts like receipts, nutritional labels, textbook pages, forms, or other documents that you want to understand in further detail. The request generates a ``DocumentObservation`` array, which allows you to access your chosen document’s structure grouped by words, lines, or paragraphs. You can also access tables and lists that appear in the document.
get descriptor(): RequestDescriptorSwift declarationvar descriptor: RequestDescriptor { get }An enum that identifies the request and request revision.
get regionOfInterest(): NormalizedRectSwift declarationvar regionOfInterest: NormalizedRectThe region of the image in which Vision will perform the request. The rectangle is normalized to the dimensions of the processed image. Its origin is specified relative to the image's lower-left corner. By default, the region of interest will be the full image.
set regionOfInterest(value: NormalizedRect)Swift declarationvar regionOfInterest: NormalizedRectThe region of the image in which Vision will perform the request. The rectangle is normalized to the dimensions of the processed image. Its origin is specified relative to the image's lower-left corner. By default, the region of interest will be the full image.
setComputeDevice(computeDevice: (_CoreML_MLComputeDevice) | null, computeStage: ComputeStage): voidSwift declarationmutating func setComputeDevice(_ computeDevice: MLComputeDevice?, for computeStage: ComputeStage)Assigns a compute device for a compute stage. If the parameter `computeDevice` is `nil`, the framework removes any explicit compute device assignment and allows the framework to select the device. Configure any compute device for a given compute stage. When performing a request, the system makes a validity check. Use `supportedComputeStageDevices` to get valid compute devices for a request’s compute stages. - Parameters: - `computeDevice: `The compute device to assign to the compute stage. - `computeStage: `The compute stage.
static get supportedRevisions(): Array<RecognizeDocumentsRequest_Revision>Swift declarationstatic let supportedRevisions: [RecognizeDocumentsRequest.Revision]The revisions supported by `ClassifyImageRequest`.
get textRecognitionOptions(): RecognizeDocumentsRequest_TextRecognitionOptionsSwift declarationvar textRecognitionOptions: RecognizeDocumentsRequest.TextRecognitionOptionsConfiguration for recognizing text in the document. Set properties such as what languages are detected.
set textRecognitionOptions(value: RecognizeDocumentsRequest_TextRecognitionOptions)Swift declarationvar textRecognitionOptions: RecognizeDocumentsRequest.TextRecognitionOptionsConfiguration for recognizing text in the document. Set properties such as what languages are detected.
get barcodeDetectionOptions(): RecognizeDocumentsRequest_BarcodeDetectionOptionsSwift declarationvar barcodeDetectionOptions: RecognizeDocumentsRequest.BarcodeDetectionOptionsConfiguration for detecting machine-readable codes in the document. Enable barcode detection and set what symbologies (eg. `.qrCode`) will be detected.
set barcodeDetectionOptions(value: RecognizeDocumentsRequest_BarcodeDetectionOptions)Swift declarationvar barcodeDetectionOptions: RecognizeDocumentsRequest.BarcodeDetectionOptionsConfiguration for detecting machine-readable codes in the document. Enable barcode detection and set what symbologies (eg. `.qrCode`) will be detected.
get supportedBarcodeSymbologies(): Array<BarcodeSymbology>Swift declarationvar supportedBarcodeSymbologies: [BarcodeSymbology] { get }The collection of revisions the request supports.
get supportedComputeStageDevices(): NativeMap<ComputeStage, Array<_CoreML_MLComputeDevice>>Swift declarationvar supportedComputeStageDevices: [ComputeStage : [MLComputeDevice]] { get }get supportedRecognitionLanguages(): Array<_Foundation_Locale_Language>Swift declarationvar supportedRecognitionLanguages: [Locale.Language] { get }The identifiers of the languages that the request supports.
get revision(): RecognizeDocumentsRequest_RevisionSwift declarationlet revision: RecognizeDocumentsRequest.RevisionThe request's configured revision.
static init(revision?: (RecognizeDocumentsRequest_Revision) | null): RecognizeDocumentsRequestSwift declarationinit(_ revision: RecognizeDocumentsRequest.Revision? = nil)Creates a document content recognition request. - Parameters: - revision: The specific algorithm or implementation revision that performs the request.
No declarations were skipped in this snapshot.