Black level correction method, device, computer equipment and medium

By acquiring the image in a completely black environment and calculating the difference value of the color channel, determining the black level correction image, and applying it to the image in a normal environment for correction, the problem of inaccurate black level correction in traditional methods is solved, and the image quality is improved.

CN114257764BActive Publication Date: 2025-06-13SHANGHAI WINGTECH ELECTRONICS TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111483572.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-07
Publication Date
2025-06-13
Estimated Expiration
2041-12-07

AI Technical Summary

Technical Problem

The traditional black level correction method produces different black level values ​​in a completely black environment because each color channel of the image signal produces different black level values, resulting in inaccurate correction and large errors are prone to occur.

Method used

By acquiring the first image in an all-black environment, the difference between the value of each color channel in its photosensitive array and the preset black level value is determined, based on these differences, the black level correction image is determined, and applied to the second image in a normal environment for correction.

Benefits of technology

Improve the accuracy of black level correction and reduce correction errors. Especially when shooting scenes such as night scenes, it avoids the problem of color distortion in dark light and improves image quality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114257764B_ABST
    Figure CN114257764B_ABST
Patent Text Reader

Abstract

The present disclosure relates to a black level correction method, apparatus, computer device, and medium; wherein, the method includes: determining the difference between the value corresponding to each color channel in the photosensitive array of the first image in a full black environment and a preset black level value; determining a black level correction image corresponding to the first image based on all the differences; and correcting the second image in a normal environment according to the black level correction image to obtain a corrected image. The embodiments of the present disclosure can correct the black level, which is beneficial to solving the problem of color distortion of low light in scenes such as night shooting by multi-frame algorithms and improving the image quality.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of image processing, and in particular, to a black level correction method, apparatus, computer device, and medium. Background Art

[0002] In recent years, Complementary Metal Oxide Semiconductor (CMOS) sensors have received attention due to their advantages such as small size, low power consumption, and low cost, and are widely used in imaging products such as digital cameras, dash cams, and action cameras. To obtain better imaging effects, the image processing chip of a camera performs a series of processes on the image signals of the CMOS sensor, including black level correction.

[0003] Generally, in a completely dark environment, the CMOS sensor does not detect light, but the image signal at this time is not zero (usually zero represents complete darkness), which generates a black level. The traditional black level correction method is to set an offset value to correct the image signal to zero. However, due to problems such as manufacturing process and structural differences, different black level values will be generated in each color channel of the image signal. Therefore, using the above method for black level correction is not accurate enough and is prone to large errors. Summary of the Invention

[0004] To solve the above technical problems, the present disclosure provides a black level correction method, apparatus, computer device, and medium.

[0005] An embodiment of the present disclosure provides a black level correction method, the method including:

[0006] Determine the difference between the value corresponding to each color channel in the photosensitive array of the first image in a completely dark environment and a preset black level value;

[0007] Based on all the differences, determine a black level correction image corresponding to the first image;

[0008] According to the black level correction image, correct the second image in a normal environment to obtain a corrected image.

[0009] In one embodiment, the determining, based on all the differences, a black level correction image corresponding to the first image includes:

[0010] Arrange all the differences according to the arrangement of each color channel in the photosensitive array of the first image to obtain an arrangement result;

[0011] Based on the arrangement result, obtain a black level correction image corresponding to the first image.

[0012] In one embodiment, before determining the difference between the value corresponding to each color channel in the photosensitive array of the first image in a completely black environment and a preset black level value, the following steps are further included:

[0013] Obtain the first image in a completely black environment;

[0014] Determine the value corresponding to each color channel in the photosensitive array according to the first image.

[0015] In one embodiment, the obtaining of the first image in a completely black environment includes:

[0016] In a completely black environment, use an image acquisition device to capture a preset object to obtain multiple frames of original images;

[0017] Synthesize the multiple frames of original images through corresponding algorithms to obtain the first image.

[0018] In one embodiment, the preset black level value is determined by the following method:

[0019] In a completely black environment, use an image acquisition device to capture a preset object to obtain multiple frames of original images;

[0020] Determine a frame of target image from the multiple frames of original images;

[0021] Perform weighted averaging on the values corresponding to each color channel in the photosensitive array of the target image to obtain the preset black level value.

[0022] In one embodiment, the correcting the second image in a normal environment according to the black level corrected image to obtain a corrected image includes:

[0023] For each color channel in the photosensitive array of the second image, determine the target difference between the value corresponding to the current color channel and the value of the corresponding color channel in the black level corrected image. When the absolute value of the target difference is greater than a preset threshold, correct the value corresponding to the current color channel according to the target difference to obtain a correction result;

[0024] Based on all correction results, determine the corrected image.

[0025] In one embodiment, the second image is obtained by the following method:

[0026] In a normal environment, use an image acquisition device to capture a target object to obtain multiple frames of images;

[0027] Synthesize the multiple frames of images through corresponding algorithms to obtain the second image.

[0028] An embodiment of the present disclosure provides a black level correction device, which includes:

[0029] A first determination module, configured to determine the difference between the value corresponding to each color channel in the photosensitive array of the first image in a full black environment and a preset black level value;

[0030] A second determination module, configured to determine a black level correction image corresponding to the first image based on all the differences;

[0031] A correction module, configured to correct the second image in a normal environment according to the black level correction image to obtain a corrected image.

[0032] In one embodiment, the second determination module is specifically configured to:

[0033] Arrange all the differences according to the arrangement manner of each color channel in the photosensitive array of the first image to obtain an arrangement result;

[0034] Based on the arrangement result, obtain a black level correction image corresponding to the first image.

[0035] In one embodiment, the device further includes:

[0036] An acquisition module, configured to acquire the first image in a full black environment before determining the difference between the value corresponding to each color channel in the photosensitive array of the first image in a full black environment and a preset black level value;

[0037] A third determination module, configured to determine the value corresponding to each color channel in the photosensitive array according to the first image.

[0038] In one embodiment, the acquisition module is specifically configured to:

[0039] Take pictures of a preset object through an image acquisition device in a full black environment to obtain multiple frames of original images;

[0040] Synthesize the multiple frames of original images through a corresponding algorithm to obtain the first image.

[0041] In one embodiment, the preset black level value is determined by the following method:

[0042] Take pictures of a preset object through an image acquisition device in a full black environment to obtain multiple frames of original images;

[0043] Determine a target image from the multiple frames of original images;

[0044] Perform weighted averaging on the values corresponding to each color channel in the photosensitive array of the target image to obtain a preset black level value.

[0045] In one embodiment, the correction module is specifically configured to:

[0046] For each color channel in the photosensitive array of the second image, determine the target difference between the value corresponding to the current color channel and the value of the corresponding color channel in the black level correction image. When the absolute value of the target difference is greater than a preset threshold, correct the value corresponding to the current color channel according to the target difference to obtain a correction result;

[0047] Based on all the correction results, determine the corrected image.

[0048] In one embodiment, the second image is obtained in the following manner:

[0049] Under normal environment, use an image acquisition device to capture the target object to obtain multiple frames of images;

[0050] Synthesize the multiple frames of images through corresponding algorithms to obtain the second image.

[0051] The embodiments of the present disclosure provide a computer device, including a memory and a processor. The memory stores a computer program, and when the processor executes the computer program, the steps of the black level correction method provided in any embodiment of the present disclosure are implemented.

[0052] The embodiments of the present disclosure provide a computer-readable storage medium, on which a computer program is stored. When the program is executed by a processor, the steps of the black level correction method provided in any embodiment of the present disclosure are implemented.

[0053] The technical solutions provided by the embodiments of the present disclosure have the following advantages compared with the prior art: First, determine the difference between the value corresponding to each color channel in the photosensitive array of the first image in a completely black environment and the preset black level value. Then, based on all the differences, determine the black level correction image corresponding to the first image. Finally, according to the black level correction image, correct the second image in a normal environment to obtain the corrected image. Through the above solution, the black level can be corrected, which is beneficial to solving the problem of color distortion of low light in scenes such as shooting night scenes by the multi-frame algorithm and improving the image quality. BRIEF DESCRIPTION OF THE DRAWINGS

[0054] The accompanying drawings herein are incorporated into the specification and constitute a part of this specification, showing embodiments consistent with the present disclosure and used together with the specification to explain the principles of the present disclosure.

[0055] To more clearly illustrate the technical solutions in the embodiments of the present disclosure or the prior art, the following will briefly introduce the accompanying drawings required for the description of the embodiments or the prior art. Obviously, for those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.

[0056] Figure 1 is a schematic flowchart of a black level correction method provided by an embodiment of the present disclosure;

[0057] Figure 2 is a schematic flowchart of another black level correction method provided by an embodiment of the present disclosure;

[0058] Figure 3 is a schematic flowchart of yet another black level correction method provided by an embodiment of the present disclosure;

[0059] Figure 4 is a schematic structural diagram of a black level correction device provided by an embodiment of the present disclosure;

[0060] Figure 5 is a schematic structural diagram of a computer device provided by an embodiment of the present disclosure. Detailed Embodiments

[0061] In order to more clearly understand the above-mentioned objects, features, and advantages of the present disclosure, the following will further describe the solutions of the present disclosure. It should be noted that, without conflict, the embodiments of the present disclosure and the features in the embodiments can be combined with each other.

[0062] In the following description, many specific details are set forth to fully understand the present disclosure, but the present disclosure can also be implemented in other ways different from those described herein; obviously, the embodiments in the specification are only a part of the embodiments of the present disclosure, rather than all of the embodiments.

[0063] In one embodiment, as Figure 1 shown, a black level correction method is provided. In this embodiment, it is mainly exemplified that this method is applied to a terminal. It can be understood that this method can also be applied to a server, and can also be applied to a system including a terminal and a server, and is implemented through the interaction between the terminal and the server. In this embodiment, the method includes the following steps:

[0064] S110. Determine the difference between the value corresponding to each color channel in the photosensitive array of the first image in a full black environment and a preset black level value.

[0065] Among them, the all-black environment can be understood as an environment without light sources. The first image can be understood as a RAW (unprocessed) image obtained in the all-black environment. A RAW image can be understood as the original data in which a CMOS or Charge Coupled Device (CCD) image sensor converts the captured light source signal into a digital signal. The photosensitive array can be understood as a mosaic color filter array formed by arranging RGB (Red Green Blue) color filters on the grid of the light sensing component. 50% of its arrangement is green, 25% is red, and the other 25% is blue. Therefore, it is also called RGBG, GRGB, or RGGB. The photosensitive array is usually arranged in the form of an N×N grid (N is a positive integer), where each grid corresponds to a color channel. Taking RGGB as an example, the color channels in odd rows are usually arranged in the order of R, G, R, G, …, G, and the color channels in even rows are usually arranged in the order of G, B, G, …, B. The preset black level value can be a preset black level value or can be determined according to specific circumstances. This embodiment does not make specific restrictions.

[0066] In the prior art, the image information collected by a CMOS sensor is converted to generate the original RAW format image data. Taking 8-bit (binary digit, abbreviated as bit) data as an example, the effective value of a single pixel is 0 - 255. However, the actual Analogue Digital (AD) chip cannot convert a very small part of the voltage value. Therefore, CMOS sensor manufacturers generally add a fixed offset before the input of the AD chip to make the effective value of a single pixel output between 5 (not fixed, it can also be other values) - 255. At the same time, the RAW domain multi-frame algorithm is widely used in processes such as terminal photography, image fusion, and video processing. In the field of terminal photography, for example, by continuously taking multiple frames of images in a very short time and aligning and fusing them into one frame of image, the process may involve image multi-frame synthesis noise reduction technology. At this time, the fused image may have a problem of color cast of dark light at the four corners.

[0067] Through research, it is found that the above problems are mainly caused by inaccurate Black Level Correction (BLC). Therefore, it is very necessary to correct the black level. In this embodiment, by obtaining the first image in the all-black environment, interference from other factors can be excluded. Then, by determining the difference between the value corresponding to each color channel in the photosensitive array of the first image and the preset black level value, the difference between the first image and the preset black level value can be obtained, which is convenient for subsequently determining the black level correction image corresponding to the first image according to all the differences.

[0068] S120. Determine a black level correction image corresponding to the first image based on all the differences.

[0069] After obtaining the differences between the values corresponding to each color channel in the photosensitive array of the first image and the preset black level value, based on the positions corresponding to each difference among all the differences, a black level correction image corresponding to the first image can be determined.

[0070] S130. Correct the second image in a normal environment according to the black level correction image to obtain a corrected image.

[0071] Among them, the normal environment can be understood as other shooting environments without shading. The second image can be understood as a RAW image obtained in a normal environment.

[0072] After obtaining the black level correction image, taking the black level correction image as a reference, compare the values corresponding to each color channel in the photosensitive array of the second image with the values of the corresponding color channels in the black level correction image, and it can be determined which color channels need to be corrected and which color channels do not need to be corrected. Then, correct the color channels that need to be corrected and keep the color channels that do not need to be corrected unchanged, and a corrected image can be obtained.

[0073] The black level correction method provided in this embodiment first determines the differences between the values corresponding to each color channel in the photosensitive array of the first image in a completely black environment and the preset black level value, then determines a black level correction image corresponding to the first image based on all the differences, and finally corrects the second image in a normal environment according to the black level correction image to obtain a corrected image. Through the above solution, the black level can be corrected, which is beneficial to solving the problem of color distortion of low light in scenes such as shooting night scenes in multi-frame algorithms and improving the image quality.

[0074] In this embodiment, optionally, before determining the differences between the values corresponding to each color channel in the photosensitive array of the first image in a completely black environment, it may specifically include:

[0075] Obtain the first image in a completely black environment;

[0076] Determine the values corresponding to each color channel in the photosensitive array according to the first image.

[0077] In this embodiment, by obtaining the first image in a completely black environment, the values corresponding to each color channel in the photosensitive array of the first image are determined according to the first image, which is simple and fast, can save time, and is convenient for the execution of subsequent processes.

[0078] In this embodiment, optionally, obtaining the first image in a completely black environment may specifically include:

[0079] In a completely dark environment, a preset object is photographed by an image acquisition device to obtain multiple frames of original images;

[0080] The multiple frames of original images are synthesized through corresponding algorithms to obtain a first image.

[0081] Among them, the image acquisition device can be various electronic devices with a photographing function, such as a camera or a camera, etc. The preset object can be any object in the predefined natural world, or it can be determined according to specific circumstances, and this embodiment does not make specific limitations.

[0082] Specifically, since black level inaccuracies will be further caused during the fusion of multiple frames of images, photographing a preset object by an image acquisition device in a completely dark environment can obtain multiple frames of original images. After obtaining the multiple frames of original images, through corresponding algorithms, such as image fusion algorithms based on non-scale transformation, image fusion algorithms based on principal component analysis, or image fusion algorithms based on deep learning, etc., the multiple frames of images are synthesized to obtain the first image.

[0083] In this embodiment, obtaining the first image through the above method is more in line with the actual situation and is beneficial to the subsequent black level correction process.

[0084] In this embodiment, optionally, the preset black level value can be determined in the following manner:

[0085] In a completely dark environment, a preset object is photographed by an image acquisition device to obtain multiple frames of original images;

[0086] Determine a frame of target image from the multiple frames of original images;

[0087] The values corresponding to each color channel in the photosensitive array of the target image are weighted and averaged to obtain the preset black level value.

[0088] Specifically, since black level inaccuracies will be further caused during the fusion of multiple frames of images, and the black level corresponding to a single frame of image is relatively stable and accurate. At the same time, in order to exclude the interference of other factors, a preset object is photographed by an image acquisition device in a completely dark environment to obtain multiple frames of original images. Then, a frame of image can be randomly selected from the multiple frames of original images as the target image, or the image with the smallest fluctuation range of the black level value among the multiple frames of original images can be used as the target image. After obtaining the target image, the values corresponding to each color channel in the photosensitive array of the target image are weighted and averaged. It can be to sum up the values corresponding to all color channels of the entire target image and then average them, or to average them after setting different weighting coefficients for the color channels. This embodiment does not make specific limitations. After the weighted average, the preset black level value is obtained.

[0089] In this embodiment, the preset black level value is determined by the above method, which is simple, effective and low-cost, without the need to incur high costs.

[0090] Figure 2 It is a flowchart of another black level correction method provided by an embodiment of the present disclosure. This embodiment is further extended and optimized on the basis of the above embodiment. Among them, a possible implementation manner of S120 is as follows:

[0091] S1201, arrange all the differences according to the arrangement mode of each color channel in the photosensitive array of the first image to obtain an arrangement result.

[0092] After obtaining the differences between the values corresponding to each color channel in the photosensitive array of the first image and the preset black level value, since each difference corresponds to the corresponding color channel, arranging all the differences according to the arrangement mode of each color channel in the photosensitive array of the first image can obtain the arrangement result.

[0093] S1202, based on the arrangement result, obtain a black level correction image corresponding to the first image.

[0094] After obtaining the arrangement result, displaying the arrangement result in the form of an image can obtain a black level correction image corresponding to the first image, which is convenient for subsequently correcting the second image in a normal environment according to the black level correction image, thereby being beneficial to improving the quality of the image and the user experience.

[0095] Figure 3 It is a flowchart of yet another black level correction method provided by an embodiment of the present disclosure. This embodiment is further extended and optimized on the basis of the above embodiment. Among them, a possible implementation manner of S130 is as follows:

[0096] S1301, for each color channel in the photosensitive array of the second image, determine the target difference between the value corresponding to the current color channel and the value of the corresponding color channel in the black level correction image. When the absolute value of the target difference is greater than the preset threshold, correct the value corresponding to the current color channel according to the target difference to obtain a correction result.

[0097] Among them, the preset threshold can be set in advance or determined according to specific circumstances, and this embodiment does not make specific limitations. The target difference can be understood as the difference between the value corresponding to each color channel in the photosensitive array of the second image and the value of the corresponding color channel in the black level correction image.

[0098] Since the photosensitive array of the second image also includes multiple color channels, for each color channel, it is necessary to calculate the target difference between the value corresponding to the current color channel and the value of the corresponding color channel in the black level corrected image, so as to obtain the target differences corresponding to all color channels in the photosensitive array of the second image. After determining all the target differences, compare the absolute value of the target difference with a preset threshold. If the absolute value of a certain target difference is greater than the preset threshold, it means that at this time, it is necessary to correct the value of the color channel corresponding to the target difference. Correct the value of the corresponding color channel according to the target difference. Specifically, it can be to add (when the value corresponding to the color channel is less than the value of the corresponding color channel in the black level corrected image) or subtract (when the value corresponding to the color channel is greater than the value of the corresponding color channel in the black level corrected image) the target difference to obtain the correction result. If the absolute value of a certain target difference is less than or equal to the preset threshold, it means that the error is within the allowable range, and at this time, it is not necessary to correct the value of the color channel corresponding to the target difference.

[0099] S1302. Based on all the correction results, determine the corrected image.

[0100] Summarize all the correction results, and replace the original value of the color channel with the corrected value, then the corrected image can be obtained. At this time, the corrected image can avoid the problem of color cast in low light.

[0101] In this embodiment, optionally, the second image can be obtained in the following manner:

[0102] Under normal environment, use an image acquisition device to capture the target object to obtain multiple frames of images;

[0103] Synthesize the multiple frames of images through corresponding algorithms to obtain the second image.

[0104] Among them, the target object can be the object that the user is going to photograph.

[0105] In this embodiment, under normal environment, using an image acquisition device to capture the target object can obtain multiple frames of images. After obtaining the multiple frames of images, through corresponding algorithms, such as image fusion algorithms based on non-scale transformation, image fusion algorithms based on principal component analysis, or image fusion algorithms based on deep learning, etc., synthesize the multiple frames of images, and then the second image can be obtained.

[0106] Figure 4 It is a schematic structural diagram of a black level correction device provided by an embodiment of the present disclosure; this device is configured in a computer device and can implement the black level correction method of any embodiment of the present application. The device specifically includes the following:

[0107] The first determination module 410 is configured to determine the difference between the value corresponding to each color channel in the photosensitive array of the first image in a completely black environment and a preset black level value;

[0108] The second determination module 420 is configured to determine a black level correction image corresponding to the first image based on all the differences;

[0109] The correction module 430 is configured to correct the second image in a normal environment according to the black level correction image to obtain a corrected image.

[0110] In this embodiment, optionally, the second determination module 420 is specifically configured to:

[0111] Arrange all the differences according to the arrangement manner of each color channel in the photosensitive array of the first image to obtain an arrangement result;

[0112] Based on the arrangement result, obtain a black level correction image corresponding to the first image.

[0113] In this embodiment, optionally, the apparatus further includes:

[0114] An acquisition module, configured to acquire the first image in a completely black environment before determining the difference between the value corresponding to each color channel in the photosensitive array of the first image in a completely black environment and a preset black level value;

[0115] A third determination module, configured to determine the value corresponding to each color channel in the photosensitive array according to the first image.

[0116] In this embodiment, optionally, the acquisition module is specifically configured to:

[0117] Shoot a preset object through an image acquisition device in a completely black environment to obtain multiple frames of original images;

[0118] Synthesize the multiple frames of original images through a corresponding algorithm to obtain the first image.

[0119] In this embodiment, optionally, the preset black level value is determined by the following method:

[0120] Shoot a preset object through an image acquisition device in a completely black environment to obtain multiple frames of original images;

[0121] Determine a frame of target image from the multiple frames of original images;

[0122] Perform weighted averaging on the values corresponding to each color channel in the photosensitive array of the target image to obtain the preset black level value.

[0123] In this embodiment, optionally, the correction module 430 is specifically configured to:

[0124] For each color channel in the photosensitive array of the second image, determine the target difference between the value corresponding to the current color channel and the value of the corresponding color channel in the black level correction image. When the absolute value of the target difference is greater than a preset threshold, correct the value corresponding to the current color channel according to the target difference to obtain a correction result;

[0125] Based on all the correction results, determine the corrected image.

[0126] In this embodiment, optionally, the second image is obtained by the following method:

[0127] Under normal environmental conditions, use an image acquisition device to capture the target object to obtain multiple frames of images;

[0128] Synthesize the multiple frames of images through corresponding algorithms to obtain the second image.

[0129] Through the black level correction device provided by the embodiments of the present disclosure, first determine the difference between the value corresponding to each color channel in the photosensitive array of the first image in a completely black environment and the preset black level value, then based on all the differences, determine the black level correction image corresponding to the first image, and finally, according to the black level correction image, correct the second image in a normal environment to obtain the corrected image. Through the above solution, the black level can be corrected, which is beneficial to solving the problem of color distortion of low light in scenarios such as shooting night scenes by the multi-frame algorithm and improving the image quality.

[0130] For the specific limitations of the black level correction device, reference can be made to the limitations on the black level correction method in the above text, which will not be elaborated here. Each module in the above black level correction device can be implemented in whole or in part through software, hardware, and their combinations. The above modules can be embedded in the processor in the computer device in hardware form or be independent of it, or can be stored in the memory of the computer device in software form, so as to facilitate the processor to call and execute the operations corresponding to the above modules.

[0131] In one embodiment, a computer device is provided. The computer device can be a server, and its internal structure diagram can be as Figure 5 shown. The computer device includes a processor, a memory, and a network interface connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, it implements a black level correction method.

[0132] Those skilled in the art can understand that Figure 5 The structure shown in Figure 5 is only a block diagram of some structures related to the solution of this application, and does not constitute a limitation on the computer device to which the solution of this application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine some components, or have different component arrangements.

[0133] In one embodiment, the black level correction device provided in this application can be implemented in the form of a computer program, and the computer program can run on a computer device as shown in Figure 5 The memory of the computer device can store each program module that makes up the computer device, and the computer program composed of each program module enables the processor to execute the steps in the black level correction method of each embodiment of this application described in this specification.

[0134] In one embodiment, a computer device is provided, including a memory and a processor. The memory stores a computer program, and when the processor executes the computer program, the following steps are implemented: determining the difference between the value corresponding to each color channel in the photosensitive array of the first image in a completely black environment and a preset black level value; determining a black level correction image corresponding to the first image based on all the differences; correcting the second image in a normal environment according to the black level correction image to obtain a corrected image.

[0135] In one embodiment, when the processor executes the computer program, the following steps are further implemented: determining the difference between the value corresponding to each color channel in the photosensitive array of the first image in a completely black environment and a preset black level value; arranging all the differences according to the arrangement of each color channel in the photosensitive array of the first image to obtain an arrangement result; obtaining a black level correction image corresponding to the first image based on the arrangement result; correcting the second image in a normal environment according to the black level correction image to obtain a corrected image.

[0136] In one embodiment, when the processor executes the computer program, the following steps are further implemented: obtaining the first image in a completely black environment; determining the value corresponding to each color channel in the photosensitive array according to the first image; determining the difference between the value corresponding to each color channel in the photosensitive array of the first image in a completely black environment and a preset black level value; determining a black level correction image corresponding to the first image based on all the differences; correcting the second image in a normal environment according to the black level correction image to obtain a corrected image.

[0137] In one embodiment, when the processor executes a computer program, the following steps are further implemented: determining the difference between the value corresponding to each color channel in the photosensitive array of the first image in a completely black environment and a preset black level value; determining a black level correction image corresponding to the first image based on all the differences; for each color channel in the photosensitive array of the second image, determining the target difference between the value corresponding to the current color channel and the value of the corresponding color channel in the black level correction image, and when the absolute value of the target difference is greater than a preset threshold, correcting the value corresponding to the current color channel according to the target difference to obtain a correction result; and determining a corrected image based on all the correction results.

[0138] In the embodiments of the present disclosure, by determining the difference between the value corresponding to each color channel in the photosensitive array of the first image in a completely black environment, determining a black level correction image corresponding to the first image based on all the differences, and correcting the second image in a normal environment according to the black level correction image to obtain a corrected image, the black level can be corrected, which is beneficial to solving the problem of color distortion of low light in scenarios such as shooting night scenes by a multi-frame algorithm and improving the image quality.

[0139] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the following steps are implemented: determining the difference between the value corresponding to each color channel in the photosensitive array of the first image in a completely black environment and a preset black level value; determining a black level correction image corresponding to the first image based on all the differences; and correcting the second image in a normal environment according to the black level correction image to obtain a corrected image.

[0140] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented: determining the difference between the value corresponding to each color channel in the photosensitive array of the first image in a completely black environment; arranging all the differences according to the arrangement of each color channel in the photosensitive array of the first image to obtain an arrangement result; obtaining a black level correction image corresponding to the first image based on the arrangement result; and correcting the second image in a normal environment according to the black level correction image to obtain a corrected image.

[0141] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented: obtaining the first image in a completely black environment; determining the value corresponding to each color channel in the photosensitive array according to the first image; determining the difference between the value corresponding to each color channel in the photosensitive array of the first image in a completely black environment and a preset black level value; determining a black level correction image corresponding to the first image based on all the differences; and correcting the second image in a normal environment according to the black level correction image to obtain a corrected image.

[0142] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented: determining the difference between the value corresponding to each color channel in the photosensitive array of the first image in a completely black environment and a preset black level value; determining a black level correction image corresponding to the first image based on all the differences; for each color channel in the photosensitive array of the second image, determining the target difference between the value corresponding to the current color channel and the value of the corresponding color channel in the black level correction image, and when the absolute value of the target difference is greater than a preset threshold, correcting the value corresponding to the current color channel according to the target difference to obtain a correction result; and determining a corrected image based on all the correction results.

[0143] In the embodiments of the present disclosure, by determining the difference between the value corresponding to each color channel in the photosensitive array of the first image in a completely black environment, determining a black level correction image corresponding to the first image based on all the differences, and correcting the second image in a normal environment according to the black level correction image to obtain a corrected image, the black level can be corrected, which is beneficial to solving the problem of color distortion of low light in scenes such as shooting night scenes by the multi-frame algorithm and improving the image quality.

[0144] Those of ordinary skill in the art can understand that all or part of the processes of implementing the methods in the above embodiments can be completed by instructing relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above methods. Among them, any reference to a memory, a database, or other media used in the embodiments provided in the present application can include at least one of non-volatile and volatile memories. The non-volatile memory can include a read-only memory (ROM), magnetic tape, floppy disk, flash memory, or optical memory, etc. The volatile memory can include a random access memory (RAM) or an external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static random access memory (SRAM) and dynamic random access memory (DRAM).

[0145] The technical features of the above embodiments can be combined arbitrarily. For the sake of concise description, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, it should be considered to be within the scope described in this specification.

[0146] The above-described embodiments merely represent several implementation manners of the present application. The description thereof is relatively specific and detailed, but it should not be construed as a limitation on the scope of the invention patent. It should be noted that for those of ordinary skill in the art, without departing from the concept of the present application, several modifications and improvements can still be made, and these all fall within the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the appended claims.

Claims

1. A black level correction method, characterized in that, the method includes: determining the difference between the value corresponding to each color channel in the photosensitive array of the first image in a full black environment and a preset black level value; determining a black level correction image corresponding to the first image based on all the differences; correcting the second image in a normal environment according to the black level correction image to obtain a corrected image; the preset black level value is determined by the following method: taking pictures of a preset object by an image acquisition device in a full black environment to obtain multiple frames of original images; determining a target image from the multiple frames of original images; performing weighted averaging on the values corresponding to each color channel in the photosensitive array of the target image to obtain a preset black level value.

2. The method according to claim 1, characterized in that, the determining a black level correction image corresponding to the first image based on all the differences includes: arranging all the differences according to the arrangement mode of each color channel in the photosensitive array of the first image to obtain an arrangement result; obtaining a black level correction image corresponding to the first image based on the arrangement result.

3. The method according to claim 1, characterized in that, before determining the difference between the value corresponding to each color channel in the photosensitive array of the first image in a full black environment and the preset black level value, it further includes: acquiring the first image in a full black environment; determining the value corresponding to each color channel in the photosensitive array according to the first image.

4. The method according to claim 3, characterized in that, the acquiring the first image in a full black environment includes: taking pictures of a preset object by an image acquisition device in a full black environment to obtain multiple frames of original images; synthesizing the multiple frames of original images through a corresponding algorithm to obtain the first image.

5. The method according to claim 1, characterized in that, the correcting the second image in a normal environment according to the black level correction image to obtain a corrected image includes: for each color channel in the photosensitive array of the second image, determining the target difference between the value corresponding to the current color channel and the value of the corresponding color channel in the black level correction image, and when the absolute value of the target difference is greater than a preset threshold, correcting the value corresponding to the current color channel according to the target difference to obtain a correction result; determining a corrected image based on all the correction results.

6. The method according to any one of claims 1-5, characterized in that, the second image is acquired by the following method: taking pictures of a target object by an image acquisition device in a normal environment to obtain multiple frames of images; synthesizing the multiple frames of images through a corresponding algorithm to obtain the second image.

7. A black level correction device, characterized in that, the device includes: a first determination module, configured to determine the difference between the value corresponding to each color channel in the photosensitive array of the first image in a full black environment and a preset black level value; a second determination module, configured to determine a black level correction image corresponding to the first image based on all the differences; A calibration module, configured to calibrate an image according to the black level, calibrate a second image in a normal environment to obtain a calibrated image; The preset black level value is determined by the following method: In a completely black environment, use an image acquisition device to capture a preset object to obtain multiple frames of original images; Determine a target image from the multiple frames of original images; Perform weighted averaging on the values corresponding to each color channel in the photosensitive array of the target image to obtain a preset black level value.

8. A computer device, including a memory and a processor, the memory stores a computer program, wherein, When the processor executes the computer program, it implements the steps of the black level calibration method described in any one of claims 1 to 6.

9. A computer-readable storage medium, on which a computer program is stored, wherein, When the program is executed by the processor, it implements the steps of the black level calibration method described in any one of claims 1 to 6.

Citation Information

Patent Citations

  • Adaptive black level correction method

    CN105578082A

  • Imaging apparatus and image correction method

    JP2015090998A