WO2020248896A1 - Adjustment method, terminal, and computer-readable storage medium - Google Patents

Adjustment method, terminal, and computer-readable storage medium Download PDF

Info

Publication number
WO2020248896A1
WO2020248896A1 PCT/CN2020/094445 CN2020094445W WO2020248896A1 WO 2020248896 A1 WO2020248896 A1 WO 2020248896A1 CN 2020094445 W CN2020094445 W CN 2020094445W WO 2020248896 A1 WO2020248896 A1 WO 2020248896A1
Authority
WO
WIPO (PCT)
Prior art keywords
infrared
optical power
light
interference energy
predetermined value
Prior art date
Application number
PCT/CN2020/094445
Other languages
French (fr)
Chinese (zh)
Inventor
吕向楠
Original Assignee
Oppo广东移动通信有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Oppo广东移动通信有限公司 filed Critical Oppo广东移动通信有限公司
Publication of WO2020248896A1 publication Critical patent/WO2020248896A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04BTRANSMISSION
    • H04B10/00Transmission systems employing electromagnetic waves other than radio-waves, e.g. infrared, visible or ultraviolet light, or employing corpuscular radiation, e.g. quantum communication
    • H04B10/50Transmitters
    • H04B10/564Power control
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N13/00Stereoscopic video systems; Multi-view video systems; Details thereof
    • H04N13/20Image signal generators
    • H04N13/204Image signal generators using stereoscopic image cameras
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N13/00Stereoscopic video systems; Multi-view video systems; Details thereof
    • H04N13/20Image signal generators
    • H04N13/271Image signal generators wherein the generated image signals comprise depth maps or disparity maps

Definitions

  • This application relates to the field of three-dimensional imaging technology, and more specifically, to an adjustment method, a terminal, and a computer-readable storage medium.
  • a depth camera can be set on electronic devices such as mobile phones to obtain the depth of the target object.
  • the specific method is to control the depth camera to emit laser light to the target object, and then the depth camera receives the laser light reflected by the target object, and compares the received laser pattern with reference The difference of the pattern is used to obtain the depth image of the target object.
  • the embodiments of the present application provide an adjustment method, a terminal, and a computer-readable storage medium.
  • the adjustment method of the embodiment of the present application includes: obtaining the infrared interference energy of the current scene; when the infrared interference energy is less than a first predetermined value, emitting laser light at a first optical power; and when the infrared interference energy is greater than a second predetermined value When the laser is emitted at a second optical power, the first predetermined value is smaller than the second predetermined value, and the second optical power is greater than the first optical power.
  • the terminal packet processor and optical transmitter of the embodiment of the present application is used to obtain the infrared interference energy of the current scene.
  • the optical transmitter is used to emit laser light at a first optical power when the infrared interference energy is less than a first predetermined value, and emit laser light at a second optical power when the infrared interference energy is greater than a second predetermined value, so The first predetermined value is less than or equal to the second predetermined value, and the second optical power is greater than the first optical power.
  • a non-volatile computer-readable storage medium containing computer-readable instructions when the computer-readable instructions are executed by a processor, cause the processor to perform the following adjustment steps: Obtain the infrared of the current scene Interference energy; when the infrared interference energy is less than a first predetermined value, the laser is emitted with a first optical power; and when the infrared interference energy is greater than a second predetermined value, the laser is emitted with a second optical power, the first The predetermined value is less than the second predetermined value, and the second optical power is greater than the first optical power.
  • the adjustment method, terminal, and computer-readable storage medium of the embodiments of the present application obtain the infrared interference energy of the current scene, and use the first optical power less than the second optical power when the infrared interference capability is less (less than the first predetermined value).
  • Laser emission can reduce power consumption while ensuring the accuracy of depth image acquisition; when infrared interference energy is large (greater than the second predetermined value), laser emission is emitted at a second optical power greater than the first optical power to increase the emission
  • the ratio of laser and infrared interference energy increases the signal-to-noise ratio, thereby improving the accuracy of depth image acquisition.
  • FIG. 1 is a schematic structural diagram of a terminal according to an embodiment of the present application.
  • FIG. 2 is a schematic diagram of a system architecture of a terminal according to an embodiment of the present application.
  • FIG. 3 is a schematic flowchart of an adjustment method according to an embodiment of the present application.
  • 5a and 5b are schematic diagrams of scenes of the adjustment method of the embodiment of the present application.
  • 6A and 6B are schematic flowcharts of the adjustment method of the embodiment of the present application.
  • FIG. 7 is a schematic flowchart of an adjustment method according to an embodiment of the present application.
  • FIG. 8 is a timing diagram of laser projection and image acquisition by the depth camera of the embodiment of the present application.
  • FIG. 12 is a schematic diagram of interaction between a non-volatile computer-readable storage medium and a processor in an embodiment of the present application.
  • the “on” or “under” of the first feature on the second feature may be in direct contact with the first and second features, or indirectly through an intermediary. contact.
  • the "above”, “above” and “above” of the first feature on the second feature may mean that the first feature is directly above or obliquely above the second feature, or simply means that the level of the first feature is higher than the second feature.
  • the “below”, “below” and “below” of the second feature of the first feature may mean that the first feature is directly below or obliquely below the second feature, or it simply means that the level of the first feature is smaller than the second feature.
  • the adjustment method of the embodiment of the present application includes: 301: Obtain the infrared interference energy of the current scene; 302: When the infrared interference energy is less than a first predetermined value, emit laser light at the first optical power; and 303: In the infrared When the interference energy is greater than the second predetermined value, the laser is emitted with the second optical power, the first predetermined value is less than the second predetermined value, and the second optical power is greater than the first optical power.
  • the adjustment method includes: 601: obtaining an infrared image of the current scene when the laser is not emitted; 602: calculating infrared interference energy according to the infrared image; 603: when the infrared interference energy is less than the first When the predetermined value, the laser is emitted with the first optical power; and 604: when the infrared interference energy is greater than the second predetermined value, the laser is emitted with the second optical power, the first predetermined value is less than the second predetermined value, and the second optical power is greater than the first One optical power.
  • step 602 calculating infrared interference energy according to the infrared image, specifically includes the following sub-steps: 6021: obtaining the pixel value of the pixel in the infrared image; and 6022: according to the pixel value Determine the infrared interference energy.
  • the adjustment method further includes: 701: emitting laser at a first operating frequency; 702: receiving laser at a second operating frequency and generating an infrared image, the second frequency is greater than the first frequency; 703 : Obtain an infrared interference image that does not include the laser at the first operating frequency in the infrared image; 704: Calculate the infrared interference energy according to the infrared interference image; 705: When the infrared interference energy is less than the first predetermined value, emit the laser at the first optical power; And 706: when the infrared interference energy is greater than the second predetermined value, emit the laser with the second optical power, and the first predetermined value is less than the second predetermined value.
  • the adjustment method includes: 901: obtaining the infrared interference energy of the current scene; 902: when the infrared interference energy is less than a first predetermined value, using the first frequency, the first pulse width and the first A laser is emitted at an optical power; 903: when the infrared interference energy is greater than a second predetermined value, the laser is emitted with the second frequency, the second pulse width and the second optical power, the second frequency, the second pulse width and the second optical power are The product is less than or equal to the product of the first frequency, the first pulse width, and the first optical power.
  • the adjustment method includes: 1001: obtain the infrared interference energy of the current scene; 1002: when the infrared interference energy is less than the first predetermined value, The first optical power emits the laser; 1003: when the infrared interference energy is greater than the second predetermined value, the second optical power emits the laser; and 1004: when the infrared interference energy is greater than the first predetermined value and less than the second predetermined value, keep the current The optical power is used to continuously emit laser light.
  • the second optical power includes one or more sub-optical powers
  • the adjustment method includes: 1101: obtain the infrared interference energy of the current scene; 1102: when the infrared interference energy is less than the first predetermined value , The laser is emitted at the first optical power; 1103: when the infrared interference energy is greater than the second predetermined value, the corresponding sub-optical power is determined according to the infrared interference energy; and 1104: the laser is emitted with the sub-optical power.
  • obtaining the infrared interference energy of the current scene includes: integrating the voltage value generated by receiving infrared light within a predetermined time to obtain the total voltage value corresponding to the infrared interference energy; and according to the total The voltage value determines the infrared interference energy.
  • the predetermined time is equal to the frame exposure time
  • the frame exposure time is the time required to receive infrared light when generating a frame of speckle image.
  • the terminal 10 in the embodiment of the present application includes a processor 12 and an optical transmitter 111.
  • the processor 12 is used to obtain the infrared interference energy of the current scene.
  • the optical transmitter 111 is used to emit laser light at a first optical power when the infrared interference energy is less than a first predetermined value, and to emit laser light at a second optical power when the infrared interference energy is greater than a second predetermined value, and the first predetermined value is less than Or equal to the second predetermined value, the second optical power is greater than the first optical power.
  • the terminal 10 further includes an optical receiver 112, and the processor 12 is also used to obtain an infrared image of the current scene when the laser is not emitted; and according to the infrared image Calculate infrared interference energy.
  • the processor 12 is used to obtain the pixel value of the pixel in the infrared image; and determine the infrared interference energy according to the pixel value.
  • the optical transmitter 111 is also used to emit laser light at a first operating frequency; the optical receiver 112 is used to receive laser light at a second operating frequency and generate infrared images , The second frequency is greater than the first frequency; the processor 12 is used to obtain infrared interference images of lasers with the first operating frequency in the infrared image, and calculate infrared interference energy according to the infrared interference images; the light transmitter 111 is also used to When the interference energy is less than the first predetermined value, the laser is emitted with the first optical power, and when the infrared interference energy is greater than the second predetermined value, the laser is emitted with the second optical power, the first predetermined value is less than the second predetermined value.
  • the optical transmitter 111 is also used to set the first frequency, the first pulse width and the first optical power when the infrared interference energy is less than a first predetermined value.
  • the laser is emitted at the second frequency, the second pulse width and the second optical power; the product of the second frequency, the second pulse width and the second optical power is less than or equal to The product of the first frequency, the first pulse width and the first optical power.
  • the optical transmitter 111 is also used to maintain the current optical power to continuously emit laser light when the infrared interference energy is greater than a first predetermined value and less than a second predetermined value. .
  • the processor 12 is further configured to determine the corresponding sub-light power according to the infrared interference energy.
  • the optical transmitter 111 is also used to emit laser light with sub-optical power.
  • the terminal 10 further includes a distance sensor 18, the distance sensor 18 includes an infrared receiver 182, the infrared receiver 182 is used to receive infrared light to generate a corresponding voltage value, the processor 12 is also used to integrate the voltage value generated by the infrared receiver 182 receiving infrared light within a predetermined time to obtain the total voltage value corresponding to the infrared interference energy; and to determine the infrared interference energy according to the total voltage value.
  • the distance sensor 18 includes an infrared receiver 182
  • the infrared receiver 182 is used to receive infrared light to generate a corresponding voltage value
  • the processor 12 is also used to integrate the voltage value generated by the infrared receiver 182 receiving infrared light within a predetermined time to obtain the total voltage value corresponding to the infrared interference energy; and to determine the infrared interference energy according to the total voltage value.
  • the terminal 10 further includes a light receiver 112, the predetermined time is equal to the frame exposure time of the light receiver 112, the frame exposure time is when one frame of speckle image is generated, the light receiving The time required for the receiver 112 to receive infrared light.
  • the terminal 10 includes a visible light camera 13, and the visible light camera 13 is located between the light transmitter 111 and the light receiver 112.
  • a non-volatile computer-readable storage medium 200 containing computer-readable instructions 202 of the present application.
  • the processor 12 executes the following steps: 301: Obtain the infrared interference energy of the current scene; 302: When the infrared interference energy is less than the first predetermined value, emit the laser at the first optical power ; And 303: when the infrared interference energy is greater than the second predetermined value, the laser is emitted with the second optical power, the first predetermined value is less than the second predetermined value, and the second optical power is greater than the first optical power.
  • a non-volatile computer-readable storage medium 200 containing computer-readable instructions 202 of the present application.
  • the processor 12 executes the following steps: 601: Obtain an infrared image of the current scene when the laser is not emitted; 602: Calculate infrared interference energy according to the infrared image; 603: In the infrared interference When the energy is less than the first predetermined value, the laser is emitted with the first optical power; and 604: when the infrared interference energy is greater than the second predetermined value, the laser is emitted with the second optical power, the first predetermined value is less than the second predetermined value, and the second The optical power is greater than the first optical power.
  • the non-volatile computer-readable storage medium 200 containing computer-readable instructions 202 of the present application.
  • the processor 12 executes the following steps: 6021: Obtain the pixel value of the pixel in the infrared image; and 6022: Determine the infrared interference energy according to the pixel value.
  • a non-volatile computer-readable storage medium 200 containing computer-readable instructions 202 of the present application.
  • the processor 12 executes the following steps: 701: emit laser at a first operating frequency; 702: receive laser at a second operating frequency and generate infrared images, the second frequency is greater than the first Frequency; 703: Acquire infrared interference images that do not include the laser at the first working frequency in the infrared image; 704: Calculate infrared interference energy according to the infrared interference image; 705: Use the first optical power when the infrared interference energy is less than the first predetermined value Emit laser; and 706: When the infrared interference energy is greater than the second predetermined value, emit the laser with the second optical power, and the first predetermined value is less than the second predetermined value.
  • a non-volatile computer-readable storage medium 200 containing computer-readable instructions 202 of the present application When the computer-readable instruction 202 is executed by the processor 12, the processor 12 executes the following steps: 901: Obtain the infrared interference energy of the current scene; 902: When the infrared interference energy is less than the first predetermined value, use the first frequency and the first The pulse width and the first optical power emit laser; 903: when the infrared interference energy is greater than the second predetermined value, the laser is emitted with the second frequency, the second pulse width and the second optical power, the second frequency, the second pulse width and the first The product of the two optical powers is less than or equal to the product of the first frequency, the first pulse width and the first optical power.
  • a non-volatile computer-readable storage medium 200 containing computer-readable instructions 202 of the present application.
  • the processor 12 executes the following steps: 1001: obtain the infrared interference energy of the current scene; 1002: when the infrared interference energy is less than the first predetermined value, emit the laser at the first optical power 1003: When the infrared interference energy is greater than the second predetermined value, the laser is emitted at the second optical power; and 1004: when the infrared interference energy is greater than the first predetermined value and less than the second predetermined value, the current optical power is maintained to continuously emit the laser .
  • a non-volatile computer-readable storage medium 200 containing computer-readable instructions 202 of the present application When the computer readable instruction 202 is executed by the processor 12, the processor 12 executes the following steps: 1101: obtain the infrared interference energy of the current scene; 1102: when the infrared interference energy is less than the first predetermined value, emit the laser at the first optical power 1103: When the infrared interference energy is greater than the second predetermined value, determine the corresponding sub-optical power according to the infrared interference energy; and 1104: emit the laser with the sub-optical power.
  • a non-volatile computer-readable storage medium 200 containing computer-readable instructions 202 of the present application.
  • the processor 12 executes the following steps: integrate the voltage value generated by receiving infrared light within a predetermined time to obtain the total voltage value corresponding to the infrared interference energy; and according to the total voltage value Determine the infrared interference energy.
  • the predetermined time is equal to the frame exposure time, which is the time required to receive infrared light when generating a frame of speckle image.
  • the terminal 10 of the embodiment of the present application includes a housing 15, a depth camera 11 and a processor 12.
  • the terminal 10 may be a mobile phone, a tablet computer, a notebook computer, a smart watch, etc.
  • the description of this application takes the terminal 10 as a mobile phone as an example for description. It is understood that the specific form of the terminal 10 is not limited to a mobile phone.
  • Both the depth camera 11 and the processor 12 can be installed on the housing 15.
  • the housing 15 includes a front 151 and a back 152, and the front 151 and the back 152 are opposite to each other.
  • the front 151 can also be used to install a display screen 14, which can be used to display images, text and other information.
  • the depth camera 11 can be installed on the front 151 to facilitate selfies or video calls, etc.; the depth camera 11 can also be installed on the back 152 to facilitate shooting scenes and others; in addition, it can also be installed on both the front 151 and the back 152. Independent working depth camera 11.
  • the depth camera 11 includes a light transmitter 111 and a light receiver 112.
  • the light transmitter 111 of the depth camera 11 can emit laser light, such as infrared laser, which is reflected after reaching the object in the scene.
  • the reflected laser light can be received by the light receiver 112, and the processor 12 can emit according to the light transmitter 111
  • the laser light and the laser light received by the light receiver 112 calculate the depth information of the object.
  • the depth camera 11 may obtain depth information through a time of flight (TOF) ranging method.
  • the depth camera 11 may obtain depth information through a structured light ranging principle. The description of this application takes the depth camera 11 to obtain depth information through the principle of structured light ranging as an example for description.
  • TOF time of flight
  • Most depth cameras 11 use lasers with a wavelength of 940 nanometers (nm) to emit. In different environments (such as indoors or outdoors), there may also be infrared light with a wavelength of 940 nm.
  • the optical receiver 112 receives the wavelength of the depth camera 11 as The 940nm laser will also receive infrared light with a wavelength of 940nm in the environment, and the infrared light in the environment will affect the acquisition accuracy of the depth image.
  • the depth camera 11 is installed on the back 152 of the housing 15. It can be understood that the depth camera 11 (that is, the rear depth camera 11) installed on the back 152 needs to meet the normal use of photographing distant objects. Therefore, usually the optical power of the laser light emitted by the light emitter 111 needs to be set to be larger. Satisfy the accuracy of obtaining depth information.
  • the terminal 10 may further include a visible light camera 13.
  • the visible light camera 13 may include a telephoto camera and a wide-angle camera, or the visible light camera 13 may include a telephoto camera, a wide-angle camera, and a periscope camera.
  • the visible light camera 13 can be arranged close to the depth camera 11.
  • the visible light camera 13 can be arranged between the light emitter 111 and the light receiver 112, so that the light emitter 111 and the light receiver 112 have a longer distance, which improves The length of the baseline (baseline) of the depth camera 11 improves the accuracy of acquiring depth information.
  • both the optical transmitter 111 and the optical receiver 112 are connected to the processor 12.
  • the processor 12 may provide an enable signal for the optical transmitter 111.
  • the processor 12 may provide an enable signal for the driver 16, wherein the driver 16 is used to drive the optical transmitter 111 to emit laser light.
  • the optical receiver 112 is connected to the processor 12 through an I2C bus.
  • the optical receiver 112 can control the projection timing of the optical transmitter 111 through a strobe signal (Strobe signal), where the Strobe signal is based on the optical receiver 112
  • the strobe signal can be regarded as an electrical signal with alternating high and low levels, and the optical transmitter 111 projects laser light according to the laser projection timing indicated by the strobe signal.
  • the processor 12 may send an image acquisition instruction through the I2C bus to enable the depth camera 11 to work. After the optical receiver 112 receives the image acquisition instruction, it controls the switching device 17 through the Strobe signal.
  • the switch device 17 sends a pulse signal (pwn) to the driver 16, and the driver 16 drives the light emitter 111 to project laser light into the scene according to the pulse signal. If the Strobe signal is low, the switch device 17 stops sending the pulse signal to the driver 16. The light emitter 111 does not project laser light; or, when the Strobe signal is low, the switching device 17 sends a pulse signal to the driver 16, and the driver 16 drives the light emitter 111 to project laser light into the scene according to the pulse signal. When the level is high, the switching device 17 stops sending pulse signals to the driver 16, and the light emitter 111 does not project laser light.
  • the Strobe signal may not be used.
  • the processor 12 sends an image acquisition command to the optical receiver 112 and simultaneously sends a laser projection command to the driver 16.
  • the receiver 112 starts to acquire the acquired image after receiving the image acquisition instruction, and when the driver 16 receives the laser projection instruction, it drives the light transmitter 111 to project laser light.
  • the light emitter 111 projects laser light
  • the laser light forms a laser pattern with spots and is projected on an object in the scene.
  • the light receiver 112 collects the laser pattern reflected by the object to obtain the speckle image, and sends the speckle image to the processor 12 through the Mobile Industry Processor Interface (MIPI).
  • MIPI Mobile Industry Processor Interface
  • the processor 12 may calculate the depth information according to the speckle image and the reference image pre-stored in the processor 12.
  • the adjustment method of the embodiment of the present application can be used to control the aforementioned terminal 10.
  • the adjustment method includes the following steps:
  • the processor 12 in the embodiment of the present application is used to obtain the infrared interference energy of the current scene.
  • the optical transmitter 111 is used to emit laser light at a first optical power when the infrared interference energy is less than a first predetermined value, and to emit laser light at a second optical power when the infrared interference energy is greater than a second predetermined value, and the first predetermined value is less than Or equal to the second predetermined value, the second optical power is greater than the first optical power.
  • step 301 can be implemented by the processor 12, and step 302 and step 303 can be implemented by the optical transmitter 111.
  • the light receiver 112 can be used to receive the infrared interference energy of the current scene; in one example, the terminal 10 further includes a distance sensor 18, and the distance sensor 18 includes an infrared transmitter 181 and an infrared receiver 182.
  • the infrared transmitter 181 cooperates with infrared
  • the receiver 182 realizes the ranging function based on the TOF ranging principle.
  • the infrared transmitter 181 emits infrared light to the target object
  • the infrared receiver 182 receives the infrared light reflected by the target object
  • the processor 12 emits infrared light and light according to the infrared transmitter 181.
  • the time difference of the infrared receiver 182 receiving infrared light is calculated to obtain the distance of the target object.
  • the infrared receiver 182 of the distance sensor 18 can be used to collect the infrared interference energy of the current scene.
  • the processor 12 may be used to obtain the infrared interference energy collected by the infrared receiver 182.
  • the infrared receiver 182 is used to receive infrared light of a specific wavelength (such as a wavelength of 940 nm) in the current scene to generate a corresponding voltage value.
  • the amount of infrared light received by the infrared receiver 182 within a predetermined time is the infrared interference energy, and the corresponding
  • the processor 12 integrates the voltage value within a predetermined time to obtain the total voltage value corresponding to the infrared interference energy, so as to determine the magnitude of the infrared interference energy according to the total voltage value.
  • the power consumption of the distance sensor 18 is lower, and the power required to measure the infrared interference energy of the current scene is less.
  • the predetermined time may be the same as the frame exposure time of the depth camera 11, and the frame exposure time is the time required for the light receiver 112 to receive infrared light when the depth camera 11 generates a frame of speckle image.
  • the optical transmitter 111 transmits to the current scene in the form of pulses (as shown in FIG. 4, the emission waveform S1 and the emission waveform S2, the emission waveform S1 corresponds to the first optical power, and the emission waveform S2 corresponds to the second optical power).
  • the infrared laser is emitted, and the optical receiver 112 receives the infrared light reflected by the current scene according to the strobe waveform C1.
  • the optical receiver 112 continues to receive the infrared light for the duration of the high level. Stop receiving infrared light within the low level duration. If a frame includes one or more high levels and one or more low levels, the frame exposure time is the sum of the duration of the high level and the low level in one frame.
  • the greater the infrared interference energy the more infrared light with a wavelength of 940 nm (hereinafter referred to as background infrared light) in the environment.
  • background infrared light the infrared light with a wavelength of 940nm
  • the depth camera 11 receives infrared light to generate a speckle image, it not only receives the infrared light with a wavelength of 940nm from the light emitter 111, but also receives the background infrared light.
  • the background infrared light is noise, which will affect the generated speckle image.
  • the accuracy of which in turn affects the accuracy of the final depth image.
  • the infrared light with a wavelength of 940nm in the environment generally comes from sunlight, there is basically no background infrared light indoors (as shown in Figure 5a), and the light received by the light receiver 112 is basically a light emitter
  • the laser L1 emitted by 111 has less background infrared light L2. Outdoors are directly irradiated by sunlight, so there is more background infrared light L2 (as shown in Figure 5b).
  • the light received by the light receiver 112 also includes more background infrared light L2. The brighter the sunlight, the more background infrared light L2.
  • the processor 12 may determine whether the infrared interference energy is less than the first predetermined value.
  • the first predetermined value can be determined by detecting indoor infrared interference energy of a large number of houses (such as buildings, bungalows, etc.). For example, the average value of infrared interference energy in all the detected houses is taken as the first predetermined value. Thereby ensuring the accuracy of the first predetermined value.
  • the optical power is generally only related to the amplitude of the light.
  • the processor 12 can determine that the depth camera 11 is currently in an indoor environment, and the background infrared There is less light, so the light transmitter 111 is controlled to emit laser light at the first light power.
  • the amplitude H1 of the background infrared light and the amplitude H2 corresponding to the first light power can be larger. Achieve a higher signal-to-noise ratio (such as ensuring that the signal-to-noise ratio is greater than 80%).
  • the first optical power is measured indoors containing the infrared interference energy corresponding to the first predetermined value before leaving the factory.
  • the determined optical power has a small value and a high signal-to-noise ratio, which can not only ensure that the depth camera 11 is When the laser is emitted at one optical power, the accuracy of the generated depth image is not affected, and the power consumption of the terminal 10 can also be reduced.
  • the processor 12 determines whether the infrared interference energy is greater than or a second predetermined value, and the second predetermined value is greater than the first predetermined value.
  • the second predetermined value is similar to the first predetermined value.
  • the infrared interference energy under different intensities of sunlight such as cloudy and sunny
  • the average infrared interference energy under different intensities of sunlight can be used as the second predetermined value, or
  • the maximum infrared interference energy under different intensities of sunlight (such as infrared interference energy in a strong light environment) is used as the second predetermined value.
  • the processor 12 can determine that the depth camera 11 is currently in an outdoor environment and there is a lot of background ambient light. At this time, if the laser is still emitted at the first light power, the difference between H2 and H1 The small difference will cause the background infrared light to account for a larger proportion of the infrared light received by the light receiver 112 (that is, the signal-to-noise ratio is low). Therefore, the processor 12 can control the optical transmitter 111 to emit laser light at a second optical power greater than the first optical power. As shown in FIG.
  • the amplitude H1 of the background infrared light and the amplitude H3 corresponding to the second optical power are two The difference between them can achieve a higher signal-to-noise ratio (such as ensuring that the signal-to-noise ratio is greater than 80%).
  • the second optical power is measured outdoors containing infrared interference energy corresponding to the second predetermined value before leaving the factory to determine the optical power with a high signal-to-noise ratio.
  • the second optical power can ensure that the signal-to-noise ratio is greater than 80%, thereby ensuring the accuracy of acquiring depth images in an outdoor environment.
  • the terminal 10 when the current time is at night, there is only a small amount of infrared light with a wavelength of 940nm regardless of indoors and outdoors. Therefore, when the current time is at night, the terminal 10 will still be regarded as indoors even if it is in an outdoor environment, so that the depth camera 11 takes the first place.
  • the optical power emits laser light.
  • the adjustment method and terminal 10 of the embodiments of the present application obtain the infrared interference energy of the current scene, and when the infrared interference capability is less (less than the first predetermined value), the laser is emitted at the first optical power less than the second optical power. , Can reduce the power consumption while ensuring the accuracy of the depth image acquisition; and when the infrared interference energy is large (greater than the second predetermined value), the laser is emitted with the second optical power greater than the first optical power to improve the emitted laser and The ratio of infrared interference energy improves the signal-to-noise ratio, thereby improving the acquisition accuracy of depth images.
  • the adjustment method includes:
  • the laser is emitted with the second optical power, the first predetermined value is less than the second predetermined value, and the second optical power is greater than the first optical power.
  • the optical receiver 112 is also used to obtain an infrared image of the current scene when no laser is emitted; the processor 12 calculates infrared interference energy according to the infrared image.
  • step 601 and step 602 may be sub-steps of the aforementioned step 301, and step 601 may be implemented by the optical receiver 112, and step 602 may be implemented by the processor 12.
  • step 603 and step 604 in FIG. 6A For the content and specific implementation details of step 603 and step 604 in FIG. 6A, reference may be made to the description of step 302 and step 303 in the specification of this application, which will not be repeated here.
  • the light receiver 112 may also be the light receiver 112 of the depth camera 11.
  • the light receiver 112 of the depth camera 11 cooperates with the light transmitter 111 to obtain a depth image.
  • the light receiver 112 can acquire the background infrared light in the current scene to form an infrared image when the light transmitter 111 does not emit laser light.
  • the processor 12 can determine the magnitude of the infrared interference energy of the current scene according to the infrared image, and the infrared image can pass through The infrared light acquired within one frame exposure time is generated.
  • the light receiver 112 of the depth camera 11 can obtain the infrared interference energy of the current scene when the light transmitter 111 does not emit laser light, and the depth camera 11 can obtain the depth image, thereby obtaining the depth of the target object, without the need for a separate distance sensor 18 , In order to obtain the infrared interference energy and the depth of the target object, reducing the size and manufacturing cost of the terminal 10.
  • step 602: calculating infrared interference energy according to the infrared image specifically includes the following sub-steps:
  • the processor 12 is used to obtain the pixel value of the pixel in the infrared image; and determine the infrared interference energy according to the pixel value.
  • step 6021 and step 6022 may be sub-steps of step 602, and step 6021 and step 6022 may be implemented by processor 12.
  • the processor 12 After the processor 12 obtains the infrared image collected by the depth camera 11, it first obtains the pixel values of all pixels of the infrared image. It can be understood that the more infrared light received by each pixel, the larger the corresponding pixel value.
  • the processor 12 may use the average value of the pixel values of all pixels as the pixel value corresponding to the infrared interference energy of the current scene, thereby determining the infrared interference energy of the current scene according to the pixel value. For example, there is a one-to-one correspondence between pixel values and infrared interference energy, that is, each pixel value corresponds to one infrared interference energy, and this correspondence forms a mapping table.
  • the mapping table is pre-stored in the memory 19 of the terminal 10, and the processor 12 is After calculating the average value of all pixels of the infrared image, query the mapping table to determine the infrared interference energy corresponding to the average value. In this way, the infrared interference energy of the current scene can be quickly calculated.
  • the adjustment method further includes:
  • the optical transmitter 111 is also used to emit laser light at a first operating frequency; the optical receiver 112 is used to receive laser light at a second operating frequency and generate infrared images, and the second The frequency is greater than the first frequency; the processor 12 is used to obtain the infrared interference image of the laser with the first operating frequency in the infrared image, and calculate the infrared interference energy according to the infrared interference image; the optical transmitter 111 is also used to When the first predetermined value, the laser is emitted at the first optical power, and when the infrared interference energy is greater than the second predetermined value, the laser is emitted with the second optical power, the first predetermined value is less than the second predetermined value.
  • step 701, step 702, step 703, and step 704 can be sub-steps of obtaining infrared interference energy, and step 701, step 705, and step 706 can be implemented by the optical transmitter 111, and step 702 can be implemented by the optical receiver. 112 is implemented, and step 703 and step 704 may be implemented by the processor 12.
  • step 705 and step 706 in FIG. 7 For the content and specific implementation details of step 705 and step 706 in FIG. 7, reference may be made to the description of step 302 and step 303 in the specification of this application, which will not be repeated here.
  • the light transmitter 111 emits infrared laser light to the current scene in the form of pulses (as shown in FIG. 4, the transmission waveform S1 and the transmission waveform S2), and the light receiver 112 receives the current scene with the strobe waveform C1.
  • the infrared light received by the light receiver 112 includes not only the background infrared light, but also the laser light emitted by the light transmitter 111, so the background infrared light cannot be accurately obtained at this time.
  • description is made by taking the current outdoor environment and the laser emission waveform as the emission waveform S2 as an example.
  • the processor 12 can cause the light transmitter 111 to emit infrared laser light at a first operating frequency, and the light receiver 112 receives infrared laser light and background infrared light at a second operating frequency, wherein the second operating frequency is greater than the first operating frequency.
  • the second operating frequency is twice the first operating frequency.
  • the strobe waveform C1 in Fig. 4 becomes the strobe waveform C2 shown in Fig.
  • the light receiver 112 can only receive the background infrared light to generate the corresponding infrared interference image, and the processor 12 can calculate the infrared interference energy according to the infrared interference image.
  • the calculation method is as described above and will not be repeated here. In this way, during the working process of the depth image, the infrared interference energy can also be accurately obtained, ensuring that the terminal 10 can monitor the infrared interference energy of the current environment at any time.
  • the waveform I1 represents the time sequence of the infrared image acquired by the optical receiver 112 and the frame number of the infrared image
  • the waveform I2 represents the infrared laser only emitted by the optical transmitter 111 obtained from the interference speckle image and the infrared interference image.
  • the processor 12 controls the optical receiver 112 to first receive the background infrared light and the infrared laser emitted by the optical transmitter 111 when the optical transmitter 111 projects laser light to obtain the Nth frame image (hereinafter referred to as the interference speckle image).
  • the light transmitter 111 When the light transmitter 111 does not project laser light, it receives infrared light in the environment (ie, background infrared light) to obtain the N+1th frame image (ie, infrared interference image); then, the processor 12 controls the light receiver 112 again When the light transmitter 111 is projecting laser light, it receives the background infrared light and the infrared laser light emitted by the light transmitter 111 to obtain the N+2th frame acquisition image (in this case, the interference speckle image), and so on, the light receiver 112 alternates Obtain the interference speckle image and infrared interference image.
  • the N+1th frame image ie, infrared interference image
  • the processor 12 may control the light receiver 112 to first obtain the infrared interference image, and then obtain the interference speckle image, and alternately execute the acquisition of the collected images according to this sequence.
  • the above-mentioned multiple relationship between the second operating frequency and the first operating frequency is only an example. In other embodiments, the multiple relationship between the second operating frequency and the first operating frequency may also be three times or four times. , Five times, six times and so on.
  • the processor 12 distinguishes each captured image, and first determines whether the captured image is an interference speckle image or an infrared interference image. Specifically, it can determine whether the captured image is an interference speckle image or an infrared interference image by determining whether the light emitter 111 is turned on when the captured image is acquired. Infrared interference image; if it is turned on, it means that the currently acquired image is acquisition of interference speckle images; if it is not turned on, it means that the currently acquired image is an infrared interference image. After the processor 12 obtains at least one frame of interference speckle image and at least one frame of infrared interference image, it can calculate depth information based on the interference speckle image, infrared interference image, and reference image.
  • the infrared interference image is collected when the light transmitter 111 is not projecting infrared laser, forming an infrared interference image
  • the light only includes the background infrared light (that is, the captured image of frame N+1 does not include infrared laser), and the interference speckle image is collected when the light emitter 111 projects the laser.
  • the light that forms the interference speckle image also includes the background Infrared light and the infrared laser emitted by the light transmitter 111 (that is, the Nth frame of captured image contains infrared laser and background infrared light), therefore, the processor 12 can remove the interference speckle image formed by the background infrared light according to the infrared interference image
  • the processor 12 can remove the interference speckle image formed by the background infrared light according to the infrared interference image
  • the processor 12 can remove the interference speckle image formed by the background infrared light according to the infrared interference image
  • the processor 12 can remove the interference speckle image formed by the background infrared light according to the infrared interference image
  • the processor 12 can remove the interference speckle image formed by the background infrared light according to the infrared interference image
  • the N+3th frame acquisition image is removed from the N+2th frame acquisition image to obtain the speckle image of the second frame I2 in FIG. 8, and so on).
  • the ambient light includes infrared light with the same wavelength as the laser emitted by the light transmitter 111 (for example, includes background infrared light with a wavelength of 940 nm), and when the light receiver 112 acquires an image, this part of the infrared light will also be received by the light. ⁇ 112 receives.
  • the proportion of the background infrared light in the light received by the light receiver 112 will increase, resulting in inconspicuous laser speckles in the collected image, thereby affecting the calculation of the depth image.
  • the light transmitter 111 and the light receiver 112 work at different operating frequencies, and the light receiver 112 can collect infrared interference images formed by only background infrared light and the background infrared light and the light transmitter 111 at the same time.
  • the interference speckle image formed by infrared laser can not only detect the amount of infrared interference energy in the current scene based on the infrared interference image, but also remove the image part formed by the background infrared light in the interference speckle image based on the infrared interference image.
  • the laser speckles can be distinguished, and the acquired image formed by only the infrared laser emitted by the light emitter 111 can be used to calculate the depth information.
  • the laser speckle matching is not affected, which can avoid partial or complete loss of depth information, thereby increasing the depth The accuracy of the information.
  • the adjustment method includes:
  • the laser When the infrared interference energy is greater than the second predetermined value, the laser is emitted with the second frequency, the second pulse width and the second optical power, and the product of the second frequency, the second pulse width and the second optical power is less than or equal to the first The product of frequency, first pulse width and first optical power.
  • the optical transmitter 111 is also used to emit laser light at a first frequency, a first pulse width, and a first optical power when the infrared interference energy is less than a first predetermined value. And when the infrared interference energy is greater than the second predetermined value, the laser is emitted with the second frequency, the second pulse width and the second optical power; the product of the second frequency, the second pulse width and the second optical power is less than or equal to the first frequency , The product of the first pulse width and the first optical power.
  • step 902 may be a sub-step of emitting laser light at the first optical power
  • step 903 may be a sub-step of emitting laser light at the second optical power
  • step 902 and step 903 may be implemented by the light transmitter 111.
  • step 901 in FIG. 9 For the content and specific implementation details of step 901 in FIG. 9, reference may be made to the description of step 301 in the specification of this application, which will not be repeated here.
  • the processor 12 can adjust the total amount of laser light entering the human eye per unit time by controlling the frequency, pulse width, and optical power of the laser light, thereby preventing the laser light from threatening human eye safety.
  • the second frequency and/or the second pulse width can be appropriately reduced, so that The product of the second frequency, the second pulse width and the second optical power is less than or equal to the product of the first frequency, the first pulse width and the first optical power, so as to ensure that even if the optical power is increased in an outdoor environment, it will not be harmful to people. Eye safety poses a threat.
  • the signal-to-noise ratio has little to do with the pulse width and frequency of the laser but only related to the optical power, after the optical power is increased to the second optical power, the signal-to-noise ratio can be improved, thus ensuring the depth when the outdoor background infrared light is large. The accuracy of image acquisition.
  • the first predetermined value is less than the second predetermined value
  • the adjustment method includes:
  • the optical transmitter 111 is also used to maintain the current optical power to continuously emit laser light when the infrared interference energy is greater than a first predetermined value and less than a second predetermined value.
  • step 1004 can be implemented by the light transmitter 111.
  • step 1001, step 1002, and step 1003 in FIG. 10 please refer to the description of step 301, step 302, and step 303 in the specification of this application, which will not be repeated here.
  • the current processor 12 may first obtain the current optical power of the optical transmitter 111, thereby Keep the current optical power and continue to emit laser light. For example, the current scene is indoors and the light transmitter 111 emits laser light at the first light power. If the user holds the terminal 10 and walks to the window to take a picture at this time, the background infrared light increases correspondingly because it is close to the outdoors.
  • the processor 12 controls the optical transmitter 111 to continue to emit laser light at the first optical power.
  • the current scene is outdoor, and the light transmitter 111 emits laser light at the second light power.
  • the processor 12 may control the optical transmitter 111 to continue to emit laser light at the second optical power.
  • the second optical power includes one or more sub-optical powers
  • the adjustment method includes:
  • 1104 Launch laser with sub-optical power.
  • the processor 12 is further configured to determine the corresponding sub-light power according to the infrared interference energy.
  • the optical transmitter 111 is also used to emit laser light with sub-optical power.
  • step 1103 and step 1104 may be sub-steps of emitting laser light at the second optical power, and step 1103 may be implemented by the processor 12, and step 1104 may be implemented by the light transmitter 111.
  • step 1101 and step 1102 in FIG. 11 For the content and specific implementation details of step 1101 and step 1102 in FIG. 11, reference may be made to the description of step 301 and step 302 in the specification of this application, which will not be repeated here.
  • the second optical power includes one or more sub-optical powers.
  • the second optical power includes only one sub-optical power, as long as the processor 12 determines that the infrared interference energy of the current scene is greater than the second predetermined value, regardless of whether the infrared interference energy is How much, use this sub-optical power to emit laser light.
  • the sub-light power is the light power required by the depth camera 11 to obtain an accurate depth image even in an outdoor strong light environment. When the outdoor ambient light is weak (such as cloudy, dusk, etc.), if the sub-light power is still used to emit the laser, although an accurate depth image can be obtained, most of the power is wasted and the power consumption is high.
  • the processor 12 may determine the corresponding sub-optical power according to the magnitude of the infrared interference energy, for example, different infrared interference energies correspond to different Therefore, the processor 12 can control the light emitter 111 to emit laser light at the corresponding sub-light power according to the magnitude of the infrared interference energy.
  • the second optical power includes a first sub-optical power, a second sub-optical power, a third sub-optical power, and a fourth sub-optical power, where the range of the infrared interference energy corresponding to the first sub-optical power is The second predetermined value a to the third predetermined value b, the range of the infrared interference energy corresponding to the second sub-light power is the third predetermined value b to the fourth predetermined value c, and the range of the infrared interference energy corresponding to the third sub-light power is From the fourth predetermined value c to the fifth predetermined value d, the range of the infrared interference energy corresponding to the fourth sub-light power is greater than the fifth predetermined value d.
  • the second predetermined value a to the fifth predetermined value d increase sequentially.
  • Table 1 The corresponding relationship between sub-optical power and infrared interference energy is shown in Table 1 below:
  • Sub-optical power Infrared interference energy range First sub optical power [a,b] Second sub optical power (b,c) Third sub optical power (c,d) Fourth sub optical power (d, ⁇ )
  • the second predetermined value and the sixth predetermined value may be the average infrared interference energy detected in an outdoor strong light environment and a weak light environment, respectively, and the third predetermined value to the fifth predetermined value are based on the second predetermined value and the sixth predetermined value. For example, if the second predetermined value a is 200 and the fifth predetermined value d is 800, the second predetermined value a to the fifth predetermined value d are respectively 200, 400, 600, and 800, and the value of 200 to 800 The infrared interference energy is divided into 4 gears.
  • the light transmitter 111 When the infrared interference energy is at [a,b] (ie, [200,400]), the light transmitter 111 emits laser light at the first sub-optical power; when the infrared interference energy is at (b,c] (ie, (400,600)) , The optical transmitter 111 emits laser light at the second sub-optical power; when the infrared interference energy is at (c, d) (ie, (600,800)), the optical transmitter 111 emits laser light at the third sub-optical power; when the infrared interference energy At (d, ⁇ ) (ie, (800, ⁇ )), the optical transmitter 111 emits laser light at the fourth sub-optical power.
  • the present application also provides a non-volatile computer-readable storage medium 200 containing computer-readable instructions 202.
  • the processor 12 executes the adjustment method of any one of the foregoing embodiments.
  • the processor 12 may be the processor 12 in FIGS. 1 and 2.
  • the processor 12 when the computer-readable instruction 202 is executed by the processor 12, the processor 12 is caused to perform the following steps:
  • the processor 12 when the computer-readable instruction 202 is executed by the processor 12, the processor 12 is caused to perform the following steps:
  • the processor 12 when the computer-readable instruction 202 is executed by the processor 12, the processor 12 is caused to perform the following steps:
  • the processor 12 when the computer-readable instruction 202 is executed by the processor 12, the processor 12 is caused to perform the following steps:
  • the processor 12 when the computer-readable instructions 202 are executed by the processor 12, the processor 12 is caused to perform the following steps:
  • control the optical transmitter 111 to emit laser at the second frequency, the second pulse width and the second optical power, the product of the second frequency, the second pulse width and the second optical power It is less than or equal to the product of the first frequency, the first pulse width and the first optical power.
  • the processor 12 when the computer-readable instructions 202 are executed by the processor 12, the processor 12 is caused to perform the following steps:
  • the processor 12 when the computer-readable instruction 202 is executed by the processor 12, the processor 12 is caused to perform the following steps:
  • first and second are only used for descriptive purposes, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of indicated technical features. Therefore, the features defined with “first” and “second” may explicitly or implicitly include at least one of the features. In the description of the present application, “plurality” means at least two, such as two or three, unless otherwise specifically defined.

Abstract

An adjustment method, a terminal (10), and a non-volatile computer-readable storage medium (200). The method comprises: obtaining infrared interference energy of a current scene; if the infrared interference energy is less than a first predetermined value, emitting a laser light at a first optical power; and if the infrared interference energy is greater than a second predetermined value, emitting a laser light at a second optical power, wherein the first predetermined value is less than the second predetermined value, and the second optical power is greater than the first optical power.

Description

调节方法、终端及计算机可读存储介质Adjustment method, terminal and computer readable storage medium
优先权信息Priority information
本申请请求2019年6月10日向中国国家知识产权局提交的、专利申请号为201910496583.4的专利申请的优先权和权益,并且通过参照将其全文并入此处。This application requests the priority and rights of the patent application with the patent application number 201910496583.4 filed with the State Intellectual Property Office of China on June 10, 2019, and the full text is incorporated herein by reference.
技术领域Technical field
本申请涉及三维成像技术领域,更具体而言,涉及一种调节方法、终端及计算机可读存储介质。This application relates to the field of three-dimensional imaging technology, and more specifically, to an adjustment method, a terminal, and a computer-readable storage medium.
背景技术Background technique
手机等电子装置上可以设置深度相机来获取目标物体的深度,具体方式为控制深度相机向目标物体发射激光,再由深度相机接收经目标物体反射的激光,通过比对接收到的激光图案和参考图案的区别来获取目标物体的深度图像。A depth camera can be set on electronic devices such as mobile phones to obtain the depth of the target object. The specific method is to control the depth camera to emit laser light to the target object, and then the depth camera receives the laser light reflected by the target object, and compares the received laser pattern with reference The difference of the pattern is used to obtain the depth image of the target object.
发明内容Summary of the invention
本申请实施方式提供一种调节方法、终端及计算机可读存储介质。The embodiments of the present application provide an adjustment method, a terminal, and a computer-readable storage medium.
本申请实施方式的调节方法包括:获取当前场景的红外干扰能量;在所述红外干扰能量小于第一预定值时,以第一光功率发射激光;及在所述红外干扰能量大于第二预定值时,以第二光功率发射激光,所述第一预定值小于所述第二预定值,所述第二光功率大于所述第一光功率。The adjustment method of the embodiment of the present application includes: obtaining the infrared interference energy of the current scene; when the infrared interference energy is less than a first predetermined value, emitting laser light at a first optical power; and when the infrared interference energy is greater than a second predetermined value When the laser is emitted at a second optical power, the first predetermined value is smaller than the second predetermined value, and the second optical power is greater than the first optical power.
本申请实施方式的终端包处理器和光发射器。所述处理器用于获取当前场景的红外干扰能量。所述光发射器用于在所述红外干扰能量小于第一预定值时,以第一光功率发射激光、及在所述红外干扰能量大于第二预定值时,以第二光功率发射激光,所述第一预定值小于或等于所述第二预定值,所述第二光功率大于所述第一光功率。The terminal packet processor and optical transmitter of the embodiment of the present application. The processor is used to obtain the infrared interference energy of the current scene. The optical transmitter is used to emit laser light at a first optical power when the infrared interference energy is less than a first predetermined value, and emit laser light at a second optical power when the infrared interference energy is greater than a second predetermined value, so The first predetermined value is less than or equal to the second predetermined value, and the second optical power is greater than the first optical power.
本申请实施方式的一种包含计算机可读指令的非易失性计算机可读存储介质,所述计算机可读指令被处理器执行时,使得所述处理器执行以下调节步骤:获取当前场景的红外干扰能量;在所述红外干扰能量小于第一预定值时,以第一光功率发射激光;及在所述红外干扰能量大于第二预定值时,以第二光功率发射激光,所述第一预定值小于所述第二预定值,所述第二光功率大于所述第一光功率。A non-volatile computer-readable storage medium containing computer-readable instructions according to an embodiment of the present application, when the computer-readable instructions are executed by a processor, cause the processor to perform the following adjustment steps: Obtain the infrared of the current scene Interference energy; when the infrared interference energy is less than a first predetermined value, the laser is emitted with a first optical power; and when the infrared interference energy is greater than a second predetermined value, the laser is emitted with a second optical power, the first The predetermined value is less than the second predetermined value, and the second optical power is greater than the first optical power.
本申请实施方式的调节方法、终端及计算机可读存储介质通过获取当前场景的红外干扰能量,在红外干扰能力较少(小于第一预定值)时,以小于第二光功率的第一光功率发射激光,可在保证深度图像的获取精度的同时降低功耗;而在红外干扰能量较多(大于第二预定值)时,以大于第一光功率的第二光功率发射激光,提升发射的激光和红外干扰能量的比值,提升信噪比,从而提高深度图像的获取精度。The adjustment method, terminal, and computer-readable storage medium of the embodiments of the present application obtain the infrared interference energy of the current scene, and use the first optical power less than the second optical power when the infrared interference capability is less (less than the first predetermined value). Laser emission can reduce power consumption while ensuring the accuracy of depth image acquisition; when infrared interference energy is large (greater than the second predetermined value), laser emission is emitted at a second optical power greater than the first optical power to increase the emission The ratio of laser and infrared interference energy increases the signal-to-noise ratio, thereby improving the accuracy of depth image acquisition.
本申请的实施方式的附加方面和优点将在下面的描述中部分给出,部分将从下面的描述中变得明显,或通过本申请的实施方式的实践了解到。The additional aspects and advantages of the embodiments of the present application will be partly given in the following description, and part of them will become obvious from the following description, or be understood through the practice of the embodiments of the present application.
附图说明Description of the drawings
本申请的上述和/或附加的方面和优点从结合下面附图对实施方式的描述中将变得明显和容易理解,其中:The above and/or additional aspects and advantages of the present application will become obvious and easy to understand from the description of the embodiments in conjunction with the following drawings, in which:
图1是本申请实施方式的终端的结构示意图;FIG. 1 is a schematic structural diagram of a terminal according to an embodiment of the present application;
图2是本申请实施方式的终端的系统架构示意图;FIG. 2 is a schematic diagram of a system architecture of a terminal according to an embodiment of the present application;
图3是本申请实施方式的调节方法的流程示意图;FIG. 3 is a schematic flowchart of an adjustment method according to an embodiment of the present application;
图4是本申请实施方式的深度相机投射激光及采集图像的时序图;4 is a timing diagram of laser projection and image acquisition by the depth camera of the embodiment of the present application;
图5a和图5b是本申请实施方式的调节方法的场景示意图;5a and 5b are schematic diagrams of scenes of the adjustment method of the embodiment of the present application;
图6A和图6B是本申请实施方式的调节方法的流程示意图;6A and 6B are schematic flowcharts of the adjustment method of the embodiment of the present application;
图7是本申请实施方式的调节方法的流程示意图;FIG. 7 is a schematic flowchart of an adjustment method according to an embodiment of the present application;
图8是本申请实施方式的深度相机投射激光及采集图像的时序图;FIG. 8 is a timing diagram of laser projection and image acquisition by the depth camera of the embodiment of the present application;
图9至图11是本申请实施方式的调节方法的流程示意图;和9 to 11 are schematic flowcharts of the adjustment method of the embodiment of the present application; and
图12是本申请实施方式的非易失性计算机可读存储介质与处理器的交互示意图。FIG. 12 is a schematic diagram of interaction between a non-volatile computer-readable storage medium and a processor in an embodiment of the present application.
具体实施方式Detailed ways
以下结合附图对本申请的实施方式作进一步说明。附图中相同或类似的标号自始至终表示相同或类似的元件或具有相同或类似功能的元件。The implementation of the present application will be further described below in conjunction with the drawings. The same or similar reference numerals in the drawings indicate the same or similar elements or elements with the same or similar functions throughout.
另外,下面结合附图描述的本申请的实施方式是示例性的,仅用于解释本申请的实施方式,而不能理解为对本申请的限制。In addition, the implementation manners of the application described below in conjunction with the drawings are exemplary, and are only used to explain the implementation manners of the application, and cannot be understood as a limitation of the application.
在本申请中,除非另有明确的规定和限定,第一特征在第二特征“上”或“下”可以是第一和第二特征直接接触,或第一和第二特征通过中间媒介间接接触。而且,第一特征在第二特征“之上”、“上方”和“上面”可是第一特征在第二特征正上方或斜上方,或仅仅表示第一特征水平高度高于第二特征。第一特征在第二特征“之下”、“下方”和“下面”可以是第一特征在第二特征正下方或斜下方,或仅仅表示第一特征水平高度小于第二特征。In this application, unless expressly stipulated and defined otherwise, the “on” or “under” of the first feature on the second feature may be in direct contact with the first and second features, or indirectly through an intermediary. contact. Moreover, the "above", "above" and "above" of the first feature on the second feature may mean that the first feature is directly above or obliquely above the second feature, or simply means that the level of the first feature is higher than the second feature. The “below”, “below” and “below” of the second feature of the first feature may mean that the first feature is directly below or obliquely below the second feature, or it simply means that the level of the first feature is smaller than the second feature.
请参阅图3,本申请实施方式的调节方法包括:301:获取当前场景的红外干扰能量;302:在红外干扰能量小于第一预定值时,以第一光功率发射激光;及303:在红外干扰能量大于第二预定值时,以第二光功率发射激光,第一预定值小于第二预定值,第二光功率大于第一光功率。3, the adjustment method of the embodiment of the present application includes: 301: Obtain the infrared interference energy of the current scene; 302: When the infrared interference energy is less than a first predetermined value, emit laser light at the first optical power; and 303: In the infrared When the interference energy is greater than the second predetermined value, the laser is emitted with the second optical power, the first predetermined value is less than the second predetermined value, and the second optical power is greater than the first optical power.
请参阅图6A,在某些实施方式中,调节方法包括:601:在未发射激光时,获取当前场景的红外图像;602:根据红外图像计算红外干扰能量;603:在红外干扰能量小于第一预定值时,以第一光功率发射激光;及604:在红外干扰能量大于第二预定值时,以第二光功率发射激光,第一预定值小于第二预定值,第二光功率大于第一光功率。Referring to FIG. 6A, in some embodiments, the adjustment method includes: 601: obtaining an infrared image of the current scene when the laser is not emitted; 602: calculating infrared interference energy according to the infrared image; 603: when the infrared interference energy is less than the first When the predetermined value, the laser is emitted with the first optical power; and 604: when the infrared interference energy is greater than the second predetermined value, the laser is emitted with the second optical power, the first predetermined value is less than the second predetermined value, and the second optical power is greater than the first One optical power.
请参阅图6A和图6B,在某些实施方式中,步骤602:根据红外图像计算红外干扰能量,具体包括以下子步骤:6021:获取红外图像中的像素的像素值;及6022:根据像素值确定红外干扰能量。6A and 6B, in some embodiments, step 602: calculating infrared interference energy according to the infrared image, specifically includes the following sub-steps: 6021: obtaining the pixel value of the pixel in the infrared image; and 6022: according to the pixel value Determine the infrared interference energy.
请参阅图7,在某些实施方式中,调节方法还包括:701:以第一工作频率发射激光;702:以第二工作频率接收激光并生成红外图像,第二频率大于第一频率;703:获取红外图像中不包括第一工作频率的激光的红外干扰图像;704:根据红外干扰图像计算红外干扰能量;705:在红外干扰能量小于第一预定值时,以第一光功率发射激光;及706:在红外干扰能量大于第二预定值时,以第二光功率发射激光,第一预定值小于第二预定值。Referring to FIG. 7, in some embodiments, the adjustment method further includes: 701: emitting laser at a first operating frequency; 702: receiving laser at a second operating frequency and generating an infrared image, the second frequency is greater than the first frequency; 703 : Obtain an infrared interference image that does not include the laser at the first operating frequency in the infrared image; 704: Calculate the infrared interference energy according to the infrared interference image; 705: When the infrared interference energy is less than the first predetermined value, emit the laser at the first optical power; And 706: when the infrared interference energy is greater than the second predetermined value, emit the laser with the second optical power, and the first predetermined value is less than the second predetermined value.
请参阅图9,在某些实施方式中,调节方法包括:901:获取当前场景的红外干扰能量;902:在红外干扰能量小于第一预定值时,以第一频率、第一脉宽和第一光功率发射激光;903:在红外干扰能量大于第二预定值时,以第二频率、第二脉宽和第二光功率发射激光,第二频率、第二脉宽和第二光功率的乘积小于或等于第一频率、第一脉宽和第一光功率的乘积。Referring to FIG. 9, in some embodiments, the adjustment method includes: 901: obtaining the infrared interference energy of the current scene; 902: when the infrared interference energy is less than a first predetermined value, using the first frequency, the first pulse width and the first A laser is emitted at an optical power; 903: when the infrared interference energy is greater than a second predetermined value, the laser is emitted with the second frequency, the second pulse width and the second optical power, the second frequency, the second pulse width and the second optical power are The product is less than or equal to the product of the first frequency, the first pulse width, and the first optical power.
请参阅图10,在某些实施方式中,第一预定值小于第二预定值,调节方法包括:1001:获取当前场景的红外干扰能量;1002:在红外干扰能量小于第一预定值时,以第一光功率发射激光;1003:在红外干扰能量大于第二预定值时,以第二光功率发射激光;及1004:在红外干扰能量大于第一预定值且小于第二预定值时,保持当前光功率以持续发射激光。10, in some embodiments, the first predetermined value is less than the second predetermined value, the adjustment method includes: 1001: obtain the infrared interference energy of the current scene; 1002: when the infrared interference energy is less than the first predetermined value, The first optical power emits the laser; 1003: when the infrared interference energy is greater than the second predetermined value, the second optical power emits the laser; and 1004: when the infrared interference energy is greater than the first predetermined value and less than the second predetermined value, keep the current The optical power is used to continuously emit laser light.
请参阅图11,在某些实施方式中,第二光功率包括一个或多个子光功率,调节方法包括:1101:获取当前场景的红外干扰能量;1102:在红外干扰能量小于第一预定值时,以第一光功率发射激光;1103:在红外干扰能量大于第二预定值时,根据红外干扰能量确定对应的子光功率;及1104:以子光功率发射激光。Referring to FIG. 11, in some embodiments, the second optical power includes one or more sub-optical powers, and the adjustment method includes: 1101: obtain the infrared interference energy of the current scene; 1102: when the infrared interference energy is less than the first predetermined value , The laser is emitted at the first optical power; 1103: when the infrared interference energy is greater than the second predetermined value, the corresponding sub-optical power is determined according to the infrared interference energy; and 1104: the laser is emitted with the sub-optical power.
在某些实施方式中,获取当前场景的红外干扰能量(即步骤301),包括:对预定时间内接收红外光产生的电压值进行积分,以得到红外干扰能量对应的总电压值;及根据总电压值确定红外干扰能量。In some embodiments, obtaining the infrared interference energy of the current scene (ie step 301) includes: integrating the voltage value generated by receiving infrared light within a predetermined time to obtain the total voltage value corresponding to the infrared interference energy; and according to the total The voltage value determines the infrared interference energy.
在某些实施方式中,预定时间等于帧曝光时间,帧曝光时间为生成一帧散斑图像时所需接收红外光的时间。In some embodiments, the predetermined time is equal to the frame exposure time, and the frame exposure time is the time required to receive infrared light when generating a frame of speckle image.
请参阅图1至图3,本申请实施方式的终端10包括处理器12和光发射器111。处理器12用 于获取当前场景的红外干扰能量。光发射器111用于在红外干扰能量小于第一预定值时,以第一光功率发射激光、及在红外干扰能量大于第二预定值时,以第二光功率发射激光,第一预定值小于或等于第二预定值,第二光功率大于第一光功率。Please refer to FIG. 1 to FIG. 3, the terminal 10 in the embodiment of the present application includes a processor 12 and an optical transmitter 111. The processor 12 is used to obtain the infrared interference energy of the current scene. The optical transmitter 111 is used to emit laser light at a first optical power when the infrared interference energy is less than a first predetermined value, and to emit laser light at a second optical power when the infrared interference energy is greater than a second predetermined value, and the first predetermined value is less than Or equal to the second predetermined value, the second optical power is greater than the first optical power.
请参阅图1、图2和图6A,在某些实施方式中,终端10还包括光接收器112,处理器12还用于在未发射激光时,获取当前场景的红外图像;及根据红外图像计算红外干扰能量。Referring to FIGS. 1, 2 and 6A, in some embodiments, the terminal 10 further includes an optical receiver 112, and the processor 12 is also used to obtain an infrared image of the current scene when the laser is not emitted; and according to the infrared image Calculate infrared interference energy.
请参阅图1、图2、图6A和图6B,在某些实施方式中,处理器12用于获取红外图像中的像素的像素值;及根据像素值确定红外干扰能量。Referring to FIG. 1, FIG. 2, FIG. 6A, and FIG. 6B, in some embodiments, the processor 12 is used to obtain the pixel value of the pixel in the infrared image; and determine the infrared interference energy according to the pixel value.
请参阅图1、图2和图7,在某些实施方式中,光发射器111还用于以第一工作频率发射激光;光接收器112用于以第二工作频率接收激光并生成红外图像,第二频率大于第一频率;处理器12用于获取红外图像中不包括第一工作频率的激光的红外干扰图像、及根据红外干扰图像计算红外干扰能量;光发射器111还用于在红外干扰能量小于第一预定值时,以第一光功率发射激光、及在红外干扰能量大于第二预定值时,以第二光功率发射激光,第一预定值小于第二预定值。Referring to FIGS. 1, 2 and 7, in some embodiments, the optical transmitter 111 is also used to emit laser light at a first operating frequency; the optical receiver 112 is used to receive laser light at a second operating frequency and generate infrared images , The second frequency is greater than the first frequency; the processor 12 is used to obtain infrared interference images of lasers with the first operating frequency in the infrared image, and calculate infrared interference energy according to the infrared interference images; the light transmitter 111 is also used to When the interference energy is less than the first predetermined value, the laser is emitted with the first optical power, and when the infrared interference energy is greater than the second predetermined value, the laser is emitted with the second optical power, the first predetermined value is less than the second predetermined value.
请参阅图1、图2和图9,在某些实施方式中,光发射器111还用于在红外干扰能量小于第一预定值时,以第一频率、第一脉宽和第一光功率发射激光、及在红外干扰能量大于第二预定值时,以第二频率、第二脉宽和第二光功率发射激光;第二频率、第二脉宽和第二光功率的乘积小于或等于第一频率、第一脉宽和第一光功率的乘积。Referring to Figure 1, Figure 2 and Figure 9, in some embodiments, the optical transmitter 111 is also used to set the first frequency, the first pulse width and the first optical power when the infrared interference energy is less than a first predetermined value. When the infrared interference energy is greater than the second predetermined value, the laser is emitted at the second frequency, the second pulse width and the second optical power; the product of the second frequency, the second pulse width and the second optical power is less than or equal to The product of the first frequency, the first pulse width and the first optical power.
请参阅图1、图2和图10,在某些实施方式中,光发射器111还用于在红外干扰能量大于第一预定值且小于第二预定值时,保持当前光功率以持续发射激光。Referring to FIGS. 1, 2 and 10, in some embodiments, the optical transmitter 111 is also used to maintain the current optical power to continuously emit laser light when the infrared interference energy is greater than a first predetermined value and less than a second predetermined value. .
请参阅图1、图2和图11,在某些实施方式中,处理器12还用于根据红外干扰能量确定对应的子光功率。光发射器111还用于以子光功率发射激光。Referring to FIG. 1, FIG. 2 and FIG. 11, in some embodiments, the processor 12 is further configured to determine the corresponding sub-light power according to the infrared interference energy. The optical transmitter 111 is also used to emit laser light with sub-optical power.
请参阅图1和图2,在某些实施方式中,终端10还包括距离传感器18,距离传感器18包括红外接收器182,红外接收器182用于接收红外光以产生对应的电压值,处理器12还用于对预定时间内红外接收器182接收红外光产生的电压值进行积分,以得到红外干扰能量对应的总电压值;及根据总电压值确定红外干扰能量。1 and 2, in some embodiments, the terminal 10 further includes a distance sensor 18, the distance sensor 18 includes an infrared receiver 182, the infrared receiver 182 is used to receive infrared light to generate a corresponding voltage value, the processor 12 is also used to integrate the voltage value generated by the infrared receiver 182 receiving infrared light within a predetermined time to obtain the total voltage value corresponding to the infrared interference energy; and to determine the infrared interference energy according to the total voltage value.
请参阅图1和图2,在某些实施方式中,终端10还包括光接收器112,预定时间等于光接收器112的帧曝光时间,帧曝光时间为生成一帧散斑图像时,光接收器112所需接收红外光的时间。1 and 2, in some embodiments, the terminal 10 further includes a light receiver 112, the predetermined time is equal to the frame exposure time of the light receiver 112, the frame exposure time is when one frame of speckle image is generated, the light receiving The time required for the receiver 112 to receive infrared light.
请参阅图1和图2,在某些实施方式中,终端10包括可见光相机13,可见光相机13位于光发射器111与光接收器112之间。Referring to FIGS. 1 and 2, in some embodiments, the terminal 10 includes a visible light camera 13, and the visible light camera 13 is located between the light transmitter 111 and the light receiver 112.
请参阅图3和图12,本申请的包含计算机可读指令202的非易失性计算机可读存储介质200。计算机可读指令202被处理器12执行时,使得处理器12执行以下步骤:301:获取当前场景的红外干扰能量;302:在红外干扰能量小于第一预定值时,以第一光功率发射激光;及303:在红外干扰能量大于第二预定值时,以第二光功率发射激光,第一预定值小于第二预定值,第二光功率大于第一光功率。Please refer to FIG. 3 and FIG. 12, a non-volatile computer-readable storage medium 200 containing computer-readable instructions 202 of the present application. When the computer-readable instruction 202 is executed by the processor 12, the processor 12 executes the following steps: 301: Obtain the infrared interference energy of the current scene; 302: When the infrared interference energy is less than the first predetermined value, emit the laser at the first optical power ; And 303: when the infrared interference energy is greater than the second predetermined value, the laser is emitted with the second optical power, the first predetermined value is less than the second predetermined value, and the second optical power is greater than the first optical power.
请参阅图6A和图12,本申请的包含计算机可读指令202的非易失性计算机可读存储介质200。计算机可读指令202被处理器12执行时,使得处理器12执行以下步骤:601:在未发射激光时,获取当前场景的红外图像;602:根据红外图像计算红外干扰能量;603:在红外干扰能量小于第一预定值时,以第一光功率发射激光;及604:在红外干扰能量大于第二预定值时,以第二光功率发射激光,第一预定值小于第二预定值,第二光功率大于第一光功率。Please refer to FIG. 6A and FIG. 12, a non-volatile computer-readable storage medium 200 containing computer-readable instructions 202 of the present application. When the computer-readable instruction 202 is executed by the processor 12, the processor 12 executes the following steps: 601: Obtain an infrared image of the current scene when the laser is not emitted; 602: Calculate infrared interference energy according to the infrared image; 603: In the infrared interference When the energy is less than the first predetermined value, the laser is emitted with the first optical power; and 604: when the infrared interference energy is greater than the second predetermined value, the laser is emitted with the second optical power, the first predetermined value is less than the second predetermined value, and the second The optical power is greater than the first optical power.
请参阅图6A、图6B和图12,本申请的包含计算机可读指令202的非易失性计算机可读存储介质200。计算机可读指令202被处理器12执行时,使得处理器12执行以下步骤:6021:获取红外图像中的像素的像素值;及6022:根据像素值确定红外干扰能量。Please refer to FIG. 6A, FIG. 6B and FIG. 12, the non-volatile computer-readable storage medium 200 containing computer-readable instructions 202 of the present application. When the computer-readable instruction 202 is executed by the processor 12, the processor 12 executes the following steps: 6021: Obtain the pixel value of the pixel in the infrared image; and 6022: Determine the infrared interference energy according to the pixel value.
请参阅图7和图12,本申请的包含计算机可读指令202的非易失性计算机可读存储介质200。计算机可读指令202被处理器12执行时,使得处理器12执行以下步骤:701:以第一工作频率发射激光;702:以第二工作频率接收激光并生成红外图像,第二频率大于第一频率;703:获取红外图像中不包括第一工作频率的激光的红外干扰图像;704:根据红外干扰图像计算红外干扰能量;705:在红外干扰能量小于第一预定值时,以第一光功率发射激光;及706:在红外干扰能量大于第二预定值时,以第二光功率发射激光,第一预定值小于第二预定值。Please refer to FIG. 7 and FIG. 12, a non-volatile computer-readable storage medium 200 containing computer-readable instructions 202 of the present application. When the computer readable instruction 202 is executed by the processor 12, the processor 12 executes the following steps: 701: emit laser at a first operating frequency; 702: receive laser at a second operating frequency and generate infrared images, the second frequency is greater than the first Frequency; 703: Acquire infrared interference images that do not include the laser at the first working frequency in the infrared image; 704: Calculate infrared interference energy according to the infrared interference image; 705: Use the first optical power when the infrared interference energy is less than the first predetermined value Emit laser; and 706: When the infrared interference energy is greater than the second predetermined value, emit the laser with the second optical power, and the first predetermined value is less than the second predetermined value.
请参阅图9和图12,本申请的包含计算机可读指令202的非易失性计算机可读存储介质200。计算机可读指令202被处理器12执行时,使得处理器12执行以下步骤:901:获取当前场景的红外干扰能量;902:在红外干扰能量小于第一预定值时,以第一频率、第一脉宽和第一光功率发射激光;903:在红外干扰能量大于第二预定值时,以第二频率、第二脉宽和第二光功率发射激光,第二频率、第二脉宽和第二光功率的乘积小于或等于第一频率、第一脉宽和第一光功率的乘积。Please refer to FIG. 9 and FIG. 12, a non-volatile computer-readable storage medium 200 containing computer-readable instructions 202 of the present application. When the computer-readable instruction 202 is executed by the processor 12, the processor 12 executes the following steps: 901: Obtain the infrared interference energy of the current scene; 902: When the infrared interference energy is less than the first predetermined value, use the first frequency and the first The pulse width and the first optical power emit laser; 903: when the infrared interference energy is greater than the second predetermined value, the laser is emitted with the second frequency, the second pulse width and the second optical power, the second frequency, the second pulse width and the first The product of the two optical powers is less than or equal to the product of the first frequency, the first pulse width and the first optical power.
请参阅图10和图12,本申请的包含计算机可读指令202的非易失性计算机可读存储介质200。计算机可读指令202被处理器12执行时,使得处理器12执行以下步骤:1001:获取当前场景的红外干扰能量;1002:在红外干扰能量小于第一预定值时,以第一光功率发射激光;1003:在红外干扰能量大于第二预定值时,以第二光功率发射激光;及1004:在红外干扰能量大于第一预定值且小于第二预定值时,保持当前光功率以持续发射激光。Please refer to FIG. 10 and FIG. 12, a non-volatile computer-readable storage medium 200 containing computer-readable instructions 202 of the present application. When the computer readable instruction 202 is executed by the processor 12, the processor 12 executes the following steps: 1001: obtain the infrared interference energy of the current scene; 1002: when the infrared interference energy is less than the first predetermined value, emit the laser at the first optical power 1003: When the infrared interference energy is greater than the second predetermined value, the laser is emitted at the second optical power; and 1004: when the infrared interference energy is greater than the first predetermined value and less than the second predetermined value, the current optical power is maintained to continuously emit the laser .
请参阅图11和图12,本申请的包含计算机可读指令202的非易失性计算机可读存储介质200。计算机可读指令202被处理器12执行时,使得处理器12执行以下步骤:1101:获取当前场景的红外干扰能量;1102:在红外干扰能量小于第一预定值时,以第一光功率发射激光;1103:在红外干扰能量大于第二预定值时,根据红外干扰能量确定对应的子光功率;及1104:以子光功率发射激光。Please refer to FIG. 11 and FIG. 12, a non-volatile computer-readable storage medium 200 containing computer-readable instructions 202 of the present application. When the computer readable instruction 202 is executed by the processor 12, the processor 12 executes the following steps: 1101: obtain the infrared interference energy of the current scene; 1102: when the infrared interference energy is less than the first predetermined value, emit the laser at the first optical power 1103: When the infrared interference energy is greater than the second predetermined value, determine the corresponding sub-optical power according to the infrared interference energy; and 1104: emit the laser with the sub-optical power.
请参阅图12,本申请的包含计算机可读指令202的非易失性计算机可读存储介质200。计算机可读指令202被处理器12执行时,使得处理器12执行以下步骤:对预定时间内接收红外光产生的电压值进行积分,以得到红外干扰能量对应的总电压值;及根据总电压值确定红外干扰能量。Please refer to FIG. 12, a non-volatile computer-readable storage medium 200 containing computer-readable instructions 202 of the present application. When the computer-readable instruction 202 is executed by the processor 12, the processor 12 executes the following steps: integrate the voltage value generated by receiving infrared light within a predetermined time to obtain the total voltage value corresponding to the infrared interference energy; and according to the total voltage value Determine the infrared interference energy.
请参阅图12,本申请的包含计算机可读指令202的非易失性计算机可读存储介质200。预定时间等于帧曝光时间,帧曝光时间为生成一帧散斑图像时所需接收红外光的时间。Please refer to FIG. 12, a non-volatile computer-readable storage medium 200 containing computer-readable instructions 202 of the present application. The predetermined time is equal to the frame exposure time, which is the time required to receive infrared light when generating a frame of speckle image.
请参阅图1,本申请实施方式的终端10包括壳体15、深度相机11及处理器12。终端10可以是手机、平板电脑、笔记本电脑、智能手表等,本申请说明书以终端10是手机为例进行说明,可以理解的是,终端10的具体形式并不限于手机。Please refer to FIG. 1, the terminal 10 of the embodiment of the present application includes a housing 15, a depth camera 11 and a processor 12. The terminal 10 may be a mobile phone, a tablet computer, a notebook computer, a smart watch, etc. The description of this application takes the terminal 10 as a mobile phone as an example for description. It is understood that the specific form of the terminal 10 is not limited to a mobile phone.
深度相机11及处理器12均可以安装在壳体15上。壳体15包括正面151及背面152,正面151与背面152相背。正面151还可用于安装显示屏14,显示屏14可用于显示图像、文字等信息。深度相机11可以安装在正面151,以便于进行自拍或进行视频通话等;深度相机11也可以安装在背面152,以便于拍摄景物及他人;另外,也可以在正面151及背面152均安装有可以独立工作的深度相机11。Both the depth camera 11 and the processor 12 can be installed on the housing 15. The housing 15 includes a front 151 and a back 152, and the front 151 and the back 152 are opposite to each other. The front 151 can also be used to install a display screen 14, which can be used to display images, text and other information. The depth camera 11 can be installed on the front 151 to facilitate selfies or video calls, etc.; the depth camera 11 can also be installed on the back 152 to facilitate shooting scenes and others; in addition, it can also be installed on both the front 151 and the back 152. Independent working depth camera 11.
深度相机11包括光发射器111及光接收器112。深度相机11的光发射器111可以向外发射激光,例如红外激光,激光到达场景中的物体上后被反射,被反射的激光可由光接收器112接收,处理器12可以依据光发射器111发射的激光及光接收器112接收的激光计算物体的深度信息。在一个例子中,深度相机11可通过飞行时间(Time of flight,TOF)测距法获取深度信息,在另一个例子中,深度相机11可通过结构光测距原理获取深度信息。本申请说明书以深度相机11通过结构光测距原理获取深度信息为例进行说明。深度相机11大多采用波长为940纳米(nm)的激光进行发射,不同环境(如处于室内或室外)中可能同样存在波长为940nm的红外光,光接收器112在接收深度相机11发出的波长为940nm的激光的同时,也会接收到环境中波长为940nm的红外光,而环境中的红外光会影响深度图像的获取精度。The depth camera 11 includes a light transmitter 111 and a light receiver 112. The light transmitter 111 of the depth camera 11 can emit laser light, such as infrared laser, which is reflected after reaching the object in the scene. The reflected laser light can be received by the light receiver 112, and the processor 12 can emit according to the light transmitter 111 The laser light and the laser light received by the light receiver 112 calculate the depth information of the object. In one example, the depth camera 11 may obtain depth information through a time of flight (TOF) ranging method. In another example, the depth camera 11 may obtain depth information through a structured light ranging principle. The description of this application takes the depth camera 11 to obtain depth information through the principle of structured light ranging as an example for description. Most depth cameras 11 use lasers with a wavelength of 940 nanometers (nm) to emit. In different environments (such as indoors or outdoors), there may also be infrared light with a wavelength of 940 nm. The optical receiver 112 receives the wavelength of the depth camera 11 as The 940nm laser will also receive infrared light with a wavelength of 940nm in the environment, and the infrared light in the environment will affect the acquisition accuracy of the depth image.
在图1所示的例子中,深度相机11安装在壳体15的背面152。可以理解,安装在背面152的深度相机11(即后置深度相机11)需要满足拍摄较远物体的正常使用,因此,通常光发射器111需要发射的激光的光功率需要设置得较大,以满足获取深度信息的准确性。In the example shown in FIG. 1, the depth camera 11 is installed on the back 152 of the housing 15. It can be understood that the depth camera 11 (that is, the rear depth camera 11) installed on the back 152 needs to meet the normal use of photographing distant objects. Therefore, usually the optical power of the laser light emitted by the light emitter 111 needs to be set to be larger. Satisfy the accuracy of obtaining depth information.
终端10还可以包括可见光相机13,具体地,可见光相机13可以包括长焦相机及广角相机,或者可见光相机13包括长焦相机、广角相机及潜望式相机。可见光相机13可以与深度相机11靠近设置,例如可见光相机13可以设置在光发射器111与光接收器112之间,以使光发射器111与光接收器112之间具有较远的距离,提高深度相机11的基线(base line)长度,提高获取得深度信息的准确性。The terminal 10 may further include a visible light camera 13. Specifically, the visible light camera 13 may include a telephoto camera and a wide-angle camera, or the visible light camera 13 may include a telephoto camera, a wide-angle camera, and a periscope camera. The visible light camera 13 can be arranged close to the depth camera 11. For example, the visible light camera 13 can be arranged between the light emitter 111 and the light receiver 112, so that the light emitter 111 and the light receiver 112 have a longer distance, which improves The length of the baseline (baseline) of the depth camera 11 improves the accuracy of acquiring depth information.
请结合图2,光发射器111和光接收器112均与处理器12连接。处理器12可以为光发射器 111提供使能信号,具体地,处理器12可以为驱动器16提供使能信号,其中,驱动器16用于驱动光发射器111发射激光。光接收器112通过I2C总线与处理器12连接。光接收器112与光发射器111配合使用时,在一个例子中,光接收器112可以通过选通信号(Strobe信号)控制光发射器111的投射时序,其中,Strobe信号是根据光接收器112获取采集图像的时序来生成的,Strobe信号可视为高低电平交替的电信号,光发射器111根据Strobe信号指示的激光投射时序来投射激光。具体地,处理器12可以通过I2C总线发送图像采集指令以启用深度相机11使其工作,光接收器112接收到图像采集指令后,通过Strobe信号控制开关器件17,若Strobe信号为高电平,则开关器件17向驱动器16发送脉冲信号(pwn),驱动器16根据脉冲信号驱动光发射器111向场景中投射激光,若Strobe信号为低电平,则开关器件17停止发送脉冲信号至驱动器16,光发射器111不投射激光;或者,也可以是在Strobe信号为低电平时,开关器件17向驱动器16发送脉冲信号,驱动器16根据脉冲信号驱动光发射器111向场景中投射激光,在Strobe信号为高电平时,开关器件17停止发送脉冲信号至驱动器16,光发射器111不投射激光。Please refer to FIG. 2, both the optical transmitter 111 and the optical receiver 112 are connected to the processor 12. The processor 12 may provide an enable signal for the optical transmitter 111. Specifically, the processor 12 may provide an enable signal for the driver 16, wherein the driver 16 is used to drive the optical transmitter 111 to emit laser light. The optical receiver 112 is connected to the processor 12 through an I2C bus. When the optical receiver 112 is used in conjunction with the optical transmitter 111, in an example, the optical receiver 112 can control the projection timing of the optical transmitter 111 through a strobe signal (Strobe signal), where the Strobe signal is based on the optical receiver 112 The strobe signal can be regarded as an electrical signal with alternating high and low levels, and the optical transmitter 111 projects laser light according to the laser projection timing indicated by the strobe signal. Specifically, the processor 12 may send an image acquisition instruction through the I2C bus to enable the depth camera 11 to work. After the optical receiver 112 receives the image acquisition instruction, it controls the switching device 17 through the Strobe signal. If the Strobe signal is high, Then the switch device 17 sends a pulse signal (pwn) to the driver 16, and the driver 16 drives the light emitter 111 to project laser light into the scene according to the pulse signal. If the Strobe signal is low, the switch device 17 stops sending the pulse signal to the driver 16. The light emitter 111 does not project laser light; or, when the Strobe signal is low, the switching device 17 sends a pulse signal to the driver 16, and the driver 16 drives the light emitter 111 to project laser light into the scene according to the pulse signal. When the level is high, the switching device 17 stops sending pulse signals to the driver 16, and the light emitter 111 does not project laser light.
在另一个例子中,光接收器112与光发射器111配合时可以无需用到Strobe信号,此时,处理器12发送图像采集指令至光接收器112并同时发送激光投射指令至驱动器16,光接收器112接收到图像采集指令后开始获取采集图像,驱动器16接收到激光投射指令时驱动光发射器111投射激光。光发射器111投射激光时,激光形成带有斑点的激光图案投射在场景中的物体上。光接收器112采集被物体反射的激光图案得到散斑图像,并通过移动产业处理器12接口(Mobile Industry Processor Interface,MIPI)将散斑图像发送给处理器12。光接收器112每发送一帧散斑图像给处理器12,处理器12就接收到一个数据流。处理器12可以根据散斑图像和预存在处理器12中的参考图像进行深度信息的计算。In another example, when the optical receiver 112 and the optical transmitter 111 cooperate, the Strobe signal may not be used. At this time, the processor 12 sends an image acquisition command to the optical receiver 112 and simultaneously sends a laser projection command to the driver 16. The receiver 112 starts to acquire the acquired image after receiving the image acquisition instruction, and when the driver 16 receives the laser projection instruction, it drives the light transmitter 111 to project laser light. When the light emitter 111 projects laser light, the laser light forms a laser pattern with spots and is projected on an object in the scene. The light receiver 112 collects the laser pattern reflected by the object to obtain the speckle image, and sends the speckle image to the processor 12 through the Mobile Industry Processor Interface (MIPI). Each time the optical receiver 112 sends a speckle image to the processor 12, the processor 12 receives a data stream. The processor 12 may calculate the depth information according to the speckle image and the reference image pre-stored in the processor 12.
请参阅图1至图3,本申请实施方式的调节方法可用于控制上述终端10,调节方法包括以下步骤:1 to 3, the adjustment method of the embodiment of the present application can be used to control the aforementioned terminal 10. The adjustment method includes the following steps:
301:获取当前场景的红外干扰能量;301: Obtain the infrared interference energy of the current scene;
302:在红外干扰能量小于第一预定值时,以第一光功率发射激光;及302: When the infrared interference energy is less than the first predetermined value, emit laser light at the first optical power; and
303:在红外干扰能量大于第二预定值时,以第二光功率发射激光,第一预定值小于第二预定值,第二光功率大于第一光功率。303: When the infrared interference energy is greater than the second predetermined value, emit the laser with the second optical power, the first predetermined value is less than the second predetermined value, and the second optical power is greater than the first optical power.
本申请实施方式的处理器12用于获取当前场景的红外干扰能量。光发射器111用于在红外干扰能量小于第一预定值时,以第一光功率发射激光、及在红外干扰能量大于第二预定值时,以第二光功率发射激光,第一预定值小于或等于第二预定值,第二光功率大于第一光功率。也即是说,步骤301可以由处理器12实现,步骤302和步骤303可以由光发射器111实现。The processor 12 in the embodiment of the present application is used to obtain the infrared interference energy of the current scene. The optical transmitter 111 is used to emit laser light at a first optical power when the infrared interference energy is less than a first predetermined value, and to emit laser light at a second optical power when the infrared interference energy is greater than a second predetermined value, and the first predetermined value is less than Or equal to the second predetermined value, the second optical power is greater than the first optical power. In other words, step 301 can be implemented by the processor 12, and step 302 and step 303 can be implemented by the optical transmitter 111.
具体地,光接收器112可用于接收当前场景的红外干扰能量;在一个例子中,终端10还包括距离传感器18,距离传感器18包括红外发射器181和红外接收器182,红外发射器181配合红外接收器182以通过TOF测距原理实现测距功能,红外发射器181向目标物体发射红外光,红外接收器182接收经目标物体反射的红外光,处理器12根据红外发射器181发出红外光和红外接收器182接收红外光的时间差计算得到目标物体的距离。距离传感器18的红外接收器182可用于采集获取当前场景的红外干扰能量。处理器12可用于获取红外接收器182采集的红外干扰能量。红外接收器182用于接收当前场景中的特定波长(如波长为940nm)的红外光产生对应的电压值,红外接收器182在预定时间内接收的红外光的量即为红外干扰能量,对应的,处理器12对预定时间内的电压值进行积分以得到红外干扰能量对应的总电压值,从而根据总电压值确定红外干扰能量的大小。相较于深度相机11而言,距离传感器18的功耗较低,测量当前场景的红外干扰能量所需的电量较少。Specifically, the light receiver 112 can be used to receive the infrared interference energy of the current scene; in one example, the terminal 10 further includes a distance sensor 18, and the distance sensor 18 includes an infrared transmitter 181 and an infrared receiver 182. The infrared transmitter 181 cooperates with infrared The receiver 182 realizes the ranging function based on the TOF ranging principle. The infrared transmitter 181 emits infrared light to the target object, the infrared receiver 182 receives the infrared light reflected by the target object, and the processor 12 emits infrared light and light according to the infrared transmitter 181. The time difference of the infrared receiver 182 receiving infrared light is calculated to obtain the distance of the target object. The infrared receiver 182 of the distance sensor 18 can be used to collect the infrared interference energy of the current scene. The processor 12 may be used to obtain the infrared interference energy collected by the infrared receiver 182. The infrared receiver 182 is used to receive infrared light of a specific wavelength (such as a wavelength of 940 nm) in the current scene to generate a corresponding voltage value. The amount of infrared light received by the infrared receiver 182 within a predetermined time is the infrared interference energy, and the corresponding The processor 12 integrates the voltage value within a predetermined time to obtain the total voltage value corresponding to the infrared interference energy, so as to determine the magnitude of the infrared interference energy according to the total voltage value. Compared with the depth camera 11, the power consumption of the distance sensor 18 is lower, and the power required to measure the infrared interference energy of the current scene is less.
其中,预定时间可以与深度相机11的帧曝光时间相同,帧曝光时间为深度相机11生成一帧散斑图像时,光接收器112所需接收红外光的时间。如图4所示,光发射器111以脉冲形式(如图4所示发射波形S1和发射波形S2,发射波形S1与第一光功率对应,发射波形S2和第二光功率对应)向当前场景发射红外激光,光接收器112根据选通波形C1接收当前场景反射的红外光,如图4中的选通波形C1中,光接收器112在高电平持续时间内持续接收红外光,而在低电平持续时间内停止接收红外光,如一帧包括一个或多个高电平和一个或多个低电平,帧曝光时间即为 一帧内的高电平和低电平的持续时间的总和。The predetermined time may be the same as the frame exposure time of the depth camera 11, and the frame exposure time is the time required for the light receiver 112 to receive infrared light when the depth camera 11 generates a frame of speckle image. As shown in FIG. 4, the optical transmitter 111 transmits to the current scene in the form of pulses (as shown in FIG. 4, the emission waveform S1 and the emission waveform S2, the emission waveform S1 corresponds to the first optical power, and the emission waveform S2 corresponds to the second optical power). The infrared laser is emitted, and the optical receiver 112 receives the infrared light reflected by the current scene according to the strobe waveform C1. In the strobe waveform C1 in FIG. 4, the optical receiver 112 continues to receive the infrared light for the duration of the high level. Stop receiving infrared light within the low level duration. If a frame includes one or more high levels and one or more low levels, the frame exposure time is the sum of the duration of the high level and the low level in one frame.
可以理解,红外干扰能量越大,表示环境中的波长为940nm的红外光(下称背景红外光)越多。在深度相机11接收红外光以生成散斑图像时,不仅接收了光发射器111发出的波长为940nm的红外光,还接收了背景红外光,背景红外光为噪音,会影响生成的散斑图像的准确性,进而影响最终生成的深度图像的精度。It can be understood that the greater the infrared interference energy, the more infrared light with a wavelength of 940 nm (hereinafter referred to as background infrared light) in the environment. When the depth camera 11 receives infrared light to generate a speckle image, it not only receives the infrared light with a wavelength of 940nm from the light emitter 111, but also receives the background infrared light. The background infrared light is noise, which will affect the generated speckle image. The accuracy of, which in turn affects the accuracy of the final depth image.
请参阅图5a和图5b,由于环境中的波长为940nm的红外光一般来自于太阳光,因此,室内基本没有背景红外光(如图5a),光接收器112接收的光线基本为光发射器111发射的激光L1,背景红外光L2较少。而室外由于直接受到阳光的照射,背景红外光L2较多(如图5b),光接收器112接收的光线除了光发射器111发射的激光L1,还包括较多的背景红外光L2,且室外的阳光越明亮,背景红外光L2就越多。处理器12在获取到红外干扰能量的大小后,可确定红外干扰能量是否小于第一预定值。Please refer to Figures 5a and 5b. Since the infrared light with a wavelength of 940nm in the environment generally comes from sunlight, there is basically no background infrared light indoors (as shown in Figure 5a), and the light received by the light receiver 112 is basically a light emitter The laser L1 emitted by 111 has less background infrared light L2. Outdoors are directly irradiated by sunlight, so there is more background infrared light L2 (as shown in Figure 5b). In addition to the laser light L1 emitted by the light transmitter 111, the light received by the light receiver 112 also includes more background infrared light L2. The brighter the sunlight, the more background infrared light L2. After obtaining the magnitude of the infrared interference energy, the processor 12 may determine whether the infrared interference energy is less than the first predetermined value.
其中,第一预定值可通过检测大量的房屋(如楼房、平房等)的室内的红外干扰能量后确定,例如取所有被检测的房屋室内的红外干扰能量的均值作为第一预定值。从而保证第一预定值的准确性。The first predetermined value can be determined by detecting indoor infrared interference energy of a large number of houses (such as buildings, bungalows, etc.). For example, the average value of infrared interference energy in all the detected houses is taken as the first predetermined value. Thereby ensuring the accuracy of the first predetermined value.
请结合图4、图5a和图5b,光功率一般只与光的幅值有关,在红外干扰能量小于或等于第一预定值时,处理器12可判断深度相机11当前处于室内环境,背景红外光较少,从而控制光发射器111以第一光功率发射激光,如图4所示的背景红外光的幅值H1及第一光功率对应的幅值H2,两者的差值较大可以实现较高的信噪比(如保证信噪比大于80%)。第一光功率为出厂前在包含与第一预定值对应的红外干扰能量的室内进行测定,以确定的光功率数值较小且信噪比较高的光功率,不仅可以保证深度相机11以第一光功率发射激光时,生成的深度图像的精度不受影响,还可以降低终端10的功耗。Please refer to Figure 4, Figure 5a and Figure 5b, the optical power is generally only related to the amplitude of the light. When the infrared interference energy is less than or equal to the first predetermined value, the processor 12 can determine that the depth camera 11 is currently in an indoor environment, and the background infrared There is less light, so the light transmitter 111 is controlled to emit laser light at the first light power. As shown in FIG. 4, the amplitude H1 of the background infrared light and the amplitude H2 corresponding to the first light power can be larger. Achieve a higher signal-to-noise ratio (such as ensuring that the signal-to-noise ratio is greater than 80%). The first optical power is measured indoors containing the infrared interference energy corresponding to the first predetermined value before leaving the factory. The determined optical power has a small value and a high signal-to-noise ratio, which can not only ensure that the depth camera 11 is When the laser is emitted at one optical power, the accuracy of the generated depth image is not affected, and the power consumption of the terminal 10 can also be reduced.
在红外干扰能量大于第一预定值时,处理器12再判断红外干扰能量是否大于或第二预定值,第二预定值大于第一预定值。其中,第二预定值与第一预定值类似,可通过检测不同强度的阳光下(如阴天和晴天)的红外干扰能量,以不同强度阳光下的平均红外干扰能量作为第二预定值,或以不同强度阳光下的最大红外干扰能量(如强光环境下的红外干扰能量)作为第二预定值。When the infrared interference energy is greater than the first predetermined value, the processor 12 then determines whether the infrared interference energy is greater than or a second predetermined value, and the second predetermined value is greater than the first predetermined value. The second predetermined value is similar to the first predetermined value. The infrared interference energy under different intensities of sunlight (such as cloudy and sunny) can be detected, and the average infrared interference energy under different intensities of sunlight can be used as the second predetermined value, or The maximum infrared interference energy under different intensities of sunlight (such as infrared interference energy in a strong light environment) is used as the second predetermined value.
在红外干扰能量大于或等于第二预定值时,处理器12可判断深度相机11当前处于室外环境,背景环境光较多,此时若依旧以第一光功率发射激光的话,由于H2和H1的差值较小,会导致光接收器112接收的红外光中背景红外光占比较大(即,信噪比较低)。因此,处理器12可控制光发射器111以大于第一光功率的第二光功率发射激光,如图4所示的背景红外光的幅值H1及第二光功率对应的幅值H3,两者的差值可以实现较高的信噪比(如保证信噪比大于80%)。第二光功率为出厂前在包含与第二预定值对应的红外干扰能量的室外进行测定,以确定信噪比较高的光功率。如第二光功率可保证信噪比大于80%,从而可保证室外环境下的深度图像的获取精度。另外,当前时间为晚上时,不管室内和室外均只有少量波长为940nm的红外光,故当前时间为晚上时,终端10即使处于室外环境下依旧会视为在室内,从而深度相机11以第一光功率发射激光。When the infrared interference energy is greater than or equal to the second predetermined value, the processor 12 can determine that the depth camera 11 is currently in an outdoor environment and there is a lot of background ambient light. At this time, if the laser is still emitted at the first light power, the difference between H2 and H1 The small difference will cause the background infrared light to account for a larger proportion of the infrared light received by the light receiver 112 (that is, the signal-to-noise ratio is low). Therefore, the processor 12 can control the optical transmitter 111 to emit laser light at a second optical power greater than the first optical power. As shown in FIG. 4, the amplitude H1 of the background infrared light and the amplitude H3 corresponding to the second optical power are two The difference between them can achieve a higher signal-to-noise ratio (such as ensuring that the signal-to-noise ratio is greater than 80%). The second optical power is measured outdoors containing infrared interference energy corresponding to the second predetermined value before leaving the factory to determine the optical power with a high signal-to-noise ratio. For example, the second optical power can ensure that the signal-to-noise ratio is greater than 80%, thereby ensuring the accuracy of acquiring depth images in an outdoor environment. In addition, when the current time is at night, there is only a small amount of infrared light with a wavelength of 940nm regardless of indoors and outdoors. Therefore, when the current time is at night, the terminal 10 will still be regarded as indoors even if it is in an outdoor environment, so that the depth camera 11 takes the first place. The optical power emits laser light.
综上,本申请实施方式的调节方法和终端10通过获取当前场景的红外干扰能量,在红外干扰能力较少(小于第一预定值)时,以小于第二光功率的第一光功率发射激光,可在保证深度图像的获取精度的同时降低功耗;而在红外干扰能量较多(大于第二预定值)时,以大于第一光功率的第二光功率发射激光,提升发射的激光和红外干扰能量的比值,提升信噪比,从而提高深度图像的获取精度。In summary, the adjustment method and terminal 10 of the embodiments of the present application obtain the infrared interference energy of the current scene, and when the infrared interference capability is less (less than the first predetermined value), the laser is emitted at the first optical power less than the second optical power. , Can reduce the power consumption while ensuring the accuracy of the depth image acquisition; and when the infrared interference energy is large (greater than the second predetermined value), the laser is emitted with the second optical power greater than the first optical power to improve the emitted laser and The ratio of infrared interference energy improves the signal-to-noise ratio, thereby improving the acquisition accuracy of depth images.
请参阅图6A,在某些实施方式中,调节方法包括:Referring to FIG. 6A, in some embodiments, the adjustment method includes:
601:在未发射激光时,获取当前场景的红外图像;601: Acquire an infrared image of the current scene when the laser is not emitted;
602:根据红外图像计算红外干扰能量;602: Calculate infrared interference energy based on infrared images;
603:在红外干扰能量小于第一预定值时,以第一光功率发射激光;及603: When the infrared interference energy is less than the first predetermined value, emit laser light at the first optical power; and
604:在红外干扰能量大于第二预定值时,以第二光功率发射激光,第一预定值小于第二预定值,第二光功率大于第一光功率。604: When the infrared interference energy is greater than the second predetermined value, the laser is emitted with the second optical power, the first predetermined value is less than the second predetermined value, and the second optical power is greater than the first optical power.
请参阅图1及图6A,在某些实施方式中,光接收器112还用于在未发射激光时,获取当前 场景的红外图像;处理器12根据红外图像计算红外干扰能量。也即是说,步骤601和步骤602可以为前述步骤301的子步骤,且步骤601可由光接收器112实现,步骤602可以由处理器12实现。1 and 6A, in some embodiments, the optical receiver 112 is also used to obtain an infrared image of the current scene when no laser is emitted; the processor 12 calculates infrared interference energy according to the infrared image. In other words, step 601 and step 602 may be sub-steps of the aforementioned step 301, and step 601 may be implemented by the optical receiver 112, and step 602 may be implemented by the processor 12.
其中,图6A中的步骤603及步骤604的内容及具体实施细节,可以参照本申请说明书中对步骤302及步骤303的描述,在此不再赘述。For the content and specific implementation details of step 603 and step 604 in FIG. 6A, reference may be made to the description of step 302 and step 303 in the specification of this application, which will not be repeated here.
具体地,光接收器112还可以是深度相机11的光接收器112。深度相机11的光接收器112与光发射器111配合以获取深度图像。光接收器112在光发射器111未发射激光时,可获取当前场景中的背景红外光以形成红外图像,处理器12根据红外图像即可确定当前场景的红外干扰能量的大小,红外图像可通过一个帧曝光时间内获取的红外光生成。如此,深度相机11的光接收器112可在光发射器111未发射激光时获取当前场景的红外干扰能量,且深度相机11可获取深度图像,从而获取目标物体的深度,无需单独设置距离传感器18,以获取红外干扰能量及目标物体的深度,降低了终端10的尺寸和制作成本。Specifically, the light receiver 112 may also be the light receiver 112 of the depth camera 11. The light receiver 112 of the depth camera 11 cooperates with the light transmitter 111 to obtain a depth image. The light receiver 112 can acquire the background infrared light in the current scene to form an infrared image when the light transmitter 111 does not emit laser light. The processor 12 can determine the magnitude of the infrared interference energy of the current scene according to the infrared image, and the infrared image can pass through The infrared light acquired within one frame exposure time is generated. In this way, the light receiver 112 of the depth camera 11 can obtain the infrared interference energy of the current scene when the light transmitter 111 does not emit laser light, and the depth camera 11 can obtain the depth image, thereby obtaining the depth of the target object, without the need for a separate distance sensor 18 , In order to obtain the infrared interference energy and the depth of the target object, reducing the size and manufacturing cost of the terminal 10.
请参阅图6A和图6B,在某些实施方式中,步骤602:根据红外图像计算红外干扰能量,具体包括以下子步骤:Please refer to FIG. 6A and FIG. 6B. In some embodiments, step 602: calculating infrared interference energy according to the infrared image specifically includes the following sub-steps:
6021:获取红外图像中的像素的像素值;及6021: Obtain the pixel value of the pixel in the infrared image; and
6022:根据像素值确定红外干扰能量。6022: Determine the infrared interference energy according to the pixel value.
请参阅图1及图6B,在某些实施方式中,处理器12用于获取红外图像中的像素的像素值;及根据像素值确定红外干扰能量。也即是说,步骤6021和步骤6022可以是步骤602的子步骤,且步骤6021和步骤6022可以由处理器12实现。Referring to FIG. 1 and FIG. 6B, in some embodiments, the processor 12 is used to obtain the pixel value of the pixel in the infrared image; and determine the infrared interference energy according to the pixel value. In other words, step 6021 and step 6022 may be sub-steps of step 602, and step 6021 and step 6022 may be implemented by processor 12.
具体地,在处理器12获取到深度相机11采集的红外图像后,首先获取红外图像所有像素的像素值,可以理解,每个像素接收的红外光越多,对应的像素值就越大。处理器12可根据所有像素的像素值的平均值作为当前场景的红外干扰能量对应的像素值,从而根据该像素值确定当前场景的红外干扰能量。例如,像素值和红外干扰能量存在一一对应关系,即每个像素值均对应一个红外干扰能量,该对应关系形成一个映射表,该映射表预存在终端10的存储器19中,处理器12在计算得到红外图像的所有像素的平均值后,查询映射表以确定与该平均值对应的红外干扰能量。如此,可快速计算得到当前场景的红外干扰能量。Specifically, after the processor 12 obtains the infrared image collected by the depth camera 11, it first obtains the pixel values of all pixels of the infrared image. It can be understood that the more infrared light received by each pixel, the larger the corresponding pixel value. The processor 12 may use the average value of the pixel values of all pixels as the pixel value corresponding to the infrared interference energy of the current scene, thereby determining the infrared interference energy of the current scene according to the pixel value. For example, there is a one-to-one correspondence between pixel values and infrared interference energy, that is, each pixel value corresponds to one infrared interference energy, and this correspondence forms a mapping table. The mapping table is pre-stored in the memory 19 of the terminal 10, and the processor 12 is After calculating the average value of all pixels of the infrared image, query the mapping table to determine the infrared interference energy corresponding to the average value. In this way, the infrared interference energy of the current scene can be quickly calculated.
请参阅图7,在某些实施方式中,调节方法还包括:Please refer to FIG. 7. In some embodiments, the adjustment method further includes:
701:以第一工作频率发射激光;701: Launch laser at the first working frequency;
702:以第二工作频率接收激光并生成红外图像,第二频率大于第一频率;702: Receive laser at a second operating frequency and generate an infrared image, the second frequency is greater than the first frequency;
703:获取红外图像中不包括第一工作频率的激光的红外干扰图像;703: Acquire an infrared interference image that does not include the laser at the first operating frequency in the infrared image;
704:根据红外干扰图像计算红外干扰能量;704: Calculate infrared interference energy based on infrared interference images;
705:在红外干扰能量小于第一预定值时,以第一光功率发射激光;及705: When the infrared interference energy is less than the first predetermined value, emit laser light at the first optical power; and
706:在红外干扰能量大于第二预定值时,以第二光功率发射激光,第一预定值小于第二预定值。706: When the infrared interference energy is greater than the second predetermined value, emit laser light with the second optical power, and the first predetermined value is less than the second predetermined value.
请参阅图1及图7,在某些实施方式中,光发射器111还用于以第一工作频率发射激光;光接收器112用于以第二工作频率接收激光并生成红外图像,第二频率大于第一频率;处理器12用于获取红外图像中不包括第一工作频率的激光的红外干扰图像、及根据红外干扰图像计算红外干扰能量;光发射器111还用于在红外干扰能量小于第一预定值时,以第一光功率发射激光、及在红外干扰能量大于第二预定值时,以第二光功率发射激光,第一预定值小于第二预定值。也即是说,步骤701、步骤702、步骤703和步骤704可以为获取红外干扰能量的子步骤,且步骤701、步骤705和步骤706可以由光发射器111实现,步骤702可以由光接收器112实现,步骤703和步骤704可以由处理器12实现。1 and 7, in some embodiments, the optical transmitter 111 is also used to emit laser light at a first operating frequency; the optical receiver 112 is used to receive laser light at a second operating frequency and generate infrared images, and the second The frequency is greater than the first frequency; the processor 12 is used to obtain the infrared interference image of the laser with the first operating frequency in the infrared image, and calculate the infrared interference energy according to the infrared interference image; the optical transmitter 111 is also used to When the first predetermined value, the laser is emitted at the first optical power, and when the infrared interference energy is greater than the second predetermined value, the laser is emitted with the second optical power, the first predetermined value is less than the second predetermined value. In other words, step 701, step 702, step 703, and step 704 can be sub-steps of obtaining infrared interference energy, and step 701, step 705, and step 706 can be implemented by the optical transmitter 111, and step 702 can be implemented by the optical receiver. 112 is implemented, and step 703 and step 704 may be implemented by the processor 12.
其中,图7中的步骤705及步骤706的内容及具体实施细节,可以参照本申请说明书中对步骤302及步骤303的描述,在此不再赘述。For the content and specific implementation details of step 705 and step 706 in FIG. 7, reference may be made to the description of step 302 and step 303 in the specification of this application, which will not be repeated here.
具体地,在深度相机11工作过程中,光发射器111以脉冲形式(如图4所示发射波形S1和发射波形S2)向当前场景发射红外激光,光接收器112以选通波形C1接收当前场景的背景红外光及光发射器11发出的红外激光。此时,由于光发射器111在发射红外激光,故光接收器112 接收的红外光不仅包括背景红外光,还包括光发射器111发射的激光,所以此时无法准确的得到背景红外光。以下以当前处于室外环境,激光发射波形为发射波形S2为例进行说明。Specifically, during the working process of the depth camera 11, the light transmitter 111 emits infrared laser light to the current scene in the form of pulses (as shown in FIG. 4, the transmission waveform S1 and the transmission waveform S2), and the light receiver 112 receives the current scene with the strobe waveform C1. The background infrared light of the scene and the infrared laser light emitted by the light emitter 11. At this time, since the light transmitter 111 is emitting infrared laser light, the infrared light received by the light receiver 112 includes not only the background infrared light, but also the laser light emitted by the light transmitter 111, so the background infrared light cannot be accurately obtained at this time. In the following, description is made by taking the current outdoor environment and the laser emission waveform as the emission waveform S2 as an example.
处理器12可使得光发射器111以第一工作频率发射红外激光,而光接收器112以第二工作频率接收红外激光及背景红外光,其中,第二工作频率大于第一工作频率。本实施例中,第二工作频率为第一工作频率的两倍。图4中的选通波形C1变为如图8所示选通波形C2,也即是说,在光发射器111未发射红外激光时(如图8中的高电平持续时间t2、t4、t6等),光接收器112可仅接收背景红外光以生成对应的红外干扰图像,处理器12可根据红外干扰图像计算红外干扰能量,计算方式如前所述,在此不再赘述。如此,在深度图像工作过程中,也可以准确获取到红外干扰能量,保证终端10可随时监测当前环境的红外干扰能量。The processor 12 can cause the light transmitter 111 to emit infrared laser light at a first operating frequency, and the light receiver 112 receives infrared laser light and background infrared light at a second operating frequency, wherein the second operating frequency is greater than the first operating frequency. In this embodiment, the second operating frequency is twice the first operating frequency. The strobe waveform C1 in Fig. 4 becomes the strobe waveform C2 shown in Fig. 8, that is, when the light transmitter 111 does not emit infrared laser light (the high level duration t2, t4, t6, etc.), the light receiver 112 can only receive the background infrared light to generate the corresponding infrared interference image, and the processor 12 can calculate the infrared interference energy according to the infrared interference image. The calculation method is as described above and will not be repeated here. In this way, during the working process of the depth image, the infrared interference energy can also be accurately obtained, ensuring that the terminal 10 can monitor the infrared interference energy of the current environment at any time.
另外,请参阅图8,波形I1表示光接收器112获取红外图像的时序及红外图像的帧数,波形I2表示根据干扰散斑图像和红外干扰图像得到的仅由光发射器111发射的红外激光形成的散斑图像的帧数。处理器12控制光接收器112在光发射器111投射激光时先接收背景红外光以及由光发射器111发射的红外激光以获取第N帧图像(下称干扰散斑图像)。而在光发射器111未投射激光时接收环境中的红外光(即,背景红外光)以获取第N+1帧图像(即,红外干扰图像);随后,处理器12再控制光接收器112在光发射器111投射激光时接收背景红外光以及由光发射器111发射的红外激光以获取第N+2帧采集图像(此时为干扰散斑图像),依此类推,光接收器112交替地获取干扰散斑图像和红外干扰图像。In addition, please refer to FIG. 8. The waveform I1 represents the time sequence of the infrared image acquired by the optical receiver 112 and the frame number of the infrared image, and the waveform I2 represents the infrared laser only emitted by the optical transmitter 111 obtained from the interference speckle image and the infrared interference image. The number of frames of the speckle image formed. The processor 12 controls the optical receiver 112 to first receive the background infrared light and the infrared laser emitted by the optical transmitter 111 when the optical transmitter 111 projects laser light to obtain the Nth frame image (hereinafter referred to as the interference speckle image). When the light transmitter 111 does not project laser light, it receives infrared light in the environment (ie, background infrared light) to obtain the N+1th frame image (ie, infrared interference image); then, the processor 12 controls the light receiver 112 again When the light transmitter 111 is projecting laser light, it receives the background infrared light and the infrared laser light emitted by the light transmitter 111 to obtain the N+2th frame acquisition image (in this case, the interference speckle image), and so on, the light receiver 112 alternates Obtain the interference speckle image and infrared interference image.
需要说明的是,处理器12可以控制光接收器112先获取红外干扰图像,再获取干扰散斑图像,并根据这个顺序交替执行采集图像的获取。另外,上述的第二工作频率与第一工作频率之间的倍数关系仅为示例,在其他实施例中,第二工作频率与第一工作频率之间的倍数关系还可以是三倍、四倍、五倍、六倍等等。It should be noted that the processor 12 may control the light receiver 112 to first obtain the infrared interference image, and then obtain the interference speckle image, and alternately execute the acquisition of the collected images according to this sequence. In addition, the above-mentioned multiple relationship between the second operating frequency and the first operating frequency is only an example. In other embodiments, the multiple relationship between the second operating frequency and the first operating frequency may also be three times or four times. , Five times, six times and so on.
处理器12对每个采集图像进行区分,先判断采集图像是干扰散斑图像还是红外干扰图像,具体可通过判断获取采集图像时,光发射器111是否开启来判断采集图像是干扰散斑图像还是红外干扰图像;若开启,表示当前采集图像为采集干扰散斑图像;若未开启,表示当前采集图像为红外干扰图像。处理器12获取到至少一帧干扰散斑图像和至少一帧红外干扰图像后,即可根据干扰散斑图像、红外干扰图像以及参考图像计算深度信息。具体地,以图8的I1中的第N帧采集图像和第N+1帧采集图像为例进行说明,由于红外干扰图像是在光发射器111未投射红外激光时采集的,形成红外干扰图像的光线仅包括背景红外光(即,第N+1帧采集图像不包含红外激光),而干扰散斑图像是在光发射器111投射激光时采集的,形成干扰散斑图像的光线同时包括背景红外光和光发射器111发射的红外激光(即,第N帧采集图像包含红外激光和背景红外光),因此,处理器12可以根据红外干扰图像来去除干扰散斑图像中的由背景红外光形成的图像部分,从而得到仅由光发射器111发射的红外激光形成的图像(即,在第N帧采集图像中去除第N+1帧采集图像以得到图8中I2第一帧散斑图像,同理,在第N+2帧采集图像中去除第N+3帧采集图像以得到图8中I2第二帧散斑图像,依此类推)。The processor 12 distinguishes each captured image, and first determines whether the captured image is an interference speckle image or an infrared interference image. Specifically, it can determine whether the captured image is an interference speckle image or an infrared interference image by determining whether the light emitter 111 is turned on when the captured image is acquired. Infrared interference image; if it is turned on, it means that the currently acquired image is acquisition of interference speckle images; if it is not turned on, it means that the currently acquired image is an infrared interference image. After the processor 12 obtains at least one frame of interference speckle image and at least one frame of infrared interference image, it can calculate depth information based on the interference speckle image, infrared interference image, and reference image. Specifically, taking the Nth frame of acquisition image and the N+1th frame of acquisition image in I1 of FIG. 8 as an example, the infrared interference image is collected when the light transmitter 111 is not projecting infrared laser, forming an infrared interference image The light only includes the background infrared light (that is, the captured image of frame N+1 does not include infrared laser), and the interference speckle image is collected when the light emitter 111 projects the laser. The light that forms the interference speckle image also includes the background Infrared light and the infrared laser emitted by the light transmitter 111 (that is, the Nth frame of captured image contains infrared laser and background infrared light), therefore, the processor 12 can remove the interference speckle image formed by the background infrared light according to the infrared interference image In order to obtain the image formed by only the infrared laser emitted by the light emitter 111 (ie, remove the N+1th frame of the captured image from the Nth frame of the captured image to obtain the I2 first frame of speckle image in Fig. 8, In the same way, the N+3th frame acquisition image is removed from the N+2th frame acquisition image to obtain the speckle image of the second frame I2 in FIG. 8, and so on).
可以理解,环境光中包括与光发射器111发射的激光波长相同的红外光(例如,包含波长为940nm的背景红外光),光接收器112获取图像时,这部分红外光也会被光接收器112接收。在场景的亮度较高时,光接收器112接收的光线中背景红外光的占比会增大,导致采集图像中的激光散斑点不明显,从而影响深度图像的计算。本实施方式中,光发射器111与光接收器112以不同的工作频率工作,光接收器112可以采集到仅由背景红外光形成的红外干扰图像以及同时由背景红外光和光发射器111发射的红外激光形成的干扰散斑图像,不仅可以基于红外干扰图像检测当前场景的红外干扰能量的大小,而且还可以基于红外干扰图像去除掉干扰散斑图像中由背景红外光形成的图像部分,由此能够区分出激光散斑点,并能采用仅由光发射器111发射的红外激光形成的采集图像来计算深度信息,激光散斑匹配不受影响,可以避免深度信息出现部分或全部缺失,从而提升深度信息的精确度。It can be understood that the ambient light includes infrared light with the same wavelength as the laser emitted by the light transmitter 111 (for example, includes background infrared light with a wavelength of 940 nm), and when the light receiver 112 acquires an image, this part of the infrared light will also be received by the light.器112 receives. When the brightness of the scene is high, the proportion of the background infrared light in the light received by the light receiver 112 will increase, resulting in inconspicuous laser speckles in the collected image, thereby affecting the calculation of the depth image. In this embodiment, the light transmitter 111 and the light receiver 112 work at different operating frequencies, and the light receiver 112 can collect infrared interference images formed by only background infrared light and the background infrared light and the light transmitter 111 at the same time. The interference speckle image formed by infrared laser can not only detect the amount of infrared interference energy in the current scene based on the infrared interference image, but also remove the image part formed by the background infrared light in the interference speckle image based on the infrared interference image. The laser speckles can be distinguished, and the acquired image formed by only the infrared laser emitted by the light emitter 111 can be used to calculate the depth information. The laser speckle matching is not affected, which can avoid partial or complete loss of depth information, thereby increasing the depth The accuracy of the information.
请参阅图9,在某些实施方式中,调节方法包括:Referring to FIG. 9, in some embodiments, the adjustment method includes:
901:获取当前场景的红外干扰能量;901: Obtain the infrared interference energy of the current scene;
902:在红外干扰能量小于第一预定值时,以第一频率、第一脉宽和第一光功率发射激光;902: When the infrared interference energy is less than the first predetermined value, emit laser light with the first frequency, the first pulse width and the first optical power;
903:在红外干扰能量大于第二预定值时,以第二频率、第二脉宽和第二光功率发射激光,第二频率、第二脉宽和第二光功率的乘积小于或等于第一频率、第一脉宽和第一光功率的乘积。903: When the infrared interference energy is greater than the second predetermined value, the laser is emitted with the second frequency, the second pulse width and the second optical power, and the product of the second frequency, the second pulse width and the second optical power is less than or equal to the first The product of frequency, first pulse width and first optical power.
请参阅图1及图9,在某些实施方式中,光发射器111还用于在红外干扰能量小于第一预定值时,以第一频率、第一脉宽和第一光功率发射激光、及在红外干扰能量大于第二预定值时,以第二频率、第二脉宽和第二光功率发射激光;第二频率、第二脉宽和第二光功率的乘积小于或等于第一频率、第一脉宽和第一光功率的乘积。也即是说,步骤902可以为以第一光功率发射激光的子步骤,步骤903可以为以第二光功率发射激光的子步骤,且步骤902和步骤903可以由光发射器111实现。1 and 9, in some embodiments, the optical transmitter 111 is also used to emit laser light at a first frequency, a first pulse width, and a first optical power when the infrared interference energy is less than a first predetermined value. And when the infrared interference energy is greater than the second predetermined value, the laser is emitted with the second frequency, the second pulse width and the second optical power; the product of the second frequency, the second pulse width and the second optical power is less than or equal to the first frequency , The product of the first pulse width and the first optical power. In other words, step 902 may be a sub-step of emitting laser light at the first optical power, step 903 may be a sub-step of emitting laser light at the second optical power, and step 902 and step 903 may be implemented by the light transmitter 111.
其中,图9中的步骤901的内容及具体实施细节,可以参照本申请说明书中对步骤301的描述,在此不再赘述。For the content and specific implementation details of step 901 in FIG. 9, reference may be made to the description of step 301 in the specification of this application, which will not be repeated here.
具体地,在单位时间内,进入人眼的激光达到一定量时会引发人眼安全风险。后置深度相机11还被要求能够拍摄较近的物体或人,当距离较近时,光功率较大的激光容易对人造成伤害。因此,对于后置深度相机11,确保深度相机11使用安全显得尤为重要及有难度。因此,在发射激光时,处理器12通过控制激光发射的频率、脉宽以及光功率均可以调节单位时间内进入人眼的激光总量,从而防止激光威胁到人眼安全。在处理器12判断当前场景为室外环境时,由于使用大于第一光功率的第二光功率发射激光,为了保证人眼安全,可适当降低第二频率、和/或第二脉宽,如此可使得第二频率、第二脉宽和第二光功率的乘积小于或等于第一频率、第一脉宽和第一光功率的乘积,从而保证即使室外环境下加大光功率,也不会对人眼安全造成威胁。同时,由于信噪比与激光的脉宽及频率关系不大而仅与光功率有关,光功率提升至第二光功率后,信噪比得以提高,从而保证了室外背景红外光较多时的深度图像的获取精度。Specifically, in a unit time, when the laser light entering the human eye reaches a certain amount, it will cause a human eye safety risk. The rear depth camera 11 is also required to be able to photograph objects or people that are close. When the distance is relatively close, the laser with higher optical power is likely to cause harm to the people. Therefore, for the rear depth camera 11, ensuring the safety of the depth camera 11 is particularly important and difficult. Therefore, when emitting laser light, the processor 12 can adjust the total amount of laser light entering the human eye per unit time by controlling the frequency, pulse width, and optical power of the laser light, thereby preventing the laser light from threatening human eye safety. When the processor 12 determines that the current scene is an outdoor environment, since the laser is emitted with a second optical power greater than the first optical power, in order to ensure human eye safety, the second frequency and/or the second pulse width can be appropriately reduced, so that The product of the second frequency, the second pulse width and the second optical power is less than or equal to the product of the first frequency, the first pulse width and the first optical power, so as to ensure that even if the optical power is increased in an outdoor environment, it will not be harmful to people. Eye safety poses a threat. At the same time, since the signal-to-noise ratio has little to do with the pulse width and frequency of the laser but only related to the optical power, after the optical power is increased to the second optical power, the signal-to-noise ratio can be improved, thus ensuring the depth when the outdoor background infrared light is large. The accuracy of image acquisition.
请参阅图10,在某些实施方式中,第一预定值小于第二预定值,调节方法包括:Referring to FIG. 10, in some embodiments, the first predetermined value is less than the second predetermined value, and the adjustment method includes:
1001:获取当前场景的红外干扰能量;1001: Obtain the infrared interference energy of the current scene;
1002:在红外干扰能量小于第一预定值时,以第一光功率发射激光;1002: When the infrared interference energy is less than the first predetermined value, emit the laser with the first optical power;
1003:在红外干扰能量大于第二预定值时,以第二光功率发射激光;及1003: When the infrared interference energy is greater than the second predetermined value, emit laser light at the second optical power; and
1004:在红外干扰能量大于第一预定值且小于第二预定值时,保持当前光功率以持续发射激光。1004: When the infrared interference energy is greater than the first predetermined value and less than the second predetermined value, maintain the current optical power to continuously emit laser light.
请参阅图1及图10,在某些实施方式中,光发射器111还用于在红外干扰能量大于第一预定值且小于第二预定值时,保持当前光功率以持续发射激光。也即是说,步骤1004可以由光发射器111实现。1 and 10, in some embodiments, the optical transmitter 111 is also used to maintain the current optical power to continuously emit laser light when the infrared interference energy is greater than a first predetermined value and less than a second predetermined value. In other words, step 1004 can be implemented by the light transmitter 111.
其中,图10中的步骤1001、步骤1002及步骤1003的内容及具体实施细节,可以参照本申请说明书中对步骤301、步骤302及步骤303的描述,在此不再赘述。For the content and specific implementation details of step 1001, step 1002, and step 1003 in FIG. 10, please refer to the description of step 301, step 302, and step 303 in the specification of this application, which will not be repeated here.
具体地,第一预定值小于第二预定值,当前处理器12判断当前场景的红外干扰能量大于第一预定值而小于第二预定值时,可先获取光发射器111当前的光功率,从而保持当前光功率继续发射激光。例如,当前场景为室内,光发射器111以第一光功率发射激光,若此时用户手持终端10走到窗户边上进行拍摄时,由于接近室外,背景红外光对应增大。此时,当红外干扰能量处于第一预定值到第二预定值之间时,处理器12控制光发射器111继续以第一光功率发射激光。再例如,当前场景为室外,光发射器111以第二光功率发射激光,此时用户手持终端10走到阴影处进行拍摄时,由于处于阴影处,背景红外光对应减小。此时,当红外干扰能量处于第一预定值到第二预定值之间时,处理器12可控制光发射器111继续以第二光功率发射激光。如此,在第一预定值和第二预定值之间预留一定余量,防止第一预定值和第二预定值相同均为第三预定值时,红外干扰能量在第三预定值上下来回波动,导致光发射器111的光功率频繁切换。Specifically, when the first predetermined value is less than the second predetermined value, and the current processor 12 determines that the infrared interference energy of the current scene is greater than the first predetermined value but less than the second predetermined value, it may first obtain the current optical power of the optical transmitter 111, thereby Keep the current optical power and continue to emit laser light. For example, the current scene is indoors and the light transmitter 111 emits laser light at the first light power. If the user holds the terminal 10 and walks to the window to take a picture at this time, the background infrared light increases correspondingly because it is close to the outdoors. At this time, when the infrared interference energy is between the first predetermined value and the second predetermined value, the processor 12 controls the optical transmitter 111 to continue to emit laser light at the first optical power. For another example, the current scene is outdoor, and the light transmitter 111 emits laser light at the second light power. At this time, when the user holds the terminal 10 and walks to the shadow to take a picture, the background infrared light is correspondingly reduced because of the shadow. At this time, when the infrared interference energy is between the first predetermined value and the second predetermined value, the processor 12 may control the optical transmitter 111 to continue to emit laser light at the second optical power. In this way, a certain margin is reserved between the first predetermined value and the second predetermined value to prevent the infrared interference energy from falling back and forth on the third predetermined value when the first predetermined value and the second predetermined value are the same as the third predetermined value. Fluctuations result in frequent switching of the optical power of the optical transmitter 111.
请参阅图11,在某些实施方式中,第二光功率包括一个或多个子光功率,调节方法包括:Referring to FIG. 11, in some embodiments, the second optical power includes one or more sub-optical powers, and the adjustment method includes:
1101:获取当前场景的红外干扰能量;1101: Obtain the infrared interference energy of the current scene;
1102:在红外干扰能量小于第一预定值时,以第一光功率发射激光;1102: When the infrared interference energy is less than the first predetermined value, emit laser light at the first optical power;
1103:在红外干扰能量大于第二预定值时,根据红外干扰能量确定对应的子光功率;及1103: When the infrared interference energy is greater than the second predetermined value, determine the corresponding sub-light power according to the infrared interference energy; and
1104:以子光功率发射激光。1104: Launch laser with sub-optical power.
请参阅图1及图11,在某些实施方式中,处理器12还用于根据红外干扰能量确定对应的子 光功率。光发射器111还用于以子光功率发射激光。也即是说,步骤1103和步骤1104可以为以第二光功率发射激光的子步骤,且步骤1103可以由处理器12实现,步骤1104可以由光发射器111实现。Referring to Fig. 1 and Fig. 11, in some embodiments, the processor 12 is further configured to determine the corresponding sub-light power according to the infrared interference energy. The optical transmitter 111 is also used to emit laser light with sub-optical power. In other words, step 1103 and step 1104 may be sub-steps of emitting laser light at the second optical power, and step 1103 may be implemented by the processor 12, and step 1104 may be implemented by the light transmitter 111.
其中,图11中的步骤1101及步骤1102的内容及具体实施细节,可以参照本申请说明书中对步骤301及步骤302的描述,在此不再赘述。For the content and specific implementation details of step 1101 and step 1102 in FIG. 11, reference may be made to the description of step 301 and step 302 in the specification of this application, which will not be repeated here.
具体地,第二光功率包括一个或多个子光功率,当第二光功率仅包括一个子光功率时,只要处理器12判断当前场景的红外干扰能量大于第二预定值,不管红外干扰能量是多少,均使用该子光功率以发射激光。例如,该子光功率为深度相机11在室外强光环境下也可以获取到准确地深度图像所需的光功率。当室外环境光较弱时(如阴天、黄昏等),若依旧使用该子光功率发射激光,虽然可以获取到准确地深度图像,但大部分功率被浪费了,功耗较大。Specifically, the second optical power includes one or more sub-optical powers. When the second optical power includes only one sub-optical power, as long as the processor 12 determines that the infrared interference energy of the current scene is greater than the second predetermined value, regardless of whether the infrared interference energy is How much, use this sub-optical power to emit laser light. For example, the sub-light power is the light power required by the depth camera 11 to obtain an accurate depth image even in an outdoor strong light environment. When the outdoor ambient light is weak (such as cloudy, dusk, etc.), if the sub-light power is still used to emit the laser, although an accurate depth image can be obtained, most of the power is wasted and the power consumption is high.
当第二光功率包括多个子光功率时,在当前场景的红外干扰能量大于第二预定值时,处理器12可根据红外干扰能量的大小确定对应的子光功率,例如不同红外干扰能量对应不同的子光功率,从而处理器12可根据红外干扰能量的大小控制光发射器111以对应的子光功率发射激光。When the second optical power includes multiple sub-optical powers, when the infrared interference energy of the current scene is greater than the second predetermined value, the processor 12 may determine the corresponding sub-optical power according to the magnitude of the infrared interference energy, for example, different infrared interference energies correspond to different Therefore, the processor 12 can control the light emitter 111 to emit laser light at the corresponding sub-light power according to the magnitude of the infrared interference energy.
在一个例子中,第二光功率包括第一子光功率、第二子光功率、第三子光功率、和第四子光功率,其中,第一子光功率对应的红外干扰能量的范围为第二预定值a至第三预定值b,第二子光功率对应的红外干扰能量的范围为第三预定值b至第四预定值c,第三子光功率对应的红外干扰能量的范围为第四预定值c至第五预定值d,第四子光功率对应的红外干扰能量的范围为大于第五预定值d。其中,第二预定值a至第五预定值d依次增大。子光功率与红外干扰能量的对应关系如下表1所示:In an example, the second optical power includes a first sub-optical power, a second sub-optical power, a third sub-optical power, and a fourth sub-optical power, where the range of the infrared interference energy corresponding to the first sub-optical power is The second predetermined value a to the third predetermined value b, the range of the infrared interference energy corresponding to the second sub-light power is the third predetermined value b to the fourth predetermined value c, and the range of the infrared interference energy corresponding to the third sub-light power is From the fourth predetermined value c to the fifth predetermined value d, the range of the infrared interference energy corresponding to the fourth sub-light power is greater than the fifth predetermined value d. Among them, the second predetermined value a to the fifth predetermined value d increase sequentially. The corresponding relationship between sub-optical power and infrared interference energy is shown in Table 1 below:
表1Table 1
子光功率Sub-optical power 红外干扰能量范围Infrared interference energy range
第一子光功率First sub optical power [a,b][a,b]
第二子光功率Second sub optical power (b,c](b,c)
第三子光功率Third sub optical power (c,d](c,d)
第四子光功率Fourth sub optical power (d,∞)(d,∞)
其中,第二预定值和第六预定值可分别为室外强光环境下和弱光环境下检测得到的平均红外干扰能量,第三预定值至第五预定值根据第二预定值和第六预定值的差值确定,例如第二预定值a为200,第五预定值d为800,则第二预定值a至第五预定值d分别为200、400、600和800,将200至800的红外干扰能量分为4个档位。当红外干扰能量处于[a,b](即,[200,400])时,光发射器111以第一子光功率发射激光;当红外干扰能量处于(b,c](即,(400,600])时,光发射器111以第二子光功率发射激光;当红外干扰能量处于(c,d](即,(600,800])时,光发射器111以第三子光功率发射激光;当红外干扰能量处于(d,∞)(即,(800,∞))时,光发射器111以第四子光功率发射激光。如此,可实现光功率的精细化调节,使得每个红外干扰能量均有对应的子光功率,保证深度相机11以对应的子光功率发射激光时,获取深度图像的精度较高且光功率较小。Wherein, the second predetermined value and the sixth predetermined value may be the average infrared interference energy detected in an outdoor strong light environment and a weak light environment, respectively, and the third predetermined value to the fifth predetermined value are based on the second predetermined value and the sixth predetermined value. For example, if the second predetermined value a is 200 and the fifth predetermined value d is 800, the second predetermined value a to the fifth predetermined value d are respectively 200, 400, 600, and 800, and the value of 200 to 800 The infrared interference energy is divided into 4 gears. When the infrared interference energy is at [a,b] (ie, [200,400]), the light transmitter 111 emits laser light at the first sub-optical power; when the infrared interference energy is at (b,c] (ie, (400,600)) , The optical transmitter 111 emits laser light at the second sub-optical power; when the infrared interference energy is at (c, d) (ie, (600,800)), the optical transmitter 111 emits laser light at the third sub-optical power; when the infrared interference energy At (d, ∞) (ie, (800, ∞)), the optical transmitter 111 emits laser light at the fourth sub-optical power. In this way, fine adjustment of the optical power can be achieved, so that each infrared interference energy has a corresponding When the depth camera 11 emits laser light with the corresponding sub-light power, it is guaranteed that the depth image can be obtained with high precision and low optical power.
请参阅图12,本申请还提供一种包含计算机可读指令202的非易失性计算机可读存储介质200。计算机可读指令202被处理器12执行时,使得处理器12执行上述任意一项实施方式的调节方法。处理器12可以是图1及图2中的处理器12。Referring to FIG. 12, the present application also provides a non-volatile computer-readable storage medium 200 containing computer-readable instructions 202. When the computer-readable instruction 202 is executed by the processor 12, the processor 12 executes the adjustment method of any one of the foregoing embodiments. The processor 12 may be the processor 12 in FIGS. 1 and 2.
例如,请结合图3,计算机可读指令202被处理器12执行时,使得处理器12执行以下步骤:For example, referring to FIG. 3, when the computer-readable instruction 202 is executed by the processor 12, the processor 12 is caused to perform the following steps:
301:获取当前场景的红外干扰能量;301: Obtain the infrared interference energy of the current scene;
302:在红外干扰能量小于第一预定值时,控制光发射器111以第一光功率发射激光;及302: When the infrared interference energy is less than the first predetermined value, control the light transmitter 111 to emit laser light at the first light power; and
303:在红外干扰能量大于第二预定值时,控制光发射器111以第二光功率发射激光,第一预定值小于第二预定值,第二光功率大于第一光功率。303: When the infrared interference energy is greater than the second predetermined value, control the optical transmitter 111 to emit laser light at the second optical power, the first predetermined value is less than the second predetermined value, and the second optical power is greater than the first optical power.
再例如,请结合图3,计算机可读指令202被处理器12执行时,使得处理器12执行以下步骤:For another example, referring to FIG. 3, when the computer-readable instruction 202 is executed by the processor 12, the processor 12 is caused to perform the following steps:
601:在未发射激光时,获取当前场景的红外图像;601: Acquire an infrared image of the current scene when the laser is not emitted;
602:根据红外图像计算红外干扰能量;602: Calculate infrared interference energy based on infrared images;
603:在红外干扰能量小于第一预定值时,控制光发射器111以第一光功率发射激光;及603: When the infrared interference energy is less than the first predetermined value, control the light transmitter 111 to emit laser light at the first light power; and
604:在红外干扰能量大于第二预定值时,控制光发射器111以第二光功率发射激光,第一预定值小于第二预定值,第二光功率大于第一光功率。604: When the infrared interference energy is greater than the second predetermined value, control the optical transmitter 111 to emit laser light at the second optical power, the first predetermined value is less than the second predetermined value, and the second optical power is greater than the first optical power.
再例如,请结合图3,计算机可读指令202被处理器12执行时,使得处理器12执行以下步骤:For another example, referring to FIG. 3, when the computer-readable instruction 202 is executed by the processor 12, the processor 12 is caused to perform the following steps:
6021:获取红外图像中的像素的像素值;及6021: Obtain the pixel value of the pixel in the infrared image; and
6022:根据像素值确定红外干扰能量。6022: Determine the infrared interference energy according to the pixel value.
再例如,请结合图3,计算机可读指令202被处理器12执行时,使得处理器12执行以下步骤:For another example, referring to FIG. 3, when the computer-readable instruction 202 is executed by the processor 12, the processor 12 is caused to perform the following steps:
701:控制光发射器111以第一工作频率发射激光;701: Control the light transmitter 111 to emit laser light at the first operating frequency;
702:控制光接收器112以第二工作频率接收激光并生成红外图像,第二频率大于第一频率;702: Control the optical receiver 112 to receive laser light and generate an infrared image at a second operating frequency, where the second frequency is greater than the first frequency;
703:获取红外图像中不包括第一工作频率的激光的红外干扰图像;703: Acquire an infrared interference image that does not include the laser at the first operating frequency in the infrared image;
704:根据红外干扰图像计算红外干扰能量;704: Calculate infrared interference energy based on infrared interference images;
705:在红外干扰能量小于第一预定值时,控制光发射器111以第一光功率发射激光;及705: When the infrared interference energy is less than the first predetermined value, control the light transmitter 111 to emit laser light at the first light power; and
706:在红外干扰能量大于第二预定值时,控制光发射器111以第二光功率发射激光,第一预定值小于第二预定值。706: When the infrared interference energy is greater than the second predetermined value, control the optical transmitter 111 to emit laser light with the second optical power, and the first predetermined value is less than the second predetermined value.
再例如,请结合图3,计算机可读指令202被处理器12执行时,使得处理器12执行以下步骤:For another example, referring to FIG. 3, when the computer-readable instructions 202 are executed by the processor 12, the processor 12 is caused to perform the following steps:
901:获取当前场景的红外干扰能量;901: Obtain the infrared interference energy of the current scene;
902:在红外干扰能量小于第一预定值时,控制光发射器111以第一频率、第一脉宽和第一光功率发射激光;902: When the infrared interference energy is less than the first predetermined value, control the optical transmitter 111 to emit laser light with the first frequency, the first pulse width and the first optical power;
903:在红外干扰能量大于第二预定值时,控制光发射器111以第二频率、第二脉宽和第二光功率发射激光,第二频率、第二脉宽和第二光功率的乘积小于或等于第一频率、第一脉宽和第一光功率的乘积。903: When the infrared interference energy is greater than the second predetermined value, control the optical transmitter 111 to emit laser at the second frequency, the second pulse width and the second optical power, the product of the second frequency, the second pulse width and the second optical power It is less than or equal to the product of the first frequency, the first pulse width and the first optical power.
再例如,请结合图3,计算机可读指令202被处理器12执行时,使得处理器12执行以下步骤:For another example, referring to FIG. 3, when the computer-readable instructions 202 are executed by the processor 12, the processor 12 is caused to perform the following steps:
1001:获取当前场景的红外干扰能量;1001: Obtain the infrared interference energy of the current scene;
1002:在红外干扰能量小于第一预定值时,控制光发射器111以第一光功率发射激光;及1002: When the infrared interference energy is less than the first predetermined value, control the light transmitter 111 to emit laser light at the first light power; and
1003:在红外干扰能量大于第二预定值时,控制光发射器111以第二光功率发射激光;及1003: When the infrared interference energy is greater than the second predetermined value, control the optical transmitter 111 to emit laser light at the second optical power; and
1004:在红外干扰能量大于第一预定值且小于第二预定值时,控制光发射器111保持当前光功率以持续发射激光。1004: When the infrared interference energy is greater than the first predetermined value and less than the second predetermined value, control the optical transmitter 111 to maintain the current optical power to continuously emit laser light.
再例如,请结合图3,计算机可读指令202被处理器12执行时,使得处理器12执行以下步骤:For another example, referring to FIG. 3, when the computer-readable instruction 202 is executed by the processor 12, the processor 12 is caused to perform the following steps:
1101:获取当前场景的红外干扰能量;1101: Obtain the infrared interference energy of the current scene;
1102:在红外干扰能量小于第一预定值时,控制光发射器111以第一光功率发射激光;1102: When the infrared interference energy is less than the first predetermined value, control the optical transmitter 111 to emit laser light at the first optical power;
1103:在红外干扰能量大于第二预定值时,根据红外干扰能量确定对应的子光功率;及1103: When the infrared interference energy is greater than the second predetermined value, determine the corresponding sub-light power according to the infrared interference energy; and
1104:控制光发射器111以子光功率发射激光。1104: Control the light emitter 111 to emit laser light with sub-light power.
在本说明书的描述中,参考术语“某些实施方式”、“一个实施方式”、“一些实施方式”、“示意性实施方式”、“示例”、“具体示例”、或“一些示例”的描述意指结合所述实施方式或示例描述的具体特征、结构、材料或者特点包含于本申请的至少一个实施方式或示例中。在本说明书中,对上述术语的示意性表述不一定指的是相同的实施方式或示例。而且,描述的具体特征、结构、材料或者特点可以在任何的一个或多个实施方式或示例中以合适的方式结合。In the description of this specification, reference is made to the terms “certain embodiments”, “one embodiment”, “some embodiments”, “exemplary embodiments”, “examples”, “specific examples”, or “some examples”. The description means that a specific feature, structure, material, or characteristic described in conjunction with the embodiment or example is included in at least one embodiment or example of the present application. In this specification, the schematic representations of the above-mentioned terms do not necessarily refer to the same embodiment or example. Moreover, the described specific features, structures, materials, or characteristics can be combined in any one or more embodiments or examples in an appropriate manner.
此外,术语“第一”、“第二”仅用于描述目的,而不能理解为指示或暗示相对重要性或者隐含指明所指示的技术特征的数量。由此,限定有“第一”、“第二”的特征可以明示或者隐含地包括至少一个所述特征。在本申请的描述中,“多个”的含义是至少两个,例如两个,三个,除非另有明确具体的限定。In addition, the terms "first" and "second" are only used for descriptive purposes, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of indicated technical features. Therefore, the features defined with "first" and "second" may explicitly or implicitly include at least one of the features. In the description of the present application, "plurality" means at least two, such as two or three, unless otherwise specifically defined.
尽管上面已经示出和描述了本申请的实施例,可以理解的是,上述实施例是示例性的,不能理解为对本申请的限制,本领域的普通技术人员在本申请的范围内可以对上述实施例进行变化、 修改、替换和变型,本申请的范围由权利要求及其等同物限定。Although the embodiments of the present application have been shown and described above, it can be understood that the above-mentioned embodiments are exemplary and should not be construed as limiting the present application. A person of ordinary skill in the art can comment on the foregoing within the scope of the present application. The embodiments are subject to changes, modifications, substitutions and modifications, and the scope of the application is defined by the claims and their equivalents.

Claims (20)

  1. 一种调节方法,其特征在于,包括:An adjustment method, characterized in that it comprises:
    获取当前场景的红外干扰能量;Obtain the infrared interference energy of the current scene;
    在所述红外干扰能量小于第一预定值时,以第一光功率发射激光;及When the infrared interference energy is less than the first predetermined value, emit laser light at the first optical power; and
    在所述红外干扰能量大于第二预定值时,以第二光功率发射激光,所述第一预定值小于所述第二预定值,所述第二光功率大于所述第一光功率。When the infrared interference energy is greater than a second predetermined value, laser light is emitted with a second optical power, the first predetermined value is less than the second predetermined value, and the second optical power is greater than the first optical power.
  2. 根据权利要求1所述的调节方法,其特征在于,所述获取当前场景的红外干扰能量包括:The adjustment method according to claim 1, wherein said obtaining infrared interference energy of the current scene comprises:
    在未发射激光时,获取当前场景的红外图像;及Get an infrared image of the current scene when the laser is not emitted; and
    根据所述红外图像计算所述红外干扰能量。The infrared interference energy is calculated according to the infrared image.
  3. 根据权利要求2所述的调节方法,其特征在于,所述根据所述红外图像计算所述红外干扰能量,包括:The adjustment method according to claim 2, wherein the calculating the infrared interference energy according to the infrared image comprises:
    获取所述红外图像中的像素的像素值;及Acquiring the pixel value of the pixel in the infrared image; and
    根据所述像素值确定所述红外干扰能量。The infrared interference energy is determined according to the pixel value.
  4. 根据权利要求1所述的调节方法,其特征在于,所述获取当前场景的红外干扰能量包括:The adjustment method according to claim 1, wherein said obtaining the infrared interference energy of the current scene comprises:
    以第一工作频率发射激光;Launch laser at the first operating frequency;
    以第二工作频率接收激光并生成红外图像,所述第二频率大于所述第一频率;Receiving laser light at a second operating frequency and generating an infrared image, the second frequency being greater than the first frequency;
    获取所述红外图像中不包括所述第一工作频率的激光的红外干扰图像;及Acquiring an infrared interference image that does not include the laser of the first operating frequency in the infrared image; and
    根据所述红外干扰图像计算所述红外干扰能量。The infrared interference energy is calculated according to the infrared interference image.
  5. 根据权利要求1所述的调节方法,其特征在于,所述以第一光功率发射激光,包括:The adjusting method according to claim 1, wherein the emitting laser light at the first optical power comprises:
    以第一频率、第一脉宽和所述第一光功率发射激光;Emitting laser light with a first frequency, a first pulse width and the first optical power;
    所述以第二光功率发射激光,包括:The emitting laser light at the second optical power includes:
    以第二频率、第二脉宽和所述第二光功率发射激光,所述第二频率、所述第二脉宽和所述第二光功率的乘积小于或等于所述第一频率、所述第一脉宽和所述第一光功率的乘积。The laser is emitted at a second frequency, a second pulse width, and the second optical power, and the product of the second frequency, the second pulse width, and the second optical power is less than or equal to the first frequency and the second optical power. The product of the first pulse width and the first optical power.
  6. 根据权利要求1所述的调节方法,其特征在于,所述调节方法还包括:The adjustment method according to claim 1, wherein the adjustment method further comprises:
    在所述红外干扰能量大于所述第一预定值且小于所述第二预定值时,保持当前光功率以持续发射激光。When the infrared interference energy is greater than the first predetermined value and less than the second predetermined value, the current optical power is maintained to continuously emit laser light.
  7. 根据权利要求1所述的调节方法,其特征在于,所述第二光功率包括一个或多个子光功率,所述以第二光功率发射激光,包括:The adjustment method according to claim 1, wherein the second optical power includes one or more sub-optical powers, and the emitting laser at the second optical power includes:
    根据所述红外干扰能量确定对应的所述子光功率;及Determining the corresponding sub-light power according to the infrared interference energy; and
    以所述子光功率发射激光。The laser light is emitted at the sub-light power.
  8. 根据权利要求1所述的调节方法,其特征在于,所述获取当前场景的红外干扰能量,包括:The adjustment method according to claim 1, wherein the obtaining infrared interference energy of the current scene comprises:
    对预定时间内接收红外光产生的电压值进行积分,以得到所述红外干扰能量对应的总电压值;及Integrating the voltage value generated by receiving infrared light within a predetermined time to obtain the total voltage value corresponding to the infrared interference energy; and
    根据所述总电压值确定所述红外干扰能量。The infrared interference energy is determined according to the total voltage value.
  9. 根据权利要求8所述的调节方法,其特征在于,所述预定时间等于帧曝光时间,所述帧曝光时间为生成一帧散斑图像时所需接收红外光的时间。8. The adjustment method according to claim 8, wherein the predetermined time is equal to the frame exposure time, and the frame exposure time is the time required to receive infrared light when generating a frame of speckle image.
  10. 一种终端,其特征在于,包括:A terminal, characterized in that it comprises:
    处理器,用于获取当前场景的红外干扰能量;A processor for obtaining the infrared interference energy of the current scene;
    光发射器,用于在所述红外干扰能量小于第一预定值时,以第一光功率发射激光、及在所述红外干扰能量大于第二预定值时,以第二光功率发射激光,所述第一预定值小于或等于所述第二预定值,所述第二光功率大于所述第一光功率。An optical transmitter for emitting laser light at a first optical power when the infrared interference energy is less than a first predetermined value, and emitting laser light at a second optical power when the infrared interference energy is greater than a second predetermined value, so The first predetermined value is less than or equal to the second predetermined value, and the second optical power is greater than the first optical power.
  11. 根据权利要求10所述的终端,其特征在于,所述终端还包括光接收器,所述光接收器用于在所述光发射器未发射激光时,获取当前场景的红外图像;所述处理器用于根据所述红外图像计算所述红外干扰能量。The terminal according to claim 10, wherein the terminal further comprises an optical receiver, the optical receiver is used to obtain an infrared image of the current scene when the optical transmitter does not emit laser light; Calculating the infrared interference energy according to the infrared image.
  12. 根据权利要求11所述的终端,其特征在于,所述处理器还用于:The terminal according to claim 11, wherein the processor is further configured to:
    获取所述红外图像中的像素的像素值;及Acquiring the pixel value of the pixel in the infrared image; and
    根据所述像素值确定所述红外干扰能量。The infrared interference energy is determined according to the pixel value.
  13. 根据权利要求10所述的终端,其特征在于,所述终端还包括光接收器,所述光发射器还用于以第一工作频率发射激光;所述光接收器用于以第二工作频率接收激光并生成红外图像,所述第二频率大于所述第一频率;所述处理器用于获取所述红外图像中不包括所述第一工作频率的激光的红外干扰图像、及根据所述红外干扰图像计算所述红外干扰能量。The terminal according to claim 10, wherein the terminal further comprises an optical receiver, the optical transmitter is also used to emit laser light at a first operating frequency; the optical receiver is used to receive laser light at a second operating frequency Laser and generate an infrared image, the second frequency is greater than the first frequency; the processor is used to obtain an infrared interference image of the laser that does not include the first operating frequency in the infrared image, and according to the infrared interference The image calculates the infrared interference energy.
  14. 根据权利要求10所述的终端,其特征在于,所述光发射器还用于以第一频率、第一脉宽和所述第一光功率发射激光、及以第二频率、第二脉宽和所述第二光功率发射激光;所述第二频率、所述第二脉宽和所述第二光功率的乘积小于或等于所述第一频率、所述第一脉宽和所述第一光功率的乘积。The terminal according to claim 10, wherein the optical transmitter is further configured to emit laser light at a first frequency, a first pulse width, and the first optical power, and to emit laser light at a second frequency, a second pulse width And the second optical power emitting laser; the product of the second frequency, the second pulse width and the second optical power is less than or equal to the first frequency, the first pulse width and the first A product of optical power.
  15. 根据权利要求10所述的终端,其特征在于,所述光发射器还用于在所述红外干扰能量大于所述第一预定值且小于所述第二预定值时,保持当前光功率以持续发射激光。The terminal according to claim 10, wherein the optical transmitter is further configured to maintain the current optical power to continue when the infrared interference energy is greater than the first predetermined value and less than the second predetermined value. Launch laser.
  16. 根据权利要求10所述的终端,其特征在于,所述第二光功率包括一个或多个子光功率,所述终端还包括处理器,所述处理器用于根据所述红外干扰能量确定对应的所述子光功率;所述光发射器还用于以所述子光功率发射激光。The terminal according to claim 10, wherein the second optical power comprises one or more sub-optical powers, and the terminal further comprises a processor, and the processor is configured to determine the corresponding all the power according to the infrared interference energy. The sub-optical power; the optical transmitter is also used to emit laser light with the sub-optical power.
  17. 根据权利要求10所述的终端,其特征在于,所述终端还包括距离传感器,所述距离传感器包括红外接收器,所述红外接收器用于接收红外光以产生对应的电压值,所述处理器还用于对预定时间内所述红外接收器接收红外光产生的电压值进行积分,以得到所述红外干扰能量对应的总电压值;及根据所述总电压值确定所述红外干扰能量。The terminal according to claim 10, wherein the terminal further comprises a distance sensor, the distance sensor comprises an infrared receiver, the infrared receiver is configured to receive infrared light to generate a corresponding voltage value, and the processor It is also used to integrate the voltage value generated by the infrared receiver receiving infrared light within a predetermined time to obtain the total voltage value corresponding to the infrared interference energy; and determine the infrared interference energy according to the total voltage value.
  18. 根据权利要求17所述的终端,其特征在于,所述终端还包括光接收器,所述预定时间等于所述光接收器的帧曝光时间,所述帧曝光时间为生成一帧散斑图像时,所述光接收器所需接收红外光的时间。The terminal according to claim 17, wherein the terminal further comprises a light receiver, the predetermined time is equal to the frame exposure time of the light receiver, and the frame exposure time is when one frame of speckle image is generated , The time required for the light receiver to receive infrared light.
  19. 根据权利要求11所述的终端,其特征在于,所述终端包括可见光相机,所述可见光相机位于所述光发射器与所述光接收器之间。The terminal according to claim 11, wherein the terminal comprises a visible light camera, and the visible light camera is located between the light transmitter and the light receiver.
  20. 一种包含计算机可读指令的非易失性计算机可读存储介质,所述计算机可读指令被处理器执行时,使得所述处理器执行权利要求1-9任意一项所述的调节方法。A non-volatile computer-readable storage medium containing computer-readable instructions, which when executed by a processor, cause the processor to execute the adjustment method according to any one of claims 1-9.
PCT/CN2020/094445 2019-06-10 2020-06-04 Adjustment method, terminal, and computer-readable storage medium WO2020248896A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910496583.4 2019-06-10
CN201910496583.4A CN110266394B (en) 2019-06-10 2019-06-10 Adjusting method, terminal and computer readable storage medium

Publications (1)

Publication Number Publication Date
WO2020248896A1 true WO2020248896A1 (en) 2020-12-17

Family

ID=67917322

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/094445 WO2020248896A1 (en) 2019-06-10 2020-06-04 Adjustment method, terminal, and computer-readable storage medium

Country Status (2)

Country Link
CN (1) CN110266394B (en)
WO (1) WO2020248896A1 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110266394B (en) * 2019-06-10 2021-08-31 Oppo广东移动通信有限公司 Adjusting method, terminal and computer readable storage medium
CN112650407A (en) * 2019-10-11 2021-04-13 北京小米移动软件有限公司 Display screen and electronic equipment
CN110944135B (en) * 2019-11-18 2022-05-31 深圳前海达闼云端智能科技有限公司 Power control method, electronic device and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090299675A1 (en) * 2008-06-03 2009-12-03 Nonin Medical, Inc. Led control utilizing ambient light or signal quality
US20150002734A1 (en) * 2013-07-01 2015-01-01 Motorola Mobility Llc Electronic Device with Modulated Light Flash Operation for Rolling Shutter Image Sensor
US20150373322A1 (en) * 2014-06-20 2015-12-24 Qualcomm Incorporated Automatic multiple depth cameras synchronization using time sharing
CN105763803A (en) * 2016-02-29 2016-07-13 广东欧珀移动通信有限公司 Control method and device and electronic device
CN109839639A (en) * 2019-02-27 2019-06-04 宁波舜宇车载光学技术有限公司 Laser radar and the laser radar system and its detection method for reducing ambient light interference
CN110266394A (en) * 2019-06-10 2019-09-20 Oppo广东移动通信有限公司 Adjusting method, terminal and computer readable storage medium

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106296716A (en) * 2016-08-24 2017-01-04 深圳奥比中光科技有限公司 The power regulating method of light source, depth measurement method and device
WO2018133122A1 (en) * 2017-01-23 2018-07-26 深圳市大疆创新科技有限公司 Control method, unmanned aerial vehicle, and remote-control device
CN107896274B (en) * 2017-10-27 2020-08-21 Oppo广东移动通信有限公司 Infrared emitter control method, terminal and computer readable storage medium
CN109324633B (en) * 2018-09-27 2021-07-02 Oppo广东移动通信有限公司 Control method and device, time-of-flight device, terminal and computer-readable storage medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090299675A1 (en) * 2008-06-03 2009-12-03 Nonin Medical, Inc. Led control utilizing ambient light or signal quality
US20150002734A1 (en) * 2013-07-01 2015-01-01 Motorola Mobility Llc Electronic Device with Modulated Light Flash Operation for Rolling Shutter Image Sensor
US20150373322A1 (en) * 2014-06-20 2015-12-24 Qualcomm Incorporated Automatic multiple depth cameras synchronization using time sharing
CN105763803A (en) * 2016-02-29 2016-07-13 广东欧珀移动通信有限公司 Control method and device and electronic device
CN109839639A (en) * 2019-02-27 2019-06-04 宁波舜宇车载光学技术有限公司 Laser radar and the laser radar system and its detection method for reducing ambient light interference
CN110266394A (en) * 2019-06-10 2019-09-20 Oppo广东移动通信有限公司 Adjusting method, terminal and computer readable storage medium

Also Published As

Publication number Publication date
CN110266394A (en) 2019-09-20
CN110266394B (en) 2021-08-31

Similar Documents

Publication Publication Date Title
WO2020248896A1 (en) Adjustment method, terminal, and computer-readable storage medium
EP2622847B1 (en) Integrated low power depth camera and projection device
TWI713547B (en) Method and apparatus for determining a depth map for an image
CN107743590B (en) Method and apparatus for performing exposure estimation using time-of-flight sensor
WO2020259334A1 (en) Adjustment method, adjustment apparatus, terminal and computer-readable storage medium
JP2018119942A (en) Imaging device, method of monitoring the same, and program
US11030946B1 (en) Ambient brightness detection method, electronic device, detection apparatus and storage medium
WO2019165956A1 (en) Control method, control apparatus, terminal, computer device, and storage medium
KR102599609B1 (en) Control method and electronic device of electronic device
US20210084280A1 (en) Image-Acquisition Method and Image-Capturing Device
US10616561B2 (en) Method and apparatus for generating a 3-D image
US20200372663A1 (en) Depth Cameras, Electronic Devices, and Image Acquisition Methods
US10877238B2 (en) Bokeh control utilizing time-of-flight sensor to estimate distances to an object
WO2018121185A1 (en) Method for adjusting power of infrared lamp, and photographic equipment
US10313586B2 (en) Electronic apparatus, method for controlling the same, and storage medium
US11947045B2 (en) Controlling method for electronic device, and electronic device
CN110072044B (en) Depth camera control method and device, terminal and readable storage medium
WO2020238481A1 (en) Image acquisition method, image acquisition device, electronic device and readable storage medium
CN109981993B (en) Depth camera projector power consumption control method and application thereof
WO2022181097A1 (en) Distance measurement device, method for controlling same, and distance measurement system
WO2020237657A1 (en) Control method for electronic device, electronic device, and computer-readable storage medium
WO2023087948A1 (en) Projection device and display control method

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20822315

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20822315

Country of ref document: EP

Kind code of ref document: A1