Image coordinate system alignment method and system based on 3D recognition
By creating coordinate systems for parent and child objects, and performing coordinate system alignment and height correction, the error problem in the height direction in 3D object recognition is solved, achieving accurate alignment between the virtual environment and the real environment, and improving the user experience.
Patent Information
- Application Number
- CN202511461871.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-14
- Publication Date
- 2025-12-09
- Estimated Expiration
- 2045-10-14
AI Technical Summary
In the process of 3D object recognition, spatial position registration errors in the height direction cause the virtual environment to not overlap with the real environment, affecting the user experience, especially causing dizziness and interaction failure.
By creating parent and child object coordinate systems, a stable world coordinate system is constructed using 2D identifier maps and an AR engine. Coordinate system alignment and localized correction of height dimensions are performed, and precise adjustments are made using sensor data from various devices.
It achieves a high degree of consistency of virtual objects across different devices, reduces screen jitter, and enhances user experience and immersion.
Smart Images

Figure CN120953358B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of coordinate system alignment, and particularly relates to an image coordinate system alignment method and system based on 3D recognition. BACKGROUND
[0002] In the process of anchoring users from the physical world to virtual reality or augmented reality experience by taking 3D object recognition as an entry, a key technical problem is generally faced, that is, spatial position registration error, and the deviation in the height direction is particularly significant, which seriously affects the user experience. After the user or the device enters the virtual environment, the phenomenon that the virtual ground does not coincide with the real ground often occurs, resulting in the abnormal state that the virtual object is suspended in the air or sinks into the ground.
[0003] The problem is mainly caused by the drift of sensor accuracy. Since the determination of the device height depends on the barometer and the accelerometer, both of which have inherent errors, the accelerometer is prone to significant drift when performing double integration operation of displacement; the barometer is highly sensitive to environmental pressure changes, which causes the height estimation value to fluctuate continuously, and finally causes spatial misplacement. During the movement of the user, the misplacement in the height direction will cause strong dizziness, mode penetration, interaction failure and other problems, which seriously damages the immersion and comfort of use. Therefore, an effective method is needed to solve the adverse effects caused by the inconsistency of the height of users. SUMMARY
[0004] The purpose of the present application is to provide an image coordinate system alignment method and system based on 3D recognition, which solves the above technical problems.
[0005] The purpose of the present application can be achieved by the following technical solutions:
[0006] An image coordinate system alignment method and system based on 3D recognition, comprising the following steps:
[0007] S1: Let device A scan a 2D identification map to construct a coordinate system and mark it as a parent object coordinate system, and the origin of the parent object coordinate system is located at the center of the 2D identification map;
[0008] A coordinate system is constructed again with device A as the origin and marked as a child object coordinate system, wherein the direction of the X-axis in the child object coordinate system is the same as that of the parent object coordinate system, and the child object coordinate system is adjusted based on the X-axis of the child object coordinate system;
[0009] S2: Obtain the coordinates P A (x A , y A , z A ) of the origin of the child object coordinate system in the parent object coordinate system, mark y A as a virtual longitudinal coordinate, and let the virtual longitudinal coordinate yA =0;
[0010] Add device B and generate the corresponding coordinate P by the above method B (x B , y B , z B ), record y B as virtual longitudinal coordinate;
[0011] S3: Let device B exchange coordinates with device A, and after device B obtains the coordinates of device A, construct a virtual device a corresponding to device A in the parent object coordinate system, the coordinate P of the virtual device a is a (x A , 0, z A );
[0012] Let device B detect the actual height H of the current device, calculate the deviation value L=H-y B , adjust the position of the virtual device a based on the deviation value L, and the adjusted virtual device a is at the correct height in the perspective of device B, repeat the above steps to generate a virtual device b corresponding to device B in the perspective of device A;
[0013] S4: Record device A as the device main body and obtain the current actual height H A , obtain the height XH of the virtual device b in the perspective of device A B , calculate the scaling ratio L=H A / XH B , correct the height XH of the virtual device b in the perspective of device A B , record the corrected height as the corrected height X B =L×XH B , scale the height of the virtual device b to X B , by the above method, record device A as the device main body, and scale the height of the virtual device a.
[0014] As a further scheme of the application: in the step S3, the method of adjusting the position of the virtual device a based on the deviation value L comprises:
[0015] If the deviation value L>0, move the virtual device a upward by L unit length;
[0016] If the deviation value L=0, stop adjusting the virtual device a;
[0017] If the deviation value L<0, move the virtual device a downward by |L| unit length.
[0018] As a further scheme of the application: in the step S1, the method of adjusting the child object coordinate system based on the X-axis of the child object coordinate system comprises:
[0019] The X-axis of the child object coordinate system is recorded as a rotation axis, and the child object coordinate system is rotated clockwise around the rotation axis, and the rotation is stopped when the Y-axis of the child object coordinate system is in the same direction as the Y-axis of the parent object coordinate system.
[0020] As a further scheme of the present application: in the step S2, the corresponding coordinate P B (x B , y B , z B ) of the device B is ensured to satisfy the constraint condition .
[0021] As a further scheme of the present application: in the step S2, the corresponding coordinate P A of the device A and the coordinate P B of the device B are both obtained in the parent object coordinate system.
[0022] As a further scheme of the present application: in the step S3, the method for exchanging the coordinates between the device B and the device A comprises:
[0023] After the device B sends the coordinates, a timer is started, and after the device A receives the coordinate P B (x B , y B , z B ), the device B sends a preset data frame to the device A, and if the device B receives the data frame within a preset waiting time T, the subsequent steps are continued, and if the device B does not receive the data frame, the subsequent steps are stopped and the device B re-sends the coordinate P B (x B , y B , z B ).
[0024] As a further scheme of the present application: a test threshold N is preset, and when the number of times of re-sending the coordinate P B (x B , y B , z B ) by the device B exceeds the test threshold N, the sending is stopped, and the user is prompted of a device failure.
[0025] A 3D recognition-based image coordinate system alignment system, comprising:
[0026] A positioning module: the device A scans a 2D identification image to construct a coordinate system and record it as a parent object coordinate system, and the origin of the parent object coordinate system is located at the center of the 2D identification image;
[0027] A coordinate system is constructed again with the device A as the origin and recorded as a child object coordinate system, wherein the direction of the X-axis of the child object coordinate system is the same as the direction of the X-axis of the parent object coordinate system, and the child object coordinate system is adjusted based on the X-axis of the child object coordinate system.
[0028] Virtual device module: get the coordinate P of the origin of the coordinate system of the sub-object in the coordinate system of the parent object A (x A , y A , z A ), let y A be the virtual longitudinal coordinate, and let the virtual longitudinal coordinate y A = 0
[0029] Add device B and generate the corresponding coordinate P B (x B , y B , z B ) by the above method, and let y B be the virtual longitudinal coordinate
[0030] Adjustment module: let device B exchange coordinates with device A, and when device B obtains the coordinates of device A, construct a virtual device a corresponding to device A in the coordinate system of the parent object, and the coordinate P a (x A , 0, z A ) of the virtual device a
[0031] Let device B detect the actual height H of the current device, calculate the deviation value L = H - y B , and adjust the position of the virtual device a based on the deviation value L, so that the virtual device a in the perspective of device B is at the correct height, and repeat the above steps to generate a virtual device b corresponding to device B in the perspective of device A
[0032] Scaling module: let device A be the device main body and obtain the current actual height H A , get the height XH B of the virtual device b in the perspective of device A, calculate the scaling ratio L = H A / XH B , correct the height XH B of the virtual device b in the perspective of device A, let the corrected height be the corrected height X B =L×XH B , scale the height of the virtual device b to X B , and by the above method, let device A be the device main body and scale the height of the virtual device a
[0033] The beneficial effects of the present application are as follows: firstly, the first step is to create an independent parent object coordinate system and a child object coordinate system, and the difference between the two needs to be noted: the parent object coordinate system is a transformation node dynamically instantiated by the application according to the recognition result returned by the AR engine when the device recognizes the preset 2D identification image. The position and rotation of the node are set to the world coordinates indicated by the recognition result, and are generally kept static thereafter. In this coordinate system, the X-axis and Z-axis coordinates can be accurately expressed, but the Y-axis coordinate cannot be accurately measured; and the child object coordinate system is directly driven by the underlying AR engine, and its transformation relationship reflects the six-degree-of-freedom pose of the device camera in the real physical space in real time, so that the Y-axis coordinate can be more accurately obtained, but the X-axis and Z-axis coordinates cannot be accurately obtained. This step is the basis for all subsequent processing. Decouple the high-precision absolute height data source from the high-precision relative horizontal data source. The 3D coordinate system is responsible for providing a reliable vertical dimension reference, and the 2D coordinate system serves as a stable parent container for all content based on the identification image, ensuring that the relative layout relationship between virtual objects is accurate.
[0034] The second step is the horizontal alignment of different coordinate systems. When initializing the coordinate system, the rotation setting in the world space is strictly aligned with the direction of the identification image. This operation ensures that the X-axis and Z-axis directions in all clients are consistent with the direction of the world space, which means that front, back, left, and right are unified in the cognition of all users, providing a common semantic basis for exchanging relative position data in the horizontal direction between different users and eliminating directional ambiguity.
[0035] Then the data is sent through the network, and only reliable data dimensions measured in the reliable coordinate system are transmitted between the network, avoiding the transmission of errors from the communication source. Converting objects from a local coordinate system to a world coordinate system is a key preparatory step. Switching the positioning reference of the object from a local coordinate system that may drift as a whole to a globally stable world coordinate system creates conditions for separately correcting errors in a certain dimension in the next step.
[0036] Finally, the height dimension is localized and corrected. Under the premise that the virtual object is in the world coordinate system, the program reads the high-precision ground height value provided by the local AR engine. Then, the program only retains the accurate X and Z components of the virtual object world coordinates, and directly covers the local real height value with the Y component. At this time, the horizontal position is accurate, and only the height needs to be adjusted. In summary, by authorizing each device to use its most reliable sensor data to ultimately determine the presentation in the vertical direction, the problem of inconsistent height in the shared space caused by device differences and recognition errors is solved. By scaling the height of the virtual device, all virtual devices in the user's perspective are fixed at the same height as the user, thereby reducing the picture jitter caused by height differences and greatly improving the user experience. Attached Figure Description
[0037] The invention will now be further described with reference to the accompanying drawings.
[0038] Figure 1 This is a flowchart illustrating an image coordinate system alignment method and system based on 3D recognition according to the present invention. Detailed Implementation
[0039] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0040] Please see Figure 1 As shown, the present invention is an image coordinate system alignment method and system based on 3D recognition, comprising the following steps:
[0041] S1: Have device A scan the 2D marker image to construct a coordinate system and record it as the parent object coordinate system. The origin of the parent object coordinate system is located at the exact center of the 2D marker image.
[0042] A coordinate system is reconstructed with device A as the origin and denoted as the sub-object coordinate system. The direction of the X-axis in the sub-object coordinate system is the same as the direction of the X-axis in the parent object coordinate system. The sub-object coordinate system is adjusted based on the X-axis of the sub-object coordinate system.
[0043] S2: Get the coordinates P of the origin of the child object's coordinate system in the parent object's coordinate system. A (x) A y A , z A ), will y A Let y be the virtual ordinate. A =0;
[0044] Add device B and generate its corresponding coordinates P using the method described above. B (x) B y B , z B ), will y B Let it be denoted as a virtual ordinate;
[0045] S3: Let device B and device A exchange coordinates. After device B obtains the coordinates of device A, it constructs a virtual device a corresponding to device A in the parent object's coordinate system. The coordinates of virtual device a are P. a (x) A ,0,z A );
[0046] Have device B detect the actual height H of the current device and calculate the deviation value L=Hy B The position of virtual device a is adjusted based on the deviation value L. After adjustment, virtual device a has the correct height in the view of device B. Repeat the above steps to generate virtual device b corresponding to device B in the view of device A.
[0047] S4: Designate device A as the main body of the device and obtain its current actual height H. A Obtain the height XH of virtual device b from the perspective of device A. B Calculate the scaling ratio L=H A / XH B The height XH of virtual device b from the perspective of device A B Make corrections, and record the corrected height as the corrected height X. B =L×XH B Scale the height of virtual device b to X B Using the above method, device A is designated as the main device, and the height of the virtual device a is scaled.
[0048] It's important to note that the first step is to create a parent object coordinate system and a child object coordinate system. The parent object coordinate system dynamically instantiates a dedicated transformation node by recognizing a pre-defined 2D marker image and based on the detailed recognition results returned by the AR engine. The position and rotation angle of this transformation node are set to the world coordinates explicitly indicated by the recognition results. Once this initialization is complete, this node typically remains relatively static during subsequent operation unless there is special intervention or update requirement. It's worth noting that the X and Z axes can be expressed relatively accurately within this specific coordinate system. This is because, based on the recognition of the 2D plane, combined with relevant mathematical models and algorithms, the position information of the object in these two directions can be reliably determined. However, due to the limitations of the 2D marker image itself and the physical limitations of the acquisition device, the Y-axis coordinate cannot be accurately measured. In other words, there is some uncertainty in the position information in the vertical direction, which may affect some applications with high precision requirements.
[0049] The child object coordinate system is directly driven by the powerful AR engine of the bottom layer, and has high real-time and dynamic. Its transformation relationship can reflect the six degrees of freedom pose of the device camera in the real physical space in real time and accurately. The so-called six degrees of freedom includes translation along three coordinate axes (X, Y, Z) and rotation around the three coordinate axes. Thanks to this real-time tracking and feedback mechanism, the child object coordinate system can accurately obtain the Y-axis coordinate, providing strong support for positioning in the vertical direction. On the other hand, due to its dependence on the camera's view angle and motion state, the X-axis and Z-axis coordinates cannot be accurately obtained as the parent object coordinate system. This is because the change of the camera's view angle will cause projection distortion and other problems, resulting in certain errors in the measurement of the horizontal and depth directions.
[0050] Next, the horizontal alignment operation of different coordinate systems will be carried out. The purpose is to ensure the consistency of subsequent data and the accuracy of interaction. This operation provides a unified and standardized reference for all clients. In this common coordinate system framework, the directions of its X-axis and Z-axis are consistent with the directions of the world space. From the perspective of practical application, this feature makes it possible to exchange relative position data in the horizontal direction between different users. In the past system, due to the lack of such unified standards, the position information transmitted between different users is often ambiguous. The horizontal alignment operation of different coordinate systems is an indispensable part of the whole system, which takes accurate direction definition as the cornerstone and builds a unified, efficient and stable interaction environment, providing strong guarantee for the smooth development of subsequent complex applications.
[0051] After completing the previous coordinate system construction and horizontal alignment, the next step is to transmit data through the network. In the complex AR system running environment, there are various factors that may cause data distortion, such as device performance differences, environmental interference, and noise in the signal transmission process. If all unfiltered and processed data is put into the network for transmission, these potential errors will spread like viruses throughout the system, seriously affecting the accuracy of the final results.
[0052] Converting the object from the local coordinate system to the world coordinate system is a key preparatory step in this series of operations, which is of great significance and importance. The local coordinate system is often limited by a specific scene or device and is prone to overall drift. The local coordinate system established under a specific device view may be offset due to the device's slight movement, vibration, or accumulated error over a long period of time. This drift not only affects the accurate positioning of the current object, but also has a chain reaction on the subsequent calculations and operations related to it, greatly reducing the reliability of the entire system.
[0053] When switching the positioning reference of the object from such a potentially globally drifting local coordinate system to a globally stable world coordinate system, the world coordinate system serves as a global reference frame with high stability and consistency. It is not affected by individual device or local environmental changes, providing a unified and reliable positioning foundation for the object.
[0054] Finally, a height dimension local correction is made. At this point, the virtual object is already in a stable and unified world coordinate system, providing an ideal foundation framework for subsequent height adjustment. In this critical stage, the program actively reads the ground height value provided by the local AR engine with high confidence. The "high confidence" here is based on the reliability guarantee given by the advanced algorithms and rich practical experience of the AR engine. Through the analysis and processing of a large amount of environmental data, combined with multi-sensor information fusion technology, the engine can accurately capture the height information of the ground in the real world.
[0055] Next, the program performs a delicate and critical operation: only the X and Z components of the virtual object's world coordinates that have been accurately determined are retained. The reason for this is that in the previous steps, through a series of rigorous calibration and alignment operations, the X and Z direction positions have been determined to a very high level of accuracy, and continuing to use these values can ensure the accuracy of the horizontal position is not disturbed. As for the Y component, which represents the height dimension, the program will directly overwrite it with the local real height value.
[0056] The reason for adopting such a strategy is that the horizontal position has already reached an accurate state through the previous multiple safeguards, and the only dimension that needs further optimization and adjustment is the height dimension. This targeted approach not only makes full use of the existing accurate information, but also avoids unnecessary complex calculations and potential errors. More importantly, by authorizing each device to use its most reliable sensor data to finally determine the vertical presentation, the system cleverly solves the long-standing problem of inconsistent height in shared space caused by device differences, recognition errors, and other factors. Different devices may have different hardware configurations, manufacturing processes, and usage environments, which may affect the performance of their built-in sensors. Some devices may have more sensitive gyroscopes, while others may have more accurate accelerometers. By allowing each device to provide the most reliable height data based on its own strengths, the system can fully utilize the potential of each device and achieve complementary advantages.
[0057] In summary, the highly dimensional local correction as the last step of the entire AR system, by skillfully using the sensor advantages of each device, realizes the accurate presentation in the vertical direction, provides a unified and real shared space for cross-device AR applications, greatly expands the application scenarios and user experience of AR technology. And by scaling the virtual device height, the user's perspective is unified to the same height as itself, effectively eliminating the picture jitter caused by height difference. Visually, the virtual device is at the same horizontal line, the relationship is clear, and the presentation is harmonious and beautiful. In terms of user experience, the interaction is smoother, the operation is less disturbed, the immersion is enhanced, and the viewing is not abrupt.
[0058] In another preferred embodiment of the application, the method for adjusting the position of the virtual device a based on the deviation value L includes:
[0059] If the deviation value L>0, move the virtual device a upward by L unit length;
[0060] If the deviation value L=0, stop adjusting the virtual device a;
[0061] If the deviation value L<0, move the virtual device a downward by |L| unit length.
[0062] And it is worth noting that by calculating the deviation value L in real time, automatic and adaptive height calibration is realized. Support for two-way adjustment up and down covers all possible error scenarios. When L=0, the automatic locking state is avoided to avoid unnecessary disturbance. With unit length as the step, the adjustment amount is strictly matched with the error to improve the positioning accuracy.
[0063] In another preferred embodiment of the application, the method for adjusting the position of the virtual device a based on the deviation value L includes:
[0064] The X-axis of the sub-object coordinate system is recorded as the rotation axis, and the sub-object coordinate system is rotated clockwise around the rotation axis, and the rotation is stopped when the Y-axis of the sub-object coordinate system is in the same direction as the Y-axis of the parent object coordinate system.
[0065] It can be understood that the horizontal alignment operation of different coordinate systems is performed. The purpose is to ensure the consistency of subsequent data and the accuracy of interaction. This operation provides a unified and standardized reference for all clients. In this common coordinate system framework, the directions of its X-axis and Z-axis are consistent with the directions of the world space. From the perspective of practical application, this feature makes it possible to exchange relative position data in the horizontal direction between different users.
[0066] In another preferred embodiment of the application, when adding device B, the corresponding coordinates P B (x B , y B , z B) meet the constraint condition .
[0067] It should be noted that the device A and the device B are avoided from appearing in the same position, thereby causing system errors.
[0068] In another preferred embodiment of the present application, the device A and the device B correspond to the coordinate P A and the coordinate P B are obtained in the parent object coordinate system.
[0069] It should be noted that the positioning reference of the object is switched from such a local coordinate system which may drift as a whole to the world coordinate system which is globally stable. The world coordinate system serves as a global reference framework and has high stability and consistency. It is not affected by individual devices or local environmental changes and provides a unified and reliable positioning basis for the object.
[0070] In another preferred embodiment of the present application, the method for exchanging the coordinates between the device B and the device A comprises:
[0071] After the device B sends the coordinates, a timer is started. When the device A receives the coordinates P B (x B , y B , z B ), a preset data frame is sent to the device B. If the device B receives the data frame within a preset waiting time T, subsequent steps are continued. If the device B does not receive the data frame, the subsequent steps are stopped and the device B re-sends the coordinates P B (x B , y B , z B ).
[0072] In a preferred case of the present embodiment, a test threshold N is preset. When the number of times of re-sending the coordinates P B (x B , y B , z B ) by the device B exceeds the test threshold N, the sending is stopped, and the user is prompted of a device failure.
[0073] A 3D recognition-based image coordinate system alignment system comprises:
[0074] A positioning module: the device A scans a 2D identification map to construct a coordinate system and mark it as a parent object coordinate system. The origin of the parent object coordinate system is located at the center of the 2D identification map.
[0075] A coordinate system is constructed again with the device A as the origin and marked as a child object coordinate system. The direction of the X axis in the child object coordinate system is the same as that in the parent object coordinate system. The child object coordinate system is adjusted based on the X axis of the child object coordinate system.
[0076] Virtual device module: get the coordinate P of the coordinate system origin of the sub-object in the coordinate system of the parent object A (x A , y A , z A ), take y A as the virtual longitudinal coordinate, and let the virtual longitudinal coordinate y A =0
[0077] Add device B and generate the corresponding coordinate P B (x B , y B , z B ) by the above method, take y B as the virtual longitudinal coordinate
[0078] Adjustment module: let device B exchange coordinates with device A, and construct the virtual device a corresponding to device A in the coordinate system of the parent object after device B obtains the coordinates of device A, the coordinate P a (x A , 0, z A ) of the virtual device a
[0079] Let device B detect the actual height H of the current device, calculate the deviation value L=H-y B , and adjust the position of the virtual device a based on the deviation value L, so that the virtual device a is at the correct height in the perspective of device B, and repeat the above steps to generate the virtual device b corresponding to device B in the perspective of device A
[0080] Scaling module: take device A as the device main body and obtain the current actual height H A , get the height XH B of the virtual device b in the perspective of device A, calculate the scaling ratio L=H A / XH B , correct the height XH B of the virtual device b in the perspective of device A, take the corrected height as the corrected height X B =L×XH B , scale the height of the virtual device b to X B , and by the above method, take device A as the device main body and scale the height of the virtual device a
[0081] The above describes one embodiment of the present application in detail, but the content described is only the preferred embodiment of the present application and cannot be considered as limiting the scope of the present application. Any equivalent changes and improvements made within the scope of the present application should still be within the scope of the present application.
Claims
1. A 3D recognition based image coordinate system alignment method, characterized in that, The method comprises the following steps: S1: let device A scan a 2D identification map to build a coordinate system and mark it as a parent object coordinate system, and the origin of the parent object coordinate system is located at the center of the 2D identification map; A coordinate system is built again with device A as the origin and marked as a child object coordinate system, wherein the direction of the X-axis of the child object coordinate system is the same as that of the X-axis of the parent object coordinate system, and the method for adjusting the child object coordinate system based on the X-axis of the child object coordinate system comprises: mark the X-axis of the child object coordinate system as a rotation axis, let the child object coordinate system rotate clockwise around the rotation axis, and stop rotating when the Y-axis of the child object coordinate system is in the same direction as the Y-axis of the parent object coordinate system; S2: Obtain the coordinate P of the origin of the child object coordinate system in the parent object coordinate system A (x A , y A , z A ), record y A as a virtual longitudinal coordinate, and let the virtual longitudinal coordinate y A = 0; Add device B and generate the corresponding coordinates P by the above method B (x B , y B , z B ), and let y B be the virtual longitudinal coordinate; S3: Let device B and device A exchange coordinates. After device B obtains the coordinates of device A, it constructs a virtual device a corresponding to device A in the parent object's coordinate system. The coordinates of virtual device a are P. a (x) A ,0,z A ); Let the device B detect the actual height H of the current device, calculate the deviation value L = H - y B The method for adjusting the position of the virtual device a based on the deviation value L includes: if the deviation value L>0, move the virtual device a upward by L unit lengths; if the deviation value L=0, stop adjusting the virtual device a; if the deviation value L<0, move the virtual device a downward by |L| unit lengths; the adjusted virtual device a is in the correct height in the visual angle of device B, and the above adjustment method is repeated to generate a virtual device b corresponding to device B in the visual angle of device A; S4: Designate device A as the main body of the device and obtain its current actual height H. A Obtain the height XH of virtual device b from the perspective of device A. B Calculate the scaling ratio L=H A / XH B The height XH of virtual device b from the perspective of device A B Make corrections, and record the corrected height as the corrected height X. B =L×XH B Scale the height of virtual device b to X B Using the above method, device A is designated as the main device, and the height of the virtual device a is scaled.
2. The 3D recognition based image coordinate system alignment method of claim 1, wherein, In said step S2, the addition of the device B ensures that the corresponding coordinates P B (x B , y B , z B ) satisfy the constraint condition .
3. The 3D recognition based image coordinate system alignment method of claim 1, wherein, In the step S2, the device A and the device B correspond to the coordinates P A and the coordinates P B are all in the parent object coordinate system.
4. The 3D recognition based image coordinate system alignment method of claim 1, wherein, in the step S3, the method for exchanging coordinates between device B and device A comprises: Device B sends the coordinates and starts a timer, and when device A receives the coordinates P B (x B , y B , z B ) sends a preset data frame to device B, and if device B receives the data frame within a preset waiting time T, it continues to execute the subsequent steps, and if it does not receive the data frame, it stops the subsequent steps and causes device B to resend the coordinates P B (x B , y B , z B ).
5. The 3D recognition based image coordinate system alignment method of claim 4, wherein, Pre-set a test threshold N, when device B re-sends the coordinates P B (x B , y B , z B ) more than the test threshold N, stop sending, and prompt the user device failure.
6. A 3D recognition based image coordinate system alignment system, characterized in that, comprise: the positioning module: let device A scan a 2D identification map to build a coordinate system and mark it as a parent object coordinate system, and the origin of the parent object coordinate system is located at the center of the 2D identification map; A coordinate system is built again with device A as the origin and marked as a child object coordinate system, wherein the direction of the X-axis of the child object coordinate system is the same as that of the X-axis of the parent object coordinate system, and the method for adjusting the child object coordinate system based on the X-axis of the child object coordinate system comprises: mark the X-axis of the child object coordinate system as a rotation axis, let the child object coordinate system rotate clockwise around the rotation axis, and stop rotating when the Y-axis of the child object coordinate system is in the same direction as the Y-axis of the parent object coordinate system; Virtual device module: get the coordinate P of the coordinate system origin of the child object in the coordinate system of the parent object A (x A , y A , z A ), record y A as a virtual longitudinal coordinate, and let the virtual longitudinal coordinate y A =0; Add device B and generate the corresponding coordinates P by the above method B (x B , y B , z B ), and let y B be the virtual longitudinal coordinate; Adjusting module: let device B exchange coordinates with device A, when device B gets the coordinates of device A, construct a virtual device a corresponding to device A in the parent object coordinate system, the coordinates P a (x A , 0, z A ) of virtual device a; Let the device B detect the actual height H of the current device, calculate the deviation value L = H - y B The method for adjusting the position of the virtual device a based on the deviation value L includes: if the deviation value L>0, move the virtual device a upward by L unit lengths; if the deviation value L=0, stop adjusting the virtual device a; if the deviation value L<0, move the virtual device a downward by |L| unit lengths; the adjusted virtual device a is in the correct height in the visual angle of device B, and the above adjustment method is repeated to generate a virtual device b corresponding to device B in the visual angle of device A; Scaling module: Designates device A as the main body of the device and obtains its current actual height H. A Obtain the height XH of virtual device b from the perspective of device A. B Calculate the scaling ratio L=H A / XH B The height XH of virtual device b from the perspective of device A B Make corrections, and record the corrected height as the corrected height X. B =L×XH B Scale the height of virtual device b to X B Using the above method, device A is designated as the main device, and the height of the virtual device a is scaled.
Citation Information
Patent Citations
Encircling and tracking method based on distributed control unmanned surface vessel cluster
CN107608347A
Augmented reality display with frame modulation functionality
CN112567287A