2024 Developer ToolsGraphics & GamesSpatial Computing
WWDC24 · 12 min · Developer Tools / Graphics & Games / Spatial Computing
Discover area mode for Object Capture
Discover how area mode for Object Capture enables new 3D capture possibilities on iOS by extending the functionality of Object Capture to support capture and reconstruction of an area. Learn how to optimize the quality of iOS captures using the new macOS sample app for reconstruction, and find out how to view the final results with Quick Look on Apple Vision Pro, iPhone, iPad or Mac. Learn about improvements to 3D reconstruction, including a new API that allows you to create your own custom image processing pipelines.
Watch at developer.apple.com ↗Chapters
Code shown on screen · 2 snippets
Data Loading API - load Sample and Mask
func loadSampleAndMask(file: URL) -> PhotogrammetrySample? {
do {
var sample = try PhotogrammetrySample(contentsOf: file)
sample.objectMask = try loadObjectMask(for: file)
return sample
} catch {
return nil
}
} Data Loading API - create custom photogrammetry Session
func createCustomPhotogrammetrySession(for images: [URL]) -> PhotogrammetrySession {
let inputSequence = images.lazy.compactMap { file in
return loadSampleAndMask(file: file)
}
return PhotogrammetrySession(input: inputSequence)
} Resources
Related sessions
-
22 min -
20 min