TOF ranging method, device, electronic device and storage medium

By switching the operating frequency in the TOF camera and determining the preset range based on the target coefficient and period length, the problem of inaccurate ground distance caused by target surface scattering is solved and the accuracy of TOF ranging is improved.

CN113296106BActive Publication Date: 2024-08-30NANCHANG OUFEI BIOLOGICAL IDENTIFICATION TECH CO LTD
View PDF 19 Cites 0 Cited by

Patent Information

Application Number
CN202110533309.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-05-17
Publication Date
2024-08-30
Estimated Expiration
2041-05-17

AI Technical Summary

Technical Problem

In the TOF ranging method, scattering from the target surface causes inaccurate distance measurement on the ground, resulting in a 'warping' phenomenon, which is mistaken for obstacles.

Method used

By switching the operating frequency in the TOF camera, the preset range is determined based on the target coefficient and the cycle length of the current operating frequency to avoid the influence of target surface scattering and ensure that the ground scattered light received by the receiver is not affected by target surface scattering.

Benefits of technology

It reduces ground distance inaccuracies caused by target surface scattering, avoids misidentification of obstacles, and improves the accuracy of ranging.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113296106B
    Figure CN113296106B
Patent Text Reader

Abstract

The present application relates to the field of 3D vision technology, and discloses a TOF ranging method, device, electronic device and storage medium. The method comprises: after a transmitter of a TOF camera transmits light to the ground and a target surface, based on the light received by a receiver of the TOF camera, determining the distance between the TOF camera and the target surface; if the distance between the TOF camera and the target surface is within a preset range corresponding to the current operating frequency of the TOF camera, switching the operating frequency of the TOF camera; when the distance between the TOF camera and the target surface is within the preset range corresponding to the current operating frequency of the TOF camera, the transmitter operates at the current operating frequency, and the light scattered by the ground received by the receiver is affected by the scattering of the target surface; the transmitter operates at the switched operating frequency, and the light scattered by the ground received by the receiver is not affected by the scattering of the target surface, thereby reducing the occurrence of inaccurate ground distance obtained due to the influence of the scattering of the target surface.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of 3D vision technology, and in particular to a TOF ranging method, device, electronic device and storage medium. Background Art

[0002] Time of flight (TOF) 3D imaging is achieved by a transmitter continuously emitting light pulses to the observed object, and then a receiver receives the light returned from the object, and the distance to the object is obtained by detecting the flight (round-trip) time of the light pulses.

[0003] When the transmitter emits light to the highly reflective ground and target surface (such as a wall), the target surface will scatter part of the light to a part of the ground. Therefore, in addition to scattering the light emitted by the transmitter to the receiver, this part of the ground will also reflect the light scattered by the target surface to the receiver.

[0004] Due to the influence of target surface scattering, the measured distance of some areas of the ground is inaccurate, the ground point cloud will be "warped", and this part of the ground will be mistaken for an obstacle. Summary of the invention

[0005] The present application provides a TOF ranging method, device, electronic device and storage medium to reduce the occurrence of inaccurate ground distance due to the influence of target surface scattering.

[0006] In a first aspect, an embodiment of the present application provides a TOF ranging method, which is applied to a TOF camera, and the method includes:

[0007] After the transmitter of the TOF camera transmits light to the ground and the target surface, determining the distance between the TOF camera and the target surface based on the light received by the receiver of the TOF camera;

[0008] If the distance between the TOF camera and the target surface is within a preset range corresponding to the current operating frequency of the TOF camera, switching the operating frequency of the TOF camera;

[0009] When the distance between the TOF camera and the target surface is within a preset range corresponding to the current operating frequency of the TOF camera, the transmitter operates at the current operating frequency, and the ground scattered light received by the receiver is affected by the scattering of the target surface; and the transmitter operates at the switched operating frequency, and the ground scattered light received by the receiver is not affected by the scattering of the target surface.

[0010] In the above scheme, when the transmitter of the TOF camera works at different operating frequencies, the receiver receives light scattered from the ground, which will be affected by the scattering of the target surface at different distances from the target surface. Therefore, when the distance to the target surface is within the distance range affected by the scattering of the target surface corresponding to the current operating frequency, it switches to other operating frequencies, and the transmitter works at the switched operating frequency. The light scattered from the ground received by the receiver is not affected by the scattering of the target surface, thereby reducing the influence of the scattering of the target surface, resulting in inaccurate ground distance.

[0011] In some optional implementations, the preset range corresponding to the current operating frequency is determined in the following manner:

[0012] According to the target coefficient and the period length corresponding to the current operating frequency, the preset range corresponding to the current operating frequency is determined, wherein the target coefficient is determined based on the height of the TOF camera and the field of view of the TOF camera, and the period length corresponding to the current operating frequency is determined based on the current operating frequency and the speed of light.

[0013] In the above scheme, since the cycle length corresponding to the current operating frequency directly affects the distance range affected by the scattering of the target surface, according to the target coefficient and the cycle length corresponding to the current operating frequency, it is possible to more accurately determine when the TOF camera is in which distance range with the target surface, the transmitter operates at the current operating frequency, and the ground scattered light received by the receiver will be affected by the scattering of the target surface.

[0014] In some optional implementations, if the current operating frequency is a single frequency, the target coefficient includes a first coefficient determined based on the height of the TOF camera and the field of view of the TOF camera;

[0015] Determining a preset range corresponding to the current operating frequency according to the target coefficient and the cycle length corresponding to the current operating frequency includes:

[0016] Determine a first distance as a product of the first coefficient and a cycle length corresponding to the current operating frequency;

[0017] A distance range smaller than the first distance is determined as a preset range corresponding to the current operating frequency.

[0018] In the above scheme, the farthest distance affected by target surface scattering (i.e., the maximum value of the preset range) will be affected by two factors: the field of view angle of the TOF camera and the height of the TOF camera. Therefore, when the current operating frequency is single-frequency, the first coefficient is determined based on the height of the TOF camera and the field of view angle of the TOF camera. According to the period length corresponding to the first coefficient and the current operating frequency, the maximum value of the preset range corresponding to the current operating frequency (the above-mentioned first distance) can be determined, and then the distance range less than the first distance is determined as the preset range corresponding to the current operating frequency.

[0019] In some optional implementations, if the current operating frequency is dual frequency, the target coefficient includes a first coefficient determined based on the height of the TOF camera and the field of view of the TOF camera, and a preset second coefficient;

[0020] Determining a preset range corresponding to the current operating frequency according to the target coefficient and the cycle length corresponding to the current operating frequency includes:

[0021] Determine the product of the first coefficient and a first cycle length as a first distance, and determine the product of the second coefficient and a second cycle length as a second distance, wherein the first cycle length is a cycle length corresponding to a high frequency in the current operating frequency, and the second cycle length is a cycle length corresponding to a low frequency in the current operating frequency;

[0022] A distance range between the first distance and the second distance is determined as a preset range corresponding to the current operating frequency.

[0023] In the above scheme, the farthest distance affected by target surface scattering (i.e., the maximum value of the preset range) will be affected by two factors: the field of view angle of the TOF camera and the height of the TOF camera. Therefore, when the current operating frequency is dual-frequency, the first coefficient is determined based on the height of the TOF camera and the field of view angle of the TOF camera. According to the period length corresponding to the first coefficient and the high frequency, the maximum value of the preset range corresponding to the current operating frequency (the above-mentioned first distance) can be determined; according to the period length corresponding to the second coefficient and the low frequency, the minimum value of the preset range corresponding to the current operating frequency (the above-mentioned second distance) can be determined; and the distance range between the first distance and the second distance is determined as the preset range corresponding to the current operating frequency.

[0024] In some optional embodiments, the field of view of the TOF camera includes a horizontal field of view angle and a vertical field of view angle;

[0025] The first coefficient is determined by:

[0026] Determine the target adjustment method corresponding to the height of the TOF camera according to the correspondence between the preset height and the adjustment method;

[0027] The horizontal field of view angle and the vertical field of view angle are input into the target adjustment method to obtain the first coefficient.

[0028] In some optional embodiments, the preset range corresponding to the current operating frequency does not overlap with the preset range corresponding to the switched operating frequency, wherein the preset range corresponding to the switched operating frequency is determined based on the target coefficient and the period length corresponding to the switched operating frequency.

[0029] In the above scheme, the preset range corresponding to the current operating frequency does not overlap with the preset range corresponding to the switched operating frequency. Therefore, as long as the distance between the TOF camera and the target surface is within the preset range corresponding to the current operating frequency, when the transmitter operates at the switched operating frequency, the light scattered by the ground received by the receiver will not be affected by the scattering of the target surface, thus avoiding frequent switching of the operating frequency of the TOF camera.

[0030] In a second aspect, an embodiment of the present application provides a TOF ranging device, comprising:

[0031] A distance determination module, configured to determine the distance between the TOF camera and the target surface based on the light received by the receiver of the TOF camera after the transmitter of the TOF camera transmits light to the ground and the target surface;

[0032] A frequency switching module, configured to switch the operating frequency of the TOF camera if the distance between the TOF camera and the target surface is within a preset range corresponding to the current operating frequency of the TOF camera;

[0033] When the distance between the TOF camera and the target surface is within a preset range corresponding to the current operating frequency of the TOF camera, the transmitter operates at the current operating frequency, and the ground scattered light received by the receiver is affected by the scattering of the target surface; and the transmitter operates at the switched operating frequency, and the ground scattered light received by the receiver is not affected by the scattering of the target surface.

[0034] In some optional embodiments, the device further comprises:

[0035] A preset range determination module is used to determine a preset range corresponding to the current operating frequency according to a target coefficient and a period length corresponding to the current operating frequency, wherein the target coefficient is determined based on the height of the TOF camera and the field of view of the TOF camera, and the period length corresponding to the current operating frequency is determined based on the current operating frequency and the speed of light.

[0036] In some optional implementations, if the current operating frequency is a single frequency, the target coefficient includes a first coefficient determined based on the height of the TOF camera and the field of view of the TOF camera;

[0037] The preset range determination module is specifically used for:

[0038] The product of the first coefficient and the cycle length corresponding to the current operating frequency is determined as a first distance, and a distance range smaller than the first distance is determined as a preset range corresponding to the current operating frequency.

[0039] In some optional implementations, if the current operating frequency is dual frequency, the target coefficient includes a first coefficient determined based on the height of the TOF camera and the field of view of the TOF camera, and a preset second coefficient;

[0040] The preset range determination module is specifically used for:

[0041] Determine the product of the first coefficient and a first cycle length as a first distance, and determine the product of the second coefficient and a second cycle length as a second distance, wherein the first cycle length is a cycle length corresponding to a high frequency in the current operating frequency, and the second cycle length is a cycle length corresponding to a low frequency in the current operating frequency;

[0042] A distance range between the first distance and the second distance is determined as a preset range corresponding to the current operating frequency.

[0043] In some optional embodiments, the field of view of the TOF camera includes a horizontal field of view angle and a vertical field of view angle;

[0044] The preset range determination module is further used for:

[0045] Determine the target adjustment method corresponding to the height of the TOF camera according to the correspondence between the preset height and the adjustment method;

[0046] The horizontal field of view angle and the vertical field of view angle are input into the target adjustment method to obtain the first coefficient.

[0047] In some optional embodiments, the preset range corresponding to the current operating frequency does not overlap with the preset range corresponding to the switched operating frequency, wherein the preset range corresponding to the switched operating frequency is determined based on the target coefficient and the period length corresponding to the switched operating frequency.

[0048] In a third aspect, an embodiment of the present application provides an electronic device, comprising: one or more processors, and a memory for storing instructions executable by the processors;

[0049] The processor is configured to execute the instructions to implement the TOF ranging method as described in any one of the first aspects above.

[0050] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the TOF ranging method as described in any one of the above-mentioned first aspects is implemented.

[0051] In addition, the technical effects brought about by any implementation method in the second to fourth aspects can refer to the technical effects brought about by different implementation methods in the first aspect, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0052] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0053] Figure 1 A schematic diagram of the direction of the light beam provided in an embodiment of the present application;

[0054] Figure 2 A schematic diagram of a phase gradient provided in an embodiment of the present application;

[0055] Figure 3A A first point cloud schematic diagram provided in an embodiment of the present application;

[0056] Figure 3B A second point cloud schematic diagram provided in an embodiment of the present application;

[0057] Figure 4 A schematic diagram of the process flow of the TOF ranging method provided in the embodiment of the present application;

[0058] Figure 5 A schematic diagram of a flow chart of a first preset range determination method provided in an embodiment of the present application;

[0059] Figure 6 A schematic diagram of a flow chart of a second method for determining a preset range provided in an embodiment of the present application;

[0060] Figure 7 A schematic diagram of the structure of a TOF ranging device provided in an embodiment of the present application;

[0061] Figure 8 A schematic block diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0062] In order to make the purpose, technical solutions and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present application.

[0063] The terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features.

[0064] When the TOF camera transmits light pulses through the transmitter to the highly reflective ground (in this embodiment, the ground is the driving surface of the device where the TOF camera is located) and the target surface (in this embodiment, the target surface is an obstacle surface relative to the ground, such as a wall, etc.), the target surface will scatter part of the light to part of the ground. Therefore, in addition to scattering the light emitted by the transmitter to the receiver, this part of the area will also reflect the light scattered by the target surface to the receiver. Figure 1 As shown, point B on the wall will scatter part of the light to point C on the ground. In addition to scattering the light emitted by the transmitter (TOF camera at point A) to the receiver (the direction of the first light beam is ACA), point C will also reflect the light scattered from point B to the receiver (the direction of the second light beam is ABCA). Taking the example of the TOF camera's receiver working at a single frequency (emitting light pulses at only one frequency), the receiver emits light of four phases (the four phases are recorded as 0°, 90°, 180°, and 270°). Since point C not only scatters the light emitted by the transmitter to the receiver, but also reflects the light scattered from point B to the receiver, the receiver may receive light of different phases emitted from point C at the same time. Figure 2 As shown in FIG. 1 , if the receiver receives the second phase light and the third phase light at the same time, it is impossible to determine whether the second phase light or the third phase light is received at that moment, resulting in inaccurate measured distance to point C. Figure 3A as well as Figure 3B As shown in the figure, the obtained ground point cloud will be uneven and "warped", which may lead to mistaking this area for an obstacle.

[0065] The above application scenarios are only examples of application scenarios for implementing the embodiments of the present application, and the embodiments of the present application are not limited to the above application scenarios.

[0066] In order to reduce the influence of target surface scattering, which leads to the inaccuracy of the ground distance obtained, the embodiment of the present application provides a TOF ranging method, device, electronic device and storage medium. The technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems will be described in detail below in conjunction with the accompanying drawings and specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments.

[0067] Figure 4 The flowchart of the TOF ranging method provided in the embodiment of the present application is applied to the above-mentioned TOF camera, such as Figure 4 As shown, the method may include:

[0068] Step S401: after the transmitter of the TOF camera transmits light to the ground and the target surface, the distance between the TOF camera and the target surface is determined based on the light received by the receiver of the TOF camera.

[0069] Step S402: If the distance between the TOF camera and the target surface is within a preset range corresponding to the current operating frequency of the TOF camera, the operating frequency of the TOF camera is switched.

[0070] When the distance between the TOF camera and the target surface is within a preset range corresponding to the current operating frequency of the TOF camera, the transmitter operates at the current operating frequency, and the ground scattered light received by the receiver is affected by the scattering of the target surface; and the transmitter operates at the switched operating frequency, and the ground scattered light received by the receiver is not affected by the scattering of the target surface.

[0071] In practice, after the transmitter of the TOF camera emits light to the object, the emitted light scatters after encountering the object, and the receiver of the TOF camera receives the scattered light of the object, and determines the distance between the TOF camera and the object according to the time when the transmitter emits the light and the time when the receiver receives the light, or the phase difference. For example, by calculating the phase difference corresponding to the target surface, the distance between the TOF camera and the target surface is calculated based on the phase difference (such as by the four-step phase shift method). The distance between the TOF camera and the ground can be calculated in the same way.

[0072] Refer to the above Figure 1 , the target surface (that is, Figure 1 Point B on the wall in the image will scatter part of the light to point C on the ground. In addition to scattering the light emitted by the transmitter to the receiver, point C will also reflect the light scattered by point B to the receiver. The receiver will receive light of different phases emitted by point C at the same time. At this time, the light scattered by the ground received by the receiver is affected by the scattering of the target surface.

[0073] In this embodiment, the light scattered by the ground is affected by the scattering of the target surface, which specifically means that the receiver simultaneously receives light of different phases emitted from the ground (the light emitted by the transmitter and the light scattered by the target surface).

[0074] In the above scheme, when the transmitter of the TOF camera works at different operating frequencies, the receiver receives light scattered from the ground, which will be affected by the scattering of the target surface at different distances from the target surface. Therefore, when the distance to the target surface is within the distance range affected by the scattering of the target surface corresponding to the current operating frequency, it switches to other operating frequencies, and the transmitter works at the switched operating frequency. The light scattered from the ground received by the receiver is not affected by the scattering of the target surface, thereby reducing the influence of the scattering of the target surface, resulting in inaccurate ground distance.

[0075] In this embodiment, the preset range corresponding to the current operating frequency may be determined by, but not limited to, the following methods:

[0076] According to the target coefficient and the period length corresponding to the current operating frequency, the preset range corresponding to the current operating frequency is determined, wherein the target coefficient is determined based on the height of the TOF camera and the field of view of the TOF camera, and the period length corresponding to the current operating frequency is determined based on the current operating frequency and the speed of light.

[0077] Since the cycle length corresponding to the current operating frequency directly affects the distance range affected by the scattering of the target surface, the target coefficient and the cycle length corresponding to the current operating frequency can more accurately determine the distance range between the TOF camera and the target surface, when the transmitter operates at the current operating frequency, and the ground scattered light received by the receiver will be affected by the scattering of the target surface.

[0078] In implementation, the current operating frequency may be single frequency or dual frequency. If the current operating frequency is single frequency, the target coefficient includes a first coefficient determined based on the height of the TOF camera and the field of view of the TOF camera. Figure 5 As shown, when the current operating frequency is single frequency, the preset range corresponding to the current operating frequency can be determined by the following methods:

[0079] Step S501: determine the product of the first coefficient and the cycle length corresponding to the current operating frequency as a first distance.

[0080] Step S502: Determine a distance range smaller than the first distance as a preset range corresponding to the current operating frequency.

[0081] During implementation, if the current operating frequency is single-frequency, the farthest distance affected by target surface scattering (i.e., the maximum value of the preset range) will be affected by two factors: the field of view angle of the TOF camera and the height of the TOF camera. Based on this, according to the period length corresponding to the first coefficient and the current operating frequency, the maximum value of the preset range corresponding to the current operating frequency (the above-mentioned first distance) can be determined.

[0082] In some optional implementations, the field of view angle of the TOF camera includes a horizontal field of view angle and a vertical field of view angle;

[0083] The first coefficient can be determined in the following way:

[0084] Determine the target adjustment method corresponding to the height of the TOF camera according to the correspondence between the preset height and the adjustment method;

[0085] The horizontal field of view angle and the vertical field of view angle are input into the target adjustment method to obtain the first coefficient.

[0086] The lower the height of the TOF camera is, the more obvious the impact of the target surface scattering is. Different calculation methods can be used to calculate the first coefficient at different heights. For example, if the height is less than 4 cm, it corresponds to the first adjustment method; if the height is between 4 cm and 20 cm, it corresponds to the second adjustment method; if the height is greater than 20 cm, it corresponds to the third adjustment method. Among them, the second adjustment method can be λ1 is the first coefficient, H is the horizontal field of view, and V is the vertical field of view.

[0087] When the current operating frequency is single frequency, the period length D corresponding to the current operating frequency is c / f, where c is the speed of light (the value is 3*10 8 m / s), f is the current operating frequency.

[0088] First distance The preset range corresponding to the current operating frequency is 0~A.

[0089] The above-mentioned corresponding relationship between the preset height and the adjustment method, and the specific adjustment method are only exemplary descriptions, and the corresponding relationship between the height and the adjustment method, and each adjustment method can be set according to the actual application scenario.

[0090] In the above scheme, the farthest distance affected by target surface scattering (i.e., the maximum value of the preset range) will be affected by two factors: the field of view angle of the TOF camera and the height of the TOF camera. Therefore, when the current operating frequency is single-frequency, the first coefficient is determined based on the height of the TOF camera and the field of view angle of the TOF camera. According to the period length corresponding to the first coefficient and the current operating frequency, the maximum value of the preset range corresponding to the current operating frequency (the above-mentioned first distance) can be determined, and then the distance range less than the first distance is determined as the preset range corresponding to the current operating frequency.

[0091] If the current operating frequency is dual frequency, the target coefficient includes a first coefficient determined based on the height of the TOF camera and the field of view of the TOF camera, and a preset second coefficient. Figure 6 As shown, when the current operating frequency is dual-frequency, the preset range corresponding to the current operating frequency can be determined by the following methods:

[0092] Step S601: determine the product of the first coefficient and the first cycle length as the first distance, and determine the product of the second coefficient and the second cycle length as the second distance.

[0093] The first cycle length is the cycle length corresponding to a high frequency in the current operating frequency, and the second cycle length is the cycle length corresponding to a low frequency in the current operating frequency.

[0094] Step S602: Determine a distance range between the first distance and the second distance as a preset range corresponding to the current operating frequency.

[0095] When the current operating frequency is dual frequency, the high frequency in the current operating frequency is the higher frequency, and the low frequency is the lower frequency. For example, the current operating frequency is 60 Hz and 80 Hz, 80 Hz is the high frequency, and 60 Hz is the low frequency.

[0096] The first period length D1=c / f1, wherein c is the speed of light and f1 is a high frequency; the second period length D2=c / f2, wherein c is the speed of light and f2 is a low frequency.

[0097] During implementation, if the current operating frequency is dual-frequency, the farthest distance affected by target surface scattering (i.e., the maximum value of the preset range) will be affected by two factors: the field of view angle of the TOF camera and the height of the TOF camera. Based on this, according to the period length corresponding to the first coefficient and the high frequency, the maximum value of the preset range corresponding to the current operating frequency (the above-mentioned first distance) can be determined.

[0098] When the current operating frequency is dual-frequency, the method for determining the first coefficient and the method for determining the first distance can refer to the above embodiment (the only difference is that the first distance is determined directly based on the single frequency when the current operating frequency is dual-frequency, and the first distance is determined based on the high frequency when the current operating frequency is dual-frequency), which will not be repeated here. λ1 is the first coefficient, H is the horizontal field of view, and V is the vertical field of view.

[0099] The above-preset second coefficient can be set according to actual application, and this embodiment does not make any specific limitation on this. For example, the second coefficient λ2 is Second distance

[0100] The preset range corresponding to the current operating frequency is B to A′.

[0101] In the above scheme, the farthest distance affected by target surface scattering (i.e., the maximum value of the preset range) will be affected by two factors: the field of view angle of the TOF camera and the height of the TOF camera. Therefore, when the current operating frequency is dual-frequency, the first coefficient is determined based on the height of the TOF camera and the field of view angle of the TOF camera. According to the period length corresponding to the first coefficient and the high frequency, the maximum value of the preset range corresponding to the current operating frequency (the above-mentioned first distance) can be determined; according to the period length corresponding to the second coefficient and the low frequency, the minimum value of the preset range corresponding to the current operating frequency (the above-mentioned second distance) can be determined; and the distance range between the first distance and the second distance is determined as the preset range corresponding to the current operating frequency.

[0102] In some optional embodiments, the preset range corresponding to the current operating frequency does not overlap with the preset range corresponding to the switched operating frequency, wherein the preset range corresponding to the switched operating frequency is determined based on the target coefficient and the period length corresponding to the switched operating frequency.

[0103] It is understandable that the preset range corresponding to the switched operating frequency may also be determined by the above-mentioned embodiment, which will not be described in detail here.

[0104] For example: when the transmitter is working at the first operating frequency (single frequency or dual frequency), the TOF camera is 2-3 meters away from the target surface, and the receiver receives light scattered from the ground, which will be affected by the scattering of the target surface; when the TOF camera is working at the second operating frequency (single frequency or dual frequency), the TOF camera is within 1.5 meters from the target surface, and the receiver receives light scattered from the ground, which will be affected by the scattering of the target surface. If the current transmitter is working at the first operating frequency, and the TOF camera is 3 meters away from the target surface, the operating frequency of the transmitter can be switched to the second operating frequency, so that within the range of 2-3 meters from the target surface, there is no need to switch the operating frequency of the transmitter again.

[0105] In some specific embodiments, if the distance between the TOF camera and the target surface is within a preset range corresponding to the first operating frequency, the second operating frequency is determined as the operating frequency of the TOF camera; otherwise, the first operating frequency is used as the operating frequency of the TOF camera.

[0106] In the above scheme, the preset range corresponding to the current operating frequency does not overlap with the preset range corresponding to the switched operating frequency. Therefore, as long as the distance between the TOF camera and the target surface is within the preset range corresponding to the current operating frequency, when the transmitter operates at the switched operating frequency, the light scattered by the ground received by the receiver will not be affected by the scattering of the target surface, thus avoiding frequent switching of the operating frequency of the TOF camera.

[0107] like Figure 7 As shown, based on the same inventive concept, an embodiment of the present application provides a TOF ranging device 700, including: a distance determination module 701 and a frequency switching module 702. In some optional implementations, the TOF ranging device 700 may also include a preset range determination module 703.

[0108] A distance determination module 701 is used to determine the distance between the TOF camera and the target surface based on the light received by the receiver of the TOF camera after the transmitter of the TOF camera transmits light to the ground and the target surface;

[0109] A frequency switching module 702, configured to switch the operating frequency of the TOF camera if the distance between the TOF camera and the target surface is within a preset range corresponding to the current operating frequency of the TOF camera;

[0110] When the distance between the TOF camera and the target surface is within a preset range corresponding to the current operating frequency of the TOF camera, the transmitter operates at the current operating frequency, and the ground scattered light received by the receiver is affected by the scattering of the target surface; and the transmitter operates at the switched operating frequency, and the ground scattered light received by the receiver is not affected by the scattering of the target surface.

[0111] In some optional embodiments, the preset range determination module 703 is used to determine the preset range corresponding to the current operating frequency based on the target coefficient and the period length corresponding to the current operating frequency, wherein the target coefficient is determined based on the height of the TOF camera and the field of view of the TOF camera, and the period length corresponding to the current operating frequency is determined based on the current operating frequency and the speed of light.

[0112] In some optional implementations, if the current operating frequency is a single frequency, the target coefficient includes a first coefficient determined based on the height of the TOF camera and the field of view of the TOF camera;

[0113] The preset range determination module 703 is specifically used to:

[0114] The product of the first coefficient and the cycle length corresponding to the current operating frequency is determined as a first distance, and a distance range smaller than the first distance is determined as a preset range corresponding to the current operating frequency.

[0115] In some optional implementations, if the current operating frequency is dual frequency, the target coefficient includes a first coefficient determined based on the height of the TOF camera and the field of view of the TOF camera, and a preset second coefficient;

[0116] The preset range determination module 703 is specifically used for:

[0117] Determine the product of the first coefficient and a first cycle length as a first distance, and determine the product of the second coefficient and a second cycle length as a second distance, wherein the first cycle length is a cycle length corresponding to a high frequency in the current operating frequency, and the second cycle length is a cycle length corresponding to a low frequency in the current operating frequency;

[0118] A distance range between the first distance and the second distance is determined as a preset range corresponding to the current operating frequency.

[0119] In some optional embodiments, the field of view of the TOF camera includes a horizontal field of view angle and a vertical field of view angle;

[0120] The preset range determination module 703 is further used for:

[0121] Determine the target adjustment method corresponding to the height of the TOF camera according to the correspondence between the preset height and the adjustment method;

[0122] The horizontal field of view angle and the vertical field of view angle are input into the target adjustment method to obtain the first coefficient.

[0123] In some optional embodiments, the preset range corresponding to the current operating frequency does not overlap with the preset range corresponding to the switched operating frequency, wherein the preset range corresponding to the switched operating frequency is determined based on the target coefficient and the period length corresponding to the switched operating frequency.

[0124] like Figure 8 As shown, based on the same inventive concept, an embodiment of the present application provides an electronic device 800, including: a processor 801 and a memory 802;

[0125] The memory 802 is used to store the computer program executed by the processor 801. The memory 802 can be a volatile memory, such as a random-access memory (RAM); the memory 802 can also be a non-volatile memory, such as a read-only memory, a flash memory, a hard disk drive (HDD) or a solid-state drive (SSD); or the memory 802 is any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto. The memory 802 can also be a combination of the above memories.

[0126] The processor 801 may include one or more central processing units (CPU), graphics processing units (GPU) or digital processing units, etc.

[0127] The specific connection medium between the memory 802 and the processor 801 is not limited in the embodiment of the present application. Figure 8 In the embodiment, the memory 802 and the processor 801 are connected via a bus 803, but the embodiment of the present application is not limited thereto. The bus 803 can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 8 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.

[0128] The memory 802 stores processor executable instructions. When the instructions are executed by the processor 801, the processor 801 performs the following process:

[0129] After the transmitter of the TOF camera transmits light to the ground and the target surface, determining the distance between the TOF camera and the target surface based on the light received by the receiver of the TOF camera;

[0130] If the distance between the TOF camera and the target surface is within a preset range corresponding to the current operating frequency of the TOF camera, switching the operating frequency of the TOF camera;

[0131] When the distance between the TOF camera and the target surface is within a preset range corresponding to the current operating frequency of the TOF camera, the transmitter operates at the current operating frequency, and the ground scattered light received by the receiver is affected by the scattering of the target surface; and the transmitter operates at the switched operating frequency, and the ground scattered light received by the receiver is not affected by the scattering of the target surface.

[0132] In some optional implementations, the processor 801 is further configured to:

[0133] According to the target coefficient and the period length corresponding to the current operating frequency, the preset range corresponding to the current operating frequency is determined, wherein the target coefficient is determined based on the height of the TOF camera and the field of view of the TOF camera, and the period length corresponding to the current operating frequency is determined based on the current operating frequency and the speed of light.

[0134] In some optional implementations, if the current operating frequency is a single frequency, the target coefficient includes a first coefficient determined based on the height of the TOF camera and the field of view of the TOF camera;

[0135] The processor 801 is specifically configured to:

[0136] Determine a first distance as a product of the first coefficient and a cycle length corresponding to the current operating frequency;

[0137] A distance range smaller than the first distance is determined as a preset range corresponding to the current operating frequency.

[0138] In some optional implementations, if the current operating frequency is dual frequency, the target coefficient includes a first coefficient determined based on the height of the TOF camera and the field of view of the TOF camera, and a preset second coefficient;

[0139] The processor 801 is specifically configured to:

[0140] Determine the product of the first coefficient and a first cycle length as a first distance, and determine the product of the second coefficient and a second cycle length as a second distance, wherein the first cycle length is a cycle length corresponding to a high frequency in the current operating frequency, and the second cycle length is a cycle length corresponding to a low frequency in the current operating frequency;

[0141] A distance range between the first distance and the second distance is determined as a preset range corresponding to the current operating frequency.

[0142] In some optional embodiments, the field of view of the TOF camera includes a horizontal field of view angle and a vertical field of view angle;

[0143] The processor 801 is further configured to:

[0144] Determine the target adjustment method corresponding to the height of the TOF camera according to the correspondence between the preset height and the adjustment method;

[0145] The horizontal field of view angle and the vertical field of view angle are input into the target adjustment method to obtain the first coefficient.

[0146] In some optional embodiments, the preset range corresponding to the current operating frequency does not overlap with the preset range corresponding to the switched operating frequency, wherein the preset range corresponding to the switched operating frequency is determined based on the target coefficient and the period length corresponding to the switched operating frequency.

[0147] The embodiment of the present application provides a computer-readable storage medium, on which a computer program is stored, and when the program is executed by a processor, the steps of the TOF ranging method described above are implemented. The readable storage medium may be a non-volatile readable storage medium.

[0148] The present application is described above with reference to the block diagrams and / or flow charts showing the methods, devices (systems) and / or computer program products according to the embodiments of the present application. It should be understood that a block of the block diagram and / or flow chart diagram and a combination of blocks of the block diagram and / or flow chart diagram can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer and / or other programmable TOF ranging devices to produce a machine, so that the instructions executed by the computer processor and / or other programmable TOF ranging devices create a method for implementing the functions / actions specified in the block diagram and / or flow chart blocks.

[0149] Accordingly, the present application may also be implemented with hardware and / or software (including firmware, resident software, microcode, etc.). Furthermore, the present application may take the form of a computer program product on a computer-usable or computer-readable storage medium, which has a computer-usable or computer-readable program code implemented in the medium, for use by an instruction execution system or in conjunction with an instruction execution system. In the context of the present application, a computer-usable or computer-readable medium may be any medium that may contain, store, communicate, transmit, or convey a program for use by an instruction execution system, device, or apparatus, or in conjunction with an instruction execution system, device, or apparatus.

[0150] Although the preferred embodiments of the present application have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications falling within the scope of the present application.

[0151] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.

Claims

1. A TOF ranging method, characterized in that: Applied to a TOF camera, the method comprises: After the transmitter of the TOF camera transmits light to the ground and the target surface, determining the distance between the TOF camera and the target surface based on the light received by the receiver of the TOF camera; If the distance between the TOF camera and the target surface is within a preset range corresponding to the current operating frequency of the TOF camera, the operating frequency of the TOF camera is switched, wherein the preset range corresponding to the current operating frequency is determined according to a target coefficient and a cycle length corresponding to the current operating frequency, wherein the target coefficient is determined based on the height of the TOF camera and the field of view of the TOF camera, and the cycle length corresponding to the current operating frequency is determined based on the current operating frequency and the speed of light; When the distance between the TOF camera and the target surface is within a preset range corresponding to the current operating frequency of the TOF camera, the transmitter operates at the current operating frequency, and the ground scattered light received by the receiver is affected by the scattering of the target surface; and the transmitter operates at the switched operating frequency, and the ground scattered light received by the receiver is not affected by the scattering of the target surface.

2. The method according to claim 1, characterized in that If the current operating frequency is a single frequency, the target coefficient includes a first coefficient determined based on the height of the TOF camera and the field of view of the TOF camera; The preset range corresponding to the current operating frequency is determined by: Determine a first distance as a product of the first coefficient and a cycle length corresponding to the current operating frequency; A distance range smaller than the first distance is determined as a preset range corresponding to the current operating frequency.

3. The method according to claim 1, characterized in that If the current operating frequency is dual frequency, the target coefficient includes a first coefficient determined based on the height of the TOF camera and the field of view of the TOF camera, and a preset second coefficient; The preset range corresponding to the current operating frequency is determined by: Determine the product of the first coefficient and a first cycle length as a first distance, and determine the product of the second coefficient and a second cycle length as a second distance, wherein the first cycle length is a cycle length corresponding to a high frequency in the current operating frequency, and the second cycle length is a cycle length corresponding to a low frequency in the current operating frequency; A distance range between the first distance and the second distance is determined as a preset range corresponding to the current operating frequency.

4. The method according to claim 2 or 3, characterized in that: The field of view of the TOF camera includes a horizontal field of view angle and a vertical field of view angle; The first coefficient is determined by: Determine the target adjustment method corresponding to the height of the TOF camera according to the correspondence between the preset height and the adjustment method; The horizontal field of view angle and the vertical field of view angle are input into the target adjustment method to obtain the first coefficient.

5. The method according to claim 1, characterized in that: The preset range corresponding to the current operating frequency does not overlap with the preset range corresponding to the switched operating frequency, wherein the preset range corresponding to the switched operating frequency is determined based on the target coefficient and the cycle length corresponding to the switched operating frequency.

6. A TOF distance measuring device, characterized in that: include: A distance determination module, configured to determine the distance between the TOF camera and the target surface based on the light received by the receiver of the TOF camera after the transmitter of the TOF camera transmits light to the ground and the target surface; A frequency switching module, configured to switch the operating frequency of the TOF camera if the distance between the TOF camera and the target surface is within a preset range corresponding to the current operating frequency of the TOF camera; a preset range determination module, configured to determine a preset range corresponding to the current operating frequency according to a target coefficient and a period length corresponding to the current operating frequency, wherein the target coefficient is determined based on a height of the TOF camera and a field of view of the TOF camera, and the period length corresponding to the current operating frequency is determined based on the current operating frequency and the speed of light; When the distance between the TOF camera and the target surface is within a preset range corresponding to the current operating frequency of the TOF camera, the transmitter operates at the current operating frequency, and the ground scattered light received by the receiver is affected by the scattering of the target surface; and the transmitter operates at the switched operating frequency, and the ground scattered light received by the receiver is not affected by the scattering of the target surface.

7. An electronic device, characterized in that: comprising one or more processors, and a memory for storing instructions executable by said processors; The processor is configured to execute the instruction to implement the TOF ranging method according to any one of claims 1 to 5.

8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the TOF ranging method according to any one of claims 1 to 5 is implemented.

Citation Information

Patent Citations

  • Increasing measurement rate in time of flight measurement apparatuses

    CN101034155A

  • Radar, height measuring method thereof, unmanned aerial vehicle, storage medium and processor

    CN108627826A

  • Barrier range-finding system, vehicle therewith, and TOF range-finding method

    CN108663682A

  • Distance measuring method and device, storing medium and electronic equipment

    CN109031333A

  • Control method and control device, time-of-flight device, terminal and computer readable storage medium

    CN109324633A