Depth camera error correction method, apparatus, depth camera, and door lock system
By monitoring the temperature changes of the depth camera, performing structured light image compensation and parallax matching, the accuracy problem of the depth camera in temperature-changing environments is solved, thus improving the accuracy of facial recognition in door lock systems.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-29
- Publication Date
- 2026-04-10
AI Technical Summary
Depth cameras become less accurate under varying temperature conditions, leading to inaccurate facial recognition unlocking of door locks.
By monitoring the temperature values of the transmitting and imaging modules, structured light image compensation is performed. Combined with parallax matching and focal length calculation, a high-precision depth image is generated for face recognition.
This improves the measurement accuracy and recognition accuracy of depth cameras in environments with varying temperatures, ensuring reliable unlocking of door lock systems.
Smart Images

Figure CN116095479B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of optics and electronics, and in particular to a method, apparatus, depth camera and door lock system for error correction. Background Technology
[0002] In some depth image-based applications, depth cameras are required to acquire high-precision and accurate depth images. However, since depth cameras are composed of components such as laser light sources, optical elements, and image sensors, they are inevitably affected by their own temperature and the ambient temperature. Temperature can cause the performance of optical elements to become unstable, and it can also cause thermal deformation of the depth camera body. These factors will reduce the quality of the depth image, thereby reducing the accuracy of the depth camera.
[0003] In recent years, more and more door lock systems have been equipped with depth cameras. However, due to seasonal and weather changes, the ambient temperature varies when door locks are being unlocked. This reduces the accuracy of the depth camera, resulting in inaccurate images captured when the door lock is unlocked via facial recognition. Consequently, there are issues with low door lock unlocking accuracy and poor facial unlocking performance. Summary of the Invention
[0004] The present invention provides a depth camera error correction method, apparatus, depth camera and door lock system to solve at least one of the problems in the background art.
[0005] To achieve the above objectives, the present invention provides a depth camera error correction method, comprising: projecting a structured light patterned beam onto a target area using a transmitting module; receiving the beam reflected from the target area using an imaging module to obtain a structured light image; acquiring the current temperature values of the imaging module and the transmitting module; compensating the structured light image based on the current temperature values to obtain a compensated structured light image; performing disparity matching between the compensated structured light image and a reference structured light image to obtain a disparity image; and calculating depth information based on the disparity image and the calibrated focal length of the imaging module to obtain a depth image.
[0006] The present invention also provides a depth camera error correction device, comprising: a transmitting unit for projecting a structured light patterned beam onto a target area using a transmitting module; a receiving unit for receiving the beam reflected from the target area using an imaging module to obtain a structured light image; a temperature measuring unit for acquiring the current temperature values of the imaging module and the transmitting module; a compensation unit for compensating the structured light image based on the current temperature value to obtain a compensated structured light image; a disparity matching unit for performing disparity matching between the compensated structured light image and a reference structured light image to obtain a disparity image; and a depth calculation unit for calculating depth information based on the disparity image and the calibrated focal length of the imaging module to obtain a depth image.
[0007] The present invention also provides a depth camera, comprising: a transmitting module for projecting a structured light patterned beam onto a target area; an imaging module for receiving the beam reflected from the target area to obtain a structured light image; a temperature monitoring module for acquiring the current temperature values of the imaging module and the transmitting module; a processing module for compensating the structured light image based on the current temperature value to obtain a compensated structured light image; performing disparity matching between the compensated structured light image and a reference structured light image to obtain a disparity image; and calculating depth information based on the disparity image and the calibrated focal length of the imaging module to obtain a depth image.
[0008] The present invention also provides a door lock system, including a depth camera, a door lock control and a lock body as described in any of the above; the depth camera is used to acquire a depth image and perform face recognition based on the depth image to obtain a recognition result; the door lock control is used to control the opening and closing of the lock body based on the recognition result.
[0009] The present invention also provides a computer-readable storage medium storing at least one computer program, which is executed to implement the depth camera error correction method described above.
[0010] This invention provides a depth camera error correction method, device, depth camera, and door lock system. The depth camera error correction method includes: projecting a patterned structured light beam onto a target area using a transmitting module; receiving the beam reflected from the target area using an imaging module to obtain a structured light image; acquiring the current temperature values of the imaging module and the transmitting module; compensating the structured light image based on the current temperature value to obtain a compensated structured light image; performing disparity matching between the compensated structured light image and a reference structured light image to obtain a disparity image; and calculating depth information based on the disparity image and the calibrated focal length of the imaging module to obtain a depth image. This invention improves the measurement accuracy of the depth camera after temperature changes by altering the compensation of the structured light image, obtaining a compensated structured light image, and then performing disparity matching to obtain a depth image. This enhances the recognition accuracy and improves the recognition accuracy of the depth camera. Attached Figure Description
[0011] Figure 1 This is a schematic diagram of a door lock system provided in an embodiment of the present invention;
[0012] Figure 2 This is a schematic flowchart of a depth camera error correction method provided in an embodiment of the present invention;
[0013] Figure 3 This is a pixel image acquired at a calibrated temperature value and a current temperature value, provided as an embodiment of the present invention.
[0014] The realization of the objective, functional features and advantages of the present invention will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation
[0015] It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
[0016] Figure 1 The diagram below illustrates the structure of a door lock system according to this application. The door lock system includes a depth camera 1, a door lock control 2, and a lock body 3. The depth camera 1 includes a transmitting module 10, an imaging module 11, a temperature monitoring module 12, a processor 131, a depth calculation chip 132, and a storage module 14.
[0017] In one embodiment, the transmitting module 10 is used to project a patterned structured light beam onto a target area; the imaging module 11 is used to receive the beam reflected from the target area to obtain a structured light image; the temperature monitoring module 12 is used to acquire the current temperature values of the imaging module 10 and the transmitting module 11; the processing module includes a processor 131 and a depth calculation chip 132, the depth calculation chip 132 is used to compensate the structured light image according to the current temperature value to obtain a compensated structured light image; the compensated structured light image is then compared with a reference structured light image for disparity matching to obtain a disparity image. The processor 131 is used to calculate depth information based on the disparity image and the calibrated focal length of the imaging module to obtain a depth image.
[0018] In one embodiment, the temperature monitoring module 12 includes an ADC digital-to-analog converter unit and two temperature sensors (e.g., NTC thermistors). The two temperature sensors are respectively located at the transmitting module 10 and the imaging module 11. The ADC digital-to-analog converter unit is connected to two temperature sensors in two separate paths to obtain the real-time temperature of the transmitting module 10 and the imaging module 11.
[0019] In one embodiment, the current temperature values of the transmitting module and the imaging module can be obtained by monitoring them using a temperature sensor or similar device. The temperature sensor includes two thermistors and a digital-to-analog converter circuit. One thermistor is located at the light-emitting chip of the transmitting module, and the other thermistor is located at the image sensor of the imaging module. They are used to monitor the current temperature values of the transmitting module and the imaging module, respectively. The digital-to-analog converter circuit outputs different digital signals based on the temperature changes of the thermistors.
[0020] In one embodiment, before acquiring the current temperature values of the imaging module and the transmitting module, the temperature monitoring module 12 is further configured to: filter the acquired initial temperature values of the imaging module and the transmitting module. By filtering the initial temperature values of the imaging module and the transmitting module, abnormal temperature values with large fluctuations can be filtered out, and more stable and accurate temperature values can be determined.
[0021] In one embodiment, the storage module 14 includes a first memory connected to the processor 131 and a second memory connected to the depth computing chip 132. The storage module 14 includes at least one type of readable storage medium, including flash memory, a portable hard drive, a multimedia card, a card-type memory (e.g., SD or DX memory), magnetic storage, a magnetic disk, an optical disk, etc. The storage module 14 stores the calibration temperature values of the imaging module and the transmitting module, the calibration focal length of the imaging module, the parallax matching algorithm, the depth calculation algorithm, and the focal length calculation formula for the processing module to access during program execution. The storage module 14 can be an internal storage unit of the depth camera, such as the portable hard drive of the depth camera. The memory can also be an external storage device of the depth camera, such as a plug-in portable hard drive, a Smart Media Card (SMC), a Secure Digital (SD) card, a Flash Card, etc., equipped on the depth camera. Furthermore, the storage module 14 can include both internal storage units and external storage devices. It should be noted that the memory is not limited in this embodiment. The memory is not a necessary component of this application and can be designed according to the type of processor 131 and depth computing chip 132.
[0022] In one embodiment, the processor 131 may be composed of integrated circuits, such as a single packaged integrated circuit or multiple integrated circuits with the same or different functions, including combinations of one or more central processing units (CPUs), microprocessors, neural network chips, digital processing chips, graphics processors, and various control chips. The processor 131 is the control unit of the door lock system, connecting various components of the entire door lock system through various interfaces and lines. It executes various functions of the door lock system (door opening and closing) and processes data by running or executing programs or modules (e.g., executing door lock control programs) and calling data. The processor 131 may include a UART interface, which, after acquiring the component temperature monitored by the temperature monitoring module 12, sends the component temperature to the deep computing chip 132 via the UART interface.
[0023] In one embodiment, the depth computing chip 132 can perform various functions of parallax matching and process data by running or executing programs (e.g., executing door lock control programs) and calling data. The external storage module 14 of the depth computing chip is used to extract and write parallax images calculated by the depth computing chip 132.
[0024] In some embodiments, the depth calculation chip 132 is used to compensate the structured light image according to the current temperature value to obtain a compensated structured light image; the compensated structured light image is then compared with a reference structured light image to obtain a disparity image. The processor 131 is used to calculate depth information based on the disparity image and the calibrated focal length of the imaging module to obtain a depth image. Since converting the disparity image into a depth image requires significant computing power, to improve the efficiency of the depth calculation chip 132 in processing the structured light image into the compensated structured light image, the depth calculation chip 132 processes the compensated structured light image into a disparity image and sends it to the processor 131, which then converts the disparity image into a depth image. It is understandable that when the depth calculation chip has sufficiently large computing power, the step of "calculating depth information based on the disparity image and the calibrated focal length of the imaging module to obtain a depth image" can also be completed by the depth calculation chip.
[0025] In some embodiments, the depth camera 1 is used to acquire target images containing human faces and process the target images containing human faces to obtain face recognition results. The door lock control 2 can be a door lock controller, used to output door lock control commands based on the face recognition results to control the opening and closing of the lock body 3.
[0026] Figure 1 Only door lock systems with components are shown; those skilled in the art will understand that... Figure 1 The structure shown does not constitute a limitation on the door lock system and may include fewer or more components than shown, or combine certain components, or have different component arrangements.
[0027] Figure 2 This is a schematic flowchart illustrating the depth camera error correction method provided in this embodiment. In this embodiment, the depth camera error correction method includes the following steps:
[0028] S21. Use the emission module to project a structured light patterned beam onto the target area.
[0029] S22. Receive the beam of light reflected from the target area using the imaging module to obtain a structured light image.
[0030] S23. Obtain the current temperature values of the imaging module and the emission module.
[0031] Since the current temperature of the transmitting module affects the deformation of the projected structured light patterned beam, and the current temperature of the imaging module also causes the structured light image generated on the image sensor of the imaging module to deform, in this embodiment, the real-time temperature of the transmitting module and the imaging module are monitored simultaneously.
[0032] S24. Compensate the structured light image based on the current temperature value to obtain the compensated structured light image.
[0033] In an optional implementation, this step may specifically include: calculating the focal length of the imaging module as the temperature changes based on the current temperature value to obtain an updated target focal length; determining the offset of the structured light image based on the target focal length; and compensating the structured light image based on the offset to obtain a compensated structured light image.
[0034] Specifically, the step of calculating the focal length of the imaging module as the temperature changes based on the current temperature value to obtain the updated target focal length includes: substituting the current temperature value into the focal length calculation formula to obtain the target focal length. In this embodiment, the focal length calculation formula is expressed as:
[0035] f new =f+k1(t1-t1′)+k2(t2-t2′)
[0036] Among them, f new t1 is the target focal length, f is the calibrated focal length, k1 is the first compensation coefficient corresponding to the transmitting module, t1 is the calibrated temperature value of the transmitting module, t1′ is the current temperature value of the transmitting module, k2 is the second compensation coefficient corresponding to the imaging module, t2 is the calibrated temperature value of the imaging module, and t2′ is the current temperature value of the imaging module.
[0037] In some embodiments, the most direct impact of temperature changes on the depth camera is a shift in the position of the structured light beam in the structured light image acquired by the imaging module. The greater the temperature difference compared to when the reference structured light image was acquired, the more severe the shift, which can be represented by a change in focal length. Therefore, this embodiment calculates the change in focal length of the structured light image due to temperature changes by measuring the temperature value, thereby determining the shift of the structured light image; and compensates for the shift based on the shift to obtain a compensated structured light image.
[0038] In some embodiments, obtaining the compensation coefficient includes: obtaining a preset temperature range and a calibration temperature, dividing the temperature range into multiple acquisition temperatures; determining the comparison variable and invariant from the preset module categories using the control variable method, acquiring a calibration image and a comparison image under the comparison variable based on the calibration temperature and the acquisition temperature; calculating the offset of pixels in the calibration image and the comparison image, and calculating the compensation coefficient based on the offset of pixels and the temperature corresponding to the module category using a preset temperature compensation calculation formula.
[0039] Specifically, the pixel offset and the temperature of the emission module or imaging module are substituted into the compensation coefficient calculation formula to solve for the compensation coefficient. The compensation calculation formula is expressed as follows:
[0040]
[0041] Where l is the offset of the pixel; k i The compensation coefficient corresponding to the transmitting module or imaging module; t i t is the calibration temperature value for the transmitting or imaging module. i ′ represents the current temperature value of the transmitting or imaging module.
[0042] In one embodiment, the temperature range can be between -30°C and 70°C. Acquisition temperatures are then generated at 5-degree Celsius intervals, and images are acquired based on each generated acquisition temperature. Taking a transmission module and an imaging module as examples, the temperature of one of the transmission or imaging modules is fixed (calibrated temperature, for example, 30°C). The temperature of the unfixed component is adjusted according to the acquisition temperature, and images are acquired at both the calibrated and acquisition temperatures. The focal length of the image pixels differs at different temperatures. Figure 3 As shown in the figure, part (a) is the calibration image collected at a calibration temperature of 30℃, and part (b) is the comparison image collected at a collection temperature of 70℃. The temperature compensation coefficient for different module types can be calculated by using the focal length offset and the above formula.
[0043] In one embodiment, the calibrated focal length can be used to calculate the target focal length. Once the target focal length is obtained, it can be stored in a memory. When the temperature of the emitting module and the imaging module does not change significantly (e.g., within 3 or 5 degrees Celsius), the structured light image can be compensated directly based on the target focal length stored in the memory.
[0044] S25. Perform disparity matching between the compensated structured light image and the reference structured light image to obtain a disparity image.
[0045] S26. Calculate depth information based on the parallax image and the calibrated focal length of the imaging module to obtain a depth image.
[0046] Specifically, a corrected image is obtained by reprojecting the structured light image and the target focal length; a depth image is then obtained by calculating the corrected image, the target focal length, and the disparity using a preset depth calculation formula. The depth calculation formula is as follows:
[0047]
[0048] Where z represents the depth information of the depth image; z0 represents the depth value of the corrected image; b represents the preset baseline arc length; f new d represents the target focal length; d represents the parallax information. The baseline arc length is the distance between the transmitting module and the imaging module; the parallax information is obtained by the depth calculation chip by matching a preset reference structured light image (pre-stored in the storage module) with the compensated structured light image.
[0049] This invention also provides a depth camera error correction device, comprising: a transmitting unit for projecting a structured light patterned beam onto a target area using a transmitting module; a receiving unit for receiving the beam reflected from the target area using an imaging module to obtain a structured light image; a temperature measuring unit for acquiring the current temperature values of the imaging module and the transmitting module; a compensation unit for compensating the structured light image based on the current temperature value to obtain a compensated structured light image; a disparity matching unit for performing disparity matching between the compensated structured light image and a reference structured light image to obtain a disparity image; and a depth calculation unit for calculating depth information based on the disparity image and the calibrated focal length of the imaging module to obtain a depth image.
[0050] Specifically, the compensation unit is used to: calculate the focal length of the imaging module after temperature change based on the current temperature value, and obtain an updated target focal length; determine the offset of the structured light image based on the target focal length; and compensate the structured light image based on the offset to obtain a compensated structured light image. The parts of this embodiment that are the same as those in the above embodiments will not be repeated here.
[0051] In some embodiments, the storage module also stores a computer program for face recognition and a face database for the processor 131 to call and perform face recognition, specifically including: detecting facial key points on a depth image to obtain facial key points; performing depth verification of the key points based on the facial key points to obtain a depth liveness detection result; when the depth liveness detection result is passed, extracting key feature vectors from the facial key points; generating a face attribute map based on the key feature vectors; matching the face attribute map with the face attribute maps of the face whitelist in the face database; when the match is successful, determining that the face recognition result is successful.
[0052] In one embodiment, a facial landmark detection model can be used to detect facial landmarks in a depth image. This model can be constructed based on the RetinaFace face detection algorithm. Specifically, the facial landmark detection model includes a feature extraction network, a feature fusion network, a feature enhancement network, and a landmark prediction network.
[0053] In one embodiment, a Gabor feature extractor can be used to obtain feature vectors of key parts of the face. By using Gabor filters of different frequency bands and directions, feature vectors with different attributes can be extracted from key parts of the face.
[0054] In one embodiment, the face whitelist contains a list of users authorized to unlock the door lock, and the face attribute map is a vector map formed by associating feature vectors of key parts. The overall vector similarity between the face attribute map and the face attribute map of the preset face whitelist can be calculated, or the vector similarity between the face attribute map and the face attribute map of the preset face whitelist can be calculated separately for specific associated parts. Then, the face recognition result is determined as to whether the face recognition is successful based on whether the vector similarity is greater than a preset matching threshold.
[0055] In one embodiment, the face recognition result can be divided into verification passed and verification failed. When the verification is passed, an unlocking door lock control command can be generated to control the opening of the lock body; when the verification fails, a stop unlocking door lock control command can be generated to control the closing of the lock body.
[0056] In this embodiment, the face recognition method includes: acquiring the current temperature value of the target detection module, calculating the temperature difference between the current temperature value and a preset calibration temperature value, wherein the target detection module includes an imaging module and an emission module; determining the target focal length based on the temperature difference, and performing disparity calculation on the acquired structured light image based on the target focal length to obtain disparity information; calculating the depth image of the structured light image based on the disparity information and the target focal length; and performing face recognition on the depth image to obtain a face recognition result.
[0057] An embodiment of the present invention also provides a functional block diagram of a face recognition device. Depending on the functions implemented, the face recognition device may include a temperature difference calculation module, a parallax information generation module, a depth image generation module, and a face verification module. The module of the present invention can also be referred to as a unit, which refers to a series of computer program segments that can be executed by a processor, such as a processor in a door lock system, and can perform a fixed function. These segments can be stored in memory or directly executed by a processor.
[0058] In one embodiment, the functions of each module / unit are as follows: A temperature difference calculation module is used to obtain the current temperature value of the target detection module in the face recognition system and calculate the temperature difference between the current temperature value and a preset calibration temperature value. The target detection module includes an imaging module and an emission module. A disparity information generation module is used to determine the target focal length based on the temperature difference and to perform disparity calculation on the acquired structured light image based on the target focal length to obtain disparity information. A depth image generation module is used to calculate the depth image of the structured light image based on the disparity information. A face verification module is used to perform face recognition on the depth image to obtain the face recognition result.
[0059] In detail, each module in the face recognition device in this embodiment of the invention uses the same technical means as the face recognition method in the accompanying drawings and can produce the same technical effect, which will not be repeated here.
[0060] The present invention also provides a computer-readable storage medium storing a computer program. When executed, the computer program can implement the module functions of the face recognition system of any of the above embodiments. It should be noted that the computer-readable storage medium can be volatile or non-volatile. For example, a computer-readable medium may include: any entity or device capable of carrying computer program code, a recording medium, a USB flash drive, a portable hard drive, a magnetic disk, an optical disk, a computer memory, or a read-only memory (ROM).
[0061] In the several embodiments provided by this invention, it should be understood that the disclosed devices, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of modules is only a logical functional division, and other division methods may be used in actual implementation.
[0062] The modules described as separate components may or may not be physically separate. The components shown as modules may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.
[0063] Furthermore, the functional modules in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or in the form of hardware plus software functional modules.
[0064] It will be apparent to those skilled in the art that the present invention is not limited to the details of the exemplary embodiments described above, and that the present invention can be implemented in other specific forms without departing from the spirit or essential characteristics of the present invention.
[0065] Therefore, the embodiments should be considered exemplary and non-limiting in all respects, and the scope of the invention is defined by the appended claims rather than the foregoing description. Thus, all variations falling within the meaning and scope of equivalents of the claims are intended to be embraced within the invention. No appended diagram markings in the claims should be construed as limiting the scope of the claims.
[0066] Furthermore, it is clear that the word "comprising" does not exclude other units or steps, and the singular does not exclude the plural. Multiple units or devices recited in a system claim may also be implemented by a single unit or device through software or hardware. The terms "first," "second," etc., are used to indicate names and do not indicate any specific order.
[0067] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention.
Claims
1. A method of depth camera error correction, the method comprising: The method comprises the following steps: projecting a structured light patternized light beam to a target area by using a projection module; receiving the light beam reflected by the target area by using an imaging module to obtain a structured light image; obtaining a current temperature value of the projection module and the imaging module; compensating the structured light image according to the current temperature value to obtain a compensated structured light image; performing disparity matching on the compensated structured light image and a reference structured light image to obtain a disparity image; calculating depth information according to the disparity image and a target focal length of the imaging module to obtain a depth image; wherein the step of compensating the structured light image according to the current temperature value to obtain a compensated structured light image comprises the following steps: substituting the current temperature value into a focal length calculation formula to obtain a target focal length, wherein the focal length calculation formula is represented as: f new = f + k1(t1 - t1') + k2(t2 - t2'), wherein f new is a target focal length, f is a calibration focal length, k1 is a first compensation coefficient corresponding to the emission module, t1 is a calibration temperature value of the emission module, t1' is a current temperature value of the emission module, k2 is a second compensation coefficient corresponding to the imaging module, t2 is a calibration temperature value of the imaging module, t2' is a current temperature value of the imaging module; and the compensation coefficient calculation formula is represented as: Wherein, l is the offset of the pixel point, k i is the compensation coefficient corresponding to the emission module or the imaging module, t i is the calibration temperature value of the emission module or the imaging module, t i is the current temperature value of the emission module or the imaging module; determining an offset of the structured light image according to the target focal length; and compensating the structured light image according to the offset to obtain a compensated structured light image.
2. A depth camera error correction apparatus, characterized by, The method comprises the following steps: projecting a structured light patternized light beam to a target area by using a projection module; receiving the light beam reflected by the target area by using an imaging module to obtain a structured light image; obtaining a current temperature value of the projection module and the imaging module; compensating the structured light image according to the current temperature value to obtain a compensated structured light image; performing disparity matching on the compensated structured light image and a reference structured light image to obtain a disparity image; calculating depth information according to the disparity image and a target focal length of the imaging module to obtain a depth image; wherein the step of compensating the structured light image according to the current temperature value to obtain a compensated structured light image comprises the following steps: substituting the current temperature value into a focal length calculation formula to obtain a target focal length, wherein the focal length calculation formula is represented as: f new = f + k1(t1 - t1') + k2(t2 - t2'), wherein f new is a target focal length, f is a calibration focal length, k1 is a first compensation coefficient corresponding to the emission module, t1 is a calibration temperature value of the emission module, t1' is a current temperature value of the emission module, k2 is a second compensation coefficient corresponding to the imaging module, t2 is a calibration temperature value of the imaging module, t2' is a current temperature value of the imaging module; and the compensation coefficient calculation formula is represented as: Wherein, l is the offset of the pixel point, k i is the compensation coefficient corresponding to the emission module or the imaging module, t i is the calibration temperature value of the emission module or the imaging module, t i is the current temperature value of the emission module or the imaging module; determining an offset of the structured light image according to the target focal length; and compensating the structured light image according to the offset to obtain a compensated structured light image.
3. A depth camera, characterized by The method comprises the following steps: projecting a structured light patternized light beam to a target area by using a projection module; receiving the light beam reflected by the target area by using an imaging module to obtain a structured light image; obtaining a current temperature value of the projection module and the imaging module; a processing module comprising: a depth calculation chip, configured to compensate the structured light image according to the current temperature value to obtain a compensated structured light image, and perform disparity matching on the compensated structured light image and a reference structured light image to obtain a disparity image; a processor, configured to calculate depth information according to the disparity image and a target focal length of the imaging module to obtain a depth image; wherein the processor is specifically configured to: substitute the current temperature value into a focal length calculation formula to obtain a target focal length, wherein the focal length calculation formula is represented as: f new = f + k1(t1 - t1') + k2(t2 - t2'), wherein f new is a target focal length, f is a calibration focal length, k1 is a first compensation coefficient corresponding to the emission module, t1 is a calibration temperature value of the emission module, t1' is a current temperature value of the emission module, k2 is a second compensation coefficient corresponding to the imaging module, t2 is a calibration temperature value of the imaging module, t2' is a current temperature value of the imaging module; and the compensation coefficient calculation formula is represented as: Wherein, l is the offset of the pixel point, k i is the compensation coefficient corresponding to the emission module or the imaging module, t i is the calibration temperature value of the emission module or the imaging module, t i is the current temperature value of the emission module or the imaging module; determine an offset of the structured light image according to the target focal length; and compensate the structured light image according to the offset to obtain a compensated structured light image.
4. The depth camera of claim 3, wherein, The method further comprises the following steps: A storage module is configured to store the calibration temperature values of the imaging module and the emitting module, the calibration focal length of the imaging module, a parallax matching algorithm, a depth calculation algorithm and a focal length calculation formula for calling by the processing module when executing a program.
5. A door locking system characterized by, The depth camera, the door lock control and the lock body as claimed in claim 3 or 4 are included. The depth camera is configured to acquire a depth image and perform face recognition according to the depth image to obtain a recognition result. The door lock control is configured to control the opening and closing of the lock body according to the recognition result.
6. A computer readable storage medium storing a computer program, characterized in that, The computer program is executed by a processor to implement the depth camera error correction method as claimed in claim 1.
Citation Information
Patent Citations
Image processing method and device, electronic equipment and computer readable storage medium
CN108924426A
Structured light module calibration method, electronic equipment and computer readable storage medium
CN110689581A
Temperature compensation method and device for depth camera, equipment and storage medium
CN114945091A
Depth camera based on structured light and use method
CN115205129A