{"id":23278,"date":"2018-11-02T13:00:00","date_gmt":"2018-11-02T17:00:00","guid":{"rendered":"https:\/\/mjtsai.com\/blog\/?p=23278"},"modified":"2018-11-01T17:22:05","modified_gmt":"2018-11-01T21:22:05","slug":"depth-capture-with-the-iphone-xr","status":"publish","type":"post","link":"https:\/\/mjtsai.com\/blog\/2018\/11\/02\/depth-capture-with-the-iphone-xr\/","title":{"rendered":"Depth Capture With the iPhone XR"},"content":{"rendered":"<p><a href=\"https:\/\/blog.halide.cam\/iphone-xr-a-deep-dive-into-depth-47d36ae69a81\">Ben Sandofsky<\/a>:<\/p>\n<blockquote cite=\"https:\/\/blog.halide.cam\/iphone-xr-a-deep-dive-into-depth-47d36ae69a81\"><p>The iPhone 7 Plus introduced a dual-camera system, which enables a similar way to construct depth. By taking two photos at the same time, each from a slightly different position, we can construct a <em>disparity map<\/em>.<\/p><p>[&#8230;]<\/p><p>With the iPhone X, Apple introduced the TrueDepth camera. Instead of measuring disparity, it uses an infrared light to project over 30,000 dots. [&#8230;] However, depth data isn&rsquo;t entirely based off the IR dots.<\/p><p>[&#8230;]<\/p><p>In a DPAF [Dual Pixel Auto Focus] system, each pixel on the sensor is made up of two sub-pixels, each with their own tiny lens. The hardware finds focus similar to a rangefinder camera; when the two sub-pixels are identical, it knows that pixel is in focus.<\/p><p>[&#8230;]<\/p><p>If you captured two separate images, one for each set of sub-pixels, you&rsquo;d get two images about one millimeter apart. It turns out this is just enough disparity to get very rough depth information.<\/p><\/blockquote>\n\n<p>The iPhone XR combines this with machine learning to capture depth for Portrait mode.<\/p>\n\n<p><a href=\"https:\/\/daringfireball.net\/linked\/2018\/10\/29\/halide-xr-depth\">John Gruber<\/a>:<\/p>\n<blockquote cite=\"https:\/\/daringfireball.net\/linked\/2018\/10\/29\/halide-xr-depth\">\n<p>I&rsquo;m so glad Halide offers this, but I can see why Apple hasn&rsquo;t enabled it for non-human subjects in the built-in Camera app. It&rsquo;s hit or miss.<\/p>\n<\/blockquote>\n\n<p>Previously: <a href=\"https:\/\/mjtsai.com\/blog\/2018\/10\/24\/iphone-xr-reviews\/\">iPhone XR Reviews<\/a>.<\/p>","protected":false},"excerpt":{"rendered":"<p>Ben Sandofsky: The iPhone 7 Plus introduced a dual-camera system, which enables a similar way to construct depth. By taking two photos at the same time, each from a slightly different position, we can construct a disparity map.[&#8230;]With the iPhone X, Apple introduced the TrueDepth camera. Instead of measuring disparity, it uses an infrared light [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"apple_news_api_created_at":"2018-11-02T17:00:02Z","apple_news_api_id":"2acec1a5-3449-4bd5-9758-3085830f1328","apple_news_api_modified_at":"2018-11-02T17:00:02Z","apple_news_api_revision":"AAAAAAAAAAD\/\/\/\/\/\/\/\/\/\/w==","apple_news_api_share_url":"https:\/\/apple.news\/AKs7BpTRJS9WXWDCFgw8TKA","apple_news_coverimage":0,"apple_news_coverimage_caption":"","apple_news_is_hidden":false,"apple_news_is_paid":false,"apple_news_is_preview":false,"apple_news_is_sponsored":false,"apple_news_maturity_rating":"","apple_news_metadata":"\"\"","apple_news_pullquote":"","apple_news_pullquote_position":"","apple_news_slug":"","apple_news_sections":"\"\"","apple_news_suppress_video_url":false,"apple_news_use_image_component":false,"footnotes":""},"categories":[],"tags":[1351,152,1604,31,1610,85,1423,1573,1732,1731],"class_list":["post-23278","post","type-post","status-publish","format-standard","hentry","tag-artificial-intelligence","tag-camera","tag-halide","tag-ios","tag-ios-12","tag-iphone","tag-iphone-7-plus","tag-iphone-x","tag-iphone-xr","tag-iphone-xs"],"apple_news_notices":[],"_links":{"self":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/23278","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/comments?post=23278"}],"version-history":[{"count":1,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/23278\/revisions"}],"predecessor-version":[{"id":23279,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/23278\/revisions\/23279"}],"wp:attachment":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/media?parent=23278"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/categories?post=23278"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/tags?post=23278"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}