Class

ARObjectScanningConfiguration

A configuration that uses the back-facing camera to collect high-fidelity spatial data for use in scanning 3D objects for later detection.

Overview

To detect a real-world 3D object in an AR experience, your ARWorldTrackingConfiguration needs a high-fidelity 3D scan of that object—an ARReferenceObject. Running a session with ARObjectScanningConfiguration enables the high-fidelity data collection needed for object scanning. After you’ve scanned an object in a session with this configuration, call createReferenceObject(transform:center:extent:completionHandler:) to extract a region of the session’s internal spatial-mapping data for use as a reference object.

Aside from the object scanning capability, ARObjectScanningConfiguration is similar to ARWorldTrackingConfiguration: both track device position and orientation with six degrees of freedom (6DOF) and support plane detection and hit testing. To enable higher-fidelity object scanning, object-scanning sessions omit other features of world-tracking sessions.

Topics

Creating a Configuration

init()

Initializes a new object scanning configuration.

Enabling Plane Detection

var planeDetection: ARWorldTrackingConfiguration.PlaneDetection

A value specifying whether and how the session attempts to automatically detect flat surfaces in the camera-captured image.

struct ARWorldTrackingConfiguration.PlaneDetection

Options for whether and how ARKit detects flat surfaces in captured images.

Managing Device Camera Behavior

var isAutoFocusEnabled: Bool

A Boolean value that determines whether the device camera uses fixed focus or autofocus behavior.

Relationships

Inherits From

Conforms To

See Also

Object Detection

Scanning and Detecting 3D Objects

Record spatial features of real-world objects, then use the results to find those objects in the user’s environment and trigger AR content.

class ARReferenceObject

A 3D object to be recognized in the real-world environment during a world-tracking AR session.

Beta
class ARObjectAnchor

Information about the position and orientation of a real-world 3D object detected in a world-tracking AR session.

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