{"id":1225,"url":"https://github.com/shu223/iOS-Depth-Sampler","last_synced_at":"2025-07-30T20:33:11.665Z","repository":{"id":37550366,"uuid":"147592272","full_name":"shu223/iOS-Depth-Sampler","owner":"shu223","description":"Code examples for Depth APIs in iOS","archived":false,"fork":false,"pushed_at":"2023-11-04T14:31:53.000Z","size":13960,"stargazers_count":1185,"open_issues_count":8,"forks_count":101,"subscribers_count":45,"default_branch":"master","last_synced_at":"2024-12-01T08:05:38.815Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/shu223.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null},"funding":{"github":["shu223"],"custom":["https://paypal.me/shu223","https://note.com/shu223/m/me1aa6761ab16"]}},"created_at":"2018-09-05T23:47:50.000Z","updated_at":"2024-11-06T07:20:18.000Z","dependencies_parsed_at":"2022-07-20T12:32:30.909Z","dependency_job_id":"4af3ccfd-6bfe-424b-861e-8e7934639049","html_url":"https://github.com/shu223/iOS-Depth-Sampler","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shu223%2FiOS-Depth-Sampler","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shu223%2FiOS-Depth-Sampler/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shu223%2FiOS-Depth-Sampler/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shu223%2FiOS-Depth-Sampler/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shu223","download_url":"https://codeload.github.com/shu223/iOS-Depth-Sampler/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228187626,"owners_count":17882336,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-01-05T20:15:41.667Z","updated_at":"2024-12-04T20:31:14.692Z","avatar_url":"https://github.com/shu223.png","language":"Swift","readme":"# iOS-Depth-Sampler\n\n[![Platform](http://img.shields.io/badge/platform-ios-blue.svg?style=flat\n)](https://developer.apple.com/iphone/index.action)\n[![Language](http://img.shields.io/badge/language-swift-brightgreen.svg?style=flat\n)](https://developer.apple.com/swift)\n[![License](http://img.shields.io/badge/license-MIT-lightgrey.svg?style=flat\n)](http://mit-license.org)\n[![Twitter](https://img.shields.io/badge/twitter-@shu223-blue.svg?style=flat)](http://twitter.com/shu223)\n\nCode examples of Depth APIs in iOS\n\n## Requirement\n\nUse devices which has a **dual camera** (e.g. iPhone 8 Plus) or a **TrueDepth camera** (e.g. iPhone X)\n\n## How to build\n\nOpen `ARKit-Sampler.xcworkspace` with Xcode 10 and build it!\n\nIt can **NOT** run on **Simulator**. (Because it uses Metal.)\n\n\n## Contents\n\n### Real-time Depth\n\nDepth visualization in real time using AV Foundation.\n\n![](README_resources/depth_1.gif)\n\n### Real-time Depth Mask\n\nBlending a background image with a mask created from depth.\n\n![](README_resources/blend.gif)\n\n### Depth from Camera Roll\n\nDepth visualization from pictures in the camera roll.\n\n\u003cimg src=\"README_resources/depth_baby_histoeq.jpg\" width=\"600\"\u003e\n\nPlaease try this after taking **a picture with the Camera app using the PORTRAIT mode**.\n\n### Portrait Matte\n\nBackground removal demo using Portrait Effect Matte (or Portrait Effect Matte). \n\n![](README_resources/portraitmatte.gif)\n\nPlaease try this after taking **a picture of a HUMAN with PORTRAIT mode**.\n\nAvailable in iOS 12 or later.\n\n### ARKit Depth\n\nDepth visualization on ARKit. The depth on ARKit is available only when using `ARFaceTrackingConfiguration`.\n\n![](README_resources/arkit-depth.gif)\n\n### 2D image in 3D space\n\nA demo to render a 2D image in 3D space.\n\n![](README_resources/3d.gif)\n\n\n### AR occlusion\n\n[WIP] An occlusion sample on ARKit using depth.\n\n## Author\n\n**Shuichi Tsutsumi**\n\nFreelance iOS programmer from Japan.\n\n\u003ca href=\"https://paypal.me/shu223\"\u003e\n  \u003cimg alt=\"Support via PayPal\" src=\"https://cdn.rawgit.com/twolfson/paypal-github-button/1.0.0/dist/button.svg\"/\u003e\n\u003c/a\u003e\n\n\n- PAST WORKS:  [My Profile Summary](https://medium.com/@shu223/my-profile-summary-f14bfc1e7099#.vdh0i7clr)\n- PROFILES: [LinkedIn](https://www.linkedin.com/in/shuichi-tsutsumi-525b755b/)\n- BLOGS: [English](https://medium.com/@shu223/) / [Japanese](http://d.hatena.ne.jp/shu223/)\n- CONTACTS: [Twitter](https://twitter.com/shu223) / [Facebook](https://www.facebook.com/shuichi.tsutsumi)\n","funding_links":["https://github.com/sponsors/shu223","https://paypal.me/shu223","https://note.com/shu223/m/me1aa6761ab16"],"categories":["Hardware","Swift","Media","etc","Metal/Camera/Image"],"sub_categories":["Camera","Photo"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshu223%2FiOS-Depth-Sampler","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshu223%2FiOS-Depth-Sampler","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshu223%2FiOS-Depth-Sampler/lists"}