CN111696052B - Underwater image enhancement method and system based on red channel weakness - Google Patents

Underwater image enhancement method and system based on red channel weakness Download PDF

Info

Publication number
CN111696052B
CN111696052B CN202010430434.0A CN202010430434A CN111696052B CN 111696052 B CN111696052 B CN 111696052B CN 202010430434 A CN202010430434 A CN 202010430434A CN 111696052 B CN111696052 B CN 111696052B
Authority
CN
China
Prior art keywords
channel
pixel value
image
red channel
red
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
CN202010430434.0A
Other languages
Chinese (zh)
Other versions
CN111696052A (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.)
Hohai University HHU
Original Assignee
Hohai University HHU
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 Hohai University HHU filed Critical Hohai University HHU
Priority to CN202010430434.0A priority Critical patent/CN111696052B/en
Publication of CN111696052A publication Critical patent/CN111696052A/en
Application granted granted Critical
Publication of CN111696052B publication Critical patent/CN111696052B/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
    • G06T7/00Image analysis
    • G06T7/90Determination of colour characteristics
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N9/00Details of colour television systems
    • H04N9/64Circuits for processing colour signals
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N9/00Details of colour television systems
    • H04N9/64Circuits for processing colour signals
    • H04N9/73Colour balance circuits, e.g. white balance circuits or colour temperature control
    • 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

Abstract

The invention discloses an underwater image enhancement method and system based on red channel attenuation, which are used for obtaining the pixel values of a red channel, a green channel and a blue channel of an underwater image; for each pixel value of the red channel, compensating through the pixel values of the green channel and the blue channel in the field of the pixel value to obtain an image after color compensation; and performing color adjustment on the image after color compensation by using a white balance algorithm. The advantages are that: the method compensates the pixel value of the red channel for the underwater image with seriously weakened red channel by utilizing the green channel and the blue channel with relatively small underwater attenuation, and then adjusts the color of the image by a white balance algorithm; the invention can adaptively compensate the pixel value of the red channel, so that the pixel value is close to the original value to the maximum extent, and adverse phenomena such as color overexposure or artifacts and the like can not be generated.

Description

Underwater image enhancement method and system based on red channel weakness
Technical Field
The invention relates to an underwater image enhancement method and system based on red channel attenuation, and belongs to the technical field of image processing.
Background
Nowadays, the exploitation of resources on land is difficult to meet the needs of technological and economic development, and people have turned their targets to oceans occupying more than seven percent of the earth's surface. The underwater environment is very complex, firstly, seawater has different absorption characteristics to light rays with different wavelengths, the red component of natural light or artificial light sources can be completely absorbed after the natural light or artificial light sources are transmitted for 2 meters in water, and only green and blue components are left after the natural light or artificial light sources are transmitted for about 10 meters; various suspended particles exist in seawater, and light is influenced by the suspended medium particles during propagation, deviates from the original linear propagation direction, changes into different directions and has scattering characteristics. Due to the reasons, the background of an underwater image directly acquired by the image sensor presents blue-green, and the acquired image has the conditions of low contrast, blurred edge details, uneven brightness, poor definition and the like.
Underwater image enhancement algorithms are various and can be mainly divided into a space domain method and a transform domain method. The spatial domain method is to directly process pixels on an image, and generally is mapping processing on a gray level, and includes histogram equalization, gray-scale-limited world assumption, white balance, Retinex enhancement theory, and the like. The method of transforming the domain is to transform the space domain into the change domain through a certain mapping relation, and is beneficial to the characteristics of the change domain to process the image, and finally, the image is transformed back into the space domain. Common transform domain methods include the use of fourier transforms, as well as wavelet transforms, among others. However, although the existing algorithm improves the visual effect of the underwater image to a certain extent, the image overexposure phenomenon occurs when the underwater image with serious red channel attenuation is processed.
Disclosure of Invention
The invention aims to overcome the defects of the prior art and provides an underwater image enhancement method and system based on red channel attenuation.
In order to solve the technical problem, the invention provides an underwater image enhancement method based on red channel attenuation, which is used for acquiring pixel values of a red channel, a green channel and a blue channel of an underwater image;
for each pixel value of the red channel, compensating through the pixel values of the green channel and the blue channel in the field of the pixel value to obtain an image after color compensation;
and performing color adjustment on the image after color compensation by using a white balance algorithm.
Further, the step of obtaining pixel values of a red channel, a green channel and a blue channel of the underwater image further comprises:
and carrying out normalization processing on the pixel values.
Further, the compensation formula for performing compensation through the pixel values of the green channel and the blue channel in the pixel value field is as follows:
Figure BDA0002500374780000021
α+β=1
in the formula I r,com (x, y) represents the red channel compensated pixel value; i is r (x,y)、I g (x, y) and I b (x, y) respectively represent pixel values of a red channel, a green channel and a blue channel; both α and β are a constant less than 1; i is g Represents the normalized average, I, of the green channel in the pixel value domain b Represents the pixel valueNormalized average of blue channel in the field.
Further, after the step of compensating by the pixel values of the green channel and the blue channel in the pixel value field, the method further includes:
and carrying out inverse normalization and synthesizing the image after color compensation.
An underwater image enhancement system based on red channel fading, comprising:
the acquisition module is used for acquiring pixel values of a red channel, a green channel and a blue channel of the underwater image;
the compensation module is used for compensating each pixel value of the red channel through the pixel values of the green channel and the blue channel in the field of the pixel value to obtain an image after color compensation;
and the adjusting module is used for adjusting the color of the image after the color compensation by using a white balance algorithm.
Further, the obtaining module further includes:
and the normalization processing module is used for performing normalization processing on the pixel values.
Further, the compensation module comprises a calculation module for performing compensation calculation on each pixel value of the red channel by the following formula:
Figure BDA0002500374780000022
α+β=1
in the formula I r,com (x, y) represents the red channel compensated pixel value; i is r (x,y)、I g (x, y) and I b (x, y) respectively represent pixel values of a red channel, a green channel and a blue channel; both α and β are a constant less than 1; i is g Represents the normalized average, I, of the green channel in the pixel value domain b Representing the normalized average of the blue channel in the pixel value domain.
Further, the compensation module comprises an inverse normalization processing module, which is used for performing inverse normalization and synthesizing the image after color compensation.
The invention achieves the following beneficial effects:
the invention relates to an underwater image enhancement algorithm based on red channel attenuation, which compensates the pixel value of a red channel for an underwater image with serious red channel attenuation by utilizing a green channel and a blue channel with relatively small underwater attenuation, and then adjusts the color of the image by a white balance algorithm. Experiments show that the algorithm can effectively solve the color recovery problem of the underwater image and improve the contrast of the image.
Compared with the existing underwater image enhancement algorithm, the algorithm can adaptively compensate the pixel value of the red channel, so that the pixel value is close to the original value to the maximum extent, and adverse phenomena such as color overexposure or artifact and the like can not be generated.
Drawings
FIG. 1 is a flow chart of an underwater image enhancement algorithm based on red channel attenuation according to the present invention;
fig. 2(a) and fig. 2(b) fig. 2(c) fig. 2(d) are the original image, the image after red channel compensation, the histogram of red channel gray level in the original image and the histogram of red channel gray level after compensation according to the embodiment of the present invention, respectively;
fig. 3(a), 3(b) and 3(c) are respectively graphs comparing effects during implementation of the algorithm according to the embodiment of the present invention, where fig. 3(a) is an original graph, fig. 3(b) is a graph after red channel compensation, and fig. 3(c) is a graph after white balance.
Detailed Description
In order to make the objects, features and advantages of the present invention more obvious and understandable, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is obvious that the embodiments described below are only a part of the embodiments of the present invention, and not all of the embodiments. 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 technical scheme of the invention is further explained by the specific implementation mode in combination with the attached drawings.
As shown in figure 1, the invention discloses an underwater image enhancement algorithm based on red channel attenuation, which specifically comprises the following steps
(1) Acquiring pixel values of a red channel, a green channel and a blue channel of an underwater image;
(2) for each pixel value of the red channel, compensating through pixel values of a green channel and a blue channel;
(3) and adjusting the image after color compensation by using a white balance algorithm.
In the step (1), after the pixel values of the red channel, the green channel and the blue channel of the underwater image are obtained, normalization processing is carried out on the pixel values, namely the pixel values are normalized from [0,255] to [0, 1] interval.
The specific scheme of the color compensation in the step 2 is as follows:
since the neighborhood pixel values have correlation and the attenuation of the red channel is too severe relative to the blue and green channels of the underwater distorted image, the pixel values of the red channel are compensated by the green and blue channel pixel values in a certain pixel field, so that the red channel in the image is close to the original value. The specific formula is as follows:
Figure BDA0002500374780000041
α+β=1
in the formula I r,com (x, y) represents the red channel compensated pixel value; i is r (x,y)、I g (x, y) and I b (x, y) represent pixel values of a red channel, a green channel, and a blue channel, respectively, where α and β are constant coefficients less than 1;
Figure BDA0002500374780000042
representing the normalized average of the green channel in the window,
Figure BDA0002500374780000043
indicates that the normalized average value alpha of the blue channel in the window is [0.7, 1]]The range has better value taking effect, and in the experiment, alpha is 0.9, beta is 0.1, and the field size is 3 x 3.
Further, the red through in the imageAfter the pixel value of the channel is compensated, the pixel values of the red channel, the green channel and the blue channel are subjected to inverse normalization processing, the pixel values are multiplied by 255 and rounded downwards to obtain I r inverse (x,y)、I g inverse (x,y)、I b inverse direction (x, y), synthesizing a new image.
White balance refers to the restoration of color of an image of an object that is originally white in color. The following takes a gray world algorithm in white balance as an example to perform color adjustment on an image. When the color conversion amount of the image is large, the gray world hypothesis considers that the average values of the pixels of the three color channels of the image are approximately equal, namely the same gray value is obtained.
The specific idea and the calculation formula are as follows:
assuming that I (x, y) is an image with M × N pixels, x and y are specific positions of the pixels, the average value of the three color channels of red, green and blue is calculated as follows:
Figure BDA0002500374780000051
K=(R avg +G avg +B avg )/3
wherein I r inverse (x,y)、I g inverse (x,y)、I b inverse of (x, y) are pixel values of red, green and blue channels after inverse normalization, and values of RGB three channels are respectively rewritten as:
Figure BDA0002500374780000052
the rewritten new channel may then be used to weight the original image to obtain a color corrected image.
Correspondingly, the invention also provides an underwater image enhancement system based on red channel attenuation, which comprises:
the acquisition module is used for acquiring pixel values of a red channel, a green channel and a blue channel of the underwater image;
the compensation module is used for compensating each pixel value of the red channel through the pixel values of the green channel and the blue channel in the field of the pixel values to obtain an image after color compensation;
and the adjusting module is used for adjusting the color of the image after the color compensation by using a white balance algorithm.
The acquiring module further comprises:
and the normalization processing module is used for performing normalization processing on the pixel values after acquiring the pixel values of the red channel, the green channel and the blue channel of the underwater image.
The compensation module comprises a calculation module for performing compensation calculation on each pixel value of the red channel by the following formula:
Figure BDA0002500374780000053
α+β=1
in the formula I r,com (x, y) represents the red channel compensated pixel value; i is r (x,y)、I g (x, y) and I b (x, y) respectively represent pixel values of a red channel, a green channel and a blue channel; both α and β are a constant less than 1;
Figure BDA0002500374780000061
representing the normalized average of the green channel in the pixel value domain,
Figure BDA0002500374780000062
representing the normalized average of the blue channel in the pixel value domain.
The compensation module comprises an inverse normalization processing module which is used for carrying out inverse normalization after the pixel values of the green channel and the blue channel in the pixel value field are compensated, and synthesizing the image after color compensation.
The white balance algorithm used may also employ algorithms such as gray edge, shades of gray, max rgb, and the like.
To verify the effectiveness of the algorithm, a color recovery test is used, and a plurality of image tests are used to perform a comparison test on the images before and after recovery, as shown in fig. 2(a), 2(b), 2(c), 2(d), 3(a), 3(b), and 3 (c).
a color recovery test
And (4) correctly recovering the color plates with chromatic aberration in the image and the color plates after the contrast algorithm enhancement.
b multiple graph testing
The original image has the characteristics of blurriness, low contrast, unbalanced color and the like. After the image is processed by the algorithm, the image is clear, the color of the image is balanced, the contrast is improved, and compared with the original image, the enhancement effect is obvious.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
The above-mentioned embodiments are only used for illustrating the technical solutions of the present invention, and not for limiting the same; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.

Claims (6)

1. An underwater image enhancement method based on red channel attenuation is characterized in that,
acquiring pixel values of a red channel, a green channel and a blue channel of an underwater image;
for each pixel value of the red channel, compensating through the pixel values of the green channel and the blue channel in the field of the pixel value to obtain an image after color compensation;
carrying out color adjustment on the image subjected to color compensation by using a white balance algorithm;
the compensation formula for compensating through the pixel values of the green channel and the blue channel in the pixel value field is as follows:
Figure FDA0003689043700000011
α+β=1
in the formula I r,com (x, y) represents the red channel compensated pixel value; i is r (x,y)、I g (x, y) and I b (x, y) respectively represent pixel values of a red channel, a green channel and a blue channel; both α and β are a constant less than 1;
Figure FDA0003689043700000012
representing the normalized average of the green channel in the pixel value domain,
Figure FDA0003689043700000013
representing the normalized average of the blue channel in the pixel value domain.
2. The red channel attenuation-based underwater image enhancement method according to claim 1, wherein the step of obtaining the pixel values of the red channel, the green channel, and the blue channel of the underwater image is further followed by the steps of:
and carrying out normalization processing on the pixel values.
3. The method of claim 1, wherein the step of compensating for the pixel values of the green channel and the blue channel in the pixel value field further comprises:
and carrying out inverse normalization and synthesizing the image after color compensation.
4. An underwater image enhancement system based on red channel fading, comprising:
the acquisition module is used for acquiring pixel values of a red channel, a green channel and a blue channel of the underwater image;
the compensation module is used for compensating each pixel value of the red channel through the pixel values of the green channel and the blue channel in the field of the pixel value to obtain an image after color compensation;
the adjusting module is used for adjusting the color of the image after the color compensation by using a white balance algorithm;
the compensation module comprises a calculation module for performing compensation calculation on each pixel value of the red channel by the following formula:
Figure FDA0003689043700000021
α+β=1
in the formula I r,com (x, y) represents the red channel compensated pixel value; i is r (x,y)、I g (x, y) and I b (x, y) respectively represent pixel values of a red channel, a green channel and a blue channel; both α and β are a constant less than 1;
Figure FDA0003689043700000022
representing the normalized average of the green channel in the pixel value domain,
Figure FDA0003689043700000023
representing the normalized average of the blue channel in the pixel value domain.
5. The red channel attenuation-based underwater image enhancement system of claim 4, wherein said acquisition module further comprises:
and the normalization processing module is used for performing normalization processing on the pixel values.
6. The red channel attenuation-based underwater image enhancement system according to claim 4, wherein said compensation module includes an inverse normalization processing module for performing inverse normalization to synthesize a color compensated image.
CN202010430434.0A 2020-05-20 2020-05-20 Underwater image enhancement method and system based on red channel weakness Active CN111696052B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010430434.0A CN111696052B (en) 2020-05-20 2020-05-20 Underwater image enhancement method and system based on red channel weakness

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010430434.0A CN111696052B (en) 2020-05-20 2020-05-20 Underwater image enhancement method and system based on red channel weakness

Publications (2)

Publication Number Publication Date
CN111696052A CN111696052A (en) 2020-09-22
CN111696052B true CN111696052B (en) 2022-08-12

Family

ID=72477978

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010430434.0A Active CN111696052B (en) 2020-05-20 2020-05-20 Underwater image enhancement method and system based on red channel weakness

Country Status (1)

Country Link
CN (1) CN111696052B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112348904A (en) * 2020-10-23 2021-02-09 影石创新科技股份有限公司 Underwater image and underwater video color restoration method and device
CN113411554A (en) * 2021-05-31 2021-09-17 影石创新科技股份有限公司 Underwater image color restoration method and device
CN113496474A (en) * 2021-06-15 2021-10-12 中汽创智科技有限公司 Image processing method, device, all-round viewing system, automobile and storage medium
CN117750219A (en) * 2022-09-14 2024-03-22 影石创新科技股份有限公司 Image white balance processing method, device, computer equipment and storage medium
CN115423724B (en) * 2022-11-03 2023-03-21 中国石油大学(华东) Underwater image enhancement method, device and medium for reinforcement learning parameter optimization

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7369699B1 (en) * 2003-08-29 2008-05-06 Apple Inc. Methods and apparatuses for restoring color and enhancing electronic images
CN105631834A (en) * 2015-12-16 2016-06-01 安徽创世科技有限公司 Night vision image enhancement method
CN108596843A (en) * 2018-04-10 2018-09-28 山东大学 A kind of underwater picture color recovery algorithm based on bright channel
CN110728647A (en) * 2019-10-16 2020-01-24 紫光展讯通信(惠州)有限公司 Underwater image enhancement method and device, storage medium and terminal

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7369699B1 (en) * 2003-08-29 2008-05-06 Apple Inc. Methods and apparatuses for restoring color and enhancing electronic images
CN105631834A (en) * 2015-12-16 2016-06-01 安徽创世科技有限公司 Night vision image enhancement method
CN108596843A (en) * 2018-04-10 2018-09-28 山东大学 A kind of underwater picture color recovery algorithm based on bright channel
CN110728647A (en) * 2019-10-16 2020-01-24 紫光展讯通信(惠州)有限公司 Underwater image enhancement method and device, storage medium and terminal

Also Published As

Publication number Publication date
CN111696052A (en) 2020-09-22

Similar Documents

Publication Publication Date Title
CN111696052B (en) Underwater image enhancement method and system based on red channel weakness
Zhou et al. Auto color correction of underwater images utilizing depth information
CN107767354B (en) Image defogging algorithm based on dark channel prior
CN110889812B (en) Underwater image enhancement method for multi-scale fusion of image characteristic information
CN110288550B (en) Single-image defogging method for generating countermeasure network based on priori knowledge guiding condition
CN111210395B (en) Retinex underwater image enhancement method based on gray value mapping
CN112801925B (en) Underwater image enhancement method for maximally eliminating influence of water ripple based on information entropy
CN107424124B (en) Image enhancement method and device
CN112116536A (en) Low-illumination image enhancement method and system
RU2342701C1 (en) Method of complexing digital multispectral half-tone images
CN110827225A (en) Non-uniform illumination underwater image enhancement method based on double exposure frame
CN111861896A (en) UUV-oriented underwater image color compensation and recovery method
CN109903250A (en) Underwater picture clearness processing method based on multi-scale gradient domain contrast stretching
CN111462022B (en) Underwater image sharpness enhancement method
CN115578297A (en) Generalized attenuation image enhancement method for self-adaptive color compensation and detail optimization
CN116188339A (en) Retinex and image fusion-based scotopic vision image enhancement method
CN108596843B (en) Underwater image color recovery algorithm based on bright channel
CN113947553A (en) Image brightness enhancement method and device
CN107358578B (en) Yin-yang face treatment method and device
CN116029944B (en) Self-adaptive contrast enhancement method and device for gray level image
CN110992287A (en) Method for clarifying non-uniform illumination video
Subah et al. Underwater image enhancement based on fusion technique via color correction and illumination adjustment
CN114677295A (en) Method and device for enhancing mirror highlight image of real scene and storage medium
CN110599426B (en) Underwater image enhancement method for optimizing CLAHE
CN110766616B (en) Underwater image dodging algorithm based on single-scale Retinex method

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