CN111292263A - Image enhancement method based on color correction and deblurring - Google Patents

Image enhancement method based on color correction and deblurring Download PDF

Info

Publication number
CN111292263A
CN111292263A CN202010069967.0A CN202010069967A CN111292263A CN 111292263 A CN111292263 A CN 111292263A CN 202010069967 A CN202010069967 A CN 202010069967A CN 111292263 A CN111292263 A CN 111292263A
Authority
CN
China
Prior art keywords
image
channel
deblurring
contrast
value
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.)
Granted
Application number
CN202010069967.0A
Other languages
Chinese (zh)
Other versions
CN111292263B (en
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.)
Donghua University
Original Assignee
Donghua 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 Donghua University filed Critical Donghua University
Priority to CN202010069967.0A priority Critical patent/CN111292263B/en
Publication of CN111292263A publication Critical patent/CN111292263A/en
Application granted granted Critical
Publication of CN111292263B publication Critical patent/CN111292263B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/90Dynamic range modification of images or parts thereof
    • G06T5/92Dynamic range modification of images or parts thereof based on global image properties
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/73Deblurring; Sharpening

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Processing Of Color Television Signals (AREA)
  • Picture Signal Circuits (AREA)

Abstract

The invention discloses an image enhancement method based on color correction and deblurring. The method effectively fuses two stages of color correction and deblurring. In the color correction stage, contrast stretching is firstly carried out on an original image, and in order to solve the problems of excessive contrast stretching or insufficient stretching and the like, the contrast and the color of the image are further optimized and adjusted by gamma correction according to the gray scale world prior, so that the gray scale average values of R, G, B channels of the image tend to be equal. Then, the method introduces a deblurring stage to enhance the details of the image, and uses a dark channel prior to deblurr the image after color correction to obtain a final enhanced image. The underwater image enhancement method provided by the invention has a good overall recovery effect, and can recover the detail information of the image while optimizing the overall contrast and color.

Description

Image enhancement method based on color correction and deblurring
Technical Field
The invention relates to an image enhancement method based on color correction and deblurring, in particular to a special enhancement mechanism for underwater images, and belongs to the technical field of image enhancement.
Background
With the rapid expansion of population and the increasing exhaustion of land resources, people have looked towards the ocean. The sea floor contains huge resources, which are considered by mankind as the "sixth continent" available. The development, utilization and protection of marine resources is a strategic deployment that is profoundly influenced. The theoretical technologies of acquisition, transmission, processing and the like of ocean information are important for reasonably developing, utilizing and protecting ocean resources. The underwater image is an important carrier of ocean information, and the phenomena of color cast (the lowest red light energy is absorbed firstly, so that the underwater image is usually blue-green), low contrast, blur, uneven illumination and the like often occur in the underwater image due to the fact that light is absorbed and scattered when being transmitted underwater. Therefore, the image obtained by people directly shooting at the seabed is usually a degraded image, and the degraded image cannot completely express ocean information and further cannot meet the actual application requirement.
As an increasingly popular research field, underwater image enhancement has wide application prospects in both the industrial and academic fields. The existing underwater image enhancement methods have certain limitations and are difficult to recover the chromaticity and the definition of an image. The enhanced image is too reddish as in the red channel prior algorithm proposed by Adrian Galdran et al; chongyi Li et al propose an algorithm based on minimum information loss and histogram distribution prior, and the enhanced image is too reddish too much; the underwater dark channel first-check algorithm proposed by p.l. drews et al, the enhanced image still turned to cyan, and the red component was not well recovered; the enhancement algorithm proposed by Shaobing Gao et al based on the adaptive retina mechanism has low image contrast and image details are lost after enhancement. Therefore, in order to better develop, utilize and protect ocean resources and meet the requirements of practical applications such as submarine archaeology, underwater robots and the like, an underwater image enhancement method capable of correcting color cast of an image and improving image definition is needed.
Disclosure of Invention
The invention aims to solve the technical problem of degradation of underwater image quality.
In order to solve the technical problems, the technical scheme of the invention is to provide an image enhancement method based on color correction and deblurring, which improves the overall recovery quality of an underwater image by performing color correction and deblurring in stages and mainly comprises the following steps:
the method comprises the following steps: respectively calculating the original image I according to the magnitude relation of the sum of the gray values of different channelsoriR, G, B minimum threshold for contrast stretch
Figure BDA0002377045750000021
And a maximum threshold value
Figure BDA0002377045750000022
c represents one of the R, G, B three channels, i.e., c ∈ { R, G, B }.
Step two: according to a minimum threshold value
Figure BDA0002377045750000023
And a maximum threshold value
Figure BDA0002377045750000024
Determining the stretched gray value range of different channels, and then comparing the original image IoriRespectively performing contrast stretching on each channel to obtain a contrast stretched image Ics
Step three: base ofCalculating gamma correction coefficients gamma of different channels by gray scale world prior and dichotomyc. Firstly, respectively calculating the sum of gray values of each channel of the image after the contrast stretching, and recording the maximum value of the sum as maxval_csThen according to the formula
Figure BDA0002377045750000025
Solving for gamma by dichotomycM and n are the height and width of the image, respectively,
Figure BDA0002377045750000026
is the ith gray value of a certain channel.
Step four: according to the obtained gamma correction coefficient gammacTo 1, paircsCarrying out gamma correction to obtain an image I after gamma correctiongm
Step five: due to the image IgmThe problem of detail blurring exists, and the deblurring processing is further carried out. Using dark channel prior to carry out deblurring operation to obtain an image IgmIs provided with a dark channel
Figure BDA0002377045750000027
Step six: according to the dark channel
Figure BDA0002377045750000028
Estimation of background light Ac
Step seven: from the dark channel and the background light, the transmittance t is calculatedc(x) (ii) a The transmittance is then further optimized using guided filtering.
Step eight: according to the formula
Figure BDA0002377045750000029
Restoring each image channel, where t0Is constant, thereby restoring a clear image.
Aiming at the problem of low quality of underwater images such as color cast, detail blur and the like, the method enhances the original image by stages, sequentially solves the problems of color cast and detail blur, and has the advantages of ring-to-ring buckling and gradual image improvement. In the color correction stage, contrast stretching is firstly carried out on different channels of the original image, and the stretching gray value range of different channels is different due to the improved contrast stretching operation. Since the image after stretching may have the case that the contrast is stretched excessively or stretched insufficiently, after the contrast stretching is completed, the gamma correction is adopted to adjust the global contrast and color, and the gamma correction coefficient is found based on the gray world prior. The method provided by the invention can correct the color cast of the image, improve the definition of the image and better give consideration to the overall contrast, color and detail information of the recovered image.
Drawings
FIG. 1 is a flow chart of the method of the present invention;
FIG. 2 is a flow chart of determining different channel minimum and maximum thresholds;
FIG. 3 is a flow chart for solving for gamma correction coefficients;
FIG. 4 is a comparison of an original underwater image and an enhanced image.
Detailed Description
In order to make the invention more comprehensible, preferred embodiments are described in detail below with reference to the accompanying drawings.
Examples
The present example uses the original underwater image (as shown in fig. 4) provided by Ancuti in 2012CVPR to illustrate the method of the present invention, and fig. 1 shows a flowchart of the method, and the specific implementation steps are as follows:
the method comprises the following steps: separately computing the original images IoriR, G, B minimum threshold for contrast stretch
Figure BDA0002377045750000031
And a maximum threshold value
Figure BDA0002377045750000032
c represents one of the R, G, B three channels, i.e., c ∈ { R, G, B }. As shown in fig. 2, when contrast stretching is performed, in order to obtain a better stretching effect, it is necessary to determine the range of the stretched gradation value, and therefore, before contrast stretching, the stretching is performedThe minimum threshold and the maximum threshold of each channel are determined R, G, B first, and all gray values of each channel are sorted from small to large. Firstly, the sum of gray values of R, G, B channels of the original underwater image is obtained, and the result is expressed as sumR、sumG、sumB(ii) a Then find the maximum value of the three, maxval=max{sumR,sumG,sumB}. Since the underwater image is usually bluish green, maxvalThe value of (A) is generally sumGOr sumB. Therefore, it is necessary to perform processing separately by the following two modes:
mode I: if maxval=sumGIf the underwater image is greenish, the minimum threshold of the G channel is the gray value corresponding to 0.5% of the gray value of the G channel, and the maximum threshold of the G channel is the gray value corresponding to 99.5% of the gray value of the G channel; the minimum threshold value of the R channel is before the grey value of the R channel
Figure BDA0002377045750000033
Corresponding gray value is located, and the maximum threshold value of the R channel is before the gray value of the R channel
Figure BDA0002377045750000034
The corresponding gray value; the minimum threshold of the B channel is before the grey value of the B channel
Figure BDA0002377045750000035
Corresponding gray value is processed, and the maximum threshold value of the B channel is before the gray value of the B channel
Figure BDA0002377045750000036
And the corresponding gray value is processed.
Mode II: if maxval=sumBIf the underwater image is blue, the minimum threshold of the B channel is the gray value corresponding to 0.5% of the gray value of the B channel, and the maximum threshold of the B channel is the gray value corresponding to 99.5% of the gray value of the B channel; the minimum threshold value of the R channel is before the grey value of the R channel
Figure BDA0002377045750000037
Corresponding gray value is located, and the maximum threshold value of the R channel is before the gray value of the R channel
Figure BDA0002377045750000041
The corresponding gray value; the minimum threshold of the G channel is before the grey value of the G channel
Figure BDA0002377045750000042
Corresponding gray value is located, and the maximum threshold value of the G channel is before the gray value of the G channel
Figure BDA0002377045750000043
And the corresponding gray value is processed.
In this example, the image execution mode I used, calculated, G-channel minimum threshold
Figure BDA0002377045750000044
Maximum threshold of G channel
Figure BDA0002377045750000045
Minimum threshold of R channel
Figure BDA0002377045750000046
Maximum threshold of R channel
Figure BDA0002377045750000047
B channel minimum threshold
Figure BDA0002377045750000048
B channel maximum threshold
Figure BDA0002377045750000049
Step two: and determining R, G, B the stretched gray value range of each channel according to the minimum threshold and the maximum threshold of different channel contrast stretching obtained in the step one.
Figure BDA00023770457500000410
The ith gray value of a certain channel can be obtained according to the formula (1)Contrast stretched image
Figure BDA00023770457500000411
Figure BDA00023770457500000412
Step three: calculating gamma correction coefficient gammac. As shown in fig. 3, the solution of the gamma correction coefficients requires normalization of the image. The idea here to solve the gamma correction coefficients comes from the gray world prior: for an image with a large amount of color variation, the average gray value of R, G, B components tends to be the same gray value, i.e. the sum of the gray values of three channels should be approximately equal, so as to solve the gamma correction coefficients of different channels. First, the gray values of the R, G, B channels are summed separately for the image after contrast stretching, and the result is expressed as sumR_cs、sumG_cs、sumB_cs(ii) a Then, the maximum value max of the three is obtainedval_cs=max{sumR_cs,sumG_cs,sumB_cs}. Since there are three cases of the maximum value, the following three modes are introduced to process separately:
mode III: if maxval_cs=sumR_csThen, the gamma correction coefficient of the R channel is 1, the gamma correction coefficient of the G channel can be obtained according to equation (2), and the gamma correction coefficient of the B channel can be obtained according to equation (3). Equations (2) and (3) are nonlinear transcendental equations, and can be iteratively solved by using a dichotomy method, and when a certain solution enables the absolute value of the difference value between the left side and the right side of the equation to be less than 100, the solution is considered as the best approximate solution. In the following, the same solution is applied to the mode IV and the mode V, m and n are the height and width of the image,
Figure BDA00023770457500000413
representing the ith gray value of a certain channel.
Figure BDA00023770457500000414
Figure BDA00023770457500000415
Mode IV: if maxval_cs=sumG_csThen, the gamma correction coefficient of the G channel is 1, the gamma correction coefficient of the R channel can be obtained according to equation (4), and the gamma correction coefficient of the B channel can be obtained according to equation (5).
Figure BDA0002377045750000051
Figure BDA0002377045750000052
And a mode V: if maxval_cs=sumB_csThe gamma correction coefficient of the B channel is 1, the gamma correction coefficient of the R channel can be obtained according to equation (6), and the gamma correction coefficient of the G channel can be obtained according to equation (7).
Figure BDA0002377045750000053
Figure BDA0002377045750000054
This example implements mode IV, i.e., the gamma correction coefficient for the G channel is 1; the image used in this example had a height of 384 and a width of 512, and according to equations (4) and (5), the gamma correction coefficient for the R channel was 0.5879 and the gamma correction coefficient for the B channel was 0.8223.
Step four: because the image after the contrast stretching may have the condition of over-stretching or under-stretching, after the contrast stretching, the gamma correction is continuously adopted to correct the global contrast and color, and the image after the gamma correction can be obtained according to the formula (8) and the gamma correction coefficients of different channels obtained in the step three
Figure BDA0002377045750000055
Figure BDA0002377045750000056
In the formula (8), A is a constant, and usually A is 1.
Step five: from this step, the deblurring phase is entered. Obtaining dark channel of gamma corrected image according to equation (9)
Figure BDA0002377045750000057
Figure BDA0002377045750000058
In expression (9), Ω (x) is a rectangular region having a size of 15 × 15 pixels with x as the center.
Step six: estimation of background light Ac. Selecting pixel points 0.1% before the gray value in the dark channel as candidate pixel points, then calculating the average gray value of the candidate pixel points on the R channel of the gamma corrected image, and marking the average gray value as AR(ii) a Calculating the average gray value of the candidate pixel points on the image G channel after gamma correction, and marking the average gray value as AG(ii) a Calculating the average gray value of the candidate pixel points on the image B channel after gamma correction, and marking the average gray value as AB. In this example, ARIs 245, AGIs 235, ABIs 211.
Step seven: calculating and optimizing the transmittance tc(x) In that respect Formula (10) represents the Jaffe-McGlamry imaging model, Jc(x) Representing clear images without fog, Ic(x) Representing a blurred image. Dark channel prior assumption according to hokeming: in most local areas of outdoor fog-free images, the grey value of at least one channel is very low, even approaching zero, whereby the transmission, J, is calculated according to equation (11)darkRepresenting a dark channel for a fog-free image.
Ic(x)=Jc(x)*tc(x)+Ac*(1-tc(x)) (10)
Jdark=minc(miny∈Ω(x)(Jc(y))≈0 (11)
Both sides of formula (10) are simultaneously divided by AcAnd calculating the minimum value on the local area of each channel to obtain the formula (12):
Figure BDA0002377045750000061
by substituting formula (11) for formula (12), we obtain:
Figure BDA0002377045750000062
in order to make the deblurred image more realistic, equation (13) is modified as follows:
Figure BDA0002377045750000063
in the above formula, ω is a constant and usually 0.95 is taken. The transmittance is obtained from the dark channel obtained in the equation (14), the dark channel obtained in the step five, and the backlight obtained in the step six, and the transmittance obtained at this time is a rough transmittance, and the rough transmittance is filtered by using the guide filter, so that the optimized transmittance is obtained.
Step eight: after obtaining the background light and the optimized transmittance, a solving formula of each channel of the clear image can be derived according to the formula (10):
Figure BDA0002377045750000064
in the above formula, t0Is constant, and takes a value of 0.1 here in order to prevent the denominator from being zero. And after recovering each image channel, obtaining a final clear image.
In order to illustrate the enhancement effect of the underwater image enhancement method provided by the invention, the original image in the example is scored for objective quality by using an underwater image quality evaluation criterion (UCIQE) provided by Miao Yang et al and an underwater image quality evaluation criterion (UIQM) provided by Karen Panetta et al, wherein the UCIQE score is 0.4263, and the UIQM score is 2.8302; the enhanced images obtained for this example were then scored using UCIQE criteria and UIQM criteria, with a UCIQE score of 0.7164 and a UIQM score of 5.0914. Compared with the UCIQE value and the UIQM value of the original image, the UCIQE value and the UIQM value of the enhanced image are both greatly improved. Fig. 4 is a subjective quality comparison diagram of the original underwater image and the enhanced image, the left image is the original underwater image, and the right image is the enhanced image, so that the visual effect is better in the aspects of color and definition. Compared with the quality of the original image, the quality of the enhanced image obtained by the embodiment is greatly improved, and the enhancement method provided by the invention has a good overall recovery effect.

Claims (1)

1. An image enhancement method based on color correction and deblurring, which improves the overall recovery quality of an underwater image by performing color correction and deblurring in stages, comprises the following steps:
the method comprises the following steps: respectively calculating the original image I according to the magnitude relation of the sum of the gray values of different channelsoriR, G, B minimum threshold for contrast stretch
Figure FDA0002377045740000011
And a maximum threshold value
Figure FDA0002377045740000012
c represents one of the R, G, B three channels, i.e., c ∈ { R, G, B };
step two: according to a minimum threshold value
Figure FDA0002377045740000013
And a maximum threshold value
Figure FDA0002377045740000014
Determining the stretched gray value range of different channels, and then comparing the original image IoriRespectively performing contrast stretching on each channel to obtain a contrast stretched image Ics
Step three: based on gray scale world prior and dichotomy, calculating differenceGamma correction coefficient gamma of channelcFirstly, the sum of the gray values of each channel of the image after the contrast stretching is respectively calculated, and the maximum value of the three is recorded as maxval_csThen according to the formula
Figure FDA0002377045740000015
Solving for gamma by dichotomycM and n are the height and width of the image, respectively,
Figure FDA0002377045740000016
is the ith gray value of a certain channel;
step four: according to the obtained gamma correction coefficient gammacTo 1, paircsCarrying out gamma correction to obtain an image I after gamma correctiongm
Step five: due to the image IgmThe method further carries out deblurring treatment, uses dark channel prior to carry out deblurring operation to obtain an image IgmIs provided with a dark channel
Figure FDA0002377045740000017
Step six: according to the dark channel
Figure FDA0002377045740000018
Estimation of background light Ac
Step seven: from the dark channel and the background light, the transmittance t is calculatedc(x) (ii) a Then further optimizing the transmittance using guided filtering;
step eight: according to the formula
Figure FDA0002377045740000019
Restoring each image channel, where t0Is constant, thereby restoring a clear image.
CN202010069967.0A 2020-01-21 2020-01-21 Image enhancement method based on color correction and deblurring Active CN111292263B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010069967.0A CN111292263B (en) 2020-01-21 2020-01-21 Image enhancement method based on color correction and deblurring

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010069967.0A CN111292263B (en) 2020-01-21 2020-01-21 Image enhancement method based on color correction and deblurring

Publications (2)

Publication Number Publication Date
CN111292263A true CN111292263A (en) 2020-06-16
CN111292263B CN111292263B (en) 2022-11-04

Family

ID=71030707

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010069967.0A Active CN111292263B (en) 2020-01-21 2020-01-21 Image enhancement method based on color correction and deblurring

Country Status (1)

Country Link
CN (1) CN111292263B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104601971A (en) * 2014-12-31 2015-05-06 小米科技有限责任公司 Color adjustment method and device
CN107609603A (en) * 2017-10-09 2018-01-19 济南大学 A kind of image matching method of multiple color spaces difference fusion
CN107705258A (en) * 2017-09-19 2018-02-16 东华大学 A kind of underwater picture Enhancement Method of three primary colours joint preequalization and deblurring
CN107886486A (en) * 2017-12-01 2018-04-06 天津大学 Based on dark channel prior and variation Retinex underwater picture Enhancement Methods
CN108469302A (en) * 2018-06-13 2018-08-31 上海安翰医疗技术有限公司 Color correction and test device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104601971A (en) * 2014-12-31 2015-05-06 小米科技有限责任公司 Color adjustment method and device
CN107705258A (en) * 2017-09-19 2018-02-16 东华大学 A kind of underwater picture Enhancement Method of three primary colours joint preequalization and deblurring
CN107609603A (en) * 2017-10-09 2018-01-19 济南大学 A kind of image matching method of multiple color spaces difference fusion
CN107886486A (en) * 2017-12-01 2018-04-06 天津大学 Based on dark channel prior and variation Retinex underwater picture Enhancement Methods
CN108469302A (en) * 2018-06-13 2018-08-31 上海安翰医疗技术有限公司 Color correction and test device

Also Published As

Publication number Publication date
CN111292263B (en) 2022-11-04

Similar Documents

Publication Publication Date Title
CN107767354B (en) Image defogging algorithm based on dark channel prior
CN107507145B (en) Underwater image enhancement method based on different color space self-adaptive histogram stretching
CN106157267B (en) Image defogging transmissivity optimization method based on dark channel prior
CN105761227B (en) Underwater picture Enhancement Method based on dark channel prior and white balance
CN108596853A (en) Underwater picture Enhancement Method based on bias light statistical model and transmission map optimization
Park et al. Sand-dust image enhancement using successive color balance with coincident chromatic histogram
CN108765342A (en) A kind of underwater image restoration method based on improvement dark
CN109118446B (en) Underwater image restoration and denoising method
CN104867121B (en) Image Quick demisting method based on dark primary priori and Retinex theories
CN107705258B (en) Underwater image enhancement method based on three-primary-color combined pre-equalization and deblurring
CN109816608B (en) Low-illumination image self-adaptive brightness enhancement method based on noise suppression
CN111696052B (en) Underwater image enhancement method and system based on red channel weakness
CN110689490A (en) Underwater image restoration method based on texture color features and optimized transmittance
CN107424124B (en) Image enhancement method and device
CN111861896A (en) UUV-oriented underwater image color compensation and recovery method
CN107527325A (en) A kind of monocular underweater vision Enhancement Method preferential based on dark
CN114463211A (en) Underwater image enhancement method based on turbidity classification
CN114972102A (en) Underwater image enhancement method based on global variable contrast enhancement and local correction
CN110930319A (en) Underwater image sharpening method based on self-adaptive transmissivity estimation
CN117541520A (en) Underwater image enhancement method of low-coupling Retinex model based on optimization algorithm
CN111292263B (en) Image enhancement method based on color correction and deblurring
CN115660968A (en) Low-illumination image enhancement method based on camera imaging principle
CN115760640A (en) Coal mine low-illumination image enhancement method based on noise-containing Retinex model
CN115034985A (en) Underwater image enhancement method
CN112907470A (en) Underwater image recovery method based on Lab color gamut transformation, classification and white balance

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
GR01 Patent grant
GR01 Patent grant