Image processing method, device, electronic device and computer readable storage medium

By extracting the brightness statistics of historical images, the brightness mapping curve is generated, and the image brightness specific gravity is reassigned, which solves the ghosting and halo problems and improves image contrast and effect.

CN116152110BActive Publication Date: 2024-12-03AXERA TECH (BEIJING) CO LTD
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202310196035.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-02-28
Publication Date
2024-12-03
Estimated Expiration
2043-02-28

AI Technical Summary

Technical Problem

When the prior art improves image contrast, ghosting and halo are prone to occur, resulting in poor image effects.

Method used

By extracting the brightness statistics of historical images, a brightness mapping curve is generated, and the brightness specific gravity in the image to be processed is reallocated, avoiding the introduction of historical image details, thereby reducing ghosting and halo phenomena and improving image effects.

Benefits of technology

The image processing without ghosts and halos is realized, which improves the overall and local contrast of the image and significantly improves the image effect.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116152110B_ABST
    Figure CN116152110B_ABST
Patent Text Reader

Abstract

The present application provides an image processing method, device, electronic device and computer-readable storage medium. A specific implementation of the method includes: extracting brightness statistical information of historical images corresponding to the image to be processed; generating a brightness mapping curve corresponding to the image to be processed based on the brightness statistical information; the brightness mapping curve is used to redistribute the brightness proportion of each pixel area in the image to be processed; and mapping the image to be processed according to the brightness mapping curve to obtain a target image. The method can make the image to be processed less likely to have ghosting and halo phenomena after processing, thereby improving the image effect.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of information processing, and in particular, to an image processing method, device, electronic device and computer-readable storage medium. Background Art

[0002] Contrast refers to the measurement of the different brightness levels between the brightest white and the darkest black in the light and dark areas of an image. The greater the difference, the greater the contrast. Contrast has a critical impact on visual effects. Generally speaking, the greater the contrast, the clearer and more eye-catching the image, and the brighter the color; while a small contrast will make the entire picture gray.

[0003] In related technologies, when using sharpening and tone mapping to improve contrast, the image details of the historical frame can be backfilled into the current image to achieve the purpose of improving the image effect. However, the image processed in this way is prone to halo and ghosting in the moving area, and the image effect is not good. Summary of the invention

[0004] The purpose of the embodiments of the present application is to provide an image processing method, device, electronic device and computer-readable storage medium, so that after the image to be processed is processed, there will be no ghost phenomenon and halo phenomenon, which improves the image effect.

[0005] In the first aspect, the embodiment of the present application provides an image processing method, which includes: extracting brightness statistical information of a historical image corresponding to an image to be processed; generating a brightness mapping curve corresponding to the image to be processed based on the brightness statistical information; the brightness mapping curve is used to redistribute the brightness proportion of each pixel area in the image to be processed; and mapping the image to be processed according to the brightness mapping curve to obtain a target image. In this way, since only the statistical information of the historical image is used, the relevant image details of the historical image will not be introduced. Therefore, after processing, the image to be processed will not have a ghost phenomenon due to the details of the historical image, and it is not easy to have a halo phenomenon, thereby improving the image effect.

[0006] Optionally, the extraction of brightness statistics of the historical image corresponding to the image to be processed includes: dividing the historical image into multiple image blocks; determining the overall brightness statistics of the historical image and the local brightness statistics of each historical image block; for a historical image block, fusing the overall brightness statistics and the local brightness statistics corresponding to the historical image block to obtain fused brightness statistics; wherein the brightness statistics of the historical image includes the fused brightness statistics corresponding to multiple historical image blocks. In this way, the overall contrast and local contrast of the target image can be taken into account, thereby improving the image effect.

[0007] Optionally, the brightness mapping curve corresponding to the image to be processed is generated according to the brightness statistical information, including: for a historical image block, determining a first pixel area with dense brightness distribution and a second pixel area with sparse brightness distribution in the historical image block; determining a current image block corresponding to the historical image block in the image to be processed, and allocating a dynamic range to the pixel area corresponding to the current image block; wherein the dynamic range allocated to the part corresponding to the first pixel area is greater than the dynamic range allocated to the part corresponding to the second pixel area; generating a fused brightness mapping curve corresponding to the current image block according to the allocated dynamic range; wherein the brightness mapping curve corresponding to the image to be processed includes a plurality of fused brightness mapping curves corresponding to the current image block. In this way, the purpose of enhancing the overall contrast of the current image block can be achieved.

[0008] Optionally, before generating the fused brightness mapping curve corresponding to the current image block according to the allocated dynamic range, the method further includes: for a portion of the current image block corresponding to the second pixel area, reducing the dynamic range currently possessed by the portion. In this way, the difference between the main portion and other portions of the current image block can be highlighted, thereby achieving the purpose of overall contrast enhancement.

[0009] Optionally, mapping the image to be processed according to the brightness mapping curve to obtain a target image includes: mapping one of the current image blocks according to the fusion brightness mapping curve corresponding to the current image block to obtain a target image block; wherein the target image includes a plurality of the target image blocks. In this way, the target image can have an image effect that takes into account both overall contrast and local contrast.

[0010] Optionally, before mapping the current image block according to the fusion brightness mapping curve corresponding to the current image block to obtain the target image block, the method further includes: extracting the low-frequency information and high-frequency information of the current image block according to the current image block; and mapping according to the fusion brightness mapping curve corresponding to the current image block to obtain the target image block, including: mapping the low-frequency information according to the fusion brightness mapping curve corresponding to the current image block; and backfilling the high-frequency information into the mapped current image block to obtain the target image block. In this way, the image effect can be made more natural on the basis of avoiding the occurrence of halo.

[0011] Optionally, the image processing method further comprises: dynamically adjusting the slope of the fused brightness mapping curve of each current image block according to a preset rule. In this way, the slope of the fused brightness mapping curve can be dynamically adjusted so that the fused brightness mapping curve can be more suitable for the actual processing requirements of the image to be processed, and has higher flexibility.

[0012] In the second aspect, the embodiment of the present application provides an image processing device, which includes: an extraction module for extracting brightness statistical information of a historical image corresponding to the image to be processed; a generation module for generating a brightness mapping curve corresponding to the image to be processed based on the brightness statistical information; the brightness mapping curve is used to redistribute the brightness proportion of each pixel area in the image to be processed; and a mapping module for mapping the image to be processed according to the brightness mapping curve to obtain a target image. In this way, since only the statistical information of the historical image is used, the relevant image details of the historical image will not be introduced. Therefore, after processing, the image to be processed will not have a ghost phenomenon due to the details of the historical image, and it is not easy to have a halo phenomenon, thereby improving the image effect.

[0013] In a third aspect, an embodiment of the present application provides an electronic device, comprising a processor and a memory, wherein the memory stores computer-readable instructions, and when the computer-readable instructions are executed by the processor, the steps in the method provided in the first aspect are performed.

[0014] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the steps in the method provided in the first aspect are performed.

[0015] Other features and advantages of the present application will be described in the following description, and partly become apparent from the description, or be understood by practicing the embodiments of the present application. The purpose and other advantages of the present application can be realized and obtained by the structures specifically pointed out in the written description, claims, and drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments of the present application will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.

[0017] Figure 1 A flowchart of an image processing method provided in an embodiment of the present application;

[0018] Figure 2 A structural block diagram of an image processing device provided in an embodiment of the present application;

[0019] Figure 3 A schematic diagram of the structure of an electronic device for executing an image processing method provided in an embodiment of the present application. DETAILED DESCRIPTION

[0020] The technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all of the embodiments. The components of the embodiments of the present application described and shown in the drawings here can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the application claimed for protection, but merely represents the selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present application.

[0021] It should be noted that similar reference numerals and letters represent similar items in the following drawings, so once an item is defined in one drawing, it does not need to be further defined and explained in subsequent drawings. At the same time, in the description of this application, the terms "first", "second", etc. are only used to distinguish the description and cannot be understood as indicating or implying relative importance.

[0022] It should be noted that the embodiments in this application or the technical features in the embodiments may be combined if there is no conflict.

[0023] In the related art, there is a problem that after the contrast of the image is enhanced, the image effect is not good; in order to solve this problem, the present application provides an image processing method, device, electronic device and computer-readable storage medium; further, the brightness proportion of each pixel area in the image to be processed is reallocated according to the statistical information of the historical image, and then the image to be processed can be processed according to the reallocated brightness proportion. In this way, since only the statistical information of the historical image is used, the relevant image details of the historical image will not be introduced, so the image to be processed will not have ghosting phenomenon due to the details of the historical image after processing, and it is not easy to have halo phenomenon, which improves the image effect.

[0024] In some application scenarios, the above image processing method can be applied to image processing software. In other application scenarios, the image processing method can also be applied to image processing hardware. The above image processing hardware can include, for example, chips, sensors, etc. The chips and sensors can be applied to user terminals such as cameras, video cameras, or mobile phones.

[0025] The present application is described below in terms of its application to image processing hardware.

[0026] The defects existing in the solutions in the above-mentioned related technologies are the results obtained by the inventor after practice and careful research. Therefore, the discovery process of the above-mentioned problems and the solutions proposed in the embodiments of the present invention below for the above-mentioned problems should all be the contributions made by the inventor to the present invention during the process of the present invention.

[0027] Please refer to Figure 1 , which shows a flow chart of an image processing method provided by an embodiment of the present application. Figure 1 As shown, the image processing method includes the following steps 101 to 103.

[0028] Step 101: extract brightness statistical information of a historical image corresponding to the image to be processed.

[0029] The image processing hardware may acquire the image to be processed and the historical image corresponding to the image to be processed. In some application scenarios, the historical image may include, for example, images acquired within a preset time period before the acquisition time of the image to be processed. The preset time period may include, for example, a time period with a relatively close interval such as 1 millisecond or 1.5 milliseconds. In other application scenarios, the historical image may include, for example, images with a relatively close interval such as the previous frame image or the previous two frames image of the image to be processed.

[0030] After the image processing hardware obtains the historical image, it can extract the brightness statistical information corresponding to the historical image. In some application scenarios, the brightness statistical information may include brightness histogram statistical information, brightness mean statistical information, etc. In other application scenarios, statistics may also be performed based on the maximum or minimum value corresponding to the brightness.

[0031] Step 102: Generate a brightness mapping curve corresponding to the image to be processed according to the brightness statistical information; the brightness mapping curve is used to redistribute the brightness proportion of each pixel area in the image to be processed.

[0032] In some application scenarios, after the image processing hardware extracts the brightness statistics of the historical image, it can generate a brightness mapping curve corresponding to the image to be processed based on the brightness statistics. The brightness mapping curve can be used to redistribute the brightness proportion of each pixel area in the image to be processed. For example, the brightness mapping curve can map the brightness value of (0-50) candela per square meter to (0-100) candela per square meter.

[0033] Step 103 : Mapping the image to be processed according to the brightness mapping curve to obtain a target image.

[0034] After the image processing hardware generates the brightness mapping curve corresponding to the image to be processed, it can be mapped based on the brightness mapping curve to obtain the target image. In some application scenarios, for example, the brightness value of each pixel of the image to be processed can be substituted into the expression corresponding to the brightness mapping curve to obtain the brightness value of each pixel after mapping. For example, for a pixel area with a brightness value of (0-50) candela per square meter, its brightness value can be mapped to (0-100) candela per square meter according to the brightness mapping curve.

[0035] In this embodiment, since only the statistical information of the historical images is used and the relevant image details of the historical images are not introduced, the image to be processed will not have ghosting phenomenon due to the historical image details after processing, and it is not easy to have halo phenomenon, thereby improving the image effect.

[0036] In some optional implementations, the step of extracting brightness statistical information of the historical image corresponding to the image to be processed in step 101 above includes the following sub-steps:

[0037] Sub-step 1011, dividing the historical image into a plurality of image blocks;

[0038] In some application scenarios, historical images can be processed in blocks. Specifically, the image processing hardware can divide the historical images into multiple image blocks. It should be noted that when the divided image blocks are large, the number of image blocks is small, which can make the contrast difference between the image blocks smaller, and then the transition between the image blocks is more natural; when the divided image blocks are small, the number of image blocks is large, which can make the local contrast more obvious.

[0039] Sub-step 1012, determining overall brightness statistics of the historical image and local brightness statistics of each historical image block;

[0040] After the image processing hardware divides the historical image into multiple image blocks, local brightness statistics corresponding to each historical image block can be determined. That is, for a historical image block, for example, the brightness information of each pixel on the historical image block can be counted using a histogram.

[0041] Sub-step 1013, for a historical image block, fuse the overall brightness statistical information and the local brightness statistical information corresponding to the historical image block to obtain fused brightness statistical information; wherein the brightness statistical information of the historical image includes fused brightness statistical information corresponding to multiple historical image blocks.

[0042] After the image processing hardware determines the overall brightness statistical information and the local brightness statistical information, it can fuse the local brightness statistical information corresponding to a historical image block with the overall brightness statistical information.

[0043] In some application scenarios, for example, fusion can be performed by weighted average method. Specifically, for example, the local brightness counted by the local brightness statistical information can be given a larger weight, and the overall brightness counted by the overall brightness statistical information can be given a smaller weight, and then the fusion can be performed according to the corresponding weights.

[0044] In other application scenarios, for example, fusion can be performed by taking the maximum value. Specifically, for each pixel point on the historical image block, the corresponding local brightness and the overall brightness can be compared, and the larger one is taken as the brightness after fusion.

[0045] In this way, the historical image may correspond to multiple historical image blocks, each of which has a one-to-one corresponding fused brightness statistical information, and then, the brightness statistical information of the historical image may include the fused brightness statistical information corresponding to the multiple historical image blocks.

[0046] In this implementation, the fused brightness statistical information corresponding to each historical image block can have dual attributes through the above sub-steps 1011 to 1013. That is, it has the overall information of the historical image and the targeted local information of the historical image block. In this way, the overall contrast and local contrast of the target image can be taken into account, thereby improving the image effect.

[0047] In some optional implementations, the step 102 of generating a brightness mapping curve corresponding to the image to be processed according to the brightness statistical information includes the following sub-steps:

[0048] Sub-step 1021, for a historical image block, determining a first pixel region with dense brightness distribution and a second pixel region with sparse brightness distribution in the historical image block;

[0049] After the image processing hardware divides the historical image into multiple historical image blocks, it can determine the pixel area with dense brightness distribution and the pixel area with sparse brightness distribution in each historical image block. In some application scenarios, if the histogram statistical information is used, for example, the part with a higher histogram height can be determined as the first pixel area, and the part with a lower histogram height can be determined as the second pixel area.

[0050] Sub-step 1022, determining a current image block corresponding to the historical image block in the image to be processed, and allocating a dynamic range to a pixel region corresponding to the current image block; wherein the dynamic range allocated to the portion corresponding to the first pixel region is greater than the dynamic range allocated to the portion corresponding to the second pixel region;

[0051] In some application scenarios, the image processing hardware can determine the current image block corresponding to each historical image block in the image to be processed. In these application scenarios, the image processing hardware can, for example, divide the image to be processed into the same number of image blocks according to the number of historical image blocks to obtain current image blocks with the same specifications as the historical image blocks. Then, the current image block corresponding to each historical image block can be determined more conveniently.

[0052] Furthermore, the image processing hardware may allocate a dynamic range to each pixel region corresponding to the current image block. Specifically, when allocating the dynamic range, a larger dynamic range may be allocated to a pixel region with dense brightness distribution, and a smaller dynamic range may be allocated to a pixel region with sparse brightness distribution.

[0053] Sub-step 1023, generating a fused brightness mapping curve corresponding to the current image block according to the allocated dynamic range; wherein the brightness mapping curve corresponding to the image to be processed includes a plurality of fused brightness mapping curves corresponding to the current image block.

[0054] After the image processing hardware allocates corresponding dynamic ranges to different pixel regions of each current image block, a fused brightness mapping curve corresponding to the current image block may be generated according to the allocated dynamic ranges.

[0055] In this way, the image to be processed may correspond to multiple current image blocks, each current image block has a one-to-one corresponding fusion brightness mapping curve, and then, the brightness mapping curve corresponding to the image to be processed may include the fusion brightness mapping curves corresponding to the multiple current image blocks.

[0056] In this implementation, the above sub-steps 1021 to 1023 can restore more information of the image subject by allocating a larger dynamic range to the pixel area with a dense brightness distribution in the current image block. Then, after mapping the current image block through the fused brightness mapping curve generated based on the allocated dynamic range, the overall contrast of the current image block can be enhanced.

[0057] In some optional implementations, before the above-mentioned sub-step 1023 (i.e., generating a fused brightness mapping curve corresponding to the current image block based on the allocated dynamic range), the sub-step of generating the brightness mapping curve may also include: for a portion of the current image block corresponding to the second pixel area, reducing the dynamic range currently possessed by the portion.

[0058] In some application scenarios, for pixel areas with sparse brightness distribution, the dynamic range of this part can be sacrificed to highlight the difference between the main part and other parts of the current image block, thereby achieving the purpose of overall contrast enhancement.

[0059] In some optional implementations, the step 103 described above of mapping the image to be processed according to the brightness mapping curve to obtain a target image includes a sub-step 1031: for one of the current image blocks, mapping is performed according to the fusion brightness mapping curve corresponding to the current image block to obtain a target image block; wherein the target image includes a plurality of the target image blocks.

[0060] In some application scenarios, after the image processing hardware obtains the fused brightness mapping curve corresponding to each current image block, it can map each current image block according to the fused brightness mapping curve to obtain a target image block. For example, the fused brightness mapping curve corresponding to the current image block represents mapping the brightness of (0-20) candela per square meter in the current image block to a brightness of (0-60) candela per square meter. After the current image block is mapped according to the fused brightness mapping curve, the brightness corresponding to the obtained target image block is (0-60) candela per square meter.

[0061] In this way, the image to be processed may correspond to a plurality of current image blocks, each current image block corresponds to a target image block, and then, the image including the plurality of target image blocks is the target image.

[0062] In this implementation, after each current image block is mapped according to its corresponding fusion brightness mapping curve, the target image can have an image effect that takes both overall contrast and local contrast into consideration.

[0063] In some optional implementations, the image processing method further includes: dynamically adjusting the slope of the fusion brightness mapping curve of each current image block according to a preset rule.

[0064] In some application scenarios, after the image processing hardware generates the fused brightness mapping curve corresponding to each current image block, the slope of the fused brightness mapping curve can be adaptively adjusted according to preset rules. The preset rules may include, for example: for dark areas with lower brightness, the slope of the fused brightness mapping curve of the corresponding current image block can be increased; for bright areas with higher brightness, the slope of the fused brightness mapping curve of the corresponding current image block can be reduced.

[0065] In this implementation, the slope of the fused brightness mapping curve can be dynamically adjusted so that the fused brightness mapping curve can be more suitable for the actual processing requirements of the image to be processed and has higher flexibility.

[0066] In some optional implementations, before the above sub-step 1031 performs mapping according to the fusion brightness mapping curve corresponding to the current image block to obtain the target image block, obtaining the target image may further include sub-step 1030: extracting low-frequency information and high-frequency information of the current image block for the current image block;

[0067] In some application scenarios, the image processing hardware can perform low-frequency mapping processing on each current image block. Specifically, the image processing hardware can extract low-frequency information and high-frequency information of the current image block. In these application scenarios, for example, the high-frequency component and the low-frequency component in the current image block can be separated by a filter or a Laplacian component extractor.

[0068] In this way, the above sub-step 1031 may include: mapping the low-frequency information according to the fusion brightness mapping curve corresponding to the current image block; backfilling the high-frequency information into the mapped current image block to obtain the target image block.

[0069] In some application scenarios, if the current image block is directly mapped, the high-contrast edge pixel area of ​​the current image block is prone to halo. Therefore, in order to avoid this situation, the image processing hardware can separate the low-frequency information and the high-frequency information, and only map the low-frequency information, while not processing the high-frequency information with higher brightness. Then, after mapping the low-frequency information, the high-frequency information can be backfilled to its original position to obtain the target image.

[0070] In this implementation, only low-frequency information may be mapped, while high-frequency parts with relatively high brightness are not processed, thereby making the image effect more natural while avoiding the occurrence of halos.

[0071] Please refer to Figure 2 , which shows a structural block diagram of an image processing device provided in an embodiment of the present application. The image processing device may be a module, program segment or code on an electronic device. It should be understood that the device is similar to the above Figure 1 The method embodiment corresponds to and can be executed Figure 1 The various steps involved in the method embodiment and the specific functions of the device can be found in the above description. To avoid repetition, the detailed description is appropriately omitted here.

[0072] Optionally, the image processing device includes an extraction module 201, a generation module 202 and a mapping module 203. The extraction module 201 is used to extract the brightness statistical information of the historical image corresponding to the image to be processed; the generation module 202 is used to generate a brightness mapping curve corresponding to the image to be processed according to the brightness statistical information; the brightness mapping curve is used to redistribute the brightness proportion of each pixel area in the image to be processed; the mapping module 203 is used to map the image to be processed according to the brightness mapping curve to obtain a target image.

[0073] Optionally, the extraction is further used to: divide the historical image into multiple image blocks; determine the overall brightness statistical information of the historical image, and the local brightness statistical information of each historical image block; for a historical image block, fuse the overall brightness statistical information and the local brightness statistical information corresponding to the historical image block to obtain fused brightness statistical information; wherein the brightness statistical information of the historical image includes the fused brightness statistical information corresponding to multiple historical image blocks.

[0074] Optionally, the generation module 202 is further used to: for a historical image block, determine a first pixel area with dense brightness distribution and a second pixel area with sparse brightness distribution in the historical image block; determine a current image block corresponding to the historical image block in the image to be processed, and allocate a dynamic range to the pixel area corresponding to the current image block; wherein the dynamic range allocated to the part corresponding to the first pixel area is greater than the dynamic range allocated to the part corresponding to the second pixel area; based on the allocated dynamic range, generate a fused brightness mapping curve corresponding to the current image block; wherein the brightness mapping curve corresponding to the image to be processed includes a plurality of fused brightness mapping curves corresponding to the current image block.

[0075] Optionally, the generating module 202 is further used for: before generating the fused brightness mapping curve corresponding to the current image block according to the allocated dynamic range, reducing the dynamic range currently possessed by a portion of the current image block corresponding to the second pixel area.

[0076] Optionally, the mapping module 203 is further used to: for one of the current image blocks, perform mapping according to a fusion brightness mapping curve corresponding to the current image block to obtain a target image block; wherein the target image includes a plurality of the target image blocks.

[0077] Optionally, the mapping module 203 is further used to: before mapping a current image block according to a fusion brightness mapping curve corresponding to the current image block to obtain a target image block, extract low-frequency information and high-frequency information of the current image block for the current image block; map the low-frequency information according to the fusion brightness mapping curve corresponding to the current image block; and backfill the high-frequency information into the mapped current image block to obtain the target image block.

[0078] Optionally, the image processing device further comprises an adjustment module, and the adjustment module is used to dynamically adjust the slope of the fusion brightness mapping curve of each current image block according to a preset rule.

[0079] It should be noted that those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the device described above can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.

[0080] Please refer to Figure 3 , Figure 3 A structural diagram of an electronic device for executing an image processing method provided in an embodiment of the present application, the electronic device may include: at least one processor 301, such as a CPU, at least one communication interface 302, at least one memory 303 and at least one communication bus 304. Among them, the communication bus 304 is used to realize direct connection and communication between these components. Among them, the communication interface 302 of the device in the embodiment of the present application is used to communicate signaling or data with other node devices. The memory 303 can be a high-speed RAM memory or a non-volatile memory (non-volatile memory), such as at least one disk storage. The memory 303 can optionally be at least one storage device located away from the aforementioned processor. Computer-readable instructions are stored in the memory 303. When the computer-readable instructions are executed by the processor 301, the electronic device can execute the above-mentioned Figure 1 The method process is shown.

[0081] Understandably, Figure 3 The structure shown is for illustration only, and the electronic device may also include Figure 3 More or fewer components as shown, or with Figure 3 Different configurations shown. Figure 3 Each component shown in the figure can be implemented by hardware, software or a combination thereof.

[0082] The present application embodiment provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the following can be performed: Figure 1 The method process in the method embodiment shown is executed by the electronic device.

[0083] An embodiment of the present application provides a computer program product, which includes a computer program stored on a non-transitory computer-readable storage medium, and the computer program includes program instructions. When the program instructions are executed by a computer, the computer can execute the methods provided by the above-mentioned method embodiments. For example, the method may include: extracting brightness statistical information of historical images corresponding to the image to be processed; generating a brightness mapping curve corresponding to the image to be processed based on the brightness statistical information; the brightness mapping curve is used to redistribute the brightness proportion of each pixel area in the image to be processed; and mapping the image to be processed according to the brightness mapping curve to obtain a target image.

[0084] In the embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some communication interfaces, and the indirect coupling or communication connection of the devices or units can be electrical, mechanical or other forms.

[0085] In addition, the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0086] Furthermore, the functional modules in the various embodiments of the present application may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.

[0087] In this document, relational terms such as first and second, etc. are used merely to distinguish one entity or operation from another entity or operation, but do not necessarily require or imply any such actual relationship or order between these entities or operations.

[0088] The above description is only an embodiment of the present application and is not intended to limit the protection scope of the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims

1. An image processing method, characterized in that: The method includes: Extracting brightness statistics of historical images corresponding to the image to be processed; Generating a brightness mapping curve corresponding to the image to be processed according to the brightness statistical information; the brightness mapping curve is used to redistribute the brightness proportion of each pixel area in the image to be processed; Mapping the image to be processed according to the brightness mapping curve to obtain a target image; The step of generating a brightness mapping curve corresponding to the image to be processed according to the brightness statistical information includes: For a historical image block, determining a first pixel region with dense brightness distribution and a second pixel region with sparse brightness distribution in the historical image block; Determining a current image block corresponding to the historical image block in the image to be processed, and allocating a dynamic range to a pixel region corresponding to the current image block; wherein the dynamic range allocated to the portion corresponding to the first pixel region is greater than the dynamic range allocated to the portion corresponding to the second pixel region; Generating a fusion brightness mapping curve corresponding to the current image block according to the allocated dynamic range; The brightness mapping curve corresponding to the image to be processed includes a plurality of fused brightness mapping curves corresponding to the current image blocks.

2. The method according to claim 1, characterized in that The step of extracting brightness statistical information of the historical image corresponding to the image to be processed includes: Dividing the historical image into a plurality of image blocks; Determining overall brightness statistics of the historical image and local brightness statistics of each historical image block; For a historical image block, the overall brightness statistical information and the local brightness statistical information corresponding to the historical image block are fused to obtain fused brightness statistical information; The brightness statistical information of the historical image includes fused brightness statistical information corresponding to a plurality of historical image blocks.

3. The method according to claim 1, characterized in that Before generating the fused brightness mapping curve corresponding to the current image block according to the allocated dynamic range, the method further includes: For a portion of the current image block corresponding to the second pixel region, a dynamic range currently possessed by the portion is reduced.

4. The method according to claim 1 or 3, characterized in that: Mapping the image to be processed according to the brightness mapping curve to obtain a target image includes: For one of the current image blocks, mapping is performed according to a fusion brightness mapping curve corresponding to the current image block to obtain a target image block; Wherein, the target image includes a plurality of target image blocks.

5. The method according to claim 4, characterized in that Before mapping the current image block according to the fusion brightness mapping curve corresponding to the current image block to obtain the target image block, the method further includes: For one of the current image blocks, extract low-frequency information and high-frequency information of the current image block; and The mapping is performed according to the fusion brightness mapping curve corresponding to the current image block to obtain the target image block, including: Mapping the low-frequency information according to a fusion brightness mapping curve corresponding to the current image block; The high-frequency information is backfilled into the mapped current image block to obtain the target image block.

6. The method according to claim 1 or 3, characterized in that: The method further comprises: The slope of the fusion brightness mapping curve of each current image block is dynamically adjusted according to a preset rule.

7. An image processing device, characterized in that: include: An extraction module, used to extract brightness statistical information of historical images corresponding to the image to be processed; A generating module, used for generating a brightness mapping curve corresponding to the image to be processed according to the brightness statistical information; The brightness mapping curve is used to redistribute the brightness proportion of each pixel area in the image to be processed; The step of generating a brightness mapping curve corresponding to the image to be processed according to the brightness statistical information includes: for a historical image block, determining a first pixel region with dense brightness distribution and a second pixel region with sparse brightness distribution in the historical image block; determining a current image block corresponding to the historical image block in the image to be processed, and allocating a dynamic range to the pixel region corresponding to the current image block; wherein the dynamic range allocated to the portion corresponding to the first pixel region is greater than the dynamic range allocated to the portion corresponding to the second pixel region; generating a fused brightness mapping curve corresponding to the current image block according to the allocated dynamic range; wherein the brightness mapping curve corresponding to the image to be processed includes a plurality of fused brightness mapping curves corresponding to the current image block; The mapping module is used to map the image to be processed according to the brightness mapping curve to obtain a target image.

8. An electronic device, characterized in that: The method comprises a processor and a memory, wherein the memory stores computer-readable instructions. When the computer-readable instructions are executed by the processor, the method according to any one of claims 1 to 6 is executed.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 6 is performed.

Citation Information

Patent Citations

  • Method and device for enhancing image details and terminal

    CN109003249A

  • Image brightening method and device and electronic equipment

    CN113888429A

  • Method for improving definition of wide dynamic range image

    CN114331856A

  • Global mapping table generation method and device applied to image enhancement

    CN115034975A

  • Image processing apparatus, image processing method, and storage medium

    US20210304375A1