Hello, we are evaluating Apple Vision Pro for an AR calibration experiment.
Can BarcodeDetectionProvider on visionOS 2.0+ detect a QR code/barcode and provide its 3D position and orientation, such as a transform, so that we can align virtual content with a real-world marker?
Does the BarcodeAnchor update continuously when the headset or the barcode moves?
Thank you.
Hello,
BarcodeDetectionProvider can return the 3D position and orientation of a QR code. When ARKit detects a barcode, it provides a BarcodeAnchor which includes a transform property. This transform contains the barcode's 3D position and orientation in the person's surroundings. To use this capability, your app needs the Spatial barcode and QR code scanning entitlement, as it is part of the enterprise APIs for visionOS.
I recommend that you check out the following resources for more details:
- BarcodeDetectionProvider
- Locating and decoding barcodes in 3D space
- Spatial barcode and QR code scanning
- Introducing enterprise APIs for visionOS
-- Greg