Positioning methods, systems, devices, media, and products

By utilizing the physical gravity vector of the inertial measurement unit as a priori constraint in smart glasses, and combining it with a visual inertial system, the problem of positioning accuracy in weak texture scenes such as golf courses was solved, achieving high-precision athlete position and target distance measurement.

CN122841503BActive Publication Date: 2026-11-27XIAN YANGSHU INTELLIGENT TECHNOLOGY CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202611248329.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2026-08-18
Publication Date
2026-11-27
Estimated Expiration
2046-08-18

AI Technical Summary

Technical Problem

In large, low-texture environments such as golf courses, traditional visual positioning algorithms struggle to achieve high-precision athlete positioning and target ranging, especially in pitch and roll angles, resulting in significant ranging errors.

Method used

By using the physical gravity vector measured by the inertial measurement unit in the smart glasses as a priori constraint, the six-degree-of-freedom pose calculation is reduced to four degrees of freedom. Initial rotation parameters are generated by combining the visual inertial system, and feature matching and iterative optimization are performed on the server side to calculate the pose information of the smart glasses in the world coordinate system.

Benefits of technology

It improves the positioning accuracy of smart glasses in open, low-texture scenes, achieving sub-meter-level ranging accuracy to meet the precision requirements of golf.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122841503B_ABST
    Figure CN122841503B_ABST
Patent Text Reader

Abstract

This disclosure provides a positioning method, system, device, medium, and product, relating to the field of positioning technology. The positioning method includes: in response to receiving positioning request information, generating a target feature matching pair set based on a pre-generated 3D map database including multiple 3D world coordinate points, to characterize the correspondence between multiple target pixels in target image data and 3D world coordinate points; if the positioning request information includes a first rotation parameter, using the first rotation parameter as a priori locking parameter, solving for a second rotation parameter and a target translation vector based on the target feature matching pair set, and obtaining pose parameters characterizing the transformation relationship between the camera coordinate system and the world coordinate system based on the first rotation parameter, the second rotation parameter, and the target translation vector, to determine the pose information of the smart glasses in the world coordinate system. This can improve the positioning accuracy of the smart glasses in open, weakly textured scenes.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of positioning technology, and more specifically, to a positioning method, system, device, medium, and product. Background Technology

[0002] With the rapid development of Augmented Reality (AR) technology, smart glasses based on Visual Positioning Systems (VPS) are finding increasingly widespread applications. In large outdoor spaces such as golf courses, wearing smart glasses to pinpoint the current location of athletes and accurately measure distances to target locations like the green and bunkers has significant practical value. While some technologies use smart glasses to capture images of the current scene and perform location tracking through image feature matching, this method suffers from poor accuracy in open, low-texture environments like golf courses. Summary of the Invention

[0003] One objective of this disclosure is to provide a new technical solution regarding positioning.

[0004] According to a first aspect of the present disclosure, a positioning method is provided, applied to a server in a positioning system. The positioning system further includes smart glasses communicatively connected to the server. The smart glasses are used to generate a first rotation parameter based on target image data acquired by a camera and inertial data acquired by an inertial measurement unit, and to send positioning request information including at least the target image data to the server. The first rotation parameter is used to characterize the rotational relationship of the camera coordinate system of the smart glasses about an axis perpendicular to the direction of gravity in the world coordinate system. The method includes: In response to receiving the positioning request information, a target feature matching pair set is generated based on a pre-generated 3D map database including multiple 3D world coordinate points to characterize the correspondence between multiple target pixels and 3D world coordinate points in the target image data. When the positioning request information includes the first rotation parameter, the first rotation parameter is used as a priori locking parameter. Based on the target feature matching pair set, the second rotation parameter and the target translation vector are obtained. Then, based on the first rotation parameter, the second rotation parameter, and the target translation vector, pose parameters representing the transformation relationship between the camera coordinate system and the world coordinate system are obtained to determine the pose information of the smart glasses in the world coordinate system. The second rotation parameter is used to represent the rotation relationship of the camera coordinate system about the direction of gravity. If the first rotation parameter is not included in the positioning request information, the pose parameter is obtained by using a preset pose estimation algorithm based on the target feature matching pair set, so as to determine the pose information of the smart glasses in the world coordinate system. The preset pose estimation algorithm is an algorithm for realizing six-degree-of-freedom pose estimation.

[0005] Optionally, the first rotation parameter includes pitch angle and roll angle, and the second rotation parameter includes target yaw angle; the step of using the first rotation parameter as a priori locking parameter, and solving for the second rotation parameter and target translation vector based on the target feature matching pair set, includes: Based on the first rotation parameter and at least two feature matching pairs in the target feature matching pair set, the initial yaw angle and the initial translation vector are calculated. Keeping the first rotation parameter unchanged as a hard constraint, the initial yaw angle and the initial translation vector are iteratively optimized using a preset iterative optimization algorithm to obtain the target yaw angle and the target translation vector.

[0006] Optionally, the step of calculating the initial yaw angle and initial translation vector based on the first rotation parameter and at least two feature matching pairs in the target feature matching pair set includes: Based on each target pixel in at least two sets of the aforementioned feature matching pairs, construct a spatial ray in the camera coordinate system pointing from the camera optical center to the target pixel; For each feature matching pair, based on the spatial ray and the first rotation parameter, a collinear geometric constraint expression is constructed, which includes the yaw angle parameter to be solved, the translation vector, and the depth parameter. The collinear geometric constraint expression is used to characterize the collinear alignment relationship between the three-dimensional world coordinate point in the world coordinate system and the spatial ray in the camera coordinate system after the rotation transformation and translation transformation formed by the first rotation parameter and the yaw angle parameter to be solved. The depth parameter is used to characterize the distance of the corresponding position of the three-dimensional world coordinate point on the spatial ray after coordinate transformation relative to the optical center of the camera. Based on the collinear geometric constraint expressions of at least two sets of feature matching pairs, the depth parameter and translation vector are eliminated by the elimination method to obtain a candidate expression containing the yaw angle parameter, and the yaw angle candidate value is obtained by solving the candidate expression. Substitute the candidate yaw angle values ​​into the collinear geometric constraint expression to obtain the candidate translation vector values; A positive depth check is performed on the candidate yaw angle and the candidate translation vector. The initial yaw angle and the initial translation vector are determined based on the candidate yaw angle and the candidate translation vector that satisfy the positive depth check condition. The positive depth check condition is used to constrain the depth value of the three-dimensional world coordinate point after coordinate transformation by the candidate yaw angle and the candidate translation vector to be a non-negative value.

[0007] Optionally, the step of keeping the first rotation parameter unchanged as a hard constraint, and iteratively optimizing the initial yaw angle and the initial translation vector using a preset iterative optimization algorithm to obtain the target yaw angle and the target translation vector includes: Using the initial yaw angle and the initial translation vector as initial optimization values, a cost function is constructed with the yaw angle and translation vector as optimization variables; The cost function is iteratively solved using the preset iterative optimization algorithm until the preset convergence condition is met, thereby obtaining the target yaw angle and the target translation vector; wherein, the first rotation parameter remains fixed during the iterative solution process.

[0008] Optionally, the step of generating a set of target feature matching pairs to characterize the correspondence between multiple target pixels and three-dimensional world coordinate points in the target image data, based on a pre-generated three-dimensional map database including multiple three-dimensional world coordinate points, includes: Reference image data matching the target image data is retrieved from a pre-generated 3D map database; The reference feature information of each reference pixel in the reference image data and the target feature information of each target pixel in the target image data are extracted respectively. Based on the similarity between the target feature information and the reference feature information, and the three-dimensional world coordinates of each reference pixel, the three-dimensional world coordinates of each target pixel are determined. A set of target feature matching pairs is generated based on the three-dimensional world coordinates corresponding to the target pixel.

[0009] Optionally, after obtaining the pose parameters characterizing the transformation relationship between the camera coordinate system and the world coordinate system of the smart glasses, the method further includes: Based on the pose parameters and the pre-marked target location in the 3D map database, the 3D spatial distance from the smart glasses to the target location is calculated, and the 3D spatial distance is sent to the smart glasses; or... The pose parameters are sent to the smart glasses so that the smart glasses can determine the three-dimensional spatial distance from the smart glasses to the pre-marked target location based on the pose parameters and the locally stored three-dimensional map database. The three-dimensional map database is a three-dimensional map database containing golf courses, and the target location is a pre-marked location within the golf course.

[0010] According to a second aspect of this disclosure, a positioning method is also provided, applied to smart glasses in a positioning system, the smart glasses being equipped with a camera and an inertial measurement unit, and the positioning system further including a server communicatively connected to the smart glasses; the method includes: Multimodal data for positioning is acquired based on the camera and the inertial measurement unit, and the multimodal data includes time-aligned target image data and inertial data; A first rotation parameter is generated based on the target image data and the inertial data. The first rotation parameter is used to characterize the rotation relationship of the camera coordinate system of the smart glasses about an axis perpendicular to the direction of gravity in the world coordinate system. Send a positioning request message, which includes at least the target image data, to the server so that the server can perform pose calculation based on the positioning request message to obtain pose parameters that characterize the transformation relationship between the camera coordinate system and the world coordinate system. The system receives positioning response information returned by the server, which includes pose parameters and / or three-dimensional spatial distance; wherein the three-dimensional spatial distance is the three-dimensional spatial distance from the smart glasses to the pre-marked target location in the three-dimensional map database, calculated based on the pose parameters.

[0011] Optionally, generating a first rotation parameter based on the target image data acquired by the camera and the inertial data acquired by the inertial measurement unit includes: Based on the target image data and the inertial data, the local relative pose of the smart glasses is generated through visual inertial calculation; If the local relative pose and / or the inertial data satisfy a preset stability condition, the first rotation parameter is obtained from the local relative pose based on the physical gravity vector in the inertial data.

[0012] According to a third aspect of this disclosure, a positioning system is also provided, the positioning system comprising smart glasses and a server, the smart glasses being equipped with a camera and an inertial measurement unit, wherein: The server is used to perform the method described in the first aspect; The smart glasses are used to perform the method described in the second aspect.

[0013] According to a fourth aspect of the present disclosure, an electronic device is provided, including a memory and a processor, the memory being configured to store computer instructions, and the processor being configured to invoke the computer instructions from the memory to perform the method described in the first or second aspect.

[0014] According to a fifth aspect of the present disclosure, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the method described in the first or second aspect.

[0015] According to a sixth aspect of the present disclosure, a computer program product is provided, the computer program product including a computer program that, when executed by a processor, implements the method described in the first or second aspect.

[0016] The beneficial effects of the positioning method provided in this disclosure include at least the following: based on the physical gravity vector measured locally by the smart glasses as a priori constraint, the traditional six-degree-of-freedom pose calculation is reduced to four degrees of freedom, and only a small number of feature matching pairs are needed to calculate the high-precision pose in open and weakly textured scenes, thereby improving the positioning accuracy of smart glasses in open and weakly textured scenes.

[0017] Other features and advantages of this disclosure will become clear from the following detailed description of exemplary embodiments with reference to the accompanying drawings. Attached Figure Description

[0018] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments of the present disclosure and, together with the description, serve to explain the principles of the disclosure.

[0019] Figure 1 This is a schematic diagram of the structure of a positioning system provided in an embodiment of this disclosure.

[0020] Figure 2 This is a flowchart illustrating a positioning method provided in an embodiment of this disclosure.

[0021] Figure 3 This is a schematic diagram of a physical model of the gravity constraint principle provided in an embodiment of this disclosure.

[0022] Figure 4 This is a schematic diagram of the display interface of a smart glasses provided in an embodiment of this disclosure.

[0023] Figure 5 This is a flowchart illustrating another positioning method provided in an embodiment of this disclosure.

[0024] Figure 6 This is a flowchart illustrating another positioning method provided in this embodiment.

[0025] Figure 7 This is a schematic diagram of another positioning system provided in an embodiment of this disclosure.

[0026] Figure 8 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this disclosure. Detailed Implementation

[0027] Various exemplary embodiments of this disclosure will now be described in detail with reference to the accompanying drawings.

[0028] The following description of at least one exemplary embodiment is merely illustrative and is not intended to limit this disclosure or its application or use. Techniques, methods, and apparatus known to those skilled in the art may not be discussed in detail, but where appropriate, such techniques, methods, and apparatus may be considered part of the specification.

[0029] It should be noted that similar labels and letters in the following figures indicate similar items, so once an item is defined in one figure, it need not be discussed further in subsequent figures.

[0030] Figure 1 This is a schematic diagram of the structure of a positioning system provided in an embodiment of this disclosure. Figure 1 As shown, the positioning system 1000 may include smart glasses 1100 and a server 1200, which can achieve bidirectional communication connection through wireless and / or wired networks.

[0031] The smart glasses 1100 may include one or more of the following: a camera 1101, an inertial measurement unit (IMU) 1102, a display unit 1103, a first processor 1111, and a first memory 1112. The camera can be used to collect image data of the surrounding environment of the smart glasses. For example, when a user wears the smart glasses on a golf course, it can collect target image data within the field of view of the golf course. This camera can also be called an image acquisition module or a camera. The inertial measurement unit can be used to collect inertial data containing acceleration and angular velocity information. The display unit can be used to present augmented reality (AR) overlay information to the user. This display unit may be an optical engine, providing relevant visual displays to the user through an AR display module and / or an optical engine. The first processor can be used to perform data processing and communication tasks related to the smart glasses, such as executing the steps implemented by the smart glasses in the positioning method provided in this embodiment. The first memory can be used to store computer instructions and / or data so that the first processor can retrieve instructions and / or data to perform related functions. It should be noted that the smart glasses can be any head-mounted device with the above functions.

[0032] In some examples, the smart glasses may include a visual-inertial system, which may include, for example, a Simultaneous Localization and Mapping (SLAM) algorithm module and / or Visual-Inertial Odometry (VIO). This visual-inertial system can obtain the real-time pose of the smart glasses by receiving image data from a camera and inertial data from an inertial measurement unit, and processing the data. Optionally, the visual-inertial system may be a software module that performs visual-inertial processing in a first processor.

[0033] Server 1200 may be equipped with a second processor 1211 and a second memory 1212, which can be used to implement image retrieval, feature matching, and pose calculation tasks. In some examples, the second memory of the server may store a three-dimensional map database, for example, a three-dimensional map database stored in the second memory. This three-dimensional map database may be a pre-built three-dimensional high-precision visual map database for a specific scene (such as a golf course or other specific area), which may contain reference image data for each area and three-dimensional world coordinates corresponding to each reference pixel. Further, the three-dimensional map database of the golf course may also pre-calibrate the three-dimensional coordinates of target locations such as the center hole of the green, the flagpole, and the bunker for distance calculation. In some examples, the server may include a pose calculation engine for pose calculation, a module for image retrieval and feature processing matching, etc., to execute the positioning method provided in the embodiments of this disclosure.

[0034] It should be noted that, Figure 1 The structure of the positioning system shown is illustrative. The positioning system in this embodiment is not limited to the above structure and may include more or fewer devices as needed, or the devices may be combined or separated. For example, smart glasses may only include a camera, an inertial measurement unit, and a first processor, and may also include other units such as a communication unit and an input / output unit. A server may only include a second processor, and may also include other units such as a display unit, a communication unit, and an input / output unit.

[0035] exist Figure 1In the system shown, when athletes wear the smart glasses provided in this embodiment of the disclosure in large outdoor settings such as golf courses, the smart glasses can acquire field-of-view images of the golf course and perform position calculations through a Visual Positioning System (VPS), thereby providing athletes with accurate distance measurement information to target locations such as greens and bunkers. In related technologies, pure visual positioning schemes can perform position calculations based on six-degree-of-freedom (6-DoF) algorithms such as Perspective-3-Point (P3P) or Efficient Perspective-n-Point (EPnP), which require stable extraction and matching of at least three pairs of high-quality three-dimensional and two-dimensional feature points from the image. However, in large-scale, low-texture, and highly repetitive scenes such as golf courses, images lack rich structural features such as corner points and line segments within hundreds of meters of open grass and similar forest backgrounds. This results in traditional algorithms extracting extremely sparse and overly concentrated inliers, making them prone to ill-conditioned matrix solutions. This leads to severe drift and divergence in the calculated camera pose, particularly the pitch and roll angles. On smart glasses, even minute angular deviations projected onto the physical world hundreds of meters away can be geometrically amplified into ranging errors of tens of meters. This results in low success rates and insufficient accuracy for traditional visual positioning algorithms in open scenes, failing to meet the sub-meter ranging accuracy requirements of golf.

[0036] Therefore, this embodiment uses the physical gravity vector measured locally by the smart glasses as a priori constraint to reduce the traditional six-degree-of-freedom pose calculation to four degrees of freedom. Only a small number of feature matching pairs are needed to calculate the pose with high accuracy in open and weakly textured scenes, thereby improving the positioning accuracy of smart glasses in open and weakly textured scenes.

[0037] The various embodiments of this disclosure are described in detail below.

[0038] <First Embodiment> Figure 2 This is a flowchart illustrating a positioning method provided in an embodiment of this disclosure. The positioning method can be... Figure 1 The positioning system shown can be executed, for example, by smart glasses and a server within the positioning system, or by any electronic device. Figure 2 As shown, the positioning method of this embodiment may include the following steps S2100 to S2800.

[0039] Step S2100: The smart glasses collect multimodal data.

[0040] For example, smart glasses may be equipped with a camera and an inertial measurement unit (IMU), and may acquire multimodal data for positioning based on the camera and IMU. The multimodal data may include time-aligned target image data and inertial data.

[0041] The target image data can be image frames captured by the camera at the current moment, such as image frames within the field of view of a golf course, containing two-dimensional pixel information of scenes such as fairways, greens, and flagpoles. The inertial data can be sensor data containing three-axis acceleration and / or three-axis angular velocity synchronously collected by the inertial measurement unit, which can reflect the motion state and attitude changes of the smart glasses at the current moment.

[0042] Time alignment can be the synchronization of target image data and inertial data in the time dimension, such as target image data and inertial data acquired at the same time. For example, the sensor readings of the inertial measurement unit 1102 can be synchronously extracted at the moment of exposure of the camera 1101 using a hardware trigger mechanism, or the inertial data can be aligned to the acquisition time of the image frame using software timestamp interpolation, thereby making the data of the two modalities correspond in time. Time alignment helps improve the accuracy of subsequent visual-inertial fusion calculations and reduces attitude estimation errors introduced by time deviations.

[0043] In step S2200, the smart glasses generate the first rotation parameters.

[0044] For example, the smart glasses can generate a first rotation parameter based on the target image data and inertial data. This first rotation parameter can be used to characterize the rotational relationship of the smart glasses' camera coordinate system about an axis perpendicular to the direction of gravity in the world coordinate system.

[0045] In some examples, the first rotation parameter may include pitch angle and roll angle. Figure 3 This is a schematic diagram of a physical model of the gravity constraint principle provided in an embodiment of this disclosure. Figure 3 The X, Y, and Z axes of the world coordinate system are shown. In the world coordinate system, the Z-axis points upwards, while the gravity vector points vertically downwards, opposite to the Z-axis. The yaw angle (to be solved) can be used to characterize the rotation of the smart glasses' camera coordinate system around the gravity direction (i.e., opposite to the Z-axis), the roll angle (prior lock) can be used to characterize the rotation of the smart glasses' camera coordinate system around the X-axis, and the pitch angle (prior lock) can be used to characterize the rotation of the smart glasses' camera coordinate system around the Y-axis. Figure 3 In this process, the roll and pitch angles can be generated based on the target image data and inertial data, which are marked as "prior locked" and do not need to be solved in subsequent processes. However, the yaw angle still needs to be solved and can be marked as "to be solved", which can achieve dimensionality reduction solution of gravity constraints.

[0046] In some examples, the method by which the smart glasses generate the first rotation parameter may include: generating the local relative pose of the smart glasses through visual inertial calculation based on the target image data and inertial data; and obtaining the first rotation parameter from the local relative pose based on the physical gravity vector in the inertial data.

[0047] For example, the first rotation parameter can also be referred to as the gravity-aligned rotation matrix R. In some examples, smart glasses may include a visual-inertial system (e.g., SLAM and / or VIO) to perform visual-inertial computation to obtain local relative pose (e.g., pose data). In this example, at the moment the smart glasses' camera acquires exposure data of the target image (e.g., the current field of view of a golf course), the pose data (i.e., local relative pose) output in real time by the built-in visual-inertial system (such as a VIO or SLAM algorithm module) is simultaneously extracted. This pose data includes inertial data sensed by the IMU, which may include a physical gravity vector. To eliminate the cumulative error of pure vision algorithms in open scenes, the pose data can be parsed, and the absolute gravity direction prior, unaffected by local image texture interference, can be extracted using the physical gravity vector sensed by the IMU, thereby obtaining the first rotation parameter, which can also be referred to as the gravity-aligned rotation matrix R. This matrix accurately represents the deflection of the camera coordinate system relative to the real-world gravity direction (e.g., pitch and roll angles with high confidence), thus providing a physical benchmark for subsequent dimensionality reduction calculations.

[0048] In this example, VIO can be used to fuse and solve target image data and inertial data to generate the local relative pose of the smart glasses. For example, VIO can output local relative pose estimation results containing rotation matrices and translation vectors in a tightly coupled or loosely coupled manner. Alternatively, a SLAM algorithm module can be used to solve the local relative pose to adapt to different hardware configurations and computing power requirements.

[0049] In this example, the smart glasses can directly separate and obtain the first rotation parameter; alternatively, if the local relative pose and / or inertial data meet the preset stability conditions, the first rotation parameter can be separated from the local relative pose based on the physical gravity vector in the inertial data. This can improve the accuracy of the first rotation parameter and thus improve the positioning accuracy.

[0050] In some examples, satisfying the preset stability condition for local relative pose may include: the visual inertial system has been initialized and is in a stable tracking state, such as the visual inertial odometry or SLAM system being in the TRACKING state.

[0051] In other examples, inertial data meeting preset stability conditions may include: the gravity direction has been aligned, for example, the smart glasses have sensed a stable gravity vector direction through the inertial measurement unit; and the inertial measurement unit has passed a health check, for example, there are no abnormal jumps in sensor readings or data loss.

[0052] When the local relative pose and / or inertial data meet the preset stability conditions, the smart glasses determine that the current inertial data is reliable, and then extract the first rotation parameter.

[0053] In some examples, when the local relative pose or inertial data does not meet the preset stability conditions, such as when the visual inertial system has not yet completed initialization or when the inertial measurement unit has abnormal data, the smart glasses may not generate a valid first rotation parameter in order to avoid invalid first rotation parameters affecting the positioning accuracy.

[0054] In this way, local relative poses are generated through visual inertial calculations, and the physical gravity vector is separated from them to obtain the first rotation parameter under the condition of satisfying preset stability. This realizes that gravity priors are extracted and used only when the quality of inertial data is reliable, avoiding interference from low-quality inertial data on the accuracy of pose calculations and improving the reliability of the first rotation parameter.

[0055] In step S2300, the smart glasses send a location request to the server.

[0056] For example, smart glasses can send positioning request information, including at least target image data, to a server so that the server can perform pose calculation based on the positioning request information to obtain pose parameters that characterize the transformation relationship between the camera coordinate system and the world coordinate system.

[0057] The server can receive the location request information sent by the smart glasses to obtain target image data.

[0058] In some examples, the positioning request information sent by the smart glasses may also include a first rotation parameter, which the server may also obtain.

[0059] For example, the content contained in the location request information can be fixed or it can vary depending on the verification result of preset stability conditions.

[0060] In some examples, if the local relative pose and inertial data meet the preset stability conditions (e.g., the inertial measurement unit passes the health check, gravity alignment is completed, and the visual inertial system is in a stable tracking state), the smart glasses can package the target image data and the first rotation parameters (e.g., pitch angle and roll angle) together into the positioning request information. They can also attach a confidence flag (Status_Flag=1) to characterize the first rotation parameters as reliable data. Sending the positioning request information to the server can trigger the server-side first solution algorithm path based on gravity constraints (i.e., the solution path dependent on gravity constraints), thereby achieving efficient and reliable positioning.

[0061] In other examples, if the local relative pose or inertial data does not meet the preset stability conditions (e.g., the inertial measurement unit fails the health check, gravity is not aligned, or the visual inertial system is not in a stable tracking state), the smart glasses can simply package the target image data into the positioning request information, and can also attach a confidence flag (Status_Flag=0) to indicate that there is no reliable first rotation parameter. Sending the positioning request information to the server can trigger the second solution algorithm path on the server side (i.e., a degraded solution path that does not rely on gravity constraints). This can achieve the basic availability of the positioning system when the sensor data quality is poor.

[0062] In some examples, the location request information can be transmitted to server 1200 via Wireless Local Area Network (WLAN), 5th Generation Mobile Communication Technology (5G), or other wireless communication methods.

[0063] It should be noted that, to improve the success rate and robustness of pose calculation, the smart glasses can perform data validity verification before initiating a request (such as sending a location request). For example, it can determine whether the currently extracted real-time pose is in a stable gravity alignment state and monitor for abnormal jumps in multi-source sensor data. After the data quality verification passes, the smart glasses can send the currently captured 2D image frame, along with the first rotation parameter (such as the gravity alignment rotation matrix R), to the server. In this way, through this edge-cloud collaborative mechanism, the high-load tasks of image retrieval, feature matching, and pose calculation are handled by a server with sufficient computing power, effectively adapting to the low-power and low-computing-power hardware characteristics of AR smart glasses.

[0064] In step S2400, the server, in response to receiving the location request information, generates a set of target feature matching pairs.

[0065] For example, in response to receiving a location request, the server may generate a set of target feature matching pairs that characterize the correspondence between multiple target pixels and three-dimensional world coordinates in the target image data, based on a pre-generated three-dimensional map database including multiple three-dimensional world coordinates.

[0066] The 3D map database can be a pre-built high-precision 3D visual map database for a preset scene (such as a golf course), containing reference image data for each area within the preset scene and the 3D world coordinates corresponding to each reference pixel. Furthermore, for a golf course scene, the 3D map database can also pre-calibrate the absolute 3D coordinates of target locations such as the center hole, flagpole, and bunker for subsequent 3D spatial distance calculations.

[0067] In some examples, the step of the server generating a set of target feature matching pairs may include the following sub-steps: Step S2411: Retrieve reference image data that matches the target image data from the pre-generated 3D map database.

[0068] For example, a vector retrieval technique based on global feature descriptors can be used to compare the global feature vector of the target image data with the global feature vectors of all reference images in the database, recalling a predetermined number (e.g., Top-N, where N can be an integer between 5 and 20) of the most similar candidate reference images as reference image data. In this way, the historical reference frame that is closest to the current field of view can be quickly located in a massive mapping base map, providing a candidate set for subsequent fine feature matching.

[0069] Step S2412: Extract the reference feature information of each reference pixel in the reference image data and the target feature information of each target pixel in the target image data.

[0070] For example, feature information extraction can be achieved using deep learning feature extraction networks (such as local feature detection and description networks like SuperPoint) or local feature operators, outputting feature descriptor vectors corresponding to each pixel. These local feature operators can include feature operators such as Scale-Invariant Feature Transform (SIFT) or Speeded Up Robust Features (SURF).

[0071] Step S2413: Based on the similarity between the target feature information and the reference feature information, and the three-dimensional world coordinates of each reference pixel, determine the three-dimensional world coordinates of each target pixel.

[0072] This similarity can include cosine similarity and / or Euclidean distance.

[0073] For example, for each target pixel, a reference pixel that is most similar to the feature descriptor described above can be found, and the three-dimensional world coordinates corresponding to the reference pixel can be used as the matching result of the target pixel.

[0074] Step S2414: Generate a set of target feature matching pairs based on the three-dimensional world coordinates corresponding to the target pixel.

[0075] For example, each matching pair in the target feature matching pair set can contain the coordinates of a two-dimensional target pixel in the target image data and the corresponding three-dimensional world coordinates in a three-dimensional map database, thus constituting a data structure of three-dimensional two-dimensional (3D-2D) feature matching pairs. This set can be used as one of the input data for subsequent pose calculation.

[0076] In this way, through image retrieval, feature extraction and similarity matching, a set of target feature matching pairs containing the correspondence between two-dimensional target pixels and three-dimensional world coordinates can be efficiently constructed, providing accurate and robust input data for subsequent pose calculation and improving positioning accuracy.

[0077] In step S2500, if the positioning request information includes the first rotation parameter, the server calculates the pose information of the smart glasses in the world coordinate system based on the first solving algorithm.

[0078] For example, the first solution algorithm can be a pose solving algorithm based on gravity prior constraints. For instance, if the server includes a first rotation parameter in the positioning request information, it uses the first rotation parameter as a priori locking parameter, solves for a second rotation parameter and a target translation vector based on the target feature matching set, and obtains pose parameters representing the transformation relationship between the camera coordinate system and the world coordinate system according to the first rotation parameter, the second rotation parameter, and the target translation vector, so as to determine the pose information of the smart glasses in the world coordinate system. The second rotation parameter can be used to represent the rotation relationship of the camera coordinate system about the gravity direction.

[0079] In some examples, the first rotation parameter may include pitch and roll angles, and the second rotation parameter may include the target yaw angle. The server can fix the pitch and roll angles as prior parameters and solve only for the yaw angle and the 3D translation vector, thereby reducing the pose calculation problem from the traditional six degrees of freedom to four degrees of freedom. In this way, even in weakly textured and open scenes with a small number of target feature matching pairs, the ill-conditioned nature of the solution system can be effectively reduced, and the success rate and accuracy of the solution can be improved.

[0080] In this step, the first solution algorithm can be further divided into an initial pose calculation stage and an iterative optimization stage. For example, the initial yaw angle and the initial translation vector can be calculated based on the first rotation parameter and at least two sets of feature matching pairs in the target feature matching pair set. The first rotation parameter is kept unchanged as a hard constraint, and the initial yaw angle and the initial translation vector are iteratively optimized by a preset iterative optimization algorithm to obtain the target yaw angle and the target translation vector.

[0081] In this way, by locking the first rotation parameter as a priori, and solving only the yaw angle and translation vector, combined with the two-stage scheme of initial solution and iterative optimization, the drift error of pitch angle and roll angle under extreme viewpoints is completely eliminated by using gravity hard constraints while reducing computational complexity, thus improving the stability and accuracy of pose calculation.

[0082] The initial pose calculation stage and the iterative optimization stage are explained below.

[0083] In the initial pose calculation stage, the server can use the Perspective-2-Point (P2P) algorithm to solve for the initial yaw angle and initial translation vector based on at least two sets of feature matching pairs. The specific implementation of the P2P algorithm may include the following steps S2511 to S2515.

[0084] Step S2511: Based on each target pixel in at least two sets of feature matching pairs, construct a spatial ray in the camera coordinate system pointing from the camera optical center to the target pixel.

[0085] For example, spatial rays can be represented based on Plücker lines. Each spatial ray can contain two components: a ray direction vector and a ray origin (e.g., the position of the camera's optical center). This allows for a mathematically accurate description of the orientation information of the target pixel in the camera coordinate system.

[0086] For example, the j-th spatial ray based on the Plücker line representation can be represented by the following formula (1): (1); Where j is the ray index, For the j-th spatial ray, Let be the direction vector of the light ray. The location of the camera's optical center (as the starting point of the light rays).

[0087] Step S2512: For each feature matching pair, construct a collinear geometric constraint expression containing the yaw angle parameter, translation vector and depth parameter to be solved, based on the spatial ray and the first rotation parameter.

[0088] The collinear geometric constraint expression can be used to characterize the alignment relationship between a 3D world coordinate point in the world coordinate system and a spatial ray in the camera coordinate system after rotation and translation transformations consisting of the first rotation parameter and the yaw angle parameter to be solved.

[0089] This depth parameter can be used to characterize the distance of a point in the three-dimensional world coordinate system, after coordinate transformation, to the corresponding position on a spatial ray relative to the optical center of the camera.

[0090] For example, the three-dimensional coordinates of any point on the aforementioned spatial ray. It can be expressed as the following formula (2): (2); Where G represents the local coordinate system of gravity, These are the three-dimensional coordinates of the point in the local gravity coordinate system G; This represents the position of the camera's optical center, which could be, for example, the position vector of the camera's optical center in the local gravity coordinate system G. This is the direction vector of the light ray, for example, the normalized direction vector of the light ray; The depth parameter represents the distance of the point relative to the camera's optical center along the ray direction.

[0091] Since the first rotation parameter is used as the prior locking parameter, i.e., a dimensionality reduction solution is performed for gravity constraints, the pose solution objective can include the rotation matrix and translation vector of the current frame's camera coordinate system relative to the world coordinate system (i.e., the map coordinate system) W, and the 3D points in the world coordinate system W... The coordinate transformation equation for transforming to the local gravity coordinate system G can be the following formula (3): (3); in, R represents the coordinates of the 3D world coordinate point in the map coordinate system W; R is the rotation matrix of the camera coordinate system relative to the world coordinate system; and t is a candidate value for the translation vector of the camera coordinate system relative to the world coordinate system.

[0092] The first rotation parameter provided by the smart glasses (i.e., the prior physical gravity vector provided by the inertial measurement unit) is substituted into the above coordinate transformation equation (3). After aligning the Plück line to the world coordinate system, the problem is transformed into solving for the unknown rotation angle s and translation vector candidate value t around the gravity direction (gravity direction g). The above coordinate transformation equation is transformed into the following equation (4): (4); in, is the rotation matrix of the rotation angle s around the direction of gravity g; s is the yaw angle parameter to be solved (also called the unknown rotation angle); the meanings of the other symbols are the same as those in the above formula (3).

[0093] Regarding the above formula (4), in order to eliminate the unknown depth parameter It is possible to consider the vectors on both sides of the equation and the direction of the light ray. Performing the cross product operation, we obtain the following formula (5) as the expression for collinear geometric constraints: (5); in, This represents the cross product operation of three-dimensional vectors. This refers to the ray direction vector, such as the normalized ray direction vector. Let be the rotation matrix for rotating about the direction of gravity by an angle s; Let be a 3D world coordinate point; t is a candidate value of the translation vector to be solved. Let be the position of the camera's optical center. The above collinear geometric constraint expression can be called the cross product equation. This cross product equation eliminates the depth parameter by ensuring that the coordinates of a 3D point after rotation and translation are collinear with the spatial light rays. Among them, the rotation matrix The normalized representation using half-angle tangent parameterization is, for example, the representation of the following formula (6): (6); Where s is the yaw angle parameter to be solved, for example, it can be a parameterized representation of the half-angle tangent of the yaw angle, satisfying... Each element of the matrix is ​​a rational polynomial function of s, which allows the subsequent system of equations to be transformed into polynomial equations in s, facilitating algebraic solutions.

[0094] Step S2513: Based on the collinear geometric constraint expressions of at least two sets of feature matching pairs, the depth parameter and translation vector are eliminated by the elimination method to obtain a candidate expression containing the yaw angle parameter, and the candidate value of the yaw angle parameter is obtained by solving based on the candidate expression.

[0095] For example, the first two linearly independent equations are extracted from the collinear geometric constraint expression of each set of feature matching pairs. The equations of the two sets of matching pairs are combined and the translation vector components are eliminated one by one by elimination method to obtain the above candidate expression (e.g., a univariate quadratic polynomial) containing the yaw angle parameter. Then, the yaw angle candidate value of the yaw angle parameter is obtained based on the candidate expression (e.g., there may be two candidate solutions).

[0096] There are several ways to extract the first two linearly independent equations from the cross product constraint equation of each feature matching pair. Taking the first feature matching pair as an example, the extracted linear equations are shown in formulas (7) and (8): (7); (8); in, These are the three components of the candidate translation vector value t; s is the yaw angle parameter to be solved, such as the yaw angle half-angle tangent parameter; For the direction vector of light 3D world coordinates And the coefficients determined together by the first rotation parameter (the gravity alignment rotation matrix composed of pitch and roll angles). For example, by using the collinear geometric constraint expression of formula (5) according to u... j By expanding the components and rearranging the coefficients, we can obtain the coefficient a1 in formulas (7) and (8). a 12 The specific calculation method can be found in the description in the relevant technology, and will not be repeated here.

[0097] Furthermore, by introducing a second set of feature matching pairs, a similar coefficient b1 can be obtained. b12. Multiply the four equations obtained from the two sets of feature matching by (s) 2 +1) After eliminating the denominator, the translation vector components t1, t2, and t3 are eliminated in sequence by the elimination method, and finally a quadratic polynomial containing only the yaw angle parameter s is obtained, as shown in formula (9): (9); Where A, B, and C are the coefficients of a quadratic polynomial obtained by eliminating denominators, expanding, combining like terms, and successively eliminating translation vector components t1, t2, and t3 from the two sets of feature-matching corresponding equations. A, B, and C can be obtained from the known coefficients a1. a12 and b1 b12 is uniquely determined.

[0098] Solving this quadratic polynomial in one variable can yield one or two candidate values ​​for the yaw angle parameter s (i.e., one or two candidate solutions).

[0099] Step S2514: Substitute the candidate yaw angle values ​​into the collinear geometric constraint expression to obtain the corresponding candidate translation vector values.

[0100] In some examples, the corresponding candidate values ​​for the translation vector can be obtained by solving the least squares method.

[0101] For example, after substituting the candidate yaw angle values ​​of the yaw angle parameter s into the above collinear geometric constraint expression, the candidate translation vector value t can be solved by fitting the least squares matrix equation shown in the following formula (10): (10); The left-hand matrix consists of a coefficient matrix composed of the known coefficients a1, a2, b1, b2, b7, and b8 of the two feature matching pairs. Let t be the three components of the candidate translation vector value to be solved; s is the candidate yaw angle value of the above yaw angle parameter. Let be a polynomial vector in s, which can be represented by the following formula (11): (11); in, The known coefficients are for the first set of feature matching pairs; Here, represents the known coefficients corresponding to the second set of feature matching pairs; s represents the candidate yaw angle. Through the above least squares solution, the corresponding candidate translation vector t can be obtained for each candidate yaw angle s, i.e. .

[0102] Step S2515: Perform positive depth verification on the yaw angle candidate value and translation vector candidate value, and determine the initial yaw angle and initial translation vector based on the yaw angle candidate value and translation vector candidate value that meet the positive depth verification condition.

[0103] Among them, the positive depth verification condition can be used to constrain the depth value of the 3D world coordinate point after coordinate transformation by the yaw angle candidate value and the translation vector candidate value to be non-negative, that is, the 3D point should be located in front of the camera rather than behind it, thereby eliminating unreasonable candidate solutions.

[0104] In some examples, the mathematical expression for the positive depth verification condition can be the following formula (12): (12); in, It is the transpose of the ray direction vector; The rotation matrix is ​​determined by the candidate yaw angle value s; The coordinates of the point are in three-dimensional world coordinates; t is a candidate value for the translation vector. Let be the position of the camera's optical center. This inequality constraint requires that the projected depth value along the ray direction of a 3D world coordinate point after rotation and translation transformation is non-negative, meaning the transformed 3D point is located in front of the camera. The above positive depth check is performed on all candidate yaw angle and translation vector values ​​one by one. Based on the candidate solutions that satisfy the conditions, the initial yaw angle and initial translation vector are determined. For example, a candidate solution that satisfies the conditions can be used as the initial yaw angle and initial translation vector.

[0105] Thus, the aforementioned P2P algorithm constructs collinear geometric constraints and uses the elimination method to transform the system of equations into a polynomial with respect to the yaw angle for closed-form solution. It only requires at least two sets of feature matching pairs to complete the initial pose calculation. Compared with the traditional P3P algorithm, which requires at least three sets of matching pairs, it further reduces the dependence on the number of feature points and improves the success rate of the initial solution. It has stronger applicability and reliability in open, weakly textured scenes such as golf courses.

[0106] It should be noted that the open, weakly textured scenes in this disclosure can include large-scale outdoor scenes with uniform texture over a large area and lacking significant visual features, such as golf courses, football fields, outdoor equestrian venues, deserts, grasslands, snowfields, and airport runways. In these scenes, traditional localization methods based on visual feature matching are difficult to accurately calculate pose due to the limited number of extractable feature points. However, this disclosure utilizes gravity prior constraints to reduce the six-degree-of-freedom pose calculation to four degrees of freedom, significantly reducing the requirement for a large number of feature points, thus enabling high-precision localization even in the aforementioned weakly textured scenes. Those skilled in the art will understand that the 3D map databases for the aforementioned different scenes can be pre-constructed through methods such as UAV aerial photography and LiDAR scanning, and the construction process is independent of the specific application scenario.

[0107] In other examples, to further improve the robustness of the initial solution, the server can employ a Random Sample Consensus (RANSAC) strategy in the target feature matching pair set. This involves randomly selecting the minimum configuration sample set (i.e., two matching pairs) from multiple feature matching pairs for P2P solution and filtering out the optimal initial solution with the largest number of supporting inliers through multiple rounds of iteration. This suppresses outlier interference introduced by mismatches and further improves the reliability of the initial pose estimation.

[0108] During the iterative optimization phase, the server can use the initial yaw angle and initial translation vector as initial optimization values ​​to construct a cost function with the yaw angle and translation vector as optimization variables. The cost function is then iteratively solved using a preset iterative optimization algorithm until a preset convergence condition is met, yielding the target yaw angle and target translation vector. The aforementioned first rotation parameter can remain fixed during the iterative solution process.

[0109] For example, in the iterative optimization phase, since the first rotation parameters (e.g., pitch and roll angles) have been prior-locked by the gravity vector provided by the inertial measurement unit, the state variables to be optimized are simplified from the traditional six degrees of freedom to four degrees of freedom, and the state variables to be optimized can be expressed as the following formula (13): (13); in, The state variables to be optimized are: These are the X, Y, and Z components of the camera's three-dimensional translation vector in the world coordinate system; The yaw angle is the angle of rotation of the camera around the gravity axis (e.g., the Z-axis of the world coordinate system). By reducing the optimization space from a six-dimensional special Euclidean group (SE(3)) to a four-dimensional parameter space, the search range of the optimization algorithm is greatly reduced, and the convergence speed and stability can be improved.

[0110] In some examples, the cost function described above can be constructed by minimizing the reprojection error (e.g., the sum of absolute errors or the sum of squared errors) of all feature matching pairs (also known as observed feature points). For example, this cost function can calculate the Euclidean distance (i.e., the reprojection error) between the two-dimensional pixel coordinates (referred to as reprojected pixel coordinates) of the 3D world coordinate point projected onto the image plane by the current pose parameters and the two-dimensional observed coordinates of the actual observed target pixel point for each matching pair in the target feature matching pair set, and sum the reprojection errors of all matching pairs. To improve robustness to long-distance matching noise and outliers, a robust kernel function (e.g., the Huber loss function) can be introduced into the cost function to automatically identify and reduce the impact of outliers on the optimization results.

[0111] For example, the above cost function can be defined as the weighted sum of squared reprojection errors of all feature matching pairs, and this cost function can be expressed by the following formula (14): (14); in, Let cost function be The total number of feature matching pairs participating in the optimization, such as the total number of feature matching pairs in the target feature matching pair set mentioned above, where each feature matching pair includes a target pixel with two-dimensional observation coordinates and the three-dimensional world coordinates corresponding to that target pixel. The two-dimensional observation coordinates of the target pixel in the i-th feature matching pair; Let i be the three-dimensional world coordinate point in the i-th feature matching pair; This is the camera intrinsic parameter matrix, which can contain camera intrinsic parameters such as focal length and principal point coordinates; This is a perspective projection function used to project points in a 3D camera coordinate system onto a 2D image plane; The first rotation parameter can be represented, such as the gravity-aligned rotation matrix (pitch and roll angle) provided by the inertial measurement unit based on smart glasses, which remains frozen throughout the optimization iteration (does not participate in the differentiation) and serves as a hard constraint term to keep the optimization result anchored on the real horizontal plane. To optimize only the yaw angle The changing rotation matrix around the gravity axis is the only rotation optimization term in the optimization process; t is the three-dimensional translation vector to be optimized. As a robust kernel function, the Huber loss function can be used, which can be used to automatically identify and suppress outliers caused by long-distance matching noise in open scenes, reducing their impact on optimization results; Let be the Euclidean distance norm.

[0112] Throughout the iterative solution process, the first rotation parameters (pitch and roll angles) remain fixed as hard constraints and do not participate in the optimization differentiation. Only the Jacobian matrix of the residuals for the yaw angle and translation vector (four optimization variables in total) is calculated and iteratively updated. The preset iterative optimization algorithm can be either the Gauss-Newton method or the Levenberg-Marquardt (LM) algorithm. The latter has stronger convergence stability when the initial values ​​are poor and is more suitable for situations with limited accuracy of the initial solution in long-distance scenarios.

[0113] In each iteration, the system only deals with four state variables. Calculate the reprojection error of the i-th feature point The Jacobian matrix of the state variables can be expressed by the following formula (15): (15); in, Let be the Jacobian matrix of the i-th feature point, and its dimension can be... (The reprojection error is a two-dimensional vector, and the state variables are four-dimensional.) Let be the reprojection error vector of the i-th feature point, which is the difference between the two-dimensional observation coordinates of the target pixel and the reprojected pixel coordinates; The partial derivatives of the reprojection error with respect to the three components of the translation vector can be expressed as follows: [Dimensions can be...] ; The partial derivative of the reprojection error with respect to the yaw angle can be expressed as follows: [Dimension can be missing from original text] .because As a hard constraint that remains fixed and does not participate in differentiation, the calculation of the Jacobian matrix only involves four optimization variables. The computational cost can be effectively reduced compared to six-degree-of-freedom optimization, which helps to improve the iteration convergence speed.

[0114] In some examples, the aforementioned preset convergence conditions may include: the number of iterations reaching a preset maximum number of iterations (e.g., 50 iterations); or the change in the optimized variable between two adjacent iterations being less than a preset threshold (e.g., the change in yaw angle being less than 0.01 degrees and the change in translation vector being less than 0.001 meters); or the cost function value being less than a preset error threshold. When any of the above conditions are met, the iterative optimization terminates, and the target yaw angle and target translation vector are output.

[0115] In this way, by keeping the first rotation parameter fixed as a hard constraint, and only constructing a cost function for the yaw angle and translation vector for iterative optimization, the optimization space is reduced from six dimensions to four dimensions, which significantly narrows the search range and improves the convergence speed and stability. Furthermore, through gravity-locked nonlinear pose optimization, the pitch and roll angles are anchored on the real horizontal plane, which can cut off the transmission path of visual errors in these two angular dimensions, effectively eliminating drift errors under extreme viewing angles (such as small pitch angle scenarios when looking at the fairway from a distance). This enables high-precision pose calculation in long-distance open scenarios, providing a reliable pose foundation for sub-meter ranging.

[0116] In step S2600, if the positioning request information does not include the first rotation parameter, the server obtains the pose information of the smart glasses in the world coordinate system based on the second solving algorithm.

[0117] For example, the second solution algorithm can be a preset pose estimation algorithm that does not rely on prior gravity constraints. For instance, if the positioning request information does not include a valid first rotation parameter, the server can use a preset pose estimation algorithm to solve for the pose parameters based on the target feature matching pair set, thereby determining the pose information of the smart glasses in the world coordinate system.

[0118] In some examples, this preset pose estimation algorithm can be a combination of the Efficient Perspective-n-Point (EPnP) algorithm and Bundle Adjustment (BA) optimization. The EPnP algorithm can utilize multiple 3D-2D matching pairs in the target feature matching pair set to solve for the camera's complete six-DOF pose using a linearization method without relying on prior gravity orientation constraints. After obtaining the initial pose estimate using the EPnP algorithm, the reprojection error of all feature matching pairs can be globally minimized through bundle adjustment optimization to improve the accuracy of pose estimation.

[0119] In other examples, the preset pose estimation algorithm can use the Direct Linear Transform (DLT) algorithm to solve for the initial pose. Furthermore, when there are many outliers in the feature matching pairs, robust estimation frameworks such as Random Sample Consensus (RANSAC) or Progressive Sample Consensus (PROSAC) can be used to filter out outlier matching pairs before solving for the pose.

[0120] It should be noted that the preset pose estimation algorithm can be an algorithm that implements six-degree-of-freedom pose estimation, such as any type of algorithm in related technologies capable of implementing six-degree-of-freedom pose estimation. Those skilled in the art will understand that six degrees of freedom include three rotation parameters constituting the rotation matrix and three translation parameters constituting the translation vector. The three translation parameters are three translation amounts along the X, Y, and Z coordinate axes, and the three rotation parameters are the roll angle about the X-axis, the pitch angle about the Y-axis, and the yaw angle about the Z-axis.

[0121] In some examples, the switching logic between the first and second solution algorithms can be determined by the confidence flag (Status_Flag) carried in the positioning request information. This confidence flag can be used to determine whether the positioning request information carries a valid first rotation parameter. When Status_Flag=1, it indicates that the positioning request information carries a valid first rotation parameter, and the server can use the first solution algorithm that introduces gravity constraints, which can obtain higher accuracy pose estimation with fewer feature matching pairs in weak textured long-distance scenes. When Status_Flag=0, it indicates that the positioning request information does not carry the first rotation parameter or the first rotation parameter is unreliable, and the server can use the second solution algorithm that does not rely on gravity constraints, which can still complete basic pose calculation when the inertial data is unreliable, thus improving the availability of the system.

[0122] In this way, by designing a dual-path adaptive switching mechanism, the system automatically degrades to a preset pose estimation algorithm that does not rely on gravity constraints when the inertial data is unreliable. This enables the system to still have basic positioning capabilities under adverse conditions such as abnormal sensor data or incomplete initialization, thereby improving the robustness and usability of the positioning method.

[0123] In step S2700, the server sends a location response message to the smart glasses.

[0124] For example, the server can send positioning response information, including pose parameters and / or three-dimensional spatial distance, to the smart glasses. The smart glasses can receive the pose parameters and / or three-dimensional spatial distance returned by the server.

[0125] In some examples, the server can calculate the 3D spatial distance from the current position of the smart glasses to the target position based on the pose parameters obtained in step S2500 or S2600 above, and the 3D coordinates of the target position pre-marked in the 3D map database, and send this 3D spatial distance directly to the smart glasses. For example, the 3D spatial distance can be obtained by calculating the Euclidean distance between the current position coordinates and the target position 3D coordinates in the pose parameters of the smart glasses. This method centralizes the ranging calculation task on the server side, reducing the computational burden on the smart glasses and making it suitable for scenarios where the local computing power of the smart glasses is limited.

[0126] For example, the three-dimensional spatial distance D can be obtained by calculating the Euclidean distance between the current position coordinates of the smart glasses and the three-dimensional coordinates of the target position. The calculation formula can be the following formula (16): (16); Where D is the three-dimensional spatial distance from the current position of the smart glasses 1100 to the target position; The three-dimensional coordinates of the optical center of the smart glasses camera in the world coordinate system are determined by the pose calculation results of step S2500 or step S2600. This refers to the three-dimensional absolute coordinates of a pre-marked target location (such as the center hole or flagpole at the top of a ridge) in the world coordinate system within a 3D map database. Using the Euclidean distance formula described above, the true spatial distance between the smart glasses and the target location can be calculated in three-dimensional space. This fully considers the elevation differences of the terrain and reflects the true spatial distance of the fairway more accurately than purely two-dimensional planar distance measurement.

[0127] In other examples, the server can also send pose parameters to the smart glasses, which then determine the 3D spatial distance from the smart glasses to a pre-marked target location based on the received pose parameters and locally stored map data. This approach reduces the amount of communication data between the server and the smart glasses and allows the smart glasses to flexibly select the target location for distance measurement locally. It is suitable for scenarios where the smart glasses have a certain amount of local computing power and need to dynamically select the target for distance measurement.

[0128] In some examples, the 3D map database stored on the server may be a 3D map database containing golf courses, and the target location may be a pre-marked location on the golf course, such as a landmark location with clear 3D coordinates, such as the center hole of the green, the flagpole, or the edge of the bunker.

[0129] In step S2800, the smart glasses display the pose based on the positioning response information.

[0130] For example, smart glasses can receive positioning response information returned by the server, parse the pose parameters and / or three-dimensional spatial distance from it, and display the pose through the display unit. For example, the pose information and / or distance measurement results can be presented to the user in an augmented reality overlay manner.

[0131] Figure 4 This is a schematic diagram of the display interface of a smart glasses embodiment provided in this disclosure. Figure 4 As shown, the smart glasses' field of view (FOV) can display a fairway scene and / or a holographic distance measurement data panel. The fairway scene can include targets such as the green and / or the flagstick. The holographic distance measurement data panel can display the target name (e.g., "Target: Center Hole of the Green") and the target distance (e.g., "Distance: 150 yards"). The smart glasses can use a rendering engine to display the distance measurement results within the holographic distance measurement data panel, overlaid within the field of view. Optionally, the display interface can also show distance measurement lines, for example, a distance measurement line with the holographic distance measurement data panel as the smart glasses' current position and the flagstick as the target position.

[0132] Because gravity hard constraints are introduced during the pose calculation process, the rendered distance measurement information can maintain good spatial alignment with physical landmarks when the user's head moves or they walk, thus achieving a stable holographic visual distance measurement effect.

[0133] In some examples, smart glasses can determine the 3D spatial distance from the smart glasses to pre-marked target locations based on received pose parameters and a locally stored 3D map database. For instance, the smart glasses' first processor can read the pre-stored 3D map database (containing the 3D coordinates of each target location) from its first memory, combine it with the pose parameters returned by the server, calculate the 3D spatial distance from the smart glasses' current location to each target location using the Euclidean distance formula, and update the distance measurement display on the display unit in real time. This reduces the update latency of the distance measurement results through local calculation when network latency is high, improving the smoothness of the user experience.

[0134] Using the positioning method described in steps S2100 to S2800, based on the physical gravity vector measured locally by the smart glasses as a priori constraint, the traditional six-degree-of-freedom pose calculation is reduced to four degrees of freedom. Only a small number of feature matching pairs are needed to calculate high-precision pose in open, weakly textured scenes, thus enabling high-precision positioning and ranging for smart glasses in such environments. This embodiment's positioning method overcomes the bottleneck of the number of feature points, greatly improving the success rate of positioning in open scenes. While the PnP algorithm in related technologies requires at least three pairs of matching points, this embodiment, by introducing a gravity prior and employing a P2P algorithm, reduces the solution threshold to only two pairs of matching points, thereby solving the problem of feature point sparsity caused by the long distance and weak texture of golf fairways. Furthermore, reducing the dimension of pose calculation and nonlinear optimization from six degrees of freedom to four degrees of freedom not only accelerates the convergence speed of the pose calculation algorithm but also achieves dimensionality reduction in computing power, reducing matrix operation overhead. This highly adapts to the low-power, low-latency hardware requirements of smart glasses and is well-suited to the application scenarios of edge-cloud collaboration and wearable devices like smart glasses. Furthermore, the positioning method in this embodiment can also eliminate attitude drift under extreme viewing angles and improve ranging accuracy. For example, under extreme viewing angles such as looking into the distance, pure visual solutions in related technologies are prone to pitch and roll divergence. However, in this embodiment, the gravity direction of the IMU is used as a rigid constraint to cut off the transmission path of visual errors in the angle, thus achieving sub-meter level high-precision ranging at a distance of 100 meters.

[0135] <Second Embodiment> Figure 5 This is a flowchart illustrating another positioning method provided in an embodiment of this disclosure. This positioning method can be... Figure 1 The server shown is executing. (As shown) Figure 5 As shown, the positioning method of this embodiment may include the following steps S5100 to S5200.

[0136] Step S5100: In response to receiving the positioning request information, a target feature matching pair set is generated based on a pre-generated 3D map database including multiple 3D world coordinate points to characterize the correspondence between multiple target pixels in the target image data and the 3D world coordinate points.

[0137] For example, in response to receiving a location request from the smart glasses, the server can perform image retrieval in a pre-built 3D map database, extract feature information from the target image data and reference image data and match them, and finally generate a target feature matching pair set containing multiple sets of 3D-2D matching pairs.

[0138] It should be noted that the specific implementation method for this step can be found in [reference needed]. Figure 2 The relevant description of step S2400 in the example shown will not be repeated here.

[0139] In step S5200, if the positioning request information includes a first rotation parameter, the first rotation parameter is used as a priori locking parameter. The second rotation parameter and the target translation vector are obtained by solving the target feature matching set. The pose parameter representing the transformation relationship between the camera coordinate system and the world coordinate system is obtained according to the first rotation parameter, the second rotation parameter and the target translation vector, so as to determine the pose information of the smart glasses in the world coordinate system. The second rotation parameter is used to represent the rotation relationship of the camera coordinate system about the direction of gravity.

[0140] For example, the first rotation parameter may include pitch and roll angles. The second rotation parameter may include the target yaw angle, which characterizes the rotation of the camera coordinate system about the direction of gravity (i.e., the vertical axis of the world coordinate system). Since the yaw angle describes the camera's orientation in the horizontal plane, and the pitch and roll angles are predetermined by the first rotation parameter, the server only needs to solve for the target yaw angle and target translation vector in four-degree-of-freedom space to obtain the complete six-degree-of-freedom pose parameters.

[0141] It should be noted that the specific implementation method for this step can be found in [reference needed]. Figure 2 The relevant description of step S2500 in the example shown will not be repeated here.

[0142] In this way, by using the first rotation parameter generated by the smart glasses as the prior locking parameter, the server only needs to solve the second rotation parameter and translation vector around the direction of gravity, reducing the traditional six-degree-of-freedom pose calculation to four degrees of freedom. This greatly reduces the dependence on the number and quality of feature matching points and improves the success rate and accuracy of long-distance positioning in open, weakly textured scenes such as golf courses.

[0143] In some examples of this disclosure, if the positioning request information does not include a valid first rotation parameter, the server can use a preset pose estimation algorithm to solve for the pose parameter based on the target feature matching pair set in order to determine the pose information of the smart glasses in the world coordinate system.

[0144] In some examples disclosed herein, the server can also send positioning response information to the smart glasses after determining the pose parameters.

[0145] It should be noted that the specific implementation of the relevant steps in this embodiment can be found in [reference needed]. Figure 2 The descriptions in the illustrated embodiments will not be repeated here.

[0146] <Third Embodiment> Figure 6 This is a flowchart illustrating another positioning method provided in an embodiment of this disclosure. This positioning method can be... Figure 1 The smart glasses shown perform this action. (As shown in the image) Figure 6 As shown, the positioning method of this embodiment may include the following steps S6100 to S6400.

[0147] Step S6100: Multimodal data for positioning is acquired based on the camera and inertial measurement unit. The multimodal data includes time-aligned target image data and inertial data.

[0148] For example, smart glasses can acquire target image data through a camera and inertial data through an inertial measurement unit, and use a timestamp synchronization mechanism to precisely align the data of the two modalities in time.

[0149] It should be noted that the specific implementation method for this step can be found in [reference needed]. Figure 2 The relevant description of step S2100 in the example shown will not be repeated here.

[0150] Step S6200: Generate a first rotation parameter based on the target image data and inertial data. The first rotation parameter is used to characterize the rotation relationship of the camera coordinate system of the smart glasses about an axis perpendicular to the direction of gravity in the world coordinate system.

[0151] For example, smart glasses can fuse target image data and inertial data through a visual inertial odometry or SLAM algorithm module to generate a local relative pose; when the local relative pose, inertial data and target image data meet the preset stability conditions, the first rotation parameters (including pitch angle and roll angle) are separated from the local relative pose based on the physical gravity vector in the inertial data.

[0152] It should be noted that the specific implementation method for this step can be found in [reference needed]. Figure 2 The relevant description of step S2200 in the example shown will not be repeated here.

[0153] Step S6300: Send a positioning request message to the server, which includes at least the target image data.

[0154] This positioning request information is used to enable the server to perform pose calculation based on the positioning request information, and obtain pose parameters that characterize the transformation relationship between the camera coordinate system and the world coordinate system.

[0155] In some instances, the positioning request information may also include a first rotation parameter.

[0156] For example, smart glasses can package the target image data with a first rotation parameter (when the preset stability condition is met) or simply the target image data (when the preset stability condition is not met) into a positioning request message and send it to the server via wireless communication.

[0157] It should be noted that the specific implementation method for this step can be found in [reference needed]. Figure 2 The relevant description of step S2300 in the example shown will not be repeated here.

[0158] Step S6400: Receive positioning response information returned by the server, which includes pose parameters and / or three-dimensional spatial distance.

[0159] The three-dimensional spatial distance is the three-dimensional spatial distance from the smart glasses to the pre-marked target location in the three-dimensional map database, calculated based on the pose parameters.

[0160] It should be noted that the specific implementation methods for pose parameters and / or 3D spatial distances in this step can be found in [reference needed]. Figure 2 The relevant description of step S2700 in the example shown will not be repeated here.

[0161] In this way, by fusing camera image data and inertial measurement unit data at the smart glasses to generate the first rotation parameters, and by executing the high-load pose calculation task on the server through the edge-cloud collaborative architecture, the synergistic advantages of wearable device multimodal perception capability and cloud computing power are fully utilized, achieving high-performance visual positioning and holographic ranging on the resource-constrained smart glasses.

[0162] In some examples disclosed herein, smart glasses can also display pose based on positioning response information.

[0163] It should be noted that the specific implementation of the relevant steps in this embodiment can be found in [reference needed]. Figure 2 The descriptions in the illustrated embodiments will not be repeated here.

[0164] <Fourth Embodiment> This disclosure also provides a positioning system, for example... Figure 1 The positioning system shown may include... Figure 1 The smart glasses and server shown can be equipped with a camera and an inertial measurement unit.

[0165] The server can be used to perform one or more of the steps executed by the server in the positioning method of the foregoing embodiments of this disclosure.

[0166] The smart glasses can be used to perform one or more of the steps performed by the smart glasses in the positioning method of the foregoing embodiments of this disclosure.

[0167] Figure 7 This is a schematic diagram of another positioning system provided in an embodiment of this disclosure.

[0168] like Figure 7As shown, the positioning method steps executed by the smart glasses 1100 may include: after the smart glasses start the augmented reality (AR) service, they first determine whether the visual inertial system (e.g., the SLAM algorithm module) has completed initialization and is in a stable tracking state (e.g., State == TRACKING). If the visual inertial system has not yet completed initialization, the smart glasses can enter a waiting state and prompt the user that the positioning has been lost, until the visual inertial system resumes stable tracking.

[0169] After the visual-inertial system is in a stable tracking state, the smart glasses further determine whether the gravity direction has been aligned. If the gravity is not yet aligned, the smart glasses can continue to wait for the gravity direction to align until the inertial measurement unit senses a stable gravity direction vector.

[0170] After gravity alignment is complete, the smart glasses perform a health check on the inertial measurement unit (IMU) to determine if the IMU is functioning correctly, such as checking if sensor readings are normal. If the health check passes, the smart glasses set the confidence flag to Status_Flag=1, indicating that the current inertial data is reliable and can be used to generate valid first rotation parameters; if the health check fails, Status_Flag=0, indicating that the inertial data is unreliable.

[0171] In some examples, with Status_Flag=1, the smart glasses can further determine whether the current head-down angle (e.g., pitch) is within a preset range (e.g., less than 45 degrees). If it is not within the preset range, for example, if the head-down angle is too large, it means that the camera is facing the ground and there are no effective fairway scene features in the field of view. In this case, the smart glasses can provide a head-up prompt, for example, through a pop-up window in the user interface (UI) and / or a voice prompt to the user "Please look up and scan the environment," guiding the user to adjust their head posture to a suitable observation angle before triggering the positioning request.

[0172] After completing the above status detection, the smart glasses can package and send location request information, combining the acquired target image data (e.g., Image), gravity alignment rotation matrix (e.g., R_slam), and confidence flag (e.g., Status_Flag) into a location request message, and send it to the server via wireless communication. Optionally, if the head tilt angle is not within a reasonable range, the smart glasses can enter the stage of packaging and sending location request information, or they can wait for the user to adjust their head posture before entering the stage of packaging and sending location request information; this example does not limit this.

[0173] The positioning method steps executed on server 1200 may include: after receiving the positioning request information, the server sequentially performs processing steps such as request parsing, image retrieval, feature extraction and matching to generate a set of target feature matching pairs. Then, the server checks whether the inertial data is reliable and selects different pose calculation algorithm paths. For example, the reliability of the inertial data can be determined based on the Status_Flag value carried in the positioning request information.

[0174] With Status_Flag=1 (inertial data reliable), the server uses the first solution algorithm to calculate the pose. The first solution algorithm consists of three sub-stages: input adaptation, initial pose calculation using gravity constraints (e.g., P2P Solver calculation), and iterative optimization using gravity constraints (e.g., Gravity Refine). In the input adaptation stage, the server can adapt the gravity alignment rotation matrix sent by the smart glasses, converting it into the input format required for server-side pose calculation. For example, the gravity alignment rotation matrix R_slam in the smart glasses coordinate system can be transformed into Radapter using an adaptation matrix to a rotation matrix R_in in the server-side world coordinate system (e.g., R_in = Radapter). R_slam is used to eliminate potential coordinate system differences between the smart glasses' coordinate system and the server's world coordinate system. In the initial pose calculation (P2P Solver) phase, the server can utilize adapted gravity constraints to perform dimensionality-reduced initial pose calculation based on at least two sets of feature matching pairs, obtaining the initial yaw angle and initial translation vector. In the iterative optimization (e.g., GravityRefine) phase, the server uses the initial pose calculation results as initial optimization values, locking the pitch and roll angles as hard constraints, and performing nonlinear iterative optimization only on the yaw angle and translation vector to obtain high-precision target pose parameters.

[0175] When Status_Flag=0 (inertial data is unreliable), the server can use a second solution algorithm to calculate the pose. The second solution algorithm can employ a pose calculation scheme without gravity constraints, such as the EPnP+BA scheme, to complete the full solution of the six-degree-of-freedom pose without relying on prior gravity constraints.

[0176] The server obtains the pose parameters using either the first or second solution algorithm, and then returns these parameters to the smart glasses via wireless communication. Upon receiving the pose parameters, the smart glasses perform edge-cloud fusion processing, fusing the global absolute pose returned by the server with the local relative pose output by the local visual-inertial system to obtain a smoother and more stable final pose estimation result. Based on this result, they perform 3D spatial distance calculation and augmented reality ranging display.

[0177] By designing the Status_Flag, the quality of inertial data can be evaluated in real time on the smart glasses, and a confidence level label can be attached. This allows the server to quickly determine which algorithm path to use when receiving a positioning request, eliminating the need for additional data quality evaluation on the server side and reducing overall system latency. When the inertial data is reliable, the first solution algorithm can fully utilize gravity prior constraints to achieve high-precision pose calculation with fewer feature matching pairs in weakly textured scenes. When the inertial data is unreliable, the second solution algorithm serves as a fallback alternative, ensuring basic system availability under sensor malfunctions and improving the overall system robustness.

[0178] <Fifth Embodiment> This disclosure also provides an electronic device. Figure 8 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this disclosure.

[0179] like Figure 8 As shown, the electronic device 800 may include a processor 810 and a memory 820. The memory can be used to store computer instructions, and the processor can be used to retrieve computer instructions from the memory to execute all or part of the steps of any of the methods in the foregoing embodiments of this disclosure. The processor may be one or more processors, which may execute instructions individually or jointly. Similarly, the memory may be one or more memories, which may store the aforementioned computer instructions individually or jointly. The processor in the electronic device may be a graphics processing unit (GPU), a general-purpose graphics processing unit (GPGPU), a neural network processing unit (NPU), a tensor processing unit (TPU), or a central processing unit (CPU), etc. The processor may also be a chip in the form of an application-specific integrated circuit (ASIC), a system-on-a-chip (SOC), a field-programmable gate array (FPGA), or a programmable logic array (PLA), etc. This embodiment does not limit the specific type of chip. In some examples, the electronic device may be... Figure 1The smart glasses 1100 shown may include a processor 810 that can include a first processor 1111 and a memory 820 that can include a first memory 1112. In other examples, the electronic device may be... Figure 1 The server 1200 shown may include a processor 810 that may include a second processor 1211, and a memory 820 that may include a second memory 1212. In other examples, the electronic device may include... Figure 1 The smart glasses and server are shown. In some other examples, the electronic device may also be any electronic device capable of performing any of the methods described in the foregoing embodiments of this disclosure.

[0180] This disclosure also provides a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements all or part of the steps of any of the methods in the foregoing embodiments of this disclosure. Optionally, the computer-readable storage medium may be a non-transitory storage medium, but is not limited thereto, and may also be a temporary storage medium.

[0181] This disclosure also provides a computer program product that may include a computer program that, when executed by a processor, can implement all or part of the steps of any of the methods in the foregoing embodiments of this disclosure.

[0182] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. The same or similar parts between the various embodiments can be referred to each other.

[0183] This disclosure may be a system, method, and / or computer program product. A computer program product may include a computer-readable storage medium having a computer-readable program loaded thereon for causing a processor to implement any of the methods in the foregoing embodiments of this disclosure.

[0184] Computer-readable storage media can be tangible devices capable of holding and storing instructions for use by an instruction execution device. Computer-readable storage media may include, for example, electrical storage devices, magnetic storage devices, optical storage devices, electromagnetic storage devices, semiconductor storage devices, or any suitable combination thereof. More specific examples (a non-exhaustive list) of computer-readable storage media include: portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM), static random access memory (SRAM), compact disc-read-only memory (CD-ROM), digital versatile disc (DVD), memory sticks, floppy disks, mechanical encoding devices, such as punch cards or recessed protrusions storing instructions thereon, and any combination thereof. The computer-readable storage medium used herein is not to be interpreted as a transient signal itself, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through waveguides or other transmission media (e.g., light pulses through fiber optic cables), or electrical signals transmitted through wires.

[0185] The computer-readable program instructions described herein can be downloaded from computer-readable storage media to various computing / processing devices, or downloaded via a network, such as the Internet, local area network, wide area network, and / or wireless network, to an external computer or external storage device. The network may include one or more of copper transmission cables, fiber optic transmission, wireless transmission, routers, firewalls, switches, gateway computers, and edge servers. A network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards them to computer-readable storage media in the respective computing / processing device.

[0186] The computer program instructions used to perform the operations of this disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-dependent instructions, microcode, firmware instructions, state setting data, or source or object programs written in any combination of one or more programming languages, including object-oriented programming languages ​​(such as Smalltalk, C++, etc.) and conventional procedural programming languages ​​(such as C or similar programming languages). The computer-readable program instructions may be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer via any type of network (e.g., a local area network or a wide area network), or it may be connected to an external computer (e.g., via the Internet using an Internet service provider). In some embodiments, electronic circuitry, such as programmable logic circuitry, field-programmable gate arrays, or programmable logic arrays, can execute computer-readable program instructions to implement various aspects of the embodiments of this disclosure by utilizing state information from the computer-readable program instructions.

[0187] Various aspects of this disclosure are described herein with reference to flowchart illustrations and / or block diagrams of methods, apparatus, and computer program products according to embodiments of this disclosure. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer-readable program instructions.

[0188] These computer-readable program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing apparatus to produce a machine such that, when executed by the processor of the computer or other programmable data processing apparatus, they create means for implementing the functions / actions specified in one or more blocks of the flowchart and / or block diagram. These computer-readable program instructions can also be stored in a computer-readable storage medium that causes a computer, programmable data processing apparatus, and / or other device to operate in a particular manner; thus, the computer-readable medium storing the instructions comprises an article of manufacture that includes instructions for implementing aspects of the functions / actions specified in one or more blocks of the flowchart and / or block diagram.

[0189] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device to cause a series of operational steps to be performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions that execute on the computer, other programmable data processing apparatus, or other device to perform the functions / actions specified in one or more boxes of a flowchart and / or block diagram.

[0190] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and apparatuses according to various embodiments of the present disclosure. In this regard, each block in a flowchart or block diagram may represent a module, unit, or part of a circuit. In some alternative implementations, the functions marked in the blocks may occur in a different order than those marked in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, or they may sometimes be executed in reverse order, depending on the functions involved. It should be noted that embodiments of the present disclosure may include some or all of the functions marked in the multiple blocks in the drawings, and may also include other functions not shown in the blocks in the drawings. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, may be implemented in hardware that performs the specified function or action, or in a combination of dedicated hardware and computer instructions. Unless otherwise specified, implementation in hardware, implementation in software, and implementation in a combination of software and hardware may be equivalent.

[0191] The various embodiments of this disclosure have been described above. These descriptions are exemplary and not exhaustive, and are not limited to the disclosed embodiments. Many modifications and variations will be apparent to those skilled in the art without departing from the scope and spirit of the described embodiments. The terminology used herein is chosen to best explain the principles, practical application, or improvement of the technology in the market, or to enable others skilled in the art to understand the embodiments disclosed herein. The scope of this disclosure is defined by the appended claims.

Claims

1. A positioning method, characterized in that, A server is applied in a positioning system, the positioning system further including smart glasses communicatively connected to the server. The smart glasses are used to generate a first rotation parameter based on target image data acquired by a camera and inertial data acquired by an inertial measurement unit, and to send positioning request information including at least the target image data to the server. The first rotation parameter is used to characterize the rotation relationship of the camera coordinate system of the smart glasses about an axis perpendicular to the direction of gravity in the world coordinate system; the method includes: In response to receiving the positioning request information, a target feature matching pair set is generated based on a pre-generated 3D map database including multiple 3D world coordinate points to characterize the correspondence between multiple target pixels and 3D world coordinate points in the target image data. When the positioning request information includes the first rotation parameter, the first rotation parameter is used as a priori locking parameter. Based on the target feature matching pair set, the second rotation parameter and the target translation vector are obtained. Then, based on the first rotation parameter, the second rotation parameter, and the target translation vector, pose parameters representing the transformation relationship between the camera coordinate system and the world coordinate system are obtained to determine the pose information of the smart glasses in the world coordinate system. The second rotation parameter is used to represent the rotation relationship of the camera coordinate system about the direction of gravity. If the first rotation parameter is not included in the positioning request information, the pose parameter is obtained by using a preset pose estimation algorithm based on the target feature matching pair set, so as to determine the pose information of the smart glasses in the world coordinate system. The preset pose estimation algorithm is an algorithm for realizing six-degree-of-freedom pose estimation. Wherein, the first rotation parameter includes pitch angle and roll angle, and the second rotation parameter includes target yaw angle; the step of using the first rotation parameter as a priori locking parameter, and solving for the second rotation parameter and target translation vector based on the target feature matching pair set, includes: Based on the first rotation parameter and at least two feature matching pairs in the target feature matching pair set, the initial yaw angle and the initial translation vector are calculated. Using the initial yaw angle and the initial translation vector as initial optimization values, a cost function is constructed with the yaw angle and translation vector as optimization variables. The cost function is iteratively solved using a preset iterative optimization algorithm until a preset convergence condition is met, thereby obtaining the target yaw angle and the target translation vector. In the cost function, the first rotation parameter is kept frozen as a hard constraint term during the optimization iteration process, so that the optimization result of the preset iterative optimization algorithm is anchored on the real horizontal plane.

2. The method according to claim 1, characterized in that, The step of calculating the initial yaw angle and initial translation vector based on the first rotation parameter and at least two feature matching pairs in the target feature matching pair set includes: Based on each target pixel in at least two sets of the aforementioned feature matching pairs, construct a spatial ray in the camera coordinate system pointing from the camera optical center to the target pixel; For each feature matching pair, based on the spatial ray and the first rotation parameter, a collinear geometric constraint expression is constructed, which includes the yaw angle parameter to be solved, the translation vector, and the depth parameter. The collinear geometric constraint expression is used to characterize the collinear alignment relationship between the three-dimensional world coordinate point in the world coordinate system and the spatial ray in the camera coordinate system after the rotation transformation and translation transformation formed by the first rotation parameter and the yaw angle parameter to be solved. The depth parameter is used to characterize the distance of the corresponding position of the three-dimensional world coordinate point on the spatial ray after coordinate transformation relative to the optical center of the camera. Based on the collinear geometric constraint expressions of at least two sets of feature matching pairs, the depth parameter and translation vector are eliminated by the elimination method to obtain a candidate expression containing the yaw angle parameter, and the yaw angle candidate value is obtained by solving the candidate expression. Substitute the candidate yaw angle values ​​into the collinear geometric constraint expression to obtain the candidate translation vector values; A positive depth check is performed on the candidate yaw angle and the candidate translation vector. The initial yaw angle and the initial translation vector are determined based on the candidate yaw angle and the candidate translation vector that satisfy the positive depth check condition. The positive depth check condition is used to constrain the depth value of the three-dimensional world coordinate point after coordinate transformation by the candidate yaw angle and the candidate translation vector to be a non-negative value.

3. The method according to claim 1, characterized in that, The step of generating a target feature matching pair set based on a pre-generated 3D map database containing multiple 3D world coordinate points to characterize the correspondence between multiple target pixels and 3D world coordinate points in the target image data includes: Reference image data matching the target image data is retrieved from a pre-generated 3D map database; The reference feature information of each reference pixel in the reference image data and the target feature information of each target pixel in the target image data are extracted respectively. Based on the similarity between the target feature information and the reference feature information, and the three-dimensional world coordinates of each reference pixel, the three-dimensional world coordinates of each target pixel are determined. A set of target feature matching pairs is generated based on the three-dimensional world coordinates corresponding to the target pixel.

4. The method according to any one of claims 1 to 3, characterized in that, After obtaining the pose parameters characterizing the transformation relationship between the camera coordinate system and the world coordinate system of the smart glasses, the method further includes: Based on the pose parameters and the pre-marked target location in the 3D map database, the 3D spatial distance from the smart glasses to the target location is calculated, and the 3D spatial distance is sent to the smart glasses; or... The pose parameters are sent to the smart glasses so that the smart glasses can determine the three-dimensional spatial distance from the smart glasses to the pre-marked target location based on the pose parameters and the locally stored three-dimensional map database. The three-dimensional map database is a three-dimensional map database containing golf courses, and the target location is a pre-marked location within the golf course.

5. A positioning method, characterized in that, A smart glasses system for use in a positioning system, the smart glasses being equipped with a camera and an inertial measurement unit, the positioning system further including a server communicatively connected to the smart glasses; the method comprising: Multimodal data for positioning is acquired based on the camera and the inertial measurement unit, and the multimodal data includes time-aligned target image data and inertial data; A first rotation parameter is generated based on the target image data and the inertial data. The first rotation parameter is used to characterize the rotation relationship of the camera coordinate system of the smart glasses about an axis perpendicular to the direction of gravity in the world coordinate system. Sending positioning request information, including at least the target image data, to the server, so that the server executes the positioning method according to any one of claims 1 to 4 based on the positioning request information to obtain pose parameters characterizing the transformation relationship between the camera coordinate system and the world coordinate system; The system receives positioning response information returned by the server, which includes pose parameters and / or three-dimensional spatial distance; wherein the three-dimensional spatial distance is the three-dimensional spatial distance from the smart glasses to the pre-marked target location in the three-dimensional map database, calculated based on the pose parameters.

6. The method according to claim 5, characterized in that, The first rotation parameter is generated based on the target image data acquired by the camera and the inertial data acquired by the inertial measurement unit, including: Based on the target image data and the inertial data, the local relative pose of the smart glasses is generated through visual inertial calculation; If the local relative pose and / or the inertial data satisfy a preset stability condition, the first rotation parameter is obtained from the local relative pose based on the physical gravity vector in the inertial data.

7. A positioning system, characterized in that, The positioning system includes smart glasses and a server. The smart glasses are equipped with a camera and an inertial measurement unit, wherein: The server is configured to perform the method according to any one of claims 1 to 4; The smart glasses are used to perform the method of claim 5 or 6.

8. An electronic device, characterized in that, It includes a processor and a memory, the memory being used to store computer instructions, and the processor being used to retrieve the computer instructions from the memory to perform the method of any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that, It stores a computer program that, when executed by a processor, implements the method of any one of claims 1 to 6.

10. A computer program product, characterized in that, It includes a computer program that, when executed by a processor, implements the method of any one of claims 1 to 6.

Citation Information

Patent Citations

  • Robot multi-camera visual inertia point-line feature positioning method and device

    CN111791235A

  • Method, device and system for obtaining pose information

    CN113838129A

  • Visual and inertial mixed pose tracking method of head-mounted augmented reality system

    CN114485637A

  • Cross reality system for large scale environments

    US20240135656A1