A dynamic image enhancement method, device, equipment and storage medium

By filtering dark blocks in image frames and calculating the degree of dark block clustering, the WDR curve is dynamically adjusted, which solves the problems of image haziness and unsatisfactory dark area enhancement caused by fixed gain adjustment, realizes adaptive image brightness enhancement, and improves image quality.

CN121883329BActive Publication Date: 2026-06-02HANGZHOU MEARI TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
HANGZHOU MEARI TECH CO LTD
Filing Date
2026-03-20
Publication Date
2026-06-02

AI Technical Summary

Technical Problem

In existing technologies, ISP-based digital WDR uses a fixed gain adjustment method in high dynamic range scenes, resulting in a blurry image or unsatisfactory enhancement of dark areas, and poor image enhancement effect.

Method used

By filtering dark areas in image frames, calculating the dark area clustering value, dynamically adjusting the WDR curve, calculating the actual intensity increment based on the dark area clustering degree and brightness level, and adjusting the output brightness of pixels, dynamic image enhancement is achieved.

Benefits of technology

It improves image enhancement, avoids the hazy image problem caused by a fixed WDR curve, and achieves adaptive brightness enhancement to ensure that both dark and bright areas are clearly visible.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121883329B_ABST
    Figure CN121883329B_ABST
Patent Text Reader

Abstract

The application discloses a dynamic image enhancement method and device, equipment and a storage medium, and relates to the technical field of image processing. The method comprises the following steps: screening out dark blocks according to the brightness value of each block in an image frame and combining a dark area brightness threshold; calculating the dark block aggregation degree value of the dark blocks, screening out the maximum dark block aggregation degree value as the dark area aggregation degree value of the image frame according to the dark block aggregation degree value corresponding to each dark block; calculating the reference intensity increment corresponding to the image frame based on the dark area aggregation degree value of the image frame; calculating the actual intensity increment corresponding to each pixel point based on the reference intensity increment and the brightness level and original intensity value corresponding to the pixel point in the image frame, obtaining the enhanced intensity value of the pixel point according to the actual intensity increment and the original intensity value, and adjusting the output brightness of the pixel according to the enhanced intensity value to obtain an enhanced image; wherein the greater the brightness level is, the smaller the actual intensity increment is. The effect of dynamic image enhancement can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of image processing technology, and in particular to a dynamic image enhancement method, apparatus, device, and storage medium. Background Technology

[0002] Currently, due to cost or power consumption considerations, cameras generally do not use optical HDR (High Dynamic Range) (also known as hardware HDR, which refers to the technology of using the image sensor's hardware capabilities to simultaneously capture details in both bright and dark areas within a single frame exposure, or supporting multi-frame exposures of varying lengths to achieve wide dynamic range imaging). In high dynamic range scenarios (backlit scenarios, scenarios with white light), in order to see dark areas clearly while preventing bright areas from being overexposed, digital WDR (Wide Dynamic Range, i.e., pure software post-processing technology, which adjusts the brightness, contrast, local gain, etc. of a single frame image through algorithms) is typically used to directly digitally enhance the dark areas.

[0003] In related technologies, digital WDR based on ISP (Image Signal Processing) adjusts the intensity of WDR according to the ambient gain (Gain, a parameter used by the camera to amplify the image signal). That is, the darker the light, the more the system automatically increases the gain to brighten the image. However, these technologies all use a fixed digital WDR curve. If the intensity is too high, it can easily result in a blurry image; if the intensity is too low, the enhancement effect in dark areas is not ideal, and the overall image enhancement effect is poor. Summary of the Invention

[0004] In view of this, the purpose of this invention is to provide a dynamic image enhancement method, apparatus, device, and storage medium that can improve the effect of dynamic image enhancement. The specific solution is as follows:

[0005] In a first aspect, this application discloses a dynamic image enhancement method, comprising:

[0006] Obtain image frames, and filter out dark areas based on the brightness value of each block in the image frame combined with the dark area brightness threshold;

[0007] Calculate the dark block clustering value of the dark blocks, and select the dark block clustering value with the largest dark block clustering value as the dark block clustering value of the image frame based on the dark block clustering value of each dark block in the image frame.

[0008] Based on the dark area clustering value of the image frame, the reference intensity increment corresponding to the image frame is calculated; the dark area clustering value and the reference intensity increment are positively correlated.

[0009] Based on the reference intensity increment and the brightness level and original intensity value of the pixel in the image frame, the actual intensity increment corresponding to each pixel is calculated. The enhanced intensity value of the pixel is obtained according to the actual intensity increment and the original intensity value, so as to adjust the output brightness of the pixel according to the enhanced intensity value to obtain the enhanced image; wherein, the larger the brightness level, the smaller the actual intensity increment.

[0010] Optionally, the calculation of the dark block clustering value includes:

[0011] The dark blocks are traversed in both vertical and horizontal directions. Based on the dark block clustering values ​​of the dark blocks adjacent to the current dark block that have been traversed, the dark block clustering value of the current dark block is calculated.

[0012] Optionally, the step of traversing the dark blocks in the vertical and horizontal directions, and calculating the dark block clustering value of the current dark block based on the dark block clustering values ​​of the dark blocks adjacent to the current dark block and traversed, includes:

[0013] Traverse the dark blocks in a left-to-right and top-to-bottom direction;

[0014] The dark block clustering degree value of the current dark block is obtained by summing the dark block clustering degree values ​​corresponding to the left and upper adjacent blocks of the current dark block and a preset fixed value; wherein, if the left or upper adjacent block of the current dark block is not a dark block, the corresponding dark block clustering degree value is 0.

[0015] Optionally, calculating the reference intensity increment corresponding to the image frame based on the dark area aggregation value of the image frame includes:

[0016] Based on the dark area aggregation value, the preset focus value, and the preset coefficient, the reference intensity increment for the image frame is calculated;

[0017] The preset focus value is negatively correlated with the reference intensity increment; the preset focus value is determined based on the imaging quality of the camera module that acquires the image frames, and the better the imaging quality, the smaller the preset focus value.

[0018] Optionally, the larger the reference strength increment, the larger the actual strength increment; and the larger the original strength value, the larger the reference strength increment.

[0019] Optionally, the formula for calculating the actual intensity increment is:

[0020] ;

[0021] Where I represents the reference intensity increment, N represents the current brightness level, b represents the total brightness level, and DNcurr represents the original intensity value.

[0022] Optionally, before calculating the dark block aggregation value, the method further includes:

[0023] The total number of dark blocks in the image frame is counted, and the total number of dark blocks is compared with a preset threshold.

[0024] If the total number of dark blocks in the image frame is greater than a preset threshold, and the current gain has not reached the maximum gain value of the automatic exposure mode, then the operation of calculating the dark block aggregation value is performed.

[0025] Secondly, this application discloses a dynamic image enhancement device, comprising:

[0026] The dark area block identification module is used to acquire image frames and filter out dark areas based on the brightness value of each block in the image frame and the dark area brightness threshold.

[0027] The dark area clustering degree value determination module is used to calculate the dark area clustering degree value of the dark area block, and select the largest dark area clustering degree value as the dark area clustering degree value of the image frame based on the dark area clustering degree value corresponding to each dark area block in the image frame.

[0028] The reference intensity increment calculation module is used to calculate the reference intensity increment corresponding to the image frame based on the dark area aggregation degree value of the image frame; the dark area aggregation degree value is positively correlated with the reference intensity increment;

[0029] An enhancement module is used to calculate the actual intensity increment for each pixel based on a reference intensity increment, the brightness level of the pixel in the image frame, and the original intensity value. The module then calculates the enhanced intensity value of the pixel based on the actual intensity increment and the original intensity value, so as to adjust the output brightness of the pixel according to the enhanced intensity value to obtain an enhanced image. The larger the brightness level, the smaller the actual intensity increment.

[0030] Thirdly, this application discloses an electronic device, including:

[0031] Memory, used to store computer programs;

[0032] A processor is used to execute the computer program to implement the aforementioned dynamic image enhancement method.

[0033] Fourthly, this application discloses a computer-readable storage medium for storing a computer program; wherein the computer program, when executed by a processor, implements the aforementioned dynamic image enhancement method.

[0034] In this application, an image frame is acquired, and dark blocks are filtered out based on the brightness value of each block in the image frame combined with a dark area brightness threshold. The dark area clustering degree value of the dark blocks is calculated, and the maximum dark area clustering degree value is selected as the dark area clustering degree value of the image frame based on the dark area clustering degree value of each dark block in the image frame. A reference intensity increment is calculated based on the dark area clustering degree value of the image frame; the dark area clustering degree value is positively correlated with the reference intensity increment. Based on the reference intensity increment, the brightness level of each pixel in the image frame, and the original intensity value, the actual intensity increment of each pixel is calculated. The enhanced intensity value of the pixel is obtained based on the actual intensity increment and the original intensity value, so that the output brightness of the pixel is adjusted according to the enhanced intensity value to obtain an enhanced image; wherein, the larger the brightness level, the smaller the actual intensity increment. As can be seen above, by using the dark area clustering value of the image frame as a basis—that is, dynamically calculating the enhanced intensity value corresponding to different pixels based on the brightness ratio of the scene image—a dynamic WDR curve is obtained. The output brightness of the pixels is then adjusted according to the enhanced intensity value, achieving dynamic image enhancement. This avoids the poor enhancement effect that occurs when using a fixed WDR curve, i.e., a fixed intensity value, for enhancement processing. Furthermore, by calculating the dark area clustering value of dark areas within a block, the dark area clustering value of the entire image frame is determined, improving the accuracy of the dark area clustering value and thus enhancing the effect of dynamic image enhancement. Attached Figure Description

[0035] To more clearly illustrate the technical solutions in the embodiments of the present invention or related technologies, the drawings used in the description of the embodiments or related technologies will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.

[0036] Figure 1 A flowchart of a dynamic image enhancement method provided in this application;

[0037] Figure 2 This application provides a specific schematic diagram of the dark block aggregation degree value;

[0038] Figure 3 This application provides a specific schematic diagram of the dark block aggregation degree value;

[0039] Figure 4 This application provides a specific schematic diagram of the improved WDR curve;

[0040] Figure 5 A schematic diagram of a dynamic image enhancement device provided in this application;

[0041] Figure 6 This application provides a structural diagram of an electronic device. Detailed Implementation

[0042] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0043] In related technologies, ISP-based digital WDR adjusts the WDR intensity based on ambient gain; that is, the darker the light, the more the system automatically increases the gain to brighten the image. However, these technologies all use fixed digital WDR curves, which easily leads to a hazy image and poor image enhancement. Since these technologies adjust WDR intensity based on different ambient gains, they cannot differentiate between strong light interference within the same gain range, nor can they configure different WDR effects according to the brightness differences of the scene. For example, if there are overly bright areas (such as strong light) in the image while the gain remains constant, the automatic exposure system will shorten the exposure time to prevent overexposure; however, because the entire image uses the same set of exposure parameters, the dark areas become even darker due to reduced light intake, and may even lose details. If the dark areas caused by suppression are brightened, the image at normal illumination under this gain will appear hazy. To overcome the above technical problems, this application proposes a dynamic image enhancement method that can improve the image enhancement effect and achieve adaptive image brightness enhancement.

[0044] This application discloses a dynamic image enhancement method. See also Figure 1 As shown, the method may include the following steps:

[0045] Step S11: Obtain an image frame, and filter out dark blocks based on the brightness value of each block in the image frame combined with the dark area brightness threshold.

[0046] When acquiring an image frame, the Image Signal Processor (ISP) performs fixed-granularity region segmentation on the input image frame (e.g., dividing the image into 15×17 blocks) and calculates the average brightness of each block using its internal statistical engine to obtain the average brightness information of each block, which is the brightness value of the block. It then iterates through each block to check if its brightness value is lower than a pre-set dark area brightness threshold Ld. If it is lower than the dark area brightness threshold, it is considered a dark area block; otherwise, it is not.

[0047] Step S12: Calculate the dark block clustering value of the dark blocks. Based on the dark block clustering value corresponding to each dark block in the image frame, select the largest dark block clustering value as the dark block clustering value of the image frame.

[0048] After identifying the dark areas in the image frame, the dark area clustering value for each dark area is calculated. Then, based on the dark area clustering value corresponding to each dark area in the image frame, the largest dark area clustering value is selected as the dark area clustering value of the image frame. The larger the dark area clustering value, the more clustered the dark areas, the more concentrated the dark areas, and the more severely the image is suppressed. If the dark area clustering value is low, even if there are many dark areas, the scene may contain scattered black objects rather than a high dynamic range scene.

[0049] In some embodiments, before calculating the dark block clustering value, the method further includes: counting the total number of dark blocks in the image frame and comparing the total number of dark blocks with a preset quantity threshold; if the total number of dark blocks in the image frame is greater than the preset quantity threshold, and the current gain has not reached the maximum gain value of the automatic exposure mode, then the operation of calculating the dark block clustering value is performed. That is, first it is determined whether the total number of dark blocks exceeds the preset quantity threshold. If it does not exceed it, it indicates that the dark area clustering degree in the image is low, and at this time, enhancement can be performed according to the original WDR curve stored in the system. If the total number of dark blocks in the image frame is greater than the preset quantity threshold, it is also necessary to determine whether the current gain has not reached the maximum gain value of the automatic exposure mode. If it has reached it, it indicates that the image has been brightened to the maximum extent. If brightening continues, distortion may occur. The operation of calculating the dark block clustering value is performed only when the total number of dark blocks in the image frame is greater than the preset quantity threshold and the current gain has not reached the maximum gain value of the automatic exposure mode.

[0050] Specifically, when filtering dark blocks in step S11, if the brightness value of a block is less than the dark area brightness threshold, then 1 is set; if the brightness value of a block is greater than the dark area brightness threshold, then 0 is set. The total number of dark blocks Sb in the image frame is obtained by summing. If the total number of dark blocks Sb is higher than the set threshold Kb, and the current gain has not reached the maximum gain value of AE (Auto Exposure mode), then the digital WDR curve is adjusted; otherwise, the default curve is used.

[0051] In some embodiments, calculating the dark block clustering value of a dark block includes: traversing the dark blocks in both vertical and horizontal directions, and calculating the dark block clustering value of the current dark block based on the dark block clustering values ​​of the adjacent and traversed dark blocks. That is, when calculating the dark block clustering value for each dark block, the dark block clustering values ​​of adjacent dark blocks are considered, and the values ​​are gradually accumulated according to rules to obtain a dark block clustering value representing the entire frame image.

[0052] In a preferred embodiment, the step of traversing the dark blocks in the vertical and horizontal directions, and calculating the dark block clustering value of the current dark block based on the dark block clustering values ​​of the dark blocks adjacent to the current dark block and traversed, includes: traversing the dark blocks in the directions from left to right and from top to bottom; summing the dark block clustering values ​​corresponding to the left adjacent block and the upper adjacent block of the current dark block, respectively, with a preset fixed value to obtain the dark block clustering value of the current dark block; wherein, if the left adjacent block or the upper adjacent block of the current dark block is not a dark block, the corresponding dark block clustering value is 0. The dark block clustering value of dark block (x,y) is calculated as B(x,y) = B(x-1,y) + B(x,y-1) + 1, where B(x-1,y) represents the dark block clustering value of block (x-1,y), and B(x,y-1) represents the dark block clustering value of block (x,y-1). (x-1,y) represents the leftmost neighboring block of (x,y). If there are no neighboring blocks to the left or the block is not a dark block, then B(x-1,y) is 0. (x,y-1) represents the top neighboring block of (x,y). If there are no neighboring blocks to the top or the block is not a dark block, then B(x,y-1) is 0. The addition of 1 in the formula considers that the current dark block is also a dark block, thus adding 1 to the dark block clustering value.

[0053] For example Figure 2 As shown, the dark area aggregation value is 44; for example... Figure 3 As shown, the dark area aggregation value is 97. If the dark area aggregation value is low, it can be considered that the possibility of light suppression is extremely low, that is, the actual scene area is a dark object rather than a dark area caused by light, so the corresponding increase in intensity is also low.

[0054] Step S13: Based on the dark area clustering value of the image frame, calculate the reference intensity increment corresponding to the image frame; the dark area clustering value is positively correlated with the reference intensity increment.

[0055] The reference intensity increment is calculated based on the dark area aggregation value, which is the reference amount for subsequent adjustments to the WDR curve.

[0056] In some embodiments, calculating the reference intensity increment corresponding to the image frame based on the dark area aggregation value of the image frame includes: calculating the reference intensity increment for the image frame based on the dark area aggregation value, a preset focus value, and a preset coefficient; wherein the preset focus value is negatively correlated with the reference intensity increment; the preset focus value is determined according to the imaging quality of the camera module that acquires the image frame, and the better the imaging quality, the smaller the preset focus value.

[0057] A preferred formula for calculating the reference intensity increment is as follows:

[0058] I=Fd / Fmax S;

[0059] Where I represents the reference intensity increment, Fd is the dark area concentration value, Fmax is the preset focus value, and S is the preset coefficient; where Fd / Fmax is limited to a maximum value of 1.

[0060] If Fmax is 200 and S is 2 times, then the reference intensity increment for a dark area aggregation value of 44 is: 44 / 200. 2=0.44; Reference intensity increment for dark area aggregation value of 97: 97 / 200 2 = 0.97. The preset focus level value is determined based on the imaging quality of the camera module acquiring the image frames; the better the imaging quality, the smaller the preset focus level value. The imaging quality of the camera module includes the quality of components such as the image sensor and lens. The image sensor directly determines resolution, sensitivity, signal-to-noise ratio, etc. High imaging quality means that even if the brightness of dark areas is increased more, it is less likely to cause problems such as blurring in dark areas. Therefore, the better the imaging quality, the smaller the preset focus level value, and the larger the reference intensity increment.

[0061] Step S14: Based on the reference intensity increment and the brightness level and original intensity value of the pixel in the image frame, calculate the actual intensity increment corresponding to each pixel. Obtain the enhanced intensity value of the pixel according to the actual intensity increment and the original intensity value, so as to adjust the output brightness of the pixel according to the enhanced intensity value to obtain the enhanced image; wherein, the larger the brightness level, the smaller the actual intensity increment.

[0062] In this application, to avoid the problems of inaccurate enhancement processing and poor adaptability of fixed digital WDR curves, a reference intensity increment is first determined based on the degree of dark area aggregation. Then, the actual intensity increment is calculated by combining the luminance level and the original intensity value. The higher the luminance level, the smaller the actual intensity increment; a higher luminance level means a higher luminance value. In other words, for dark areas, the intensity value is further increased with a larger actual intensity increment, while for bright areas, the intensity value is increased slightly or even almost unchanged. The larger the reference intensity increment, the larger the actual intensity increment; the larger the original intensity value, the larger the reference intensity increment.

[0063] The horizontal axis of the digital WDR curve represents the input luminance, and the vertical axis represents the output luminance. For example... Figure 4 The image shown is a schematic diagram of a specific digital WDR curve. Figure 4The nodes on the horizontal axis linearly normalize the input brightness range (0-255) to the interval 0-126. The vertical axis is used to more clearly show the difference between the original curve and the enhanced curve, and the 0-126 range is uniformly magnified by a factor of 32 (its value does not represent the final brightness output). The original curve is the digital WDR curve inherent in the system. In this embodiment, through the above steps, the digital WDR curve is dynamically adjusted based on the brightness ratio of the image frame, that is, the enhanced intensity value corresponding to each pixel is used to obtain the enhanced WDR curve, and then the pixel enhancement process is performed using this curve. It can be seen that the final enhancement value of each node of the digital WDR curve adopts a non-linear relationship, which improves the transparency of the image. The closer to the foremost node, the closer the enhancement is to the maximum enhancement intensity. The image enhancement method of this application can improve the brightness enhancement of pixels with low brightness for image frames with obvious differences in brightness and darkness. For example, the original intensity value (output brightness) corresponding to brightness level (horizontal axis) 6 in the original curve is 12. After the enhancement method of this application, the enhanced intensity value (output brightness) corresponding to brightness level (horizontal axis) 6 is 18. This is equivalent to the pixel with brightness level 6 being enhanced by 1.5 times on the basis of the original WDR curve enhancement method, thus realizing digital WDR enhancement of the image.

[0064] In one preferred embodiment, the formula for calculating the actual intensity increment is:

[0065] ;

[0066] Among them, I a I represents the actual intensity increment, N represents the reference intensity increment, b represents the current brightness level, and DNcurr represents the original intensity value. For example, with the highest brightness of 255, the brightness value increases by 25 increments, meaning that the brightness level increases by one level for every 25 brightness value increase. In this case, the total brightness level (b) is 10. At this time, the intensity increase is halved every time the brightness increases by 25 nodes.

[0067] By dynamically changing the digital WDR curve, the brightness of dark areas is improved. In high dynamic range, dark areas are brightened. In normal scenes with the same gain, when there are no scenes with great contrast between light and dark, a general approach is used. This makes both dark and bright areas visible and the image has good clarity.

[0068] As can be seen from the above, in this embodiment, an image frame is acquired, and dark blocks are filtered out based on the brightness value of each block in the image frame combined with a dark area brightness threshold; the dark block clustering degree value of the dark blocks is calculated, and the maximum dark block clustering degree value is selected as the dark area clustering degree value of the image frame based on the dark area clustering degree value of the image frame; a reference intensity increment corresponding to the image frame is calculated based on the dark area clustering degree value of the image frame; the dark area clustering degree value is positively correlated with the reference intensity increment; based on the reference intensity increment and the brightness level and original intensity value of the pixels in the image frame, the actual intensity increment corresponding to each pixel is calculated, and the enhanced intensity value of the pixel is obtained based on the actual intensity increment and the original intensity value, so as to adjust the output brightness of the pixel according to the enhanced intensity value to obtain an enhanced image; wherein, the larger the brightness level, the smaller the actual intensity increment. As can be seen above, by using the dark area clustering value of the image frame as a basis—that is, dynamically calculating the enhanced intensity value corresponding to different pixels based on the brightness ratio of the scene image—a dynamic WDR curve is obtained. The output brightness of the pixels is then adjusted according to the enhanced intensity value, achieving dynamic image enhancement. This avoids the poor enhancement effect that occurs when using a fixed WDR curve, i.e., a fixed intensity value, for enhancement processing. Furthermore, by calculating the dark area clustering value of dark areas within a block, the dark area clustering value of the entire image frame is determined, improving the accuracy of the dark area clustering value and thus enhancing the effect of dynamic image enhancement.

[0069] Accordingly, this application also discloses a dynamic image enhancement device, see [link to relevant documentation]. Figure 5 As shown, the device includes:

[0070] The dark block determination module 11 is used to acquire image frames and filter out dark blocks based on the brightness value of each block in the image frame and the dark area brightness threshold.

[0071] The dark area clustering degree value determination module 12 is used to calculate the dark area clustering degree value of the dark area block, and select the largest dark area clustering degree value as the dark area clustering degree value of the image frame based on the dark area clustering degree value corresponding to each dark area block in the image frame.

[0072] The reference intensity increment calculation module 13 is used to calculate the reference intensity increment corresponding to the image frame based on the dark area aggregation degree value of the image frame; the dark area aggregation degree value is positively correlated with the reference intensity increment;

[0073] Enhancement module 14 is used to calculate the actual intensity increment corresponding to each pixel based on the reference intensity increment and the brightness level and original intensity value of the pixel in the image frame, and to obtain the enhanced intensity value of the pixel according to the actual intensity increment and the original intensity value, so as to adjust the output brightness of the pixel according to the enhanced intensity value to obtain the enhanced image; wherein, the larger the brightness level, the smaller the actual intensity increment.

[0074] In some specific embodiments, the dark area aggregation degree determination module 12 may specifically include:

[0075] The dark block clustering value calculation unit is used to traverse dark blocks in the vertical and horizontal directions, and calculate the dark block clustering value of the current dark block based on the dark block clustering values ​​of the dark blocks adjacent to the current dark block and traversed.

[0076] In some specific embodiments, the calculation of the dark block aggregation degree value may specifically include:

[0077] Traversal units are used to traverse dark blocks in both left-to-right and top-to-bottom directions;

[0078] The summation unit is used to sum the dark block clustering degree values ​​corresponding to the left adjacent block and the upper adjacent block of the current dark block, respectively, and a preset fixed value to obtain the dark block clustering degree value of the current dark block; wherein, if the left adjacent block or the upper adjacent block of the current dark block is not a dark block, the corresponding dark block clustering degree value is 0.

[0079] In some specific embodiments, the reference intensity increment calculation module 13 may specifically include:

[0080] The reference intensity increment calculation unit is used to calculate the reference intensity increment for the image frame based on the dark area aggregation degree value, the preset focus degree value and the preset coefficient.

[0081] The preset focus value is negatively correlated with the reference intensity increment; the preset focus value is determined based on the imaging quality of the camera module that acquires the image frames, and the better the imaging quality, the smaller the preset focus value.

[0082] In some specific embodiments, the larger the reference strength increment, the larger the actual strength increment; and the larger the original strength value, the larger the reference strength increment.

[0083] In some specific embodiments, the formula for calculating the actual intensity increment is as follows:

[0084] ;

[0085] Where I represents the reference intensity increment, N represents the current brightness level, b represents the total brightness level, and DNcurr represents the original intensity value.

[0086] In some specific embodiments, the dynamic image enhancement device may specifically include:

[0087] The dark block count unit is used to count the total number of dark blocks in the image frame before calculating the dark block clustering degree value, and compare the total number of dark blocks with a preset count threshold.

[0088] The execution judgment unit is used to perform the operation of calculating the dark block aggregation value if the total number of dark blocks in the image frame is greater than a preset number threshold and the current gain has not reached the maximum gain value of the automatic exposure mode.

[0089] Furthermore, this application also discloses an electronic device, see [link to relevant documentation]. Figure 6 As shown, the content in the figure should not be considered as any limitation on the scope of use of this application.

[0090] Figure 6 This is a schematic diagram of the structure of an electronic device 20 provided in an embodiment of this application. The electronic device 20 may specifically include: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input / output interface 25, and a communication bus 26. The memory 22 stores a computer program, which is loaded and executed by the processor 21 to implement the relevant steps in the dynamic image enhancement method disclosed in any of the foregoing embodiments.

[0091] In this embodiment, the power supply 23 is used to provide operating voltage for each hardware device on the electronic device 20; the communication interface 24 can create a data transmission channel between the electronic device 20 and external devices, and the communication protocol it follows can be any communication protocol applicable to the technical solution of this application, and is not specifically limited here; the input / output interface 25 is used to acquire external input data or output data to the outside world, and its specific interface type can be selected according to specific application needs, and is not specifically limited here.

[0092] In addition, the memory 22, as a carrier for resource storage, can be a read-only memory, random access memory, disk or optical disk, etc. The resources stored thereon include operating system 221, computer program 222 and data 223 including dark zone aggregation degree value, etc. The storage method can be temporary storage or permanent storage.

[0093] The operating system 221 manages and controls the various hardware devices on the electronic device 20 and the computer program 222 to enable the processor 21 to perform calculations and processing on the massive amounts of data 223 in the memory 22. The operating system 221 can be Windows Server, Netware, Unix, Linux, etc. In addition to including computer programs capable of performing the dynamic image enhancement method executed by the electronic device 20 as disclosed in any of the foregoing embodiments, the computer program 222 may further include computer programs capable of performing other specific tasks.

[0094] Furthermore, this application also discloses a computer storage medium storing computer-executable instructions. When the computer-executable instructions are loaded and executed by a processor, they implement the dynamic image enhancement method steps disclosed in any of the foregoing embodiments.

[0095] Furthermore, embodiments of this application also disclose a computer program product, including a computer program that, when executed by a processor, implements the dynamic image enhancement method steps disclosed in any of the foregoing embodiments.

[0096] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the apparatus disclosed in the embodiments, since it corresponds to the method disclosed in the embodiments, the description is relatively simple; relevant parts can be referred to in the method section.

[0097] The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein can be implemented directly by hardware, a software module executed by a processor, or a combination of both. The software module can be located in random access memory (RAM), main memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other form of storage medium known in the art.

[0098] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0099] The present invention provides a detailed description of a dynamic image enhancement method, apparatus, device, and storage medium. Specific examples have been used to illustrate the principles and implementation methods of the present invention. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of the present invention. At the same time, those skilled in the art will recognize that, based on the ideas of the present invention, there will be changes in the specific implementation methods and application scope. Therefore, the content of this specification should not be construed as a limitation of the present invention.

Claims

1. A dynamic image enhancement method, characterized in that, include: Obtain image frames, and filter out dark areas based on the brightness value of each block in the image frame combined with the dark area brightness threshold; Calculate the dark block clustering value of the dark blocks, and select the dark block clustering value with the largest dark block clustering value as the dark block clustering value of the image frame based on the dark block clustering value of each dark block in the image frame. Based on the dark area aggregation value of the image frame, calculate the reference intensity increment corresponding to the image frame; The dark area aggregation value is positively correlated with the reference intensity increment; Based on the reference intensity increment and the brightness level and original intensity value of the pixel in the image frame, the actual intensity increment corresponding to each pixel is calculated. The enhanced intensity value of the pixel is obtained according to the actual intensity increment and the original intensity value, so as to adjust the output brightness of the pixel according to the enhanced intensity value to obtain the enhanced image; wherein, the larger the brightness level, the smaller the actual intensity increment.

2. The dynamic image enhancement method according to claim 1, characterized in that, The calculation of the dark block clustering value includes: The dark blocks are traversed in both vertical and horizontal directions. Based on the dark block clustering values ​​of the dark blocks adjacent to the current dark block that have been traversed, the dark block clustering value of the current dark block is calculated.

3. The dynamic image enhancement method according to claim 2, characterized in that, The dark blocks are traversed vertically and horizontally. Based on the dark block clustering values ​​of the adjacent and traversed dark blocks, the dark block clustering value of the current dark block is calculated, including: Traverse the dark blocks in a left-to-right and top-to-bottom direction; The dark block clustering degree value of the current dark block is obtained by summing the dark block clustering degree values ​​corresponding to the left and upper adjacent blocks of the current dark block and a preset fixed value; wherein, if the left or upper adjacent block of the current dark block is not a dark block, the corresponding dark block clustering degree value is 0.

4. The dynamic image enhancement method according to claim 1, characterized in that, Based on the dark area clustering value of the image frame, the reference intensity increment corresponding to the image frame is calculated, including: Based on the dark area aggregation value, the preset focus value, and the preset coefficient, the reference intensity increment for the image frame is calculated; The preset focus value is negatively correlated with the reference intensity increment; the preset focus value is determined based on the imaging quality of the camera module that acquires the image frames, and the better the imaging quality, the smaller the preset focus value.

5. The dynamic image enhancement method according to claim 1, characterized in that, The larger the reference strength increment, the larger the actual strength increment; the larger the original strength value, the larger the reference strength increment.

6. The dynamic image enhancement method according to claim 5, characterized in that, The formula for calculating the actual intensity increment is: ; Where I represents the reference intensity increment, N represents the current brightness level, b represents the total brightness level, and DNcurr represents the original intensity value.

7. The dynamic image enhancement method according to any one of claims 1 to 6, characterized in that, Before calculating the dark block clustering value, the following steps are also included: The total number of dark blocks in the image frame is counted, and the total number of dark blocks is compared with a preset threshold. If the total number of dark blocks in the image frame is greater than a preset threshold, and the current gain has not reached the maximum gain value of the automatic exposure mode, then the operation of calculating the dark block aggregation value is performed.

8. A dynamic image enhancement device, characterized in that, include: The dark block determination module is used to acquire image frames and filter out dark blocks based on the brightness value of each block in the image frame and a dark area brightness threshold. The dark area clustering degree value determination module is used to calculate the dark area clustering degree value of the dark area block, and select the largest dark area clustering degree value as the dark area clustering degree value of the image frame based on the dark area clustering degree value corresponding to each dark area block in the image frame. The reference intensity increment calculation module is used to calculate the reference intensity increment corresponding to the image frame based on the dark area aggregation degree value of the image frame; The dark area aggregation value is positively correlated with the reference intensity increment; An enhancement module is used to calculate the actual intensity increment for each pixel based on a reference intensity increment, the brightness level of the pixel in the image frame, and the original intensity value. The module then calculates the enhanced intensity value of the pixel based on the actual intensity increment and the original intensity value, so as to adjust the output brightness of the pixel according to the enhanced intensity value to obtain an enhanced image. The larger the brightness level, the smaller the actual intensity increment.

9. An electronic device, characterized in that, include: Memory, used to store computer programs; A processor for executing the computer program to implement the dynamic image enhancement method as described in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that, Used to store a computer program; wherein the computer program, when executed by a processor, implements the dynamic image enhancement method as described in any one of claims 1 to 7.