Device tracking based on displayed marker
Some implementations provide improved user interfaces for interacting with a virtual environment. The virtual environment is presented by a display of a first device having an image sensor. The first device uses the image sensor to determine a relative position and orientation of a second device based on a marker displayed on a display of the second device. The first device uses the determined relative position of the second device to display a representation of the second device including virtual content in place of the marker.
1 . A method comprising:
at a first device comprising a processor and an image sensor:
obtaining image data comprising an image of a physical environment using the image sensor, the image comprising a marker displayed via a second device, wherein the marker is adapted over time based on a circumstance;
determining a relative position and orientation of the second device to the first device based on the marker in the image data; and
generating a control signal based on the relative position and orientation of the second device.
2 . The method of claim 1 , wherein the circumstance comprises detecting an obstruction.
3 . The method of claim 1 , wherein the circumstance comprises detecting an obstruction between the image sensor and the second device.
4 . The method of claim 1 , wherein the circumstance comprises detecting a touch event.
5 . The method of claim 1 , wherein the circumstance comprises a finger blocking a portion of a display of the second device.
6 . The method of claim 1 , wherein the circumstance comprises a relative motion, position, or rotation of the first device and second device.
7 . The method of claim 1 , wherein the circumstance comprises an attribute of the physical environment.
8 . The method of claim 1 , wherein the circumstance comprises a lighting condition of the physical environment.
9 . The method of claim 1 , wherein the marker comprises a pattern.
10 . The method of claim 9 , wherein the relative position and orientation of the second device to the first device is determined based on the relative distances between elements of the pattern produced by the LEDs on the second device.
11 . The method of claim 9 , wherein the pattern is a spatial pattern or a binary pattern that encodes data associated with motion of the second device.
12 . The method of claim 11 , wherein the motion is determined via an accelerometer or inertial measurement unit on the second device.
13 . The method of claim 1 , wherein the relative position and orientation of the second device to the first device is determined based on a single image of the image data.
14 . The method of claim 1 , wherein the relative position and orientation of the second device to the first device is determined based on multiple images of the image data.
15 . The method of claim 1 , wherein the first device uses the position and orientation of the second device to enable the second device to be used as a three-dimensional (3D) controller, a 3D pointer, or a user interface input device.
16 . The method of claim 1 , wherein the generated control signal modifies a user interface element displayed by the first device.
17 . The method of claim 1 , wherein the first device is a head-mounted device (HMD) and the second device comprises a hand-held device.
18 . The method of claim 1 further comprising adjusting the determined relative position and orientation of the second device to the first device over time based on motion tracking on the first device and the second device over time, wherein the motion tracking comprises obtaining additional images of the physical environment using the image sensor, the additional images comprising the marker.
19 . A first device comprising:
a non-transitory computer-readable storage medium; and
one or more processors coupled to the non-transitory computer-readable storage medium, wherein the non-transitory computer-readable storage medium comprises program instructions that, when executed on the one or more processors, cause the first device to perform operations comprising:
obtaining image data comprising an image of a physical environment using the image sensor, the image comprising a marker displayed via a second device, wherein the marker is adapted over time based on a circumstance;
determining a relative position and orientation of the second device to the first device based on the marker in the image data; and
generating a control signal based on the relative position and orientation of the second device.
20 . A non-transitory computer-readable storage medium of a first device, storing program instructions executable via one or more processors to perform operations comprising:
obtaining image data comprising an image of a physical environment using the image sensor, the image comprising a marker displayed via a second device, wherein the marker is adapted over time based on a circumstance;
determining a relative position and orientation of the second device to the first device based on the marker in the image data; and
generating a control signal based on the relative position and orientation of the second device.