shu223/iOS-Depth-Sampler
shu223/iOS-Depth-Sampler has 1,218 GitHub stars and 104 forks. GitHot measured -1 in 7 days. Last checked 2026-11-10 21:24 UTC. Last push 2023-11-04.
Code examples for Depth APIs in iOS
Measured star growth
- in 24h
- Update delayed
- in 7 days
- -1
- in 15 days
- Collecting history
- in 1 month
- Collecting history
Net star changes over overlapping periods, not daily totals. Missing measurements are left blank. Stars measure attention, not software quality.
README.md
OriginaliOS-Depth-Sampler
Code examples of Depth APIs in iOS
Requirement
Use devices which has a dual camera (e.g. iPhone 8 Plus) or a TrueDepth camera (e.g. iPhone X)
How to build
Open ARKit-Sampler.xcworkspace with Xcode 10 and build it!
It can NOT run on Simulator. (Because it uses Metal.)
Contents
Real-time Depth
Depth visualization in real time using AV Foundation.

Real-time Depth Mask
Blending a background image with a mask created from depth.

Depth from Camera Roll
Depth visualization from pictures in the camera roll.

Plaease try this after taking a picture with the Camera app using the PORTRAIT mode.
Portrait Matte
Background removal demo using Portrait Effect Matte (or Portrait Effect Matte).

Plaease try this after taking a picture of a HUMAN with PORTRAIT mode.
Available in iOS 12 or later.
ARKit Depth
Depth visualization on ARKit. The depth on ARKit is available only when using ARFaceTrackingConfiguration.

2D image in 3D space
A demo to render a 2D image in 3D space.

AR occlusion
[WIP] An occlusion sample on ARKit using depth.
Author
Shuichi Tsutsumi
Freelance iOS programmer from Japan.
Explore related projects
codecrafters-io/build-your-own-x
Master programming by recreating your favorite technologies from scratch.
561,599 starspublic-apis/public-apis
A collective list of free APIs
497,924 starsmorluto/rea
Reverse engineer anything with agents, from app behavior down to native binaries.
449,790 starsopenclaw/openclaw
The AI that really does things. Any OS. Any Platform. The lobster way. 🦞
394,297 stars