Depth detection method, device and system
By using modulated light with different frequencies and amplitudes, the problem of low depth detection accuracy and resolution in TOF technology is solved, and a more accurate and widely applicable depth detection method is achieved.
Patent Information
- Application Number
- CN201910482295.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-06-04
- Publication Date
- 2024-12-17
- Estimated Expiration
- 2039-06-04
AI Technical Summary
The existing TOF technology has problems such as short detection distance, low depth detection accuracy and low resolution when building depth images.
A variety of modulated lights with different frequencies and amplitudes are used to calculate the depth of the measured object by controlling its emission time period and phase difference, ensuring that different modulated lights do not affect each other, thereby improving the accuracy of depth detection.
The accuracy and scope of application of depth detection are improved, making this method suitable for multiple measured objects at different depths, alleviating the problems of low depth detection accuracy and resolution in TOF technology.
Smart Images

Figure CN110186387B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of constructing depth images, and more specifically, to a depth detection method, device and system. Background Art
[0002] Time of flight (TOF) ranging is a technology that uses a TOF sensor to estimate the time or phase change of the scene's reflected light returning to the imaging lens to construct a depth map. In the current mobile phone field, it is an important technology for virtual reality experiences such as AR and VR, as well as biometric applications such as face recognition.
[0003] A TOF device generally includes a light source and a sensing camera, wherein the light source is used to emit pulsed light or continuous light to the scene. The light emitted by the light source is reflected from the target object back to the sensing camera. In this process, the time difference or phase change of the light from the light source to the target object and then from the target object back to the sensing camera will reflect the distance of each position in the target object, that is, the depth information. The depth information combined with the image captured by a traditional camera can construct a 3D model of the target object, or a face model for biometric recognition, etc.
[0004] The method of constructing depth images using TOF has the advantages of low hardware cost and power consumption, and fast response speed, but it also has defects such as short detection distance, low depth detection accuracy, and low resolution.
[0005] The above information disclosed in the background technology section is only used to enhance the understanding of the background technology of the technology described in this article. Therefore, the background technology may contain certain information that does not form the prior art known in this country for those skilled in the art. Summary of the invention
[0006] The main purpose of the present application is to provide a depth detection method, device and system to solve the problem of poor accuracy in calculating depth using TOF in the prior art.
[0007] In order to achieve the purpose, a depth detection method according to the present application includes: controlling the emission of multiple modulated lights in sequence, the emission time periods corresponding to any two of the modulated lights are intervals, the frequencies of the multiple modulated lights are different, and among the multiple modulated lights, the amplitude of the modulated light with a larger frequency is smaller than the amplitude of the modulated light with a smaller frequency; obtaining multiple phase differences according to the multiple modulated lights, the phase difference being the difference between the phase of the modulated light and the phase of the corresponding reflected light, the reflected light being formed by the modulated light being reflected by the object to be measured; and calculating the depth of the object to be measured according to the multiple phase differences.
[0008] Furthermore, the emission time period of various modulated lights is greater than or equal to 100T, wherein T is the period of the corresponding modulated light, and the T corresponding to different modulated lights is the same or different, and obtaining each phase difference includes: receiving various reflected lights at least three times at a predetermined time interval t in each period of the reflected light, T / 4≤t≤T / 3; and calculating the phase difference based on at least three times of receiving various reflected lights.
[0009] Further, the depth of the object under test is calculated based on the multiple phase differences, including: calculating a corresponding set of predicted depths based on each phase difference to obtain multiple sets of predicted depths, each set of predicted depths including multiple different predicted depths, and the difference between any two predicted depths is nλ / 2, where n is a positive integer; comparing the predicted depths of each set, and taking the same predicted depth in the multiple sets of predicted depths as the depth of the object under test.
[0010] Furthermore, before obtaining the multiple phase differences, the method also includes: obtaining a first ratio of the amplitudes of any two of the modulated lights that are adjacent in time and a second ratio of the amplitudes of the corresponding two reflected lights, and when the difference between the first ratio and the second ratio is within a predetermined range, obtaining the phase difference based on the modulated light and the corresponding reflected light.
[0011] Furthermore, the two modulated lights corresponding to the first ratio are first modulated lights. Before obtaining the multiple phase differences, the method also includes: when the difference between the first ratio and the second ratio is not within the predetermined range, controlling the emission of multiple second modulated lights, the amplitude of the second modulated light is different from the amplitude of the first modulated light or the frequency of the second modulated light is different from the frequency of the first modulated light.
[0012] According to another aspect of the present application, a depth detection device is provided, including: a control unit, used to control the sequential emission of multiple modulated lights, the emission time periods corresponding to any two of the modulated lights are spaced apart, the frequencies of the multiple modulated lights are different, and among the multiple modulated lights, the amplitude of the modulated light with a larger frequency is smaller than the amplitude of the modulated light with a smaller frequency; an acquisition unit, used to acquire multiple phase differences according to the multiple modulated lights, the phase difference being the difference between the phase of the modulated light and the phase of the corresponding reflected light, the reflected light being formed by the modulated light being reflected by the object to be measured; and a calculation unit, used to calculate the depth of the object to be measured according to the multiple phase differences.
[0013] According to another aspect of the present application, a depth detection system is provided, comprising: a light source device, for sequentially emitting a plurality of modulated lights, wherein emission time periods corresponding to any two of the modulated lights are spaced apart, frequencies of the plurality of modulated lights are different, and among the plurality of modulated lights, the amplitude of the modulated light with a larger frequency is smaller than the amplitude of the modulated light with a smaller frequency; a receiving device, for receiving reflected light formed by reflection of the plurality of modulated lights by an object to be measured; and a processing device, electrically connected to the receiving device, for calculating the depth of the object to be measured based on a phase difference between the plurality of modulated lights and the corresponding reflected light.
[0014] Furthermore, the light source device includes: a light source, which is used to emit predetermined light; and a modulation unit, which is located on one side of the light source, and the modulation unit is used to modulate the predetermined light to obtain a plurality of modulated lights.
[0015] Furthermore, the light source device includes: a timer electrically connected to the modulation unit, and the timer is used to control the operation of the modulation unit.
[0016] Furthermore, the light source is an infrared VCSEL laser.
[0017] By applying the technical solution of the present application, in the depth detection method, first, controlling the emission of multiple modulated lights in sequence, the emission time periods corresponding to any two of the modulated lights are spaced apart, and the frequencies of the multiple modulated lights are different, and the amplitude of the modulated light with a larger frequency is smaller than the amplitude of the modulated light with a smaller frequency; then, obtaining multiple phase differences based on the multiple modulated lights, the phase difference being the difference between the phase of the modulated light and the phase of the corresponding reflected light, the reflected light being formed by the modulated light being reflected by the object to be measured, the frequencies and / or amplitudes of the multiple modulated lights corresponding to the multiple phase differences are different, and the emission time intervals of the multiple modulated lights are different; finally, calculating the depth of the object to be measured based on the multiple phase differences.
[0018] Compared with the method of obtaining the depth of the measured object by using only one modulated light in the prior art, this method uses multiple modulated lights with different frequencies and different amplitudes to obtain the depth of the measured object. The depth of the measured object may be the average value of the depths corresponding to the multiple modulated lights, or it may be the same value among the depths corresponding to the multiple modulated lights, so the depth obtained is more accurate. In addition, in this method, multiple modulated lights are emitted in sequence, and the emission time periods do not overlap, which ensures that different modulated lights do not affect each other, thereby further ensuring the accuracy of the corresponding phase difference obtained, and further ensuring the accuracy of the depth obtained by detection; in addition, among the multiple modulated lights, the amplitude corresponding to the modulated light with a smaller frequency is larger, which can ensure that the multiple modulated lights can be applied to the detection of measured objects of different depths, and ensure that the test method can be applied to the detection of measured objects of multiple different depths, so that the method can be widely used in various scenarios. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] The drawings constituting part of the present application are used to provide a further understanding of the present application. The exemplary embodiments and descriptions of the present application are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0020] Figure 1 A schematic diagram showing a flow chart of a depth detection method according to a first embodiment of the present application is shown;
[0021] Figure 2 A schematic structural diagram showing a depth detection method according to an eleventh embodiment of the present application; and
[0022] Figure 3 A schematic structural diagram of a depth detection system according to the twenty-first embodiment of the present application is shown. DETAILED DESCRIPTION
[0023] It should be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present application can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0024] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present application.
[0025] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequential order. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present application described here. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0026] It should be understood that when an element (such as a layer, film, region, or substrate) is described as being "on" another element, the element may be directly on the other element, or there may be intermediate elements. Moreover, in the specification and claims, when an element is described as being "connected" to another element, the element may be "directly connected" to the other element, or "connected" to the other element through a third element.
[0027] As introduced in the background art, the accuracy of depth calculation constructed using TOF in the prior art is poor. In order to solve this problem, according to the first embodiment of the present application, a depth detection method is provided.
[0028] Figure 1 FIG. 1 is a flow chart of a depth detection method according to the first embodiment of the present application. Figure 1 As shown, the method comprises the following steps:
[0029] Step S101, controlling to sequentially emit a plurality of modulated lights, wherein the emission time periods corresponding to any two of the modulated lights are spaced apart, the frequencies of the plurality of modulated lights are different, and among the plurality of modulated lights, the amplitude of the modulated light with a larger frequency is smaller than the amplitude of the modulated light with a smaller frequency;
[0030] Step S102, obtaining a plurality of phase differences according to the plurality of modulated lights, wherein the phase difference is a difference between a phase of the modulated light and a phase of a corresponding reflected light, wherein the reflected light is formed by the modulated light being reflected by the measured object, and the plurality of phase differences correspond to different frequencies and / or amplitudes of the plurality of modulated lights, that is, the plurality of phase differences correspond to a plurality of modulated lights that are only different in frequency, or the plurality of modulated lights that are only different in amplitude, or the plurality of modulated lights that are both different in frequency and amplitude, and the emission time interval of the plurality of modulated lights is different;
[0031] Step S103, calculating the depth of the object to be measured according to the multiple phase differences.
[0032] In the above-mentioned depth detection method, first, control is performed to sequentially emit a plurality of modulated lights, wherein the emission time periods corresponding to any two of the above-mentioned modulated lights are spaced apart, the frequencies of the plurality of modulated lights are different, and among the plurality of modulated lights, the amplitude of the modulated light with a larger frequency is smaller than the amplitude of the modulated light with a smaller frequency; then, a plurality of phase differences are acquired according to the plurality of modulated lights, wherein the phase difference is the difference between the phase of the modulated light and the phase of the corresponding reflected light, and the reflected light is formed by the reflection of the modulated light by the measured object, and the frequencies and / or amplitudes of the plurality of modulated lights corresponding to the plurality of phase differences are different, and the emission time intervals of the plurality of modulated lights are spaced apart; finally, the depth of the measured object is calculated according to the plurality of phase differences.
[0033] Compared with the method of obtaining the depth of the measured object by using only one modulated light in the prior art, this method uses multiple modulated lights with different frequencies and different amplitudes to obtain the depth of the measured object. The depth of the measured object may be the average value of the depths corresponding to the multiple modulated lights, or it may be the same value of the depths corresponding to the multiple modulated lights, so the depth obtained is more accurate. In addition, in this method, multiple modulated lights are emitted in sequence, and the emission time periods do not overlap, which ensures that the different modulated lights do not affect each other, thereby further ensuring the accuracy of the corresponding phase difference obtained, further ensuring the accuracy of the depth obtained by the detection, and alleviating the problem of poor accuracy of the depth calculation method constructed by using TOF in the prior art; in addition, among the multiple modulated lights, the amplitude corresponding to the modulated light with a smaller frequency is larger, and the amplitude corresponding to the modulated light with a smaller frequency is larger, so that the multiple modulated lights can be applied to the detection of the measured objects at different depths, and the test method can be applied to the detection of the measured objects at multiple different depths, so that the method can be widely used in a variety of scenarios.
[0034] It should be noted that the steps shown in the flowcharts of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and that, although a logical order is shown in the flowcharts, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0035] It should also be noted that the modulated lights of different frequencies and amplitudes of the present application can be obtained by modulating the light of the same frequency and amplitude. Of course, the modulated lights of different frequencies and amplitudes are not limited to the above-mentioned acquisition method, but can also be lights of multiple frequencies and amplitudes emitted by multiple lasers, that is, emitting multiple different modulated lights. Technical personnel in this field can also choose an appropriate method according to actual conditions.
[0036] In the actual detection process, in order to accurately calculate multiple phase differences, in the second embodiment of the present application, the emission time period of each of the above modulated lights is greater than or equal to 100T, wherein T is the period of the corresponding modulated light, and the T corresponding to different modulated lights is the same or different, and obtaining each of the above phase differences includes: receiving various reflected lights at least three times at a predetermined time interval t in each period of the above reflected light, T / 4≤t≤T / 3; calculating the above phase difference based on the at least three received various reflected lights. In general, the waveform function of the modulated light is known, that is, the phase of the modulated light is known. Assuming that the formula of the waveform function of the modulated light is r(x)=sin2πfx, θ is the phase difference, then the formula of the waveform function of the reflected light can be r(x)=C1+C2sin(2πfx+θ), wherein x represents the independent variable time, and the unknown variables are C1, C2, θ. Therefore, the unknown quantities C1, C2, θ can be solved by at least three measurements to calculate the phase difference θ.
[0037] In the above scheme, the predetermined time interval t is less than or equal to 1 / 3 of the period T of the waveform function of the modulated light, which can ensure that the reflected light is received at least three times within the emission time. The predetermined time interval t is greater than or equal to 1 / 4 of the period T of the waveform function of the modulated light, which can ensure that the light intensity r(x) of the received reflected light is different, avoiding the light intensity r(x) of the received reflected light being the same or similar, and improving the accuracy of the phase difference calculation. By analyzing the waveform function of the reflected light received at least three times, at least three groups of time points x and their corresponding light intensity r(x) values can be obtained, and the values are substituted into the formula r(x)=C1+C2sin(2πfx+θ) to calculate the phase difference θ.
[0038] Of course, if the frequencies of the multiple modulated lights are different, the corresponding periods are different, and the corresponding predetermined time intervals may also be different.
[0039] In the actual detection process, the method of obtaining multiple phase differences is not limited to the above-mentioned implementation mode. In the third embodiment of the present application, obtaining each of the above-mentioned phase differences includes: obtaining the phase of each of the above-mentioned modulated lights; obtaining the phase of the reflected light of each of the above-mentioned modulated lights passing through the object to be measured; and calculating each of the above-mentioned phase differences based on the phase of each of the above-mentioned modulated lights and the phase of the corresponding reflected light.
[0040] In order to improve the efficiency of detection, in a fourth embodiment of the present application, in the method, two phase differences are acquired, and the depth of the object to be detected is subsequently calculated based on the two phase differences.
[0041] In order to further ensure that the depth of the object to be measured is accurate, thereby improving the accuracy of depth detection, in the fifth embodiment of the present application, the depth of the above-mentioned object to be measured is calculated based on the multiple phase differences mentioned above, including: calculating a corresponding set of predicted depths based on each of the above-mentioned phase differences to obtain multiple sets of the above-mentioned predicted depths, each set of the above-mentioned predicted depths includes multiple different predicted depths, and the difference between any two of the above-mentioned predicted depths is nλ / 2, where n is a positive integer; comparing the above-mentioned groups of predicted depths, and taking the same predicted depth in the multiple groups of predicted depths as the depth of the above-mentioned object to be measured.
[0042] Specifically, each modulated light and its reflected light correspond to a phase difference, each phase difference corresponds to a set of predicted depths, and multiple sets of predicted depths can be obtained by performing depth detection on the object under test through multiple modulated lights. The predicted depths of each set are compared, and the same predicted depths in the multiple sets of predicted depths are taken as the depth of the object under test. The formula for the predicted depth is as follows: For example, when λ=2m and θ=π, the predicted depth can be 0.5m, 1.5m, 2.5m, ...; when λ=3m and θ=2π, the predicted depth can be 1.5m, 3m, 4.5m, ...; by comparison, the same predicted depths are 1.5m, 4.5m, 7.5m, etc. In order to reduce the same value of the predicted depth of the object under test, one or two modulated lights should be added to determine the depth of the object under test.
[0043] In the sixth embodiment of the present application, before obtaining the plurality of phase differences, the method further includes: obtaining a first ratio of the amplitudes of the two modulated lights adjacent in time and a second ratio of the amplitudes of the two corresponding reflected lights, and obtaining the phase difference according to the modulated light and the corresponding reflected light when the difference between the first ratio and the second ratio is within a predetermined range. If the difference between the first ratio and the second ratio is within the predetermined range, it means that the ambient light is weak and the modulated light does not jitter, etc., which can further ensure the accuracy of the detection result obtained by the detection method.
[0044] It should be noted that the difference between the first ratio and the second ratio in the present application refers to the calculation result obtained by subtracting the second ratio from the first ratio.
[0045] In actual application, the difference between the first ratio and the second ratio may not be within the predetermined range. In order to ensure that accurate detection results can be obtained in this case, in the seventh embodiment of the present application, when the difference between the above-mentioned first ratio and the above-mentioned second ratio is not within the above-mentioned predetermined range, one of the frequency and amplitude of the above-mentioned modulated light is adjusted.
[0046] Of course, in actual application, sometimes the ambient light is too strong. At this time, the difference between the corresponding first ratio and the second ratio is large, greater than the maximum value of the predetermined range, that is, greater than the first predetermined threshold. In order to ensure the accuracy of the detection result in this case, in the eighth embodiment of the present application, adjusting one of the frequency and amplitude of the modulated light includes: increasing the amplitude of the modulated light and keeping the frequency of the modulated light unchanged. In this way, the intensity of the reflected signal relative to the background is increased by keeping the frequency unchanged and increasing the amplitude, thereby reducing the error and ensuring the accuracy of the detection result.
[0047] Of course, sometimes the difference between the first ratio and the second ratio may be less than the minimum value of the predetermined range, that is, less than the second predetermined threshold value. This may be due to the device emitting the modulated light shaking or the object being measured moving. In order to further ensure the accuracy of detection in this case, in the ninth embodiment of the present application, adjusting one of the frequency and amplitude of the modulated light includes: increasing the frequency of the modulated light and keeping the amplitude of the modulated light unchanged. In this way, the error caused by jitter can be reduced by modulating light with a higher frequency, further ensuring the accuracy of detection.
[0048] Of course, if the difference between the first ratio and the second ratio corresponding to the above modulated light after adjustment is still greater than the first predetermined threshold, the amplitude of the modulated light continues to increase until the difference between the first ratio and the second ratio is within the predetermined range. If the difference between the first ratio and the second ratio corresponding to the above modulated light after adjustment is still less than the second predetermined threshold, the frequency of the modulated light continues to increase until the difference between the first ratio and the second ratio is within the predetermined range.
[0049] In order to further ensure the accuracy of the detection results, in the tenth embodiment of the present application, before controlling the sequential emission of multiple modulated lights, the above method also includes: predicting the depth of the above-mentioned object to be detected to obtain a predicted depth; determining the frequency and amplitude of the multiple modulated lights according to the predicted depth. Depending on the predicted depth of the object to be detected, that is, the distance from the emission position of the modulated light, the frequency and amplitude of the modulated light corresponding to the detection depth are also different. Generally speaking, the greater the depth of the object to be detected, the lower the frequency and the larger the amplitude of the modulated light required for detection, and the smaller the depth of the object to be detected, the higher the frequency and the smaller the amplitude of the modulated light required for detection.
[0050] The eleventh embodiment of the present application further provides a depth detection device. It should be noted that the depth detection device of the embodiment of the present application can be used to execute the depth detection method provided in the embodiment of the present application. The depth detection device provided in the eleventh embodiment of the present application is introduced below.
[0051] Figure 2Schematic diagram of a depth detection device according to the eleventh embodiment of the present application. Figure 2 As shown, the device comprises:
[0052] A control unit 10 is used to control the sequential emission of multiple modulated lights, wherein emission time periods corresponding to any two of the modulated lights are spaced apart, the frequencies of the multiple modulated lights are different, and among the multiple modulated lights, the amplitude of the modulated light with a larger frequency is smaller than the amplitude of the modulated light with a smaller frequency;
[0053] An acquisition unit 20, configured to acquire a plurality of phase differences according to the plurality of modulated lights, each of the phase differences being a difference between a phase of the modulated light and a phase of a corresponding reflected light, wherein the reflected light is formed by the modulated light being reflected by the measured object;
[0054] The calculation unit 30 is used to calculate the depth of the object under test according to the multiple phase differences.
[0055] In the above-mentioned depth detection device, the control unit controls the sequential emission of multiple modulated lights, the emission time periods corresponding to any two of the above-mentioned modulated lights are spaced apart, the frequencies of the multiple modulated lights are different, and among the multiple modulated lights, the amplitude of the modulated light with a larger frequency is smaller than the amplitude of the modulated light with a smaller frequency; the acquisition unit acquires the difference between the phase of the multiple modulated lights and the phase of the corresponding reflected light, that is, acquires multiple phase differences, and the frequencies and / or amplitudes of the multiple modulated lights corresponding to the multiple phase differences are different; the calculation unit calculates the depth of the object to be measured based on the multiple phase differences.
[0056] Compared with the device in the prior art that only uses one modulated light to obtain the depth of the measured object, the device uses multiple modulated lights with different frequencies and different amplitudes to obtain the depth of the measured object. The depth of the measured object may be the average value of the depths corresponding to the multiple modulated lights, or it may be the same value among the depths corresponding to the multiple modulated lights, so the depth obtained is more accurate. In addition, in the device, multiple modulated lights are emitted in sequence, and the emission time periods do not overlap, which ensures that different modulated lights do not affect each other, thereby further ensuring the accuracy of the corresponding phase difference obtained, and further ensuring the accuracy of the depth obtained by detection; in addition, among the multiple modulated lights, the modulated light with a smaller frequency corresponds to a larger amplitude, which can ensure that the multiple modulated lights can be applied to the detection of measured objects of different depths, and ensure that the test device can be applied to the detection of multiple measured objects of different depths, so that the device can be widely used in various scenarios.
[0057] It should also be noted that the modulated lights of different frequencies and amplitudes of the present application can be obtained by modulating the light of the same frequency and amplitude. Of course, the modulated lights of different frequencies and amplitudes are not limited to the above-mentioned acquisition method, but can also be lights of multiple frequencies and amplitudes emitted by multiple lasers, that is, emitting multiple different modulated lights. Technical personnel in this field can also choose an appropriate method according to actual conditions.
[0058] In the actual detection process, in order to accurately calculate multiple phase differences, in the twelfth embodiment of the present application, the emission time period of various modulated lights is greater than or equal to 100T, wherein T is the corresponding period of the modulated light, and the T corresponding to different modulated lights is the same or different, and the acquisition unit includes a receiving module and a first calculation module, wherein the receiving module is used to receive various reflected lights at least three times at a predetermined time interval t in each period of the reflected light, T / 4≤t≤T / 3; the first calculation module is used to calculate the phase difference according to the at least three received various reflected lights. In general, the waveform function of the modulated light is known, that is, the phase of the modulated light is known, assuming that the formula of the waveform function of the modulated light is r(x)=sin2πfx, θ is the phase difference, then the formula of the waveform function of the reflected light can be r(x)=C1+C2sin(2πfxθ), wherein x represents the independent variable time, and the unknown variables are C1, C2, θ, therefore, the unknown quantities C1, C2, θ can be solved by at least three measurements, thereby calculating the phase difference θ.
[0059] In the above scheme, the predetermined time interval t is less than or equal to 1 / 3 of the period T of the waveform function of the modulated light, which can ensure that the reflected light is received at least three times within the emission time. The predetermined time interval t is greater than or equal to 1 / 4 of the period T of the waveform function of the modulated light, which can ensure that the light intensity r(x) of the received reflected light is different, avoiding the light intensity r(x) of the received reflected light being the same or similar, and improving the accuracy of the phase difference calculation. By analyzing the waveform function of the reflected light received at least three times, at least three groups of time points x and their corresponding light intensity r(x) values can be obtained, and the values are substituted into the formula r(x)=C1+C2sin(2πfx+θ) to calculate the phase difference θ.
[0060] Of course, if the frequencies of the multiple modulated lights are different, the corresponding periods are different, and the corresponding predetermined time intervals may also be different.
[0061] In the actual detection process, the acquisition unit is not limited to including an acquisition module and a first calculation module. In the thirteenth embodiment of the present application, the acquisition unit includes an acquisition module and a second calculation module, wherein the acquisition module is used to acquire the phases of the various modulated lights mentioned above; the acquisition module is also used to acquire the phases of the reflected lights of the various modulated lights passing through the object to be measured; the second calculation module is used to calculate the above-mentioned phase differences according to the phases of the various modulated lights and the corresponding reflected lights.
[0062] In order to improve the efficiency of detection, in the fourteenth embodiment of the present application, in the above-mentioned device, the acquisition unit is used to acquire two phase differences, and subsequently calculate the depth of the object to be measured based on the two phase differences.
[0063] In order to further ensure that the accurate depth of the object to be measured is obtained, thereby improving the accuracy of depth detection, in the fifteenth embodiment of the present application, the calculation unit includes a third calculation module and a determination module, wherein the third calculation module is used to calculate a corresponding set of predicted depths according to each of the above-mentioned phase differences to obtain multiple sets of the above-mentioned predicted depths, each set of the above-mentioned predicted depths includes multiple different predicted depths, and the difference between any two of the above-mentioned predicted depths is nλ / 2, wherein n is a positive integer; the determination module is used to compare the above-mentioned groups of predicted depths, and take the same predicted depth in the multiple groups of predicted depths as the depth of the above-mentioned object to be measured.
[0064] Specifically, each modulated light and its reflected light correspond to a phase difference, each phase difference corresponds to a set of predicted depths, and multiple sets of predicted depths can be obtained by performing depth detection on the object under test through multiple modulated lights. The predicted depths of each set are compared, and the same predicted depths in the multiple sets of predicted depths are taken as the depth of the object under test. The formula for the predicted depth is as follows: For example, when λ=2m and θ=π, the predicted depth can be 0.5m, 1.5m, 2.5m, ...; when λ=3m and θ=2π, the predicted depth can be 1.5m, 3m, 4.5m, ...; by comparison, the same predicted depths are 1.5m, 4.5m, 7.5m, etc. In order to reduce the same value of the predicted depth of the object under test, one or two modulated lights should be added to determine the depth of the object under test.
[0065] In order to control the error caused by the environment within a normal range, so that the depth obtained by detection is more accurate, in the sixteenth embodiment of the present application, the above-mentioned calculation unit also includes a fourth calculation module, and the fourth calculation module is used to calculate the first ratio of the amplitudes of the two modulated lights adjacent in time and the second ratio of the amplitudes of the two corresponding reflected lights. When the difference between the first ratio and the second ratio is within a predetermined range, the acquisition unit obtains the above-mentioned phase difference according to the modulated light and the corresponding reflected light. If the difference between the first ratio and the second ratio is within the predetermined range, it means that the external ambient light is weak, and the modulated light does not jitter, etc., which can further ensure the accuracy of the detection result obtained by the detection device.
[0066] It should be noted that the difference between the first ratio and the second ratio in the present application refers to the calculation result obtained by subtracting the second ratio from the first ratio.
[0067] In actual application, the difference between the first ratio and the second ratio may not be within the predetermined range. In order to ensure that accurate detection results can be obtained in this case, in the seventeenth embodiment of the present application, the control unit is also used to adjust one of the frequency and amplitude of the modulated light when the difference between the first ratio and the second ratio is not within the predetermined range.
[0068] Of course, in actual application, sometimes the ambient light is too strong. At this time, the difference between the corresponding first ratio and the second ratio is large, greater than the maximum value of the predetermined range, that is, greater than the first predetermined threshold. In order to ensure the accuracy of the detection result in this case, in the eighteenth embodiment of the present application, the control unit is also used to adjust one of the frequency and amplitude of the modulated light, including: increasing the amplitude of the modulated light, and keeping the frequency of the modulated light unchanged. In this way, the intensity of the reflected signal relative to the background is increased by keeping the frequency unchanged and increasing the amplitude, thereby reducing the error and ensuring the accuracy of the detection result.
[0069] Of course, sometimes the difference between the first ratio and the second ratio may be less than the minimum value of the predetermined range, that is, less than the second predetermined threshold value. This may be due to the device emitting the modulated light shaking or the object being measured moving. In order to further ensure the accuracy of detection in this case, in the nineteenth embodiment of the present application, the control unit in the above-mentioned device is also used to adjust one of the frequency and amplitude of the above-mentioned modulated light, including: increasing the frequency of the above-mentioned modulated light and keeping the amplitude of the above-mentioned modulated light unchanged. In this way, the error caused by jitter can be reduced by modulating light with a higher frequency, thereby further ensuring the accuracy of detection.
[0070] Of course, when the difference between the first ratio and the second ratio corresponding to the above modulated light after adjustment is still greater than the first predetermined threshold, the control unit continues to increase the amplitude of the modulated light until the difference between the first ratio and the second ratio is within the predetermined range. When the difference between the first ratio and the second ratio corresponding to the above modulated light after adjustment is still less than the second predetermined threshold, the control unit continues to increase the frequency of the modulated light until the difference between the first ratio and the second ratio is within the predetermined range.
[0071] In order to further ensure the accuracy of the detection results, in the twentieth embodiment of the present application, the above-mentioned device also includes a prediction unit and a determination unit, wherein the prediction unit is used to predict the depth of the above-mentioned object to be detected before controlling the sequential emission of multiple modulated lights to obtain a predicted depth; the determination unit is used to determine the frequency and amplitude of the multiple modulated lights according to the predicted depth. Depending on the predicted depth of the object to be detected, that is, the distance from the emission position of the modulated light, the frequency and amplitude of the modulated light corresponding to the detection depth are also different. Generally speaking, the greater the depth of the object to be detected, the lower the frequency and the larger the amplitude of the modulated light required for detection, and the smaller the depth of the object to be detected, the higher the frequency and the smaller the amplitude of the modulated light required for detection.
[0072] The twenty-first embodiment of the present application also provides a depth detection system. It should be noted that the depth detection system of the embodiment of the present application can be used to execute the depth detection method provided by the above-mentioned embodiment of the present application. The depth detection system provided by the twenty-first embodiment of the present application is introduced below.
[0073] Figure 3 FIG. 2 is a flow chart of a depth detection system according to the twenty-first embodiment of the present application. Figure 3 As shown, the system includes:
[0074] The light source device 40 sequentially emits a plurality of modulated lights, wherein the emission time periods corresponding to any two of the modulated lights are separated, the frequencies of the plurality of modulated lights are different, and among the plurality of modulated lights, the amplitude of the modulated light with a larger frequency is smaller than the amplitude of the modulated light with a smaller frequency;
[0075] A receiving device 50, used for receiving reflected light formed by the plurality of modulated lights mentioned above reflected by the measured object;
[0076] The processing device 60 is electrically connected to the receiving device, and is used to calculate the depth of the object 01 according to the phase differences of the multiple modulated lights and the corresponding reflected lights.
[0077] In the above-mentioned depth detection system, the light source device sequentially emits a plurality of modulated lights, the emission time periods corresponding to any two of the above-mentioned modulated lights are spaced apart, the frequencies of the plurality of the above-mentioned modulated lights are different, and among the plurality of the above-mentioned modulated lights, the amplitude of the above-mentioned modulated light with a larger frequency is smaller than the amplitude of the above-mentioned modulated light with a smaller frequency, the receiving device receives reflected light formed by reflection of the various modulated lights by the measured object, the processing device obtains the phase difference between the various modulated lights and the corresponding reflected light, obtains the plurality of the above-mentioned phase differences, and calculates the depth of the measured object based on the plurality of phase differences.
[0078] Compared with the prior art system that uses only one modulated light to obtain the depth of the measured object, this system uses multiple modulated lights with different frequencies and amplitudes to obtain the depth of the measured object. The depth of the measured object may be the average value of the depths corresponding to the multiple modulated lights, or it may be the same value among the depths corresponding to the multiple modulated lights, so the depth obtained is more accurate. In addition, in this system, multiple modulated lights are emitted in sequence, and the emission time periods do not overlap, which ensures that different modulated lights do not affect each other, thereby further ensuring the accuracy of the corresponding phase difference obtained, and further ensuring the accuracy of the depth obtained by detection; in addition, among the multiple modulated lights, the modulated light with a smaller frequency corresponds to a larger amplitude, which can ensure that the multiple modulated lights can be applied to the detection of measured objects of different depths, and ensure that the test system can be applied to the detection of measured objects of multiple different depths, so that the system can be widely used in a variety of scenarios.
[0079] The detection system can be a mobile phone, a PAD or a computer, etc. Of course, it is not limited to these systems, and can also be any system including the above three devices.
[0080] In the twenty-second embodiment of the present application, the above-mentioned light source device includes a light source and a modulation unit, wherein the light source is used to emit predetermined light; the modulation unit is located on one side of the above-mentioned light source, and is used to modulate the above-mentioned predetermined light to obtain the above-mentioned multiple modulated lights.
[0081] Of course, the light source device is not limited to the above structure, and may also include multiple lasers, which emit different modulated lights, that is, with different frequencies and amplitudes.
[0082] In the twenty-third embodiment of the present application, the light source device further includes a timer, the timer is electrically connected to the modulation unit, the timer is used to control the operation of the modulation unit, and the timer is used to control the modulation unit to modulate the predetermined light emitted at different times. The timer can control the emission duration of the modulated light by controlling the operation of the modulation unit, that is, controlling the emission time period of the modulated light, to ensure that the emission duration of the modulated light is greater than or equal to 100T.
[0083] In order to further improve the accuracy of detection, in the twenty-fourth embodiment of the present application, the above-mentioned light source is an infrared VCSEL laser, and the light emitted by the light source is infrared light.
[0084] In the twenty-fifth embodiment of the present application, the duration of the modulated light emitted by the light source device is greater than or equal to 100T, wherein T is the period of the modulated light, and different modulated lights have the same or different Ts; the receiving device receives the reflected light of various modulated lights at least three times at a predetermined time interval t, and T / 4≤t≤T / 3.
[0085] It should be noted that the predetermined time interval t is less than or equal to 1 / 3 of the period T of the waveform function of the modulated light, which can ensure that the reflected light is received at least three times within the emission duration. The predetermined time interval t is greater than or equal to 1 / 4 of the period T of the waveform function of the modulated light, which can ensure that the intensities of the received reflected lights are different, thereby avoiding the same or similar intensities of the received reflected lights and improving the accuracy of the phase difference calculation.
[0086] In the twenty-sixth embodiment of the present application, the above-mentioned processing device includes an acquisition unit and a calculation unit, wherein the acquisition unit is used to acquire multiple phase differences based on the above-mentioned multiple modulated lights, each of the above-mentioned phase differences is the difference between the phase of the modulated light and the phase of the corresponding reflected light, and the above-mentioned reflected light is formed by the above-mentioned modulated light being reflected by the object to be measured; the calculation unit is used to calculate the depth of the above-mentioned object to be measured based on the above-mentioned multiple phase differences.
[0087] In the actual detection process, in order to accurately calculate multiple phase differences, in the twenty-seventh embodiment of the present application, the emission time period of various modulated lights is greater than or equal to 100T, wherein T is the period of the corresponding modulated light, and the T corresponding to different modulated lights is the same or different, and the acquisition unit includes a receiving module and a first calculation module, wherein the receiving module is used to receive various reflected lights at least three times at a predetermined time interval t in each period of the reflected light, T / 4≤t≤T / 3; the first calculation module is used to calculate the above phase difference based on the at least three received various reflected lights. In general, the waveform function of the modulated light is known, that is, the phase of the modulated light is known. Assuming that the formula of the waveform function of the modulated light is r(x)=sin2πfx, θ is the phase difference, then the formula of the waveform function of the reflected light can be r(x)=C1+C2sin(2πfxθ), wherein x represents the independent variable time, and the unknown variables are C1, C2, θ. Therefore, the unknown quantities C1, C2, θ can be solved by at least three measurements to calculate the phase difference θ.
[0088] In the above scheme, the predetermined time interval t is less than or equal to 1 / 3 of the period T of the waveform function of the modulated light, which can ensure that the reflected light is received at least three times within the emission time. The predetermined time interval t is greater than or equal to 1 / 4 of the period T of the waveform function of the modulated light, which can ensure that the light intensity r(x) of the received reflected light is different, avoiding the light intensity r(x) of the received reflected light being the same or similar, and improving the accuracy of the phase difference calculation. By analyzing the waveform function of the reflected light received at least three times, at least three groups of time points x and their corresponding light intensity r(x) values can be obtained, and the values are substituted into the formula r(x)=C1+C2sin(2πfx+θ) to calculate the phase difference θ.
[0089] Of course, if the frequencies of the multiple modulated lights are different, the corresponding periods are different, and the corresponding predetermined time intervals may also be different.
[0090] In the actual detection process, the acquisition unit is not limited to including an acquisition module and a first calculation module. In the twenty-eighth embodiment of the present application, the acquisition unit includes an acquisition module and a second calculation module, wherein the acquisition module is used to acquire the phases of the various modulated lights mentioned above; the acquisition module is also used to acquire the phases of the reflected lights of the various modulated lights passing through the object to be measured; the second calculation module is used to calculate the above-mentioned phase differences according to the phases of the various modulated lights and the corresponding reflected lights.
[0091] In order to improve the efficiency of detection, in the twenty-ninth embodiment of the present application, in the above-mentioned processing device, the acquisition unit is used to acquire two phase differences, and subsequently calculate the depth of the object to be measured based on the two phase differences.
[0092] In order to further ensure that the depth of the object to be measured is accurate, thereby improving the accuracy of depth detection, in the thirtieth embodiment of the present application, the calculation unit includes a third calculation module and a determination module, wherein the third calculation module is used to calculate a corresponding set of predicted depths according to each of the above-mentioned phase differences to obtain multiple sets of the above-mentioned predicted depths, each set of the above-mentioned predicted depths includes multiple different predicted depths, and the difference between any two of the above-mentioned predicted depths is nλ / 2, wherein n is a positive integer; the determination module is used to compare the above-mentioned groups of predicted depths, and take the same predicted depth in the multiple groups of predicted depths as the depth of the above-mentioned object to be measured.
[0093] Specifically, each modulated light and its reflected light correspond to a phase difference, each phase difference corresponds to a set of predicted depths, and multiple sets of predicted depths can be obtained by performing depth detection on the object under test through multiple modulated lights. The predicted depths of each set are compared, and the same predicted depths in the multiple sets of predicted depths are taken as the depth of the object under test. The formula for the predicted depth is as follows: For example, when λ=2m and θ=π, the predicted depth can be 0.5m, 1.5m, 2.5m, ...; when λ=3m and θ=2π, the predicted depth can be 1.5m, 3m, 4.5m, ...; by comparison, the same predicted depths are 1.5m, 4.5m, 7.5m, etc. In order to reduce the same value of the predicted depth of the object under test, one or two modulated lights should be added to determine the depth of the object under test.
[0094] In order to control the error caused by the environment within a normal range, so that the depth obtained by detection is more accurate, in the thirty-first embodiment of the present application, the above-mentioned calculation unit also includes a fourth calculation module, and the fourth calculation module is used to calculate the first ratio of the amplitudes of the two modulated lights adjacent in time and the second ratio of the amplitudes of the two corresponding reflected lights. When the difference between the first ratio and the second ratio is within a predetermined range, the acquisition unit obtains the above-mentioned phase difference according to the modulated light and the corresponding reflected light. If the difference between the first ratio and the second ratio is within the predetermined range, it means that the external ambient light is weak, and the modulated light does not jitter, etc., which can further ensure the accuracy of the detection result obtained by the detection device.
[0095] It should be noted that the difference between the first ratio and the second ratio in the present application refers to the calculation result obtained by subtracting the second ratio from the first ratio.
[0096] In actual application, the difference between the first ratio and the second ratio may not be within the predetermined range. In order to ensure that accurate detection results can be obtained in this case, in the thirty-second embodiment of the present application, the processing device also includes a control unit, which is further used to adjust one of the frequency and amplitude of the modulated light when the difference between the first ratio and the second ratio is not within the predetermined range.
[0097] Of course, in actual application, sometimes the ambient light is too strong. At this time, the difference between the corresponding first ratio and the second ratio is large, greater than the maximum value of the predetermined range, that is, greater than the first predetermined threshold. In order to ensure the accuracy of the detection result in this case, in the thirty-third embodiment of the present application, the control unit is also used to adjust one of the frequency and amplitude of the modulated light, including: increasing the amplitude of the modulated light, and keeping the frequency of the modulated light unchanged. In this way, the intensity of the reflected signal relative to the background is increased by keeping the frequency unchanged and increasing the amplitude, thereby reducing the error and ensuring the accuracy of the detection result.
[0098] Of course, sometimes the difference between the first ratio and the second ratio may be less than the minimum value of the predetermined range, that is, less than the second predetermined threshold value. This may be due to the device emitting the modulated light shaking or the object being measured moving. In order to further ensure the accuracy of detection in this case, in the thirty-fourth embodiment of the present application, the control unit in the above-mentioned device is also used to adjust one of the frequency and amplitude of the above-mentioned modulated light, including: increasing the frequency of the above-mentioned modulated light and keeping the amplitude of the above-mentioned modulated light unchanged. In this way, the error caused by jitter can be reduced by modulating light with a higher frequency, further ensuring the accuracy of detection.
[0099] Of course, when the difference between the first ratio and the second ratio corresponding to the above modulated light after adjustment is still greater than the first predetermined threshold, the control unit continues to increase the amplitude of the modulated light until the difference between the first ratio and the second ratio is within the predetermined range. When the difference between the first ratio and the second ratio corresponding to the above modulated light after adjustment is still less than the second predetermined threshold, the control unit continues to increase the frequency of the modulated light until the difference between the first ratio and the second ratio is within the predetermined range.
[0100] In order to further ensure the accuracy of the detection results, in the thirty-fifth embodiment of the present application, the above-mentioned processing device also includes a prediction unit and a determination unit, wherein the prediction unit is used to predict the depth of the above-mentioned object to be detected before controlling the emission of multiple modulated lights in sequence to obtain a predicted depth; the determination unit is used to determine the frequency and amplitude of the multiple modulated lights according to the predicted depth. Depending on the predicted depth of the object to be detected, that is, the distance from the emission position of the modulated light, the frequency and amplitude of the modulated light corresponding to the detection depth are also different. Generally speaking, the greater the depth of the object to be detected, the lower the frequency and the larger the amplitude of the modulated light required for detection, and the smaller the depth of the object to be detected, the higher the frequency and the smaller the amplitude of the modulated light required for detection.
[0101] In order to reduce the impact of environmental noise, improve the signal-to-noise ratio, and thus improve the accuracy of depth detection, in the thirty-sixth embodiment of the present application, the detection system also includes a filter, which is located on the incident side of the reflected light of the receiving device, and is used to filter out at least part of the light other than infrared light.
[0102] In order to reduce the influence of environmental noise, eliminate multipath reflection interference, further improve the signal-to-noise ratio, and thus further improve the accuracy of depth detection, in the thirty-seventh embodiment of the present application, the detection system further includes at least one polarizer, which is arranged on the light emitting side of the light source device or the incident side of the reflected light of the receiving device. When the modulated light is polarized light, the polarization direction of the polarizer is consistent with the polarization direction of the modulated light, which can reduce the ambient light of other polarization directions passing through the polarizer, thereby reducing the influence of ambient light on the entire detection process, thereby further improving the detection accuracy of the detection device; when the modulated light is non-polarized light, the polarization direction of the polarizer should be consistent with the direction of the maximum light intensity of the modulated light, which can ensure that more reflected light enters the receiving device, while also reducing the influence of ambient light, thereby further improving the detection accuracy of the detection system.
[0103] In the thirty-eighth embodiment of the present application, the detection system further includes a first polarizer and a second polarizer, wherein the first polarizer is arranged on the light emitting side of the light source device, and the second polarizer is arranged on the incident side of the reflected light of the receiving device. The first polarizer and the second polarizer can filter stray light in the environment and eliminate the influence of ambient light, thereby improving the accuracy of depth detection.
[0104] In the thirty-ninth embodiment of the present application, the detection device further includes a phase comparator, which is electrically connected to the receiving device and the processing device, respectively, and is used to detect the phases of the various reflected lights. Specifically, the phase comparator is electrically connected to an acquisition unit in the processing device, and the acquisition unit obtains a phase difference based on the phase of the reflected light acquired by the phase comparator and the phase of the corresponding modulated light.
[0105] The above-mentioned depth detection device includes a processor and a memory. The above-mentioned acquisition unit and calculation unit, etc. are all stored in the memory as program units, and the processor executes the above-mentioned program units stored in the memory to realize corresponding functions.
[0106] The processor includes a kernel, which retrieves the corresponding program unit from the memory. One or more kernels can be set, and the problem of poor accuracy of depth calculation using TOF in the prior art can be solved by adjusting kernel parameters.
[0107] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM, and the memory includes at least one memory chip.
[0108] The fortieth embodiment of the present invention provides a storage medium having a program stored thereon, which implements the above-mentioned depth detection method when executed by a processor.
[0109] The forty-first embodiment of the present invention provides a processor, and the processor is used to run a program, wherein the depth detection method is executed when the program is running.
[0110] A forty-second embodiment of the present invention provides a device, comprising a processor, a memory, and a program stored in the memory and executable on the processor, wherein when the processor executes the program, at least the following steps are implemented:
[0111] Step S101, controlling to sequentially emit a plurality of modulated lights, wherein the emission time periods corresponding to any two of the modulated lights are spaced apart, the frequencies of the plurality of modulated lights are different, and among the plurality of modulated lights, the amplitude of the modulated light with a larger frequency is smaller than the amplitude of the modulated light with a smaller frequency;
[0112] Step S102, obtaining a plurality of phase differences according to the plurality of modulated lights, wherein the phase difference is a difference between a phase of the modulated light and a phase of a corresponding reflected light, wherein the reflected light is formed by the modulated light being reflected by the measured object, and the plurality of phase differences correspond to different frequencies and / or amplitudes of the plurality of modulated lights, that is, the plurality of phase differences correspond to a plurality of modulated lights that are only different in frequency, or the plurality of modulated lights that are only different in amplitude, or the plurality of modulated lights that are both different in frequency and amplitude, and the emission time interval of the plurality of modulated lights is different;
[0113] Step S103, calculating the depth of the object to be measured according to the multiple phase differences.
[0114] The devices in this article can be servers, PCs, PADs, mobile phones, etc.
[0115] The present application also provides a computer program product, which, when executed on a data processing device, is suitable for executing a program for initializing at least the following method steps:
[0116] Step S101, controlling to sequentially emit a plurality of modulated lights, wherein the emission time periods corresponding to any two of the modulated lights are spaced apart, the frequencies of the plurality of modulated lights are different, and among the plurality of modulated lights, the amplitude of the modulated light with a larger frequency is smaller than the amplitude of the modulated light with a smaller frequency;
[0117] Step S102, obtaining a plurality of phase differences according to the plurality of modulated lights, wherein the phase difference is a difference between a phase of the modulated light and a phase of a corresponding reflected light, wherein the reflected light is formed by the modulated light being reflected by the measured object, and the plurality of phase differences correspond to different frequencies and / or amplitudes of the plurality of modulated lights, that is, the plurality of phase differences correspond to a plurality of modulated lights that are only different in frequency, or the plurality of modulated lights that are only different in amplitude, or the plurality of modulated lights that are both different in frequency and amplitude, and the emission time interval of the plurality of modulated lights is different;
[0118] Step S103, calculating the depth of the object to be measured according to the multiple phase differences.
[0119] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.
[0120] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block 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, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0121] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0122] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process in the computer or other programmable device. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0123] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0124] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0125] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.
[0126] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0127] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.
[0128] From the above description, it can be seen that the above embodiments of the present application achieve the following technical effects:
[0129] 1) Compared with the method of obtaining the depth of the measured object by only using one modulated light in the prior art, the depth detection method of the present application uses multiple modulated lights with different frequencies and different amplitudes to obtain the depth of the measured object. The depth of the measured object may be the average value of the depths corresponding to the multiple modulated lights, or it may be the same value in the depths corresponding to the multiple modulated lights, so the depth obtained is more accurate. In addition, in this method, multiple modulated lights are emitted in sequence, and the emission time periods do not overlap, which ensures that the different modulated lights do not affect each other, thereby further ensuring the accuracy of the corresponding phase difference obtained, further ensuring the accuracy of the depth obtained by the detection, and alleviating the problem of poor accuracy of the depth calculation method using TOF in the prior art; in addition, among the multiple modulated lights, the amplitude corresponding to the modulated light with a smaller frequency is larger, and the amplitude corresponding to the modulated light with a smaller frequency is larger, so that the multiple modulated lights can be applied to the detection of the measured objects of different depths, and the test method can be applied to the detection of the measured objects of multiple different depths, so that the method can be widely used in a variety of scenarios.
[0130] 2) Compared with the device in the prior art that uses only one modulated light to obtain the depth of the measured object, the depth detection device of the present application uses multiple modulated lights with different frequencies and amplitudes to obtain the depth of the measured object. The depth of the measured object may be the average value of the depths corresponding to the multiple modulated lights, or it may be the same value of the depths corresponding to the multiple modulated lights, so the depth obtained is more accurate. In addition, in the device, multiple modulated lights are emitted in sequence, and the emission time periods do not overlap, which ensures that the different modulated lights do not affect each other, thereby further ensuring the accuracy of the corresponding phase difference obtained and the accuracy of the depth obtained by detection; in addition, among the multiple modulated lights, the modulated light with a smaller frequency corresponds to a larger amplitude, which can ensure that the multiple modulated lights can be applied to the detection of measured objects of different depths, and ensure that the test device can be applied to the detection of multiple measured objects of different depths, so that the device can be widely used in a variety of scenarios.
[0131] 3) In the depth detection system of the present application, the light source device sequentially emits a plurality of modulated lights, and the emission time periods corresponding to any two of the above modulated lights are spaced apart, and the frequencies of the above modulated lights are all different. Among the above modulated lights, the amplitude of the above modulated light with a larger frequency is smaller than the amplitude of the above modulated light with a smaller frequency. The receiving device receives the reflected light formed by the various modulated lights reflected by the measured object, and the processing device obtains the phase difference between the various modulated lights and the corresponding reflected light, obtains a plurality of the above phase differences, and calculates the depth of the measured object based on the plurality of phase differences. Compared with the system in the prior art that only uses one modulated light to obtain the depth of the measured object, the depth obtained by this system is more accurate.
[0132] The above are only preferred embodiments of the present application and are not intended to limit the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.
Claims
1. A depth detection method, characterized in that: include: Controlling to sequentially emit a plurality of modulated lights, wherein the emission time periods corresponding to any two of the modulated lights are spaced apart, the frequencies of the plurality of modulated lights are different, and among the plurality of modulated lights, the amplitude of the modulated light with a larger frequency is smaller than the amplitude of the modulated light with a smaller frequency; Acquire multiple phase differences according to the multiple modulated lights, wherein the phase difference is a difference between a phase of the modulated light and a phase of a corresponding reflected light, wherein the reflected light is formed by the modulated light being reflected by the measured object; The depth of the object under test is calculated according to the multiple phase differences, wherein the depth of the object under test according to the multiple phase differences comprises: calculating a corresponding set of predicted depths according to each phase difference to obtain multiple sets of predicted depths, each set of predicted depths comprises multiple different predicted depths, and the difference between any two predicted depths is nλ / 2, wherein n is a positive integer; comparing the predicted depths of each set, and taking the same predicted depth in the multiple sets of predicted depths as the depth of the object under test.
2. The method according to claim 1, characterized in that The emission time period of each modulated light is greater than or equal to 100T, wherein T is the period of the corresponding modulated light, and T corresponding to different modulated lights is the same or different, and obtaining each phase difference includes: receiving various reflected lights at least three times at a predetermined time interval t in each cycle of the reflected light, T / 4≤ t≤ T / 3; The phase difference is calculated based on at least three received reflection lights.
3. The method according to claim 1 or 2, characterized in that Before acquiring the plurality of phase differences, the method further comprises: acquiring a first ratio of amplitudes of any two modulated lights that are adjacent in time and a second ratio of amplitudes of corresponding two reflected lights, When the difference between the first ratio and the second ratio is within a predetermined range, the phase difference is acquired according to the modulated light and the corresponding reflected light.
4. The method according to claim 3, characterized in that Before acquiring the plurality of phase differences, the method further includes: When the difference between the first ratio and the second ratio is not within the predetermined range, one of the frequency and the amplitude of the modulated light is adjusted.
5. A depth detection device, characterized in that: include: A control unit, used for controlling the sequential emission of a plurality of modulated lights, wherein the emission time periods corresponding to any two of the modulated lights are spaced apart, the frequencies of the plurality of modulated lights are different, and among the plurality of modulated lights, the amplitude of the modulated light with a larger frequency is smaller than the amplitude of the modulated light with a smaller frequency; An acquisition unit, configured to acquire a plurality of phase differences according to the plurality of modulated lights, wherein the phase difference is a difference between a phase of the modulated light and a phase of a corresponding reflected light, and the reflected light is formed by the modulated light being reflected by the measured object; A calculation unit is used to calculate the depth of the object under test according to the multiple phase differences, wherein the calculation unit includes a third calculation module and a determination module, the third calculation module is used to calculate a corresponding set of predicted depths according to each of the above phase differences to obtain multiple sets of the above predicted depths, each set of the above predicted depths includes multiple different predicted depths, and the difference between any two of the above predicted depths is nλ / 2, wherein n is a positive integer; the determination module is used to compare the above sets of predicted depths, and take the same predicted depth in the multiple sets of predicted depths as the depth of the object under test.
6. A depth detection system, characterized in that: include: A light source device, used for sequentially emitting a plurality of modulated lights, wherein the emission time periods corresponding to any two of the modulated lights are spaced apart, the frequencies of the plurality of modulated lights are different, and among the plurality of modulated lights, the amplitude of the modulated light with a larger frequency is smaller than the amplitude of the modulated light with a smaller frequency; A receiving device, used for receiving reflected light formed by the plurality of modulated lights reflected by the measured object; A processing device is electrically connected to the receiving device, and is used to calculate the depth of the object under test based on the phase difference between the multiple modulated lights and the corresponding reflected lights, wherein the depth of the object under test based on the phase difference between the multiple modulated lights and the corresponding reflected lights includes: calculating a corresponding set of predicted depths based on each phase difference to obtain multiple sets of predicted depths, each set of predicted depths includes multiple different predicted depths, and the difference between any two predicted depths is nλ / 2, where n is a positive integer; comparing the predicted depths of each set, and taking the same predicted depth in the multiple sets of predicted depths as the depth of the object under test.
7. The system according to claim 6, characterized in that The light source device comprises: A light source, used for emitting predetermined light; The modulation unit is located at one side of the light source, and is used for modulating the predetermined light to obtain a plurality of modulated lights.
8. The system according to claim 7, characterized in that The light source device further comprises: A timer is electrically connected to the modulation unit, and the timer is used to control the operation of the modulation unit.
9. The system according to claim 7, characterized in that The light source is an infrared VCSEL laser.
Citation Information
Patent Citations
Optical source driver circuit for depth imager
CN104024789A
Depth measurement method, depth measurement device and shooting equipment
CN109059795A
Unmanned aerial vehicle (UAV), and range finding method and device thereof
CN109425865A
Phase unwrapping method for TOF ranging and TOF ranging system
CN109597091A
Depth detection system and electronic equipment
CN210051300U
