A method and apparatus for increasing the measurement range of a distance sensor
By controlling the frame rate and signal processing of the P-sensor, removing background signals, and optimizing signal processing, the problem of insufficient detection range of the P-sensor in outdoor environments has been solved, enabling the recognition of target objects at greater distances and improving anti-interference capabilities.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SHENZHEN GUANGJIAN TECH CO LTD
- Filing Date
- 2022-02-24
- Publication Date
- 2026-04-10
AI Technical Summary
In outdoor environments, P-sensors are affected by stray light and atmospheric conditions, resulting in insufficient effective detection distance and significantly reduced measurement performance. They are particularly difficult to accurately identify target objects under strong light conditions.
By controlling the frame rate of the P-sensor to illuminate the target object and receive the reflected signal, the background signal is removed, the target object area is selected, and the signal processing is optimized using preset intensity and judgment threshold to achieve stable recognition of the target object.
It improves anti-interference performance in outdoor environments, enhances the recognition effect of target objects, enables the measurement of target objects at greater distances, reduces costs, and ensures the sensitivity and miniaturization of the device.
Smart Images

Figure CN116699637B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of touchless detection, in particular, to a method and device for improving the measurement range of a distance sensor. BACKGROUND
[0002] P-sensor, also known as proximity sensor, is used for proximity distance sensing. P-sensor is usually designed at a corner of the mobile phone screen, near the earpiece, and responds by sensing the different distances between the mobile phone and the human body. When the mobile phone is in a call state, the mobile phone screen is close to the user's face, and the sensor automatically senses the distance between the mobile phone and the face. When the distance is less than a certain value, the mobile phone screen is turned off and does not respond to the user's touch operation, effectively preventing accidental touch screen during the call. Once the mobile phone screen is away from the user's face to a certain distance, the screen will automatically wake up and can normally perform touch screen operation.
[0003] Not only on the mobile phone, but also on the car, the application is well known to all. Now high-end cars have a reversing alarm system, which can issue an alarm when the car is close to the object behind it, and the alarm frequency will be higher as the distance becomes shorter, thereby helping new drivers park. In addition, it can also test the distance between the car and the car, etc.
[0004] P-sensor performs well indoors, but is greatly affected by stray light and atmospheric conditions outdoors. In strong outdoor light, its effective detection distance can only reach 30 cm or even lower, thus greatly reducing its effectiveness. In some application scenarios, the presence of the target object can suppress stray light, resulting in a significant gap in the detected data. SUMMARY
[0005] Therefore, without changing the hardware, the present application collects the depth data of the target object and the background, removes the depth data of the background, obtains the target object region, and thus obtains the original image of the target object, which is beneficial to protect the originality of the data and can improve the signal-to-noise ratio, thereby obtaining more stable depth data, which can better process the data and improve the anti-interference ability.
[0006] In a first aspect, the present application provides a method for improving the measurement range of a distance sensor, characterized in that it comprises the following steps:
[0007] A method for improving the measurement range of a distance sensor, characterized in that it comprises the following steps:
[0008] S1: controlling the P-sensor to irradiate the target object at a frame rate N1;
[0009] S2: control the receiver to receive the reflected signal at a frame rate N2, and mark the received signal when the P-sensor is irradiated as F1, and mark the received signal when the P-sensor is not irradiated as F2; wherein N2 is greater than N1;
[0010] S3: subtract F2 from F1 to obtain a first signal M1 of the target object, and screen the pixels in the first signal M1 by a preset intensity s to obtain a target object region T1 with an intensity greater than s;
[0011] S4: extract the region corresponding to T1 in F1 as an effective signal F of the target object.
[0012] Optionally, the method for improving the measurement range of the distance sensor further comprises:
[0013] S5: if the average intensity of the effective signal F is greater than a preset value w, reset the effective signal F to the region corresponding to T1 in M1.
[0014] Optionally, the method for improving the measurement range of the distance sensor further comprises:
[0015] Optionally, the method for improving the measurement range of the distance sensor further comprises:
[0016] Optionally, the method for improving the measurement range of the distance sensor further comprises:
[0017] S21: receive the signal F1 when the P-sensor irradiates the target object;
[0018] S23: receive the signal F2 when the P-sensor does not irradiate the target object.
[0019] Optionally, the method for improving the measurement range of the distance sensor further comprises:
[0020] In a second aspect, the present application provides a device for improving the measurement range of a distance sensor, comprising:
[0021] a transmitter for irradiating a target object at a frame rate N1;
[0022] a receiver for receiving reflected signals at a frame rate N2; wherein N2 is greater than N1.
[0023] The calculator is used for marking the signal received when the P-sensor is irradiated as F1, marking the signal received when the P-sensor is not irradiated as F2, subtracting F2 from F1 to obtain the first signal M1 of the target object, and screening the pixels in the first signal M1 through a preset intensity s to obtain the target object region T1 with the intensity greater than s; and the region corresponding to T1 in F1 is extracted as the effective signal F of the target object.
[0024] Optionally, the device for improving the measurement range of a distance sensor further comprises a resetting module,
[0025] The resetting module is used for resetting the effective signal F to the region corresponding to T1 in M1 if the average intensity of the effective signal F is greater than a preset value w.
[0026] Optionally, the device for improving the measurement range of a distance sensor further comprises a judging module,
[0027] The judging module is used for changing the judging threshold of the effective signal F according to a pre-stored intensity value and a judging threshold.
[0028] Optionally, the device for improving the measurement range of a distance sensor further comprises a receiver,
[0029] The first receiving unit is used for receiving the signal F1 when the P-sensor irradiates the target object when the P-sensor irradiates the target object;
[0030] The second receiving unit is used for receiving the signal F2 when the P-sensor does not irradiate the target object when the P-sensor does not irradiate the target object.
[0031] Optionally, the device for improving the measurement range of a distance sensor further comprises that the judging threshold of the effective signal F can have multiple groups to judge the distance range of the target object.
[0032] Optionally, the device for improving the measurement range of a distance sensor further comprises that the duration t1 received by the first receiving unit is greater than the duration t2 received by the second receiving unit to improve the frame rate.
[0033] In a third aspect, the present application provides an electronic device, which is characterized by comprising the device for improving the measurement range of a distance sensor.
[0034] Compared with the prior art, the present application has the following beneficial effects:
[0035] This invention achieves better anti-interference performance outdoors by removing background information. By removing background information, the target object becomes more prominent, enhancing its recognition and enabling measurements of objects at greater distances. This invention optimizes measurement performance solely through algorithmic control, reducing application costs and facilitating industrial adoption. It removes background information without the need for additional filters while maintaining sensitivity, promoting miniaturization and integration of the device. By using initial data as the effective signal and preserving original information, this invention maximizes data retention and facilitates functional versatility. Attached Figure Description
[0036] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are merely embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort. Other features, objects, and advantages of the present invention will become more apparent by reading the following detailed description of non-limiting embodiments with reference to the accompanying drawings:
[0037] Figure 1 This is a flowchart of a method for improving the measurement range of a distance sensor according to an embodiment of the present invention;
[0038] Figure 2 This is a flowchart of another method for improving the measurement range of a distance sensor in an embodiment of the present invention;
[0039] Figure 3 This is a flowchart illustrating another method for improving the measurement range of a distance sensor in an embodiment of the present invention;
[0040] Figure 4 This is a schematic diagram of a transmission and reception method according to an embodiment of the present invention;
[0041] Figure 5 This is a structural block diagram of a device for improving the measurement range of a distance sensor according to an embodiment of the present invention;
[0042] Figure 6 This is a structural block diagram of another device for improving the measurement range of a distance sensor in an embodiment of the present invention;
[0043] Figure 7 This is a structural block diagram of another device for improving the measurement range of a distance sensor in an embodiment of the present invention;
[0044] Figure 8 This is a structural block diagram of a receiver according to an embodiment of the present invention;
[0045] Figure 9It is a measured effect diagram in an embodiment of the present application;
[0046] Figure 10 It is an electronic device for improving the measurement range of a distance sensor in an embodiment of the present application. DETAILED DESCRIPTION
[0047] The present application will be described in detail below with specific embodiments. The following embodiments will help those skilled in the art to further understand the present application, but do not limit the present application in any form. It should be pointed out that for those skilled in the art, without departing from the concept of the present application, a number of modifications and improvements can be made. These all belong to the protection scope of the present application.
[0048] The terms "first", "second", "third", "fourth" and the like (if any) in the description, claims and above-mentioned drawings of the present application are used to distinguish similar objects, and do not necessarily have to describe a specific order or sequence. It should be understood that the data thus used can be interchanged under appropriate circumstances, so that the embodiments of the present application described herein, for example, can be implemented in an order other than those illustrated or described herein. In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusion, for example, a process, method, system, product or device including a series of steps or units does not have to be limited to those steps or units clearly listed, but can include other steps or units not clearly listed or inherent to these processes, methods, products or devices.
[0049] The technical solutions of the present application will be described in detail below with specific embodiments. The following specific embodiments can be combined with each other, and for the same or similar concepts or processes, some embodiments may not be described again.
[0050] The technical solutions of the present application and how the technical solutions of the present application solve the above technical problems will be described in detail below with specific embodiments. The following specific embodiments can be combined with each other, and for the same or similar concepts or processes, some embodiments may not be described again.
[0051] Figure 1 It is a flowchart of a method for improving the measurement range of a distance sensor in an embodiment of the present application, comprising the following steps:
[0052] S1: control P-sensor to irradiate the target object at frame rate N1.
[0053] In this step, the P-sensor referred to in the embodiment is a photoelectric proximity sensor. The P-sensor emits infrared radiation to the target object at a fixed time interval, and the frame rate is N1. For example, if the infrared radiation is emitted 10 times in one second, the frame number is 10, and the frame rate N1 = 10.
[0054] S2: Control the receiver to receive the reflected signal at a frame rate N2, and mark the received signal when the P-sensor is irradiated as F1, and mark the received signal when the P-sensor is not irradiated as F2.
[0055] In this step, the receiver is in a state of receiving signals at any time, and the state of the receiver receiving signals is distinguished by time, so that the signals have stronger distinguishability. F1 and F2 are both sets of multiple signals. N2 is greater than N1, that is, the receiving frequency of the receiver is higher than the emitting frequency of the P-sensor, so that the receiver also receives the signal when the P-sensor is not irradiated. In this step, all the signals emitted and returned in the previous step are received. It should be noted that F1 refers to the received signal when the P-sensor is irradiated, but it does not mean that the receiver starts to receive at the same time as the P-sensor starts to irradiate, but it means that the signal reflected to the receiver starts to receive when the P-sensor is irradiated, and the receiving duration is the same as the P-sensor irradiation time. Similarly, the signal received by F2 when the P-sensor is not irradiated refers to the signal when there is no reflection signal generated by the P-sensor irradiation. Preferably, N2 is 2 times or more than N1.
[0056] S3: Subtract F2 from F1 to obtain the first signal M1 of the target object, and screen the pixels in the first signal M1 by a preset intensity s to obtain the target object region T1 with an intensity greater than s.
[0057] In this step, the signals received in the previous step are further distinguished and calculated to obtain the target object region T1. The number of elements in F1 and F2 can be equal or not equal, that is, the number of elements in F2 is not less than the number of elements in F1. Preferably, the number of elements in F1 is equal to the number of elements in F2. If the number of elements in F2 is greater than the number of elements in F1, all elements in F2 between the adjacent two irradiations of the P-sensor are combined. When combining, the average value calculation method can be used, including direct average value calculation and weighted average value calculation. When using weighted average value calculation, the shorter the time from the corresponding element in F1, the greater the weight. After combining, the number of elements in F1 is equal to the number of elements in F2. Subtract F2 from F1 to obtain the first signal M1 of the target object.
[0058] Since the image pixel values of the background in F1 and F2 are very close, the pixel value of the background in the first signal M1 is very close to 0. Given a small preset intensity s, and the pixel points with the pixel intensity greater than the preset value s are extracted in the first signal M1, so that the background can be effectively filtered out, and only the information of the target object is obtained. The extracted pixel points constitute the target object as a whole, and the region where the target object is located is the target object region T1.
[0059] S4: Extracting the region corresponding to T1 in F1 as the effective signal F of the target object.
[0060] Since the pixels in F1 and F2 are one-to-one corresponding, the target object region T1 can obtain a unique corresponding region in F1, and the corresponding region is extracted, that is, the effective signal F of the target object is obtained.
[0061] The embodiment can identify the target object region and extract the original data of the target object, so that the initial information can be preserved to the greatest extent, and the embodiment can be applied to various processing. Meanwhile, the embodiment has good restoration and identification ability for complex spatial structures.
[0062] Figure 2 The flowchart of another method for improving the measurement range of the distance sensor in the embodiment of the application. Compared with the previous embodiment, the embodiment further includes:
[0063] S5: If the average intensity of the effective signal F is greater than a preset value w, resetting the effective signal F to the region corresponding to T1 in M1.
[0064] In this step, the effective signal F has multiple pixel points. Each pixel point has an intensity value, and the average intensity value of the multiple pixel points is the arithmetic mean of the intensity values of the multiple pixel points, which can be used to evaluate whether the intensity can be directly used for calculation. In practice, if the target object can block the stray light with very high light intensity, the average intensity of the effective signal F obtained in the previous step is within a certain range and is less than the preset value w. If the target object cannot effectively block the stray light with very high light intensity, the average intensity of the effective signal F obtained in the previous step is relatively large and exceeds the preset value w, so that the information cannot be directly and effectively processed. At this time, the effective signal F is reset to the region corresponding to T1 in M1, so that F can return to a reasonable range. It should be noted that the region corresponding to T1 in M1 cannot be obtained by simply performing numerical transformation (such as addition or subtraction operation on all pixels) on the region corresponding to T1 in F1. This is because the corresponding region in F2 is a region with non-uniform intensity generated according to the stray light, the characteristics of the target object, and the like. This step can make the embodiment have a wider range of adaptation, so that the embodiment has a good processing effect for more application scenarios.
[0065] In some embodiments, the judgment threshold of the effective signal F is changed according to the pre-stored intensity value and the judgment threshold.
[0066] In this step, there are usually pre-stored intensity value and judgment threshold in the existing system. The intensity value m is the preset ambient light intensity, and the judgment threshold n is the standard corresponding to the intensity value for judging whether the distance is close enough. The judgment threshold n is subtracted from the intensity value m to obtain the judgment threshold of the effective signal F. If the judgment threshold m is a single value, the judgment threshold of the effective signal F is directly obtained by n-m. In some embodiments, to ensure that the intensity fluctuation of light does not cause frequent opening and closing, the judgment threshold m is a value range (x, y), where x < y. The values in m are all subtracted from n to obtain a new value range (x-n, y-n) as the judgment threshold of the effective signal F.
[0067] In some embodiments, the judgment threshold of the effective signal F can have multiple groups to judge the distance range of the target object. Since this embodiment uses the effective signal F for judgment, the data is more accurate, stable, and has strong anti-interference ability, and can measure a farther range, so that higher precision distance measurement can be realized on the basis of the rough measurement range of the prior art. By dividing the judgment threshold into more ranges, such as dividing the judgment threshold into three distance ranges, respectively marked as the first distance, the second distance and the third distance, and the distances are from near to far. More detailed division can achieve more data acquisition for users, and does not need to increase additional industrial costs. For example, the distance of the user from the mobile phone is usually related to the user's vision, so the distance judgment can achieve the acquisition of the user's vision information.
[0068] Unlike the prior art which needs to constantly change its judgment threshold according to the ambient light intensity, this embodiment filters out the influence of the ambient light intensity, so that the judgment threshold is more stable and has higher precision. The embodiment is more sensitive to the change of the effective signal, and has stronger adaptability to different environments. Data that cannot be measured in the prior art can also be well processed. The embodiment makes the judgment threshold only related to the parameters of the receiver itself, greatly reducing the cost of batch setting of the system.
[0069] Figure 3 The flowchart of another method for improving the measurement range of the distance sensor in the embodiment of the application. Compared with step S2 in the foregoing embodiment: controlling the receiver to receive the reflected signal at a frame rate N2, this step further comprises:
[0070] S21: receiving the signal F1 when the P-sensor irradiates the target object when the P-sensor irradiates the target object.
[0071] In this step, as Figure 4As shown, when the P-sensor irradiates the target object, the first received signal is marked as f1, the second as f3, the third as f5, and so on, thereby forming a set F1. After each F1 is received, step S22 is performed.
[0072] S22: Pausing receiving.
[0073] In this step, immediately after the previous step is completed, this step is performed, and no signal is received. The receiver is still in working state, but no longer processes its signal. The duration of this step can be very short, as long as it can be distinguished from steps S21 and S23. After this step is performed, step S23 is performed.
[0074] S23: Receiving a signal F2 when the P-sensor does not irradiate the target object.
[0075] In this step, the P-sensor no longer irradiates the target object, the first received signal is marked as f2, the second as f4, the third as f6, and so on, thereby forming a set F2. The acquisition of signal F2 can be continuous or discontinuous. If it is discontinuous, the multiple data obtained in this step are processed to obtain the final data. The data processing method is described in the foregoing embodiments. After this step is performed, step S24 is performed. In some embodiments, this step can be combined with the previous step, thereby shortening the overall time and improving the frame rate.
[0076] S24: Pausing receiving.
[0077] In this step, immediately after the previous step is completed, this step is performed, and no signal is received. The receiver is still in working state, but no longer processes its signal. The duration of this step can be very short, as long as it can be distinguished from steps S23 and S21. After this step is performed, step S21 is performed.
[0078] In this embodiment, the effective signal F is (f1-f2, f3-f4, f5-f6,...). The effective signal F can be obtained after each execution of step S23, thereby being obtained quickly.
[0079] In some embodiments, the duration t1 of S21 is greater than the duration t2 of S23, to improve the frame rate. Each F1 takes t1, and each F2 takes t2. To improve the frame rate, the value of t1 / t2 can be increased, so that the duration t1 of S21 is greater than the duration t2 of S23. In the case of extreme optimization of the frame rate, this embodiment only includes steps S21 and S23, and t2 is less than t1. t2 needs to satisfy the minimum time length for distinguishing between two adjacent emissions of the P-sensor.
[0080] In some embodiments, the motion state of the target object can also be detected according to multiple measurement results, including the following sub-steps:
[0081] S51: Identify the target object according to the effective signal F.
[0082] S52: Compare the target object distance change value P between multiple effective signals;
[0083] S53: If P exceeds the preset value, determine the motion state.
[0084] The motion state determined here is the motion state relative to the P-sensor. If it is necessary to determine the running state of the target object relative to the ground, other parameters need to be combined for comprehensive judgment.
[0085] In this embodiment, different signals are received according to different states of the P-sensor, and different marks are made, so that the effective signal can be obtained by processing different marked signals. This embodiment can be configured differently according to different needs, has better adaptability, improves the reliability of data, and also has high efficiency, which can greatly improve the application range of the scheme.
[0086] Figure 5 The structural block diagram of a device for improving the measurement range of a distance sensor in an embodiment of the present application comprises:
[0087] The transmitter 11 is used to irradiate the target object at a frame rate N1.
[0088] Specifically, the transmitter 11 can be an optical distance sensor, an infrared distance sensor, an ultrasonic distance sensor, etc., as long as it can realize its detection function. This embodiment takes an infrared distance sensor as an example for description, and the infrared distance sensor is also the most commonly used type in mobile terminals at present. The transmitter 11 has an infrared emitter tube, which realizes irradiation of the target object by emitting infrared rays. The transmitter 11 emits infrared rays at a fixed frequency, and the frame rate is N1. The transmitter 11 measures the distance according to the TOF method, that is, the transmitter 11 emits infrared floodlight.
[0089] The receiver 12 is used to receive the reflected signal at a frame rate N2.
[0090] Specifically, N2 is greater than N1. The receiver 12 is an infrared receiver, which includes an infrared receiving tube and can receive the infrared rays emitted by the transmitter 11. Different infrared receivers have different sensitivities to infrared light, and the infrared receiver with appropriate parameters can be selected according to actual use needs.
[0091] The calculator 13 marks the received signal when the P-sensor is irradiated as F1, marks the received signal when the P-sensor is not irradiated as F2, subtracts F2 from F1 to obtain the first signal M1 of the target object, and screens the pixels in the first signal M1 by a preset intensity s to obtain the target object region T1 with an intensity greater than s; and extracts the region corresponding to T1 in F1 as the effective signal F of the target object.
[0092] Specifically, the calculator 13 processes the received signal. The calculator 13 can be integrated in a chip or outside the chip, and can be a dedicated calculator or shared with other applications or programs with computing requirements. The calculator 13 realizes the identification of the target region through the comparison of F1 and F2, so that the corresponding target object information in F1 can be extracted as the effective signal F.
[0093] The embodiment improves the existing device, and only needs to improve the control and calculation to realize the function, which is beneficial to the application in the existing system, reduces the application cost, and realizes better function. The embodiment can filter out stray light without increasing the filter, saves the cost, reduces the system complexity, does not need to change the existing system, and is beneficial to popularization and application.
[0094] Figure 6 The structural block diagram of another device for improving the measurement range of the distance sensor in the embodiment of the application further includes a reset module 14 compared with the previous embodiment,
[0095] The reset module 14 is configured to reset the effective signal F to the region corresponding to T1 in M1 if the average intensity of the effective signal F is greater than a preset value w.
[0096] Specifically, the reset module 14 identifies and judges the data obtained by the calculator 13, and selects whether to replace the data according to the judgment result. If the average intensity of the effective signal F is greater than the preset value w, the light intensity of the effective signal obtained by the calculator 13 is relatively strong as a whole, the signal-to-noise ratio is very low, and the data is less identifiable. The reset module 14 replaces the data with a low signal-to-noise ratio with data with a high signal-to-noise ratio to improve the data identifiability and make the data more accurate. The reset module 14 and the calculator 13 can be two completely independent modules or two small parts integrated in a large module, and the embodiment does not limit this.
[0097] Figure 7 The structural block diagram of another device for improving the measurement range of the distance sensor in the embodiment of the application further includes a reset module 14 compared with the previous embodiment,
[0098] The judging module 15 is used for changing the judging threshold of the effective signal F according to the pre-stored intensity value and the judging threshold.
[0099] Specifically, the judging module 15 calculates the judging threshold of F by using the pre-stored intensity value and the judging threshold in the original system, so that the calculation or test of the terminal can be avoided, the efficiency of the system arrangement is improved, and the cost of the arrangement is reduced.
[0100] In some embodiments, the judging threshold of the effective information F can have multiple groups to judge the distance range of the target object.
[0101] Figure 8 The structure block diagram of a receiver in an embodiment of the present application further comprises:
[0102] The first receiving unit 121 is used for receiving the signal F1 when the P-sensor irradiates the target object.
[0103] Specifically, the first receiving unit 121 is used for identifying the signal F1 when the P-sensor irradiates the target object, and marking the received signals as odd numbers f1, f3, f5… according to the sequence. F1 is the set of f1, f3, f5…
[0104] The second receiving unit 122 is used for receiving the signal F2 when the P-sensor does not irradiate the target object.
[0105] Specifically, the second receiving unit 122 is used for identifying F2, and marking the received signals as even numbers f2, f4, f6… according to the sequence. F2 is the set of f2, f4, f6… Arranging F1 and F2 in time sequence can obtain f1, f2, f3, f4, f5, f6… The duration t1 of the receiving of the first receiving unit is greater than the duration t2 of the receiving of the second receiving unit, so as to improve the frame rate.
[0106] In some embodiments, the control unit 123 is further used for controlling the receiving and stopping of the first receiving unit and the second receiving unit.
[0107] Specifically, the control unit 123 is used for controlling the receiving frequency of the first receiving unit 121 and the second receiving unit 122, so that the signals of F1 and F2 can be accurately acquired, and various forms of control can be realized, such as t1=t2, t1>t2, and the like. The phased acquisition of F2 can also be realized, such as that the data of f2 is acquired twice, and the like.
[0108] Figure 9As an actual measurement effect diagram in the embodiment of the present application, through the calculation of the calculator 13, the effective signal F1(1) is obtained, and the light intensity in F1(1) is too strong, so the reset module 14 resets F1 to f1-f2 to obtain F1(2), which is the final effective signal. As can be seen from the diagram, since the time interval for obtaining f1 and f2 is very short, the background information does not change significantly, and the P-sensor cannot obtain signals at a long distance, so in the effective signal F1, the background information becomes 0, that is, black, and the target object is well highlighted, making subsequent processing easier and the judgment effect greatly improved. The signal-to-noise ratio of f1 under the same distance condition is 1.2, the signal-to-noise ratio of F1 is 6, and the signal-to-noise ratio after background reduction is 5 times higher than before, that is, the signal-to-noise ratio is greatly improved in this embodiment. Compared with f1, the target object in F1 is more prominent, from unprocessable to very easy to process, so the detection distance of the device is enhanced, and the anti-interference ability is also enhanced.
[0109] Figure 10 As an electronic device for improving the measurement range of a distance sensor in the embodiment of the present application, it comprises the device described in any of the above.
[0110] Specifically, the electronic device can be of various types and various sizes. This embodiment takes a mobile phone as an example for illustration. As shown in Figure 10 The mobile phone comprises a device for improving the measurement range of a distance sensor 101, a display screen 102, and a shell 103. The device for improving the measurement range of a distance sensor 101 is used to realize the functions described in the foregoing embodiments, and can realize stable measurement of a target object. The device for improving the measurement range of a distance sensor 101 can be located on the side of the display screen 102 or below the display screen 102, as long as it has a way to emit and receive signals outward. The device for improving the measurement range of a distance sensor 101 and the display screen 102 are both mounted on the shell 103, and the device for improving the measurement range of a distance sensor 101 is located at the edge part, and the display screen is located near the central position. The mobile phone usually also has a battery to realize power supply for the device for improving the measurement range of a distance sensor 101 and the display screen 102, so that they realize their respective functions. Compared with the electronic device in the prior art, the present embodiment makes the data acquisition more accurate and the measurement range longer, so that the distance judgment is changed from two-dimensional judgment of "near and far" to more-dimensional judgment of "near, relatively near, and far", so that the electronic device can realize more functions without increasing hardware.
[0111] The various embodiments described in this specification are intended to be illustrative of the invention and do not limit the scope of the invention. Although specific embodiments have been described herein, many variations are possible. For example, well-known elements have not been described in detail or have been described generally. Where the description of a specific embodiment has been set out above, this description is not intended to limit the scope of the application, but merely to provide a specific exemplification of the application. The scope of the application is defined by the appended claims, and any equivalent of the specifi c embodiments are included within the scope of the claims. Other embodiments can be apparent to those of ordinary skill in the art from this disclosure, which is provided in conjunction with the appropriate drawings. Accordingly, the patent is not intended to be limited to the specific embodiments described herein, but the scope of the claims extends to other embodiments that can be apparent to one of ordinary skill in the art in light of this disclosure. It is intended to cover any adaptations or variations of the specific embodiments discussed herein. Therefore, it is manifestly intended that this application be limited only by the following claims and equivalents thereof.
[0112] The specific embodiments of the present application have been described. It is to be understood that the application is not limited to the specific embodiments described and that modifications can be made to these embodiments without departing from the spirit or scope of the inventive concepts disclosed herein.
Claims
1. A method for improving the measurement range of a distance sensor, characterized in that, Includes the following steps: S1: Control the P-sensor to illuminate the target object at a frame rate of N1; S2: Control the receiver to receive reflected signals at a frame rate of N2, and mark the received signal when the P-sensor is irradiated as F1, and the received signal when the P-sensor is not irradiated as F2; where N2 is greater than N1; the number of elements in F2 is greater than the number of elements in F1, and all elements in F2 between two adjacent irradiations of the P-sensor are merged; the merging is calculated using a weighted average, and the shorter the time from the corresponding element in F1, the greater the weight; after merging, the number of elements in F1 is equal to the number of elements in F2; S3: Subtract F2 from F1 to obtain the first signal M1 of the target object, and filter the pixels in the first signal M1 by a preset intensity s to obtain the target object region T1 with an intensity greater than s; S4: Extract the region in F1 corresponding to T1 as the effective signal F of the target object.
2. The method for improving the measurement range of a distance sensor according to claim 1, characterized in that, Also includes: S5: If the average strength of the valid signal F is greater than the preset value w, then reset the valid signal F to the region in M1 corresponding to T1.
3. A method for improving the measurement range of a distance sensor according to claim 1 or 2, characterized in that, The judgment threshold of the effective signal F is changed according to the pre-stored intensity value and judgment threshold.
4. The method for improving the measurement range of a distance sensor according to claim 1, characterized in that, The control receiver receives the reflected signal at a frame rate N2, including: S21: When the P-sensor illuminates the target object, receive the signal F1 from the P-sensor illumination. S23: When the P-sensor does not illuminate the target object, receive the signal F2 when the P-sensor is not illuminating it.
5. A method for improving the measurement range of a distance sensor according to claim 4, characterized in that, The duration t1 of S21 is greater than the duration t2 of S23 in order to improve the frame rate.
6. A device for improving the measurement range of a distance sensor, characterized in that, include: The transmitter is used to illuminate the target object at a frame rate of N1; A receiver is used to receive the reflected signal at a frame rate N2; where N2 is greater than N1. A calculator is used to label the received signal when the P-sensor is irradiated as F1 and the received signal when the P-sensor is not irradiated as F2. F2 is subtracted from F1 to obtain the first signal M1 of the target object. Pixels in the first signal M1 are filtered using a preset intensity s to obtain the target object region T1 with an intensity greater than s. The region corresponding to T1 in F1 is extracted as the effective signal F of the target object. Since the number of elements in F2 is greater than the number of elements in F1, all elements in F2 between two adjacent P-sensor irradiations are merged. A weighted average is used for merging; the shorter the time from the corresponding element in F1, the greater the weight. After merging, the number of elements in F1 is equal to the number of elements in F2.
7. The device for improving the measurement range of a distance sensor according to claim 6, characterized in that, It also includes a reset module. The reset module is used to reset the valid signal F to the region corresponding to T1 in M1 if the average strength of the valid signal F is greater than the preset value w.
8. The device for improving the measurement range of a distance sensor according to claim 6, characterized in that, It also includes a judgment module. The judgment module is used to change the judgment threshold of the effective signal F according to the pre-stored intensity value and judgment threshold.
9. The device for improving the measurement range of a distance sensor according to claim 6, characterized in that, The receiver includes: The first receiving unit is used to receive the signal F1 when the P-sensor illuminates the target object; The second receiving unit is used to receive the signal F2 when the P-sensor is not illuminating the target object.
10. An electronic device, characterized in that, Includes an apparatus for improving the measurement range of a distance sensor as described in any one of claims 6-9.
Citation Information
Patent Citations
Terminal control method and device, terminal and computer readable storage medium
CN110198409A