Methods, systems, devices, and media for tof camera auto exposure

By generating exposure indicators to adjust the exposure time of the TOF camera, the problem of improper exposure of the TOF camera under different ambient light conditions is solved, and the accuracy and working distance range of the depth image are improved.

CN115250332BActive Publication Date: 2025-10-17SHENZHEN GUANGJIAN TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202110452071.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-04-26
Publication Date
2025-10-17
Estimated Expiration
2041-04-26

AI Technical Summary

Technical Problem

Existing TOF cameras are prone to overexposure when the ambient light is extremely strong or when imaging at close range, and the signal-to-noise ratio decreases when imaging at long distances, resulting in poor depth image quality.

Method used

By acquiring the pixel values ​​and amplitude values ​​of the infrared image, the first and second exposure indices are generated, the exposure status is judged according to these indices, and the exposure time is adjusted to prevent overexposure or underexposure, including setting upper and lower thresholds to adjust the exposure time.

Benefits of technology

It effectively prevents overexposure and underexposure of the image, improves the accuracy and working distance range of the depth map, and ensures the quality of the depth image.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115250332B_ABST
    Figure CN115250332B_ABST
Patent Text Reader

Abstract

The application provides a kind of for TOF camera automatic exposure method, system, equipment and medium, comprising the following steps: obtaining the infrared image of target;Infrared image is generated by TOF camera to a target continuous acquisition;Obtain first exposure index, first exposure index is generated according to the proportion of pixel value in each infrared image exceeding the first pixel value threshold set in advance;Second exposure index is obtained, and second exposure index is generated according to the amplitude value mean of each infrared image;According to first exposure index, the upper limit pixel threshold corresponding to the first exposure index, lower limit pixel threshold and second exposure index, the amplitude threshold corresponding to the second exposure index, the exposure state of each infrared image is judged, and the exposure time of TOF camera is adjusted according to exposure state.The application can quickly adjust the exposure time to the appropriate range, prevent overexposure and underexposure, and can improve the accuracy and working distance range of depth map.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to depth camera, in particular, to a method, system, device and medium for automatic exposure of TOF camera. BACKGROUND

[0002] Time of flight (TOF) depth camera calculates the distance by emitting a floodlight beam of a specific wave band, receiving the reflected light beam of the object in the measured space by the sensor and measuring the flight time of the light beam in the space, so as to obtain the depth image of the measured space. The TOF depth camera can obtain the gray scale image and the depth image at the same time, and is widely used in the technical fields of 3D depth vision related gesture recognition, face recognition, 3D modeling, motion sensing game, machine vision, auxiliary focusing, security, automatic driving and the like.

[0003] The TOF camera as a device capable of outputting depth map has also been widely studied. The principle of the TOF camera is to calculate the distance of the photographed object from the camera by calculating the phase difference between the emitted infrared light and the received infrared light. In order to improve the accuracy, four different phase sine waves are usually used to correlate with the received light, and then the depth value is calculated. The correlation operation is essentially an integral operation in the circuit, and the integral time is called exposure time.

[0004] Most of the TOF cameras on the market do not have the function of automatic exposure, so that when the environmental light is abnormally strong or close-range imaging, a large range of overexposure phenomenon occurs in the picture, causing depth abnormality; and when long-distance imaging, the picture is underexposed, resulting in a serious decrease in signal-to-noise ratio, and even the depth value is directly missing. SUMMARY

[0005] In view of the defects in the prior art, the purpose of the present application is to provide a method, system, device and medium for automatic exposure of TOF camera.

[0006] The method for automatic exposure of TOF camera provided by the present application comprises the following steps:

[0007] Step S1: acquiring an infrared image of a target; the infrared image is generated by continuously collecting a target by a TOF camera;

[0008] Step S2: acquiring a first exposure index, the first exposure index being generated according to the proportion of the pixel value in each infrared image exceeding a pre-set first pixel value threshold;

[0009] Step S3: acquiring a second exposure index, the second exposure index being generated according to the mean value of the amplitude value of each infrared image;

[0010] Step S4: judging exposure state of each of the infrared images according to the first exposure index, the upper limit pixel threshold corresponding to the first exposure index, the lower limit pixel threshold, and the second exposure index, the amplitude threshold corresponding to the second exposure index, and adjusting exposure time of the TOF camera according to the exposure state.

[0011] Preferably, the step S1 comprises the following steps:

[0012] The step S1 comprises the following steps:

[0013] Step S101: projecting infrared floodlight to the target through a light projector of the TOF camera;

[0014] Step S102: generating infrared image by receiving the infrared floodlight reflected by the target through a light receiving sensor of the TOF camera;

[0015] Step S103: generating depth data of the target according to phase difference of multiple frames of infrared images by a processor of the TOF.

[0016] Preferably, the step S2 comprises the following steps:

[0017] Step S201: acquiring pixel value of each pixel in each of the infrared images;

[0018] Step S202: judging whether the pixel value of each pixel exceeds a pre-set first pixel value threshold to determine number of overexposed pixels in each of the infrared images;

[0019] Step S203: acquiring total number of pixels in each of the infrared images, and generating the first exposure index according to the number of overexposed pixels and the total number of pixels.

[0020] Preferably, the step S3 comprises the following steps:

[0021] Step S301: acquiring amplitude value of each pixel in each of the infrared images;

[0022] Step S302: accumulating amplitude values of the pixels in the infrared images to generate amplitude sum;

[0023] Step S303: acquiring total number of pixels in each of the infrared images, and generating the second exposure index according to the amplitude sum and the total number of pixels.

[0024] Preferably, the step S4 comprises the following steps:

[0025] Step S401: acquiring pre-set upper limit pixel threshold and lower limit pixel threshold;

[0026] Step S402: determining that the infrared image is overexposed when the first exposure index is greater than the upper limit pixel threshold, and determining that the infrared image is underexposed when the first exposure index is less than the lower limit pixel threshold and the second exposure index is less than the amplitude threshold;

[0027] Step S403: reducing the exposure time of the infrared image of the next frame when the infrared image is overexposed, and increasing the exposure time when the infrared image is underexposed.

[0028] Preferably, in step S403, the exposure time of the infrared image of the next frame is :

[0029] ;

[0030] wherein, the value is 0.9, is the exposure time of the current frame, is the upper limit pixel threshold, is the first exposure index, is the second exposure index; is the exposure variation time when overexposed, is the exposure variation time when underexposed,

[0031] ;

[0032] wherein, is the first exposure index and is the slope of the fitted straight line, is calculated in advance,

[0033] ;

[0034] wherein, is the second exposure index and is the slope of the fitted straight line, is calculated in advance.

[0035] Preferably, the first exposure index is generated according to the proportion of the pixel value of the ROI region in each infrared image exceeding the pre-set first pixel value threshold;

[0036] The second exposure index is generated according to the mean value of the amplitude value of the ROI region in each infrared image.

[0037] According to the present application, a TOF camera automatic exposure system is provided, comprising the following modules:

[0038] An infrared image acquisition module is configured to acquire an infrared image of a target; the infrared image is generated by continuously collecting a target by a TOF camera.

[0039] a first exposure index calculation module, configured to obtain a first exposure index, wherein the first exposure index is generated according to a proportion of pixel values exceeding a preset first pixel value threshold in each of the infrared images;

[0040] a second exposure index calculation module, configured to obtain a second exposure index, wherein the second exposure index is generated according to a mean value of amplitude values of each of the infrared images;

[0041] an exposure adjustment module, configured to judge an exposure state of each of the infrared images according to the first exposure index, an upper limit pixel threshold corresponding to the first exposure index, a lower limit pixel threshold, the second exposure index, and an amplitude threshold corresponding to the second exposure index, and adjust an exposure time of the TOF camera according to the exposure state.

[0042] The application provides a device for automatic exposure of a TOF camera, which comprises:

[0043] a processor;

[0044] a memory, wherein executable instructions of the processor are stored in the memory;

[0045] The processor is configured to execute the steps of the method for automatic exposure of a TOF camera by executing the executable instructions.

[0046] The application provides a computer readable storage medium for storing a program, wherein the program is executed to realize the steps of the method for automatic exposure of a TOF camera.

[0047] Compared with the prior art, the application has the following beneficial effects:

[0048] In the application, the exposure index is generated according to the mean value of the pixel values and the amplitude values in each of the infrared images, the exposure state is determined according to the exposure index, and the exposure time of the TOF camera is adjusted according to the exposure state, so that the exposure time can be quickly adjusted to a suitable range, overexposure and underexposure of the picture can be prevented, and the accuracy of the depth map and the working distance range can be improved.

[0049] In the application, the ROI region can be determined in the infrared image, the exposure index is generated according to the mean value of the pixel values and the amplitude values of the ROI region, and the accuracy of the ROI region of the depth map can be improved. BRIEF DESCRIPTION OF DRAWINGS

[0050] In order to make the technical solutions in the embodiments of the present application or the prior art clearer, the accompanying drawings needed in the embodiments or prior art description will be briefly introduced. Obviously, the accompanying drawings in the following description only need to explain the embodiments of the present application, and for those skilled in the art, other drawings can be obtained without creative work on the basis of the provided drawings. Other features, objects and advantages of the present application will become more apparent through reading the following detailed description of the non-limiting embodiments with reference to the accompanying drawings:

[0051] Figure 1 A step flow chart for the TOF camera automatic exposure method in the embodiment of the present application;

[0052] Figure 2 A step flow chart for collecting infrared images in the embodiment of the present application;

[0053] Figure 3 A step flow chart for generating the first exposure index in the embodiment of the present application;

[0054] Figure 4 A step flow chart for generating the second exposure index in the embodiment of the present application;

[0055] Figure 5 A step flow chart for adjusting the exposure time according to the exposure state in the embodiment of the present application;

[0056] Figure 6 A module schematic diagram of the TOF camera in the embodiment of the present application;

[0057] Figure 7 A module schematic diagram of the TOF camera automatic exposure system in the embodiment of the present application;

[0058] Figure 8 A structural schematic diagram of the TOF camera automatic exposure device in the embodiment of the present application;

[0059] Figure 9 A structural schematic diagram of the computer readable storage medium in the embodiment of the present application. DETAILED DESCRIPTION

[0060] The present application will be described in detail below with reference to specific embodiments. The following embodiments will help those skilled in the art to further understand the present application, but do not limit the present application in any form. It should be noted that for those skilled in the art, without departing from the concept of the present application, a number of modifications and improvements can be made. These all belong to the protection scope of the present application.

[0061] The terms "first", "second", "third", "fourth" and the like in the description and in the claims of the present application, and above-described drawings, if any, are used to distinguish between similar objects and are not necessarily used to describe a particular sequential or chronological order. It is to be understood that the use of the terms so-termed, where appropriate, can be interchanged with each other to the extent that embodiments of the application described herein can be carried out in other sequences than those depicted or described herein. Furthermore, the terms "comprising" and "having", and any variations thereof, are intended to cover a non-exclusive inclusion, for example, a process, method, system, product or apparatus that includes a list of steps or units not necessarily limited to those explicitly listed, but can include other steps or units not expressly listed or inherent to such processes, methods, products or apparatus.

[0062] The technical solutions of the present application will be described in detail below with specific examples. The following specific examples can be combined with each other, and the same or similar concepts or processes may not be described in detail in some examples.

[0063] The present application provides a TOF camera automatic exposure method, which aims to solve the problems in the prior art.

[0064] The technical solutions of the present application will be described in detail below with specific examples. The following specific examples can be combined with each other, and the same or similar concepts or processes may not be described in detail in some examples. The embodiments of the present application will be described below with reference to the accompanying drawings.

[0065] Figure 1 For the step flow chart of the TOF camera automatic exposure method in the embodiments of the present application, as shown in Figure 1 The TOF camera automatic exposure method provided by the present application comprises the following steps:

[0066] Step S1: acquiring an infrared image of a target; the infrared image is generated by continuously collecting a target by a TOF camera;

[0067] Figure 2 For the step flow chart of the TOF camera automatic exposure method in the embodiments of the present application, as shown in Figure 2 The step S1 comprises the following steps:

[0068] The step S1 comprises the following steps:

[0069] Step S101: projecting infrared floodlight to the target by the light projector of the TOF camera;

[0070] Step S102: generating an infrared image by the light receiving sensor of the TOF camera receiving the infrared floodlight reflected by the target;

[0071] Step S103: generating depth data of the target according to phase difference of multiple infrared images by a processor of the TOF.

[0072] In the embodiment of the present application, the light receiving sensor is an infrared detector, and the infrared floodlight reflected by the target person is received by the infrared detector. The infrared image can be an infrared speckle image.

[0073] The infrared image is collected by the TOF camera at a distance of 30 to 80 cm from the target person.

[0074] The TOF camera is a 4-phase TOF camera, and 4 pairs of infrared images are obtained by 4 times of exposure, and then a depth map is obtained by calculation.

[0075] Step S2: obtaining a first exposure index, the first exposure index being generated according to a proportion of pixel values in each infrared image exceeding a pre-set first pixel value threshold;

[0076] Figure 3 The step flow chart for generating the first exposure index in the embodiment of the present application is shown in Figure 3 The step S2 includes the following steps:

[0077] Step S201: obtaining a pixel value of each pixel in each infrared image;

[0078] Step S202: judging whether the pixel value of each pixel exceeds a pre-set first pixel value threshold, so as to determine a number of overexposed pixels in each infrared image;

[0079] Step S203: obtaining a total number of pixels in each infrared image, and generating the first exposure index according to the number of overexposed pixels and the total number of pixels.

[0080] In the embodiment of the present application, the first exposure index can be set as a ratio of the number of overexposed pixels to the total number of pixels.

[0081] In the embodiment of the present application, the first pixel value is represented by 10-bit binary number in a range of 0 to 1023, and therefore the first pixel value threshold can be set as 1022.

[0082] Step S3: obtaining a second exposure index, the second exposure index being generated according to an average value of amplitude of each infrared image;

[0083] In the embodiment of the present application, the amplitude can also be represented by any one of physical quantities such as gray value, pixel value, illumination, luminous flux and radiant power.

[0084] Figure 4 The flow chart of the step of generating the second exposure index in the embodiment of the present application is shown in Fig. 3, which comprises the following steps: Figure 4

[0085] Step S301: obtaining the amplitude value of each pixel in each of the infrared images;

[0086] Step S302: accumulating the amplitude values of the pixels in the infrared images to generate an amplitude value sum;

[0087] Step S303: obtaining the total number of pixels in each of the infrared images, and generating the second exposure index according to the amplitude value sum and the total number of pixels.

[0088] In the embodiment of the present application, the second exposure index can be set as the ratio of the amplitude value sum to the total number of pixels.

[0089] Step S4: judging the exposure state of each of the infrared images according to the first exposure index, the upper limit pixel threshold corresponding to the first exposure index, the lower limit pixel threshold, the second exposure index, and the amplitude threshold corresponding to the second exposure index, and adjusting the exposure time of the TOF camera according to the exposure state.

[0090] Figure 5 The flow chart of the step of adjusting the exposure time according to the exposure state in the embodiment of the present application is shown in Fig. 4, which comprises the following steps: Figure 5

[0091] Step S401: obtaining the pre-set upper limit pixel threshold and lower limit pixel threshold;

[0092] Step S402: determining that the infrared image is overexposed when the first exposure index is greater than the upper limit pixel threshold, and determining that the infrared image is underexposed when the first exposure index is less than the lower limit pixel threshold and the second exposure index is less than the amplitude threshold;

[0093] Step S403: decreasing the exposure time of the next frame of the infrared image when the infrared image is overexposed, and increasing the exposure time when the infrared image is underexposed.

[0094] In the embodiment of the present application, the upper limit pixel threshold can be set as 0.04, the lower limit pixel threshold can be set as 0.001, and the amplitude threshold can be set as 255.

[0095] In the embodiment of the present application, in step S403, the exposure time of the next frame of the infrared image is :

[0096] ​​

[0097] wherein, is 0.9, is an exposure time of a current frame, is an upper pixel threshold value, is a first exposure index, is a second exposure index; is an exposure variation time when overexposure occurs, is an exposure variation time when underexposure occurs,

[0098]

[0099] wherein, is a first exposure index and a slope of a fitted straight line, may be calculated in advance,

[0100]

[0101] wherein, is a second exposure index and a slope of a fitted straight line, may be calculated in advance.

[0102] In the embodiments of the present application, the first exposure index is generated according to a proportion of pixel values of the ROI region in each infrared image exceeding a pre-set first pixel threshold value;

[0103] The second exposure index is generated according to a mean value of amplitude values of the ROI region in each infrared image.

[0104] In the embodiments of the present application, the TOF camera comprises the following modules:

[0105] a structured light projector, configured to project a dot array light to a target;

[0106] an infrared light projector, configured to project an infrared floodlight to the target;

[0107] the light receiving sensor adopts an infrared camera, configured to collect the infrared image and the infrared speckle image;

[0108] a processor module, configured to generate depth data of the target according to phase differences of multiple frames of infrared speckle images or infrared images.

[0109] The structured light projector comprises a light source, a light source driver and a light modulator;

[0110] the light source driver is connected with the light source and is configured to drive the light source to emit light;

[0111] The light modulator is connected with the light source, and is used for modulating the projected light of the light source to form discrete dot array light and then project the discrete dot array light back to the object to be measured.

[0112] In the embodiment of the present application, the light modulator adopts a diffraction grating (DOE) or a spatial light modulator (SLM).

[0113] The infrared camera comprises an optical imaging lens and a light detector array; the light detector array comprises a plurality of light detectors arranged in an array.

[0114] The optical imaging lens is used for establishing a one-to-one correspondence between the direction vectors of the collimated light beams entering the light detector array through the optical imaging lens and the light detectors.

[0115] The light detector is used for receiving the collimated light beams reflected by the target object.

[0116] In the embodiment of the present application, in order to filter background noise, a narrowband filter is usually arranged in the optical imaging lens, so that the light detector array can only pass the incident collimated light beams of a preset wavelength. The preset wavelength can be the wavelength of the incident collimated light beams, such as 950 nm, or can be between 50 nm less than the wavelength of the incident collimated light beams and 50 nm greater than the wavelength of the incident collimated light beams. The light detector array can be arranged in a periodic or non-periodic manner. According to the requirement of the number of discrete dot array lights, the light detector array can be a combination of a plurality of single-point light detectors or a sensor chip integrated with a plurality of light detectors. In order to further optimize the sensitivity of the light detector, the irradiation spot of one discrete dot array light on the target object can correspond to one or more light detectors. When a plurality of light detectors correspond to the same irradiation spot, the signals of each detector can be connected through a circuit, so as to be combined into a light detector with a larger detection area.

[0117] In the embodiment of the present application, the light detector can adopt a CMOS light sensor, a CCD light sensor or a SPAD light sensor.

[0118] Figure 6 The module diagram of the TOF camera in the embodiment of the present application is shown in FIG. 1. Figure 6As shown, when the TOF camera provided by the present application is used, infrared flood light is projected to the target by the dot matrix light projector, and then the infrared image is generated by receiving the infrared flood light reflected by the target by the infrared camera; the processor module calculates the first exposure index and the second exposure index, determines that the infrared image is overexposed when the first exposure index is greater than the upper limit pixel threshold, determines that the infrared image is underexposed when the first exposure index is less than the lower limit pixel threshold and the second exposure index is less than the amplitude threshold, and reduces the exposure time of the next frame of the infrared image when the infrared image is overexposed, and increases the exposure time when the infrared image is underexposed.

[0119] Figure 7 The module schematic diagram for the TOF camera automatic exposure system in the embodiment of the present application is shown as Figure 7 The TOF camera automatic exposure system provided by the present application comprises the following modules:

[0120] An infrared image acquisition module is configured to acquire the infrared image of the target; the infrared image is generated by continuously collecting the target by the TOF camera;

[0121] A first exposure index calculation module is configured to acquire the first exposure index, which is generated according to the proportion of the pixel value exceeding the pre-set first pixel value threshold in each infrared image;

[0122] A second exposure index calculation module is configured to acquire the second exposure index, which is generated according to the mean value of the amplitude value of each infrared image;

[0123] An exposure adjustment module is configured to determine the exposure state of each infrared image according to the first exposure index, the upper limit pixel threshold corresponding to the first exposure index, the lower limit pixel threshold, and the second exposure index, the amplitude threshold corresponding to the second exposure index, and adjust the exposure time of the TOF camera according to the exposure state.

[0124] The embodiment of the present application further provides a TOF camera automatic exposure device comprising a processor and a memory having executable instructions of the processor stored therein. The processor is configured to execute the steps of the TOF camera automatic exposure method by executing the executable instructions.

[0125] As described above, in the embodiment, the exposure index is generated according to the pixel value and the mean value of the amplitude value in each infrared image, the exposure state is determined according to the exposure index, and the exposure time of the TOF camera is adjusted according to the exposure state, which can quickly adjust the exposure time to a suitable range, prevent overexposure and underexposure of the picture, and improve the accuracy of the depth map and the working distance range.

[0126] Those skilled in the art can understand that each aspect of the present application can be implemented as a system, a method or a program product. Therefore, each aspect of the present application can be embodied in a form of entirely hardware, entirely software (including firmware, microcode, etc.), or a combination of hardware and software, which can be generically referred to as "circuitry", "module" or "platform".

[0127] Figure 8 is a structural schematic diagram of a TOF camera automatic exposure device in an embodiment of the present application. The electronic device 600 according to this embodiment of the present application will be described below with reference to Figure 8 Figure 8 The electronic device 600 shown is merely an example and should not bring any limitation to the functions and use range of the embodiments of the present application.

[0128] As shown in Figure 8 , the electronic device 600 is in the form of a general computing device. The components of the electronic device 600 can include, but are not limited to, at least one processing unit 610, at least one storage unit 620, a bus 630 connecting different platform components (including the storage unit 620 and the processing unit 610), a display unit 640, etc.

[0129] The storage unit stores program codes, which can be executed by the processing unit 610, so that the processing unit 610 performs the steps according to various exemplary embodiments of the present application described in the above-mentioned TOF camera automatic exposure method part of the present specification. For example, the processing unit 610 can perform the steps as shown in Figure 1

[0130] The storage unit 620 can include a readable medium in the form of a volatile storage unit, such as a random access memory (RAM) 6201 and / or a cache memory unit 6202, and can further include a read-only memory (ROM) 6203.

[0131] The storage unit 620 can further include a program / utility 6204 having a set of program modules 6205, which include, but are not limited to, an operating system, one or more application programs, other program modules, and program data, each of which or a combination thereof can include implementation of a network environment.

[0132] The bus 630 can represent one or more of several types of bus structures, including a storage unit bus or storage unit controller, a peripheral bus, a graphics acceleration port, a processing unit bus, or a local bus using any of a variety of bus architectures.

[0133] ​​The electronic device 600 can also communicate with one or more external devices 700 such as a keyboard or pointing devices, a Bluetooth device, or a Figure 8 Other hardware and / or software modules that can be used in conjunction with the electronic device 600, such as microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data archival storage systems, etc. are not shown in FIG. 6 but are contemplated in the present disclosure.

[0134] The present embodiment also provides a computer readable storage medium for storing a program, the program being executed to implement the steps of the method for automatic exposure of a TOF camera. In some possible implementation manners, various aspects of the present disclosure can also be implemented in the form of a program product, which includes program codes for causing a terminal device to perform the steps described above in the method for automatic exposure of a TOF camera according to various exemplary embodiments of the present disclosure when the program product is run on the terminal device.

[0135] As shown above, the program of the computer readable storage medium of the present embodiment, when executed, generates an exposure index according to the average of the pixel value and the amplitude value in each infrared image, determines an exposure state according to the exposure index, and adjusts the exposure time of the TOF camera according to the exposure state, which can quickly adjust the exposure time to a proper range, prevent overexposure and underexposure of the picture, and improve the accuracy of the depth map and the working distance range.

[0136] Figure 9 is a structural schematic diagram of the computer readable storage medium in the present embodiment. As shown in Figure 9 The program product 800 for implementing the above method according to the embodiments of the present disclosure can be in the form of a portable compact disc read-only memory (CD-ROM) and include program codes, and can be run on a terminal device such as a personal computer. However, the program product of the present disclosure is not limited thereto, and in the present document, the readable storage medium can be any tangible medium containing or storing a program, which can be used by or in conjunction with an instruction execution system, apparatus or device.

[0137] The program product can employ any combination of one or more computer-readable media. The computer-readable media can be a computer-readable storage medium or a computer-readable signal medium. The computer-readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples (a non-exhaustive list) of the computer-readable storage medium include the following: an electrical connection having one or more wires, a portable disc, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0138] The computer-readable storage medium can include a data signal traveling in a baseband or a carrier wave traveling in a propagation medium, which is any medium that can guide and / or carry the code segments. The propagation medium can be one or more types of transmission media, including but not limited to wired / solid media such as magnetic tape, magnetic disk, magnetic strip, optical disk, optical strip, etc., and / or wireless media such as acoustic, radio-frequency (RF), infrared, laser, microwave, Global Positioning System (GPS), etc.

[0139] The program code can be written in any combination of one or more programming languages, including an object oriented programming language such as Java, C++, etc., and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code can execute entirely on the user's computing device, partly on the user's computing device, as a stand-alone software package, partly on the user's computing device and partly on a remote computing device or entirely on the remote computing device or server. In the latter scenario, the remote computing device can be connected to the user's computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or the connection can be made to an external computing device, such as through the Internet using an Internet Service Provider (ISP).

[0140] In the embodiments of the present application, the exposure index is generated according to the pixel value and the average value of the amplitude value in each infrared image, the exposure state is determined according to the exposure index, and the exposure time of the TOF camera is adjusted according to the exposure state, which can quickly adjust the exposure time to a suitable range, prevent overexposure and underexposure of the picture, and improve the accuracy of the depth map and the working distance range.

[0141] The various embodiments described in this specification are intended to be illustrative only and in no way limit the scope of the application. Those skilled in the art will be able to devise many variations that, although not explicitly described herein, embody the principles of the application and are included within its spirit and scope. The description is thus to be considered as given for purposes of exemplification only and not limitation. The patentable scope of the present application is deemed to be limited only by the claims that are included below.

[0142] The foregoing detailed description of the application has been presented for purposes of illustration and description. It is not intended to be exhaustive or to limit the application to the precise form disclosed, and obviously many modifications and variations are possible in light of the teaching above. The described embodiments were chosen in order to best illustrate the principles of the application and its practical application to thereby enable others skilled in the art to best utilize the application.

Claims

1. A method for automatic exposure of a TOF camera, characterized in that: The steps include: Step S1: Acquire an infrared image of a target; the infrared image is generated by continuously capturing a target with a TOF camera; Step S2: obtaining a first exposure index, where the first exposure index is generated according to a proportion of pixel values ​​in each of the infrared images exceeding a preset first pixel value threshold; Step S3: obtaining a second exposure index, where the second exposure index is generated according to the average amplitude value of each of the infrared images; Step S4: determining the exposure state of each infrared image according to the first exposure index, the upper pixel threshold and the lower pixel threshold corresponding to the first exposure index, and the second exposure index and the amplitude threshold corresponding to the second exposure index, and adjusting the exposure time of the TOF camera according to the exposure state; The step S4 comprises the following steps: Step S401: obtaining a preset upper pixel threshold and a lower pixel threshold; Step S402: determining that the infrared image is overexposed when the first exposure index is greater than the upper pixel threshold, and determining that the infrared image is underexposed when the first exposure index is less than the lower pixel threshold and the second exposure index is less than the amplitude threshold; Step S403: reducing the exposure time of the next frame of the infrared image when the infrared image is overexposed, and increasing the exposure time when the infrared image is underexposed; In step S403, the exposure time of the next frame of the infrared image is for: ; in, The value is 0.9, is the exposure time of the current frame, is the upper pixel threshold, is the first exposure indicator, is the second exposure indicator; The exposure change time when overexposure occurs. The exposure change time when underexposed, ; in, The first exposure indicator and The slope of the fitted straight line is Pre-calculated, ; in, is the second exposure index and The slope of the fitted straight line is Pre-calculated.

2. The automatic exposure method for a TOF camera according to claim 1, wherein: The step S1 includes the following steps: Step S101: Projecting infrared flood light toward the target through the light projector of the TOF camera; Step S102: generating an infrared image by receiving the infrared flood light reflected by the target through a light receiving sensor of the TOF camera; Step S103: generating depth data of the target according to the phase difference of multiple frames of infrared images by the processor of the TOF camera.

3. The automatic exposure method for a TOF camera according to claim 1, wherein: The step S2 comprises the following steps: Step S201: obtaining the pixel value of each pixel in each of the infrared images; Step S202: determining whether the pixel value of each pixel exceeds a preset first pixel value threshold, so as to determine the number of overexposed pixels in each infrared image; Step S203: obtaining the total number of pixels in each of the infrared images, and generating the first exposure index according to the number of overexposed pixels and the total number of pixels.

4. The automatic exposure method for a TOF camera according to claim 1, wherein: The step S3 comprises the following steps: Step S301: obtaining the amplitude value of each pixel in each of the infrared images; Step S302: Accumulating and determining the amplitude values ​​of the pixels in the infrared image to generate an amplitude value sum; Step S303: Obtain the total number of pixels in each of the infrared images, and generate the second exposure index according to the amplitude value and the total number of pixels.

5. The automatic exposure method for a TOF camera according to claim 1, wherein: The first exposure index is generated according to the ratio of the pixel value of the ROI area in each of the infrared images exceeding a preset first pixel value threshold; The second exposure index is generated according to an average amplitude value of the ROI region in each of the infrared images.

6. An automatic exposure system for a TOF camera, characterized in that: Includes the following modules: An infrared image acquisition module is used to acquire an infrared image of a target; the infrared image is generated by continuously capturing a target through a TOF camera; a first exposure index calculation module, configured to obtain a first exposure index, where the first exposure index is generated according to a ratio of pixel values ​​in each of the infrared images exceeding a preset first pixel value threshold; a second exposure index calculation module, configured to obtain a second exposure index, where the second exposure index is generated according to an average amplitude value of each of the infrared images; an exposure adjustment module, configured to determine an exposure state of each infrared image based on the first exposure index, an upper pixel threshold and a lower pixel threshold corresponding to the first exposure index, and the second exposure index and an amplitude threshold corresponding to the second exposure index, and adjust the exposure time of the TOF camera based on the exposure state; The exposure adjustment module includes the following steps during processing: Step S401: obtaining a preset upper pixel threshold and a lower pixel threshold; Step S402: determining that the infrared image is overexposed when the first exposure index is greater than the upper pixel threshold, and determining that the infrared image is underexposed when the first exposure index is less than the lower pixel threshold and the second exposure index is less than the amplitude threshold; Step S403: reducing the exposure time of the next frame of the infrared image when the infrared image is overexposed, and increasing the exposure time when the infrared image is underexposed; In step S403, the exposure time of the next frame of the infrared image is for: ; in, The value is 0.9, is the exposure time of the current frame, is the upper pixel threshold, is the first exposure indicator, is the second exposure indicator; The exposure change time when overexposure occurs. The exposure change time when underexposed, ; in, The first exposure indicator and The slope of the fitted straight line is Pre-calculated, ; in, is the second exposure index and The slope of the fitted straight line is Pre-calculated.

7. An automatic exposure device for a TOF camera, characterized in that: include: processor; a memory storing executable instructions for the processor; The processor is configured to execute the steps of the automatic exposure method for a TOF camera according to any one of claims 1 to 5 by executing the executable instructions.

8. A computer-readable storage medium for storing a program, characterized in that: When the program is executed by a processor, the steps of the automatic exposure method for a TOF camera according to any one of claims 1 to 5 are implemented.

Citation Information

Patent Citations

  • TOF camera exposure time determination method and device, and terminal equipment

    CN112367476A

  • Exposure adjustment device of video camera

    JP1996056305A