Grayscale image generation method based on multi-exposure for TOF camera module

By decomposing the exposure data of the TOF camera module and using the correlation between overexposure and low-exposure parts for filtering processing, the problem of TOF camera module imaging quality degradation in highlights and shadow areas is solved, and the quality of grayscale images is improved. Details and overall quality.

CN115442494BActive Publication Date: 2024-09-24ZHEJIANG SUNNY INTELLIGENT OPTICAL TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202110610233.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-06-01
Publication Date
2024-09-24
Estimated Expiration
2041-06-01

AI Technical Summary

Technical Problem

The TOF camera module's image quality is degraded due to overexposure in highlights and shadow areas, and white and black areas appear, which cannot accurately reflect the detailed characteristics of the highlights and shadow areas.

Method used

By obtaining the exposure data collected by the TOF camera module, it is divided into low exposure, high exposure and overexposure parts, the I value and Q value of the pixel are determined respectively, and the correlation between the overexposure part and the low exposure part is used for filtering processing. Generate grayscale images to reduce the impact of overexposure on imaging quality.

Benefits of technology

It effectively improves the imaging quality of grayscale images generated by the TOF camera module, reduces the impact of overexposure on grayscale data, and enhances the details of the image.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115442494B
    Figure CN115442494B
Patent Text Reader

Abstract

A method for generating grayscale images based on multiple exposures for a TOF camera module is disclosed, comprising: acquiring exposure data collected by the TOF camera module; determining the I value and Q value of a pixel in the exposure data; filtering the I value and Q value of the pixel in the exposure data respectively; and determining grayscale data based on the I value and Q value of the pixel in the filtered exposure data. In the process of determining the I value and Q value of the pixel in the exposure data, a third I value and a third Q value of the pixel in the overexposed part are determined based on the exposure parameters of the overexposed part and the first I value and the first Q value of the pixel in the underexposed part corresponding to the pixel in the overexposed part. The grayscale measurement method can effectively reduce the influence of overexposure on grayscale measurement during grayscale measurement, so as to improve the quality of the grayscale image generated by the TOF camera module.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of camera modules, and more specifically to a grayscale image generation method based on multi-exposure for a TOF camera module, a grayscale image generation device based on multi-exposure for a TOF camera module, and an electronic device. Background Art

[0002] In recent years, camera modules with depth information measurement functions (such as TOF camera modules) have been widely used in industrial production, health care, military security and other fields. The TOF camera module emits a modulated signal to the target and receives the echo signal reflected by the target, and then generates a depth image and a grayscale image of the target based on the emitted signal and the echo signal.

[0003] As application scenarios become more and more complex, in addition to the increasing requirements for the depth measurement accuracy of TOF camera modules, users also have increasingly higher requirements for the imaging quality of TOF camera modules, that is, the requirements for the grayscale images captured by TOF camera modules are getting higher and higher.

[0004] However, specifically, in actual application scenarios, when there are highlight areas (areas with relatively sufficient light) and shadow areas (relatively low light levels in the highlight areas) in the target area being measured, overexposure of the highlight areas causes the TOF camera module to receive too much light reflected from the highlight areas, while the amount of light reflected from the shadow areas is relatively small. In this scenario, a white area corresponding to the highlight area and a black area corresponding to the shadow area will appear in the generated grayscale image, that is, in actual applications, overexposure affects the imaging quality of the TOF camera module.

[0005] Therefore, an image processing solution for a TOF camera module is desired to improve the imaging quality of the grayscale image of the TOF camera module. Summary of the invention

[0006] One advantage of the present application is that it provides a grayscale image generation method based on multi-exposure for a TOF camera module, a grayscale image generation device based on multi-exposure for a TOF camera module, and an electronic device, which improves the imaging quality of the grayscale image generated by the TOF camera module through optimization of the algorithm end.

[0007] Another advantage of the present application is that it provides a grayscale image generation method based on multi-exposure for a TOF camera module, a grayscale image generation device based on multi-exposure for a TOF camera module, and an electronic device, wherein the grayscale image generation method can effectively reduce the influence of overexposure on grayscale data during the grayscale data acquisition process, so as to improve the imaging quality of the grayscale image generated by the TOF camera module.

[0008] Another advantage of the present application is to provide a grayscale image generation method based on multi-exposure for a TOF camera module, a grayscale image generation device based on multi-exposure for a TOF camera module, and an electronic device, wherein the grayscale image generation method utilizes the correlation between the grayscale data of the overexposed part and the grayscale data of the underexposed part to process the overexposed part in the image, so as to effectively reduce the influence of overexposure on the grayscale data during the grayscale data acquisition process.

[0009] In order to achieve at least one of the above advantages or other advantages and purposes, according to one aspect of the present application, a method for generating a grayscale image based on multiple exposures for a TOF camera module is provided, which includes:

[0010] Acquire exposure data collected by the TOF camera module, wherein the exposure data includes an underexposed part, an overexposed part, and an overexposed part, wherein a first exposure parameter of the underexposed part is lower than a preset parameter value, and second exposure parameters of the overexposed part and the overexposed part are higher than or equal to the preset parameter value, wherein an exposure value of each pixel in the overexposed part is higher than or equal to a preset threshold value;

[0011] Determining an I value and a Q value of a pixel in the exposure data includes:

[0012] Determining a first I value and a first Q value of the pixel points in the low-exposure part based on the exposure value of each pixel point in the low-exposure part;

[0013] Determining a second I value and a second Q value of the pixel points in the high exposure part based on the exposure value of each pixel point in the high exposure part; and

[0014] Determine a third I value and a third Q value of the pixel points in the overexposed part based on the exposure value of the pixel points in the overexposed part and the first I value and the first Q value of the pixel points in the underexposed part corresponding to the pixel points in the overexposed part;

[0015] filtering the I value and Q value of the pixel points in the exposure data respectively; and

[0016] Based on the I value and Q value of the pixel point in the filtered exposure data, grayscale data is determined to generate a grayscale image.

[0017] According to the multi-exposure grayscale image generation method for a TOF camera module of the present application, based on the exposure value of the pixel in the overexposed part and the first I value and the first Q value of the pixel in the underexposed part corresponding to the pixel in the overexposed part, a third I value and a third Q value of the pixel in the overexposed part are determined, including: obtaining the third I value of the pixel in the overexposed part by the following formula, wherein the formula is Among them, Inew represents the third I value, I l represents the first I value, the Exposure h Indicates the exposure value of the pixel in the overexposed part. l represents the exposure value of the pixel point in the underexposed part corresponding to the pixel point in the overexposed part; and obtains the third Q value of the pixel point in the overexposed part by the following formula, wherein the formula is Among them, Q new represents the third Q value, Q l represents the first Q value, the Exposure h Indicates the exposure value of the pixel in the overexposed part. l Represents the exposure value of the pixel point in the underexposed part corresponding to the pixel point in the overexposed part.

[0018] In the multi-exposure based grayscale image generation method for a TOF camera module according to the present application, the I value and Q value of the pixel point in the exposure data are filtered respectively, including: performing fast Fourier transform on the I value and Q value of the pixel point in the exposure data respectively to generate Fourier I transform value and Fourier Q transform value; normalizing the Fourier I transform value and the Fourier Q transform value respectively to obtain normalized I transform value and normalized Q transform value; and filtering out the normalized I transform value within a first preset frequency range and the normalized Q transform value within a second preset frequency range to obtain a filtered I value and a filtered Q value.

[0019] In the multi-exposure based grayscale image generation method for the TOF camera module according to the present application, exposure data collected by the TOF camera module is obtained, including: obtaining the exposure data collected by the TOF camera module from an external storage unit.

[0020] In the multi-exposure based grayscale image generation method for the TOF camera module according to the present application, the exposure data collected by the TOF camera module is obtained, including: obtaining the initial exposure data collected by the TOF camera module; and parsing the valid data and invalid data in the initial exposure data based on the preset threshold, wherein the exposure value of each pixel in the valid data is lower than the preset threshold, and the exposure value of each pixel in the invalid data is higher than or equal to the preset threshold.

[0021] According to the multi-exposure based grayscale image generation method for a TOF camera module of the present application, the external storage unit is a double rate synchronous dynamic random access memory.

[0022] According to the multi-exposure grayscale image generation method for a TOF camera module of the present application, it includes:

[0023] Acquire high exposure data collected by the TOF camera module under a second exposure parameter, wherein the high exposure data includes a high exposure part and an overexposure part, wherein the second exposure parameter is higher than the preset parameter value, and the exposure value of each pixel in the overexposure part is higher than or equal to a preset threshold value;

[0024] Determining a second I value and a second Q value of the pixel points in the high exposure part based on the exposure value of each pixel point in the high exposure part;

[0025] Acquire a low-exposure portion captured by a TOF camera module under a first exposure parameter, wherein the first exposure parameter is lower than the preset parameter value;

[0026] Determining a first I value and a first Q value of the pixel points in the low-exposure part based on the exposure value of each pixel point in the low-exposure part;

[0027] Determine a third I value and a third Q value of the pixel points in the overexposed part based on the exposure value of the pixel points in the overexposed part and the first I value and the first Q value of the pixel points in the underexposed part corresponding to the pixel points in the overexposed part;

[0028] filtering the I value and Q value of the pixel points in the exposure data respectively; and

[0029] Based on the I value and Q value of the pixel point in the filtered exposure data, grayscale data is determined to generate a grayscale image.

[0030] According to the multi-exposure based grayscale image generation method for the TOF camera module of the present application, the multi-exposure based grayscale image generation method for the TOF camera module is executed by parallel chips.

[0031] In the multi-exposure based grayscale image generation method for a TOF camera module according to the present application, determining the first I value and the first Q value of the pixel points in the underexposure part based on the first exposure value of each pixel point in the underexposure part, and determining the third I value and the third Q value of the pixel points in the overexposure part based on the exposure value of the pixel points in the overexposure part and the first I value and the first Q value of the pixel points in the underexposure part corresponding to the pixel points in the overexposure part are performed in parallel.

[0032] According to another aspect of the present application, a grayscale image generation device based on multi-exposure for a TOF camera module is provided, comprising:

[0033] An exposure data acquisition unit, used to acquire exposure data collected by the TOF camera module, wherein the exposure data includes an underexposed part, an overexposed part, and an overexposed part, wherein a first exposure parameter of the underexposed part is lower than a preset parameter value, and a second exposure parameter of the overexposed part and the overexposed part is higher than or equal to the preset parameter value, wherein an exposure value of each pixel in the overexposed part is higher than or equal to a preset threshold value;

[0034] A data determination unit, used to determine an I value and a Q value of a pixel in the exposure data, wherein the I value and Q value determination unit comprises:

[0035] A first subunit, configured to determine a first I value and a first Q value of the pixel points in the low-exposure part based on the exposure value of each pixel point in the low-exposure part;

[0036] A second subunit, configured to determine a second I value and a second Q value of the pixel points in the high exposure part based on the exposure value of each pixel point in the high exposure part; and

[0037] A third subunit is used for determining a third I value and a third Q value of the pixel points in the overexposed part based on the exposure value of the pixel points in the overexposed part and the first I value and the first Q value of the pixel points in the underexposed part corresponding to the pixel points in the overexposed part;

[0038] A filtering unit, used to filter the I value and Q value of the pixel points in the exposure data respectively; and

[0039] The grayscale data processing unit is used to determine the grayscale data based on the I value and Q value of the pixel point in the filtered exposure data to generate a grayscale image.

[0040] According to the multi-exposure grayscale image generation device for the TOF camera module of the present application, the third subunit is further used to: obtain the third I value of the pixel point of the overexposed part by the following formula, wherein the formula is Among them, I new represents the third I value, I l represents the first I value, the Exposure h Indicates the exposure value of the pixel in the overexposed part. l represents the exposure value of the pixel point in the underexposed part corresponding to the pixel point in the overexposed part; and obtains the third Q value of the pixel point in the overexposed part by the following formula, wherein the formula is Among them, Q new represents the third Q value, Q l represents the first Q value, the Exposure hIndicates the exposure value of the pixel in the overexposed part. l Represents the exposure value of the pixel point in the underexposed part corresponding to the pixel point in the overexposed part.

[0041] In the multi-exposure based grayscale image generation device for a TOF camera module according to the present application, the filtering unit is further used to: perform fast Fourier transform on the I value and Q value of the pixel point in the exposure data, respectively, to generate Fourier I transform value and Fourier Q transform value; normalize the Fourier I transform value and the Fourier Q transform value, respectively, to obtain normalized I transform value and normalized Q transform value; and filter out the normalized I transform value within a first preset frequency range and the normalized Q transform value within a second preset frequency range to obtain a filtered I value and a filtered Q value.

[0042] According to another aspect of the present application, an electronic device is provided, comprising: a memory and a processor, wherein computer program instructions are stored in the memory, and when the computer program instructions are executed by the processor, the processor executes the multi-exposure based grayscale image generation method for the TOF camera module as described above.

[0043] Further objectives and advantages of the present application will be fully reflected through understanding of the following description and drawings.

[0044] These and other objects, features and advantages of the present application are fully reflected in the following detailed description, drawings and claims. BRIEF DESCRIPTION OF THE DRAWINGS

[0045] These and / or other aspects and advantages of the present application will become clearer and easier to understand from the following detailed description of the embodiments of the present application in conjunction with the accompanying drawings, in which:

[0046] Figure 1 The figure illustrates a schematic diagram of data processing in a grayscale image generation method based on multi-exposure for a TOF camera module according to an embodiment of the present application.

[0047] Figure 2 The figure illustrates a flow chart of a method for generating grayscale images based on multiple exposures for a TOF camera module according to an embodiment of the present application.

[0048] Figure 3 The figure illustrates a flow chart of determining the I value and Q value of a pixel point in the exposure data in a grayscale image generation method based on multi-exposure for a TOF camera module according to an embodiment of the present application.

[0049] Figure 4The figure illustrates a flowchart of a modified implementation of a multi-exposure based grayscale image generation method for a TOF camera module according to an embodiment of the present application.

[0050] Figure 5 The figure illustrates a block diagram of a multi-exposure based grayscale image generation device for a TOF camera module according to an embodiment of the present application.

[0051] Figure 6 The diagram illustrates a block diagram of a data determination unit in a multi-exposure based grayscale image generation device for a TOF camera module according to an embodiment of the present application.

[0052] Figure 7 A schematic diagram of data transmission in a multi-exposure based grayscale image generation device for a TOF camera module according to an embodiment of the present application is illustrated.

[0053] Figure 8 A block diagram of an electronic device according to an embodiment of the present application is illustrated. DETAILED DESCRIPTION

[0054] The following description is used to disclose the present application so that those skilled in the art can implement the present application. The embodiments described below are only examples, and those skilled in the art can think of other obvious variations. The basic principles of the present application defined in the following description can be applied to other embodiments, variations, improvements, equivalent solutions, and other technical solutions that do not deviate from the spirit and scope of the present application.

[0055] Application Overview

[0056] As mentioned above, in actual application scenarios, when highlight areas (areas with relatively sufficient light) and shadow areas (relatively low light levels in the highlight areas) appear in the target area being measured, overexposure of the highlight areas causes the TOF camera module to receive too much light reflected from the highlight areas, while the amount of light reflected from the shadow areas is relatively small. In this scenario, a whitened area corresponding to the highlight area and a black area corresponding to the shadow area will appear in the generated grayscale image, that is, in actual applications, overexposure affects the imaging quality of the TOF camera module.

[0057] Specifically, the principle of the TOF camera module acquiring grayscale data is as follows: the TOF camera module emits a modulated signal to the target object to be detected, and receives an echo signal reflected by the target object, and obtains the I value and Q value through the exposure value of the echo signal received by the TOF camera module at different exposure times, and then determines the grayscale data based on the I value and Q value.

[0058] When the highlight area in the measured target area is overexposed, the amount of light of the echo signal reflected by the highlight area received by the TOF camera module is too high, and the exposure value that can characterize the light amount of the optical signal (for example, the echo signal) has a limit. When the amount of light of the echo signal received by the TOF camera module exceeds the range that can be characterized by the preset threshold of the exposure value, the exposure value of the echo signal measured by the TOF camera module is difficult to accurately characterize the true amount of light of the received echo signal. Accordingly, the grayscale data obtained by the measured exposure value of the echo signal will be difficult to reflect the true grayscale corresponding to the overexposed highlight area, and the highlight area appears as a whitened area in the generated grayscale image, and the detailed features of the highlight area cannot be displayed. Correspondingly, the shadow area appears as a black area in the generated grayscale image, and the detailed features of the shadow area cannot be displayed.

[0059] Based on this, in order to reduce the impact of overexposure on the imaging quality of the grayscale image generated by the TOF camera module, the imaging quality of TOF can be improved based on the principle of obtaining grayscale data by the TOF camera module. The inventor of this application considers that since the exposure value of the echo signal reflected by the highlight area measured by the TOF camera module is difficult to represent the actual light amount of the received echo signal, the way of obtaining the I value and the Q value can be changed, and then the grayscale data can be determined based on the obtained I value and the Q value.

[0060] Specifically, overexposure will cause the light amount of the received echo signal to exceed the range that can be represented by the preset threshold of the exposure value, while the light amount of the received echo signal under low exposure parameters is lower than the preset threshold, and the measured exposure value of the echo signal can more accurately represent the light amount of the echo signal. The overexposed part in the image can be processed by using the association between the grayscale data of the overexposed part and the grayscale data of the underexposed part.

[0061] More specifically, first, based on the exposure value of each pixel in the underexposed part, the I value and Q value of the pixel in the underexposed part are determined. Then, using the ratio of the exposure value of the overexposed part to the exposure value of the underexposed part, the I value and Q value of the pixel in the overexposed part are determined. Finally, the grayscale data is determined based on the I value and Q value of the pixel in the overexposed part.

[0062] Based on this, the present application proposes a grayscale image generation method based on multi-exposure for a TOF camera module, which comprises: acquiring exposure data collected by the TOF camera module, the exposure data comprising an underexposure part, a high exposure part and an overexposure part, wherein a first exposure parameter of the underexposure part is lower than a preset parameter value, and a second exposure parameter of the high exposure part and the overexposure part is higher than or equal to the preset parameter value, wherein the exposure value of each pixel in the overexposure part is higher than or equal to a preset threshold value; determining the I value and Q value of the pixel in the exposure data, comprising: based on the exposure value of each pixel in the underexposure part, Determine a first I value and a first Q value of the pixel points in the underexposure part; determine a second I value and a second Q value of the pixel points in the overexposure part based on the exposure value of each pixel point in the overexposure part; and determine a third I value and a third Q value of the pixel points in the overexposure part based on the exposure value of the pixel points in the overexposure part and the first I value and the first Q value of the pixel points in the underexposure part corresponding to the pixel points in the overexposure part; filter the I value and the Q value of the pixel points in the exposure data respectively; and determine grayscale data to generate a grayscale image based on the I value and the Q value of the pixel points in the filtered exposure data.

[0063] In addition, the present application also provides a grayscale image generation method based on multi-exposure for a TOF camera module, which includes: an exposure data acquisition unit, used to acquire exposure data collected by the TOF camera module, the exposure data including an underexposure part, a high exposure part and an overexposure part, wherein a first exposure parameter of the underexposure part is lower than a preset parameter value, and a second exposure parameter of the high exposure part and the overexposure part is higher than or equal to the preset parameter value, wherein the exposure value of each pixel point in the overexposure part is higher than or equal to a preset threshold value; a data determination unit, used to determine an I value and a Q value of a pixel point in the exposure data, wherein the I value and Q value determination unit includes: a first subunit, used to determine an I value and a Q value of a pixel point based on each pixel point in the underexposure part; a first I value and a first Q value of the pixel points in the underexposure part according to the exposure value of each pixel point in the overexposure part; a second subunit, for determining a second I value and a second Q value of the pixel points in the overexposure part based on the exposure value of the pixel points in the overexposure part and the first I value and the first Q value of the pixel points in the underexposure part corresponding to the pixel points in the overexposure part; a filtering unit, for filtering the I value and the Q value of the pixel points in the exposure data respectively; and a grayscale data processing unit, for determining grayscale data to generate a grayscale image based on the I value and the Q value of the pixel points in the filtered exposure data.

[0064] The present application also provides an electronic device, comprising: a memory; and a processor, wherein computer program instructions are stored in the memory, and when the computer program instructions are executed by the processor, the processor executes the multi-exposure based grayscale image generation method for the TOF camera module as described above.

[0065] After introducing the basic principles of the present application, various non-limiting embodiments of the present application will be described in detail with reference to the accompanying drawings.

[0066] First Exemplary Grayscale Image Generation Method

[0067] refer to Figures 1 to 3 According to an embodiment of the present application, a grayscale image generation method based on multi-exposure for a TOF camera module is explained, wherein the grayscale image generation method includes: S110, acquiring exposure data collected by the TOF camera module, the exposure data including an underexposure part, a high exposure part and an overexposure part, wherein a first exposure parameter of the underexposure part is lower than a preset parameter value, and a second exposure parameter of the high exposure part and the overexposure part is higher than or equal to the preset parameter value, wherein the exposure value of each pixel in the overexposure part is higher than or equal to a preset threshold value; S120, determining an I value and a Q value of a pixel in the exposure value; S130, filtering the I value and the Q value of a pixel in the exposure value respectively; and, S140, determining grayscale data based on the I value and the Q value of a pixel in the filtered exposure value to generate a grayscale image.

[0068] In step S110, exposure data collected by the TOF camera module is obtained. Specifically, the exposure data includes the low exposure part collected by the TOF camera module under a first exposure parameter and the high exposure part and the low exposure part collected by the TOF camera module under a second exposure parameter, wherein the first exposure parameter is lower than a preset parameter value, and the second exposure parameter is higher than or equal to the preset parameter value.

[0069] It is worth mentioning that in a specific example of the present application, the exposure data collected by the TOF camera module can be obtained from an external storage unit, that is, after the TOF camera module collects the exposure data of the measured target, it is first stored in the external storage unit, and can be retrieved from the external storage unit when it is needed. In this way, the data cache time can be shortened and the data processing efficiency can be improved. In addition, the use of an external storage unit to transmit data does not need to occupy internal storage space, reducing memory overhead.

[0070] In a specific implementation, the external storage unit is a double rate synchronous dynamic random access memory. Of course, the external storage unit can be implemented as other types of memory, such as static random access memory, which is not limited by the present application.

[0071] Furthermore, in an embodiment of the present application, the process of obtaining the exposure value collected by the TOF camera module includes: first obtaining the initial exposure data collected by the TOF camera module, where the initial exposure data refers to the data directly retrieved from the external storage unit.

[0072] Next, the valid data and invalid data in the initial exposure data are screened out using a preset threshold. Specifically, the exposure value of each pixel in the exposure data is compared with the preset threshold, and the part with an exposure value less than the preset threshold is determined as valid data, while the part with an exposure value greater than or equal to the preset threshold is determined as invalid data. In this embodiment, the valid data includes an underexposed part and an overexposed part, that is, the exposure values ​​of the pixels in the underexposed part and the overexposed part are lower than the preset threshold. Correspondingly, the invalid data includes an overexposed part, that is, the exposure values ​​of the pixels in the overexposed part are higher than or equal to the preset threshold.

[0073] It is worth mentioning that in other examples of the present application, the judgment criteria for invalid data and valid data can also be adjusted. For example, the part of the exposure value higher than or equal to the preset threshold is set as valid data, and the part lower than the preset threshold is set as invalid data. This is not limited to the present application.

[0074] That is, in this embodiment, obtaining the exposure value collected by the TOF camera module includes: S111, obtaining the initial exposure data collected by the TOF camera module; and, S112, parsing the valid data and invalid data in the initial exposure data based on the preset threshold, wherein the exposure value of each pixel in the valid data is lower than the preset threshold, and the exposure value of each pixel in the invalid data is higher than or equal to the preset threshold.

[0075] It is worth mentioning that in other examples of the present application, the process of filtering out valid data and invalid data from the initial exposure value can be performed at the front end, that is, in this example, the exposure data stored in the external storage unit has been divided into valid data and invalid data, that is, the overexposed part of the exposure value has been identified.

[0076] In step S120, the I value and Q value of the pixel in the exposure data are determined. Specifically, in this embodiment, the process of determining the I value and Q value of the pixel in the exposure data includes: firstly, based on the exposure value of each pixel in the low-exposure part, determining a first I value and a first Q value of the pixel in the low-exposure part.

[0077] Specifically, a person skilled in the art should know that the TOF camera module includes a laser projection unit and a photosensitive receiving unit. During operation, the laser projection unit projects a modulated signal with a preset wavelength to a target object and is reflected by the target object. Then, the photosensitive receiving unit receives an echo signal reflected back by the target object. Finally, the grayscale value is calculated based on the measured exposure value of the echo signal.

[0078] More specifically, the period of the modulation signal is T, and the TOF camera module performs one exposure at an interval of 1 / 4T under low exposure parameters. After four exposures, the exposure values ​​of the echo signal at four different times are obtained. The exposure values ​​of the echo signal received by the TOF camera module after four exposures are S(0), S(1), S(2) and S(3), respectively. The first I value of the pixel point of the low exposure part can be obtained by the following I value calculation formula, wherein the I value calculation formula is I=S(0)-S(2), and the first Q value of the pixel point of the low exposure part can be obtained by the following Q value calculation formula, wherein the Q value calculation formula is Q=S(3)-S(1).

[0079] Next, based on the exposure value of each pixel in the high-exposure part, the second I value and the second Q value of the pixel in the high-exposure part are determined. Specifically, first, the TOF camera module performs one exposure at an interval of 1 / 4T under high exposure parameters to obtain the exposure value of the echo signal at four different times. Next, the second I value and the second Q value of the pixel in the high-exposure part are obtained by the I value calculation formula and the Q value calculation formula.

[0080] As described above, when the amount of light of the echo signal received by the TOF camera module exceeds the range that can be represented by the preset threshold of the exposure value, the exposure value of the echo signal measured by the TOF camera module is difficult to accurately represent the real amount of light of the echo signal. The exposure value of each pixel in the overexposed part is higher than or equal to the preset threshold, and accordingly, the exposure value of each pixel in the overexposed part is difficult to accurately represent the real amount of light of the echo signal. Furthermore, the grayscale data obtained by the I value and Q value of the pixel of the high exposure part determined based on the exposure value of each pixel in the overexposed part is difficult to reflect the real grayscale of the target object. When the amount of light of the received echo signal is lower than the preset threshold, the exposure value of the echo signal measured by the TOF camera module can more accurately represent the amount of light of the echo signal. The correlation between the low exposure data and the overexposed data can be used to obtain the I value and Q value corresponding to the overexposure value, and then the grayscale data is determined based on the I value and Q value corresponding to the overexposure value.

[0081] Then, based on the exposure value of the pixel in the overexposed part and the first I value and the first Q value of the pixel in the underexposed part corresponding to the pixel in the overexposed part, a third I value and a third Q value of the pixel in the overexposed part are determined.

[0082] Specifically, in this embodiment, based on the exposure parameter of the overexposed part and the first I value and the first Q value of the pixel point of the underexposed part corresponding to the pixel point of the overexposed part, determining the third I value and the third Q value of the pixel point of the overexposed part includes: obtaining the third I value of the pixel point of the overexposed part by the following formula, wherein the formula is Among them, I new represents the third I value, I l represents the first I value, the Exposure h (Overexposure value) represents the exposure value of the pixel in the overexposed part. l (low exposure value) represents the exposure value of the pixel point in the underexposure part corresponding to the pixel point in the overexposure part; and the third Q value of the pixel point in the overexposure part is obtained by the following formula, wherein the formula is Among them, Q new represents the third Q value, Q l represents the first Q value, the Exposure h Indicates the exposure value of the pixel in the overexposed part. l Represents the exposure value of the pixel point in the underexposed part corresponding to the pixel point in the overexposed part.

[0083] By utilizing the correlation between underexposure data and overexposure data to obtain the I value and Q value corresponding to the overexposure value, and then determining the grayscale data, the influence of overexposure on the grayscale data during the grayscale data acquisition process can be effectively reduced, and the imaging quality of the grayscale image generated by the TOF camera module can be improved.

[0084] In summary, in this embodiment, the process of determining the I value and the Q value of the pixel point in the exposure value includes: S121, determining the first I value and the first Q value of the pixel point in the underexposure part based on the exposure value of each pixel point in the underexposure part; S122, determining the second I value and the second Q value of the pixel point in the overexposure part based on the exposure value of each pixel point in the overexposure part; and, S123, determining the third I value and the third Q value of the pixel point in the overexposure part based on the exposure value of the pixel point in the overexposure part and the first I value and the first Q value of the pixel point in the underexposure part corresponding to the pixel point in the overexposure part.

[0085] Optionally, in order to further improve the quality of the grayscale image generated by the TOF camera module, the I value and Q value of the pixel point in the exposure data may be filtered.

[0086] In step S130, the I value and Q value of the pixel point in the exposure data are filtered respectively. Specifically, first, the I value and Q value of the pixel point in the exposure data are subjected to a fast Fourier transform, and the I value and Q value of the pixel point in the exposure data can be converted into a corresponding frequency value by the fast Fourier transform, so as to filter out the I value and Q value within a preset frequency range.

[0087] Next, in order to facilitate data processing, the Fourier I transform value and the Fourier Q transform value may be normalized to convert the I value and Q value after the fast Fourier transform into a specific range. Specifically, the normalization method may be selected according to actual conditions, for example, the Fourier I transform value may be normalized using the maximum Fourier I transform value to obtain the normalized I transform value, and the Fourier Q transform value may be normalized using the maximum Fourier Q transform value to obtain the normalized Q transform value.

[0088] Optionally, the normalized I transform value is obtained by the following formula, wherein the formula is new =I1 / I max , where I new represents the normalized I transform value, I1 represents the Fourier I transform value, I max represents the maximum Fourier I transform value; and the normalized Q transform value is obtained by the following formula, wherein the formula is: Q new =Q1 / Q max , where Q newrepresents the normalized Q transform value, Q1 represents the Fourier Q transform value, Q max It should be understood that the Fourier I transform value can be normalized by other methods, which is also not limited by the present application.

[0089] Finally, the normalized I transform value within the first preset frequency range and the normalized Q transform value within the second preset frequency range are filtered to obtain the filtered I value and the filtered Q value. Specifically, the I value of the pixel point in the exposure data corresponding to the normalized I transform value that is not filtered is the filtered I value, and the Q value of the pixel point in the exposure data corresponding to the normalized Q value transform value that is not filtered is the filtered Q value. It is worth mentioning that, according to actual application conditions, the first preset frequency range and the second preset frequency range can be set to the same range or to different ranges, which is not limited to this application.

[0090] That is, step S130, filtering the I value and Q value of the pixel point in the exposure data respectively, includes: S131, performing fast Fourier transform on the I value and Q value of the pixel point in the exposure data respectively to generate Fourier I transform value and Fourier Q transform value; S132, normalizing the Fourier I transform value and the Fourier Q transform value respectively to obtain normalized I transform value and normalized Q transform value; and, S133, filtering out the normalized I transform value within the first preset frequency range and the normalized Q transform value within the second preset frequency range to obtain the filtered I value and the filtered Q value.

[0091] In step S140, grayscale data is determined based on the I value and Q value of the pixel in the filtered exposure data to generate a grayscale image. Specifically, the grayscale data is obtained by the following formula, wherein the formula is: G=|I|+|Q|, wherein |I| represents the absolute value of the I value of the pixel in the filtered exposure data, and |Q| represents the absolute value of the Q value of the pixel in the filtered exposure data.

[0092] In summary, the multi-exposure based grayscale image generation method for the TOF camera module is explained, and the grayscale image generation method can effectively reduce the influence of overexposure on the grayscale data during the grayscale data acquisition process, so as to improve the quality of the grayscale image generated by the TOF camera module, and can process the data in parallel to improve the data processing rate.

[0093] Second Exemplary Grayscale Image Generation Method

[0094] It is worth mentioning that in other examples of the present application, the grayscale data algorithm based on multi-exposure can be executed by a chip that performs data processing in a parallel manner. Specifically, first obtain a portion of the exposure data collected by the TOF camera module, for example, the high-exposure part and the over-exposure part, and determine the I value and Q value of the pixel points in the partial exposure data. In parallel with this data processing process, obtain another portion of the exposure data collected by the TOF camera module and determine the I value and Q value of the pixel points in the other portion of the exposure data. Furthermore, based on the exposure parameters of the over-exposed part and the first I value and the first Q value of the pixel points of the under-exposed part corresponding to the pixel points of the over-exposed part, determine the third I value and the third Q value of the pixel points of the over-exposed part.

[0095] That is, in this example, the grayscale image generation method based on multi-exposure for the TOF camera module includes: S610, obtaining high exposure data collected by the TOF camera module under the second exposure parameter, the high exposure data including a high exposure part and an over-exposure part, wherein the second exposure parameter is higher than the preset parameter value, and the exposure value of each pixel in the over-exposure part is higher than or equal to the preset threshold value; S620, based on the exposure value of each pixel in the high exposure part, determining the second I value and the second Q value of the pixel in the high exposure part; S630, obtaining the low exposure part collected by the TOF camera module under the first exposure parameter, wherein the The first exposure parameter is lower than the preset parameter value; S640, based on the exposure value of each pixel in the underexposed part, determine the first I value and the first Q value of the pixel in the underexposed part; S650, based on the exposure value of the pixel in the overexposed part and the first I value and the first Q value of the pixel in the underexposed part corresponding to the pixel in the overexposed part, determine the third I value and the third Q value of the pixel in the overexposed part; S660, filter the I value and the Q value of the pixel in the exposure data respectively; and, S670, determine the grayscale data based on the I value and the Q value of the pixel in the filtered exposure data to generate a grayscale image, such as Figure 4 shown.

[0096] It is worth mentioning that the high-exposure part, over-exposure part and under-exposure part of the exposure value collected by the TOF camera module can be obtained from an external acquisition unit. The amount of data acquired at a single time can be selected according to the actual application situation, for example, 128*32bit, 256*32bit. Moreover, the data is processed while being acquired, that is, there is no need to wait for the complete data (for example, a row of data, a frame of data) to be acquired before processing the data. Similarly, multiple data processing processes can be executed in parallel, which can improve data processing efficiency.

[0097] Specifically, in a specific example of the present application, step S610 and step 620, as well as step S630 and step S640 are executed in parallel. That is, in the process of obtaining the high-exposure part and the low-exposure part, the second I value and the second Q value of the pixel point of the high-exposure part can be determined based on the exposure value of each pixel point in the high-exposure part, without waiting for all the high-exposure parts and over-exposure parts to be obtained before calculating the second I value and the second Q value. Similarly, in the process of obtaining the low-exposure part, the first I value and the first Q value of the pixel point of the low-exposure part can be determined based on the exposure value of each pixel point in the low-exposure part, without waiting for all the low-exposure parts to be obtained before calculating the first I value and the first Q value.

[0098] In particular, step S640 and step S650 are performed in parallel, that is, it is not necessary to obtain the first I value and the first Q value corresponding to all the pixels in the underexposed part before calculating the third I value and the third Q value. In other words, in the process of determining the first I value and the first Q value, the third I value and the third Q value of the pixel in the overexposed part may be determined based on the exposure value of the pixel in the overexposed part and the first I value and the first Q value of the pixel in the underexposed part corresponding to the pixel in the overexposed part.

[0099] In another specific example of the present application, step S610 and step S630, as well as step S620 and step S640 are performed in parallel. That is, the underexposure part can be obtained while the overexposure part and the overexposure part are obtained, without waiting for the underexposure part to be obtained after the overexposure part and the overexposure part are obtained.

[0100] Here, those skilled in the art can understand that the specific process of obtaining the exposure value collected by the TOF camera module, determining the I value and Q value of the pixel in the exposure value, filtering the I value and Q value of the pixel in the exposure value, and obtaining the grayscale data is described in the above reference. Figures 1 to 3 The multi-exposure based grayscale image generation method for TOF camera module is introduced in detail, and therefore, its repeated description will be omitted.

[0101] In this example, the method for generating grayscale images based on multiple exposures for a TOF camera module is executed by a parallel chip, such as an FPGA chip. It should be understood that the method for generating grayscale images based on multiple exposures for a TOF camera module can be executed by other parallel chips with parallel computing functions, such as an ASIC chip or a SOC chip.

[0102] Exemplary grayscale image generation device

[0103] According to another aspect of the present application, a multi-exposure based grayscale image generation device for a TOF camera module is also provided.

[0104] like Figures 5 to 7 As shown, a grayscale image generating device 100 for a TOF camera module according to an embodiment of the present application is illustrated. Specifically, the grayscale image generating device 100 includes: an exposure value acquiring unit 10, which acquires exposure data collected by the TOF camera module, the exposure data including an underexposure part, an overexposure part and an overexposure part, wherein the first exposure parameter of the underexposure part is lower than a preset parameter value, and the second exposure parameters of the overexposure part and the overexposure part are higher than or equal to the preset parameter value, wherein the exposure value of each pixel point in the overexposure part is higher than or equal to a preset threshold value; a data determining unit 20, which is used to determine the I value and Q value of the pixel point in the exposure value, wherein the I value and Q value determining unit 20 includes: a first subunit 21, which is used to determine the exposure value of each pixel point in the underexposure part based on the exposure value of each pixel point in the underexposure part. a first I value and a first Q value of the pixel points of the overexposed part; a second subunit 22, used to determine the second I value and the second Q value of the pixel points of the overexposed part based on the exposure values ​​of each pixel point in the overexposed part; and a third subunit 23, used to determine the third I value and the third Q value of the pixel points of the overexposed part based on the exposure values ​​of the pixel points in the overexposed part and the first I value and the first Q value of the pixel points of the underexposed part corresponding to the pixel points of the overexposed part; a filtering unit 30, used to filter the I value and the Q value of the pixel points in the exposure data respectively; and a grayscale data processing unit 40, used to determine grayscale data to generate a grayscale image based on the I value and the Q value of the pixel points in the filtered exposure data.

[0105] Here, those skilled in the art can understand that the specific functions and operations of the various units and modules in the above-mentioned grayscale image generation device 100 based on multi-exposure for TOF camera module have been described in the above reference. Figures 1 to 4 The multi-exposure based grayscale image generation method for the TOF camera module has been introduced in detail, and therefore, its repeated description will be omitted.

[0106] As described above, the grayscale image generating device 100 based on multi-exposure for the TOF camera module according to the embodiment of the present application can be implemented in the TOF camera module. In one example, the grayscale image generating device 100 according to the embodiment of the present application can be integrated into the TOF camera module as a software module and / or a hardware module. For example, the grayscale image generating device 100 can be a software module in the operating system of the TOF camera module, or it can be an application developed for the TOF camera module; of course, the grayscale image generating device 100 can also be one of the many hardware modules of the TOF camera module.

[0107] Alternatively, in another example, the grayscale image generating device 100 and the TOF camera module may also be separate devices, and the grayscale image generating device 100 may be connected to the TOF camera module via a wired and / or wireless network and transmit interactive information in accordance with an agreed data format.

[0108] Exemplary Electronic Devices

[0109] According to another aspect of the present application, an electronic device 80 is also provided. Figure 8 The electronic device 80 includes a memory 81 and a processor 82. The memory 81 stores computer program instructions, and when the computer program instructions are executed by the processor 82, the processor 82 executes the grayscale image generation method based on multi-exposure for the TOF camera module as described above.

[0110] Here, those skilled in the art will appreciate that the specific functions and operations of the processor 82 have been described above with reference to Figures 1 to 4 The multi-exposure based grayscale image generation method for the TOF camera module has been introduced in detail, and therefore, its repeated description will be omitted.

[0111] It should be understood by those skilled in the art that the embodiments of the present application described above and shown in the accompanying drawings are only examples and do not limit the present application. The purpose of the present application has been fully and effectively achieved. The functions and structural principles of the present application have been demonstrated and explained in the embodiments, and the embodiments of the present application may be deformed or modified in any way without departing from the principles.

Claims

1. A method for generating grayscale images based on multiple exposures for a TOF camera module, characterized in that: include: Acquire exposure data collected by the TOF camera module, wherein the exposure data includes an underexposed part, an overexposed part, and an overexposed part, wherein a first exposure parameter of the underexposed part is lower than a preset parameter value, and second exposure parameters of the overexposed part and the overexposed part are higher than or equal to the preset parameter value, wherein an exposure value of each pixel in the overexposed part is higher than or equal to a preset threshold value; Determining an I value and a Q value of a pixel in the exposure data includes: Determining a first I value and a first Q value of the pixel points in the low-exposure part based on the exposure value of each pixel point in the low-exposure part; Determining a second I value and a second Q value of the pixel points in the high exposure part based on the exposure value of each pixel point in the high exposure part; and Determine a third I value and a third Q value of the pixel points in the overexposed part based on the exposure value of the pixel points in the overexposed part and the first I value and the first Q value of the pixel points in the underexposed part corresponding to the pixel points in the overexposed part; filtering the I value and Q value of the pixel points in the exposure data respectively; and Based on the I value and Q value of the pixel point in the filtered exposure data, grayscale data is determined to generate a grayscale image.

2. The method for generating a grayscale image based on multiple exposures for a TOF camera module according to claim 1, wherein: Determining a third I value and a third Q value of the pixel points in the overexposed part based on the exposure value of the pixel points in the overexposed part and the first I value and the first Q value of the pixel points in the underexposed part corresponding to the pixel points in the overexposed part, comprises: The third I value of the pixel point of the overexposed part is obtained by the following formula, wherein the formula is Among them, I new represents the third I value, I l represents the first I value, the Exposure h Indicates the exposure value of the pixel in the overexposed part. l represents the exposure value of the pixel point in the underexposed part corresponding to the pixel point in the overexposed part; and The third Q value of the pixel point of the overexposed part is obtained by the following formula, wherein the formula is Among them, Q new represents the third Q value, Q l represents the first Q value, the Exposure h Indicates the exposure value of the pixel in the overexposed part. l Represents the exposure value of the pixel point in the underexposed part corresponding to the pixel point in the overexposed part.

3. The method for generating a grayscale image based on multiple exposures for a TOF camera module according to claim 1, wherein: Filtering the I value and Q value of the pixel points in the exposure data respectively includes: Performing fast Fourier transform on the I value and Q value of the pixel point in the exposure data respectively to generate Fourier I transform value and Fourier Q transform value; Normalizing the Fourier I transform value and the Fourier Q transform value to obtain a normalized I transform value and a normalized Q transform value, respectively; and The normalized I transform values ​​within the first preset frequency range and the normalized Q transform values ​​within the second preset frequency range are filtered out to obtain filtered I values ​​and filtered Q values.

4. The method for generating a grayscale image based on multiple exposures for a TOF camera module according to claim 1, wherein: Get the exposure data collected by the TOF camera module, including: Acquire the exposure data collected by the TOF camera module from the external storage unit.

5. The method for generating grayscale images based on multiple exposures for a TOF camera module according to claim 4, wherein: Get the exposure data collected by the TOF camera module, including: Obtaining initial exposure data collected by the TOF camera module; and Based on the preset threshold, valid data and invalid data in the initial exposure data are parsed out, wherein the exposure value of each pixel in the valid data is lower than the preset threshold, and the exposure value of each pixel in the invalid data is higher than or equal to the preset threshold.

6. The method for generating a grayscale image based on multiple exposures for a TOF camera module according to claim 4, wherein: The external storage unit is a double rate synchronous dynamic random access memory.

7. A method for generating grayscale images based on multiple exposures for a TOF camera module, characterized in that: include: Acquire high exposure data collected by the TOF camera module under a second exposure parameter, wherein the high exposure data includes a high exposure part and an overexposure part, wherein the second exposure parameter is higher than a preset parameter value, and the exposure value of each pixel in the overexposure part is higher than or equal to a preset threshold value; Determining a second I value and a second Q value of the pixel points in the high exposure part based on the exposure value of each pixel point in the high exposure part; Acquire a low-exposure portion captured by a TOF camera module under a first exposure parameter, wherein the first exposure parameter is lower than the preset parameter value; Determining a first I value and a first Q value of the pixel points in the low-exposure part based on the exposure value of each pixel point in the low-exposure part; Determine a third I value and a third Q value of the pixel points in the overexposed part based on the exposure value of the pixel points in the overexposed part and the first I value and the first Q value of the pixel points in the underexposed part corresponding to the pixel points in the overexposed part; filtering the I value and Q value of the pixel points in the exposure data respectively; and Based on the I value and Q value of the pixel point in the filtered exposure data, grayscale data is determined to generate a grayscale image.

8. The method for generating grayscale images based on multiple exposures for a TOF camera module according to claim 7, wherein: The multi-exposure based grayscale image generation method for the TOF camera module is executed through parallel chips.

9. The method for generating grayscale images based on multiple exposures for a TOF camera module according to claim 7, wherein: Determining the first I value and the first Q value of the pixel points in the underexposed part based on the first exposure value of each pixel point in the underexposed part, and determining the third I value and the third Q value of the pixel points in the overexposed part based on the exposure value of the pixel points in the overexposed part and the first I value and the first Q value of the pixel points in the underexposed part corresponding to the pixel points in the overexposed part are performed in parallel.

10. A grayscale image generation device based on multi-exposure for a TOF camera module, characterized in that: include: An exposure data acquisition unit, used to acquire exposure data collected by the TOF camera module, wherein the exposure data includes an underexposed part, an overexposed part, and an overexposed part, wherein a first exposure parameter of the underexposed part is lower than a preset parameter value, and a second exposure parameter of the overexposed part and the overexposed part is higher than or equal to the preset parameter value, wherein an exposure value of each pixel in the overexposed part is higher than or equal to a preset threshold value; A data determination unit, used to determine an I value and a Q value of a pixel in the exposure data, wherein the I value and Q value determination unit comprises: A first subunit, configured to determine a first I value and a first Q value of a pixel point in the low exposure part based on an exposure value of each pixel point in the low exposure part; A second subunit, configured to determine a second I value and a second Q value of the pixel points in the high exposure part based on the exposure value of each pixel point in the high exposure part; and A third subunit is used for determining a third I value and a third Q value of the pixel points in the overexposed part based on the exposure value of the pixel points in the overexposed part and the first I value and the first Q value of the pixel points in the underexposed part corresponding to the pixel points in the overexposed part; A filtering unit, configured to filter the I value and Q value of the pixel points in the exposure data respectively; and The grayscale data processing unit is used to determine the grayscale data based on the I value and Q value of the pixel point in the filtered exposure data to generate a grayscale image.

11. The device for generating grayscale images based on multiple exposures for a TOF camera module according to claim 10, wherein: The third subunit is further used for: The third I value of the pixel point of the overexposed part is obtained by the following formula, wherein the formula is Among them, I new represents the third I value, I l represents the first I value, the Exposure h Indicates the exposure value of the pixel in the overexposed part. l represents the exposure value of the pixel point in the underexposed part corresponding to the pixel point in the overexposed part; and The third Q value of the pixel point of the overexposed part is obtained by the following formula, wherein the formula is Among them, Q new represents the third Q value, Q l represents the first Q value, the Exposure h Indicates the exposure value of the pixel in the overexposed part. l Represents the exposure value of the pixel point in the underexposed part corresponding to the pixel point in the overexposed part.

12. The device for generating grayscale images based on multiple exposures for a TOF camera module according to claim 10, wherein: The filtering unit is further configured to: Performing fast Fourier transform on the I value and Q value of the pixel point in the exposure data respectively to generate Fourier I transform value and Fourier Q transform value; Normalizing the Fourier I transform value and the Fourier Q transform value to obtain a normalized I transform value and a normalized Q transform value, respectively; as well as The normalized I transform values ​​within the first preset frequency range and the normalized Q transform values ​​within the second preset frequency range are filtered out to obtain filtered I values ​​and filtered Q values.

13. An electronic device, characterized in that: include: Memory; and A processor, wherein computer program instructions are stored in the memory, and when the computer program instructions are executed by the processor, the processor executes the grayscale image generation method based on multi-exposure for the TOF camera module as described in any one of claims 1 to 6 or the grayscale image generation method based on multi-exposure for the TOF camera module as described in any one of claims 7 to 9.

Citation Information

Patent Citations

  • Overexposure shooting method and device

    CN104104886A

  • Method for detecting image flicker stripes and method for adjusting image exposure time

    CN110213497A

  • Image processor, image processing method and imaging apparatus

    JP2013138301A