CN110599426B - Underwater image enhancement method for optimizing CLAHE - Google Patents

Underwater image enhancement method for optimizing CLAHE Download PDF

Info

Publication number
CN110599426B
CN110599426B CN201910885219.7A CN201910885219A CN110599426B CN 110599426 B CN110599426 B CN 110599426B CN 201910885219 A CN201910885219 A CN 201910885219A CN 110599426 B CN110599426 B CN 110599426B
Authority
CN
China
Prior art keywords
image
clahe
pixel
histogram
cliplimit
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
CN201910885219.7A
Other languages
Chinese (zh)
Other versions
CN110599426A (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 Institute of Technology
Original Assignee
Nanjing Institute of 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 Institute of Technology filed Critical Nanjing Institute of Technology
Priority to CN201910885219.7A priority Critical patent/CN110599426B/en
Publication of CN110599426A publication Critical patent/CN110599426A/en
Application granted granted Critical
Publication of CN110599426B publication Critical patent/CN110599426B/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
    • G06T3/00Geometric image transformations in the plane of the image
    • G06T3/40Scaling of whole images or parts thereof, e.g. expanding or contracting
    • G06T3/4023Scaling of whole images or parts thereof, e.g. expanding or contracting based on decimating pixels or lines of pixels; based on inserting pixels or lines of pixels
    • 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
    • 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

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

Abstract

The invention discloses an underwater image enhancement method for optimizing CLAHE, which comprises the following steps: (1) a pretreatment process; (2) HE treatment process; (3) an adjusted CLAHE process; (4) image re-synthesis, outputting enhanced image. The invention optimizes the core parameters in the traditional CLAHE algorithm, so that the method is more suitable for the application situation of the underwater image enhancement; the HE algorithm and the CLAHE algorithm are used in a mixed mode, namely the overall color of the image is restored, the detail characteristics are more obvious, and the phenomenon of large noise caused by the AHE algorithm is avoided; the algorithm does not depend on a complex mathematical model, does not use a huge algorithm, has small calculation amount, does not need training, is rapid to execute, reduces the requirement on the performance of a processor, and is suitable for transplanting and realizing on various underwater embedded platforms.

Description

Underwater image enhancement method for optimizing CLAHE
Technical Field
The invention relates to the technical field of image processing, in particular to an underwater image enhancement method for optimizing a CLAHE.
Background
At present, development of ocean resources is gradually paid attention to in various countries. Because humans are not adapted to the underwater environment, the acquisition of underwater image video by an underwater robot for analysis is one of the important ways of underwater exploration and development. Due to the optical characteristics of the water body and the influence of suspended impurities in the water, the light rays generate serious absorption and scattering phenomena in the water, the contrast of an actually acquired image is reduced, the color is offset and the details are fuzzy, and the degraded underwater image brings great difficulty to the analysis of the underwater environment by researchers, so that the details of the underwater image are enhanced in what way, the information in the underwater image is recovered, and extensive research is caused.
The image enhancement technology is the most common direction in underwater image restoration, does not depend on an image forming model, directly modifies pixel values in an image, and has strong adaptability. When the technology is used, a corresponding image enhancement algorithm is often selected, and partial parameters in the algorithm are modified, so that the technology can be applied to different scenes. Mature and easy to implement methods in image enhancement techniques are "contrast stretching", "Histogram Equalization (HE)", "Contrast Limited Adaptive Histogram Equalization (CLAHE)", and the like.
The linear contrast stretching method is adopted, so that the effect is not ideal when the details are distributed in a narrower gray scale interval aiming at low brightness of an underwater image; the local detail enhancement of images is limited using HE method alone; only original CLAHE parameters are selected, so that the method is not suitable for underwater image processing; the brightness and saturation components of the image are processed again, so that the operation amount is increased, and the effect improvement is limited.
Disclosure of Invention
The technical problem to be solved by the invention is to provide the underwater image enhancement method for optimizing the CLAHE, which has the advantages of small operand, no need of training, rapid execution, reduced requirement on the performance of a processor and suitability for transplanting and realization on various underwater embedded platforms.
In order to solve the technical problems, the invention provides an underwater image enhancement method for optimizing a CLAHE, which comprises the following steps:
(1) A pretreatment process;
(2) HE treatment process;
(3) An adjusted CLAHE process;
(4) And (5) synthesizing the images again, and outputting the enhanced images.
Preferably, in the step (1), the pretreatment process specifically includes: the acquired underwater image is compressed, and the operation amount in a subsequent image enhancement algorithm can be reduced on the basis of keeping original image information of the compressed image; in the image compression process, a bicubic interpolation method is adopted, so that the information damage to the original image is less and the speed is moderate; the image RGB three channels are divided, common color images are stored in an RGB format, the information of the three channels is stored in a memory as a continuous matrix, and the divided RGB channels can be directly read from the appointed position of the memory without any conversion process.
Preferably, in the step (2), the HE treatment process specifically includes the following steps:
(21) Determining the gray level r of an original image k
(22) Calculating the distribution probability of the original histogram;
Figure BDA0002207111200000021
(23) Calculating a histogram probability cumulative value;
Figure BDA0002207111200000022
(24) Calculating a pixel mapping relation;
ss(i)=int{[max(pix)-min(pix)]s k +0.5};
ss (i) is the gray level in the equalized image corresponding to the i-th gray level;
(25) And (3) operating each pixel in the original image according to the mapping function obtained in the step (24), and mapping the pixel into a new pixel.
Preferably, in step (3), the adjusted CLAHE treatment process specifically includes the following steps:
(31) Dividing the whole image into a plurality of small blocks with N-by-N sizes;
(32) The gray level histogram in each small block is cut, the cut value is ClipLimit, the sum total Exest of the parts higher than the cut value in the histogram is obtained, at this time, assuming that total Exest is equally divided into all gray levels N, the height L=total Exest/N of the overall rise of the histogram caused by the above is obtained, and the histogram is processed as follows with upper=ClipLimit-L as a limit:
if the amplitude is higher than the ClipLimit, directly setting the amplitude as the ClipLimit;
if the amplitude is between Upper and ClipLimit, filling the amplitude to ClipLimit;
if the amplitude is lower than Upper, directly filling L pixel points;
through the above operation, the number of the pixel points used for filling is usually slightly smaller than total Excess, and some residual pixel points are not separated, wherein the residual pixel points are from the two above conditions, and the points are uniformly separated into gray values with the current amplitude still smaller than ClipLimit;
(33) Then, calculating a proper transformation function according to the cut gray level histogram and the appointed target distribution, and appointing the transformation function as an index distribution;
(34) And carrying out bilinear interpolation operation according to the calculated transformation function of each block and the position of the pixel to obtain a transformed value of each pixel.
Preferably, in the step (4), the image resynthesis is specifically: the image is split into RGB three channels in pretreatment, after the treatment of the step (2) and the step (3), three new channels of R ', G ', B ' are obtained, and the new three channels are synthesized to obtain the enhanced color image.
The beneficial effects of the invention are as follows: the invention optimizes the core parameters in the traditional CLAHE algorithm, so that the method is more suitable for the application situation of the underwater image enhancement; the HE algorithm and the CLAHE algorithm are used in a mixed mode, namely the overall color of the image is restored, the detail characteristics are more obvious, and the phenomenon of large noise caused by the AHE algorithm is avoided; the algorithm does not depend on a complex mathematical model, does not use a huge algorithm, has small calculation amount, does not need training, is rapid to execute, reduces the requirement on the performance of a processor, and is suitable for transplanting and realizing on various underwater embedded platforms.
Drawings
FIG. 1 is a schematic flow chart of the method of the present invention.
FIG. 2 is a schematic image contrast diagram of the pretreatment process of the present invention.
FIG. 3 is a schematic image contrast diagram of the HE process of the invention.
Fig. 4 is a schematic diagram showing the comparison of images of the CLAHE process adjusted according to the present invention.
FIG. 5 is a schematic image contrast diagram of the image resynthesis of the present invention.
Detailed Description
As shown in fig. 1, an underwater image enhancement method for optimizing a CLAHE includes the following steps:
(1) A pretreatment process;
(2) HE treatment process;
(3) An adjusted CLAHE process;
(4) And (5) synthesizing the images again, and outputting the enhanced images.
As shown in fig. 2, in step (1), the pretreatment process specifically includes: the acquired underwater image is compressed, and the operation amount in a subsequent image enhancement algorithm can be reduced on the basis of keeping original image information of the compressed image; in the image compression process, a bicubic interpolation method is adopted, so that the information damage to the original image is less and the speed is moderate; the image RGB three channels are divided, common color images are stored in an RGB format, the information of the three channels is stored in a memory as a continuous matrix, and the divided RGB channels can be directly read from the appointed position of the memory without any conversion process.
As shown in fig. 3, in step (2), histogram equalization is abbreviated as HE, and the core idea is to transform pixel values in an original image, and change the distribution histogram of the image from a region in a comparative set to be uniformly distributed in all regions; the HE treatment process specifically comprises the following steps:
(21) Determining the gray level r of an original image k
(22) Calculating distribution probability of original histogram
Figure BDA0002207111200000041
(23) Calculating histogram probability cumulative value
Figure BDA0002207111200000042
(24) Calculating pixel mapping relation
ss(i)=int{[max(pix)-min(pix)]s k +0.5}
ss (i) is the gray level in the equalized image corresponding to the i-th gray level;
(25) And (3) operating each pixel in the original image according to the mapping function obtained in the step (24), and mapping the pixel into a new pixel.
Calculating a transformation function s k Borrowing the definition of a mathematical Cumulative Distribution Function (CDF). The function single value is increased, namely, the gray level arrangement sequence of the original image is not disturbed after the enhancement processing is ensured, and the dynamic range of gray level values before and after transformation is consistent. After this processing, the histogram distribution of the output imageTo a wider extent, the brightness increases and detailed portions are easily presented.
As shown in fig. 4, in step (3), the CLAHE is shorthand for adaptive histogram equalization for contrast limitation, which is a further optimization of the AHE (adaptive histogram equalization). The method is firstly proposed to be applied to medical images, and then has good effects in other application scenes, and three most obvious characteristics are found in the CLAHE.
(1) Dividing a small interval in an original image, and then performing HE processing on the small interval;
(2) Each pixel neighborhood is subjected to contrast limitation, so that a corresponding transformation function is obtained and used for reducing noise enhancement in AHE; in particular, the slope of the transformation function is proportional to the slope of the cumulative histogram (which in turn can be seen as a cumulative distribution function, CDF). When the slope is abnormal, the enhancement is excessive, the image contrast is excessive, the noise point is obvious, and therefore, the slope is limited, namely, the excessive enhancement is avoided. Also, since the CDF is an integral of the gray level histogram (hist), limiting the magnitude of the hist change ensures that the slope of the CDF does not change abnormally. The hist is cut, and the cut area is uniformly distributed on the whole gray scale interval, so that the total area of the histogram is ensured to be unchanged, and the variation amplitude of the hist is limited;
(3) The operation efficiency is further improved through interpolation operation; the interpolation operation can increase the operation speed and prevent the pixel point in each block from being transformed only by the mapping function in the block, so that the final image has a blockiness effect. The mapping function value of each pixel point in the interpolation operation is obtained by performing bilinear interpolation on the mapping function values of 4 sub-blocks around the pixel point.
The adjusted CLAHE treatment process specifically comprises the following steps:
(31) Dividing the whole image into a plurality of small blocks with N-by-N sizes;
(32) The gray level histogram in each small block is cut, the cut value is ClipLimit, the sum total Exest of the parts higher than the cut value in the histogram is obtained, at this time, assuming that total Exest is equally divided into all gray levels N, the height L=total Exest/N of the overall rise of the histogram caused by the above is obtained, and the histogram is processed as follows with upper=ClipLimit-L as a limit:
if the amplitude is higher than the ClipLimit, directly setting the amplitude as the ClipLimit;
if the amplitude is between Upper and ClipLimit, filling the amplitude to ClipLimit;
if the amplitude is lower than Upper, directly filling L pixel points;
through the above operation, the number of the pixel points used for filling is usually slightly smaller than total Excess, and some residual pixel points are not separated, wherein the residual pixel points are from the two above conditions, and the points are uniformly separated into gray values with the current amplitude still smaller than ClipLimit;
(33) Then, calculating a proper transformation function according to the cut gray level histogram and the appointed target distribution, and appointing the transformation function as an index distribution;
(34) And carrying out bilinear interpolation operation according to the calculated transformation function of each block and the position of the pixel to obtain a transformed value of each pixel.
In the matlab simulation, an adapt-to-date function is used, and parameters are specified as follows:
table 1 specification parameter Table
Parameters Value
NumTiles [3 3]
clipLimit 0.01
Range original
Distribution exponential
Alpha 0.1
In fig. 4, the upper three graphs are values of R, G, B three channels after HE processing, and the lower three graphs are values of three channels after CLAHE processing.
As shown in fig. 5, in step (4), the image resynthesis is specifically: the image is split into RGB three channels in pretreatment, after the treatment of the step (2) and the step (3), three new channels of R ', G ', B ' are obtained, and the new three channels are synthesized to obtain the enhanced color image.
Wherein the left graph is the original graph after compression, and the right graph is the graph after processing by the algorithm. The contrast is enhanced, the image is clearer, and the color is richer through the histogram distribution diagram of each channel.
The same test is carried out by utilizing the algorithm aiming at different underwater situations, and quantitative analysis is carried out on the algorithm except visual comparison. Three common standards are selected for evaluation, wherein the three standards are respectively information entropy (entropy), mean Square Error (MSE) and peak signal-to-noise ratio (PSNR); generally speaking, a processed high-quality image has the characteristics of high information entropy, low mean square error and high peak signal to noise ratio, and the algorithm provided by the invention is compared with a common HE and original CLAHE, so that the following table is obtained:
table 2 contrast of original image, image processed by the method of the present invention, image processed by HE method, image processed by ordinary CLAHE method
Figure BDA0002207111200000071
From the above table, the method provided by the invention has better performance on the data of information entropy, and the performance on the two data of MSE and PSNR is between the original HE method and the CLAHE method. This is mainly because the whole image is overstretched in the HE processing process, and partial noise is generated on the R channel during the final synthesis, and the noise is weakened to some extent by the method proposed by the invention. Compared with the original CLAHE method, the common CLAHE algorithm always looks at the situation to avoid the influence of noise points to the greatest extent, but the problems of color cast and low saturation in the original image are solved poorly.
The invention provides an easily-realized and efficient underwater image enhancement method, which comprises the steps of firstly dividing RGB three channels of an image, enhancing the whole image by a Histogram Equalization (HE) method on each channel, then modifying parameters such as NumTiles, clipLimit, distribution, alpha and the like in the image by a contrast-limited self-adaptive histogram equalization (CLAHE) method, further enhancing the detail part of the image, and finally synthesizing the images of the three channels to obtain an enhanced image.

Claims (4)

1. An underwater image enhancement method for optimizing CLAHE is characterized by comprising the following steps:
(1) A pretreatment process;
(2) HE treatment process;
(3) An adjusted CLAHE process; the method specifically comprises the following steps:
(31) Dividing the whole image into a plurality of small blocks with N-by-N sizes;
(32) The gray level histogram in each small block is cut, the cut value is ClipLimit, the sum total Exest of the parts higher than the cut value in the histogram is obtained, at this time, assuming that total Exest is equally divided into all gray levels N, the height L=total Exest/N of the overall rise of the histogram caused by the above is obtained, and the histogram is processed as follows with upper=ClipLimit-L as a limit:
if the amplitude is higher than the ClipLimit, directly setting the amplitude as the ClipLimit;
if the amplitude is between Upper and ClipLimit, filling the amplitude to ClipLimit;
if the amplitude is lower than Upper, directly filling L pixel points;
through the above operation, the number of the pixel points used for filling is usually slightly smaller than total Excess, and some residual pixel points are not separated, wherein the residual pixel points are from the two above conditions, and the points are uniformly separated into gray values with the current amplitude still smaller than ClipLimit;
(33) Then, calculating a proper transformation function according to the cut gray level histogram and the appointed target distribution, and appointing the transformation function as an index distribution;
(34) Performing bilinear interpolation operation according to the calculated transformation function of each block and the pixel position to obtain a transformed value of each pixel;
(4) And (5) synthesizing the images again, and outputting the enhanced images.
2. The method for enhancing underwater images for optimizing CLAHE as claimed in claim 1, wherein in the step (1), the preprocessing process is specifically as follows: and compressing the acquired underwater image, wherein a bicubic interpolation method is adopted in the image compression process, three channels of the image RGB are segmented, the information of the three channels is stored in a memory as a continuous matrix, and the segmented RGB channels directly read the appointed position of the memory.
3. The method for enhancing underwater images for optimizing a CLAHE as claimed in claim 1, wherein in the step (2), the HE process comprises the steps of:
(21) Determining the gray level r of an original image k
(22) Calculating the distribution probability of the original histogram;
Figure FDA0003929637530000021
(23) Calculating a histogram probability cumulative value;
Figure FDA0003929637530000022
(24) Calculating a pixel mapping relation;
ss(i)=int{[max(pix)-min(pix)]s k +0.5};
ss (i) is the gray level in the equalized image corresponding to the i-th gray level;
(25) And (3) operating each pixel in the original image according to the mapping function obtained in the step (24), and mapping the pixel into a new pixel.
4. The method for underwater image enhancement for optimizing CLAHE as in claim 1, wherein in step (4), the image resynthesis is specifically: the image is split into RGB three channels in pretreatment, after the treatment of the step (2) and the step (3), three new channels of R ', G ', B ' are obtained, and the new three channels are synthesized to obtain the enhanced color image.
CN201910885219.7A 2019-09-19 2019-09-19 Underwater image enhancement method for optimizing CLAHE Active CN110599426B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910885219.7A CN110599426B (en) 2019-09-19 2019-09-19 Underwater image enhancement method for optimizing CLAHE

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910885219.7A CN110599426B (en) 2019-09-19 2019-09-19 Underwater image enhancement method for optimizing CLAHE

Publications (2)

Publication Number Publication Date
CN110599426A CN110599426A (en) 2019-12-20
CN110599426B true CN110599426B (en) 2023-04-25

Family

ID=68861038

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910885219.7A Active CN110599426B (en) 2019-09-19 2019-09-19 Underwater image enhancement method for optimizing CLAHE

Country Status (1)

Country Link
CN (1) CN110599426B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111709898B (en) * 2020-06-20 2023-05-23 昆明物理研究所 Infrared image enhancement method and system based on optimized CLAHE
CN113989137A (en) * 2021-10-21 2022-01-28 武汉博视电子有限公司 Method for extracting pigmentation of facial skin image and forming spectrum of brown region

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106897972A (en) * 2016-12-28 2017-06-27 南京第五十五所技术开发有限公司 A kind of self-adapting histogram underwater picture Enhancement Method of white balance and dark primary
US9836433B1 (en) * 2012-04-02 2017-12-05 Rockwell Collins, Inc. Image processing using multiprocessor discrete wavelet transform

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9836433B1 (en) * 2012-04-02 2017-12-05 Rockwell Collins, Inc. Image processing using multiprocessor discrete wavelet transform
CN106897972A (en) * 2016-12-28 2017-06-27 南京第五十五所技术开发有限公司 A kind of self-adapting histogram underwater picture Enhancement Method of white balance and dark primary

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
Enhancement of Underwater Images using Improved CLAHE;Ashutosh Mishra等;《2018ICACAT》;20181229;正文第2-3节 *

Also Published As

Publication number Publication date
CN110599426A (en) 2019-12-20

Similar Documents

Publication Publication Date Title
CN110232661B (en) Low-illumination color image enhancement method based on Retinex and convolutional neural network
US20110150356A1 (en) Image processing apparatus, image processing method, and program
CN110717868B (en) Video high dynamic range inverse tone mapping model construction and mapping method and device
CN111105371B (en) Enhancement method of low-contrast infrared image
CN111696052B (en) Underwater image enhancement method and system based on red channel weakness
CN110599426B (en) Underwater image enhancement method for optimizing CLAHE
CN113344773B (en) Single picture reconstruction HDR method based on multi-level dual feedback
CN112598607B (en) Endoscope image blood vessel enhancement algorithm based on improved weighted CLAHE
CN112801925A (en) Underwater image enhancement method for maximally eliminating water ripple influence based on information entropy
CN111105376A (en) Single-exposure high-dynamic-range image generation method based on double-branch neural network
CN103295206A (en) low-light-level image enhancement method and device based on Retinex
CN115205146A (en) Depth Retinex image enhancement method under weak illumination condition
CN112598612A (en) Flicker-free dim light video enhancement method and device based on illumination decomposition
CN114708157A (en) Image compression method, electronic device, and computer-readable storage medium
CN116862794A (en) Underwater image processing method based on double compensation and contrast adjustment
CN114240767A (en) Image wide dynamic range processing method and device based on exposure fusion
CN116645291A (en) Self-adaptive Gamma correction glare suppression method based on regional brightness perception
CN111325680B (en) Image brightening method capable of inhibiting local overexposure
CN112488968A (en) Image enhancement method for balanced fusion of degree-based histograms
CN115937045B (en) Iterative tone scale reconstruction method
CN116630198A (en) Multi-scale fusion underwater image enhancement method combining self-adaptive gamma correction
CN110807748A (en) New tone mapping image enhancement method based on high dynamic range
Lu et al. A new contrast enhancement technique by adaptively increasing the value of histogram
Zhang et al. Entropy-based local histogram equalization for medical ultrasound image enhancement
CN110276733B (en) Color image enhancement method based on FPGA

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