One Logo Pool Ball
Vision · IOS API REFERENCE

DetectBarcodesRequest

struct · iOS 18.0+ · SDK 27.1

struct DetectBarcodesRequest

A request that detects barcodes in an image. This request returns an array of BarcodeObservation objects, one for each barcode it detects.

Members (12)

get · iOS 18.0+

descriptor

TypeScript
get descriptor(): RequestDescriptor
Swift declaration
var descriptor: RequestDescriptor { get }

An enum that identifies the request and request revision.

get · iOS 18.0+

symbologies

TypeScript
get symbologies(): Array<BarcodeSymbology>
Swift declaration
var symbologies: [BarcodeSymbology]

The collection of specific barcode symbologies to be detected. By default all symbologies will be detected.

set · iOS 18.0+

symbologies

TypeScript
set symbologies(value: Array<BarcodeSymbology>)
Swift declaration
var symbologies: [BarcodeSymbology]

The collection of specific barcode symbologies to be detected. By default all symbologies will be detected.

get · iOS 18.0+

regionOfInterest

TypeScript
get regionOfInterest(): NormalizedRect
Swift declaration
var regionOfInterest: NormalizedRect

The 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 · iOS 18.0+

regionOfInterest

TypeScript
set regionOfInterest(value: NormalizedRect)
Swift declaration
var regionOfInterest: NormalizedRect

The 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.

method · iOS 18.0+

setComputeDevice

TypeScript
setComputeDevice(computeDevice: (_CoreML_MLComputeDevice) | null, computeStage: ComputeStage): void
Swift declaration
mutating 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.

get · iOS 18.0+

supportedRevisions

TypeScript
static get supportedRevisions(): Array<DetectBarcodesRequest_Revision>
Swift declaration
static let supportedRevisions: [DetectBarcodesRequest.Revision]

The collection of currently-supported revisions for `DetectBarcodesRequest`.

get · iOS 18.0+

supportedSymbologies

TypeScript
get supportedSymbologies(): Array<BarcodeSymbology>
Swift declaration
var supportedSymbologies: [BarcodeSymbology] { get }

The collection of barcode symbologies that can be recognized by the request.

get · iOS 18.0+

coalescesCompositeSymbologies

TypeScript
get coalescesCompositeSymbologies(): boolean
Swift declaration
var coalescesCompositeSymbologies: Bool

Allow multiple codes to be coalesced into one. The default value for this property is `false`.

set · iOS 18.0+

coalescesCompositeSymbologies

TypeScript
set coalescesCompositeSymbologies(value: boolean)
Swift declaration
var coalescesCompositeSymbologies: Bool

Allow multiple codes to be coalesced into one. The default value for this property is `false`.

get · iOS 18.0+

revision

TypeScript
get revision(): DetectBarcodesRequest_Revision
Swift declaration
let revision: DetectBarcodesRequest.Revision

The request's configured revision.

init · iOS 18.0+

init

TypeScript
static init(revision?: (DetectBarcodesRequest_Revision) | null): DetectBarcodesRequest
Swift declaration
init(_ revision: DetectBarcodesRequest.Revision? = nil)

- Parameters: - revision: The specific algorithm or implementation revision that's used to perform the request.

Skipped declarations

No declarations were skipped in this snapshot.

All Vision types →