24 points · by hackerews · 9y ago · 18 comments
I was under the impression that phones needed depth and advanced motion tracking (eg see Tango https://developers.google.com/tango/overview/motion-tracking) to enable stuff like placing digital objects down and having them stick without moving around. Surprised Snapchat can now do that without needing additional sensors on the device.
How might that work?
I noticed in the videos that nothing ever goes in front of the animated objects, so they're probably not identifying objects, and trying to figure out object boundaries or anything like that. It's a simple, well-polished trick.
But just plain old analysis of "parallax" (things closer move faster etc) can quickly give you a workable understanding of the general geometry of a space.
The new MR headsets like Magic Leap and HoloLens likely use both types of sensors (like the kinect camera) to determine this stuff. But Snap just wants the widest push possible, and since it is not mounted on your eyes, the 'pixel stick' being off is not as much of an issue.
Combine this with GPS information and you can roughly "place it in the world" and make sure it doesn't clip the ground plane. After that, it is just pulling it up from your sparse 2D DB and dumping into the scene for other cameras. If they really care, there'll be some data included from the placement camera to help localize it.
- Pick "unique" points currently in view
- Track how they move as the camera moves
- Combine this data with the accelerometer to get an accurate movement reading of the phone.
- You can get the depth of any point by comparing two images and knowing the change in user position.
Simple algorithm, but their results were astonishingly good. Snap don't need to model the entire room, they just need to work out where these points are to keep the image appearing still.
https://en.m.wikipedia.org/wiki/Monocular_vision#Monocular_c...
But I guess I find it extremely surprising that Google would go through years of working on Tango - software, hardware, developer community, etc, etc - if the tech was available on existing phones.
Close one eye. Slowly poke something 2-3 feet away. You can do it, but you might be off an inch or two with your distance estimation and be surprised when you actually make contact. Open both eyes and do something similar with another object. The added depth information should mean that you can tell where something is to a greater precision.
Same thing with Tango. In both cases, you can extract some information about the environment from a 2D image stream. Add in accelerometer, gyroscope, and depth-sensing hardware, and you can correct some of the edge cases while increasing precision even for the things that you could do with standard hardware.