Distance sensor calibration method and apparatus, electronic device, and readable storage medium
By acquiring the background noise value under unobstructed conditions and the calibration parameters within a preset distance range, and then calculating the second calibration parameter in combination with preset coefficients, the problem of high resource consumption during distance sensor calibration is solved, thereby improving efficiency and reducing costs.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- BEIJING XIAOMI MOBILE SOFTWARE CO LTD
- Filing Date
- 2022-09-22
- Publication Date
- 2026-07-24
AI Technical Summary
The current distance sensor calibration process requires three calibrations, which consumes a lot of time and equipment resources and affects efficiency.
By acquiring the background noise value under unobstructed conditions and the calibration parameters within a preset distance range, and combining them with preset coefficients to calculate the second calibration parameters, a third calibration is eliminated, requiring only two data acquisitions and one calculation.
This improved the efficiency of distance sensor production and factory calibration, and reduced production costs.
Smart Images

Figure CN115575930B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of sensor calibration technology, and in particular to a distance sensor calibration method, apparatus, electronic device, and readable storage medium. Background Technology
[0002] The distance sensor emits a ranging signal towards an obstacle and calculates the true distance between the sensor and the obstacle based on the ranging parameters reflected from the obstacle. During the calibration process of the distance sensor, it is usually necessary to calibrate the noise floor value and the ranging parameters at two other distances, such as obtaining the proximity threshold and distance threshold of the distance sensor. After performing these three calibrations, the distance sensor can perform normal ranging operations. However, performing three calibrations for each distance sensor during the calibration process consumes a significant amount of time and equipment resources, affecting the efficiency of the calibration work. Summary of the Invention
[0003] In view of this, the present disclosure provides a distance sensor calibration method, apparatus, electronic device, and readable storage medium to at least solve the problems existing in the related art.
[0004] According to a first aspect of the present disclosure, a distance sensor calibration method is provided, the method comprising:
[0005] When the first distance sensor is unobstructed, the noise floor value of the first distance sensor is determined based on the ranging parameters collected by the first distance sensor.
[0006] When the distance between the first distance sensor and the obstacle is within a first preset distance range, the first calibration parameter of the first distance sensor is determined based on the ranging parameters collected by the first distance sensor.
[0007] Based on the noise floor value of the first distance sensor, the first calibration parameter, and the preset coefficient, a second calibration parameter of the first distance sensor is determined. The preset coefficient represents the relationship between the difference between the second calibration parameter and the noise floor value and the difference between the first calibration parameter and the noise floor value. The second calibration parameter represents the ranging parameter collected when the first distance sensor maintains a second preset distance range from the obstacle.
[0008] The first distance sensor is calibrated based on its noise floor value, first calibration parameter, and second calibration parameter.
[0009] In conjunction with any embodiment of this disclosure, the method for determining the preset coefficient includes:
[0010] When the second distance sensor is unobstructed, the noise floor value of the second distance sensor is determined based on the ranging parameters collected by the second distance sensor.
[0011] When the distance between the second distance sensor and the obstacle is within a first preset distance range, the third calibration parameter of the second distance sensor is determined based on the ranging parameters collected by the second distance sensor.
[0012] When the second distance sensor maintains a second preset distance range from the obstacle, the fourth calibration parameter of the second distance sensor is determined based on the ranging parameters collected by the second distance sensor.
[0013] The preset coefficient is determined based on the noise floor value of the second distance sensor, the third calibration parameter, and the fourth calibration parameter.
[0014] In any embodiment of this disclosure, determining the noise floor value of the first distance sensor based on the ranging parameters collected by the first distance sensor when the first distance sensor is unobstructed includes:
[0015] Acquire the first ranging parameters collected by the first distance sensor when there are no obstacles obstructing its view;
[0016] In response to the first ranging parameter being within a first preset range, the first ranging parameter is determined as the noise floor value.
[0017] In conjunction with any embodiment of this disclosure, when the distance between the first distance sensor and the obstacle is within a first preset distance range, determining the first calibration parameter of the first distance sensor based on the ranging parameters collected by the first distance sensor includes:
[0018] Acquire second ranging parameters when the distance between the first distance sensor and the obstacle is within a first preset distance range;
[0019] In response to the second ranging parameter being within a second preset range, the second ranging parameter is determined as the first calibration parameter.
[0020] In conjunction with any embodiment of this disclosure, the method further includes:
[0021] In response to the first distance sensor collecting ranging parameters that are not within the first preset range when there are no obstacles obstructing the view, and / or;
[0022] If the ranging parameters collected when the distance between the first distance sensor and the obstacle is within a first preset distance range are not within a second preset range, it is determined that the first distance sensor has a detection error.
[0023] In any embodiment of this disclosure, the first preset distance range is smaller than the second preset distance range;
[0024] The first calibration parameter characterizes the proximity threshold of the first distance sensor;
[0025] The second calibration parameter characterizes the distance threshold of the first distance sensor.
[0026] In any embodiment of this disclosure, the second preset distance range represents any distance between the first distance sensor and the obstacle within the second preset distance range, wherein each distance corresponds to a preset coefficient.
[0027] In any embodiment of this disclosure, the first distance sensor includes an infrared distance sensor, and the noise floor value, the first calibration parameter, and the second calibration parameter of the first distance sensor all characterize the infrared energy value collected by the infrared distance sensor.
[0028] According to a second aspect of the present disclosure, a distance sensor calibration apparatus is provided, the apparatus comprising:
[0029] The first calibration module is used to: determine the noise floor value of the first distance sensor based on the ranging parameters collected by the first distance sensor when the first distance sensor is unobstructed;
[0030] The second calibration module is used to: determine the first calibration parameters of the first distance sensor based on the ranging parameters collected by the first distance sensor when the distance between the first distance sensor and the obstacle is within a first preset distance range;
[0031] The calibration value determination module is used to: determine a second calibration parameter of the first distance sensor based on the noise floor value of the first distance sensor, a first calibration parameter, and a preset coefficient, wherein the preset coefficient represents the relationship between the difference between the second calibration parameter and the noise floor value and the difference between the first calibration parameter and the noise floor value, and the second calibration parameter represents the ranging parameter collected when the first distance sensor maintains a second preset distance range from the obstacle;
[0032] The calibration value update module is used to calibrate the first distance sensor based on the noise floor value of the first distance sensor, the first calibration parameter, and the second calibration parameter.
[0033] In any embodiment of this disclosure, the device for determining the preset coefficient includes:
[0034] The first preset calibration module is used to: determine the noise floor value of the second distance sensor based on the ranging parameters collected by the second distance sensor when the second distance sensor is unobstructed;
[0035] The second preset calibration module is used to: determine the third calibration parameter of the second distance sensor based on the ranging parameters collected by the second distance sensor when the distance between the second distance sensor and the obstacle is within the first preset distance range;
[0036] The third preset calibration module is used to: determine the fourth calibration parameter of the second distance sensor based on the ranging parameters collected by the second distance sensor when the second distance sensor and the obstacle maintain a second preset distance range;
[0037] The preset coefficient determination module is used to determine the preset coefficient based on the noise floor value of the second distance sensor, the third calibration parameter, and the fourth calibration parameter.
[0038] In conjunction with any embodiment of this disclosure, when the first calibration module determines the noise floor value of the first distance sensor based on the ranging parameters collected by the first distance sensor when the first distance sensor is unobstructed, it is specifically used for:
[0039] Acquire the first ranging parameters collected by the first distance sensor when there are no obstacles obstructing its view;
[0040] In response to the first preset distance range of the first ranging parameter being within the first preset interval, the first ranging parameter is determined as the noise floor value.
[0041] In conjunction with any embodiment of this disclosure, when the second calibration module determines the first calibration parameter of the first distance sensor based on the ranging parameters collected by the first distance sensor when the distance between the first distance sensor and the obstacle is within a first preset distance range, it is specifically used for:
[0042] Acquire second ranging parameters when the distance between the first distance sensor and the obstacle is within a first preset distance range;
[0043] In response to the second ranging parameter being within a second preset distance range, the second ranging parameter is determined as the first calibration parameter.
[0044] In any embodiment of this disclosure, the apparatus further includes an error verification module, configured to:
[0045] In response to the first distance sensor collecting ranging parameters that are not within the first preset range when there are no obstacles obstructing the view, and / or;
[0046] If the ranging parameters collected when the distance between the first distance sensor and the obstacle is within a first preset distance range are not within a second preset range, it is determined that the first distance sensor has a detection error.
[0047] In any embodiment of this disclosure, the first preset distance range is smaller than the second preset distance range;
[0048] The first calibration parameter characterizes the proximity threshold of the first distance sensor;
[0049] The second calibration parameter characterizes the distance threshold of the first distance sensor.
[0050] In any embodiment of this disclosure, the second preset distance range represents any distance between the first distance sensor and the obstacle within the second preset distance range, wherein each distance corresponds to a preset coefficient.
[0051] In any embodiment of this disclosure, the first distance sensor includes an infrared distance sensor, and the noise floor value, the first calibration parameter, and the second calibration parameter of the first distance sensor all characterize the infrared energy value collected by the infrared distance sensor.
[0052] According to a third aspect of the present disclosure, an electronic device is provided, comprising:
[0053] Memory for storing processor-executable instructions;
[0054] The processor is configured to execute executable instructions in the memory to implement the steps of the method described in any of the first aspects above.
[0055] According to a fourth aspect of the present disclosure, a computer-readable storage medium is provided having a computer program stored thereon that, when executed by a processor, implements the steps of the method described in any of the embodiments of the first aspect.
[0056] The technical solutions provided in this disclosure may have the following beneficial effects:
[0057] By acquiring the noise floor value collected when the first distance sensor is unobstructed and the first calibration parameter collected when the first distance sensor maintains a first preset distance range from the obstacle, and then determining the second calibration parameter of the first distance sensor together with the preset coefficient, the calibration parameters can be obtained through two acquisition processes and one calculation process. This eliminates the need for the acquisition process of the second calibration parameter, avoids the resource occupation caused by three calibrations for each distance sensor, improves the factory calibration efficiency and the production efficiency of distance sensors, and reduces production costs.
[0058] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this disclosure. Attached Figure Description
[0059] The accompanying drawings, which are incorporated in and form a part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure.
[0060] Figure 1 This disclosure is a flowchart illustrating a distance sensor calibration method according to an exemplary embodiment;
[0061] Figure 2 This disclosure is a flowchart illustrating another distance sensor calibration method according to an exemplary embodiment;
[0062] Figure 3 This is a schematic diagram of a distance sensor calibration device according to an exemplary embodiment of the present disclosure;
[0063] Figure 4 This disclosure is a block diagram of an electronic device according to an exemplary embodiment. Detailed Implementation
[0064] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numerals in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this disclosure. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this disclosure as detailed in the appended claims.
[0065] The terminology used in this disclosure is for the purpose of describing particular embodiments only and is not intended to be limiting of the disclosure. The singular forms “a,” “the,” and “the” as used in this disclosure and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term “and / or” as used herein refers to and includes any and all possible combinations of one or more of the associated listed items.
[0066] It should be understood that although the terms first, second, third, etc., may be used in this disclosure to describe various information, such information should not be limited to these terms. These terms are used only to distinguish information of the same type from one another. For example, without departing from the scope of this disclosure, first information may also be referred to as second information, and similarly, second information may also be referred to as first information. Depending on the context, the word "if" as used herein may be interpreted as "when," "when," or "in response to determination."
[0067] The solution described in this disclosure is applied to smart devices equipped with distance sensors. For example, the smart device can be a mobile phone or other terminal device.
[0068] Figure 1 A flowchart illustrating a distance sensor calibration method according to an exemplary embodiment of this disclosure is shown.
[0069] In step S101, when the first distance sensor is unobstructed, the noise floor value of the first distance sensor is determined based on the ranging parameters collected by the first distance sensor.
[0070] The first distance sensor includes sensors with ranging functions such as infrared distance sensors, ultrasonic distance sensors, laser distance sensors, and radar distance sensors.
[0071] The first distance sensor can send a ranging signal to an obstacle and calculate the actual distance to the obstacle based on the parameters of the ranging signal reflected by the obstacle. However, taking an infrared distance sensor as an example, when the first distance sensor is unobstructed, due to the influence of the distance sensor's hardware structure design, the distance sensor will receive ranging parameters reflected back by the light guide column of the sensor itself, the light-blocking plate between the transmitter and the receiver, which is the noise floor value of the first distance sensor.
[0072] When the first distance sensor is an infrared distance sensor, the noise floor value can be determined based on the ranging parameters collected by the distance sensor. For example, the ranging parameter with the highest reliability can be determined as the noise floor value according to the current usage scenario. Preferably, the noise floor value can be determined according to a preset range. After acquiring the first ranging parameter collected by the first distance sensor when there are no obstacles, in response to the first ranging parameter being within a first preset range, the first ranging parameter is determined as the noise floor value to improve the reliability of the noise floor value.
[0073] Specifically, in response to the first ranging parameter not being within the first preset range, it is determined that the first distance sensor has a detection error.
[0074] Specifically, due to the hardware structure, the ranging parameters collected by the first distance sensor in the absence of obstacles should remain within the first preset range. If the ranging parameters are greater than the maximum value of the first preset range, it indicates that the first distance sensor has a structural hardware problem, such as an abnormal sensor baffle position caused by operational issues. If the ranging parameters are less than the minimum value of the first preset range, it indicates that the signal transmitting end of the first distance sensor is malfunctioning. It is determined that the first distance sensor has a detection error, the noise floor value is not updated, a calibration failure log is output, the first distance sensor is investigated for anomalies, and the calibration method described in this disclosure is executed again.
[0075] In step S102, when the distance between the first distance sensor and the obstacle is within a first preset distance range, the first calibration parameter of the first distance sensor is determined based on the ranging parameters collected by the first distance sensor.
[0076] The first preset distance range can be set according to actual needs, and the first calibration parameter is determined based on the ranging parameters collected by the first distance sensor. Similarly, the ranging parameter with the highest reliability can be determined as the first calibration parameter based on a preset range. Preferably, the first preset distance range can be determined based on empirical values obtained from multiple experiments. When the distance between the first distance sensor and the obstacle is within the first preset distance range, in response to the second ranging parameter collected by the first distance sensor being within a second preset range, the second ranging parameter is determined as the first calibration parameter to improve the reliability of the first calibration parameter.
[0077] If the second ranging parameter exceeds the second preset range, it indicates that the first distance sensor has a structural hardware problem or abnormal ranging operation. It is determined that the first distance sensor has a detection error, the first calibration parameter is not updated, a calibration failure log is output, the first distance sensor is checked for abnormality, and the calibration method described in this disclosure is executed again.
[0078] In step S103, a second calibration parameter of the first distance sensor is determined based on the noise floor value of the first distance sensor, the first calibration parameter, and the preset coefficient. The preset coefficient represents the relationship between the second calibration parameter and the noise floor value and the first calibration parameter and the noise floor value. The second calibration parameter represents the ranging parameter collected when the first distance sensor maintains a second preset distance range from the obstacle.
[0079] Using the noise floor value, first calibration parameter, and preset coefficient determined in the above steps, the second calibration parameter of the first distance sensor can be calculated. The preset coefficient represents the relationship between the difference between the second calibration parameter and the noise floor value, and the difference between the first calibration parameter and the noise floor value; this relationship can be a ratio, product, sum, or difference, etc.
[0080] The difference between the second calibration parameter and the noise floor value represents the ranging parameter reflected by the obstacle to the first distance sensor within a second preset distance range, excluding the influence of the hardware structure of the first distance sensor itself on the reflection of the ranging signal, i.e., the noise floor effect.
[0081] The difference between the first calibration parameter and the background noise value represents the ranging parameter reflected from the obstacle to the first distance sensor within a first preset distance range, excluding the influence of background noise. This disclosure does not limit the relationship between the second preset distance range and the first preset distance range.
[0082] For example, the second calibration parameter of the first distance sensor can be determined according to the following formula:
[0083] Second calibration parameter = f * (first calibration parameter - noise floor value) + noise floor value (1)
[0085] In formula (1), f represents the preset coefficient, and the noise floor value and the first calibration parameter represent the ranging parameter value determined by the first distance sensor through the above steps. The second calibration parameter of the first distance sensor can be determined using the preset coefficient, the noise floor value of the first distance sensor, and the first calibration parameter.
[0086] Optionally, when the first distance sensor is the infrared sensor, the noise floor value, the first calibration parameter, and the second calibration parameter of the first distance sensor all characterize the infrared energy value collected by the infrared distance sensor.
[0087] In step S104, the first distance sensor is calibrated according to the noise floor value of the first distance sensor, the first calibration parameter, and the second calibration parameter.
[0088] Optionally, after determining the noise floor value, the first calibration parameter, and the second calibration parameter of the first distance sensor, the corresponding parameters of the first distance sensor can be updated, that is, the noise floor value, the first calibration parameter, and the second calibration parameter of the first distance sensor are updated to the first distance sensor to achieve a complete calibration process.
[0089] The solution described in this disclosure obtains the noise floor value collected when the first distance sensor is unobstructed and the first calibration parameter collected when the first distance sensor maintains a first preset distance range from the obstacle. The second calibration parameter of the first distance sensor is determined together with the preset coefficient. That is, the calibration parameters can be obtained through two acquisition processes and one calculation process, eliminating the need for the acquisition process of the second calibration parameter. This avoids the resource occupation caused by three calibrations for each distance sensor, improves the factory calibration efficiency and the production efficiency of the distance sensor, and reduces the production cost.
[0090] In an optional embodiment, a method for determining the preset coefficient is as follows: Figure 2 As shown, steps S201 to S204 are included:
[0091] In step S201, when the second distance sensor is unobstructed, the noise floor value of the second distance sensor is determined based on the ranging parameters collected by the second distance sensor.
[0092] The second distance sensor is the same type of sensor as the first distance sensor. When the second distance sensor is unobstructed, the noise floor value can be determined based on the ranging parameters collected by the second distance sensor according to the current usage scenario. The specific determination method is as described in the above steps, and will not be repeated here.
[0093] In step S202, when the distance between the second distance sensor and the obstacle is within a first preset distance range, the third calibration parameter of the second distance sensor is determined based on the ranging parameters collected by the second distance sensor.
[0094] The third calibration parameter can be determined based on the ranging parameters collected by the second distance sensor when the distance between the sensor and the obstacle is within a first preset distance range.
[0095] In step S203, while the second distance sensor maintains a second preset distance range from the obstacle, a fourth calibration parameter of the second distance sensor is determined based on the ranging parameters collected by the second distance sensor.
[0096] Similarly, the fourth calibration parameter can be determined based on the ranging parameters collected by the second distance sensor while maintaining a second preset distance range from the obstacle.
[0097] In step S204, the preset coefficient is determined based on the noise floor value of the second distance sensor, the third calibration parameter, and the fourth calibration parameter.
[0098] For example, the relationship between the fourth calibration parameter and the difference between the noise floor value and the third calibration parameter and the difference between the noise floor value is determined as the preset coefficient.
[0099] Specifically, taking the ratio relationship as an example, the preset coefficient can be determined using formula (2):
[0100]
[0101] The noise floor value, third calibration parameter, and fourth calibration parameter used to calculate the preset coefficient are all pre-selected and collected parameters from the calibrated second distance sensor. Therefore, the preset coefficient is not affected by the ranging parameters collected by the first distance sensor and can be used to determine the second calibration parameters of the first distance sensor.
[0102] Optionally, in the above steps, the second distance sensor can be one or more distance sensors. When the preset coefficient is determined by multiple distance sensors, the noise floor value, the third calibration parameter, and the fourth calibration parameter can be determined based on the average value of multiple ranging parameters collected by the second distance sensor.
[0103] The solution described in this disclosure determines the preset coefficient by using the noise floor value, third calibration parameter, and fourth calibration parameter obtained from a pre-selected second distance sensor, ensuring that the preset coefficient is not affected by the ranging parameter of the first distance sensor, and ensuring the reliability of the second calibration parameter of the first distance sensor.
[0104] In an optional embodiment, the first preset distance range is smaller than the second preset distance range;
[0105] The first calibration parameter characterizes the proximity threshold of the first distance sensor;
[0106] The second calibration parameter characterizes the distance threshold of the first distance sensor.
[0107] Specifically, the distance threshold can be determined by the proximity threshold and the noise floor value of the first distance sensor, along with the preset coefficient. The preset coefficient can be determined using the following formula:
[0108]
[0109] In formula (3), f represents the preset coefficient, and D far The distance sensitivity is represented by the difference between the distance threshold and the noise floor value, D. nearThe proximity sensitivity is represented by the difference between the proximity threshold and the noise floor value. The distance threshold, proximity threshold, and noise floor value are all pre-selected and calibrated parameters of a second distance sensor.
[0110] In addition, the distance threshold can also be determined using the following formula:
[0111] far thread =f*(near thread -crosstalk)+crosstalk (4)
[0112] In formula (4), far thread Characterized by the distance from the threshold, near thread The proximity threshold is defined as the proximity threshold, and the crosstalk value is defined as the noise floor value. Both the proximity threshold and the noise floor value are ranging parameters collected by the first distance sensor.
[0113] If the ranging parameters received by the first distance sensor gradually exceed the approach threshold, it is determined that the first distance sensor is approaching the obstacle; if the ranging parameters received by the first distance sensor gradually decrease below the distance threshold, it is determined that the first distance sensor is moving away from the obstacle.
[0114] The solution described in this disclosure obtains the proximity threshold and noise floor value of the first distance sensor respectively, and determines the distance threshold of the first distance sensor together with a preset coefficient. This eliminates the need for the distance threshold acquisition process, improves factory calibration efficiency and sensor production efficiency, and reduces production costs.
[0115] In another optional embodiment, the second preset distance range represents any distance between the first distance sensor and the obstacle within the second preset distance range, wherein each distance corresponds to a preset coefficient.
[0116] Specifically, firstly, in the process of determining the preset coefficient, multiple distances within the sensing range of the second distance sensor can be used as the preset distances, and different second calibration parameters can be collected respectively to obtain the preset coefficients corresponding to any distance, and the preset coefficients can be used to establish a preset table or plot a function curve.
[0117] After obtaining the noise floor value and the first calibration parameter of the first distance sensor, the second calibration parameter of any distance within the sensing range of the first sensor can be determined by looking up a table or by referring to the function curve.
[0118] The solution described in this disclosure, by determining a preset coefficient for any distance within a preset distance range between the first distance sensor and the obstacle, enables the first distance sensor to determine a second calibration parameter for any distance within the preset distance range based on the noise floor value and the first calibration parameter. This expands the calibrable range of the first distance sensor, allowing users to obtain calibration parameters for any target distance according to their actual needs.
[0119] For the foregoing method embodiments, in order to simplify the description, they are all described as a series of actions. However, those skilled in the art should know that this disclosure is not limited to the described order of actions, because according to this disclosure, some steps may be performed in other orders or simultaneously.
[0120] Secondly, those skilled in the art should also know that the embodiments described in the specification are all optional embodiments, and the actions and modules involved are not necessarily required by this disclosure.
[0121] Corresponding to the aforementioned application function implementation method embodiments, this disclosure also provides embodiments of application function implementation apparatus and corresponding terminals.
[0122] A block diagram of a distance sensor calibration apparatus shown in an exemplary embodiment of this disclosure is as follows: Figure 3 As shown, the device includes:
[0123] The first preset calibration module 301 is used to: determine the noise floor value of the second distance sensor based on the ranging parameters collected by the second distance sensor when the second distance sensor is unobstructed.
[0124] The second preset calibration module 302 is used to: determine the third calibration parameter of the second distance sensor based on the ranging parameters collected by the second distance sensor when the distance between the second distance sensor and the obstacle is within the first preset distance range;
[0125] The third preset calibration module 303 is used to: determine the fourth calibration parameter of the second distance sensor based on the ranging parameters collected by the second distance sensor when the distance between the second distance sensor and the obstacle is within the second preset distance range;
[0126] The preset coefficient determination module 304 is used to determine the preset coefficient based on the noise floor value of the second distance sensor, the third calibration parameter, and the fourth calibration parameter.
[0127] In conjunction with any embodiment of this disclosure, when the first calibration module determines the noise floor value of the first distance sensor based on the ranging parameters collected by the first distance sensor when the first distance sensor is unobstructed, it is specifically used for:
[0128] Acquire the first ranging parameters collected by the first distance sensor when there are no obstacles obstructing its view;
[0129] In response to the first preset distance range of the first ranging parameter being within the first preset interval, the first ranging parameter is determined as the noise floor value.
[0130] In conjunction with any embodiment of this disclosure, when the second calibration module determines the first calibration parameter of the first distance sensor based on the ranging parameters collected by the first distance sensor when the distance between the first distance sensor and the obstacle is within a first preset distance range, it is specifically used for:
[0131] Acquire second ranging parameters when the distance between the first distance sensor and the obstacle is within a first preset distance range;
[0132] In response to the second ranging parameter being within a second preset distance range, the second ranging parameter is determined as the first calibration parameter.
[0133] In any embodiment of this disclosure, the apparatus further includes an error verification module, configured to:
[0134] In response to the first distance sensor collecting ranging parameters that are not within the first preset range when there are no obstacles obstructing the view, and / or;
[0135] If the ranging parameters collected when the distance between the first distance sensor and the obstacle is within a first preset distance range are not within a second preset range, it is determined that the first distance sensor has a detection error.
[0136] In any embodiment of this disclosure, the first preset distance range is smaller than the second preset distance range;
[0137] The first calibration parameter characterizes the proximity threshold of the first distance sensor;
[0138] The second calibration parameter characterizes the distance threshold of the first distance sensor.
[0139] In any embodiment of this disclosure, the second preset distance range represents any distance between the first distance sensor and the obstacle within the second preset distance range, wherein each distance corresponds to a preset coefficient.
[0140] In any embodiment of this disclosure, the first distance sensor includes an infrared distance sensor, and the noise floor value, the first calibration parameter, and the second calibration parameter of the first distance sensor all characterize the infrared energy value collected by the infrared distance sensor.
[0141] For the device embodiments, since they basically correspond to the method embodiments, the relevant parts can be referred to in the description of the method embodiments. The device embodiments described above are merely illustrative, and the units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this disclosure according to actual needs. Those skilled in the art can understand and implement this without creative effort.
[0142] Figure 4 A block diagram of an electronic device is shown according to an exemplary embodiment of the present disclosure.
[0143] Please refer to the appendix. Figure 4 The diagram illustrates, for example, a block diagram of an electronic device. For instance, device 400 could be a mobile phone, computer, digital broadcasting terminal, messaging device, game console, tablet device, medical device, fitness equipment, personal digital assistant, etc.
[0144] Reference Figure 4 The device 400 may include one or more of the following components: a processing component 402, a memory 404, a power supply component 406, a multimedia component 408, an audio component 410, an input / output (I / O) interface 412, a sensor component 414, and a communication component 416.
[0145] Processing component 402 typically controls the overall operation of device 400, such as operations associated with display, telephone calls, data communication, camera operation, and recording. Processing component 402 may include one or more processors 420 to execute instructions to perform all or part of the steps of the methods described above. Furthermore, processing component 402 may include one or more modules to facilitate distance sensor calibration between processing component 402 and other components. For example, processing component 402 may include a multimedia module to facilitate distance sensor calibration between multimedia component 408 and processing component 402.
[0146] Memory 404 is configured to store various types of data to support the operation of device 400. Examples of this data include instructions for any application or method operating on device 400, contact data, phonebook data, messages, pictures, videos, etc. Memory 404 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk.
[0147] The power supply component 406 provides power to the various components of the device 400. The power supply component 406 may include a power management system, one or more power sources, and other components associated with generating, managing, and distributing power to the device 400.
[0148] Multimedia component 408 includes a screen that provides an output interface between the device 400 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touchscreen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensors may sense not only the boundaries of the touch or swipe action but also the duration and pressure associated with the touch or swipe operation. In some embodiments, multimedia component 408 includes a front-facing camera and / or a rear-facing camera. When the device 400 is in an operating mode, such as a shooting mode or a video mode, the front-facing camera and / or the rear-facing camera may receive external multimedia data. Each front-facing camera and rear-facing camera may be a fixed optical lens system or have focal length and optical zoom capabilities.
[0149] Audio component 410 is configured to output and / or input audio signals. For example, audio component 410 includes a microphone (MIC) configured to receive external audio signals when device 400 is in an operating mode, such as call mode, recording mode, and voice recognition mode. The received audio signals may be further stored in memory 404 or transmitted via communication component 416. In some embodiments, audio component 410 includes a speaker for outputting audio signals.
[0150] I / O interface 412 provides an interface between processing component 402 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to, home buttons, volume buttons, power buttons, and lock buttons.
[0151] Sensor assembly 414 includes one or more sensors for providing state assessments of various aspects of device 400. For example, sensor assembly 414 may detect the on / off state of device 400, the relative positioning of components such as the display and keypad of device 400, changes in the position of device 400 or a component of device 400, the presence or absence of user contact with device 400, the orientation or acceleration / deceleration of device 400, and temperature changes of device 400. Sensor assembly 414 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. Sensor assembly 414 may include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, sensor assembly 414 may include an accelerometer, a gyroscope, a magnetometer, a pressure sensor, or a temperature sensor.
[0152] Communication component 416 is configured to facilitate wired or wireless communication between device 400 and other devices. Device 400 can access wireless networks based on communication standards, such as WiFi, 2G or 3G, 4G or 5G, or combinations thereof. In one exemplary embodiment, communication component 416 receives broadcast signals or broadcast-related information from an external broadcast management system via a broadcast channel. In one exemplary embodiment, communication component 416 includes a near-field communication (NFC) module to facilitate short-range communication. For example, the NFC module may be implemented based on radio frequency identification (RFID) technology, Infrared Data Association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.
[0153] In an exemplary embodiment, the device 400 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field-programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the power supply method of the aforementioned electronic device.
[0154] In exemplary embodiments, this disclosure provides a non-transitory computer-readable storage medium including instructions, such as a memory 404 including instructions, which can be executed by a processor 420 of a device 400 to perform the power supply method of the aforementioned electronic device. For example, the non-transitory computer-readable storage medium may be a ROM, random access memory (RAM), CD-ROM, magnetic tape, floppy disk, and optical data storage device, etc.
[0155] Other embodiments of this disclosure will readily occur to those skilled in the art upon consideration of the specification and practice of the disclosure herein. This disclosure is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this disclosure are indicated by the following claims.
[0156] It should be understood that this disclosure is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this disclosure is limited only by the appended claims.
Claims
1. A distance sensor calibration method, characterized in that, The method includes: When the first distance sensor is unobstructed, the noise floor value of the first distance sensor is determined based on the ranging parameters collected by the first distance sensor. When the distance between the first distance sensor and the obstacle is within a first preset distance range, the first calibration parameter of the first distance sensor is determined based on the ranging parameters collected by the first distance sensor. The second calibration parameters of the first distance sensor are determined based on the noise floor value of the first distance sensor, the first calibration parameters, and the preset coefficients. The first distance sensor is calibrated based on its noise floor value, first calibration parameter, and second calibration parameter. The method for determining the preset coefficient includes: When the second distance sensor is unobstructed, the noise floor value of the second distance sensor is determined based on the ranging parameters collected by the second distance sensor. When the distance between the second distance sensor and the obstacle is within a first preset distance range, the third calibration parameter of the second distance sensor is determined based on the ranging parameters collected by the second distance sensor. When the second distance sensor maintains a second preset distance range from the obstacle, the fourth calibration parameter of the second distance sensor is determined based on the ranging parameters collected by the second distance sensor. The preset coefficient is determined based on the noise floor value of the second distance sensor, the third calibration parameter, and the fourth calibration parameter.
2. The method according to claim 1, characterized in that, When the first distance sensor is unobstructed, determining the noise floor value of the first distance sensor based on the ranging parameters collected by the first distance sensor includes: Acquire the first ranging parameters collected by the first distance sensor when there are no obstacles obstructing its view; In response to the first ranging parameter being within a first preset range, the first ranging parameter is determined as the noise floor value.
3. The method according to claim 1, characterized in that, When the distance between the first distance sensor and the obstacle is within a first preset distance range, the first calibration parameter of the first distance sensor is determined based on the ranging parameters collected by the first distance sensor, including: Acquire second ranging parameters when the distance between the first distance sensor and the obstacle is within a first preset distance range; In response to the second ranging parameter being within a second preset range, the second ranging parameter is determined as the first calibration parameter.
4. The method according to claim 1, characterized in that, The method further includes: In response to the first distance sensor collecting ranging parameters that are not within the first preset range when there are no obstacles obstructing the view, and / or; If the ranging parameters collected when the distance between the first distance sensor and the obstacle is within a first preset distance range are not within a second preset range, it is determined that the first distance sensor has a detection error.
5. The method according to any one of claims 1 to 4, characterized in that, The first preset distance range is smaller than the second preset distance range; The first calibration parameter characterizes the proximity threshold of the first distance sensor; The second calibration parameter characterizes the distance threshold of the first distance sensor.
6. The method according to any one of claims 1 to 4, characterized in that, The second preset distance range represents any distance between the first distance sensor and the obstacle within the second preset distance range, wherein each distance corresponds to a preset coefficient.
7. The method according to claim 1, characterized in that, The first distance sensor includes an infrared distance sensor, and the noise floor value, the first calibration parameter, and the second calibration parameter of the first distance sensor all characterize the infrared energy value collected by the infrared distance sensor.
8. A distance sensor calibration device, characterized in that, The device includes: The first calibration module is used to: determine the noise floor value of the first distance sensor based on the ranging parameters collected by the first distance sensor when the first distance sensor is unobstructed; The second calibration module is used to: determine the first calibration parameters of the first distance sensor based on the ranging parameters collected by the first distance sensor when the distance between the first distance sensor and the obstacle is within a first preset distance range; The calibration value determination module is used to: determine the second calibration parameter of the first distance sensor based on the noise floor value of the first distance sensor, the first calibration parameter, and the preset coefficient; The calibration value update module is used to: calibrate the first distance sensor according to the noise floor value of the first distance sensor, the first calibration parameter, and the second calibration parameter; The device for determining the preset coefficient includes: The first preset calibration module is used to: determine the noise floor value of the second distance sensor based on the ranging parameters collected by the second distance sensor when the second distance sensor is unobstructed; The second preset calibration module is used to: determine the third calibration parameter of the second distance sensor based on the ranging parameters collected by the second distance sensor when the distance between the second distance sensor and the obstacle is within the first preset distance range; The third preset calibration module is used to: determine the fourth calibration parameter of the second distance sensor based on the ranging parameters collected by the second distance sensor when the second distance sensor and the obstacle maintain a second preset distance range; The preset coefficient determination module is used to determine the preset coefficient based on the noise floor value of the second distance sensor, the third calibration parameter, and the fourth calibration parameter.
9. The apparatus according to claim 8, characterized in that, When the first calibration module determines the noise floor value of the first distance sensor based on the ranging parameters collected by the first distance sensor when the first distance sensor is unobstructed, it is specifically used for: Acquire the first ranging parameters collected by the first distance sensor when there are no obstacles obstructing its view; In response to the first ranging parameter being within a first preset range, the first ranging parameter is determined as the noise floor value.
10. The apparatus according to claim 8, characterized in that, When the second calibration module determines the first calibration parameter of the first distance sensor based on the ranging parameters collected by the first distance sensor, provided that the distance between the first distance sensor and the obstacle is within a first preset distance range, the second calibration module is specifically used for: Acquire second ranging parameters when the distance between the first distance sensor and the obstacle is within a first preset distance range; In response to the second ranging parameter being within a second preset range, the second ranging parameter is determined as the first calibration parameter.
11. An electronic device, characterized in that, The electronic device includes: Memory is used to store processor-executable instructions; A processor is configured to execute executable instructions in the memory to implement the steps of the method according to any one of claims 1 to 7.
12. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 7.