A collection of Swift code examples demonstrating Depth APIs on iOS devices with dual or TrueDepth cameras.
iOS-Depth-Sampler is a collection of Swift code examples that demonstrate how to use Depth APIs on iOS devices with dual or TrueDepth cameras. It provides practical implementations for capturing, visualizing, and manipulating depth data in real-time, from photos, and within ARKit. The project helps developers understand and integrate depth-related features like background removal, 3D rendering, and occlusion into their iOS applications.
iOS developers working on apps that require depth sensing, such as augmented reality, photo editing, or computer vision applications. It's particularly useful for those targeting devices with dual or TrueDepth cameras.
Developers choose iOS-Depth-Sampler for its hands-on, runnable examples that directly apply Apple's Depth APIs, saving time compared to reading documentation alone. It offers a comprehensive set of samples covering various depth use cases in one place.
Code examples for Depth APIs in iOS
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Covers multiple depth use cases like real-time visualization, portrait matte, and ARKit integration, with separate runnable demos for each, as listed in the README contents.
Provides Swift code for real-time depth capture and mask creation using AV Foundation, enabling immediate feedback for apps requiring live depth processing.
Includes a working example for background removal using Portrait Effect Matte on iOS 12+, specifically for photos taken in Portrait mode of humans, as shown in the README.
Demonstrates depth visualization in ARKit with face tracking configuration, useful for augmented reality apps, evidenced by the ARKit Depth sample with GIF.
Requires devices with dual or TrueDepth cameras, limiting compatibility to newer iPhones and excluding many users, as stated in the Requirement section.
Cannot run on iOS Simulator due to Metal usage, hindering testing and debugging for developers without physical devices, as noted in the How to build section.
The AR occlusion sample is marked as work-in-progress (WIP) in the README, indicating that some advanced use cases are not fully implemented or documented.