Patent Description:
Machine vision and display techniques, such as simultaneous localization and mapping (SLAM), visual inertial odometry (VIO), area learning applications, augmented reality (AR), and virtual reality (VR), often rely on the identification of objects within the local environment of a device through the analysis of imagery of the local environment captured by the device. To support these techniques, the device navigates an environment while simultaneously constructing a map of the environment or augmenting an existing map or maps of the environment. However, conventional techniques for tracking motion while building a map of the environment typically take a relatively significant amount of time and resources and accumulate errors, thereby limiting the utility and effectiveness of the machine vision techniques.

The following description is intended to convey a thorough understanding of the present disclosure by providing a number of specific embodiments and details involving the determination of a relative position or relative orientation of an electronic device based on image-based identification of objects in a local environment of the electronic device. It is understood, however, that the present disclosure is not limited to these specific embodiments and details, which are examples only, and the scope of the disclosure is accordingly intended to be limited only by the following claims and equivalents thereof. It is further understood that one possessing ordinary skill in the art, in light of known systems and methods, would appreciate the use of the disclosure for its intended purposes and benefits in any number of alternative embodiments, depending upon specific design and other needs.

<FIG> illustrate various techniques for tracking motion of an electronic device in an environment while building a three-dimensional visual representation of the environment that is used to correct drift in the tracked motion. A front-end motion tracking module receives sensor data from visual, inertial, and depth sensors and tracks motion (i.e., estimates poses over time) of the electronic device that can be used by an application programming interface (API). The front-end motion tracking module estimates poses over time based on feature descriptors corresponding to the visual appearance of spatial features of objects in the environment and estimates the three-dimensional positions (referred to as 3D point positions) of the spatial features. The front-end motion tracking module also provides the captured feature descriptors and estimated device pose to a back-end mapping module. The back-end mapping module is configured to store a plurality of maps based on stored feature descriptors, and to periodically receive additional feature descriptors and estimated device poses from the front-end motion tracking module as they are generated while the electronic device moves through the environment. The back-end mapping module builds a three-dimensional visual representation (map) of the environment based on the stored plurality of maps and the received feature descriptors. The back-end mapping module provides the three-dimensional visual representation of the environment to a localization module, which compares generated feature descriptors to stored feature descriptors from the stored plurality of maps, and identifies correspondences between stored and observed feature descriptors. The localization module performs a loop closure by minimizing the discrepancies between matching feature descriptors to compute a localized pose. The localized pose corrects drift in the estimated pose generated by the front-end motion tracking module, and is periodically sent to the front-end motion tracking module for output to the API.

By separately tracking motion based on visual and inertial sensor data and building a three-dimensional representation of the environment based on a plurality of stored maps as well as periodically updated generated feature descriptors, and correcting drift in the tracked motion by performing a loop closure between the generated feature descriptors and the three-dimensional representation, the electronic device can perform highly accurate motion tracking and map-building of an environment even with constrained resources, allowing the electronic device to record a representation of the environment and therefore recognize re-visits to the same environment over multiple sessions. To illustrate, in at least one embodiment the front-end motion tracking module maintains only a limited history of tracked motion (e.g., tracked motion data for only a single prior session, or a single prior time period) and treats any previously-generated feature point position estimates as fixed, thus limiting the computational burden of calculating an estimated current pose and 3D point positions and thus enabling the front-end tracking module to update the estimated current pose at a relatively high rate. The back-end mapping module maintains a more extensive history of the 3D point positions in the environment and poses of the electronic device, thus enabling the back-end mapping module to build a more accurate three-dimensional representation of the environment based on the stored maps and the observed feature descriptors received from the front-end motion tracking module. Because the back-end mapping module carries a heavier computational burden to build the three-dimensional representation of the environment based on a plurality of stored maps and to update the three-dimensional representation based on periodic inputs of additional generated feature descriptors from the front-end motion tracking module, the back-end mapping module updates the three-dimensional representation of the environment at a relatively slow rate. In addition, the localization module optimizes the three-dimensional representation and estimated current pose by solving a co-optimization algorithm that treats previously-generated 3D point positions as variable. The localization module thus corrects drift in the estimated current pose to generate a localized pose, and sends the localized pose to the front-end motion tracking module for output to the API.

<FIG> illustrates an electronic device <NUM> configured to support location-based functionality, such as SLAM, VR, or AR, using image and non-visual sensor data in accordance with at least one embodiment of the present disclosure. The electronic device <NUM> can include a user-portable mobile device, such as a tablet computer, computing-enabled cellular phone (e.g., a "smartphone"), a head-mounted display (HMD), a notebook computer, a personal digital assistant (PDA), a gaming system remote, a television remote, and the like. In other embodiments, the electronic device <NUM> can include another type of mobile device, such as an automobile, robot, remote-controlled drone or other airborne device, and the like. For ease of illustration, the electronic device <NUM> is generally described herein in the example context of a mobile device, such as a tablet computer or a smartphone; however, the electronic device <NUM> is not limited to these example implementations.

In the depicted example, the electronic device <NUM> includes a housing <NUM> having a surface <NUM> opposite another surface <NUM>. In the example, thin rectangular block form-factor depicted, the surfaces <NUM> and <NUM> are substantially parallel and the housing <NUM> further includes four side surfaces (top, bottom, left, and right) between the surface <NUM> and surface <NUM>. The housing <NUM> may be implemented in many other form factors, and the surfaces <NUM> and <NUM> may have a non-parallel orientation. For the illustrated tablet implementation, the electronic device <NUM> includes a display <NUM> disposed at the surface <NUM> for presenting visual information to a user <NUM>. Accordingly, for ease of reference, the surface <NUM> is referred to herein as the "forward-facing" surface and the surface <NUM> is referred to herein as the "user-facing" surface as a reflection of this example orientation of the electronic device <NUM> relative to the user <NUM>, although the orientation of these surfaces is not limited by these relational designations.

The electronic device <NUM> includes a plurality of sensors to obtain information regarding a local environment <NUM> of the electronic device <NUM>. The electronic device <NUM> obtains visual information (imagery) for the local environment <NUM> via imaging sensors <NUM> and <NUM> and a depth sensor <NUM> disposed at the forward-facing surface <NUM> and an imaging sensor <NUM> disposed at the user-facing surface <NUM>. In one embodiment, the imaging sensor <NUM> is implemented as a wide-angle imaging sensor having a fish-eye lens or other wide-angle lens to provide a wider-angle view of the local environment <NUM> facing the surface <NUM>. The imaging sensor <NUM> is implemented as a narrow-angle imaging sensor having a typical angle of view lens to provide a narrower angle view of the local environment <NUM> facing the surface <NUM>. Accordingly, the imaging sensor <NUM> and the imaging sensor <NUM> are also referred to herein as the "wide-angle imaging sensor <NUM>" and the "narrow-angle imaging sensor <NUM>," respectively. As described in greater detail below, the wide-angle imaging sensor <NUM> and the narrow-angle imaging sensor <NUM> can be positioned and oriented on the forward-facing surface <NUM> such that their fields of view overlap starting at a specified distance from the electronic device <NUM>, thereby enabling depth sensing of objects in the local environment <NUM> that are positioned in the region of overlapping fields of view via image analysis. The imaging sensor <NUM> can be used to capture image data for the local environment <NUM> facing the surface <NUM>. Further, in some embodiments, the imaging sensor <NUM> is configured for tracking the movements of the head <NUM> or for facial recognition, and thus providing head tracking information that may be used to adjust a view perspective of imagery presented via the display <NUM>.

The depth sensor <NUM>, in one embodiment, uses a modulated light projector <NUM> to project modulated light patterns from the forward-facing surface <NUM> into the local environment, and uses one or both of imaging sensors <NUM> and <NUM> to capture reflections of the modulated light patterns as they reflect back from objects in the local environment <NUM>. These modulated light patterns can be either spatially-modulated light patterns or temporallymodulated light patterns. The captured reflections of the modulated light patterns are referred to herein as "depth imagery. " The depth sensor <NUM> then may calculate the depths of the objects, that is, the distances of the objects from the electronic device <NUM>, based on the analysis of the depth imagery. The resulting depth data obtained from the depth sensor <NUM> may be used to calibrate or otherwise augment depth information obtained from image analysis (e.g., stereoscopic analysis) of the image data captured by the imaging sensors <NUM> and <NUM>. Alternatively, the depth data from the depth sensor <NUM> may be used in place of depth information obtained from image analysis. To illustrate, multiview analysis typically is more suited for bright lighting conditions and when the objects are relatively distant, whereas modulated light-based depth sensing is better suited for lower light conditions or when the observed objects are relatively close (e.g., within <NUM>-<NUM> meters). Thus, when the electronic device <NUM> senses that it is outdoors or otherwise in relatively good lighting conditions, the electronic device <NUM> may elect to use multiview-based reconstruction to determine object depths. Conversely, when the electronic device <NUM> senses that it is indoors or otherwise in relatively poor lighting conditions, the electronic device <NUM> may switch to using modulated light-based depth sensing via the depth sensor <NUM>.

The electronic device <NUM> also may rely on non-visual pose information for pose detection. This non-visual pose information can be obtained by the electronic device <NUM> via one or more non-visual sensors (not shown in <FIG>), such as an IMU including one or more gyroscopes, magnetometers, and accelerometers. In at least one embodiment, the IMU can be employed to generate pose information along multiple axes of motion, including translational axes, expressed as X, Y, and Z axes of a frame of reference for the electronic device <NUM>, and rotational axes, expressed as roll, pitch, and yaw axes of the frame of reference for the electronic device <NUM>. The non-visual sensors can also include ambient light sensors and location sensors, such as GPS sensors, or other sensors that can be used to identify a location of the electronic device <NUM>, such as one or more wireless radios, cellular radios, and the like.

To facilitate drift-free, highly accurate motion tracking that can run on a resourceconstrained mobile device, the electronic device <NUM> includes a concurrent odometry and mapping module <NUM> to track motion of the electronic device <NUM> based on the image sensor data <NUM>, <NUM> and the non-image sensor data <NUM> and to build a three-dimensional representation of the local environment <NUM>. The concurrent odometry and mapping module <NUM> periodically updates the three-dimensional representation of the local environment <NUM> with feature descriptors generated based on the image sensor data and the non-visual sensor data. The concurrent odometry and mapping module <NUM> uses the updated three-dimensional representation of the local environment <NUM> to correct drift and other pose errors in the tracked motion.

In operation, the electronic device <NUM> uses the image sensor data and the non-visual sensor data to track motion (estimate a pose) of the electronic device <NUM>. In at least one embodiment, after a reset the electronic device <NUM> determines an initial estimated pose based on geolocation data, other non-visual sensor data, visual sensor data as described further below, or a combination thereof. As the pose of the electronic device <NUM> changes, the non-visual sensors generate, at a relatively high rate, non-visual pose information reflecting the changes in the device pose. Concurrently, the visual sensors capture images that also reflect device pose changes. Based on this non-visual and visual pose information, the electronic device <NUM> updates the initial estimated pose to reflect a current estimated pose, or tracked motion, of the device.

The electronic device <NUM> generates visual pose information based on the detection of spatial features in image data captured by one or more of the imaging sensors <NUM>, <NUM>, and <NUM>. To illustrate, in the depicted example of <FIG> the local environment <NUM> includes a hallway of an office building that includes three corners <NUM>, <NUM>, and <NUM>, a baseboard <NUM>, and an electrical outlet <NUM>. The user <NUM> has positioned and oriented the electronic device <NUM> so that the forward-facing imaging sensors <NUM> and <NUM> capture wide angle imaging sensor image data <NUM> and narrow angle imaging sensor image data <NUM>, respectively, that includes these spatial features of the hallway. In this example, the depth sensor <NUM> also captures depth data <NUM> that reflects the relative distances of these spatial features relative to the current pose of the electronic device <NUM>. Further, the user-facing imaging sensor <NUM> captures image data representing head tracking data <NUM> for the current pose of the head <NUM> of the user <NUM>. Non-visual sensor data <NUM>, such as readings from the IMU, also is collected by the electronic device <NUM> in its current pose.

From this input data, the electronic device <NUM> can determine an estimate of its relative pose, or tracked motion, without explicit absolute localization information from an external source. To illustrate, the electronic device <NUM> can perform analysis of the wide-angle imaging sensor image data <NUM> and the narrow-angle imaging sensor image data <NUM> to determine the distances between the electronic device <NUM> and the corners <NUM>, <NUM>, <NUM>. Alternatively, the depth data <NUM> obtained from the depth sensor <NUM> can be used to determine the distances of the spatial features. From these distances the electronic device <NUM> can triangulate or otherwise infer its relative position in the office represented by the local environment <NUM>. As another example, the electronic device <NUM> can identify spatial features present in one set of captured images of the image data <NUM> and <NUM>, determine the initial distances to these spatial features, and then track the changes in position and distances of these spatial features in subsequent captured imagery to determine the change in pose of the electronic device <NUM> in a free frame of reference. In this approach, certain non-visual sensor data, such as gyroscopic data or accelerometer data, can be used to correlate spatial features observed in one image with spatial features observed in a subsequent image.

In at least one embodiment, the electronic device <NUM> uses the image data and the non-visual data to generate feature descriptors for the spatial features identified in the captured imagery. Each of the generated feature descriptors describes the orientation, gravity direction, scale, and other aspects of one or more of the identified spatial features. The generated feature descriptors are compared to a set of stored descriptors (referred to for purposes of description as "known feature descriptors") of a plurality of stored maps of the local environment <NUM> that each identifies previously identified spatial features and their corresponding poses. In at least one embodiment, each of the known feature descriptors is a descriptor that has previously been generated, and its pose definitively established, by either the electronic device <NUM> or another electronic device. The estimated device poses, 3D point positions, and known feature descriptors can be stored at the electronic device <NUM>, at a remote server (which can combine data from multiple electronic devices) or other storage device, or a combination thereof. Accordingly, the comparison of the generated feature descriptors can be performed at the electronic device <NUM>, at the remote server or other device, or a combination thereof.

In at least one embodiment, a generated feature descriptor is compared to a known feature descriptor by comparing each aspect of the generated feature descriptor (e.g., the orientation of the corresponding feature, the scale of the corresponding feature, and the like) to the corresponding aspect of the known feature descriptor and determining an error value indicating the variance between the compared features. Thus, for example, if the orientation of feature in the generated feature descriptor is identified by a vector A, and the orientation of the feature in the known feature descriptor is identified by a vector B, the electronic device <NUM> can identify an error value for the orientation aspect of the feature descriptors by calculating the difference between the vectors A and B. The error values can be combined according to a specified statistical technique, such as a least squares technique, to identify a combined error value for each known feature descriptor being compared, and the matching known feature descriptor identifies as the known feature descriptor having the smallest combined error value.

Each of the known feature descriptors includes one or more fields identifying the point position of the corresponding spatial feature and camera poses from which the corresponding spatial feature was seen. Thus, a known feature descriptor can include pose information indicating the location of the spatial feature within a specified coordinate system (e.g., a geographic coordinate system representing Earth) within a specified resolution (e.g., <NUM>), the orientation of the point of view of the spatial feature, the distance of the point of view from the feature and the like. The observed feature descriptors are compared to the feature descriptors stored in the map to identify multiple matched known feature descriptors. The matched known feature descriptors are then stored together with non-visual pose data as localization data that can be used both to correct drift in the tracked motion (or estimated pose) of the electronic device <NUM> and to augment the plurality of stored maps of a local environment for the electronic device <NUM>.

In some scenarios, the matching process will identify multiple known feature descriptors that match corresponding observed feature descriptors, thus indicating that there are multiple features in the local environment of the electronic device <NUM> that have previously been identified. The corresponding positions of the matching known feature descriptors may vary, indicating that the electronic device <NUM> is not in a particular one of the poses indicated by the matching known feature descriptors. Accordingly, the electronic device <NUM> may refine its estimated pose by interpolating its pose between the poses indicated by the matching known feature descriptors and the pose computed using conventional interpolation techniques. In some scenarios, if the error/difference between matching known feature descriptors and the computed online estimate is above a threshold, the electronic device <NUM> may snap its estimated pose to the pose indicated by the known feature descriptors.

In at least one embodiment, the concurrent odometry and mapping module <NUM> generates estimated poses (i.e., tracks motion) of the electronic device <NUM> at a relatively high rate based on the image sensor data <NUM>, <NUM> and the non-image sensor data <NUM> for output to an API. The concurrent odometry and mapping module <NUM> also generates feature descriptors based on the image sensor data and the non-visual sensor data. The concurrent odometry and mapping module <NUM> stores a plurality of maps containing known feature descriptors, from which it builds a three-dimensional representation of the local environment <NUM>. The concurrent odometry and mapping module <NUM> uses the known feature descriptors to map the local environment. For example, the concurrent odometry and mapping module <NUM> can use the known feature descriptors to generate a map file that indicates the position of each feature included in the known feature descriptors in a frame of reference for the electronic device <NUM>. As the concurrent odometry and mapping module <NUM> generates new feature descriptors based on the image sensor data and the non-visual sensor data, it periodically augments the three-dimensional representation of the local environment <NUM> by matching the generated feature descriptors to the known feature descriptors. The concurrent odometry and mapping module <NUM> uses the three-dimensional representation of the environment <NUM> to periodically correct drift in the tracked motion. In this manner, the concurrent odometry and mapping module <NUM> generates a locally accurate estimated pose for output to the API at a relatively high frequency, and periodically corrects global drift in the estimated pose to generate a localized pose using the three-dimensional representation of the local environment <NUM>. The estimated and localized poses can be used to support any of a variety of location-based services. For example, in one embodiment the estimated and localized poses can be used to generate a virtual reality environment, or portion thereof, representing the local environment of the electronic device <NUM>.

<FIG> illustrates the components of a concurrent odometry and mapping module <NUM> of the electronic device <NUM> of <FIG> The concurrent odometry and mapping module <NUM> includes a front-end motion tracking module <NUM>, a back-end mapping module <NUM>, and a localization module <NUM>. The concurrent odometry and mapping module <NUM> is configured to output localized and estimated poses to an API module <NUM>. The concurrent odometry and mapping module <NUM> is configured to track motion to estimate a current pose of the electronic device and update a map of the environment to localize the estimated current pose. In some embodiments, the concurrent odometry and mapping module <NUM> is configured to track motion (estimate a pose) at a first, relatively higher rate, and to update a map of the environment to be used to localize the estimated pose at a second, relatively lower rate.

The front-end motion tracking module <NUM> is configured to receive visual sensor data <NUM> from the imaging cameras <NUM> and <NUM>, depth data <NUM> from the depth sensor <NUM>, and inertial sensor data <NUM> from the non-image sensors (not shown) of <FIG>. The front-end motion tracking module <NUM> generates estimated poses <NUM> from the received sensor data, and generates feature descriptors <NUM> of spatial features of objects in the local environment <NUM>. In some embodiments, the front-end motion tracking module <NUM> stores a limited history of tracked motion (e.g., a single prior session, or a single prior time period). In some embodiments, the front-end motion tracking module <NUM> estimates a current pose of the electronic device <NUM> by generating linearization points based on the generated feature descriptors and solving a non-linear estimation of the spatial features based on the linearization points and previously-generated linearization points based on stored limited history of tracked motion. In some embodiments, for purposes of solving the non-linear estimation of the spatial features, the front-end motion tracking module treats any previously-generated estimates of 3D point positions as a set of fixed values. Because the previously-generated linearization points are treated as non-variable, the computational burden of solving the non-linear estimation of the spatial features is lower than it would be if the previously-generated linearization points were treated as variable. However, any errors in the previously-generated linearization points may not be rectified by the solution of the non-linear estimation. Accordingly, the estimated current pose may differ from the actual current position and orientation of the electronic device <NUM>.

In some embodiments, the front-end motion tracking module <NUM> updates the estimated pose <NUM> at a relatively high rate, based on a continuous or high-frequency receipt of sensor data. Based on the sensor data, the front-end motion tracking module <NUM> is configured to generate an estimated pose <NUM> that is locally accurate, but subject to global drift. The front-end motion tracking module <NUM> provides the estimated pose <NUM> to an API module <NUM>, which is configured to use the estimated pose <NUM> to generate a virtual reality environment, or portion thereof, representing the local environment of the electronic device <NUM>. The front-end motion tracking module <NUM> provides the generated feature descriptors <NUM> to the mapping module <NUM>. The front-end motion tracking module <NUM> periodically queries the localization module <NUM> to check for a localized pose <NUM>. When the localization module <NUM> has generated a localized pose <NUM>, the localization module <NUM> provides the localized pose <NUM> to the motion tracking module <NUM>, which provides the localized pose <NUM> to the API <NUM>. In some embodiments, the localization module <NUM> updates the localized pose <NUM> at a relatively low rate, due to the computational demands of generating the localized pose <NUM>.

The mapping module <NUM> is configured to store a plurality of maps (not shown) including known feature descriptors and to receive generated feature descriptors <NUM> from the motion tracking module <NUM>. The stored plurality of maps form a compressed history of the environment and tracked motion of the electronic device <NUM>. The mapping module <NUM> is configured to augment the stored plurality of maps with newly generated tracked motion. In some embodiments, the mapping module <NUM> receives generated feature descriptors from the motion tracking module <NUM> periodically, for example, every five seconds. In some embodiments, the mapping module <NUM> receives generated feature descriptors <NUM> from the front-end motion tracking module <NUM> after a threshold amount of sensor data has been received by the front-end motion tracking module <NUM>. The mapping module <NUM> builds a three-dimensional representation of the local environment <NUM> of the electronic device <NUM> based on the known feature descriptors of the stored plurality of maps and the generated feature descriptors received from the motion tracking module <NUM>. The mapping module <NUM> matches the one or more spatial features to spatial features of the plurality of stored maps to generate the three-dimensional representation <NUM> of the electronic device <NUM>. In some embodiments, the mapping module <NUM> searches each generated feature descriptor <NUM> to determine any matching known feature descriptors of the stored plurality of maps.

In some embodiments, the mapping module <NUM> adds the generated feature descriptors received from the motion tracking module <NUM> by generating estimates of 3D point positions based on the generated feature descriptors and solving a non-linear estimation of the three-dimensional representation based on the device poses and 3D point positions based on the stored feature descriptors and the data from the inertial sensors. In some embodiments, the previously-generated linearization points are considered variable for purposes of solving the non-linear estimation of the three-dimensional representation. The mapping module <NUM> provides the three-dimensional representation <NUM> of the local environment <NUM> to the localization module <NUM>.

The localization module <NUM> is configured to use the matched descriptors to align the estimated pose <NUM> with the stored plurality of maps, such as by applying a loop-closure algorithm. Thus, the localization module <NUM> can use matched feature descriptors to estimate a transformation for one or more of the stored plurality of maps, whereby the localization module <NUM> transforms geometric data associated with the generated feature descriptors of the estimated pose <NUM> having matching descriptors to be aligned with geometric data associated with a stored map having a corresponding matching descriptor. When the localization module <NUM> finds a sufficient number of matching feature descriptors from the generated feature descriptors <NUM> and a stored map to confirm that the generated feature descriptors <NUM> and the stored map contain descriptions of common visual landmarks, the localization module <NUM> performs a transformation between the generated feature descriptors <NUM> and the matching known feature descriptors, aligning the geometric data of the matching feature descriptors. Thereafter, the localization module <NUM> can apply a co-optimization algorithm to refine the alignment of the pose and scene of the estimated pose <NUM> of the electronic device <NUM> to generate a localized pose <NUM>.

<FIG> illustrates the components of a front-end motion tracking module <NUM> of <FIG> and <FIG>. The motion tracking module <NUM> includes a feature identification module <NUM> and an environment mapper <NUM>. Each of these modules represents hardware, software, or a combination thereof, configured to execute the operations as described herein. In particular, the feature identification module <NUM> is configured to receive imagery <NUM>, representing images captured by the imaging sensors <NUM>, <NUM>, <NUM>, and the non-visual sensor data <NUM>. Based on this received data, the feature identification module <NUM> identifies features in the imagery <NUM> by generating feature descriptors <NUM> and comparing the feature descriptors to known feature descriptors from the stored limited history of tracked motion as described above with respect to <FIG>. The feature identification module <NUM> provides the generated feature descriptors <NUM> to the mapping module <NUM>. The feature identification module <NUM> additionally stores the feature descriptors <NUM>, together with any associated non-visual data, as localization data <NUM>. In at least one embodiment, the localization data <NUM> can be used by the electronic device <NUM> to estimate one or more poses of the electronic device <NUM> as it is moved through different locations and orientations in its local environment. These estimated poses can be used in conjunction with previously generated and stored map information for the local environment to support or enhance location based services of the electronic device <NUM>.

The environment mapper <NUM> is configured to generate or modify a locally accurate estimated pose <NUM> of the electronic device <NUM> based on the localization data <NUM>. In particular, the environment mapper <NUM> analyzes the feature descriptors in the localization data <NUM> to identify the location of the features in a frame of reference for the electronic device <NUM>. For example, each feature descriptor can include location data indicating a relative position of the corresponding feature from the electronic device <NUM>. In some embodiments, the environment mapper <NUM> generates linearization points based on the localization data <NUM> and solves a non-linear estimation, such as least squares, of the environment based on the linearization points and previously-generated linearization points based on the stored feature descriptors from the stored limited history of tracked motion. The environment mapper <NUM> estimates the evolution of the device pose over time as well as the positions of 3D points in the environment <NUM>. To find matching values for these values based on the sensor data, the environment mapper <NUM> solves a non-linear optimization problem. In some embodiments, the environment mapper <NUM> solves the non-linear optimization problem by linearizing the problem and applying standard techniques for solving linear systems of equations. In some embodiments, the environment mapper <NUM> treats the previously-generated linearization points as fixed for purposes of solving the non-linear estimation of the environment. The environment mapper <NUM> can reconcile the relative positions of the different features to identify the location of each feature in the frame of reference, and store these locations in a locally accurate estimated pose <NUM>. The front-end motion tracking module <NUM> provides and updates the estimated pose <NUM> at a relatively high rate to an API module <NUM> of the electronic device <NUM> to, for example, generate a virtual reality display of the local environment.

The environment mapper <NUM> is also configured to periodically query the localization module <NUM> for an updated localized pose <NUM>. In some embodiments, the localization module <NUM> updates the localized pose <NUM> at a relatively low rate. When an updated localized pose <NUM> is available, the localization module <NUM> provides the updated localized pose <NUM> to the environment mapper <NUM>. The environment mapper <NUM> provides the updated localized pose <NUM> to the API module <NUM>.

<FIG> is a diagram illustrating a back-end mapping module <NUM> of the concurrent odometry and mapping module <NUM> of <FIG> configured to generate and add to a three-dimensional representation of the environment of the electronic device <NUM> based on generated feature descriptors <NUM> and a plurality of stored maps <NUM> in accordance with at least one embodiment of the present disclosure. The back-end mapping module <NUM> includes a storage module <NUM> and a feature descriptor matching module <NUM>.

The storage module <NUM> is configured to store a plurality of maps <NUM> of the environment of the electronic device <NUM>. In some embodiments, the plurality of maps <NUM> may include maps that were previously generated by the electronic device <NUM> during prior mapping sessions. In some embodiments, the plurality of maps <NUM> may also include VR or AR maps that contain features not found in the physical environment of the electronic device <NUM>. The plurality of maps <NUM> include stored (known) feature descriptors <NUM> of spatial features of objects in the environment that can collectively be used to generate a three-dimensional representation <NUM> of the environment.

The feature descriptor matching module <NUM> is configured to receive generated feature descriptors <NUM> from the motion tracking module <NUM>. The feature descriptor matching module <NUM> compares the generated feature descriptors <NUM> to the known feature descriptors <NUM>. The feature descriptor matching module <NUM> builds a three-dimensional representation <NUM> of the local environment <NUM> of the electronic device <NUM> based on the known feature descriptors <NUM> of the stored plurality of maps <NUM> and the generated feature descriptors <NUM> received from the front-end motion tracking module <NUM>.

In some embodiments, the feature descriptor matching module <NUM> adds the generated feature descriptors <NUM> received from the motion tracking module <NUM> by generating linearization points based on the generated feature descriptors and solving a non-linear estimation of the three-dimensional representation based on the linearization points and previously-generated linearization points based on the known feature descriptors <NUM>. In some embodiments, the previously-generated linearization points are considered variable for purposes of solving the non-linear estimation of the three-dimensional representation. The feature descriptor matching module <NUM> provides the three-dimensional representation <NUM> of the environment to the localization module <NUM> and, in some embodiments, updates the three-dimensional representation <NUM> at a relatively low rate.

The mapping module <NUM> receives generated feature descriptors <NUM> from the motion tracking module <NUM> periodically. In some embodiments, the mapping module <NUM> receives generated feature descriptors <NUM> from the front-end motion tracking module <NUM> at regular intervals of time (e.g., every five seconds). In some embodiments, the mapping module <NUM> receives generated feature descriptors <NUM> from the front-end motion tracking module <NUM> at the conclusion of a mapping session or after a threshold amount of sensor data has been received by the front-end motion tracking module <NUM>.

<FIG> is a diagram illustrating a localization module <NUM> of the concurrent odometry and mapping module <NUM> of <FIG> configured to generate a localized pose <NUM> of the electronic device <NUM> in accordance with at least one embodiment of the present disclosure. The localization module <NUM> includes a feature descriptor discrepancy detector <NUM> and a loop closure module <NUM>.

The feature descriptor discrepancy detector <NUM> is configured to receive a three-dimensional representation <NUM> of the environment from the back-end mapping module <NUM> of the concurrent odometry and mapping module <NUM>. The feature descriptor discrepancy detector <NUM> analyses the matched feature descriptors of the three-dimensional representation <NUM> and identifies discrepancies between matched feature descriptors. The feature descriptor discrepancy detector <NUM> transforms geometric data associated with the generated feature descriptors of the estimated pose <NUM> having matching descriptors to be aligned with geometric data associated with a stored map having a corresponding matching descriptor. When the localization module <NUM> finds a sufficient number of matching feature descriptors from the generated feature descriptors <NUM> and a stored map to confirm that the generated feature descriptors <NUM> and the stored map contain descriptions of common visual landmarks, the localization module <NUM> computes a transformation between the generated feature descriptors <NUM> and the matching known feature descriptors, aligning the geometric data of the matching feature descriptors.

The loop closure module <NUM> is configured to find a matching pose of the device given the 3D position points in the environment and their observations in the current image by solving a co-optimization algorithm to refine the alignment of the matching feature descriptors. The co-optimization problem may be solved by a Gauss-Newton or Levenberg-Marquardt algorithm, or another known algorithm for optimizing transformations to generate a localized pose <NUM> of the electronic device <NUM>. In some embodiments, the loop closure module <NUM> treats known feature descriptors as variable. The loop closure module <NUM> thus generates a localized pose <NUM> that corrects drift in the estimated pose <NUM>, and sends the localized pose <NUM> to the front-end motion tracking module <NUM>. The localized pose <NUM> can be fed to an application executing at the electronic device <NUM> to enable augmented reality or other location-based functionality by allowing the electronic device <NUM> to more efficiently and accurately recognize a local environment <NUM> that it has previously traversed.

<FIG> is a flow diagram illustrating method <NUM> of an electronic device to track motion and update a three-dimensional representation of the environment in accordance with at least one embodiment of the present disclosure. The method <NUM> initiates at block <NUM> where the electronic device <NUM> captures imagery and non-visual data as it is moved by a user through different poses in a local environment. At block <NUM>, the front-end motion tracking module <NUM> identifies features of the local environment based on the imagery <NUM> and non-image sensor data <NUM>, and generates feature descriptors <NUM> for the identified features for the back-end mapping module <NUM> and localization data <NUM>. At block <NUM>, the motion tracking module <NUM> uses the localization data <NUM> to estimate a current pose <NUM> of the electronic device <NUM> in the local environment <NUM>. The estimated pose <NUM> can be used to support location-based functionality for the electronic device <NUM>. For example, the estimated pose <NUM> can be used to orient a user of the electronic device <NUM> in a virtual reality or augmented reality application executed at the electronic device <NUM>.

At block <NUM>, the back-end mapping module <NUM> compares the generated feature descriptors <NUM> to known feature descriptors of a plurality of stored maps. At block <NUM>, the back-end mapping module <NUM> builds and/or updates a three-dimensional representation <NUM> of the environment of the electronic device which it provides to the localization module <NUM>. At block <NUM>, the localization module <NUM> identifies discrepancies between matching feature descriptors and performs a loop closure to align the estimated pose <NUM> with the three-dimensional representation <NUM>. At block <NUM>, the localization module localizes the current pose of the electronic device, and the concurrent odometry and mapping module <NUM> provides the localized pose to an API module <NUM>.

Claim 1:
A method comprising:
estimating, at an electronic device (<NUM>), a current pose (<NUM>) of the electronic device (<NUM>) based on feature descriptors (<NUM>) of one or more spatial features representing an object in the environment (<NUM>) of the electronic device (<NUM>), wherein the feature descriptors (<NUM>) are generated based on images (<NUM>) captured from one or more visual sensors and non-visual data (<NUM>) from one or more non-image sensors;
generating, at the electronic device (<NUM>), a three-dimensional representation (<NUM>) of the environment (<NUM>) of the electronic device (<NUM>) based on a plurality of stored maps (<NUM>) comprising stored feature descriptors (<NUM>), wherein the plurality of stored maps (<NUM>) includes maps that were previously generated by the electronic device (<NUM>) during prior mapping sessions; and
localizing the estimated current pose (<NUM>) based on the three-dimensional representation of the environment (<NUM>) to generate a localized pose (<NUM>).