Laser ranging method, device and equipment and storage medium

By setting up a laser-ToF sensor and an IMU sensor in the headset and combining the data from the laser-ToF sensor and the IMU sensor, the problem of decreased accuracy of the laser rangefinder due to shaking or vibration is solved, and high-precision ranging is achieved in complex scenes.

CN120779412APending Publication Date: 2025-10-14GEER INTELLIGENT TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510897944.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-30
Publication Date
2025-10-14

AI Technical Summary

Technical Problem

During the measurement process, the laser rangefinder is shaken or vibrated, resulting in a decrease in distance measurement accuracy.

Method used

A laser-ToF sensor and an IMU sensor are set up in the headset to measure distance through the headset. The laser-ToF sensor is used to obtain the distance value between the initial position and the target position, and the IMU sensor is used to obtain the changing angle of the headset when the user turns. The target distance value is determined by combining the data of the two, avoiding the smooth operation of the headset in complex scenarios.

Benefits of technology

The distance measurement accuracy is improved, users can free their hands in complex scenes, avoid laser interruption, and are not affected by the shaking or vibration of the headset, achieving high-precision non-contact distance measurement.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120779412A_ABST
    Figure CN120779412A_ABST
Patent Text Reader

Abstract

The invention discloses a laser ranging method and device, equipment and a storage medium, and relates to the technical field of intelligent wearable equipment, the method is applied to a control unit of an earphone, the earphone is also provided with a laser-ToF sensor and an IMU sensor, and the method comprises the steps: obtaining a first distance value between the earphone and an initial position, the first distance value is acquired by the laser-ToF sensor in response to a first distance measurement instruction, and the first distance measurement instruction is an instruction issued after an initial position is calibrated; a second distance value between the earphone and the target position and a change angle of the earphone when the user rotates are acquired, the second distance value is acquired by the laser-ToF sensor in response to a second distance measurement instruction, the change angle is acquired by the IMU sensor in response to the second distance measurement instruction, and the second distance measurement instruction is an instruction issued after the target position is calibrated; and determining a target distance value between the initial position and the target position based on the first distance value, the second distance value and the change angle so as to improve the distance measurement precision.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of smart wearable devices, and in particular to laser ranging methods, devices, equipment and storage media. Background Art

[0002] Laser ranging is a technology that uses the high directionality and high monochromaticity of lasers to calculate distance by measuring the time difference or phase difference from the emission to the return of the laser.

[0003] To enable users to use laser rangefinders in complex scenarios such as high altitudes and confined spaces, they are typically configured as head-mounted laser rangefinders. During the measurement process, the head-mounted laser rangefinder captures the three-dimensional scene of the object being measured and then determines the length of the object by marking the locations of two measurement points within the 3D scene. However, if the laser rangefinder is shaken or vibrated during the measurement process, the captured three-dimensional scene will contain significant errors, resulting in reduced distance measurement accuracy.

[0004] The above content is only used to assist in understanding the technical solution of this application and does not constitute an admission that the above content is prior art. Summary of the Invention

[0005] The main purpose of this application is to provide a laser ranging method, which aims to solve the technical problem that the ranging accuracy of the laser rangefinder decreases due to shaking or vibration during the measurement process.

[0006] To achieve the above objectives, the present application proposes a laser ranging method, which is applied to the control unit of an earphone. The earphone is also provided with a laser-ToF (Time of Flight) sensor and an IMU (Inertial Measurement Unit) sensor. The method includes:

[0007] Acquire a first distance value between the headset and an initial position, where the first distance value is acquired by the laser-ToF sensor in response to a first distance measurement instruction, where the first distance measurement instruction is issued after the initial position is calibrated;

[0008] Obtaining a second distance value between the headset and the target position and a change angle of the headset when the user rotates the headset, where the second distance value is collected by the laser-ToF sensor in response to a second ranging instruction, and the change angle is collected by the IMU sensor in response to the second ranging instruction, where the second ranging instruction is issued after the target position is calibrated;

[0009] A target distance value between the initial position and the target position is determined based on the first distance value, the second distance value, and the change angle.

[0010] In one embodiment, the step of obtaining a change angle of the headset when the user rotates includes:

[0011] When the user turns from the direction of the initial position to the direction of the target position, the angular velocity and acceleration of the headset when the user turns, which are collected by the IMU sensor in response to the second ranging instruction, are obtained; based on the angular velocity, an angle change value of the headset is determined; and based on the acceleration, an angle compensation is performed on the angle change value to obtain a change angle of the headset when the user turns.

[0012] In one embodiment, the step of performing angle compensation on the angle change value based on the acceleration to obtain the change angle of the headset when the user rotates includes:

[0013] determining a roll angle and a pitch angle of the headset based on the acceleration;

[0014] Based on the roll angle and the pitch angle, angle compensation is performed on the angle change value to obtain a change angle of the headset when the user rotates.

[0015] In one embodiment, the step of determining the roll angle and pitch angle of the headset based on the acceleration further includes:

[0016] Decomposing the acceleration along the preset coordinate axes to obtain X-axis acceleration, Y-axis acceleration, and Z-axis acceleration;

[0017] determining a roll angle of the headset based on the X-axis component acceleration and the Y-axis component acceleration;

[0018] A pitch angle of the headset is determined based on the X-axis component acceleration, the Y-axis component acceleration, and the Z-axis component acceleration.

[0019] In one embodiment, the earphone includes a left-channel earphone and a right-channel earphone, and the step of determining a target distance value between the initial position and the target position based on the first distance value, the second distance value, and the change angle includes:

[0020] determining a first target distance value between the initial position measured by the left-channel earphone and the target position based on the first distance value, the second distance value, and the change angle measured by the left-channel earphone;

[0021] determining a second target distance value between the initial position measured by the right channel earphone and the target position based on the first distance value, the second distance value, and the change angle measured by the right channel earphone;

[0022] Cross-validate the first target distance value and the second target distance value to determine a target distance value between the initial position and the target position.

[0023] In one embodiment, before the step of obtaining the first distance value between the earphone and the initial position, the method further includes:

[0024] Calibrate and measure the distance of a preset reference object to obtain the laser measured length of the reference object;

[0025] Determining whether the measured distance meets a preset accuracy range;

[0026] If not, obtaining the caliper-measured length of the reference object, wherein the caliper-measured length satisfies the preset accuracy range;

[0027] The laser measured length is updated using the caliper measured length, and the first distance value is obtained after calibration is completed.

[0028] In one embodiment, the earphone is further provided with a voice module;

[0029] After obtaining the first distance value between the earphone and the initial position, or during the process of the laser-ToF sensor collecting the second distance value, or after determining the target distance value between the initial position and the target position, the corresponding voice prompt is broadcast based on the voice module.

[0030] In addition, to achieve the above-mentioned purpose, the present application also proposes a laser ranging device, which includes:

[0031] a first acquiring module, configured to acquire a first distance value between the headset and an initial position, where the first distance value is acquired by the laser-ToF sensor in response to a first distance measurement instruction, where the first distance measurement instruction is issued after the initial position is calibrated;

[0032] a second acquisition module, configured to acquire a second distance value between the headset and the target position and a change angle of the headset when the user rotates the headset, wherein the second distance value is acquired by the laser-ToF sensor in response to a second ranging instruction, and the change angle is acquired by the IMU sensor in response to the second ranging instruction, wherein the second ranging instruction is an instruction issued after the target position is calibrated;

[0033] A determination module is configured to determine a target distance value between the initial position and the target position based on the first distance value, the second distance value, and the change angle.

[0034] In addition, to achieve the above-mentioned purpose, the present application also proposes a laser ranging device, which includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the laser ranging method described above.

[0035] In addition, to achieve the above-mentioned purpose, the present application also proposes a storage medium, which is a computer-readable storage medium. A computer program is stored on the storage medium, and when the computer program is executed by a processor, the steps of the laser ranging method described above are implemented.

[0036] In addition, to achieve the above-mentioned purpose, the present application also provides a computer program product, which includes a computer program, and when the computer program is executed by a processor, it implements the steps of the laser ranging method described above.

[0037] One or more technical solutions proposed in this application have at least the following technical effects:

[0038] A laser-TOF sensor and an IMU sensor are set in the headset, and distance measurement is performed through the headset, allowing users to free their hands in complex scenes. When the control unit of the headset receives a first distance measurement instruction, the control unit calls the laser-TOF sensor to obtain a first distance value between the headset and an initial position. When a second distance measurement instruction is received, the control unit calls the laser-TOF sensor again to obtain a second distance value between the headset and the initial position. The IMU sensor is used to obtain the change angle of rotation of the headset caused by the user's head when the user turns from the initial position to the target position. The target distance value between the initial position and the target position is then determined based on the first distance value, the second distance value and the change angle. In this process, there is no need to obtain a three-dimensional scene including the initial position and the target position, and the user does not need to keep the headset moving steadily when moving to the target position after calibrating the initial position. This avoids laser interruption caused by the laser-TOF sensor during user movement and is not affected by shaking or vibration of the headset, thereby improving ranging accuracy. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0040] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0041] Figure 1The flowchart provided by the laser ranging method embodiment one of the present application;

[0042] Figure 2 The schematic diagram of the earphone structure in the present application;

[0043] Figure 3 The schematic diagram of the internal structure of the earphone in the present application;

[0044] Figure 4 The geometric display schematic diagram of the target distance provided by the laser ranging method embodiment one of the present application;

[0045] Figure 5 The brief flowchart provided by the laser ranging method embodiment one of the present application;

[0046] Figure 6 The flowchart provided by the laser ranging method embodiment two of the present application;

[0047] Figure 7 The flowchart provided by the laser ranging method embodiment three of the present application;

[0048] Figure 8 The brief flowchart provided by the laser ranging method embodiment three of the present application;

[0049] Figure 9 The module structure schematic diagram of the laser ranging device of the present application embodiment;

[0050] Figure 10 The device structure schematic diagram of the hardware running environment involved by the laser ranging method in the present application embodiment.

[0051] The implementation of the present application, the functional features and the advantages will be further explained with reference to the accompanying drawings combined with the embodiments. DETAILED DESCRIPTION

[0052] It should be understood that the specific embodiments described herein are only used to explain the technical solutions of the present application, and are not used to limit the present application.

[0053] In order to better understand the technical solutions of the present application, the specific embodiments will be described in detail below combined with the drawings in the specification.

[0054] The main solution of the embodiment of the present application is: the control unit of the headset obtains a first distance value between the headset and the initial position, the first distance value is collected by the laser-ToF sensor in response to a first ranging instruction, and the first ranging instruction is an instruction issued after the initial position is calibrated; obtains a second distance value between the headset and the target position and a change angle of the headset when the user rotates, the second distance value is collected by the laser-ToF sensor in response to a second ranging instruction, the change angle is collected by the IMU sensor in response to the second ranging instruction, and the second ranging instruction is an instruction issued after the target position is calibrated; based on the first distance value, the second distance value and the change angle, determines the target distance value between the initial position and the target position.

[0055] In this embodiment, for ease of description, the following description is made with the control unit of the headset as the execution entity.

[0056] To enable users to use laser rangefinders in complex scenarios, such as high altitudes and confined spaces, they are typically configured as head-mounted laser rangefinders. During the measurement process, the head-mounted laser rangefinder captures the three-dimensional scene of the object being measured and then determines the object's length based on the three-dimensional scene by marking the locations of two measurement points. However, if the laser rangefinder is shaken or vibrated during the measurement process, the captured three-dimensional scene will be subject to significant errors, resulting in reduced distance measurement accuracy.

[0057] The present application provides a solution in which a laser-TOF sensor and an IMU sensor are disposed in a headset, and distance measurement is performed through the headset, allowing users to free their hands in complex scenes. When the headset control unit receives a first distance measurement instruction, the control unit calls the laser-TOF sensor to obtain a first distance value between the headset and an initial position. When a second distance measurement instruction is received, the control unit again calls the laser-TOF sensor to obtain a second distance value between the headset and the initial position. The IMU sensor is used to obtain the change angle of rotation of the headset caused by the user's head when the user moves from the initial position to the target position. The target distance value between the initial position and the target position is then determined based on the first distance value, the second distance value, and the change angle. In this process, there is no need to obtain a three-dimensional scene including the initial position and the target position. The user does not need to keep the headset in steady motion when moving from the initial position to the target position after calibrating the initial position. This avoids laser interruption caused by the laser-TOF sensor during user movement and is not affected by shaking or vibration of the headset, thereby improving ranging accuracy.

[0058] It should be noted that the execution subject of this embodiment can be a computing service device with data processing, network communication, and program execution functions, such as a tablet computer, personal computer, mobile phone, etc., or an electronic device capable of implementing the above functions, a headset control unit, etc. The following uses the headset control unit as an example to illustrate this embodiment and the following embodiments.

[0059] Based on this, the embodiment of the present application provides a laser ranging method, which is applied to the control unit of the headset, and the headset is also provided with a laser-ToF sensor and an IMU sensor, referring to Figure 1 , Figure 1 This is a flow chart of the first embodiment of the laser ranging method of the present application.

[0060] In this embodiment, the laser ranging method should include steps S10 to S30:

[0061] Step S10: Acquire a first distance value between the headset and an initial position, where the first distance value is acquired by the laser-ToF sensor in response to a first distance measurement instruction, where the first distance measurement instruction is issued after the initial position is calibrated;

[0062] It should be noted that the control unit is the core control component inside the headset, responsible for receiving and processing various sensor signals, executing ranging instructions, performing data calculations, and controlling the voice module. In this embodiment, the control unit can be an integrated MCU (Microcontroller Unit) for processing sensor data and executing ranging algorithms.

[0063] It should be noted that the laser-ToF sensor is a distance measurement sensor based on the time-of-flight principle. By emitting a laser pulse and measuring the time difference between the pulse being emitted and being reflected by the object, the distance between the sensor and the object is calculated in combination with the speed of light. In this embodiment, the laser-ToF sensor is installed in the earphone, and the wavelength of the laser emitter in the laser-ToF sensor can be 650nm (nanometers), and the accuracy of the ToF distance sensor in the laser-ToF sensor can be set to an accuracy of ±1mm and a range of 0.1-20m. Among them, the distance includes a first distance value and a second distance value, and the first distance value is the distance value between the earphone and the initial position. The second distance value is the distance value between the earphone and the target position.

[0064] It should be noted that the initial position is the starting point of the ranging process. The target position is the end point of the ranging process, and the distance between the initial position and the target distance is the distance to be measured.

[0065] In the specific implementation, refer to Figure 2The earphones can be headphones, which include a left ear shell (left channel earphones), a right ear shell (right channel earphones) and a headband. The left ear shell and the right ear shell are symmetrically designed with left and right ear cups, and the internal functional modules are also symmetrically arranged. A control unit, a laser-sensor (laser-ToF sensor), a voice module and an IMU module are provided in both the left ear shell and the right ear shell. Operation buttons are also provided separately in the left ear shell or the right ear shell (refer to Figure 3 ).

[0066] Specifically, when the user wears headphones and needs to measure the distance, he presses and holds the distance measurement button for 3 seconds to start the distance measurement function of the headphones. After the distance measurement function is started, the voice module prompts the user that "the distance measurement mode has been activated". The user turns his head to calibrate the laser emitted by the laser-ToF sensor at the starting point (initial position) of the required distance. After using the laser to calibrate the initial position and the user clicks the operation button, the control unit sends a first distance measurement instruction to the laser-ToF sensor, so that the laser-ToF sensor collects the first distance value between the headphones and the initial position.

[0067] Step S20: Acquire a second distance value between the headset and the target position and a change angle of the headset when the user rotates the headset, where the second distance value is acquired by the laser-ToF sensor in response to a second ranging instruction, and the change angle is acquired by the IMU sensor in response to the second ranging instruction, where the second ranging instruction is issued after the target position is calibrated;

[0068] It should be noted that an IMU sensor is an inertial measurement unit (IMU), which contains an accelerometer and gyroscope and is used to measure motion parameters such as acceleration and angular velocity. In this embodiment, the IMU sensor is installed in the earphones to measure the change in angle of the earphones when the user rotates them. The change in angle is the angle that the earphones change as the user rotates them.

[0069] It is understandable that after the laser-TOF sensor collects the first distance value and before collecting the second distance value between the user and the target position, the laser-TOF sensor does not work. Therefore, the user does not need to maintain the posture of operating the headset during the rotation process, which can free the user's hands and allow the user to more easily cope with complex spatial environments such as high altitude or narrow spaces.

[0070] In a specific implementation, after obtaining the first distance value between the user and the initial position, the user turns the body or head so that the laser emitted by the laser-ToF sensor points to the target position to perform laser calibration on the target position. After the target position is calibrated and the user clicks the operation button, the control unit sends a second ranging instruction to the laser-ToF sensor and the IMU sensor, so that the laser-ToF sensor collects the second distance value between the headset and the target position, and the IMU sensor collects the angle change value (change angle) of the headset when the user rotates to the target position.

[0071] Step S30: determining a target distance value between the initial position and the target position based on the first distance value, the second distance value, and the change angle.

[0072] It should be noted that the target distance value is the actual distance value between the initial position and the target position.

[0073] It can be understood that the target distance value between the initial position and the target position can be accurately calculated through the first distance value, the second distance value and the change angle, which can avoid the need for the user to maintain the operating posture of the headset during the process of the laser emitted by the laser-ToF sensor moving from the initial position to the target position, thereby realizing non-contact high-precision distance measurement of the distance between two points in complex environments (such as high altitude and narrow space).

[0074] It is understandable that the operation button in the headset is pressed once by the user to avoid the laser-ToF sensor collecting the distance value between the user (headphone) and the laser calibration point once, and the IMU sensor collects the user's final steering angle, that is, no matter how the user moves when changing the calibration point, it has nothing to do with the final measurement result. Therefore, the actual distance value between the initial position and the target position is determined by the first distance value, the second distance value and the change angle to ensure the accuracy of the final distance measurement.

[0075] In the specific implementation, refer to Figure 4 First, determine the first distance value (d1) between the user and the initial position (A), the second distance value (d2) between the user and the target position (B), and the change angle (Δθ) of the earphone when the user turns to the back of the head. Then, substitute the first distance value, the second distance value and the change angle into the distance calculation formula to obtain the target distance value (L) between the initial position and the target position.

[0076] The distance calculation formula is:

[0077] Optionally, after obtaining the first distance value between the earphone and the initial position, or during the process of the laser-ToF sensor collecting the second distance value, or after determining the target distance value between the initial position and the target position, a corresponding voice prompt is broadcast based on the voice module.

[0078] It should be noted that voice prompts are audio information sent by the voice module, which are used to convey specific operating status, measurement results or other relevant information to the user.

[0079] It is understood that during the distance measurement process, the voice module plays voice prompts at key steps, including after obtaining the first distance value, during the acquisition of the second distance value, and after determining the target distance value. Providing users with real-time operational feedback and distance measurement status information through voice prompts allows users to more intuitively and conveniently understand the progress and results of the distance measurement process in complex scenarios, thereby lowering the operational threshold and making it suitable for blind operation scenarios.

[0080] In the specific implementation, after the user presses and holds the ranging button for 3 seconds to start the ranging function of the headset, the user is prompted that the ranging mode has been activated based on the voice module; after obtaining the first distance value between the headset and the initial position, the user is prompted based on the voice module that the initial position recording is completed; while the laser-ToF sensor is collecting the second distance value, the user is prompted to maintain a stable state based on the voice module; after determining the target distance value between the initial position and the target position, the target distance value is broadcast to the user based on the voice module.

[0081] It is understandable that the voice prompt function makes the distance measurement results more intuitive and convenient to feedback to users. Users can obtain distance measurement information without manually checking the corresponding device. It not only improves the convenience of operation, but can also be applied to more scenarios that require instant feedback, such as virtual reality (VR), augmented reality (AR), smart navigation, etc.

[0082] Optionally, before step S10, the method further includes:

[0083] Calibrate and measure the distance of a preset reference object to obtain the laser measured length of the reference object;

[0084] Determining whether the measured distance meets a preset accuracy range;

[0085] If not, obtaining the caliper-measured length of the reference object, wherein the caliper-measured length satisfies the preset accuracy range;

[0086] The laser measured length is updated using the caliper measured length, and the first distance value is obtained after calibration is completed.

[0087] It should be noted that the preset reference object is a pre-selected object of known dimensions used to calibrate the accuracy of the laser ranging system. Calibration range measurement is the process of measuring a preset reference object using the laser ranging function in the headset. Laser length measurement is the length of the reference object measured using the laser ranging function in the headset. The preset accuracy range is a precision standard pre-set during the design of the ranging system and is used to determine whether the measurement results meet the requirements. Caliper length measurement is the actual length of the reference object measured using a high-precision measuring tool such as a vernier caliper. Calibration is the process of adjusting the ranging system's parameters or updating the measurement data to ensure that the ranging system's measurement results fall within the preset accuracy range.

[0088] It is understandable that by calibrating the distance measurement and calibration steps, it is possible to ensure that the measurement results are within a reasonable accuracy range, thereby improving the accuracy and reliability of the distance measurement.

[0089] In the specific implementation, refer to Figure 5 The user presses and holds the ranging button for 3 seconds to start the device. After the voice prompt "Ranging mode has been activated" is heard, the initialization is confirmed to be complete. After clicking the button, the laser points to the initial position A, the sensor collects the distance value, and the IMU records the current head horizontal yaw angle as 0 degrees. The voice feedback "Origin has been recorded" is used to confirm that the origin calibration is complete. Move the head to make the laser B, click the button again, the sensor collects the distance, and the IMU records the change angle to confirm that the end calibration is complete. Finally, the distance calculation formula is used to calculate the target distance between the initial position and the target position, and the target distance is fed back to the user through the voice module.

[0090] This embodiment provides a laser ranging method. A laser time-of-flight (TOF) sensor and an inertial measurement unit (IMU) sensor are installed in a headset. Distance measurement is performed through the headset, allowing users to keep their hands free in complex scenarios. When the headset control unit receives a first ranging instruction, the control unit calls the laser time-of-flight (TOF) sensor to obtain a first distance value between the headset and an initial position. When it receives a second ranging instruction, the control unit calls the laser time-of-flight (TOF) sensor to obtain a second distance value between the headset and the initial position. The IMU sensor is used to obtain the angle of rotation of the headset caused by the user's head when the user moves from the initial position to the target position. The target distance between the initial position and the target position is determined based on the first and second distance values ​​and the angle of rotation. This process does not require acquisition of a three-dimensional scene containing the initial and target positions. Furthermore, after calibrating the initial position, the user does not need to maintain steady movement of the headset as they move to the target position. This avoids laser interruption caused by the laser TOF sensor during user movement and is not affected by shaking or vibration of the headset, thereby improving ranging accuracy.

[0091] Based on the first embodiment of the present application, in the second embodiment of the present application, the same or similar contents as those in the above embodiment 1 can be referred to the above introduction and will not be described in detail later. Figure 6 , step S20 further includes steps S01 to S02:

[0092] Step S01, when the user turns from the direction of the initial position to the direction of the target position, obtaining the angular velocity and acceleration of the headset when the user turns, which are collected by the IMU sensor in response to the second ranging instruction;

[0093] Step S02: determining an angle change value of the earphone based on the angular velocity;

[0094] Step S03: performing angle compensation on the angle change value based on the acceleration to obtain a change angle of the earphone when the user rotates.

[0095] It should be noted that the initial position direction is the direction in which the laser light emitted by the laser-TOF sensor in the headset is directed toward the initial position, which determines the headset's starting direction in space. The target position direction is the direction in which the laser light emitted by the laser-TOF sensor in the headset is directed toward the target position, which determines the headset's ending direction in space.

[0096] It should be noted that angular velocity is the rate of change of the angle of an object rotating around a certain axis per unit time. In this embodiment, angular velocity is the rate of change of the angle of the head rotating around its own axis per unit time when the user turns. Acceleration is the rate of change of angular velocity per unit time when the head turns. The angle change value is the change in the directional angle of the headset as it turns from the direction of the initial position to the direction of the target position. Angle compensation is the process of correcting the angle change value using acceleration information through a specific algorithm. Angle compensation can eliminate the error in angle measurement caused by the acceleration change of the headset, thereby improving the accuracy and reliability of angle measurement. The change angle is the final result of the angle change value of the headset when the user turns after angle compensation.

[0097] It can be understood that by calculating the angle change value through the collected angular velocity, the rotation of the headset in space can be accurately described. The angle change value is then compensated for by combining it with the collected acceleration to eliminate the error in angle measurement caused by the acceleration change of the headset, thereby improving the accuracy and reliability of angle measurement.

[0098] It is understandable that by performing angle compensation on the angle change value, the actual movement of the headset in space can be more accurately reflected, thereby improving the accuracy of ranging.

[0099] It is understandable that when the user's head rotates rapidly in complex motion scenes, through precise angle measurement and compensation, the headset can accurately reflect the actual movement of the headset in space, thereby improving the robustness of laser ranging.

[0100] In a specific implementation, the angular velocity data collected by the IMU sensor can be used to calculate the angle change value of the headset through mathematical methods such as integration.

[0101] For example, the integral formula for angle change is:

[0102] Where θ(t) is the angle change and ω is the angular velocity.

[0103] Furthermore, step S03 further includes:

[0104] determining a roll angle and a pitch angle of the headset based on the acceleration;

[0105] Based on the roll angle and the pitch angle, angle compensation is performed on the angle change value to obtain a change angle of the headset when the user rotates.

[0106] It should be noted that the roll angle is the rotation angle of an object around its longitudinal axis (usually the front-to-back axis). In this embodiment, the roll angle is the angle the headset rotates around the user's axis perpendicular to the ground. The pitch angle is the rotation angle of the headset caused by the user raising or lowering their head.

[0107] It is understandable that since the roll angle describes the rotation of the headset in the horizontal plane, and the pitch angle describes the rotation of the headset in the vertical plane, therefore, by calculating the roll angle and pitch angle using acceleration data and performing angle compensation on the angle change value, it is possible to eliminate the error in angle measurement caused by the acceleration change of the headset, improve the accuracy and reliability of angle measurement, and thus improve the accuracy of laser ranging.

[0108] In a specific implementation, when the user turns their head to drive the headset to rotate, the IMU sensor collects the acceleration data of the headset and transmits the collected acceleration to the control unit. The control unit calculates the roll angle and pitch angle of the headset by analyzing the acceleration data. After calculating the roll angle and pitch angle of the headset, the roll angle and pitch angle are used to compensate for the angle change value to obtain the change angle of the headset when the user rotates, thereby eliminating the error in angle measurement caused by the acceleration change of the headset (such as the influence of gravity acceleration). Among them, the formula for calculating the roll angle (left) and the formula for calculating the pitch angle (right) are:

[0109]

[0110] Among them, θ acc is the roll angle, φacc is the pitch angle, a y is the Y-axis acceleration decomposed into the Y-axis, a x is the acceleration decomposed to the X axis, a z It is the Z-axis acceleration obtained by decomposing the acceleration onto the Z-axis.

[0111] Furthermore, step S02 further includes:

[0112] Decomposing the acceleration along the preset coordinate axes to obtain X-axis acceleration, Y-axis acceleration, and Z-axis acceleration;

[0113] determining a roll angle of the headset based on the X-axis component acceleration and the Y-axis component acceleration;

[0114] A pitch angle of the headset is determined based on the X-axis component acceleration, the Y-axis component acceleration, and the Z-axis component acceleration.

[0115] It should be noted that the preset coordinate axes are a predefined reference coordinate system, including three mutually perpendicular axes: X-axis, Y-axis and Z-axis. Among them, the X-axis acceleration is the acceleration component of the headset in the X-axis direction of the preset coordinate system, which is used to describe the movement state of the headset in the X-axis direction. The Y-axis acceleration is the acceleration component of the headset in the Y-axis direction of the preset coordinate system, which is used to describe the movement state of the headset in the Y-axis direction. The Z-axis acceleration is the acceleration component of the headset in the Z-axis direction of the preset coordinate system, which is used to describe the movement state of the headset in the Z-axis direction.

[0116] It can be understood that by calculating the roll angle based on the X- and Y-axis accelerations, the headset's rotation in the horizontal plane can be accurately described, while by calculating the pitch angle based on the X-, Y-, and Z-axis accelerations, the headset's rotation in the vertical plane can be accurately described. By improving the accuracy of the headset's rotation in the horizontal plane and the vertical plane, the calculation accuracy of the headset's changing angle is improved, thereby improving the accuracy of laser ranging using the headset.

[0117] Based on the first and second embodiments of the present application, in the third embodiment of the present application, the earphones include left-channel earphones and right-channel earphones. For the same or similar contents as the above embodiments, please refer to the above introduction and will not be repeated hereafter. Figure 7 , step S30 further includes steps S1 to S3:

[0118] Step S1, determining a first target distance value between the initial position measured by the left channel earphone and the target position based on the first distance value, the second distance value, and the change angle measured by the left channel earphone;

[0119] Step S2, determining a second target distance value between the initial position measured by the right channel earphone and the target position based on the first distance value, the second distance value, and the change angle measured by the right channel earphone;

[0120] Step S3: cross-validate the first target distance value and the second target distance value to determine a target distance value between the initial position and the target position.

[0121] It should be noted that the left-channel earphone is the left part of the earphone. The right-channel earphone is the right part of the earphone. The first target distance value is the target distance value between the initial position and the target position calculated based on the first distance value, the second distance value and the change angle measured by the left-channel earphone. The second target distance value is the target distance value between the initial position and the target position calculated based on the first distance value, the second distance value and the change angle measured by the right-channel earphone. Cross-validation verifies the accuracy and reliability of the measurement results by comparing the consistency of two independent measurement results (the first target distance value and the second target distance value). In this embodiment, mean processing can be used.

[0122] It can be understood that by cross-validating two independent ranging results, errors caused by sensor errors or changes in the measurement environment can be effectively reduced, ensuring that the final ranging result is more accurate and reliable.

[0123] It is understandable that since the distance between the left channel earphone and the initial position and the distance between the right channel earphone and the initial position are different, and the errors are also different, in order to reduce the final measured error, the first target distance value and the second target distance value measured by the earphones on both sides can be used for cross-validation to improve the accuracy of the distance measurement.

[0124] In the specific implementation, refer to Figure 8, when the user wears headphones and needs to measure the distance, long press the distance measurement button for 3 seconds to start the distance measurement function of the headphones. After the distance measurement function is started, the voice module prompts the user that "distance measurement mode has been activated", and the user turns his head to calibrate the laser emitted by the laser-ToF sensor at the starting point (initial position) of the required distance. After using the laser to calibrate the initial position and the user clicks the operation button, the control unit of the left channel earphone sends a first distance measurement instruction to the left laser-ToF sensor, so that the left laser-ToF sensor collects the first distance value between the left channel earphone and the initial position. At the same time, the control unit of the right channel earphone sends a first distance measurement instruction to the right laser-ToF sensor, so that the right laser-ToF sensor collects the first distance value between the right channel earphone and the initial position; the user turns his body or head to make the left laser-ToF sensor The lasers emitted by the F sensor and the right laser-ToF sensor are pointed at the target position to perform laser calibration on the target position. After the target position is calibrated and the user clicks the operation button, the control unit of the left channel earphone sends a second ranging instruction to the left laser-ToF sensor and the left IMU sensor, so that the left laser-ToF sensor collects the second distance value between the left channel earphone and the target position, and the left IMU sensor collects the angle change value of the left channel earphone when the user turns to the target position. At the same time, the control unit of the right channel earphone sends a second ranging instruction to the right laser-ToF sensor and the right IMU sensor, so that the right laser-ToF sensor collects the second distance value between the right channel earphone and the target position, and the right IMU sensor collects the angle change value of the right channel earphone when the user turns to the target position. Based on the above data, the left control unit obtains a first target distance value (L1) between the initial position measured by the left channel earphone and the target position; and based on the above data, the right control unit obtains a first target distance value (L2) between the initial position measured by the right channel earphone and the target position; after the right control unit and / or the left control unit obtain the first target distance value and the first target distance value, the first target distance value and the first target distance value are averaged to determine a final target distance value.

[0125] It should be noted that the above examples are only used to understand the present application and do not constitute a limitation on the laser ranging method of the present application. More simple transformations based on this technical concept are all within the scope of protection of the present application.

[0126] This application also provides a laser ranging device, which is applied to the control unit of the headset. The headset is also provided with a laser-ToF sensor and an IMU sensor. Please refer to Figure 9 , the laser ranging device comprises:

[0127] a first acquiring module, configured to acquire a first distance value between the headset and an initial position, where the first distance value is acquired by the laser-ToF sensor in response to a first distance measurement instruction, where the first distance measurement instruction is issued after the initial position is calibrated;

[0128] a second acquisition module, configured to acquire a second distance value between the headset and the target position and a change angle of the headset when the user rotates the headset, wherein the second distance value is acquired by the laser-ToF sensor in response to a second ranging instruction, and the change angle is acquired by the IMU sensor in response to the second ranging instruction, wherein the second ranging instruction is an instruction issued after the target position is calibrated;

[0129] A determination module is configured to determine a target distance value between the initial position and the target position based on the first distance value, the second distance value, and the change angle.

[0130] Optionally, the second acquisition module is further used to obtain the angular velocity and acceleration of the headset when the user turns from the direction of the initial position to the direction of the target position, which are collected by the IMU sensor in response to the second ranging instruction; determine the angle change value of the headset based on the angular velocity; and perform angle compensation on the angle change value based on the acceleration to obtain the change angle of the headset when the user turns.

[0131] Optionally, the second acquisition module is further used to determine the roll angle and pitch angle of the headset based on the acceleration; and perform angle compensation on the angle change value based on the roll angle and the pitch angle to obtain the change angle of the headset when the user rotates.

[0132] Optionally, the second acquisition module is further used to decompose the acceleration along a preset coordinate axis to obtain X-axis acceleration, Y-axis acceleration and Z-axis acceleration; determine the roll angle of the headset based on the X-axis acceleration and the Y-axis acceleration; and determine the pitch angle of the headset based on the X-axis acceleration, the Y-axis acceleration and the Z-axis acceleration.

[0133] Optionally, the earphone includes a left-channel earphone and a right-channel earphone;

[0134] The determination module is further used to determine a first target distance value between the initial position measured by the left-channel earphone and the target position based on the first distance value, the second distance value, and the change angle measured by the left-channel earphone; determine a second target distance value between the initial position measured by the right-channel earphone and the target position based on the first distance value, the second distance value, and the change angle measured by the right-channel earphone; and cross-validate the first target distance value and the second target distance value to determine the target distance value between the initial position and the target position.

[0135] Optionally, the first acquisition module is used to calibrate the distance measurement of a preset reference object to obtain the laser measured length of the reference object; determine whether the measured distance meets a preset accuracy range; if not, obtain the caliper measured length of the reference object, and the caliper measured length meets the preset accuracy range; use the caliper measured length to update the laser measured length, and after completing the calibration, obtain the first distance value.

[0136] The laser ranging device provided in this application, utilizing the laser ranging method described in the aforementioned embodiments, can address the technical issue of reduced ranging accuracy caused by shaking or vibration of the laser rangefinder during measurement. Compared to the prior art, the beneficial effects of the laser ranging device provided in this application are the same as those of the laser ranging method described in the aforementioned embodiments. Other technical features of the laser ranging device are the same as those disclosed in the aforementioned embodiments and are not further elaborated here.

[0137] The present application provides a laser ranging device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the laser ranging method in the above-mentioned embodiment 1.

[0138] Reference below Figure 10 , which shows a schematic structural diagram of a laser ranging device suitable for implementing the embodiments of the present application. The laser ranging device in the embodiments of the present application may include, but is not limited to, mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Descriptions), PMPs (Portable Media Players), and in-vehicle terminals (e.g., in-vehicle navigation terminals), as well as fixed terminals such as digital TVs and desktop computers. Figure 10 The laser ranging device shown is merely an example and should not limit the functions and scope of use of the embodiments of the present application.

[0139] like Figure 10As shown, the laser ranging device may include a processing device 1001 (e.g., a central processing unit, a graphics processing unit, etc.), which can perform various appropriate actions and processes based on programs stored in a read-only memory (ROM) 1002 or programs loaded from a storage device 1003 into a random access memory (RAM) 1004. RAM 1004 also stores various programs and data required for the operation of the laser ranging device. Processing device 1001, ROM 1002, and RAM 1004 are interconnected via a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Typically, the following systems may be connected to I / O interface 1006: input devices 1007, such as a touch screen, touchpad, keyboard, mouse, image sensor, microphone, accelerometer, gyroscope, etc.; output devices 1008, such as a liquid crystal display (LCD), speaker, vibrator, etc.; storage device 1003, such as a magnetic tape or hard disk; and communication device 1009. The communication device 1009 can allow the laser ranging device to communicate with other devices wirelessly or by wire to exchange data. Although the figure shows a laser ranging device with various systems, it should be understood that it is not required to implement or have all the systems shown. More or fewer systems can be implemented or provided instead.

[0140] In particular, according to the embodiments disclosed in the present application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, the embodiments disclosed in the present application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program comprising program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network via a communication device, or installed from a storage device 1003, or installed from a ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiment disclosed in the present application are executed.

[0141] The laser ranging device provided in this application, utilizing the laser ranging method described in the aforementioned embodiment, can address the technical issue of reduced ranging accuracy caused by shaking or vibration of the laser rangefinder during measurement. Compared to the prior art, the beneficial effects of the laser ranging device provided in this application are the same as those of the laser ranging method described in the aforementioned embodiment. Other technical features of this laser ranging device are the same as those disclosed in the aforementioned embodiment and are not further elaborated here.

[0142] It should be understood that the various parts disclosed in this application can be implemented using hardware, software, firmware, or a combination thereof. In the description of the above embodiments, specific features, structures, materials, or characteristics can be combined in any one or more embodiments or examples in a suitable manner.

[0143] The above description is merely a specific embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in this application should be included in the scope of protection of this application. Therefore, the scope of protection of this application should be based on the scope of protection of the claims.

[0144] The present application provides a computer-readable storage medium having computer-readable program instructions (ie, computer program) stored thereon, and the computer-readable program instructions are used to execute the laser ranging method in the above embodiment.

[0145] The computer-readable storage medium provided in this application may be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, systems or devices, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In this embodiment, the computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, system or device. The program code contained on the computer-readable storage medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination thereof.

[0146] The computer-readable storage medium may be included in the laser ranging device; or it may exist independently without being assembled into the laser ranging device.

[0147] The computer-readable storage medium carries one or more programs. When the one or more programs are executed by the laser ranging device, the laser ranging device is caused to: obtain a first distance value between the headset and an initial position, where the first distance value is acquired by the laser-ToF sensor in response to a first ranging instruction, and the first ranging instruction is an instruction issued after the initial position is calibrated; obtain a second distance value between the headset and a target position and a change angle of the headset when the user rotates the headset, where the second distance value is acquired by the laser-ToF sensor in response to a second ranging instruction, and the change angle is acquired by the IMU sensor in response to the second ranging instruction, and the second ranging instruction is an instruction issued after the target position is calibrated; and determine a target distance value between the initial position and the target position based on the first distance value, the second distance value, and the change angle.

[0148] Computer program code for performing the operations of the present application may be written in one or more programming languages, or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, C++, and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a stand-alone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0149] The flow charts and block diagrams in the accompanying drawings illustrate the possible architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present application. In this regard, each box in the flow chart or block diagram can represent a module, program segment or a part of code, and the module, program segment or a part of code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order than that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flow chart, and the combination of the boxes in the block diagram and / or flow chart can be implemented by a dedicated hardware-based system that performs the specified function or operation, or can be implemented by a combination of dedicated hardware and computer instructions.

[0150] The modules described in the embodiments of the present application may be implemented in software or hardware, wherein the name of a module does not necessarily limit the unit itself.

[0151] The computer-readable storage medium provided in this application is a computer-readable storage medium that stores computer-readable program instructions (i.e., a computer program) for executing the aforementioned laser ranging method. This computer-readable storage medium can address the technical problem of reduced ranging accuracy caused by shaking or vibration of the laser rangefinder during measurement. Compared to the prior art, the beneficial effects of the computer-readable storage medium provided in this application are the same as those of the laser ranging method provided in the aforementioned embodiments, and are not further elaborated here.

[0152] The present application also provides a computer program product, comprising a computer program, which implements the steps of the above-mentioned laser ranging method when executed by a processor.

[0153] The computer program product provided in this application can address the technical problem of reduced ranging accuracy caused by shaking or vibration of a laser rangefinder during measurement. Compared to the prior art, the beneficial effects of the computer program product provided in this application are the same as those of the laser ranging method provided in the aforementioned embodiments, and are not further elaborated here.

[0154] The above description is only part of the embodiments of the present application and does not limit the patent scope of the present application. All equivalent structural transformations made by using the contents of the present application specification and drawings under the technical concept of the present application, or direct / indirect application in other related technical fields are included in the patent protection scope of the present application.

Claims

1. A laser ranging method, characterized in that: A control unit applied to an earphone, wherein the earphone is further provided with a laser-ToF sensor and an IMU sensor, wherein the method includes: Acquire a first distance value between the headset and an initial position, where the first distance value is acquired by the laser-ToF sensor in response to a first distance measurement instruction, where the first distance measurement instruction is issued after the initial position is calibrated; Obtaining a second distance value between the headset and the target position and a change angle of the headset when the user rotates the headset, where the second distance value is collected by the laser-ToF sensor in response to a second ranging instruction, and the change angle is collected by the IMU sensor in response to the second ranging instruction, where the second ranging instruction is issued after the target position is calibrated; A target distance value between the initial position and the target position is determined based on the first distance value, the second distance value, and the change angle.

2. The method according to claim 1, wherein The step of obtaining the changing angle of the headset when the user rotates includes: When the user turns from the direction of the initial position to the direction of the target position, obtaining the angular velocity and acceleration of the headset when the user turns, which are collected by the IMU sensor in response to the second ranging instruction; determining an angle change value of the earphone based on the angular velocity; Based on the acceleration, angle compensation is performed on the angle change value to obtain a change angle of the earphone when the user rotates.

3. The method according to claim 2, wherein The step of performing angle compensation on the angle change value based on the acceleration to obtain the change angle of the headset when the user rotates includes: determining a roll angle and a pitch angle of the headset based on the acceleration; Based on the roll angle and the pitch angle, angle compensation is performed on the angle change value to obtain a change angle of the headset when the user rotates.

4. The method according to claim 3, wherein The step of determining the roll angle and pitch angle of the headset based on the acceleration further includes: Decomposing the acceleration along the preset coordinate axes to obtain X-axis acceleration, Y-axis acceleration, and Z-axis acceleration; determining a roll angle of the headset based on the X-axis component acceleration and the Y-axis component acceleration; A pitch angle of the headset is determined based on the X-axis component acceleration, the Y-axis component acceleration, and the Z-axis component acceleration.

5. The method according to claim 1, wherein The earphone includes a left-channel earphone and a right-channel earphone, and the step of determining a target distance value between the initial position and the target position based on the first distance value, the second distance value, and the change angle includes: determining a first target distance value between the initial position measured by the left-channel earphone and the target position based on the first distance value, the second distance value, and the change angle measured by the left-channel earphone; determining a second target distance value between the initial position measured by the right channel earphone and the target position based on the first distance value, the second distance value, and the change angle measured by the right channel earphone; Cross-validate the first target distance value and the second target distance value to determine a target distance value between the initial position and the target position.

6. The method according to claim 1, wherein Before the step of obtaining the first distance value between the earphone and the initial position, the method further includes: Calibrate and measure the distance of a preset reference object to obtain the laser measured length of the reference object; Determining whether the measured distance meets a preset accuracy range; If not, obtaining the caliper-measured length of the reference object, wherein the caliper-measured length satisfies the preset accuracy range; The laser measured length is updated using the caliper measured length, and the first distance value is obtained after calibration is completed.

7. The method according to claim 1, wherein The earphone is also provided with a voice module; After obtaining the first distance value between the earphone and the initial position, or during the process of the laser-ToF sensor collecting the second distance value, or after determining the target distance value between the initial position and the target position, the corresponding voice prompt is broadcast based on the voice module.

8. A laser ranging device, characterized in that: A control unit for headphones, wherein the headphones are also provided with a laser-ToF sensor and an IMU sensor, includes: a first acquiring module, configured to acquire a first distance value between the headset and an initial position, where the first distance value is acquired by the laser-ToF sensor in response to a first distance measurement instruction, where the first distance measurement instruction is issued after the initial position is calibrated; a second acquisition module, configured to acquire a second distance value between the headset and the target position and a change angle of the headset when the user rotates the headset, wherein the second distance value is acquired by the laser-ToF sensor in response to a second ranging instruction, and the change angle is acquired by the IMU sensor in response to the second ranging instruction, wherein the second ranging instruction is an instruction issued after the target position is calibrated; A determination module is configured to determine a target distance value between the initial position and the target position based on the first distance value, the second distance value, and the change angle.

9. A laser ranging device, characterized in that: The device includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the laser ranging method according to any one of claims 1 to 7.

10. A storage medium, characterized in that: The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the laser ranging method according to any one of claims 1 to 7 are implemented.