CN115293989A - Image enhancement method integrating MsRcR and automatic color gradation - Google Patents

Image enhancement method integrating MsRcR and automatic color gradation Download PDF

Info

Publication number
CN115293989A
CN115293989A CN202211018181.1A CN202211018181A CN115293989A CN 115293989 A CN115293989 A CN 115293989A CN 202211018181 A CN202211018181 A CN 202211018181A CN 115293989 A CN115293989 A CN 115293989A
Authority
CN
China
Prior art keywords
image
color
msrcr
value
reflection
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
CN202211018181.1A
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.)
Southeast University
Original Assignee
Southeast 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 Southeast University filed Critical Southeast University
Priority to CN202211018181.1A priority Critical patent/CN115293989A/en
Publication of CN115293989A publication Critical patent/CN115293989A/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
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10024Color image
    • 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

Abstract

The invention relates to the field of image processing, and discloses an image enhancement method integrating MsRcR and automatic color gradation, which comprises the following steps: 1) Separating three color space components of an original image, and converting the three color space components into a logarithmic domain; 2) Processing the image by using a Gaussian surrounding function to obtain an illumination component; 3) Subtracting the original image and the illumination component in a logarithmic domain to obtain a reflection component; 4) Repeating the steps 2 and 3 twice and carrying out average weighting on the reflection components; 5) Carrying out linearization processing on the reflection component obtained in the step 4 to obtain an image a; 6) Automatic tone scale, determining parameters, counting histograms of different channels, establishing a hidden reflection table after determining an upper limit value and a lower limit value, and performing hidden reflection on an original image to obtain an image b; 7) And (5) adjusting certain weights of the images a and b in the steps (5) and (6) to fuse until the quality evaluation effect of the images meets the expectation, and obtaining the final output image. The method can make the processed image more vivid than the processed image.

Description

Image enhancement method integrating MsRcR and automatic color gradation
Technical Field
The invention belongs to the field of image processing, and particularly relates to an image enhancement method integrating MsRcR and automatic color gradation.
Background
For a picture with lower quality, the image enhancement technology can be utilized to carry out various optimization treatments such as defogging, contrast enhancement, lossless amplification, stretching recovery and the like on the picture. Edwin. H.Land proposed (The Retinex Theory of Color Vision [ J ]. Scientific American,1978,237 (6): 108-128) Retinex image enhancement, which is based on The Theory that The Color of an object is determined by The reflection ability of The object to long-wave (red), medium-wave (green), and short-wave (blue) light, rather than by The absolute value of The intensity of The reflected light, and The Color of The object is not affected by illumination non-uniformity and has uniformity, i.e., retinex is based on Color perception uniformity (Color constancy). Unlike the traditional linear and nonlinear methods which can only enhance a certain feature of an image, retinex can balance three aspects of dynamic range compression, edge enhancement and color constancy, so that various different types of images can be adaptively enhanced.
Researchers are constantly developing Retinex algorithms, which mainly include the following:
(1) SSR, this method can remove the influence of illumination, keep the inherent attribute of the thing, but the balance between color fidelity and detail retention is difficult to guarantee.
(2) The MSR method can simultaneously keep high fidelity of the image and compress the dynamic range of the image, but the processed image has the phenomena of color distortion and image fading.
(3) MsRcR, the method can eliminate the defect of image color distortion, but due to the selection of the parameter Dynamic, the outside range is simply set as the maximum/minimum value, and when the distribution is extremely uneven and the colors are more, a larger problem can occur.
Disclosure of Invention
In order to solve the problems, the invention discloses an image enhancement method integrating an MsRcR and an automatic color level, which performs fusion processing on each color channel according to a certain proportion by simultaneously introducing the automatic color level and the MsRcR.
In order to achieve the purpose, the technical scheme of the invention is as follows:
an image enhancement method integrating MsRcR and automatic tone scale, comprising the steps of:
step 1, inputting an original image, separating three color space components, and converting the three color space components into logarithms.
Step 2, selecting a proper scale sigma and filtering three color channels of the image by using a Gaussian surrounding function to obtain an estimated illumination component;
step 3, subtracting the original image and the illumination component in a logarithmic domain to obtain a reflection component;
step 4, changing the scale sigma and repeating the steps 2 and 3 twice, and carrying out average weighting on the reflection components on three different scales;
and 5, performing linearization processing on each value of each channel of the reflection component to obtain an image a.
And 6, automatic color gradation, namely independently adjusting each color channel in the digital image input in the step 1, and redistributing the pixel values in proportion to obtain an image b.
And 7, adjusting the weights of the images a and b to obtain a fused picture, evaluating the quality of the picture by using a BRISQUE algorithm, and obtaining a final output image if an evaluation result shows that the image enhancement effect better meets the expectation. Otherwise, the weights are readjusted.
Specifically, in step 1, it is required to log R, G, and B of the original image I and convert the log into a log domain, so that the subsequent calculation is simpler.
Specifically, in step 2, the convolution result of the gaussian surround function G and the original image I is the illumination component. The scale parameter σ in the gaussian surround function is very likely to affect the final result of image enhancement. When the sigma is smaller, the representation Gaussian template has small scale, and at the moment, the detail information of the edge can be well kept, the dynamic range is enlarged, but the color cannot be kept; when σ is large, color recovery is good, but the dynamic range becomes small and detail remains bad.
Wherein, the gaussian surround function:
Figure BDA0003812964340000021
specifically, in step 3, the Retinex theory considers that the illumination intensity determines the dynamic range of all the pixels in the original image, and the inherent property of the original image is determined by the reflection coefficient of the object itself. That is, it is assumed that the reflection image and the illumination image are multiplied by the original image, and therefore, only the influence of illumination is removed and the inherent property of the object is retained. The concrete formula is as follows:
Figure BDA0003812964340000022
wherein I represents the ith color channel, I (x, y) is the original image, R (x, y) is the reflection component, L (x, y) is the illumination component, x represents the convolution, G (x, y) represents the gaussian surround function, and R (x, y) is the reflection component of the log domain.
Specifically, in step 4, three scales, i.e., large, medium, and small, should be selected to perform steps 2 and 3, respectively, and the final result is weighted averagely, or each scale corresponds to a different weight, and the sum of the weights of the scales must be 1.
Specifically, in step 5, the pixel Mean of each color channel of the reflection components R, G, and B is calculated i Mean square error, var i Then, the minimum value Min of each channel is calculated by the following formula i Max, max i
Figure BDA0003812964340000023
Then a linear mapping is performed for each Value of each channel:
Figure BDA0003812964340000024
meanwhile, an overflow judgment is also needed to be added:
Figure BDA0003812964340000031
resulting in a processed image a.
Specifically, in step 6, two important parameters affecting the automatic tone scale effect are determined to be LowCut and HighCut respectively, then histograms of the channels are counted respectively, and the upper and lower limit values determined by the channels according to the given parameters are calculated respectively. That is, for each channel, the statistical histogram is accumulated from the color level 0 upward, and when the accumulated value is larger than all the pixels of LowCut, the color level value at this time is MinBlue. The histogram is then accumulated downward starting from the color level 255, and if the accumulated value is larger than all pixels of HighCut, the color level value at this time is MaxBlue. Next, a hidden table is constructed from the just calculated MinBlue/MaxBlue, and for values less than MinBlue, the hidden is 0, for values greater than MaxBlue, the hidden is 255, and for values between MinBlue and MaxBlue, the linear hidden is performed, and the hidden is between 0 and 255 by default. Finally, the image data of each channel is subjected to hidden projection.
Specifically, in step 7, the image a obtained by the MsRcR processing and the image b obtained by the automatic tone processing are fused according to a certain weight. This makes it possible to complement each other. The formula is as follows:
Result=α*AUTO img +(1-α)*MsRcR
wherein Result is the final output picture, AUTO img For picture a, msRcR for picture b, and α represents a weighting factor.
In addition, in order to test whether the Quality of the obtained pictures is better, the BRISQUE algorithm (a.moment, a.k.moorthy and a.c.bovik, "No-Reference Image Quality Assessment in the Spatial Domain," in IEEE Transactions on Image Processing, vol.21, no.12, pp.4695-4708, dec.2012, doi. And (4) performing quality evaluation on the fused image by using a BRISQUE algorithm, and if the quality evaluation result is poor, readjusting alpha to perform image re-fusion. And evaluating the newly fused image, and circulating until the evaluation result reaches the expectation, thereby effectively exerting the advantages of the MsRcR algorithm and the automatic color gradation algorithm.
The invention has the beneficial effects that:
1. the image processed by the method has improved contrast and brightness similar to a real scene, and the image is more vivid compared with the image processed by the conventional image enhancement algorithm under the perception of a human visual system.
2. The method solves the problem that the pixel outside the range is directly set to be 0 or 255 due to the selection of the parameter Dynamics in the MsRcR, and solves the problem that the MsRcR image enhancement effect is poor when the image distribution is extremely uneven and the colors are more.
3. The invention solves the problems that colors are possibly removed or color traces are introduced in an automatic color gradation algorithm, and the integral colors have deviation.
4. The invention successfully combines the advantages of two algorithms of MsRcR and automatic color gradation, improves the color acuity when processing images by using the MsRcR, solves the problem of out-of-limit pixel range when processing linearization by using the automatic color gradation algorithm, and greatly improves the image enhancement effect.
Drawings
Fig. 1 is a flowchart of an image enhancement method integrating MsRcR and automatic tone scale according to the present invention.
Detailed Description
The present invention will be further illustrated with reference to the accompanying drawings and specific embodiments, which are to be understood as merely illustrative of the invention and not as limiting the scope of the invention.
The invention discloses an image enhancement method integrating MsRcR and automatic color gradation, which has the flow as shown in figure 1:
(1) The original image is input and the three color space components are separated and converted to logarithms.
Firstly, an original picture needing image enhancement is taken as an input, representing an image signal received by an observed or a camera, R, G and B of an original image I are logarithmized and converted into a logarithmic domain, so that the subsequent calculation process is carried out in the logarithmic domain.
(2) And selecting a proper scale sigma and filtering the three color channels of the image by using a Gaussian surrounding function to obtain an estimated illumination component.
The convolution result of the gaussian surround function G and the original image I is the illumination component. The scale parameter σ in the gaussian surround function is very likely to affect the final result of image enhancement. When the sigma is smaller, the scale of the representative Gaussian template is smaller, the detail information of the edge can be better kept, the dynamic range is larger, but the color cannot be kept; when σ is large, color recovery is good, but dynamic range becomes small and detail remains poor (typically taking σ between 80 and 100 is appropriate). Wherein, the Gaussian surrounding function is:
Figure BDA0003812964340000041
(3) The original image and the illumination component are subtracted in the logarithmic domain to obtain the reflection component.
Retinex theory considers that the illumination intensity determines the dynamic range of all pixel points in the original image, and the inherent property of the original image is determined by the reflection coefficient of an object. The image observed by a human being is formed by the light rays reflected by the reflection coefficient of the object. I.e. assuming that the reflected image and the illumination image are multiplied by each other to be the image signal observed or received by the camera, it is obvious that if an image is regarded as consisting of illumination light and reflected light, only the illumination effect is removed and the inherent property of the object is preserved. The concrete formula is as follows:
Figure BDA0003812964340000042
wherein I represents the ith color channel, I (x, y) is the original image, R (x, y) is the reflection component, L (x, y) is the illumination component, x represents the convolution, G (x, y) represents the gaussian surround function, and R (x, y) is the reflection component of the log domain.
(4) Steps 2, 3 are repeated twice by changing the scale σ and the reflection components are weighted on average over three different scales.
And (3) selecting a large scale, a medium scale and a small scale to carry out the steps 2 and 3 respectively, and carrying out average weighting on the final result, or each scale corresponds to different weights, and the sum of the weights of all scales is required to be 1. When the scale parameter sigma of the Gaussian surrounding function is small, the detail information of the edge can be well kept, but the color cannot be kept; when the scale parameter is larger, the color recovery effect becomes better, but the effect becomes worse for detail processing (generally, it is appropriate to take σ between 80 and 100). In order to keep details well and make the color recovery effect obvious, the reflected components obtained under three different scales are weighted averagely.
(5) And 4, carrying out linearization processing on each value of each channel of the result obtained in the step 4 to obtain an image a.
For each channel, it is necessary to average Mean from pixel i Variance of pixel Var i Then, by the formula:
Figure BDA0003812964340000051
get the minimum Min i Max, max i Then, for each value of each channel, linearization is performed:
Figure BDA0003812964340000052
resulting in a processed image a.
(6) And (3) automatic color gradation, which is used for independently adjusting each color channel in the digital image input in the step (1) and redistributing the pixel values in proportion to obtain an image b.
Firstly, determining two important parameters influencing the automatic color gradation effect as LowCut (low cut) and Highcut (high cut), then respectively counting the histogram of each channel, and then respectively calculating the upper limit value and the lower limit value of each channel determined according to the given parameters. That is, for each channel, the statistical histogram is accumulated from the color level 0 upward, and when the accumulated value is larger than all the pixel numbers of LowCut, the color level value at this time is MinBlue. The histogram is then accumulated downward starting from the tone 255, and if the accumulated value is larger than all pixels of HighCut, the tone value at this time is MaxBlue. Next, a hidden table is constructed from the just calculated MinBlue/MaxBlue, and for values less than MinBlue, the hidden is 0, for values greater than MaxBlue, the hidden is 255, and for values between MinBlue and MaxBlue, the linear hidden is performed, and the hidden is between 0 and 255 by default. Finally, the image data of each channel is subjected to hidden projection.
(7) And (5) fusing the images a and b in the steps (5) and (6) according to a certain weight to obtain a final output image.
And adding pixels of each channel of the two pictures according to a certain weight by using the image a obtained by the MsRcR processing and the image b obtained by the automatic gradation processing to obtain a final output image. This makes it possible to complement each other. The formula is as follows. The image obtained by the method not only improves the color recovery degree of the image, but also uses an automatic color gradation algorithm to process the problem that the pixel range is out of limit during linear processing, thereby greatly improving the image enhancement effect.
Result=α*AUTO img +(1-α)*MsRcR
Wherein Result is the final output picture, AUTO img For picture a, msRcR for picture b, and α represents a weighting factor.
In addition, in order to test whether the Quality of the obtained pictures is better, the BRISQUE algorithm (a.moment, a.k.moorthy and a.c.bovik, "No-Reference Image Quality Assessment in the Spatial Domain," in IEEE Transactions on Image Processing, vol.21, no.12, pp.4695-4708, dec.2012, doi. And (4) performing quality evaluation on the fused image by using a BRISQUE algorithm, and if the quality evaluation result is poor, readjusting alpha to perform image re-fusion. And evaluating the newly fused image, and circulating until the evaluation result reaches the expectation, thereby effectively exerting the advantages of the MsRcR algorithm and the automatic color gradation algorithm. Through continuous trial, the alpha value is usually about 0.2 and is proper, and for different photos, the quality of the fused image can be evaluated, so that the alpha value can be automatically adjusted to obtain the image with the best effect.
A specific embodiment of the present invention has been described in detail. It will be appreciated by persons skilled in the art that the present invention is not limited by the specific embodiments described above. The foregoing detailed description of the embodiments and description is provided for the purpose of illustrating the principles of the present invention and is provided for the purpose of providing an understanding of the various changes and modifications that may be made without departing from the spirit and scope of the invention as defined by the appended claims. The scope of the invention is defined by the claims and their equivalents.

Claims (5)

1. An image enhancement method integrating MsRcR and automatic tone scale, comprising the steps of:
step 1, inputting an original image, separating three color space components, and converting the three color space components into logarithms;
step 2, selecting a scale sigma and filtering three color channels of the image by using a Gaussian surrounding function to obtain an estimated illumination component;
step 3, subtracting the original image and the illumination component in a logarithmic domain to obtain a reflection component;
step 4, changing the scale sigma, repeating the step 2 and the step 3 twice, and carrying out average weighting on the reflection components on three different scales;
step 5, carrying out linearization processing on each value of each color channel of the result obtained in the step 4 to obtain an image a;
step 6, automatic color gradation, namely, independently adjusting each color channel in the digital image input in the step 1, and redistributing pixel values in proportion to obtain an image b;
step 7, adjusting the weights of the images a and b to obtain a fused picture, performing quality evaluation on the picture by using a BRISQUE algorithm, and obtaining a final output image if an evaluation result shows that the image enhancement effect better meets the expectation; otherwise, the weight is readjusted.
2. The method of claim 1, wherein the MsRcR and the automatic tone scale are integrated, and the method further comprises: in step 3, the reflection component is calculated from the difference between the original image in the logarithmic domain and the convolution of the original image and the gaussian surrounding function, so that only the attribute of the object is retained, and the influence of external illumination is removed, and the formula is as follows:
Figure FDA0003812964330000011
where, the index I represents the ith color channel, I (x, y) is the original image, R (x, y) is the reflection component, L (x, y) is the illumination component, x represents the convolution, G (x, y) represents the gaussian surround function, and R (x, y) is the reflection component of the log domain.
3. The method of claim 1, wherein the MsRcR and the automatic tone scale are combined to form an image enhancement method, comprising: the specific method of step 5 is that for each color channel, the Mean value of the pixel is required to be used i Variance of pixel Var i Then, by the formula:
Figure FDA0003812964330000012
get the minimum Min i Max, max i Then, a linear mapping is performed linearly for each value of each color channel:
Figure FDA0003812964330000013
meanwhile, an overflow judgment is also needed to be added:
Figure FDA0003812964330000014
resulting in a processed image a.
4. The method of claim 1, wherein the MsRcR and the automatic tone scale are integrated, and the method further comprises: the specific method in step 6 is to count the histograms of the color channels, and then calculate the upper and lower limits determined by the color channels according to the given parameters, that is, for each color channel, the histogram is counted from the color level 0 to the upper part, and when the accumulated value is greater than all the pixel numbers of LowCut, the color level value at this time is taken as MinBlue; then, accumulating the histogram downwards from the color level 255, and if the accumulated value is larger than all pixels of Highcut, taking the color level value at the moment as MaxBlue; secondly, constructing a hidden transmission table according to the just calculated MinBlue/MaxBlue, wherein the hidden transmission is 0 for the value smaller than MinBlue, the hidden transmission is 255 for the value larger than MaxBlue, and the linear hidden transmission is performed for the value between MinBlue and MaxBlue, and the default hidden transmission is between 0 and 255; and finally, performing hidden projection on the image data of each channel to obtain an image b.
5. The method of claim 1, wherein the MsRcR and the automatic tone scale are combined to form an image enhancement method, comprising: the specific method of the step 7 is that after a weight is respectively given to an image a obtained by MsRcR image enhancement and an image b obtained by automatic color level image enhancement, each pixel of each color channel of the two images is added to obtain a fusion image; and then, in order to test whether the quality of the obtained image is better or not, using a BRISQUE algorithm to perform quality evaluation on the fused image, if the quality evaluation result is poorer, readjusting alpha to perform image re-fusion, evaluating the newly fused image, and circulating until the evaluation result reaches the expectation.
CN202211018181.1A 2022-08-24 2022-08-24 Image enhancement method integrating MsRcR and automatic color gradation Pending CN115293989A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211018181.1A CN115293989A (en) 2022-08-24 2022-08-24 Image enhancement method integrating MsRcR and automatic color gradation

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211018181.1A CN115293989A (en) 2022-08-24 2022-08-24 Image enhancement method integrating MsRcR and automatic color gradation

Publications (1)

Publication Number Publication Date
CN115293989A true CN115293989A (en) 2022-11-04

Family

ID=83831903

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211018181.1A Pending CN115293989A (en) 2022-08-24 2022-08-24 Image enhancement method integrating MsRcR and automatic color gradation

Country Status (1)

Country Link
CN (1) CN115293989A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117368122A (en) * 2023-12-07 2024-01-09 津泰(天津)医疗器械有限公司 FRD cervical dyeing real-time comparison method based on color chart

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117368122A (en) * 2023-12-07 2024-01-09 津泰(天津)医疗器械有限公司 FRD cervical dyeing real-time comparison method based on color chart
CN117368122B (en) * 2023-12-07 2024-02-13 津泰(天津)医疗器械有限公司 FRD cervical dyeing real-time comparison method based on color chart

Similar Documents

Publication Publication Date Title
Wang et al. Adaptive image enhancement method for correcting low-illumination images
Huang et al. Shallow-water image enhancement using relative global histogram stretching based on adaptive parameter acquisition
US7881554B2 (en) Method for correcting a digital image
RU2400815C2 (en) Method of enhancing digital image quality
CN111292246B (en) Image color correction method, storage medium, and endoscope
US20040252907A1 (en) Image processing method, apparatus, and program
KR100771158B1 (en) Method AND System For Enhancement Color Image Quality
Hanumantharaju et al. Color image enhancement using multiscale retinex with modified color restoration technique
CN110852956A (en) Method for enhancing high dynamic range image
CN115293989A (en) Image enhancement method integrating MsRcR and automatic color gradation
CN111476744A (en) Underwater image enhancement method based on classification and atmospheric imaging model
Li et al. Underwater image restoration based on improved background light estimation and automatic white balance
CN116309152A (en) Detail enhancement method, system, equipment and storage medium for low-illumination image
CN113706393A (en) Video enhancement method, device, equipment and storage medium
CN114627009A (en) Image enhancement method and system based on brightness correction and fusion channel prior
CN108765337B (en) Single color image defogging processing method based on dark channel prior and non-local MTV model
Fazilov et al. Improving image contrast: Challenges and solutions
CN115937024A (en) Multi-frame fusion low-illumination image enhancement method based on Retinex theory
CN114549386A (en) Multi-exposure image fusion method based on self-adaptive illumination consistency
CN113256533B (en) Self-adaptive low-illumination image enhancement method and system based on MSRCR
CN111640068A (en) Unsupervised automatic correction method for image exposure
Terai et al. Color image contrast enhancement by retinex model
KR20160001897A (en) Image Processing Method and Apparatus for Integrated Multi-scale Retinex Based on CIELAB Color Space for Preserving Color
CN110276733B (en) Color image enhancement method based on FPGA
Pavithra et al. Automatic image quality tuning framework for optimization of isp parameters based on multi-stage optimization approach

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