[go: up one dir, main page]

CN114742730B - An underwater image enhancement method based on anisotropic color channel attenuation differences - Google Patents

An underwater image enhancement method based on anisotropic color channel attenuation differences Download PDF

Info

Publication number
CN114742730B
CN114742730B CN202210358969.0A CN202210358969A CN114742730B CN 114742730 B CN114742730 B CN 114742730B CN 202210358969 A CN202210358969 A CN 202210358969A CN 114742730 B CN114742730 B CN 114742730B
Authority
CN
China
Prior art keywords
channel
image
color
color channels
enhanced
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.)
Active
Application number
CN202210358969.0A
Other languages
Chinese (zh)
Other versions
CN114742730A (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.)
Nanjing University of Information Science and Technology
Original Assignee
Nanjing University of Information Science and Technology
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 Nanjing University of Information Science and Technology filed Critical Nanjing University of Information Science and Technology
Priority to CN202210358969.0A priority Critical patent/CN114742730B/en
Publication of CN114742730A publication Critical patent/CN114742730A/en
Application granted granted Critical
Publication of CN114742730B publication Critical patent/CN114742730B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/90Dynamic range modification of images or parts thereof
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/50Image enhancement or restoration using two or more images, e.g. averaging or subtraction
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/90Determination of colour characteristics
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; 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
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02ATECHNOLOGIES FOR ADAPTATION TO CLIMATE CHANGE
    • Y02A90/00Technologies having an indirect contribution to adaptation to climate change
    • Y02A90/30Assessment of water resources

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Image Processing (AREA)
  • Processing Of Color Television Signals (AREA)

Abstract

本发明公开了一种基于各向异性颜色通道衰减差异的水下图像增强方法,包括以下步骤:(1)对原始图像进行归一化处理;获取三个颜色通道,计算每个颜色通道的总像素值、均值和方差;(2)判断是否存在符合条件的颜色通道;存在一个满足条件的通道,以该通道作为基准图像,采用自适应伽马变换函数对剩余通道进行增强;若存在两个或两个以上满足条件的通道,随机选取一个通道作为基准图像,采用自适应伽马变换函数对剩余通道进行增强;若不存在满足条件的通道,选取总像素值最大的通道作为基准图像,采用变化后的伽马校正公式对剩余通道进行增强;(3)联合基准图像和增强图像形成最终的增强图像。本发明能够有效提高增强水下图像的亮度和对比度。

The present invention discloses an underwater image enhancement method based on anisotropic color channel attenuation difference, comprising the following steps: (1) normalizing the original image; obtaining three color channels, and calculating the total pixel value, mean and variance of each color channel; (2) judging whether there is a color channel that meets the conditions; if there is a channel that meets the conditions, the channel is used as a reference image, and the remaining channels are enhanced by an adaptive gamma transformation function; if there are two or more channels that meet the conditions, a channel is randomly selected as the reference image, and the remaining channels are enhanced by an adaptive gamma transformation function; if there is no channel that meets the conditions, the channel with the largest total pixel value is selected as the reference image, and the remaining channels are enhanced by a changed gamma correction formula; (3) combining the reference image and the enhanced image to form a final enhanced image. The present invention can effectively improve the brightness and contrast of the enhanced underwater image.

Description

Underwater image enhancement method based on anisotropic color channel attenuation difference
Technical Field
The invention relates to the technical field of image processing, in particular to an underwater image enhancement method based on anisotropic color channel attenuation difference.
Background
The problems of low contrast, blurring of details, color distortion and the like of the underwater image are frequently caused by the influence of a complex underwater environment, so that the method has great research significance on the enhancement of the underwater image. Light propagates underwater, and is attenuated by interaction with absorption and scattering. The degree of attenuation varies greatly between the various channels of the underwater image captured in turbid or deep waters. HE. Although the gamma conversion algorithm and other algorithms can effectively improve the details of the gray image, the attenuation difference of the color channels is not considered in correction, and the enhancement effect is not good.
Disclosure of Invention
Aiming at the defects, the invention provides the underwater image enhancement method based on the anisotropic color channel attenuation difference, which considers the light attenuation difference under water, can effectively improve the brightness and contrast of the enhanced underwater image and has good robustness.
The invention adopts an underwater image enhancement method based on the attenuation difference of an anisotropic color channel to solve the problems, and specifically comprises the following steps:
(1) Extracting R, G, B color channels of the original image, and respectively calculating the total pixel value, the mean value and the variance of each color channel;
(2) Judging whether color channels meeting the conditions exist according to the mean value and the variance of each color channel, wherein the conditions are as follows:
F=diff((μλ-2σλ),(μλ+2σλ))
F≥3/4
μλ>1/2
wherein mu λ is expressed as the mean value corresponding to each color channel, sigma λ is expressed as the variance corresponding to each color channel, lambda epsilon { R, G, B };
If one channel meeting the conditions exists in the three color channels, correcting each pixel value in the remaining two color channels by adopting an adaptive gamma conversion function by taking the channel meeting the conditions as a reference image, and acquiring enhanced images of the remaining two color channels after correction;
If two or more than two channels meeting the conditions exist in the three color channels, randomly selecting one channel meeting the conditions as a reference image, correcting each pixel value in the remaining two color channels by adopting an adaptive gamma conversion function, and acquiring an enhanced image of the remaining two color channels after correction;
If none of the three color channels meets the condition, selecting the channel with the largest total pixel value as a reference image, setting a changed gamma correction formula, and correcting each pixel value in the remaining two color channels by adopting the changed gamma correction formula respectively, and obtaining an enhanced image of the remaining two color channels after correction;
(3) The combined reference image and the enhanced images of the remaining two color channels form the final enhanced image.
Further, the adaptive gamma transformation function in step (2) is:
if the average value of the color channels is less than or equal to 1/2, the following formula is selected for correction:
Ienh(x,y)=αIγ(x,y)+βI(x,y)
Wherein, I enh represents an enhanced image, I represents an original image, x and y both represent specific positions of channel pixels, alpha and beta both represent weighting coefficients, gamma represents an index of gamma transformation, and specific numerical values are mean differences of a reference image and a color channel to be corrected;
if the average value of the color channels is greater than 1/2, the following formula is selected for correction:
In the formula, Representing the total pixel value of the reference image and s λ′ representing the total pixel value of the color channel to be corrected.
Further, the gamma correction formula after the change in the step (2) is:
Ienh(x,y)=Iγ(x,y)
Wherein I enh represents an enhanced image, I represents an original image, x and y each represent a specific position of an image pixel, gamma' represents an index of gamma conversion, and specific numerical values are as follows:
further, the normalization in step (1) specifically refers to normalizing the image pixel values of each color channel from the interval [0,255] to the range of [0,1 ].
Further, the calculation formulas for calculating the total pixel value, the mean value and the variance of each color channel in the step (1) are respectively as follows:
Where s λ denotes the total pixel value of the lambda channel, mu λ denotes the mean value of the lambda channel, sigma λ denotes the variance of the lambda channel, m denotes the number of rows of the original image I, n denotes the number of columns of the original image I, I denotes the ith row of the original image I, j denotes the jth column of the original image I, and I nor λ (I, j) denotes the normalized pixel value of the ith row and jth column of the lambda channel.
Further, in the step (3), the inverse normalization process is required for the reference image and the enhanced images of the remaining two color channels before the reference image and the enhanced images of the remaining two color channels are combined to form the final enhanced image.
The invention further provides a computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the steps of the method when executing the computer program. A computer readable storage medium having stored thereon a computer program which when executed by a processor performs the steps of the above method.
Compared with the prior art, the underwater image enhancement method based on the anisotropic color channel attenuation difference has the remarkable advantages that compared with the prior underwater image enhancement algorithm, the underwater image enhancement method based on the anisotropic color channel attenuation difference can adaptively adjust an underwater image, accurately enhance the image by considering the differences of the attenuation of each channel, and improve the brightness and contrast of the image.
Drawings
FIG. 1 is a flow chart of the method of the present invention;
fig. 2 shows a comparison of an original image and an enhanced image of the present invention, fig. 2 (a) shows an original underwater image, and fig. 2 (b) shows an enhanced image of an embodiment of the present invention.
Detailed Description
The technical scheme of the invention is further described below with reference to the accompanying drawings.
As shown in fig. 1, the method for enhancing an underwater image based on the attenuation difference of an anisotropic color channel disclosed by the invention specifically comprises the following steps:
Firstly, carrying out normalization processing on image pixels of an original image, extracting R, G, B color channels from the original image, and respectively calculating the total pixel value, the mean value and the variance of each color channel;
(1) Let the number of rows and columns of the original image I be m, n, respectively, i.e.:
I={(i,j)|1≤i≤m,1≤j≤n}
(2) The original image I is normalized, namely, the pixel value of the image is normalized to be in the range of [0,1 ]:
where a represents the smallest pixel value in the original image and b represents the largest pixel value in the original image.
(3) The total pixel values of an R channel, a G channel and a B channel in an original image are calculated respectively, and the formula is as follows:
Where I is denoted as the ith row of the original image I, j is denoted as the jth column of the original image I, and I nor λ (I, j) is denoted as the lambda channel ith row and jth column normalized pixel value.
The color channel lambda midmid E { R, G, B } where the maximum value of s λ is located is selected from:
(4) The mean value and variance of an R channel, a G channel and a B channel in an original image are calculated respectively, and the formula is as follows:
and secondly, judging the contrast and brightness of the channel image according to the mean value and the variance of each color channel, setting corresponding judging conditions, selecting a reference image according to the judging result, and enhancing the non-reference image.
(1) The following discrimination conditions are set by combining Chebyshev inequality and the histogram characteristics of the high-contrast image, and the specific formula is as follows:
F=diff((μλ-2σλ),(μλ+2σλ)) (2)
wherein l, h and o respectively represent channel images satisfying the respective conditions;
As can be seen from the equation (2), the smaller the F value, the more concentrated the pixel distribution of the channel image, the lower the contrast of the channel image, and the smaller the σ value, the less significant the contrast of the channel image, and the smaller the μ λ value, the more concentrated the pixels of the channel image are in the range of the interval [0,0.5], i.e., the lower the brightness of the channel image. Assuming that 1/3 of the pixels lie within 2 standard deviations of the average number, the channel image has a lower contrast, and assuming that the value of mu λ is between 0,0.5, the brightness of the channel image is lower. Therefore, the channel image l has a small contrast and low luminance, and the channel image h has a high contrast and high luminance.
(2) According to the above-mentioned discrimination condition, selecting the color channel lambda corresponding to the channel image h with high contrast and high brightness as reference image, and making said color channel lambda hh epsilon { R, G, B }.
(2.1) If the condition that F.gtoreq.3/4. Mu. λ >0.5 is satisfied, that is, lambda h is only one color channel, the remaining two color channels are respectively denoted as lambda' 1、λ′2,λ′1∈{{R,G,B}-{λh}}、λ′2∈{{R,G,B}-{λh. And further determining whether the average value of each color channel is less than or equal to 1/2 for the remaining two color channels lambda' 1、λ′2.
If the average value of the color channels is less than or equal to 1/2, the brightness of the channel image is dark, but the contrast is not low, or the brightness of the channel image is dark and the contrast is low, the remaining two color channels lambda' 1、λ′2 are respectively corrected by using the following formula (3):
Ienh(x,y)=αIγ(x,y)+βI(x,y) (3)
In the formula, Λ 'corresponds to selection of λ' 1、λ′2, α and β both represent weighting coefficients, α=β=0.5, I enh represents the enhanced image, I represents the original image, and x and y both represent the specific locations of the channel pixels;
if the average value of the color channels is larger than 1/2, the channel image is not dark, but the contrast is lower, and the following formula (4) is selected for correction:
In the formula, Representing the total pixel value of the reference image, s λ′ representing the total pixel value of the color channel lambda 'corresponding to the selection lambda' 1、λ′2.
(2.2) If the condition that the color channels with the F larger than or equal to 3/4U mu λ being more than 0.5 are two or more than two, namely lambda h is two or more than two color channels, one color channel is arbitrarily selected as a reference image, and the remaining two color channels are respectively marked as lambda' 1、λ′2;
Further judging whether the average value of each color channel is smaller than or equal to 1/2, if the average value of the color channels is smaller than or equal to 1/2, selecting the formula (3) to correct the remaining two color channels lambda' 1、λ′2 respectively, and if the average value of the color channels is larger than 1/2, selecting the formula (4) to correct.
(3) According to the above-mentioned discrimination condition, if the channel image h with high contrast and high brightness is not selected, i.e. all three color channels do not meet the condition that F is greater than or equal to 3/4U λ >0.5, then according to the color channel lambda mid where the maximum value of s λ obtained in step one is positioned as reference image, the remaining two color channels are marked as lambda '1、λ′2,λ′1∈{{R,G,B}-{λmid}}、λ′2∈{{R,G,B}-{λmid }, and the following formulas (5) and (6) are selected to correct the remaining two color channels lambda' 1、λ′2 respectively:
Ienh(x,y)=Iγ′(x,y) (5)
Where λ 'corresponds to the selection of λ' 1、λ′2.
And thirdly, carrying out inverse normalization processing on the reference image and the enhanced images of the two remaining color channels, namely multiplying the pixel value by 255 and rounding down, and then forming a final enhanced image by combining the reference image and the enhanced images of the two remaining color channels.
As shown in fig. 2,2 (a) is an original image, and fig. 2 (b) is an enhanced image obtained by processing the original image by using the image enhancement method of the present invention, and according to the comparison of the two images, it is obvious that the brightness and contrast of the enhanced image are obviously improved compared with those of the original image.
The invention further provides a computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the steps of the method when executing the computer program. A computer readable storage medium having stored thereon a computer program which when executed by a processor performs the steps of the above method.

Claims (6)

1. An underwater image enhancement method based on anisotropic color channel attenuation difference is characterized by comprising the following steps:
(1) Extracting R, G, B color channels of the original image, and respectively calculating the total pixel value, the mean value and the variance of each color channel;
(2) Judging whether color channels meeting the conditions exist according to the mean value and the variance of each color channel, wherein the conditions are as follows:
F=diff((μλ-2σλ),(μλ+2σλ))
F≥3/4
μλ>1/2
wherein mu λ is expressed as the mean value corresponding to each color channel, sigma λ is expressed as the variance corresponding to each color channel, lambda epsilon { R, G, B };
If one channel meeting the conditions exists in the three color channels, correcting each pixel value in the remaining two color channels by adopting an adaptive gamma conversion function by taking the channel meeting the conditions as a reference image, and acquiring enhanced images of the remaining two color channels after correction;
The adaptive gamma transform function is:
if the average value of the color channels is less than or equal to 1/2, the following formula is selected for correction:
Ienh(x,y)=αIγ(x,y)+βI(x,y)
Wherein, I enh represents an enhanced image, I represents an original image, x and y both represent specific positions of channel pixels, alpha and beta both represent weighting coefficients, gamma represents an index of gamma transformation, and specific numerical values are mean differences of a reference image and a color channel to be corrected;
if the average value of the color channels is greater than 1/2, the following formula is selected for correction:
In the formula, S λ′ represents the total pixel value of the color channel to be corrected;
If two or more than two channels meeting the conditions exist in the three color channels, randomly selecting one channel meeting the conditions as a reference image, correcting each pixel value in the remaining two color channels by adopting an adaptive gamma conversion function, and acquiring an enhanced image of the remaining two color channels after correction;
If none of the three color channels meets the condition, selecting the color channel with the largest total pixel value as a reference image, setting a changed gamma correction formula, and correcting each pixel value in the remaining two color channels by adopting the changed gamma correction formula respectively to obtain an enhanced image of the remaining two color channels after correction;
The gamma correction formula after the change is:
Ienh(x,y)=Iγ′(x,y)
Wherein, gamma is expressed as an index of gamma conversion, and specific numerical values are as follows:
(3) The combined reference image and the enhanced images of the remaining two color channels form the final enhanced image.
2. The method of underwater image enhancement based on anisotropic color channel attenuation difference as claimed in claim 1, wherein the normalization process in step (1) specifically refers to normalizing the image pixel values of each color channel from the interval [0,255] to the range of [0, 1].
3. The method for enhancing an underwater image based on the attenuation difference of anisotropic color channels according to claim 1, wherein the calculation formulas for calculating the total pixel value, the mean value and the variance of each color channel in the step (1) are respectively:
Where s λ denotes the total pixel value of the lambda channel, mu λ denotes the mean value of the lambda channel, sigma λ denotes the variance of the lambda channel, m denotes the number of rows of the original image I, n denotes the number of columns of the original image I, I denotes the ith row of the original image I, j denotes the jth column of the original image I, and I nor λ (I, j) denotes the normalized pixel value of the ith row and jth column of the lambda channel.
4. The method of claim 1, wherein the step (3) of inverse normalizing the reference image and the enhanced images of the remaining two color channels is performed before the step of combining the reference image and the enhanced images of the remaining two color channels to form a final enhanced image.
5. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the steps of the method of any one of claims 1 to 4 when the computer program is executed.
6. A computer-readable storage medium having a computer program stored thereon, characterized in that,
The computer program implementing the steps of the method of any one of claims 1 to 4 when executed by a processor.
CN202210358969.0A 2022-04-07 2022-04-07 An underwater image enhancement method based on anisotropic color channel attenuation differences Active CN114742730B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210358969.0A CN114742730B (en) 2022-04-07 2022-04-07 An underwater image enhancement method based on anisotropic color channel attenuation differences

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210358969.0A CN114742730B (en) 2022-04-07 2022-04-07 An underwater image enhancement method based on anisotropic color channel attenuation differences

Publications (2)

Publication Number Publication Date
CN114742730A CN114742730A (en) 2022-07-12
CN114742730B true CN114742730B (en) 2025-04-18

Family

ID=82279908

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210358969.0A Active CN114742730B (en) 2022-04-07 2022-04-07 An underwater image enhancement method based on anisotropic color channel attenuation differences

Country Status (1)

Country Link
CN (1) CN114742730B (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101523888A (en) * 2006-10-13 2009-09-02 苹果公司 Systems and methods for processing images using predetermined tone reproduction curves
CN108596855A (en) * 2018-04-28 2018-09-28 国信优易数据有限公司 A kind of video image quality Enhancement Method, device and video picture quality enhancement method

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000285233A (en) * 1999-01-25 2000-10-13 Fuji Photo Film Co Ltd Method and device for picture processing and recording medium
CN111127359B (en) * 2019-12-19 2023-05-23 大连海事大学 Underwater image enhancement method based on selective compensation of colors and three-interval equalization

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101523888A (en) * 2006-10-13 2009-09-02 苹果公司 Systems and methods for processing images using predetermined tone reproduction curves
CN108596855A (en) * 2018-04-28 2018-09-28 国信优易数据有限公司 A kind of video image quality Enhancement Method, device and video picture quality enhancement method

Also Published As

Publication number Publication date
CN114742730A (en) 2022-07-12

Similar Documents

Publication Publication Date Title
JP7353803B2 (en) Image processing device, image processing method, and program
CN101951523B (en) Adaptive colour image processing method and system
CN105931201B (en) A method of image subjective visual effect enhancement based on wavelet transform
CN114049283A (en) Self-adaptive gray gradient histogram equalization remote sensing image enhancement method
CN109584185B (en) Image processing method
CN111105371A (en) Low-contrast infrared image enhancement method
CN105741245B (en) Adaptive contrast enhancement algorithm based on greyscale transformation
US20090161983A1 (en) Method for automatic detection and correction of halo artifacts in images
CN110298792B (en) Low-light image enhancement and denoising method, system and computer equipment
CN113393394B (en) Low-illumination gray level image enhancement method and device based on gamma conversion and storage medium
CN111161163B (en) Infrared image contrast enhancement method for histogram double gamma correction
CN117252773A (en) Image enhancement method and system based on adaptive color correction and guided filtering
CN113450272B (en) Image enhancement method based on sinusoidal variation and application thereof
WO2020107308A1 (en) Low-light-level image rapid enhancement method and apparatus based on retinex
CN111127343A (en) A method for contrast enhancement of infrared images with dual histogram control
CN114187222A (en) Low-illumination image enhancement method and system and storage medium
CN109118437A (en) A kind of method, storage medium that can handle muddy water image in real time
CN112488968A (en) Image enhancement method for balanced fusion of degree-based histograms
CN112991240A (en) Image self-adaptive enhancement algorithm for real-time image enhancement
CN114565535B (en) Image enhancement method and device based on adaptive gradient gamma correction
CN115965544A (en) Image enhancement method and system for self-adaptive brightness adjustment
CN113658067B (en) Water body image enhancement method and system in air tightness detection based on artificial intelligence
CN114742730B (en) An underwater image enhancement method based on anisotropic color channel attenuation differences
CN117893455B (en) Image brightness and contrast adjusting method
CN116029944B (en) Self-adaptive contrast enhancement method and device for gray level image

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