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

# DetectBarcodesRequest

A request that detects barcodes in an image.

```
struct DetectBarcodesRequest
```

## Overview

This request generates a collection of [`BarcodeObservation`](/documentation/Vision/BarcodeObservation) objects that describe each barcode the request detects.

## Topics

### Creating a request

[`init(_:)`](/documentation/Vision/DetectBarcodesRequest/init(_:))

Creates a barcode-detection request.

### Performing a request

[`perform(on:orientation:)`](/documentation/Vision/ImageProcessingRequest/perform(on:orientation:)-80bya)

Performs the request on an image URL and produces observations.

[`perform(on:orientation:)`](/documentation/Vision/ImageProcessingRequest/perform(on:orientation:)-3f3f1)

Performs the request on image data and produces observations.

[`perform(on:orientation:)`](/documentation/Vision/ImageProcessingRequest/perform(on:orientation:)-qxxx)

Performs the request on a Core Graphics image and produces observations.

[`perform(on:orientation:)`](/documentation/Vision/ImageProcessingRequest/perform(on:orientation:)-xspx)

Performs the request on a pixel buffer and produces observations.

[`perform(on:orientation:)`](/documentation/Vision/ImageProcessingRequest/perform(on:orientation:)-3hddl)

Performs the request on a Core Media buffer and produces observations.

[`perform(on:orientation:)`](/documentation/Vision/ImageProcessingRequest/perform(on:orientation:)-85ex1)

Performs the request on a Core Image image and produces observations.

### Understanding the result

[`BarcodeObservation`](/documentation/Vision/BarcodeObservation)

An object that represents barcode information that an image-analysis request detects.

### Configuring a request

[`symbologies`](/documentation/Vision/DetectBarcodesRequest/symbologies)

The barcode symbologies that the request detects in an image.

[`supportedSymbologies`](/documentation/Vision/DetectBarcodesRequest/supportedSymbologies)

The collection of barcode symbologies that the request can recognize.

[`BarcodeSymbology`](/documentation/Vision/BarcodeSymbology)

The barcode symbologies that the framework detects.

[`coalescesCompositeSymbologies`](/documentation/Vision/DetectBarcodesRequest/coalescesCompositeSymbologies)

A Boolean value that indicates whether the request coalesces multiple codes into one.

### Getting the revision

[`revision`](/documentation/Vision/DetectBarcodesRequest/revision-swift.property)

The algorithm or implementation the request uses.

[`supportedRevisions`](/documentation/Vision/DetectBarcodesRequest/supportedRevisions)

The collection of revisions the request supports.

[`Revision`](/documentation/Vision/DetectBarcodesRequest/Revision-swift.enum)

A type that describes the algorithm or implementation that the request performs.

## Relationships

### Conforms To

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

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

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

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

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

[`ImageProcessingRequest`](/documentation/Vision/ImageProcessingRequest)

[`VisionRequest`](/documentation/Vision/VisionRequest)

---

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)