CN112053309A - Image enhancement method and image enhancement device - Google Patents

Image enhancement method and image enhancement device Download PDF

Info

Publication number
CN112053309A
CN112053309A CN202011150564.5A CN202011150564A CN112053309A CN 112053309 A CN112053309 A CN 112053309A CN 202011150564 A CN202011150564 A CN 202011150564A CN 112053309 A CN112053309 A CN 112053309A
Authority
CN
China
Prior art keywords
channel
image
stre
stretching
unit
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
CN202011150564.5A
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.)
North Minzu University
Original Assignee
North Minzu University
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 North Minzu University filed Critical North Minzu University
Priority to CN202011150564.5A priority Critical patent/CN112053309A/en
Publication of CN112053309A publication Critical patent/CN112053309A/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
    • 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

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Image Processing (AREA)

Abstract

An image enhancement method, comprising: obtaining a source image Iin(u, v); stretching IinR, G and B-channel color amplitude of (u, v), resulting in color amplitude stretched image Istre(u, v); conversion Istre(u, v) color space of (I)stre(u, V) converting from RGB space to HSV space to obtain hue component H (u, V), brightness component V (u, V) and saturation component S (u, V); weighting and calculating V (u, V) to obtain a new V channel image Vout(u, v); stretching S (u, v) to obtain a stretched S channel image Sout(u, v); inverse transformation of H (u, V), Vout(u, v) and Sout(u, v) to RGB space to obtain image I after image enhancementout(u, v). The embodiment of the invention also provides a device for implementing the image enhancement method.

Description

Image enhancement method and image enhancement device
Technical Field
The present invention relates to the field of image processing technologies, and in particular, to an image enhancement method and an image enhancement apparatus.
Background
Color digital images are important media for feeding back information from nature, and in unfavorable shooting environments, captured images often have low contrast and even degraded images with severe color shifts.
To obtain more information from low quality images, the prior art proposes some algorithms for enhancing the image to optimize the image, for example: the sub-histogram equalization algorithm can decompose the histogram of the original image into a plurality of sub-histograms by using a threshold value, and performs equalization operation on the sub-histograms respectively; the modified histogram equalization algorithm can control the algorithm effect by modifying the histogram frequency value and the cumulative distribution function; the local histogram equalization algorithm implements local equalization operation according to the spatial position of the image; there is also a transform domain-based equalized image enhancement technique, which performs equalized image enhancement by transforming an image in a spatial domain to another domain. Although these methods have been optimized, they have drawbacks: the sub-histogram equalization algorithm needs to implement multiple equalization operations and is difficult to select a proper threshold; although the histogram equalization correction algorithm only needs to implement equalization operation once, a satisfactory correction method and a satisfactory shearing parameter are difficult to find; the histogram variation stipulation technology algorithm has large calculation amount and is difficult to design a proper target histogram; the local histogram equalization algorithm is difficult to find a proper method to eliminate the blocking effect phenomenon and the over-enhancement phenomenon caused by the algorithm; the transform domain equalization-based image enhancement technology is too high in algorithm complexity.
Disclosure of Invention
In view of the above, in order to obtain more information from a low-quality image and overcome the above drawbacks, it is necessary to provide an image enhancement method and an image enhancement apparatus.
The embodiment of the invention provides an image enhancement method, which comprises the following steps:
obtaining a source image Iin(u,v),Iin(u,v)={Rin(u,v),Gin(u,v),Bin(u,v)};
Stretching IinR, G and B-channel color amplitude of (u, v), resulting in color amplitude stretched image Istre(u,v),Istre(u,v)={Rstre(u,v),Gstre(u,v),Bstre(u,v)};
Conversion Istre(u, v) color space of (I)stre(u, V) converting from RGB space to HSV space to obtain hue component H (u, V), brightness component V (u, V) and saturation component S (u, V);
weighting and calculating V (u, V) to obtain a new V channel image Vout(u,v);
Stretching S (u, v) to obtain a stretched S channel image Sout(u,v);
Inverse transformation of H (u, V), Vout(u, v) and Sout(u, v) to RGB space to obtain an image Iout (u, v), I after image enhancementout(u,v)={Rout(u,v),Gout(u,v),Bout(u,v)}。
An embodiment of the present invention further provides an image enhancement apparatus, which may include:
an acquisition unit for acquiring a source image Iin(u,v),Iin(u,v)={Rin(u,v),Gin(u,v),Bin(u,v)};
RGB stretching unit for stretching IinR, G and B-channel color amplitude of (u, v), resulting in color amplitude stretched image Istre(u,v),Istre(u,v)={Rstre(u,v),Gstre(u,v),Bstre(u,v)};
A conversion unit for converting Istre(u, v) color space of (I)stre(u, V) converting from RGB space to HSV space to obtain hue component H (u, V), brightness component V (u, V) and saturation component S (u, V);
a calculating unit for weighting and calculating V (u, V) to obtain a new V channel image Vout(u,v);
A saturation component stretching unit for stretching S (u, v) to obtain a stretched S-channel image Sout(u,v);
An inverse transformation unit for inverse transforming H (u, V), Vout(u, v) and Sout(u, v) to RGB space to obtain image I after image enhancementout(u,v),Iout(u,v)={Rout(u,v),Gout(u,v),Bout(u,v)}。
According to the method, R, G and B channel color amplitude stretching are carried out on a source image, then a V channel image and an S channel image are adjusted based on HSV space, histogram equalization of the V channel image and gray value maximization stretching of the S channel image are achieved, the adjusted images are inversely transformed to RGB space, and the enhanced images are obtained.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the embodiments are briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
FIG. 1 is a flow chart of the steps of a preferred embodiment of the image enhancement method.
Fig. 2 is a diagram showing an effect of an embodiment of the present invention.
Fig. 3 is a diagram illustrating changes before and after a weighted histogram equalization algorithm is performed on a V channel according to an embodiment of the present invention.
Fig. 4 is a diagram illustrating changes before and after remapping the weighted equalized histogram according to an embodiment of the present invention.
FIG. 5 is a graph illustrating the variation of the saturation-maximizing stretching algorithm performed on the S channel according to an embodiment of the present invention.
Fig. 6 is a cross-reference diagram of the 6 scenario enhancement results for a scene graph named "earth" according to an embodiment of the present invention.
FIG. 7 is a comparison reference chart of the 6-scheme histogram results for a scene graph named "ear" according to an embodiment of the present invention.
FIG. 8 is a cross-reference diagram comparing results of 6 schemes for a scene graph named "road" according to an embodiment of the present invention.
FIG. 9 is a comparison reference graph of the 6-solution histogram results for a scene graph named "road" according to an embodiment of the present invention.
Fig. 10 is a cross-reference diagram of the 6 scenario enhancement results for the scenario diagram named "126007" in accordance with an embodiment of the present invention.
FIG. 11 is a comparison reference graph of the 6-solution histogram results for a scene graph named "126007" according to an embodiment of the present invention.
Fig. 12 is a cross-reference diagram of the 6 scenario enhancement results for a scenario diagram named "5096" in accordance with an embodiment of the present invention.
FIG. 13 is a comparison reference graph of the 6-solution histogram results for a scene graph named "5096" according to an embodiment of the present invention.
FIG. 14 is a schematic structural diagram of an image enhancement apparatus according to a preferred embodiment.
Fig. 15 is a schematic structural diagram of the RGB stretching unit 12 according to the first preferred embodiment.
Fig. 16 is a schematic structural diagram of the RGB stretching unit 12 according to the second preferred embodiment.
Fig. 17 is a schematic structural diagram of the RGB stretching unit 12 according to the third preferred embodiment.
FIG. 18 is a schematic diagram of the structure of the computing unit 14 according to a preferred embodiment.
Fig. 19 is a schematic structural diagram of the weighting calculation unit 141 according to a preferred embodiment.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, 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.
The embodiment of the invention provides an image enhancement method, and the main body for realizing the method is an image enhancement device which can be a terminal device with an image processing function. Referring to fig. 1 and fig. 2, the image enhancement method according to the embodiment of the present invention includes:
step S110, obtaining a source image Iin(u, v) wherein Iin(u,v)={Rin(u,v),Gin(u,v),Bin(u,v)};
Step S111, stretching source image IinR, G and B-channel color amplitude of (u, v), resulting in color amplitude stretched image Istre(u,v),Istre(u,v)={Rstre(u,v),Gstre(u,v),Bstre(u,v)};
Step S112, converting the image Istre(u, v) color space of (u, v) image Istre(u, V) converting from RGB space to HSV space to obtain hue component H (u, V), brightness component V (u, V) and saturation component S (u, V);
step S113, weighting and calculating V (u, V) to obtain a new V channel image Vout(u,v);
Step S114, stretching S (u, v) to obtain stretched S channel image Sout(u,v);
Step S115, inverse transformation of H (u, V), Vout(u, v) and Sout(u, v) to RGB space to obtain image I after image enhancementout(u,v),Iout(u,v)={Rout(u,v),Gout(u,v),Bout(u,v)}。
The embodiment of the invention firstly carries out the color source image I of the input RGB formatin(u, v) color amplitude stretching of their R, G and B channels, respectively, in RGB space, source image Iin(u, v) may be expressed as:
Iin(u,v)={Rin(u,v),Gin(u,v),Bin(u,v)} (1)
wherein (U, V) represents a pixel position of the source image and satisfies U1.
To reduce image distortion due to adverse capture environments, RGB spatial color channel stretching may be used as a pre-processing algorithm for image contrast enhancement, stretching each color channel to the maximum allowed range. Stretching IinR, G and B-channel color amplitude of (u, v), resulting in color amplitude stretched image Istre(u, v), image Istre(u, v) may be expressed as:
Istre(u,v)={Rstre(u,v),Gstre(u,v),Bstre(u,v)} (2)
in particular, stretch I is achievedinThe step of R channel color amplitude of (u, v) may specifically include: calculation of Iin(u, v) an R channel color amplitude span; selecting the highest value in the calculated R channel color amplitude value range; stretching the color amplitude of the R channel to the highest value in the value range of the color amplitude of the R channel to obtain Rstre(u,v)。
The color stretching formula of the R channel can be expressed by formula (3)
Figure BDA0002741071130000041
Where min ({ R (u, v) }) and max ({ R (u, v) }) denote the minimum and maximum values of the pixel in the R channel, respectively.
In particular, stretch I is achievedinThe step of G-channel color amplitude of (u, v) may specifically include: calculation of Iin(u, v) G channel color amplitude value range; selecting the highest value in the calculated value range of the color amplitude of the G channel; stretching the color amplitude of the G channel to the highest value in the value range of the color amplitude of the G channel to obtain Gstre(u,v)。
The color stretching formula of the G channel can be expressed by formula (4)
Figure BDA0002741071130000051
Where min ({ G (u, v) }) and max ({ G (u, v) }) denote the minimum and maximum values of the pixel in the R channel, respectively.
In particular, stretch I is achievedinThe step of B-channel color amplitude of (u, v) may specifically include: calculation of Iin(u, v) B channel color amplitude value range; selecting the highest value in the calculated B channel color amplitude value range; stretching the color amplitude of the B channel to the highest value in the value range of the color amplitude of the B channel to obtain Bstre(u,v)。
The color stretching formula of the B channel can be expressed by formula (5)
Figure BDA0002741071130000052
Where min ({ B (u, v) }) and max ({ B (u, v) }) denote the minimum and maximum values of the pixel in the R channel, respectively.
Images in RGB format have difficulty distinguishing chrominance, luminance and saturation information of the image. If the contrast of the source image is directly enhanced in the RGB color space, the proportional relation among R, G and B is easily destroyed, so that the color distortion phenomenon is generated. The HSV (hue, saturation, value) color space is more suitable for the human experience of color perception than other color spaces, and can reduce the mutual interference of the detail information and the color information of the image to a great extent. In step S112, I is convertedstre(u, v) color space of (I)stre(u, V) from the RGB space to the HSV space, a hue component H (u, V), a lightness component V (u, V), and a saturation component S (u, V) are obtained. The conversion function for converting the RGB color space into the HSV color space can be expressed by equation (6):
Figure BDA0002741071130000053
the traditional histogram equalization algorithm usually generates artifacts due to 'over-enhancement', a uniformly distributed histogram can keep more detailed information of an image, and the embodiment of the invention performs combined optimization on the gray levels of the histogram through an optimization criterion, thereby obtaining a satisfactory histogram and achieving the purpose of improving the image quality.
In step S113, a weighted histogram equalization operation is performed on the V channel, and a new V channel image V (u, V) is obtained by performing a weighted calculation on V (u, V)out(u, v), particular embodiments may include the steps of: weighting calculation is carried out on the gray value of the histogram h (i) corresponding to the V (u, V) to obtain a weighted histogram hW(i) (ii) a H is to beW(i) Normalizing to obtain hN(i) (ii) a Mapping hN(i) Non-null strength class of (1), let hN(i) The histogram of (2) is uniformly distributed to obtain weighted calculated Vout(u,v)。
Weighted histogram hW(i) Can be represented by formula (7):
hW(i)=β×h(i)+ω×max{(h(i))},0<ω<1,ω+β=1 (7)
wherein h isW(i) Is a weighted histogram, h (i) indicates a histogram, max { h (i) } is a maximum gray value, i ═ 0, 1., L-1, and when h (i) ═ L-1, it satisfies
hW(i)max=(ω+β)×(L-1)=(L-1) (8)
As can be derived from equations (7) and (8), this optimization criterion can ensure that the output gray levels are always kept in the range of [0, L-1 ]. For darker parts of the source image, the optimization criterion may increase the low gray values; for brighter parts of the source image, the optimization criterion makes the high gray value smaller. Excessive enhancement of the histogram can be effectively avoided, the generation of artifacts is greatly reduced, and the contrast of the image is ensured to be enhanced while the brightness of the image is maintained. The change before and after the weighting of the histogram is shown in fig. 3. As can be seen from fig. 3b of fig. 3, a low gray value will recover more information content after the weighted equalization optimization.
Example of the inventionW(i) Normalizing to obtain hN(i) Wherein, the histogram hN(i) Can be represented by the formula (9):
Figure BDA0002741071130000061
mapping hN(i) Non-null strength class of (1), let hN(i) The histogram of (2) is uniformly distributed to obtain weighted calculated Vout(u,v)。
The histogram after the weighted optimization is equalized, and a part of the gray values may still be lost, as shown in fig. 3, the lost gray values may be detected by observing the change of the histogram, and therefore, the non-empty gray values need to be remapped to the whole interval, so as to obtain the histogram with uniform distribution.
A set omega is first assigned to store non-empty gray values. The formula is defined as follows:
Ω={Ω(m)=hN(i)|hN(i)>0} (10)
wherein Ω (m) is the number of non-empty gray values generated after the storage histogram is equalized, and m is 1,2max. If m ≠ 0, it needs to be remapped to [0, L-1 ≠ 1]. The following calculation rules are used to ensure that the final output histogram can be uniformly spread over the entire space. The calculation criteria are as follows:
Figure BDA0002741071130000062
histogram remapping process as shown in fig. 4, before the histogram is remapped clearly shown in fig. 4, the histogram is obviously unevenly distributed, and after the histogram is remapped, all non-empty gray values are evenly distributed in the range of [0,1 ].
In addition, the embodiment of the invention also provides a selection scheme for the weight parameters omega and beta related in the formula (7), and the searching and the selection are carried out through a golden section algorithm: selecting an initial search range; selecting a brightness error as an iterative objective function; iteration is carried out through the target function to narrow the initial search range; repeating iterative operation through the reduced initial search range until the initial search range is reduced to the target precision; and calculating to obtain optimal weight parameters omega and beta.
To achieve the dual purposes of contrast enhancement and brightness preservation, an objective function J is first defined as follows:
Figure BDA0002741071130000071
Figure BDA0002741071130000072
wherein
Figure BDA0002741071130000073
And Iin,mAverage luminance of the enhanced image and the input image, respectively, and H represents an entropy value; the brightness error is used as a punishment item of the target function, when the brightness error exists, the entropy value is output as a minimum value, and if the brightness error does not exist, the image entropy value is restored to an original value; finally, the conditions to be met are that the luminance error should be minimal and the objective function J should be maximized. The weight at this time is the optimal weight.
When the input source image is Iin(u, v), average luminance value I of input imagein,mThen, using formula (12) and formula (13), the specific implementation of the algorithm step of searching the weight parameter by the golden section algorithm may be as follows:
step S210 inputs golden section point ρ of 0.618, and iterates initial value α1=eps,α2=1-eps;
In step S211, the error range is Δ α ═ α12And determining a smaller accuracy value τ, where τ → 10-4
Step S212, calculating alpha12Corresponding objective function J1,J2
Step S213, when Δ α > τ, J are satisfied1>J2Then, the interval end point formula is updated, and alpha is set2=α1+ ρ × Δ α, and J2Recording as a target function; otherwise, updating the interval endpoint formula and setting alpha1=α1+ (1- ρ). times.DELTA.alpha, with J1Recording as a target function;
step S214, continuously updating the interval endpoint alpha12And an objective function J1,J2Repeating the step S213 until the requirement that the delta alpha is less than the tau is met, and ending the searching step;
step S215, returning and calculating the weight parameters ω and β, where ω is 0.5 × (α)12),β=1-ω。
Further optionally, after performing weighted histogram equalization on the V-channel image in the embodiment of the present invention, the contrast and detail information of the image may be greatly improved, but when the image is converted back to the RGB space, a desaturation or color loss phenomenon may also occur. Through step S114, the gray scale value of the histogram corresponding to the S (u, v) image can be maximally stretched, so that the histogram corresponding to the S (u, v) image is uniformly distributed, and the enhanced S image is obtainedout(u, v) image.
In the HSV space, its brightness and saturation are equation (14) and equation (15), respectively:
V=max{R,G,B} (14)
Figure BDA0002741071130000074
where R, G and B are normalized values of RGB, when enhancing a V-channel image, the image pixel intensity tends to L-1, so there is V ═ max { R, G, B } ═ L-1, the formula is instead or expressed as follows:
R(u,v)=(L-1),G(u,v)=(L-1),B(u,v)=(L-1)(16)
according to equation (15), the minimum saturation is as follows:
Figure BDA0002741071130000081
the higher the saturation of the image is, the more color types are displayed, and in order to display more color information, the saturation information needs to be expanded to the maximum range:
Sout(u,v)=max{Sin(u,v)} (18)
the image saturation stretching process is shown in fig. 5. As shown by fig. 5b in fig. 5, after the saturation is stretched, the corresponding image recovers more detail information.
Finally, in step S115, the resulting final V-channel enhanced image V may be obtainedout(u, v) and final S channel enhanced image Sout(u, v) and the original H (u, v) are inverse transformed into HSV and RGB color space to obtain the final enhanced image Iout(u, v), the transformation function is shown in equation (19):
Figure BDA0002741071130000082
the resulting enhanced image Iout(u, v) are:
Iout(u,v)={Rout(u,v),Gout(u,v),Bout(u,v)} (20)
in a simulation experiment, the method proposed by the embodiment of the present invention is compared with the conventional histogram equalization method (HE), the contrast-limited adaptive equalization method (CLAHE), the average histogram equalization method (AvHeq), and the histogram maximum coverage method (MaxCover), and please refer to fig. 6 to fig. 13.
Fig. 6 and 7 are an enhancement result comparison graph of a scene graph named "earth" and a corresponding histogram comparison reference graph. Wherein fig. 6a, fig. 7a are the source image and the corresponding histogram, respectively. Fig. 6b and 7b are the enhancement results and the corresponding histogram results, respectively, obtained using the conventional HE method. Fig. 6c and 7c are the enhancement result and the corresponding histogram result, respectively, obtained by the sampling CLAHE method. Fig. 6d and 7d are the enhancement results and the corresponding histogram results, respectively, using the AvHeq method. Fig. 6e and 7e are the enhancement results and the corresponding histogram results, respectively, obtained using the MaxCover method. Fig. 6f and 7f are the enhancement results and the corresponding histogram results, respectively, obtained with the method of the present invention.
It can be seen from fig. 6b, 6c, 6d and 6e that the four methods can improve the image quality. Although the contrast of the whole source image is improved and the texture inside the rock is also shown in fig. 6b and 6c, the histogram shapes of the source images are not effectively retained as shown in the corresponding histograms 7b and 7c of the two methods. Part of the detail color information of the display image in fig. 6d is not effectively restored. Fig. 6e and 7e show that the loss of detail information of the image is severe and the overall effect is blurred, and the corresponding histogram results are not uniformly distributed in the whole interval. FIGS. 6f and 7f are the results of the method of the present invention, showing that the texture detail information of the source image is displayed more clearly. In addition, the histogram results are also better. It can be seen that the method provided by the embodiment of the invention can better improve the image contrast and effectively recover the color information of the source image.
Fig. 8 and 9 are a comparison graph of the enhancement results of the present invention for a scene graph named "road" and a corresponding histogram comparison reference graph. Wherein, fig. 8a and fig. 9a are the source image and the corresponding histogram of the source image, respectively. Fig. 8b and 9b are the enhancement result and its corresponding histogram result, respectively, obtained using the conventional HE method. Fig. 8c and 9c are the enhancement result and the corresponding histogram result, respectively, obtained by the sampling CLAHE method. Fig. 8d and 9d are the enhancement results and the corresponding histogram results, respectively, using the AvHeq method. Fig. 8e and fig. 9e are the enhancement result and the corresponding histogram result, respectively, obtained with the MaxCover method. Fig. 8f and 9f are the enhancement results and the corresponding histogram results, respectively, obtained with the method of the present invention.
As shown in fig. 8b and 8c, the HE method and CLAHE method are more effective in defogging the source image, but the color information is not recovered. Fig. 8d, 8e, 9d and 9e show that the AvgHe method and the MaxCover method can effectively maintain the histogram shape of the source image, but the defogging effect and the color information recovery effect are not satisfactory. The result of the embodiment of the invention is shown in fig. 8f, the subjective visual effect is best, especially the color information recovery effect of houses, automobiles and trees at the left and right sides and in remote places is obvious, and the detail part is effectively enhanced.
Fig. 10 and 11 are a comparison graph of the enhancement results of the present invention for a scene graph named "126007" and a corresponding histogram comparison reference graph. Wherein fig. 10a, fig. 11a are the source image and the corresponding histogram, respectively. Fig. 10b and 11b are the enhancement results and the corresponding histogram results, respectively, obtained using the conventional HE method. Fig. 10c and 11c are the enhancement result and the corresponding histogram result, respectively, obtained by the sampling CLAHE method. Fig. 10d and 11d are the enhancement results and the corresponding histogram results, respectively, using the AvHeq method. Fig. 10e and 11e are the enhancement results and the corresponding histogram results, respectively, obtained with the MaxCover method. Fig. 10f and 11f are the enhancement results and the corresponding histogram results, respectively, obtained using the method of the present invention.
Fig. 10b and 10c, the HE method and the CLAHE method are adopted to have distortion phenomenon to the partial sky color of the source image; 10d and 10e show that the AvgHe method and the MaxCover method are adopted to obtain unsatisfactory brightness maintaining effect on the source image, and the overall contrast of the image is still dark; the result of the embodiment of the invention is shown in fig. 10f, and the source image has no color distortion phenomenon, and the contrast ratio is greatly improved while the brightness is maintained.
Fig. 12 and 13 are a comparison graph of the enhancement results of the present invention for a scene graph named "5096" and a corresponding histogram comparison reference graph. Wherein fig. 12a, fig. 13a are the source image and the corresponding histogram, respectively. Fig. 12b and 13b are the enhancement results and the corresponding histogram results, respectively, obtained using the conventional HE method. Fig. 12c and 13c are the enhancement result and the corresponding histogram result, respectively, obtained by the sampling CLAHE method. Fig. 12d and 13d are the enhancement results and the corresponding histogram results, respectively, using the AvHeq method. Fig. 12e and fig. 13e are the enhancement results and the corresponding histogram results, respectively, obtained with the MaxCover method. Fig. 12f and fig. 13f are the enhancement results and the corresponding histogram results, respectively, obtained with the method of the present invention.
Fig. 12b and 12c, the HE method and the CLAHE method are adopted to generate the ground over-enhancement phenomenon and the sky color distortion phenomenon on the source image part. Fig. 12d and 12e show that the AvgHe method and the MaxCover method have good effect on the source image detail information recovery. The result of the embodiment of the invention is shown in fig. 12f, the color reduction effect of the wall, brick and sky color information of the source image is satisfactory, and the overall brightness information is also well improved.
The evaluation of the image enhancement result is divided into subjective evaluation and objective evaluation, and the subjective evaluation directly observes the enhancement effect of the brightness information, the contrast information and the color information of the experimental result image through a visual system. The objective evaluation is a determination using image statistical parameters. The test result of the invention can adopt entropy, image definition (Tenengrad gradient) and average gradient index as objective flat data content.
The image entropy value may characterize the amount of image information. The larger the entropy value is, the richer the detail information that is retained is represented. Equation (13) can be used as the basis for entropy testing.
The image definition reflects the overall visual effect of the image, and a higher definition test result shows that the subjective visual quality of the image is better. Can be expressed by equation (21):
Figure BDA0002741071130000101
Figure BDA0002741071130000102
wherein T is a threshold value, Δmx (u, v) and Δnx (u, v) is the difference between the pixels in the horizontal and vertical directions of the pixel (u, v), respectively.
The average gradient describes the richness of the image details, and higher average gradient test results show that the image details are richer. Can be expressed by equation (23):
Figure BDA0002741071130000103
wherein f (u, v) the gray level of the pixel,
Figure BDA0002741071130000104
and
Figure BDA0002741071130000105
representing a variable number of pixels in a row and column. The results of the entropy, sharpness and mean gradient objective data for the four enhancement experiments are shown in table 1:
Figure BDA0002741071130000111
table 1 objective evaluation index data of different algorithms
From the data in table 1, in the comparison of four sets of image enhancement result parameters, the results of the sharpness data and the average gradient data obtained by the method of the embodiment of the present invention are the largest, which indicates that the enhancement effect is the best. The entropy data results of fig. 6, 8 and 12 also achieved the largest data results compared to other enhancement algorithms. Although the entropy test result of the AvHeq algorithm of fig. 10 is 7.7242, which is higher than that of the method of the present invention, it has been qualitatively shown that the method of the present invention has higher performance in terms of visual perception than the AvHeq algorithm, better comprehensive effect, and better results in terms of brightness maintenance and color information restoration of images than other schemes.
According to the method, R, G and B channel color amplitude stretching are carried out on a source image, then a V channel image and an S channel image are adjusted based on HSV space, histogram equalization of the V channel image and gray value maximization stretching of the S channel image are achieved, the adjusted images are inversely transformed to RGB space, and the enhanced images are obtained.
Referring to fig. 14, an embodiment of the present invention further provides an image enhancement apparatus, which can be used to implement the methods shown in fig. 1 and fig. 2, and specifically, the image enhancement apparatus provided by the embodiment of the present invention includes:
an acquisition unit 11 for acquiring a source image Iin(u,v),Iin(u,v)={Rin(u,v),Gin(u,v),Bin(u, v) }; in the embodiment, reference is made to the foregoing step S110;
RGB stretching unit 12 for stretching IinR, G and B-channel color amplitude of (u, v), resulting in color amplitude stretched image Istre(u,v),Istre(u,v)={Rstre(u,v),Gstre(u,v),Bstre(u, v) }; in the embodiment, reference may be made to step S111;
a conversion unit 13 for converting Istre(u, v) color space of (I)stre(u, V) converting from RGB space to HSV space to obtain hue component H (u, V), brightness component V (u, V) and saturation component S (u, V); in the embodiment, reference may be made to step S112;
a calculating unit 14 for weighting and calculating V (u, V) to obtain a new V channel image Vout(u, v); in the embodiment, reference may be made to step S113;
a saturation component stretching unit 15 for stretching S (u, v) to obtain a stretched S-channel image Sout(u, v); in the embodiment, reference may be made to step S114;
an inverse transformation unit 16 for inverse transforming H (u, V), Vout(u, v) and Sout(u, v) to RGB space to obtain image I after image enhancementout(u,v),Iout(u,v)={Rout(u,v),Gout(u,v),Bout(u, v) }; in a specific embodiment, reference may be made to step S115.
Further optionally, as shown in fig. 15, the RGB stretching unit 12 provided in the embodiment of the present invention may include an R calculating unit 121, an R selecting unit 122, and an R stretching unit 123, configured to specifically stretch the R channel color amplitude:
r calculation unit 121 for calculating Iin(u, v) an R channel color amplitude span;
an R selecting unit 122, configured to select a highest value in the calculated range of values of the color amplitude of the R channel;
an R stretching unit 123, configured to stretch the R channel color amplitude to a highest value in the value range of the R channel color amplitude, to obtain Rstre(u,v);
Further optionally, as shown in fig. 16, the RGB stretching unit 12 provided in the embodiment of the present invention may include a G calculating unit 124, a G selecting unit 125, and a G stretching unit 126, which are used to specifically stretch the G channel color amplitude:
g calculation unit 124 for calculating Iin(u, v) G channel color amplitude value range;
a G selecting unit 125, configured to select a highest value in the calculated G channel color amplitude value range;
a G stretching unit 126 for stretching the G channel color amplitude to the highest value in the value range of the G channel color amplitude to obtain Gstre(u,v);
Further optionally, as shown in fig. 17, the RGB stretching unit 12 provided in the embodiment of the present invention may include a B calculating unit 127, a B selecting unit 128, and a B stretching unit 129, which are used to specifically stretch the B channel color amplitude:
b calculation unit 127 for calculating Iin(u, v) B channel color amplitude value range;
a B selecting unit 128 for selecting the highest value in the calculated B-channel color amplitude value range;
a B stretching unit 129, configured to stretch the B channel color amplitude to a highest value in the B channel color amplitude value range to obtain Bstre(u,v)。
Further optionally, as shown in fig. 18, the calculating unit 14 provided in the embodiment of the present invention may include a weighting calculating unit 141, a normalizing unit 142, and a mapping unit 143, configured to implement weighting equalization calculation:
a weighting calculation unit 141, configured to perform weighting calculation on the gray-level values of the histogram h (i) corresponding to V (u, V), so as to obtain a weighted histogram hW(i),hW(i) β × h (i) + ω × max { (h (i)) },0 < ω < 1, ω + β ═ 1, max { h (i) } is the maximum grayscale value;
a normalization unit 142 for normalizing hW(i) Normalizing to obtain hN(i) Wherein, in the step (A),
Figure BDA0002741071130000131
a mapping unit 143 for mapping hN(i) Non-null strength class of (1), let hN(i) The histogram of (2) is uniformly distributed to obtain weighted calculated Vout(u,v)。
Further optionally, as shown in fig. 19, the weighting calculation unit 141 according to the embodiment of the present invention may further include a selection unit 1411, an iteration and reduction unit 1412, and an optimal weight parameter calculation unit 1413, configured to implement selection of optimal weight parameters ω and β:
a selection unit 1411 for selecting an initial search range; and also for selecting the luminance error as an objective function for the iteration;
an iteration and reduction unit 1412, configured to perform iteration through the objective function to reduce the initial search range; the method is also used for repeating iterative operation through the reduced initial search range until the initial search range is reduced to the target precision;
and an optimal weight parameter calculation unit 1413, configured to calculate to obtain optimal weight parameters ω and β.
The saturation component stretching unit 15 of the embodiment of the present invention may be specifically configured to perform maximum gray scale value stretching on the intensity level of the histogram corresponding to the S (u, v) image, so that the histogram corresponding to the S (u, v) image is uniformly distributed, and the enhanced S image is obtainedout(u, v) image. The detailed description of the embodiments may refer to the foregoing steps, which are not repeated herein.
The image enhancement device provided by the embodiment of the invention overcomes the phenomenon of 'over-enhancement' caused by the traditional histogram equalization algorithm, has simple and concise calculation process and low complexity, can effectively improve the contrast and brightness information of the image, and obtains the enhanced image with high contrast and high color brightness.
The modules or units in the embodiments of the present invention may be implemented by a general-purpose Integrated Circuit, such as a CPU (Central Processing Unit), or an ASIC (Application Specific Integrated Circuit).
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by a computer program, which can be stored in a computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. The storage medium may be a magnetic disk, an optical disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), or the like.
The steps in the method of the embodiment of the invention can be sequentially adjusted, combined and deleted according to actual needs.
The modules or units in the device of the embodiment of the invention can be combined, divided and deleted according to actual needs.
While the invention has been described with reference to a preferred embodiment, it will be understood by those skilled in the art that various changes in form and detail may be made therein without departing from the spirit and scope of the invention.

Claims (10)

1. A method of image enhancement, the method comprising:
obtaining a source image Iin(u, v) said Iin(u,v)={Rin(u,v),Gin(u,v),Bin(u,v)};
Stretching the IinR, G and B-channel color amplitude of (u, v), resulting in color amplitude stretched image Istre(u, v) said Istre(u,v)={Rstre(u,v),Gstre(u,v),Bstre(u,v)};
Converting said Istre(u, v) color space of (I) in (ii) in (iii)stre(u, v) conversion from RGB space to HSV spaceObtaining a hue component H (u, V), a brightness component V (u, V) and a saturation component S (u, V);
weighting and calculating the V (u, V) to obtain a new V channel image Vout(u,v);
Stretching the S (u, v) to obtain a stretched S channel image Sout(u,v);
Inverse transforming said H (u, V), said Vout(u, v) and said Sout(u, v) to RGB space to obtain image I after image enhancementout(u, v) said Iout(u,v)={Rout(u,v),Gout(u,v),Bout(u,v)}。
2. The method of claim 1, wherein said stretching said IinThe R, G and B channel color amplitudes of (u, v) specifically include:
calculating the Iin(u, v) an R channel color amplitude span;
selecting the highest value in the calculated color amplitude value range of the R channel;
stretching the color amplitude of the R channel to the highest value in the value range of the color amplitude of the R channel to obtain the Rstre(u,v);
Calculating the Iin(u, v) G channel color amplitude value range;
selecting the highest value in the calculated value range of the color amplitude of the G channel;
stretching the color amplitude of the G channel to the highest value in the value range of the color amplitude of the G channel to obtain the Gstre(u,v);
Calculating the Iin(u, v) B channel color amplitude value range;
selecting the highest value in the calculated B channel color amplitude value range;
stretching the color amplitude of the B channel to the highest value in the value range of the color amplitude of the B channel to obtain the B channelstre(u,v)。
3. The method of claim 1, wherein the method comprisesWeighting and calculating the V (u, V) to obtain a new V channel image Vout(u, v), including in particular:
weighting calculation is carried out on the gray value of the histogram h (i) corresponding to the V (u, V) to obtain a weighted histogram hW(i) H is saidW(i) β × h (i) + ω × max { (h (i)) },0 < ω < 1, ω + β ═ 1, and max { h (i) } is the maximum grayscale value;
h is to beW(i) Normalizing to obtain hN(i) Wherein, in the step (A),
Figure FDA0002741071120000021
mapping the hN(i) Of (a) is not null, so that h is equal toN(i) The histogram of (a) is uniformly distributed to obtain the weighted calculated Vout(u,v)。
4. The method as claimed in claim 3, wherein the gray-level value of the histogram h (i) corresponding to V (u, V) is weighted to obtain a weighted histogram hW(i) Before, still include:
selecting an initial search range;
selecting a brightness error as an iterative objective function;
iterating through the objective function to narrow the initial search range;
repeating the iterative operation through the reduced initial search range until the initial search range is reduced to a target precision;
and calculating to obtain the optimal weight parameters omega and beta.
5. The method of claim 1, wherein stretching said S (u, v) results in a stretched S-channel image Sout(u, v), including in particular:
performing gray value maximization stretching on the intensity level of the histogram corresponding to the S (u, v) image to enable the histogram corresponding to the S (u, v) image to be uniformly distributed to obtain enhancementThe last said Sout(u, v) image.
6. An image enhancement apparatus, characterized in that the apparatus comprises:
an acquisition unit for acquiring a source image Iin(u, v) said Iin(u,v)={Rin(u,v),Gin(u,v),Bin(u,v)};
An RGB stretching unit for stretching the IinR, G and B-channel color amplitude of (u, v), resulting in color amplitude stretched image Istre(u, v) said Istre(u,v)={Rstre(u,v),Gstre(u,v),Bstre(u,v)};
A conversion unit for converting the Istre(u, v) color space of (I) in (ii) in (iii)stre(u, V) converting from RGB space to HSV space to obtain hue component H (u, V), brightness component V (u, V) and saturation component S (u, V);
a calculating unit for weighting and calculating the V (u, V) to obtain a new V channel image Vout(u,v);
A saturation component stretching unit for stretching the S (u, v) to obtain a stretched S-channel image Sout(u,v);
An inverse transformation unit for inversely transforming the H (u, V), the Vout(u, v) and said Sout(u, v) to RGB space to obtain image I after image enhancementout(u, v) said Iout(u,v)={Rout(u,v),Gout(u,v),Bout(u,v)}。
7. The apparatus of claim 6, wherein the RGB stretching unit comprises:
an R calculation unit for calculating the Iin(u, v) an R channel color amplitude span;
the R selecting unit is used for selecting the highest value in the calculated color amplitude value range of the R channel;
an R stretching unit for stretching the R channel color amplitude to the highest value in the R channel color amplitude value range to obtainThe R isstre(u,v);
A G calculation unit for calculating the Iin(u, v) G channel color amplitude value range;
the G selecting unit is used for selecting the highest value in the calculated value range of the color amplitude of the G channel;
a G stretching unit for stretching the G channel color amplitude to the highest value in the value range of the G channel color amplitude to obtain the Gstre(u,v);
A B calculation unit for calculating the Iin(u, v) B channel color amplitude value range;
the B selecting unit is used for selecting the highest value in the calculated B channel color amplitude value range;
a B stretching unit for stretching the B channel color amplitude to the highest value in the B channel color amplitude value range to obtain the B channel color amplitudestre(u,v)。
8. The apparatus of claim 6, wherein the computing unit comprises:
a weighting calculation unit for performing weighting calculation on the gray value of the histogram h (i) corresponding to the V (u, V) to obtain a weighted histogram hW(i) H is saidW(i) β × h (i) + ω × max { (h (i)) },0 < ω < 1, ω + β ═ 1, and max { h (i) } is the maximum grayscale value;
a normalization unit for normalizing the hW(i) Normalizing to obtain hN(i) Wherein, in the step (A),
Figure FDA0002741071120000031
a mapping unit for mapping the hN(i) Of (a) is not null, so that h is equal toN(i) The histogram of (a) is uniformly distributed to obtain the weighted calculated Vout(u,v)。
9. The apparatus as claimed in claim 8, wherein said weight calculating unit comprises:
a selection unit for selecting an initial search range; and also for selecting the luminance error as an objective function for the iteration; an iteration and reduction unit, configured to iterate through the objective function to reduce the initial search range; the iterative operation is repeated through the reduced initial search range until the initial search range is reduced to a target precision;
and the optimal weight parameter calculation unit is used for calculating the omega and the beta which are used for obtaining the optimal weight parameters.
10. The apparatus according to claim 6, wherein the saturation component stretching unit is specifically configured to maximally stretch gray-scale values of histograms corresponding to the S (u, v) images, so as to make the histograms corresponding to the S (u, v) images uniformly distributed, and obtain the enhanced S (u, v) imagesout(u, v) image.
CN202011150564.5A 2020-10-24 2020-10-24 Image enhancement method and image enhancement device Pending CN112053309A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011150564.5A CN112053309A (en) 2020-10-24 2020-10-24 Image enhancement method and image enhancement device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011150564.5A CN112053309A (en) 2020-10-24 2020-10-24 Image enhancement method and image enhancement device

Publications (1)

Publication Number Publication Date
CN112053309A true CN112053309A (en) 2020-12-08

Family

ID=73606600

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011150564.5A Pending CN112053309A (en) 2020-10-24 2020-10-24 Image enhancement method and image enhancement device

Country Status (1)

Country Link
CN (1) CN112053309A (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111163268A (en) * 2020-01-09 2020-05-15 腾讯科技(深圳)有限公司 Image processing method and device and computer storage medium
CN113888434A (en) * 2021-10-11 2022-01-04 复旦大学 Sand and dust image enhancement method
CN114494256A (en) * 2022-04-14 2022-05-13 武汉金龙电线电缆有限公司 Electric wire production defect detection method based on image processing
CN115205297A (en) * 2022-09-19 2022-10-18 汶上县金振机械制造有限公司 Abnormal state detection method for pneumatic winch
CN115222606A (en) * 2021-04-16 2022-10-21 腾讯科技(深圳)有限公司 Image processing method, image processing device, computer readable medium and electronic equipment
CN115953327A (en) * 2023-03-09 2023-04-11 极限人工智能有限公司 Image enhancement method and system, readable storage medium and electronic equipment
CN118212236A (en) * 2024-05-21 2024-06-18 山东新美达科技材料有限公司 Method for processing surface image of color-coated steel plate

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103886565A (en) * 2014-03-13 2014-06-25 北京工业大学 Nighttime color image enhancement method based on purpose optimization and histogram equalization
CN109447910A (en) * 2018-10-09 2019-03-08 湖南源信光电科技股份有限公司 A kind of low-luminance color image enchancing method based on fuzzy theory
CN110047051A (en) * 2019-04-24 2019-07-23 郑州轻工业学院 A kind of non-uniform lighting colour-image reinforcing method

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103886565A (en) * 2014-03-13 2014-06-25 北京工业大学 Nighttime color image enhancement method based on purpose optimization and histogram equalization
CN109447910A (en) * 2018-10-09 2019-03-08 湖南源信光电科技股份有限公司 A kind of low-luminance color image enchancing method based on fuzzy theory
CN110047051A (en) * 2019-04-24 2019-07-23 郑州轻工业学院 A kind of non-uniform lighting colour-image reinforcing method

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
S.C.F. LIN ET AL.: ""Image enhancement using the averaging histogram equalization (AVHEQ) approach for contrast improvement and brightness preservation"", 《COMPUTERS AND ELECTRICAL ENGINEERING》 *
刘言: ""图像清晰化算法研究与实现"", 《中国优秀博硕士学位论文全文数据库(硕士)信息科技辑》 *

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111163268A (en) * 2020-01-09 2020-05-15 腾讯科技(深圳)有限公司 Image processing method and device and computer storage medium
CN115222606A (en) * 2021-04-16 2022-10-21 腾讯科技(深圳)有限公司 Image processing method, image processing device, computer readable medium and electronic equipment
CN113888434A (en) * 2021-10-11 2022-01-04 复旦大学 Sand and dust image enhancement method
CN114494256A (en) * 2022-04-14 2022-05-13 武汉金龙电线电缆有限公司 Electric wire production defect detection method based on image processing
CN114494256B (en) * 2022-04-14 2022-06-14 武汉金龙电线电缆有限公司 Electric wire production defect detection method based on image processing
CN115205297A (en) * 2022-09-19 2022-10-18 汶上县金振机械制造有限公司 Abnormal state detection method for pneumatic winch
CN115953327A (en) * 2023-03-09 2023-04-11 极限人工智能有限公司 Image enhancement method and system, readable storage medium and electronic equipment
CN115953327B (en) * 2023-03-09 2023-09-12 极限人工智能有限公司 Image enhancement method, system, readable storage medium and electronic equipment
CN118212236A (en) * 2024-05-21 2024-06-18 山东新美达科技材料有限公司 Method for processing surface image of color-coated steel plate

Similar Documents

Publication Publication Date Title
CN112053309A (en) Image enhancement method and image enhancement device
CN110599415A (en) Image contrast enhancement implementation method based on local adaptive gamma correction
CN111242878B (en) Mine image enhancement method based on cuckoo search
US8885965B2 (en) Image denoising method
CN111968041A (en) Self-adaptive image enhancement method
CN107644409B (en) Image enhancement method, display device and computer-readable storage medium
KR100694153B1 (en) Method and Apparatus for Image Processing based on a Mapping Function
CN108564544A (en) Image Blind deblurring based on edge perception combines sparse optimization method
CN110809126A (en) Video frame interpolation method and system based on adaptive deformable convolution
KR102277005B1 (en) Low-Light Image Processing Method and Device Using Unsupervised Learning
CN113129300A (en) Drainage pipeline defect detection method, device, equipment and medium for reducing false detection rate
CN113947553B (en) Image brightness enhancement method and device
CN115457249A (en) Method and system for fusing and matching infrared image and visible light image
CN115965544A (en) Image enhancement method and system for self-adaptive brightness adjustment
CN115797205A (en) Unsupervised single image enhancement method and system based on Retinex fractional order variation network
CN112991240B (en) Image self-adaptive enhancement algorithm for real-time image enhancement
WO2020107308A1 (en) Low-light-level image rapid enhancement method and apparatus based on retinex
CN116703745A (en) Image enhancement method, device, electronic equipment and storage medium
JP2020181402A (en) Image processing system, image processing method and program
Mosny et al. Cubical gamut mapping colour constancy
Bataineh Brightness and Contrast Enhancement Method for Color Images via Pairing Adaptive Gamma Correction and Histogram Equalization
Lee et al. Efficient Low Light Video Enhancement Based on Improved Retinex Algorithms
Diab et al. Comparison of GWO, BAT, and CLAHE in Image Contrast Enhancement
CN116630218B (en) Multi-exposure image fusion method based on edge-preserving smooth pyramid
CN115526808B (en) Low-illumination image enhancement method of improved anisotropic diffusion equation model

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20201208

RJ01 Rejection of invention patent application after publication