CN115345804A - Image enhancement implementation method and device - Google Patents

Image enhancement implementation method and device Download PDF

Info

Publication number
CN115345804A
CN115345804A CN202110529887.3A CN202110529887A CN115345804A CN 115345804 A CN115345804 A CN 115345804A CN 202110529887 A CN202110529887 A CN 202110529887A CN 115345804 A CN115345804 A CN 115345804A
Authority
CN
China
Prior art keywords
layer
image
foreground
background
mixing
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110529887.3A
Other languages
Chinese (zh)
Inventor
李冰
李连本
田康
郝晓宁
陈涛
陆阳
王依萍
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China Mobile Communications Group Co Ltd
China Mobile Xiongan ICT Co Ltd
China Mobile System Integration Co Ltd
Original Assignee
China Mobile Communications Group Co Ltd
China Mobile Xiongan ICT Co Ltd
China Mobile System Integration Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by China Mobile Communications Group Co Ltd, China Mobile Xiongan ICT Co Ltd, China Mobile System Integration Co Ltd filed Critical China Mobile Communications Group Co Ltd
Priority to CN202110529887.3A priority Critical patent/CN115345804A/en
Publication of CN115345804A publication Critical patent/CN115345804A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/40Image enhancement or restoration using histogram techniques
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/50Image enhancement or restoration using two or more images, e.g. averaging or subtraction
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/40Analysis of texture
    • G06T7/41Analysis of texture based on statistical description of texture
    • G06T7/44Analysis of texture based on statistical description of texture using image operators, e.g. filters, edge density metrics or local histograms
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/90Determination of colour characteristics
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20212Image combination
    • G06T2207/20221Image fusion; Image merging

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Probability & Statistics with Applications (AREA)
  • Image Processing (AREA)

Abstract

The invention provides a method and a device for realizing image enhancement, wherein the method comprises the following steps: acquiring a background layer and a foreground layer, wherein the background layer is an original image to be subjected to image enhancement, and the foreground layer is obtained by performing histogram equalization processing on the original image; and according to a preset layer mixing rule, carrying out layer mixing processing on the background layer and the foreground layer to obtain an enhanced image corresponding to the original image. According to the invention, through a histogram equalization technology and a layer mixing technology, the image after the histogram equalization processing is directly fused with the original image, so that the image enhancement effect is realized, the problems of image local detail loss, gray level reduction and the like caused by the histogram equalization processing are effectively solved, the image contrast is enhanced, and the overall quality and the visual effect of the enhanced image are improved.

Description

Image enhancement implementation method and device
Technical Field
The invention relates to the technical field of image processing, in particular to an image enhancement implementation method and device.
Background
Histogram Equalization (HE) is a standard technique for enhancing contrast in image processing, and is widely applied to a plurality of fields such as image enhancement and image defogging at present. The classic HE algorithm has the advantages of time domain processing, simple calculation and easy realization, but has the problems of image local detail loss, gray level reduction, noise point and the like.
At present, many researchers at home and abroad are dedicated to the research and improvement work of the HE algorithm. Existing histogram equalization-based improvements are mainly classified into five categories, including: sub-histogram equalization techniques, modified histogram equalization techniques, histogram variation techniques, local histogram equalization techniques, and transform domain equalization image enhancement techniques. The improved histogram equalization technology improves image enhancement details to a certain extent, but the enhancement effect is poor, the overall quality needs to be further improved, and when the image enhancement is performed based on the improved algorithms, the phenomenon of image distortion also exists, so that the visual effect of the enhanced image is poor.
Therefore, there is a need for an image enhancement method and apparatus to solve the above problems.
Disclosure of Invention
The invention provides a method and a device for realizing image enhancement, which are used for solving the defects of a histogram equalization algorithm in image processing in the prior art and realizing the improvement of the overall quality and visual effect of image enhancement processing.
In a first aspect, the present invention provides an image enhancement implementation method, including:
acquiring a background layer and a foreground layer, wherein the background layer is an original image to be subjected to image enhancement, and the foreground layer is obtained by performing histogram equalization processing on the original image;
and according to a preset layer mixing rule, carrying out layer mixing processing on the background layer and the foreground layer to obtain an enhanced image corresponding to the original image.
In an embodiment, after the performing, according to a preset layer mixing rule, layer mixing processing on the background layer and the foreground layer to obtain an enhanced image corresponding to the original image, the method further includes:
and adjusting the saturation of the enhanced image according to a preset saturation threshold value to obtain a target enhanced image.
In an embodiment, the performing, according to a preset layer mixing rule, layer mixing processing on the background layer and the foreground layer to obtain an enhanced image corresponding to the original image includes:
determining a corresponding layer mixing mode in the preset layer mixing rule according to the color information and the brightness information of the background layer and the foreground layer;
and according to the layer mixing mode, performing layer mixing processing on the background layer and the foreground layer to obtain an enhanced image corresponding to the original image.
In one embodiment, the layer mixing mode includes a soft light mode, a bright light mode, a superposition mode, and a screen mode, where the layer mixing formula of the soft light mode is:
Figure BDA0003067142740000021
the layer mixing formula of the bright mode is as follows:
Figure BDA0003067142740000022
the layer mixing formula of the superposition mode is as follows:
Figure BDA0003067142740000031
the layer mixing formula of the screen mode is as follows:
C=1-(1-A)*(1-B);
the method comprises the steps of obtaining a foreground image layer and a background image layer, wherein A represents a color value of a pixel in the foreground image layer, B represents a color value of a pixel in the background image layer, and C represents a color value of a pixel in an enhanced image obtained by mixing the foreground image layer and the background image layer, and the color values comprise color information and brightness information.
In one embodiment, the method further comprises:
adjusting the transparency of the foreground image layer;
the step of performing layer mixing processing on the background layer and the foreground layer includes:
and carrying out layer mixing processing through the background layer and the foreground layer with the adjusted transparency.
In an embodiment, the performing, according to a preset layer mixing rule, layer mixing processing on the background layer and the foreground layer to obtain an enhanced image corresponding to the original image includes:
and inputting the background layer and the foreground layer into an image processor, so that the image processor performs layer mixing processing on the background layer and the foreground layer according to a preset layer mixing rule to obtain an enhanced image corresponding to the original image.
In a second aspect, the present invention provides an image enhancement implementing apparatus, including:
the histogram equalization processing module is used for acquiring a background image layer and a foreground image layer, wherein the background image layer is an original image to be subjected to image enhancement, and the foreground image layer is obtained by performing histogram equalization processing on the original image;
and the layer mixing module is used for carrying out layer mixing processing on the background layer and the foreground layer according to a preset layer mixing rule to obtain an enhanced image corresponding to the original image.
In one embodiment, the apparatus further comprises:
and the saturation adjusting module is used for adjusting the saturation of the enhanced image according to a preset saturation threshold value to obtain a target enhanced image.
In a third aspect, the present invention provides an electronic device, comprising a memory and a memory storing a computer program, wherein the processor implements the steps of the image enhancement implementing method according to the first aspect when executing the program.
In a fourth aspect, the present invention provides a processor-readable storage medium storing a computer program for causing a processor to perform the steps of the image enhancement implementation method of the first aspect.
According to the image enhancement implementation method and device provided by the invention, the image subjected to histogram equalization processing is directly fused with the original image through the histogram equalization technology and the layer mixing technology, so that the image enhancement effect is realized, the problems of image local detail loss, gray level reduction and the like caused by the histogram equalization processing are effectively solved, the image contrast is enhanced, and the overall quality and the visual effect of the enhanced image are improved.
Drawings
In order to more clearly illustrate the present invention or the technical solutions in the prior art, the drawings used in the embodiments or the description of the prior art will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and other drawings can be obtained by those skilled in the art without creative efforts.
FIG. 1 is a schematic flow chart of an image enhancement implementation method provided by the present invention;
FIG. 2 is a schematic structural diagram of an image enhancement implementation apparatus provided in the present invention;
fig. 3 is a schematic structural diagram of an electronic device provided in the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention clearer, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings, and it is obvious that the described embodiments are some, but not all embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Histogram equalization is a method for enhancing Image Contrast (Image Contrast), and the main idea is to change the histogram distribution of a sub-Image into approximately uniform distribution, so as to enhance the Contrast of the Image. The existing histogram equalization-based improvement technologies are mainly classified into five categories:
the first is a Sub-Histogram Equalization technique, which is mainly used for Image contrast enhancement under Brightness protection, and representative algorithms include a BBHE (Brightness maintaining Bi-Histogram Equalization) algorithm, a DSIHE (dual Sub-Image Histogram Equalization) algorithm, and an RMSHE (regenerative Mean-Separate Histogram Equalization) algorithm. However, although the BBHE algorithm retains more gray levels and maintains the brightness of the original image, the enhancement of the image details is not sufficient; the RMSHE algorithm is insufficient in improving the overall quality level of the image; the DSIHE algorithm results in image distortion.
The second technique is a modified Histogram Equalization technique, which mainly performs contrast enhancement for certain specific gray levels, and a representative algorithm such as an AHE (Adaptive Histogram Equalization) algorithm. Compared with the existing HE algorithm, the number of gray levels and the information entropy of an original image are obviously improved, but the distortion problem of a local area of the image occurs.
The third category of techniques is histogram variation techniques, which are mainly used for image contrast enhancement under luminance protection.
The fourth category is local histogram equalization techniques, which are mainly used for image detail enhancement. A representative algorithm such as the POSHE (partial overlaid Sub-block hierarchy Equalization) algorithm. The algorithm is similar to the AHE algorithm, and although the gray level number and the information entropy of the original image are obviously improved, the distortion problem of the local area of the image also occurs.
The fifth category is image enhancement techniques based on transform domain equalization, mainly used for image detail enhancement.
Compared with the existing classical HE algorithm, the improved algorithm based on histogram equalization retains more gray levels and local details, but greatly improves the complexity and the calculated amount during the analysis processing process.
Fig. 1 is a schematic flow diagram of an image enhancement implementation method provided by the present invention, and as shown in fig. 1, the present invention provides an image enhancement implementation method, including:
step 101, obtaining a background layer and a foreground layer, wherein the background layer is an original image to be subjected to image enhancement, and the foreground layer is obtained by performing histogram equalization processing on the original image;
in the invention, two same original images are obtained, and one original image is used as a background image layer ImgSrc, so that all original image information is reserved; then, in the RGB color space, histogram equalization processing is performed on another original image, and the process can be implemented based on a Central Processing Unit (CPU), so as to initially enhance the contrast of the original image, simply and effectively improve the dynamic range and the overall contrast of the original image, and finally take the image after histogram equalization processing as a foreground image layer ImgHE.
And 102, performing layer mixing processing on the background layer and the foreground layer according to a preset layer mixing rule to obtain an enhanced image corresponding to the original image.
In the invention, the color information and the brightness information of the original image are analyzed, and the image layer mixing is carried out on the original image and the image after histogram equalization processing by adopting a corresponding image layer mixing mode based on a preset image layer mixing rule, so that more local details of the original image are reserved, and the defects of poor image enhancement effect and image distortion after the image is processed by the conventional classical HE algorithm are overcome.
According to the image enhancement implementation method provided by the invention, the image subjected to histogram equalization processing is directly fused with the original image through the histogram equalization technology and the image layer mixing technology, so that the image enhancement effect is realized, the problems of image local detail loss, gray level reduction and the like caused by the histogram equalization processing are effectively solved, the image contrast is enhanced, and the overall quality and the visual effect of the enhanced image are improved.
On the basis of the above embodiment, after performing layer mixing processing on the background layer and the foreground layer according to a preset layer mixing rule to obtain an enhanced image corresponding to the original image, the method further includes:
and adjusting the saturation of the enhanced image according to a preset saturation threshold value to obtain a target enhanced image.
In the invention, for the original image with too high or low saturation, in order to obtain an enhanced image with better quality, the saturation of the enhanced image ImgMerge obtained after the image is mixed is adjusted, so that the visual effect of the image is further improved. Specifically, a saturation adjustment parameter Sat is input, the value range of the parameter is-100 to 100, and the corresponding saturation adjustment range is that the overall saturation is reduced by-50% to increased by 50%.
On the basis of the foregoing embodiment, the performing layer mixing processing on the background layer and the foreground layer according to a preset layer mixing rule to obtain an enhanced image corresponding to the original image includes:
determining a corresponding layer mixing mode in the preset layer mixing rule according to the color information and the brightness information of the background layer and the foreground layer;
and performing layer mixing processing on the background layer and the foreground layer according to the layer mixing mode to obtain an enhanced image corresponding to the original image.
Optionally, the performing, according to a preset layer mixing rule, layer mixing processing on the background layer and the foreground layer to obtain an enhanced image corresponding to the original image includes:
and inputting the background layer and the foreground layer into an image processor, so that the image processor performs layer mixing processing on the background layer and the foreground layer according to a preset layer mixing rule to obtain an enhanced image corresponding to the original image.
In the invention, the layer mixing is a key technology in image enhancement, and is realized based on a graphic processing unit (GPU for short), and a foreground layer ImgHE and a background layer ImgSrc are input into the GPU as two input textures; and then according to the color information and the brightness information of the two layers, adopting a corresponding layer mixing mode in a preset layer mixing rule, and realizing that the image after histogram equalization processing is directly fused with the original image through a GPU (graphics processing unit), thereby simply and quickly obtaining the mixed layer, completing the enhancement processing of the original image and being beneficial to further video processing.
On the basis of the above embodiment, the layer mixing mode includes a Soft Light mode, a bright Light mode, a superposition mode, and a screen mode, where the Soft Light mode (Soft Light): in this mode, the upper image (i.e., the foreground layer) is applied to the lower image (i.e., the background layer) in a soft manner. When the gray scale of the background layer tends to be too high or too low, the tone of the layer synthesis result (i.e. the result of layer mixing of the foreground layer ImgHE and the background layer ImgSrc) is adjusted to approach to the middle gray scale, so that a synthesis effect with softer color is obtained, and the formed result is: the mid-tone areas of the blended image become brighter, the dark areas become darker, and the image contrast increases, similar to the effect of a soft-lit illuminated image. In the invention, the corresponding area in the mixed image becomes dark or brightens the picture color, the generated effect is similar to the way of putting a scattered spotlight on the original image depending on the color distribution of the foreground image, and if the brightness of the foreground image layer is higher than 50% of gray, the background image layer is brightened; if the foreground layer brightness is below 50% gray, the background layer will be darkened. The layer mixing formula of the soft light mode is as follows:
Figure BDA0003067142740000081
bright Light pattern (Vivid Light): in this mode, the contrast is adjusted to deepen or lighten the color depending on the color distribution of the foreground image. If the color brightness of the foreground image is higher than 50% gray, the mixed image will be reduced in contrast and brightened; if the color brightness of the foreground image is lower than 50% gray, the mixed image is improved in contrast and darkened, and the layer mixing formula of the bright light mode is as follows:
Figure BDA0003067142740000082
overlay mode (Overlay): in the mode, a method of a multiplication mode and a screen mode is integrated, namely, according to the colors of the ground color in the background layer, determining which pixels in the two layers are synthesized and mixed in the multiplication mode and which pixels are synthesized and mixed in the screen mode. After the layers are mixed, some areas in the mixed image become darker and some areas become lighter. Generally, the changed areas are all the intermediate tones, the areas with high color and dark color are basically kept unchanged, and the layer mixing formula of the superposition mode is as follows:
Figure BDA0003067142740000091
the Screen mode (Screen), also called color filter mode, the effect of the mixed layer is to show the higher gray scale of the two layers, while the lower gray scale is not shown (i.e. light color appears, dark color does not appear), so as to achieve the effect similar to bleaching, and generate a brighter image. Mixed according to the "hyperchromic mode" mode of the color mixing principle, the colors have additive effect for the screen mode. The layer mixing formula of the screen mode is as follows:
C=1-(1-A)*(1-B);
wherein a represents the color value of the pixels in the foreground layer, i.e., a = foreground layer pixel RGB value/255; b represents the color value of the pixel in the background layer, i.e., B = background layer pixel RGB value/255; c represents the color value of a pixel in the enhanced image obtained by mixing the foreground image layer and the background image layer, namely the pixel RGB value/255 of the enhanced image; the color value includes color information and luminance information. Note that, when layer blending is performed, the range of pixel values is defined as 0 to 1, and the pixel value of the actual layer blending result should be 255 × c.
On the basis of the above embodiment, the method further comprises:
adjusting the transparency of the foreground image layer;
the step of performing layer mixing processing on the background layer and the foreground layer includes:
and carrying out layer mixing processing through the background layer and the foreground layer with the adjusted transparency.
In the invention, a foreground layer ImgHE and a background layer ImgSrc are used as two input textures to be input into a GPU, the transparency Opacity and the mixed mode MergeMode of the foreground layer ImgHE are simultaneously input, and the transparency of the foreground layer ImgHE is adjusted to achieve a better visual effect and obtain an image ImgMerge after layer mixing processing. Specifically, the value range of the transparency Opacity is 0 to 1, and when the Opacity is 1, the foreground image imgshe completely covers the background image ImgSrc; when options is 0, the foreground image ImgHE is fully transparent, and only the background image ImgSrc is presented. The calculation formula is as follows:
ImgHE.alpha=ImgHE.alpha*Opacity;
and after the transparency of the foreground image ImgHE is adjusted, the layer mixing processing of the background layer ImgSrc and the transparency-adjusted foreground layer ImgHE is realized in the next step.
In an embodiment, firstly, a histogram equalization process is performed on an original image through a CPU, then, values of input parameter transparency, layer mixing mode, mergeMode, and saturation Sat can be changed according to characteristics (i.e., color information and brightness information) of the original image, layer mixing is realized based on a GPU, an optimal image enhancement effect is obtained, that is, a final target enhanced image imgl:
ImgLast=f(ImgSrc,ImgHE,Opacity,MergeMode,Sat)。
the invention simultaneously utilizes the CPU and the GPU to process the image, combines the histogram equalization technology and the layer mixing technology, has low computational complexity and high image processing operation efficiency, effectively solves the problems of image local detail loss, gray level reduction and the like caused by the histogram equalization processing, well retains the image local detail information, enhances the image contrast and saturation and improves the overall quality and visual effect of the image.
The image enhancement implementing device provided by the invention is described below, and the image enhancement implementing device described below and the image enhancement implementing method described above can be referred to correspondingly.
Fig. 2 is a schematic structural diagram of an image enhancement implementation apparatus provided by the present invention, and as shown in fig. 2, the present invention provides an image enhancement implementation apparatus, which includes a histogram equalization processing module 201 and a layer mixing module 202, where the histogram equalization processing module 201 is configured to obtain a background layer and a foreground layer, the background layer is an original image to be image-enhanced, and the foreground layer is obtained by performing histogram equalization processing on the original image; the layer mixing module 202 is configured to perform layer mixing processing on the background layer and the foreground layer according to a preset layer mixing rule, so as to obtain an enhanced image corresponding to the original image.
According to the image enhancement implementation device provided by the invention, the image subjected to histogram equalization processing is directly fused with the original image through the histogram equalization technology and the layer mixing technology, so that the image enhancement effect is realized, the problems of image local detail loss, gray level reduction and the like caused by the histogram equalization processing are effectively solved, the image contrast is enhanced, and the overall quality and the visual effect of the enhanced image are improved.
On the basis of the above embodiment, the apparatus further includes a saturation adjusting module, configured to adjust the saturation of the enhanced image according to a preset saturation threshold, so as to obtain a target enhanced image.
On the basis of the above embodiment, the layer mixing module includes:
the mode determining unit is used for determining a corresponding layer mixing mode in the preset layer mixing rule according to the color information and the brightness information of the background layer and the foreground layer;
and the layer processing unit is used for carrying out layer mixing processing on the background layer and the foreground layer according to the layer mixing mode to obtain an enhanced image corresponding to the original image.
On the basis of the above embodiment, the apparatus further includes:
and the transparency adjusting module is used for adjusting the transparency of the foreground image layer.
On the basis of the above embodiment, the layer mixing module is further configured to: and carrying out layer mixing processing through the background layer and the foreground layer with the adjusted transparency.
Fig. 3 is a schematic structural diagram of an electronic device provided in the present invention, and as shown in fig. 3, the electronic device may include: a processor (processor) 310, a Communication Interface (Communication Interface) 320, a memory (memory) 330 and a Communication bus 340, wherein the processor 310, the Communication Interface 320 and the memory 330 complete the Communication with each other through the Communication bus 340. The processor 310 may invoke computer programs in the memory 330 to perform the steps of the image enhancement implementation method, including, for example: acquiring a background layer and a foreground layer, wherein the background layer is an original image to be subjected to image enhancement, and the foreground layer is obtained by performing histogram equalization processing on the original image; and according to a preset layer mixing rule, carrying out layer mixing processing on the background layer and the foreground layer to obtain an enhanced image corresponding to the original image.
In addition, the logic instructions in the memory 330 may be implemented in the form of software functional units and stored in a computer readable storage medium when the software functional units are sold or used as independent products. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-only memory (ROM), a Random Access Memory (RAM), a magnetic disk, an optical disk, or other various media capable of storing program codes.
In another aspect, the present invention also provides a computer program product, the computer program product comprising a computer program stored on a non-transitory computer-readable storage medium, the computer program comprising program instructions, which when executed by a computer, enable the computer to perform an image enhancement implementation method provided by the above methods, the method comprising: acquiring a background layer and a foreground layer, wherein the background layer is an original image to be subjected to image enhancement, and the foreground layer is obtained by performing histogram equalization processing on the original image; and according to a preset layer mixing rule, carrying out layer mixing processing on the background layer and the foreground layer to obtain an enhanced image corresponding to the original image.
In another aspect, the present invention further provides a processor-readable storage medium, where the processor-readable storage medium stores a computer program, where the computer program is configured to cause the processor to execute the method provided in the foregoing embodiments, for example, the method includes: acquiring a background layer and a foreground layer, wherein the background layer is an original image to be subjected to image enhancement, and the foreground layer is obtained by performing histogram equalization processing on the original image; and according to a preset layer mixing rule, carrying out layer mixing processing on the background layer and the foreground layer to obtain an enhanced image corresponding to the original image.
The processor-readable storage medium can be any available medium or data storage device that can be accessed by a processor, including, but not limited to, magnetic memory (e.g., floppy disks, hard disks, magnetic tape, magneto-optical disks (MOs), etc.), optical memory (e.g., CDs, DVDs, BDs, HVDs, etc.), and semiconductor memory (e.g., ROMs, EPROMs, EEPROMs, non-volatile memories (NAND FLASH), solid State Disks (SSDs)), etc.
The above-described embodiments of the apparatus are merely illustrative, and the units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment. One of ordinary skill in the art can understand and implement it without inventive effort.
Through the above description of the embodiments, those skilled in the art will clearly understand that each embodiment can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware. With this understanding in mind, the above-described technical solutions may be embodied in the form of a software product, which can be stored in a computer-readable storage medium such as ROM/RAM, magnetic disk, optical disk, etc., and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the methods described in the embodiments or some parts of the embodiments.
Finally, it should be noted that: the above examples are only intended to illustrate the technical solution of the present invention, but not to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.

Claims (10)

1. An image enhancement implementation method is characterized by comprising the following steps:
acquiring a background layer and a foreground layer, wherein the background layer is an original image to be subjected to image enhancement, and the foreground layer is obtained by performing histogram equalization processing on the original image;
and according to a preset layer mixing rule, carrying out layer mixing processing on the background layer and the foreground layer to obtain an enhanced image corresponding to the original image.
2. The method according to claim 1, wherein after the layer mixing processing is performed on the background layer and the foreground layer according to a preset layer mixing rule to obtain an enhanced image corresponding to the original image, the method further includes:
and adjusting the saturation of the enhanced image according to a preset saturation threshold value to obtain a target enhanced image.
3. The method according to claim 1, wherein the obtaining an enhanced image corresponding to the original image by performing layer blending processing on the background layer and the foreground layer according to a preset layer blending rule includes:
determining a corresponding layer mixing mode in the preset layer mixing rule according to the color information and the brightness information of the background layer and the foreground layer;
and according to the layer mixing mode, performing layer mixing processing on the background layer and the foreground layer to obtain an enhanced image corresponding to the original image.
4. The method according to claim 3, wherein the layer blending mode includes a soft light mode, a bright light mode, a superposition mode, and a screen mode, and wherein a layer blending formula of the soft light mode is:
Figure FDA0003067142730000011
the layer mixing formula of the bright mode is as follows:
Figure FDA0003067142730000021
the layer mixing formula of the overlay mode is as follows:
Figure FDA0003067142730000022
the layer mixing formula of the screen mode is as follows:
C=1-(1-A)*(1-B);
the method comprises the steps of obtaining a foreground image layer and a background image layer, wherein A represents a color value of a pixel in the foreground image layer, B represents a color value of a pixel in the background image layer, and C represents a color value of a pixel in an enhanced image obtained by mixing the foreground image layer and the background image layer, and the color values comprise color information and brightness information.
5. The method of claim 1, 3 or 4, wherein the method further comprises:
adjusting the transparency of the foreground image layer;
the step of performing layer mixing processing on the background layer and the foreground layer includes:
and carrying out layer mixing processing through the background layer and the foreground layer with the adjusted transparency.
6. The method according to claim 1, wherein the performing layer mixing processing on the background layer and the foreground layer according to a preset layer mixing rule to obtain an enhanced image corresponding to the original image includes:
and inputting the background layer and the foreground layer into an image processor, so that the image processor performs layer mixing processing on the background layer and the foreground layer according to a preset layer mixing rule to obtain an enhanced image corresponding to the original image.
7. An image enhancement implementing apparatus, comprising:
the histogram equalization processing module is used for acquiring a background image layer and a foreground image layer, wherein the background image layer is an original image to be subjected to image enhancement, and the foreground image layer is obtained by performing histogram equalization processing on the original image;
and the layer mixing module is used for carrying out layer mixing processing on the background layer and the foreground layer according to a preset layer mixing rule to obtain an enhanced image corresponding to the original image.
8. The apparatus according to claim 7, further comprising:
and the saturation adjusting module is used for adjusting the saturation of the enhanced image according to a preset saturation threshold value to obtain a target enhanced image.
9. An electronic device comprising a processor and a memory storing a computer program, wherein the processor implements the steps of the image enhancement implementation method according to any one of claims 1 to 6 when executing the computer program.
10. A processor-readable storage medium, characterized in that the processor-readable storage medium stores a computer program for causing a processor to execute the steps of the image enhancement implementation method of any one of claims 1 to 6.
CN202110529887.3A 2021-05-14 2021-05-14 Image enhancement implementation method and device Pending CN115345804A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110529887.3A CN115345804A (en) 2021-05-14 2021-05-14 Image enhancement implementation method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110529887.3A CN115345804A (en) 2021-05-14 2021-05-14 Image enhancement implementation method and device

Publications (1)

Publication Number Publication Date
CN115345804A true CN115345804A (en) 2022-11-15

Family

ID=83977897

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110529887.3A Pending CN115345804A (en) 2021-05-14 2021-05-14 Image enhancement implementation method and device

Country Status (1)

Country Link
CN (1) CN115345804A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117036209A (en) * 2023-10-07 2023-11-10 深圳英美达医疗技术有限公司 Image contrast enhancement method, image contrast enhancement device, computer equipment and storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117036209A (en) * 2023-10-07 2023-11-10 深圳英美达医疗技术有限公司 Image contrast enhancement method, image contrast enhancement device, computer equipment and storage medium
CN117036209B (en) * 2023-10-07 2024-01-26 深圳英美达医疗技术有限公司 Image contrast enhancement method, image contrast enhancement device, computer equipment and storage medium

Similar Documents

Publication Publication Date Title
Lai et al. Improved local histogram equalization with gradient-based weighting process for edge preservation
Kang et al. A perception-aware decomposition and fusion framework for underwater image enhancement
CN105574918B (en) A kind of material adding method, device and the terminal of 3D models
US9165210B1 (en) Systems and methods for localized contrast enhancement
US9324170B2 (en) Creating a blended image
Grundland et al. Cross dissolve without cross fade: Preserving contrast, color and salience in image compositing
TW201433168A (en) Image processing method
Chandrasekharan et al. Fuzzy transform for contrast enhancement of nonuniform illumination images
CN115115554B (en) Image processing method and device based on enhanced image and computer equipment
CN110288670B (en) High-performance rendering method for UI (user interface) tracing special effect
Wang et al. A novel patch-based multi-exposure image fusion using super-pixel segmentation
Banić et al. Puma: A high-quality retinex-based tone mapping operator
CN110807750B (en) Image processing method and apparatus
CN115345804A (en) Image enhancement implementation method and device
CN107025641B (en) Image interfusion method based on Analysis of Contrast
Wang et al. Multi-weight and multi-granularity fusion of underwater image enhancement
CN110766622A (en) Underwater image enhancement method based on brightness discrimination and Gamma smoothing
JP2012238135A (en) Facial image processing system, facial image processing method, facial image processing program
KR101089902B1 (en) Apparatus and method for estimating edge of digital image
Chen et al. An adaptive image dehazing algorithm based on dark channel prior
Kwon et al. Enhanced high dynamic‐range image rendering using a surround map based on edge‐adaptive layer blurring
Hsieh et al. Single image haze removal using weak dark channel prior
US8698832B1 (en) Perceptual detail and acutance enhancement for digital images
Kimura et al. Halo control for LHE based local adaptive tone mapping
Duan et al. Local contrast stretch based tone mapping for high dynamic range images

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination