← Back to context

Comment by dabinat

18 hours ago

It would be great if they could use the LiDAR scanner to sign a depth map of the scene in front of the camera. It would show if you photographed a flat image.

The sensor already uses phase detection autofocus. You can create a depth map out of it. iPhone X used its dual cameras and that phase data for depth maps.

  • How? Is this for every image taken, or does one need to take a second photo? Or is it "in theory phase detection hardware would let you make a depth map"

    • The sensor has special pixels which can detect phase differences in incoming light. Camera uses these pixels (aka embedded detectors on the image sensor) to be able to focus where you want. This is same from phones to professional cameras.

      (DSLR cameras have independent phase detection arrays. This is why the mirror has a small mirror behind. To illuminate that section).

      Lenses are tuned. They know how distant the thing they are focusing on, also photos' EXIF generally carries the focus point information. Side note: Apple Aperture used to be able to show where you focused with that info. Still no app does this. I'm still mad that we don't have Aperture anymore. Anyway...

      So, if you collect this phasing information alongside the photo which you're taking, you are capturing the depth map of the photo. Its resolution will be lower, but not lower enough to be useless.

      For example, Sony (and most probably all other big camera manufacturers) cameras use this phasing data throughout sensor in real-time for following moving subjects to keep the focus on them by predicting where they are going.

      So, there's no "in theory". The phasing data is the depth map. Otherwise your camera can't focus on anything. It's there to focus, and it's done by reading the phasing data and knowing where to go by how much.

      All fast AF systems are PDAF. When light is too low, then it's CDAF, which does way slower, without using any phase/depth data.

      [0]: https://en.wikipedia.org/wiki/Autofocus#Phase_detection

      Edit: Meaning clarified, bugs squashed, mirrors polished.

The 'ol "analog hole". Never been able to patch that gap.

  • Yes, if your adversary can generate a high-fidelity 3D moving replica of a scene, they can deceive you that it’s real. But can they really?

    • Images that are meant to be 2d (E.g. a photo of something on paper) isn't going to look 3d. I guess this approach will just have to let anything flat through?

If that became popular, the AIs would learn how to generate a realistic depth map along with any generated image.

  • How would that work? I thought the premise here is that you can fool the apple camera by taking a (very carefully aligned) picture of a still image (printed out).

    A depth map from the apple camera (again, signed) would show that the entire image had the same distance from the camera.

    • You're right. I think my comment above doesn't make sense - it wouldn't help in this case.

  • The photos are cryptographically signed in the apple image pipeline so it's not as simple as just AI generating something. That said, I can't see how this is any different to all the other times we have embedded crypto keys in consumer hardware where eventually someone finds a way to extract the key and the whole thing is busted open.

    • Nobody has breached the Secure Enclave, not sure it’s doable without investing millions in direct circuit manipulation. Seems good enough

  • > generate a realistic depth map along with any generated image.

    There are already pretty good depth map generation algorithms (for a decade or so) which works on 2D images.

    Generate the image, feed it to a depth map generator, viola.

    However, you can't get it signed by the sensor itself. That'd be hard.