December 16, 2017

iPhone X 3D scan proof of concept

UPDATE: 6/19/2018 - Scandy Pro for iOS (specifically the iPhone X) is now live in the App Store: https://scandy.link/ScandyProIOS

Please go check it out!

One big benefit of being in a smaller market, such as our beautiful home of New Orleans, there aren’t millions of people around us. So when the iPhone X went on sale we rolled up to the Apple store at 8 am and waited in line until noon… Head back to the office and start having fun taking selfies and making animojis.

The portrait photos are pretty f-ing incredible:

iphone-portraits

Cool… you guys have an iPhone X, brag about it.

I was told you have an iPhone X 3D scan demo

Ok… yes we do. Here it is. If you want to read the rest of the post and see some work in progress shots that’d be cool too!


And here’s that good looking 3D scan we uploaded to Sketchfab.


If you are on the Twitter, we would ❤️ it if you would retweet our original tweet:

We did it! #3Dscanning #iPhoneX #demo https://youtu.be/HEGRaFjYuuo #3dscanner #3dscan #iphone)

-Scandy (@ScandyCo) November 16, 2017

And here is a screenshot in case you need it for something ( cough cough share this somewhere else where cough cough ).

scandycore-iphonex-3dscan-screenshot

The making of our iPhone X 3D scanner demo

First things first, Apple you’ve got example code for us to use right? Wait… you actually do! AVCam-iOS: Using AVFoundation to Capture Images and Movies is exactly what I needed to get started developing my own application!

I forgot how much I love Apple and how well they treat their developers from a documentation standpoint! Ok, let’s build their demo. Smile for the depth camera

iphonex-apple-demo

Well, that’s a great start. Now let’s get that depth data into our Scandy Core pipeline! First, we need to configure our CMake build system for building on iOS XCode project. We found these very useful for getting this going:

Super, everything builds, links, and runs! Really glad we wrote Scandy Core in C++14 and had it running on macOS, Linux, and Android for the past two years.

Show me the depth data!

scandycore-iphonex-first-depth-image

Ok cool, that looks like a pretty nice frame of data!

Metal != OpenCL

Fun fact: our number crunching, until Tuesday, relied on OpenCL to run all our algorithms. But iOS doesn’t support OpenCL. No matter, we can write Metal kernels too.

Fast forward a few hours

hack all the codez

Note: In case you aren’t a developer, this ^^^ is exactly how everyone writes code. The banana really helps for those hard to reach keys off the home row.

Now let’s make sure we can actually use our shiny new Metal kernels to manipulate the data to create vertices, depth maps, normals, ray cast, etc.

scandycore-pipeline-check
Oh yeah!!!!

Well, that’s promising!

So we can do most of our 3D scanning pipeline now, screw it… Let’s see if we can get a scan going!







OH SNAP!

YAAAASSSS!!!! We are up and running. Albeit slow and stuttery, but it’s running!

When it’s 6 am, you’re still referring to today as tomorrow, and you just made your iPhone X into a 3D scanner, stuff gets whacky. Like finding bigfoot walking through your office:

scandycore-big-foot-sighting

The next day we came into the office and filmed a proper demo video you saw above.

We’re hauling ass to get the rest of Scandy Core running properly on iOS so we can start shipping Scandy Pro for the iPhone X. We’re hoping to have the app in the App Store in the next couple weeks!

If you’ve read this far we commend you and apologize. It has now been 48 hours of straight hacking and now… we sleep.

UPDATE: 6/19/2018 - Scandy Pro for iOS (specifically the iPhone X) is now live in the App Store: https://scandy.link/ScandyProIOS Please go check it out!

Scan on, my friends.

Latest Posts

Scan On

Create in 3D with the phone in your pocket. With any TrueDepth iOS device you can get creative in three dimensions right now.