Positioning Method, Head-Mounted Display Device and Storage Medium of Large-Space Smart Glasses

By laying textured pictures in a large space and using smart glasses to calculate the world position of the player's glasses, the problems of delay and error in the position calculation of smart glasses in the existing technology are solved, and the rapid response and high accuracy of player's position information in large space applications are achieved.

CN119672268BActive Publication Date: 2025-06-20LUMIERA LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510180013.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-02-19
Publication Date
2025-06-20
Estimated Expiration
2045-02-19

AI Technical Summary

Technical Problem

In existing large-space applications, there are delays and errors in the position calculation of smart glasses, resulting in virtual scene drift, player interaction errors, and increased equipment costs and energy consumption.

Method used

By laying texture pictures on the ground or ceiling of a large space, and using the camera on the smart glasses to collect images, identify the image information of the texture pictures, directly calculate the world position of the player's glasses, and broadcast it to other players to achieve fast response position information.

Benefits of technology

Reliance on central servers is reduced, errors caused by location information delay and positioning sensors are avoided, system costs and complexity are reduced, and real-time and accuracy of multi-person interactive scenarios are improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119672268B_ABST
    Figure CN119672268B_ABST
Patent Text Reader

Abstract

The present invention relates to a positioning method, a head-mounted display device and a storage medium for large-space intelligent glasses, belonging to the technical field of metaverse spatial computing. It is applicable to the metaverse positioning function in a large space for multi-player interaction, where the head-mounted display devices of players can directly interact without learning or reasoning through a central server. A number of different texture pictures are arranged on the bottom surface or ceiling of the large space. Images are collected through any camera on the intelligent glasses. The texture pictures are identified from the images collected by camera T, and the picture information corresponding to the texture pictures is obtained. The world position of camera T can be obtained through geometric calculation. The present invention can be quickly realized on the local head-mounted display device, avoiding the process of server learning or the delay in image reasoning and transmitting position information, as well as the error caused by the positioning sensor, and also avoiding the error problem caused by the long distance of the large-space site or the occluded texture pictures.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of metaverse spatial computing, and particularly to a positioning method for large-space smart glasses, a head-mounted display device, and a storage medium. Background Art

[0002] Extended Reality (XR) smart glasses (head-mounted display devices) are divided into two categories: AR augmented reality glasses and VR virtual reality glasses. AR glasses achieve perspective by means of Optical See Through or optical lenses to see the surrounding environment (hereinafter referred to as optical perspective OST). VR glasses are pure virtual glasses that cannot see the outside environment. In recent years, there have been MR mixed reality glasses, that is, VR watches the surrounding environment through a camera. This is achieved by Video See Through or Visual Pass Through or camera perspective to watch the surrounding environment (hereinafter referred to as camera perspective VST). VST glasses can perform glasses positioning calculations through the camera used by VST itself or other cameras on the glasses. OST glasses originally did not have a camera, but now there are advanced OST glasses with an additional camera configuration to calculate the surrounding space application. Many OST or AR glasses can calculate the environmental space because they have a camera, so they also claim to be MR mixed reality glasses.

[0003] In recent years, large-space applications have emerged in the metaverse industry. Large-space applications refer to applications where multiple people can walk in the same space through smart glasses, can watch virtual rendered or real scenes, and can interact with real or virtual objects, virtual characters, and other real players. Large-space technology refers to the technology of realizing a virtual and real hybrid environment that uses a spatial positioning method and allows rendering and interaction of multiple people and objects. Since many players are using smart glasses simultaneously in the same space (also known as "world coordinates"), the local position of each player's glasses (also known as "personal coordinates") and the relative position and direction with respect to the world position are the core of large-space technology. Incorrect calculation of the large-space glasses position will lead to the following problems: (1) The virtual scene rendered inside the glasses will drift or the object position deviation will be too large; (2) The mutual position offset of players will cause multiple people to collide or fail to make correct contact; (3) The incorrect position calculation between the player and the virtual object will result in incorrect interaction results; (4) When catching or shooting, the incorrect position will cause the shooting or receiving direction or position to be incorrect; (5) The incorrect viewing height of each other by players will cause height illusions, and other application errors caused by the incorrect position of each player's glasses.

[0004] The calculation methods for the position of glasses on the market mainly adopt point cloud vision and SIFT calculation methods. The general logic of point cloud and SIFT is to perform visual neural network or machine training through unique textures, markers or graphics on the walls, ceilings and floors (hereinafter referred to as "texture pictures"). All texture graphics in the space cannot be repeated, otherwise the neural network or machine learning trained will give incorrect or duplicate world positions during the inference process. Since point cloud and SIFT require training, it is inevitable to transmit the texture graphics captured by the glasses to the server for inference in real time, and then transmit the inference results back to the head-mounted device. Therefore, there is a problem of position information delay, which is a fatal experience in large space applications, especially in fast-paced competitive applications. Similarly, this mode will also cause waste of time such as long training time and the need for error correction during the process of making applications.

[0005] In addition, when applying in a large space, if multiple people use the same space at the same time, and the texture pictures are identified by the images collected by the front camera of the glasses, it is possible that the texture pictures of the opposite wall cannot be correctly collected because the line of sight is blocked by other players. The farther the distance, the greater the position error calculated. Then when the specific position of the glasses cannot be correctly inferred, the glasses must rely on the assistance of the gyroscope, Bluetooth positioning, TOF positioning, laser positioning or other SLAM positioning technologies of the device itself. These auxiliary technologies will have problems such as their own errors and drifts, and the device needs to add redundant positioning sensors, which will undoubtedly increase the cost, computing power, weight and energy consumption of the device or system.

[0006] Currently, most large space applications adopt the method of multiple head-mounted devices sharing the same server. Each head-mounted device uploads the texture pictures seen by the personal device to the server, and the server calculates the world position relationship of all head-mounted devices and distributes it. Thus, each head-mounted device can know the positions of other head-mounted devices in the same world space to achieve interaction. This requires the deployment of a server in the large space and the delay of inferring the position and transmitting it back to each device. Summary of the Invention

[0007] The purpose of the present invention is to provide a positioning method, a head-mounted device and a storage medium for large space intelligent glasses, which are applicable to the large space metaverse application scenario of multi-person interaction, especially applicable to the scenario where the head-mounted devices of each player in the large space can directly interact without being trained and inferred by a central server. By obtaining the picture information of the texture pictures in the large space, the world position of the player's own glasses can be quickly calculated, and at the same time, broadcast its own world position and game state data to other players in the same space, so as to support the requirement of fast response to the position information of each player in large space applications.

[0008] A positioning method for a large-space intelligent glasses. A number of different texture pictures are arranged on the bottom surface or ceiling of the large space. Images are collected by any camera on the intelligent glasses. The texture pictures are recognized from the images collected by camera T, and the picture information corresponding to the texture pictures is obtained. The picture information can be directly obtained by analyzing the texture pictures, or the ID of the texture pictures can be obtained, and the picture information is matched in the comparison table stored locally in the intelligent glasses according to the ID;

[0009] The picture information includes the world position (XYZ) and graphic size (m,n) of the picture; Three corner anchor points (A,m,n) are provided on the texture picture and form an included angle nAm, where the corner anchor point A is the vertex of the included angle nAm. Define the world position of the corner anchor point A as the world position (XYZ) of this picture. The connection line An from A to the n corner anchor point is the positive direction of the Y axis, and the connection line Am from A to the m corner anchor point is the positive direction of the X axis. The length of the connection line nA in the real world is n, and the length of the connection line Am in the real world is m; If the included angle nAm is not 90 0 , the angle of the included angle nAm is also included in the picture information for converting the X axis and the Y axis;

[0010] According to the picture information, the world position A(X A ,Y A ,Z A ) of the corner anchor point A, the world position m(X m ,Y m, Z m ) of the corner anchor point m and the world position n(X n ,Y n ,Z n ) of the corner anchor point n are obtained. The X m =X A +m, Y m =Y A , X n =X A , Y n = Y A +n, Z m =Z n =Z A ;

[0011] The pixel positions P A (X PA ,Y PA )、P m (X Pm ,Y Pm ) and P n (X Pn ,Y Pn ) corresponding to the above corner anchor points mAn are obtained from the collected images;

[0012] Obtain the pixel position P perpendicular to the ground or ceiling in the image collected by the camera through the nine-axis geomagnetic chip of the smart glasses O (X Po ,Y Po );

[0013] Let the included angle formed by the normal line of the camera T perpendicular to the bottom surface or ceiling and the connection line H from the camera T to the corner anchor point A A be , and the included angle formed by the normal line of the camera T perpendicular to the bottom surface or ceiling and the connection line H from the camera T to the corner anchor point m m be , and the included angle formed by the normal line of the camera T perpendicular to the bottom surface or ceiling and the connection line H from the camera T to the corner anchor point n n be ; Through geometric calculation, the world position (X T ,Y T ,Z T ) of the camera T can be obtained.

[0014] Regarding the world position (X T ,Y T ,Z T ) that can be obtained through geometric calculation, assuming that the texture picture in the collected image is not deformed or has been corrected for distortion, given the field of view angle FOV of the camera and the total number of pixels X D of the X-axis of the screen, the number of pixels per degree PPD = X D / FOV; The specific calculation steps are as follows:

[0015] Step 1. Let the connection line Am from the corner anchor point A to the corner anchor point m be the X-axis in the world space. According to the pixel positions P A and P m , calculate the slope S X of the connection line Am, then the X-axis passing through the point P X and the point P A can be expressed by the straight-line formula as:

[0016] Y = S X X + B X (6);

[0017] Substitute the pixel position P A or P m into the formula (6) to obtain B X ;

[0018] Since the straight line P O P X is perpendicular to the X-axis, and the pixel position P X is the intersection point of the straight line P O P X and the X-axis, perpendicular to the straight line PA P m The straight line P O P X has a slope of -S X , which is expressed by the formula:

[0019] Y = -S X X + B XV (7);

[0020] Substitute the pixel position P O (X Po , Y Po ) into formula (7) to obtain B XV , so that the straight line P O P X and the intersection pixel position P of the X-axis X (X PX , Y PX ) can be found;

[0021] Let the connection line An from the corner anchor point A to the corner anchor point n be the Y-axis in the world space. According to the pixel positions P A and P n calculate the slope S of the connection line An Y , then the straight line passing through the point P Y point P A is expressed by the formula:

[0022] Y = S Y X + B Y (8);

[0023] Substitute the pixel position P A or P n into formula (8) to obtain B Y;

[0024] Since the straight line P O P Y is perpendicular to the Y-axis, the pixel position P Y is the intersection of the straight line P O P Y and the Y-axis. The straight line perpendicular to the straight line P A P n has a slope of -S O P Y , which is expressed by the formula: Y , which is expressed by the formula:

[0025] Y = -S Y X + B YV (9);

[0026] Substitute the pixel position P O (X Po , Y Po ) into formula (9) to obtain BYV , so that the straight line P can be found O P Y and the pixel position P of the intersection point of P and the Y-axis Y (X PY , Y PY );

[0027] Step 2. Calculate the pixel distance P using the Pythagorean theorem X P A and P X P m , then

[0028] = P X P A / PPD

[0029] = P X P m / PPD (3);

[0030] It is calculated through the following formula:

[0031] (1);

[0032] Or (2);

[0033] Calculate the pixel distance P using the Pythagorean theorem Y P A and P Y P m , then

[0034] = P Y P A / PPD

[0035] = P Y P n / PPD (3);

[0036] It is calculated through the following formula:

[0037] (1);

[0038] Or (2);

[0039] Step 3. After averaging the two Zs obtained above, the world position (X T , Y T , Z T , Z T ) of the camera T is obtained.

[0040] The world position (X) of the camera T can be obtained by geometric calculation. T ,Y T ,Z T ), assuming that the texture image in the captured image has been deformed due to the camera angle problem, calculate the angle ( , , ):

[0041] The three corner anchor points are all square positioning images. The angle of the upper half image of the positioning pattern of each corner anchor point is measured, and the largest angle is selected as , then the angle formed by the normal of camera T perpendicular to the ground or ceiling and the line connecting camera T to the corner anchor point is:

[0042] (4);

[0043] The angle ( , , );

[0044] First, use the Pythagorean theorem to get the following six formulas:

[0045] ;

[0046] Then combine the above six formulas to calculate the world position T(X T ,Y T ,Z T ) function formula:

[0047] (5).

[0048] The world positions of multiple cameras T are averaged or converted according to the known positional relationship of multiple cameras to obtain the world position of the head-mounted display device / smart glasses; the player's head-mounted display device / smart glasses broadcasts its own world position together with the current game status data to other players in the large space in real time.

[0049] The bottom surface of the large space refers to the ground, steps, walls or tabletop of the large space.

[0050] The three corner anchor points of the texture image can be positioning patterns without information or independent small texture images. The image information corresponding to the small texture image includes the world position of the small texture image itself and the size of the small texture image.

[0051] The image information of the texture image further includes the spatial region name used to distinguish virtual spaces in the large space.

[0052] The image information of the texture image further includes the distance information p or q from adjacent texture images, that is, the distance p from the adjacent texture image in the positive X-axis direction and the distance q from the adjacent texture image in the positive Y-axis direction.

[0053] A head-mounted display device, which includes a camera, a display, a memory, and a processor;

[0054] The camera is connected to the processor and is used to scan the real environment where the user is located;

[0055] The display is connected to the processor and is used to display the output content of the processor;

[0056] The memory is connected to the processor and is used to store computer programs;

[0057] The processor is used to execute the computer program to implement the positioning method of the above-mentioned large-space smart glasses.

[0058] A computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, it implements the positioning method of the above-mentioned large-space smart glasses.

[0059] In the present invention, for the images collected by the cameras in any direction on the smart glasses, the image information of the texture image (such as a mature QR code logo) is found and recognized through simple visual calculations. The image information includes the world position (XYZ) of the image itself and the image size (m, n). Based on the recognized image information, the position of the player's own glasses is obtained, and at the same time, the player broadcasts his own world position and game status data to other players in the same space, so as to obtain the position and status information of the head-mounted display devices of other players in the same space. The above calculation process can be quickly implemented on the local head-mounted display device, avoiding the delay of image training, transmission of image inference, and back transmission of position information to the server and the error caused by the positioning sensor assistance, and also avoiding the error problem caused by the texture image being far away or blocked. The present invention not only reduces the server but also greatly reduces the investment cost of the large space. Only the computing power of the smart glasses themselves is required to implement a multi-player interaction scenario. BRIEF DESCRIPTION OF THE DRAWINGS

[0060] Figure 1 It is the texture image of Example 1 in the present invention;

[0061] Figure 2 It is the texture picture of Example 2 of the present invention;

[0062] Figure 3 It is a schematic diagram of the distance information between adjacent two-dimensional code pictures recorded in the present invention;

[0063] Figure 4 It is a schematic diagram of triangular calculation for calculating the position (X T , Z T ) of camera T based on one-dimensional space two-dimensional code in the present invention;

[0064] Figure 5 It is an image showing an undeformed two-dimensional code in the present invention;

[0065] Figure 6 It is a schematic diagram of the change of the included angle formed by the central normal line of the camera and the perpendicular projection line of the two-dimensional code in the present invention ;

[0066] Figure 7 It is a schematic diagram of the change of the positioning pattern of the corner anchor point A of the two-dimensional code seen through the camera from different angles in the present invention;

[0067] Figure 8 They are two-dimensional codes seen at four pitch angles;

[0068] Figure 9 It is an image showing a deformed two-dimensional code in the present invention;

[0069] Figure 10 It is a schematic diagram of the relationship between camera T and the texture picture seen from above in the present invention;

[0070] Figure 11 It is a schematic diagram of the relationship between camera T and corner anchor point A seen from the side in the present invention;

[0071] Figure 12 It is a functional block diagram of a head-mounted display device in the present invention. Detailed implementation manners

[0072] Next, the technical solutions in the embodiments of the present application will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments in the present application without creative efforts shall fall within the protection scope of the present application.

[0073] It should be noted that the terms "first", "second", etc. in the description, claims and above-mentioned drawings of this application are used to distinguish similar objects, and do not necessarily describe a specific order or sequence. It should be understood that the data used in this way can be interchanged under appropriate circumstances, so that the embodiments of this application described here can be implemented in an order other than those illustrated or described here. In addition, the terms "comprising" and "having" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product or server comprising a series of steps or units does not necessarily have to be limited to those steps or units clearly listed, but may include other steps or units not clearly listed or inherent to these processes, methods, products or devices.

[0074] In the embodiments of this application, words such as "exemplary" or "for example" are used to represent examples, illustrations or explanations. Any embodiment or solution described as "exemplary" or "for example" in the embodiments of this application should not be construed as being more preferred or having more advantages than other embodiments or solutions. Rather, the use of words such as "exemplary" or "for example" is intended to present relevant concepts in a specific manner.

[0075] Principle description of the present invention:

[0076] (1) Texture pictures are set on the ground, steps, desktop and / or ceiling of a large space, and these texture pictures are all different. The camera in the smart glasses is used for image acquisition, and texture picture recognition is carried out through simple visual calculation:

[0077] Since players need to wear smart glasses and walk in a large space in large space applications, the ground of the space has the safe walking characteristics of being flat and not causing wrestling. In existing smart glasses, cameras in multiple directions are usually provided on the spectacle frame. In order to solve the problems that when the texture pictures are set on the wall, the distance is far or they are blocked by other players, and the experience is not good due to the need to lower or raise the head, the present invention proposes to print, paste or project the texture pictures on the ground, steps, desktop and / or ceiling, and use the camera in any direction in the smart glasses for image acquisition. Through simple visual calculation, the texture pictures in the image can be found, and the picture information contained in the texture pictures can be recognized, or the picture information can be obtained from the comparison table stored locally in the smart glasses through the ID of the texture picture. The picture information includes the world position (XYZ) and graphic size (m, n) of the picture itself.

[0078] The picture information of the texture picture may further include a spatial area name, which is used to distinguish virtual spaces in a large space. Players can interact with virtual positions in different virtual spaces at the same physical location. When players are in different virtual spaces, the same texture picture can be used to realize interactions in different virtual scenarios. The large space can also be composed of many sub-spaces, and there can be overlapping and interactive areas between sub-spaces. The overlapping virtual areas can better enable players to transfer and use spaces seamlessly, avoiding the disconnection problem caused by non-intersecting between sub-spaces.

[0079] The picture information of the texture picture further includes: distance information p or q from an adjacent texture picture. As Figure 3 shown, let the spacing between two adjacent texture pictures be p or q, that is, the distance p from the adjacent texture picture in the positive X-axis direction and the distance q from the adjacent texture picture in the positive Y-axis direction. When the smart glasses simultaneously recognize three texture pictures, the world positions (XYZ) and picture sizes (m, n) of the three texture pictures are respectively obtained, as well as the distances p or q between the smart glasses and two adjacent texture pictures respectively. In this way, a small matrix is formed that includes the world positions, picture sizes (m, n) of the three texture pictures, the distance p between the two texture pictures on the X-axis, and the distance q between the two texture pictures on the Y-axis. By analogy, the entire large space or its sub-spaces can have texture pictures at fixed distances for multiple multi-dimensional calculations of the glasses position. If there is a deviation in the positions calculated by the two data, the average value of the two is a more accurate glasses position. Therefore, by combining the spacing between adjacent texture pictures for calculation, the calculation deviation can be corrected to obtain a more accurate glasses position.

[0080] In the present invention, the texture picture can also be pasted, printed, or projected vertically on a wall or the ground. For a vertically placed texture picture, the An direction can be changed to the Z-axis and the Am direction can be set as the X-axis or Y-axis. If the Am direction is in the XY two-dimensional direction, the texture picture should be increased with an Am-axis direction for converting the X-axis and Y-axis.

[0081] (2) It is a prior art to obtain position information through texture pictures in the field of positioning. The following are several examples of texture pictures:

[0082] A. The texture picture of Example 1 is a QR code picture, as Figure 1As shown in the figure, there are positioning patterns (Position Detection Pattern) without information in three of the four corners (A, m, n) of the QR code. In the present invention, this positioning pattern is called a corner anchor point. Assuming the QR code is square, connect the adjacent corner anchor points YA or AX pairwise. The three corner anchor points form a 90-degree angle nAm, where the corner anchor point A is the vertex of the angle nAm. Define the world position of the corner anchor point A as the world position (XYZ) corresponding to this texture image. The line connecting from A to the n corner anchor point is the positive direction of the Y axis, and the line connecting from A to the m corner anchor point is the positive direction of the X axis. That is to say, the information surface of the QR code is the positive surface of the X axis and the Y axis. The length of the line nA in the real world is n, and the length of the line Am in the real world is m. If the QR code is square, then m = n;

[0083] B. The texture image of Example 2 is a QR code image. As Figure 2 shown, the three corner anchor points of the QR code are also independent QR code images. The image information parsed from the large and small QR codes, and the position information (XYZ) of the three small QR codes are different. The position information of the A corner anchor point of the large QR code is the same as the position information of the small QR code that appears at the A corner anchor point. The image sizes (m, n) of the large and small QR codes are different, where (m, n) of the large QR code is larger than (m, n) of the small QR code. The position information of the small QR code at the n corner anchor point of the large QR code is equal to the Y A plus the position of n distance, and the position information of the small QR code at the m corner anchor point of the large QR code is equal to the X A plus m distance. If the player is too close to the texture image and the collected image is not a complete large QR code and the large QR code information cannot be parsed, any corner anchor point can be found in the image, and the small QR code corresponding to the corner anchor point can be directly parsed to obtain the image information corresponding to the small QR code; when the complete large QR code can be recognized in the collected image, the image information corresponding to the large QR code is directly obtained. In this way, whether it is a texture image at a long distance or a short distance, the image information can be parsed through the large and small QR codes, ensuring that the calculated position of the glasses is more accurate or faster.

[0084] C. There are multiple patterns on the texture image. The patterns can be pre-bound with information content, and the recorded image information can be obtained by the arrangement order of the patterns.

[0085] (3) Smart glasses generally have multiple cameras for calculating spatial distances. In addition to obtaining the position of a single camera of the glasses, by calculating the distance and angle between the single camera of the glasses and a certain texture image, and combining the distance between two cameras, the position (XYZ) of the center point of two cameras of the glasses can be further calculated.

[0086] Since multiple cameras calculate their own positions independently, even if different cameras see different QR codes, the theoretically calculated world positions of the glasses should be the same. In practice, due to various errors, the calculation results are usually different. Therefore, taking the average of the positions of multiple cameras will be more accurate. Thus, a more accurate average position can be obtained by averaging the positions calculated by multiple cameras. If a pair of glasses has 2 cameras and each camera captures 2 QR codes, there will be 4 averages. If 3 QR codes are seen, there will be 6 averages. The more QR codes are seen, the more accurate the average world position of the glasses calculated by multiple cameras will be. Since the world positions of each camera are different, when averaging the calculated world positions of multiple cameras, they should first be converted to the common position on the smart glasses (such as the exact middle of the smart glasses) and then the average calculation result should be obtained.

[0087] (4) Calculate the world position of the smart glasses in the large space based on the picture information of the texture picture:

[0088] A. Method for calculating the world position T(X T ,Z T ) of the smart glasses based on the one-dimensional space QR code:

[0089] Assume that the QR code in the one-dimensional space has only the X-axis and no Y-axis, and the two ends of the QR code are the corner anchor points A and m. Let the line connecting the two corner anchor points Am be the X-axis. Given the position of the corner anchor point A (X A ,Z = 0) and the length m of the line Am, then , as Figure 4 shown, the vertical projection point of the camera T on the X-axis is X T , the angle formed by the line TA connecting the camera T and the corner anchor point A and the vertical projection of the camera T on the X-axis is , the angle formed by the line Tm connecting the camera T and the corner anchor point m and the vertical projection of the camera T on the X-axis is , and the calculation formula for the two-dimensional world position (X T ,Z T ) of the smart glasses is derived through trigonometric calculation:

[0090] (1)

[0091] Or (2)

[0092] The said angles and angle are obtained through the following method:

[0093] According to the field of view FOV (Field Of View) in the smart glasses camera specifications and the total number of pixels X D, the number of pixels per degree PPD (Pixels Per Degree) is obtained, that is, PPD = X D / FOV; Assume FOV = 100º, X D = 2000 pixels, then 2000 pixels divided by 100 degrees is 20 PPD or 20 pixels per degree. Given that the pixel position of the angular anchor point A on the image is P A , the pixel position of the angular anchor point m is P m , then:

[0094]

[0095] (3);

[0096] If the camera is perpendicular to the ground, let P0 be the pixel perpendicular to the ground. If the camera is perpendicular to the ceiling, let P0 be the pixel perpendicular to the ceiling. The value of P0 can be obtained through the sensor of the smart glasses (such as a nine-axis geomagnetic chip);

[0097] If the QR code in the one-dimensional space only has the Y-axis and no X-axis, then change X in the above formulas (1), (2), and (3) to Y.

[0098] B. Method for calculating the world position T (X T , Y T , Z T ) of the smart glasses based on the undeformed QR code:

[0099] As Figure 5 shown, assume that the image captured by the camera is 20x20, the field of view angle FOV of the camera is 20 degrees, then there is only 1 pixel per degree (1 PPD), and the center point pixel position is P C , and the camera is not perpendicular downward but has an inclination angle, and the pixel position perpendicular to the ground is P O ; The picture information of the QR code includes the world position of the angular anchor point A in the large space and the picture size (m, n), that is, the distance between the angular anchor point A and the X-axis angular anchor point m is m, and the distance between the angular anchor point A and the Y-axis angular anchor point n is n. Calculate the world position (X T , Y T , Z T ) of the glasses, which is to solve the pixel position P O perpendicular to the ground relative to the world position of the angular anchor point A:

[0100] Let the world position of the angular anchor point A be A(X A , Y A ), and the corresponding pixel position in the captured image is P A (X PA , Y PA ); The world position of the angular anchor point m is m(Xm , Y m ), the corresponding pixel position in the captured image is P m (X Pm , Y Pm ); the world position of corner anchor point n is n(X n , Y n ), and the corresponding pixel position in the captured image is P n (X Pn , Y Pn ); the pixel position perpendicular to the ground or ceiling on the captured image obtained through the nine-axis geomagnetic chip of the smart glasses is P O (X Po , Y Po ), and the center point pixel position of the captured image obtained from the glasses camera specification is P C (X Pc , Y Pc );

[0101] Assume that the picture information of the QR code includes: the world position W of corner anchor point A A =(1400, 1000), m = n = 300 mm; then the world position of corner anchor point m is m = (1700, 1000) and the world position of corner anchor point n is n = (1400, 1300), and m and n in the world position only affect the X-axis or Y-axis;

[0102] As Figure 5 shown, P C =(10, 10), P O =(02, 08), P A =(14, 10), P m =(17, 13), P n =(11, 13). By the Pythagorean theorem, m = n = 4.24 pixels. In the QR code in the actual captured image, due to perspective, it is deformed and is no longer a square but a trapezoid. Here, for simplicity of understanding, assume that the camera T is at a very high position and the QR code seen is basically not deformed.

[0103] Step 1: Find the pixel position P X Then the X position of the X-axis in the world space can be calculated using formula (1): T Position:

[0104] It is known that the line Am connecting corner anchor point A to corner anchor point m is the positive direction of the X-axis in the world space, P A =(14, 10), P m =(17, 13), and its slope S X = 3 / 3 = 1. Then the straight line formula passing through point P X point A is: Y = S XX + B X , according to P A and P m two points to calculate B X = -4, then the world space X-axis on the image is expressed by the formula: Y P = X P - 4, the line P O P X is perpendicular to the world space X-axis, and its intersection position is the pixel position P X , find P X (X PX , Y PX ):

[0105] X PX = (Y PO + S X X PO - B) / 2S X

[0106] Y PX = S X X PX + B X

[0107] X PX = (8 + 2 + 4) / 2 = 7, Y PX = S X X PX + B X = 7 - 4 = 3, P X = (7, 3), consistent with the position on Figure 5 .

[0108] Step 2: According to formula (1), it is necessary to first calculate the two pixel distances of the world space X-axis P X P A and P X P m , calculated by the Pythagorean theorem: P X (7, 3)P A (14, 10) distance = 9.90 pixels, P X (7, 3)P m (17, 13) distance = 14.14 pixels, then:

[0109] = P X (7, 3)P A (14, 10) distance / PPD = 9.90 degrees;

[0110] = P X (7, 3)P m (17, 13) distance / PPD = 14.14 degrees;

[0111] Formula (1): X T =(X m Tan -X A Tan ) / ( Tan -Tan )= 723 millimeters;

[0112] Formula (2): Z T =(X A -X m ) / (Tan -Tan )= 3876 millimeters ;

[0113] Step 3: Locate the pixel position P in the image Y Then the Y position on the Y-axis of the world space can be calculated using Formula (3): T Position:

[0114] Given that the line An connecting the angular anchor point A to the angular anchor point n is the Y-axis of the world space, P A =(14,10), P n =(11,13), and its slope S Y =-1. Then, according to Formula (4), the line passing through point P Y Point P A is: Y = S Y X + B Y . According to P A and P n the two points, B Y = 24. The Y-axis of the world space on the image is expressed by the formula: Y P = 24 - X P ; The line P O P Y is perpendicular to the Y-axis of the world space, and its intersection position is the pixel position P Y . To find P Y (X PY , Y PY ):

[0115] X PY =(Y PO + S Y X PO - B Y ) / 2S Y , X PY = 9; Y PY = S Y X PY + B Y = 15, PY =(9, 15), consistent with Figure 5 the position above.

[0116] Step 4: According to formula (3), it is necessary to first calculate the two pixel distances P Y P A and P Y P n on the Y-axis in world space. Using the Pythagorean theorem, we get: P Y (9, 15)P A (14, 10) distance = 7.07 pixels, P Y (9, 15)P n (11, 13) distance = 2.83 pixels, then:

[0117] = P Y (9, 15)P A (14, 10) distance / PPD = 7.07 degrees;

[0118] = P Y (9, 15)P n (11, 13) distance / PPD = 2.83 degrees;

[0119] Formula (1): Y T =(Y m Tan - Y A Tan ) / (Tan - Tan ) = 1201 millimeters;

[0120] Formula (2): Z T =(Y A - Y n ) / (Tan - Tan ) = 4021 millimeters .

[0121] Since the Z T calculated above has errors, the average Z height of the second and fourth steps can be calculated. Then the final average Z T = 3949 mm;

[0122] Step 5: Calculate the world position T(X T , Y T , Z T ) = (723, 1201, 3949).

[0123] C. Another method for obtaining the angle formed by the normal line of the camera perpendicular to the ground or ceiling and the line connecting the camera to the corner anchor point A:

[0124] As Figure 6 shown, assuming that the angle formed by the normal line of the camera perpendicular to the ground or ceiling and the line connecting the camera to the corner anchor point A is , then when looking down through the camera from directly above the QR code, the angle at this time is 0°. If the camera gradually moves to the side and views the QR code horizontally from the side, then the QR code seen through the camera is flat, and the at this time is 90°. Therefore, it can be known that the angle is directly related to the direction in which the camera views the corner anchor point A. So, the angle formed by the normal line of the camera perpendicular to the ground or ceiling and the line connecting the camera to the corner anchor point A can be estimated according to the shape of the QR code seen through the camera.

[0125] Figure 7 is a schematic diagram of the changes in the positioning pattern corresponding to the corner anchor point A of the QR code when viewed through the camera from different angles. Assuming that the positioning pattern is a square, when viewing any of the positioning patterns of the three corner anchor points mAn of the QR code from the camera of the head-mounted device, it will always be seen that the upper pattern is farther away than the lower pattern. Unless viewed directly from the front ( = 0°), otherwise, at least one of the four corners of the square of the positioning pattern will have an angle greater than 90°, and at least one angle will be less than 90°. Except for Figure 7 where one side in the middle is vertical and both angles are 90°, when viewed from other pitch angles, there are 2 angles greater than 90° and 2 angles less than 90°. We can intercept the upper half of the positioning graphic, measure the angles, and select the largest angle among them and set it as , then subtracting 90 from 0 is the angle formed by the normal line of the camera perpendicular to the ground or ceiling and the line connecting the camera to the corner anchor point:

[0126] (4).

[0127] Thus, for all three corner anchor points mAn of the QR code, the angle formed by the normal line of the camera perpendicular to the ground or ceiling and the line connecting the camera to the said corner anchor point can be obtained through formula (4): ( , , ). Figure 8 shows the QR codes seen at four pitch angles. Each QR code has three corner anchor points mAn, and the largest angle As shown above, subtracting 90° gives the angle formed by the normal line of the camera perpendicular to the ground or ceiling and the line connecting the camera to the corner anchor point:( , , ). By this method, there is no need to convert the angle using the pixels and FOV of the image captured by the camera, which is faster and more direct.

[0128] As Figure 9 shown, assume that the pixel position P perpendicular to the ground or ceiling in the image captured by the camera is obtained through the nine-axis geomagnetic chip of the smart glasses O , and the angles formed by the normal line of the camera perpendicular to the ground or ceiling and the lines connecting the camera to the three corner anchor points mAn ( , , ) are quickly obtained by this method;

[0129] As Figure 10 shown is the relationship diagram of the camera T and the texture picture seen from above (the height Z-axis cannot be seen). When the camera T(X T ,Y T ,Z T ) sees the texture picture, the camera T(X T ,Y T ,Z T ) and the corner anchor points A(X A ,Y A ,Z A ), m(X m ,Y m ,Z m ) and n(X n ,Y n ,Z n ) are connected by lines H A , H m and H n . Using the Pythagorean theorem, the following three formulas are formed:

[0130] ;

[0131] As Figure 11 shown is the schematic diagram of the relationship between the camera T and the corner anchor point A seen from the side (the height Z-axis and H A are the horizontal axes). Combining Figure 7 and the angles formed by the normal line of the camera T perpendicular to the ground or ceiling and the lines connecting the camera T to the three corner anchor points mAn ( , , ), the following three formulas are obtained:

[0132] ;

[0133] The above six formulas are combined to calculate the world position T(X T ,Y T ,Z T ) function formula:

[0134] (5);

[0135] The above six formulas can be combined to obtain many different X T Y T Z T Formula (5).

[0136] Embodiment 1

[0137] Embodiment 1 of the present invention provides a positioning method for large-space smart glasses, which is suitable for a metaverse application scenario in which head-mounted display devices of players in a large space with multiple people can directly interact without training and reasoning of a central server. A number of different texture images are arranged on the ground, steps, desktops, walls and / or ceilings of the large space. By collecting images through any camera on the smart glasses, the texture image can be identified from the image collected by the camera T, and the image information corresponding to the texture image can be obtained. The world position of the camera T can be calculated by combining the image information. It is assumed that the texture image in the collected image is not deformed or has been distorted and calibrated. Figure 5 As shown, the following steps are included:

[0138] Step 1. The image information can be directly obtained by parsing the texture image, or the ID of the texture image can be obtained, and the image information can be matched in a comparison table stored locally in the smart glasses according to the ID;

[0139] The image information includes the world position (XYZ) and graphic size (m, n) of the image; three corner anchor points (A, m, n) are set on the texture image and form an angle nAm, wherein the corner anchor point A is the vertex of the angle nAm, and the world position of the corner anchor point A is defined as the world position (XYZ) of the image, the line An from A to the n corner anchor point is in the positive direction of the Y axis, the line Am from A to the m corner anchor point is in the positive direction of the X axis, the length of the line nA in the real world is n, and the length of the line Am in the real world is m; if the angle nAm is not 90 0 , then the image information includes the angle nAm, which is used to convert the X-axis and Y-axis;

[0140] Step 2. Get the world position A(X) of the corner anchor point A according to the image information. A ,Y A ,Z A ), the world position m(X m ,Y m , Zm ), the world position of the corner anchor point n is n(X n , Y n , Z n ), and the X m = X A + m, Y m = Y A , X n = X A , Y n = Y A + n, Z m = Z n = Z A ;

[0141] Obtain the pixel positions P A (X PA , Y PA ), P m (X Pm , Y Pm ) and P n (X Pn , Y Pn ) corresponding to the above corner anchor points mAn from the captured image;

[0142] Obtain the pixel position P O (X Po , Y Po ) perpendicular to the ground or ceiling in the image captured by the camera through the nine-axis geomagnetic chip of the smart glasses;

[0143] According to the field of view angle FOV in the smart glasses camera specifications and the total number of pixels X D of the screen X-axis, obtain the number of pixels per degree PPD = X D / FOV;

[0144] Step 3. Let the angle formed by the normal line of the camera T perpendicular to the ground or ceiling and the line TA connecting the camera T to the corner anchor point A be , and the angle formed by the normal line of the camera T perpendicular to the ground or ceiling and the line Tm connecting the camera T to the corner anchor point m be , and the angle formed by the normal line of the camera T perpendicular to the ground or ceiling and the line Tn connecting the camera T to the corner anchor point n be ;

[0145] Let the line Am connecting the corner anchor point A to the corner anchor point m be the X-axis in the world space. According to the pixel positions P A and P m calculate the slope S X of the line Am. Then the X-axis passing through the point P X and the point P A is expressed by the straight-line formula as:

[0146] Y=S X X+B X (6);

[0147] The pixel position P A and P m Substituting into formula (6) we get B X ;

[0148] Since the straight line P O P X Perpendicular to the X axis, pixel position P X The straight line P O P X Intersection with the X axis, perpendicular to the line P A P m The straight line P O P X The slope is -S X , expressed as:

[0149] Y=-S X X+B XV (7);

[0150] The pixel position P O (X Po ,Y Po ) into formula (7) to obtain B XV , so we can find the straight line P O P X The pixel position of the intersection with the X axis is P X (X PX ,Y PX );

[0151] Let An, the line connecting corner anchor point A to corner anchor point n, be the Y axis of the world space. A and P n Calculate the slope S of the line An Y , then through point P Y Point P A The straight line is expressed by the formula:

[0152] Y=S Y X+B Y (8);

[0153] The pixel position P A or P n Substituting into formula (8) we get B Y;

[0154] Since the straight line P O P Y Perpendicular to the Y axis, pixel position P Y The straight line P O PY The intersection point with the Y-axis, perpendicular to the line P A P n The line P O P Y The slope of P is -S Y , which is expressed by the formula:

[0155] Y = -S Y X + B YV (9);

[0156] Substitute the pixel position P O (X Po , Y Po ) into formula (9) to obtain B YV , so that the line P O P Y The intersection point pixel position P of the line P with the Y-axis Y (X PY , Y PY );

[0157] Step 4. Calculate the pixel distance P X P A and P X P m , then

[0158] = P X P A / PPD

[0159] = P X P m / PPD (3);

[0160] It is calculated by the following formula:

[0161] (1);

[0162] Or (2);

[0163] Calculate the pixel distance P Y P A and P Y P m , then

[0164] = P Y P A / PPD

[0165] = P Y P n / PPD (3);

[0166] It is calculated by the following formula:

[0167] (1);

[0168] or (2);

[0169] After averaging the two Zs obtained above, the world position (X T , Y T , Z T ) of the camera T is obtained. T )

[0170] It further includes step 5. The world positions of multiple cameras T are averaged or converted to obtain the world position of the head-mounted display device according to the known positional relationships of multiple cameras; the world position of the player's head-mounted display device broadcasts its own world position together with the current game state data to other players in the large space in real time.

[0171] Embodiment 2

[0172] Embodiment 2 of the present invention provides another positioning method for large-space smart glasses, which is applicable to the metaverse application scenario where the head-mounted display devices of players in a large space for multi-person interaction can directly interact without going through the inference of a central server. A number of different texture pictures are arranged on the ground, steps, desktop, wall surface and / or ceiling of the large space. By collecting an image through any camera on the smart glasses and identifying the texture picture from the image collected by the camera T, the picture information corresponding to the texture picture can be obtained, and the world position of the camera T can be calculated in combination with the picture information. The angular anchor points in the image are deformed due to the shooting angle of the camera, as Figure 9 shown, and the following steps are included:

[0173] Step 1. The picture information can be obtained by parsing the texture picture, or the ID of the texture picture is obtained, and the picture information is matched in the look-up table stored locally on the smart glasses according to the ID;

[0174] The picture information includes the world position (X A , Y A , Z A ) of the A angular anchor point of the picture and the world dimensions (m, n) of the X-axis and Y-axis of the graph; three angular anchor points (A, m, n) are provided on the texture picture and form an included angle nAm. The angular anchor point is a square positioning pattern, where the angular anchor point A is the vertex of the included angle nAm, and the world position of the angular anchor point A is defined as the world position (X A , Y A , Z A), the line An connecting point A to the n - corner anchor point is in the positive direction of the Y - axis, the line Am connecting point A to the m - corner anchor point is in the positive direction of the X - axis, the length of the line nA in the real world is n, and the length of the line Am in the real world is m;

[0175] Step 2. Obtain from the image information: the world position A(X A ,Y A ,Z A ) of the corner anchor point A, the world position m(X m ,Y m ,Z m ) of the corner anchor point m, and the world position n(X n ,Y n ,Z n ) of the corner anchor point n. Where X n =X A +m, Y m =Y A , X n =X A ,Y n =Y A +n, Z m = Z n =Z A ;

[0176] Step 3. Let the angle formed by the normal line of the camera T perpendicular to the ground or ceiling and the line connecting the camera T to the corner anchor point A be , the angle formed by the normal line of the camera T perpendicular to the ground or ceiling and the line connecting the camera T to the corner anchor point m be , and the angle formed by the normal line of the camera T perpendicular to the ground or ceiling and the line connecting the camera T to the corner anchor point n be . Calculate the angles ( , , ) formed by the normal line of the camera T perpendicular to the ground or ceiling and the lines connecting the camera T to the three corner anchor points (A, m, n) respectively:

[0177] Measure the angle ( Figure 7 ) of the upper - half image of the positioning pattern of each corner anchor point, select the largest angle and set it as . Then the angle formed by the normal line of the camera T perpendicular to the ground or ceiling and the line connecting the camera T to the corner anchor point is:

[0178] (4);

[0179] Step 4. Obtain the angles ( , , ), the world position of camera T (X T ,Y T ,Z T ):

[0180] (5);

[0181] The formula (5) is derived through the following steps:

[0182] When the camera T(X T ,Y T ,Z T ) sees the texture image, assuming that the camera T(X T ,Y T ,Z T ) and the corner anchor point A(X A ,Y A ,Z A )、m(X m ,Y m ,Z m ) and n(X n ,Y n ,Z n ) is connected to H A , H m and H n , the angle formed by the normal of the camera T perpendicular to the ground or ceiling and the line connecting the camera T to the three corner anchor points mAn ( , , ), and use the Pythagorean theorem to get the following six formulas:

[0183] ;

[0184] The above six formulas are combined to calculate the world position T(X T ,Y T ,Z T ) function formula:

[0185] (5);

[0186] The above six formulas can be used to calculate many different X T Y T Z T Function formula (5).

[0187] It further includes step 5. The world positions of multiple cameras T are averaged or converted to obtain the world position of the head-mounted device according to the known positional relationships of the multiple cameras; the head-mounted device of the player broadcasts its own world position and the current game state data to other players in the large space in real time, and the interaction methods include existing communication interaction methods such as wireless communication mode and Internet mode.

[0188] The three corner anchor points of the texture picture can be positioning patterns without information or independent small texture pictures, and the picture information corresponding to the small texture pictures includes the world position of the small texture pictures themselves and the sizes of the small texture pictures.

[0189] The picture information of the texture picture further includes the spatial area name for distinguishing virtual spaces in the large space.

[0190] The picture information of the texture picture further includes: the distance information p or q from adjacent texture pictures, that is, the distance p from the adjacent texture picture in the positive X-axis direction and the distance q from the adjacent texture picture in the positive Y-axis direction.

[0191] Professional personnel should also be able to further realize that the units and algorithm steps of each example described in combination with the embodiments disclosed in the present invention can be implemented by electronic hardware, computer software, or a combination of the two. To clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described according to functions in the above description. Whether these functions are executed in a hardware or software manner depends on the specific application and design constraints of the technical solution. Professional technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the present invention.

[0192] Specifically, the steps of the method embodiments in the embodiments of the present application can be completed by the integrated logic circuit in the hardware of the processor and / or instructions in the form of software. The steps of the method disclosed in combination with the embodiments of the present application can be directly embodied as being executed by the hardware decoding processor, or executed by a combination of the hardware and software modules in the decoding processor. Optionally, the software module can be located in mature storage media in the art such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, etc. This storage media is located in the memory, and the processor reads the information in the memory and combines its hardware to complete the steps in the above method embodiments.

[0193] Embodiment III

[0194] Embodiment III of the present invention provides a head-mounted device, as Figure 12 shown. The head-mounted device 100 includes: a camera 101, a display 102, a memory 103, and a processor 104;

[0195] The camera 101 is connected to the processor 104 and is used to scan the real environment where the user is located;

[0196] The display 102 is connected to the processor 104 and is used to display the output content of the processor 104;

[0197] The memory 103 is connected to the processor 104 and is used to store computer programs and transmit the programs to the processor 104. In other words, the processor 104 can call and run computer programs from the memory 103 to implement the method in the first embodiment of this application.

[0198] In some embodiments of this application, the processor 104 may include, but is not limited to:

[0199] General-purpose processors, digital signal processors (DSPs), application specific integrated circuits (ASICs), field programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, and so on.

[0200] In some embodiments of the present application, the memory 103 includes, but is not limited to: volatile memory and / or non-volatile memory. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), which is used as an external cache. By way of example but not limitation, many forms of RAM are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synch link dynamic random access memory (SLDRAM), and direct rambus random access memory (DRRAM).

[0201] In some embodiments of the present application, the computer program may be divided into one or more modules, and the one or more modules are stored in the memory 103 and executed by the processor 104 to complete the method of the first embodiment provided in the present application. The one or more modules may be a series of computer program instruction segments capable of performing specific functions, and the instruction segments are used to describe the execution process of the computer program in the head-mounted display device 100.

[0202] It should be understood that the various components in the head-mounted display device 100 are connected through a bus system. Among them, the bus system includes, in addition to the data bus, a power bus, a control bus, and a status signal bus.

[0203] Embodiment Four

[0204] The fourth embodiment of the present invention further provides a computer storage medium, on which a computer program is stored, and when the computer program is executed by the computer, the computer can execute the method in the first embodiment above.

[0205] The specific embodiments described above further elaborate on the purpose, technical solutions, and beneficial effects of the present invention. It should be understood that the above description is only for the specific embodiments of the present invention and is not used to limit the protection scope of the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principle of the present invention shall be included within the protection scope of the present invention.

Claims

1. A positioning method for large-space smart glasses, wherein a plurality of different texture images are arranged on the bottom surface or ceiling of the large space, and an image is collected by any camera on the smart glasses, and a texture image is identified from the image collected by the camera T, and image information corresponding to the texture image is obtained. The image information can be directly obtained by analyzing the texture image, or the ID of the texture image can be obtained, and the image information is matched in a comparison table locally stored in the smart glasses according to the ID; the characteristics are as follows: The image information includes the world position (XYZ) and graphic size (m, n) of the image; three corner anchor points (A, m, n) are arranged on the texture image and form an angle nAm, wherein the corner anchor point A is the vertex of the angle nAm, the world position of the corner anchor point A is defined as the world position (XYZ) of the image, the line An from A to the n corner anchor point is in the positive direction of the Y axis, the line Am from A to the m corner anchor point is in the positive direction of the X axis, the length of the line nA in the real world is n, and the length of the line Am in the real world is m; if the angle nAm is not 90 0 , then the image information also includes the angle nAm, which is used to convert the X-axis and Y-axis; According to the image information, we can get: the world position A(X A ,Y A ,Z A ), the world position m(X m ,Y m, Z m ) and the world position n(X n ,Y n ,Z n ), the X m =X A +m, Y m =Y A , X n =X A , Y n = Y A +n,Z m =Z n =Z A ; Get the pixel position P corresponding to the above corner anchor point mAn from the collected image A (X PA ,Y PA ), P m (X Pm ,Y Pm ) and P n (X Pn ,Y Pn ); The nine-axis geomagnetic chip of the smart glasses is used to obtain the pixel position P of the vertical ground or ceiling in the image captured by the camera. O (X Po ,Y Po ); Let the normal of camera T perpendicular to the bottom or ceiling and the line H connecting camera T to corner anchor point A be A The angle formed is , the line H between the normal of the camera T perpendicular to the bottom or ceiling and the camera T to the corner anchor point m m The angle formed is , the line H between the normal of the camera T perpendicular to the bottom or ceiling and the camera T to the corner anchor point n n The angle formed is ; The world position of camera T can be obtained through geometric calculation (X T ,Y T ,Z T ); The world position (X) of the camera T can be obtained by geometric calculation. T ,Y T ,Z T ), assuming that the texture image in the captured image is not deformed or has been corrected, the field of view FOV of the camera and the total number of pixels on the X axis of the screen X D , get the number of pixels per degree PPD=X D / FOV; the specific calculation steps are as follows: Step 1. Let the line Am from corner anchor point A to corner anchor point m be the X axis of the world space, and according to the pixel position P A and P m Calculate the slope S of the line Am X , then through point P X Point P A The X-axis is expressed by the straight line formula: Y=S X X+B X (6); The pixel position P A or P m Substituting into formula (6) we get B X ; Since the straight line P O P X Perpendicular to the X axis, pixel position P X The straight line P O P X Intersection with the X axis, perpendicular to the line P A P m The straight line P O P X The slope is -S X , expressed as: Y=-S X X+B XV (7); The pixel position P O (X Po ,Y Po ) into formula (7) to obtain B XV , so we can find the straight line P O P X The pixel position of the intersection with the X axis is P X (X PX ,Y PX ); Let An, the line connecting corner anchor point A to corner anchor point n, be the Y axis of the world space. A and P n Calculate the slope S of the connecting line An Y , then through point P Y Point P A The straight line is expressed by the formula: Y=S Y X+B Y (8); The pixel position P A or P n Substituting into formula (8) we get B Y; Since the straight line P O P Y Perpendicular to the Y axis, pixel position P Y The straight line P O P Y Intersection with the Y axis, perpendicular to the line P A P n The straight line P O P Y The slope is -S Y , expressed as: Y=-S Y X+B YV (9); The pixel position P O (X Po ,Y Po ) into formula (9) to obtain B YV , so we can find the straight line P O P Y The pixel position of the intersection with the Y axis is P Y (X PY ,Y PY ); Step 2. Use the Pythagorean theorem to calculate the pixel distance P X P A and P X P m ,but =P X P A / PPD =P X P m / PPD(3); Calculated by the following formula: (1); or (2); Use the Pythagorean theorem to calculate the pixel distance P Y P A and P Y P m ,but =P Y P A / PPD =P Y P n / PPD(3); Calculated by the following formula: (1); or (2); Step 3. Add the two Z obtained above T After averaging, we get the world position of camera T (X T ,Y T ,Z T ).

2. A positioning method for large-space smart glasses, wherein a plurality of different texture images are arranged on the bottom surface or ceiling of the large space, and an image is collected by any camera on the smart glasses, and a texture image is identified from the image collected by the camera T, and image information corresponding to the texture image is obtained. The image information can be directly obtained by analyzing the texture image, or the ID of the texture image can be obtained, and the image information is matched in a comparison table locally stored in the smart glasses according to the ID; the characteristics are as follows: The image information includes the world position (XYZ) and graphic size (m, n) of the image; three corner anchor points (A, m, n) are arranged on the texture image and form an angle nAm, wherein the corner anchor point A is the vertex of the angle nAm, the world position of the corner anchor point A is defined as the world position (XYZ) of the image, the line An from A to the n corner anchor point is in the positive direction of the Y axis, the line Am from A to the m corner anchor point is in the positive direction of the X axis, the length of the line nA in the real world is n, and the length of the line Am in the real world is m; if the angle nAm is not 90 0 , then the image information also includes the angle nAm, which is used to convert the X-axis and Y-axis; According to the image information, we can get: the world position A(X A ,Y A ,Z A ), the world position m(X m ,Y m, Z m ) and the world position n(X n ,Y n ,Z n ), the X m =X A +m, Y m =Y A , X n =X A , Y n = Y A +n,Z m =Z n =Z A ; Get the pixel position P corresponding to the above corner anchor point mAn from the collected image A (X PA ,Y PA ), P m (X Pm ,Y Pm ) and P n (X Pn ,Y Pn ); The nine-axis geomagnetic chip of the smart glasses is used to obtain the pixel position P of the vertical ground or ceiling in the image captured by the camera. O (X Po ,Y Po ); Let the normal of camera T perpendicular to the bottom or ceiling and the line H connecting camera T to corner anchor point A be A The angle formed is , the line H between the normal of the camera T perpendicular to the bottom or ceiling and the camera T to the corner anchor point m m The angle formed is , the line H between the normal of the camera T perpendicular to the bottom or ceiling and the camera T to the corner anchor point n n The angle formed is ; The world position of camera T can be obtained through geometric calculation (X T ,Y T ,Z T ); The world position (X) of the camera T can be obtained by geometric calculation. T ,Y T ,Z T ), assuming that the texture image in the captured image has been deformed due to the camera angle problem, calculate the angle ( , , ): The three corner anchor points are all square positioning images. The angle of the upper half image of the positioning pattern of each corner anchor point is measured, and the largest angle is selected as , then the angle formed by the normal of camera T perpendicular to the ground or ceiling and the line connecting camera T to the corner anchor point is: (4); The angle ( , , ); First, use the Pythagorean theorem to get the following six formulas: ; Then the above six formulas are combined to calculate the world position T(X T ,Y T ,Z T ) function formula: (5)。 3. A method for positioning large-space smart glasses according to any one of claims 1 or 2, characterized in that: The world positions of multiple cameras T are averaged or converted according to the known positional relationship of multiple cameras to obtain the world position of the head-mounted display device / smart glasses; the player's head-mounted display device / smart glasses broadcasts its own world position together with the current game status data to other players in the large space in real time.

4. A method for positioning large-space smart glasses according to any one of claims 1 or 2, characterized in that: The bottom surface of the large space refers to the ground, steps, walls or tabletop of the large space.

5. The positioning method of large-space smart glasses according to claim 1, characterized in that: The three corner anchor points of the texture image may be positioning patterns without information or independent small texture images. The image information corresponding to the small texture image includes the world position of the small texture image itself and the size of the small texture image.

6. A method for positioning large-space smart glasses according to any one of claims 1 or 2, characterized in that: The image information of the texture image also includes a space region name for distinguishing a virtual space in a large space.

7. A method for positioning large-space smart glasses according to any one of claims 1 or 2, characterized in that: The image information of the texture image further includes: distance information p or q to adjacent texture images, that is, the distance p to the adjacent texture image in the positive direction of the X axis and the distance q to the adjacent texture image in the positive direction of the Y axis.

8. A head mounted display device, characterized in that: The head display device includes a camera, a display, a memory and a processor; The camera is connected to the processor and is used to scan the real environment where the user is located; The display is connected to the processor and is used to display the output content of the processor; The memory is connected to the processor and is used to store the computer program; The processor is used to execute the computer program to implement the positioning method of large-space smart glasses in any one of claims 1 to 7.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the computer program implements the positioning method of large-space smart glasses according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Information synchronization method and device

    CN109364480A

  • Image processing method and device, equipment and storage medium

    CN116168076A