Nothing Special   »   [go: up one dir, main page]

CN104282004B - Self-adaptation equalization method based on extensible segmentation histogram - Google Patents

Self-adaptation equalization method based on extensible segmentation histogram Download PDF

Info

Publication number
CN104282004B
CN104282004B CN201410304816.3A CN201410304816A CN104282004B CN 104282004 B CN104282004 B CN 104282004B CN 201410304816 A CN201410304816 A CN 201410304816A CN 104282004 B CN104282004 B CN 104282004B
Authority
CN
China
Prior art keywords
histogram
equalization
scalable
segmented
image
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
CN201410304816.3A
Other languages
Chinese (zh)
Other versions
CN104282004A (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.)
Hunan University
Original Assignee
Hunan 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 Hunan University filed Critical Hunan University
Priority to CN201410304816.3A priority Critical patent/CN104282004B/en
Publication of CN104282004A publication Critical patent/CN104282004A/en
Application granted granted Critical
Publication of CN104282004B publication Critical patent/CN104282004B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Image Processing (AREA)
  • Facsimile Image Signal Circuits (AREA)
  • Image Analysis (AREA)

Abstract

本发明公开了一种基于可扩展分段自适应直方图均衡化方法,包括以下步骤:步骤1:采用可扩展直方图分段方法对输入的原直方图进行扩展;步骤2:对扩展后的直方图进行均衡化处理,每个均衡化后的子直方图具有与原始直方图相同的长度;步骤3:将步骤2得到的已均衡化子直方图按照下式进行加权混合,获得最终的均衡化直方图Ht(i);利用该方法采用可扩展直方图分段策略,可实现均衡化后图像灰度重分布到较大的动态范围,有利于暗区域图像的充分增强;运用提出了的自适应直方图均衡化方法,根据图像灰度属性自适应控制灰度均匀分布程度,从而可避免图像的过度增强、欠增强以及不自然的光晕现象产生;整个方法计算速度快,得到了增强效果明显的图像。

The invention discloses an adaptive histogram equalization method based on scalable segmentation, which comprises the following steps: Step 1: using the scalable histogram segmentation method to expand the original input histogram; Step 2: expanding the expanded histogram The histogram is equalized, and each equalized sub-histogram has the same length as the original histogram; Step 3: The equalized sub-histogram obtained in step 2 is weighted and mixed according to the following formula to obtain the final equalization Histogram H t (i); Using this method, the scalable histogram segmentation strategy can be used to realize the gray redistribution of the equalized image to a larger dynamic range, which is conducive to the full enhancement of the image in the dark area; the application proposed The self-adaptive histogram equalization method, which adaptively controls the uniform distribution of the gray level according to the image gray level attribute, thus avoiding the over-enhancement, under-enhancement and unnatural halo phenomenon of the image; the calculation speed of the whole method is fast, and the obtained Enhanced images are noticeable.

Description

一种基于可扩展分段直方图自适应均衡化方法An Adaptive Equalization Method Based on Scalable Segmented Histogram

技术领域technical field

本发明涉及一种基于可扩展分段直方图自适应均衡化方法。The invention relates to an adaptive equalization method based on scalable segmented histograms.

背景技术Background technique

直方图均衡化(histogram equalization,HE)由于原理简单,计算速度快等特点在交通监控,医学图像处理等领域得到广泛的应用。HE通过将高动态范围灰度级分布到均匀分布来增加提高相邻灰度级的差异,进而实现对比度增强。然而,如果直方图中有多个峰值时,会产生过度增强、欠增强以及不自然的光晕现象;为避免上述问题,自适应局部直方图均衡化(adaptive local histogram equalization,ALHE)、对比度受限自适应直方图均衡(contrast-limitedadaptive histogram equalization,CLAHE)等方法首先将图像分割成多个小窗口,分别在小窗口中进行直方图均衡化;但由于缺乏全局信息,这些方法经常过度或棋盘格现象。而直方图修订框架方法(histogram modification framework,HMF)将图像对比度增强看成一个由直方图均匀重分布、原始直方图保持与直方图平滑组合的优化问题,从而实现图像对比度可调节增强;二维直方图均衡化(two-dimensional histogram equalization,2DHE)同步考虑每个像素以及邻域像素的灰度级分布来构建二维直方图,进而将二维直方图进行均匀重分布来实现图像对比度增强;AMHE则直接修改原始图像的直方图,并采用直方图规定化方法实现图像增强;然而,这些方法都是针对整个直方图进行处理,过度增强、欠增强很难避免,而且在图像平坦区域,会产生光晕现象。为此,研究学者提出了许多改进方法,如亮度保持直方均衡(BBHE)、相同区域子图直方图均衡化(DSIHE),最小的平均亮度误差双直方图均衡(MMBEBHE)、递归均值分隔直方图均衡化(RMSHE)以及亮度保持动态模糊直方图均衡化(BPDFHE)等等。此外,高斯混合模型被引入拟合灰度分布,然后用混合模型间的交叉点来分隔原始直方图,并分别进行直方图均衡化。这些多直方图均衡化方法能够有效的保持亮度,但当用于暗图像增强时,则会导致欠增强;此外,由于多个子直方图均采用相同的均衡化策略,当图像明暗反差较大时,这些方法很容易导致过度增强。Histogram equalization (HE) has been widely used in traffic monitoring, medical image processing and other fields due to its simple principle and fast calculation speed. HE achieves contrast enhancement by distributing high dynamic range gray levels to a uniform distribution to increase the difference between adjacent gray levels. However, if there are multiple peaks in the histogram, over-enhancement, under-enhancement, and unnatural halos will occur; in order to avoid the above problems, adaptive local histogram equalization (adaptive local histogram equalization, ALHE), contrast Contrast-limited adaptive histogram equalization (CLAHE) and other methods first divide the image into multiple small windows, and perform histogram equalization in the small windows respectively; but due to the lack of global information, these methods are often excessive or checkerboard lattice phenomenon. The histogram modification framework (HMF) regards image contrast enhancement as an optimization problem consisting of histogram uniform redistribution, original histogram preservation and histogram smooth combination, so as to achieve adjustable image contrast enhancement; two-dimensional Histogram equalization (two-dimensional histogram equalization, 2DHE) simultaneously considers the gray level distribution of each pixel and neighboring pixels to construct a two-dimensional histogram, and then uniformly redistributes the two-dimensional histogram to achieve image contrast enhancement; AMHE directly modifies the histogram of the original image, and uses the histogram specification method to achieve image enhancement; however, these methods are all for the entire histogram, and it is difficult to avoid over-enhancement and under-enhancement, and in flat areas of the image, there will be Halo phenomenon occurs. To this end, researchers have proposed many improved methods, such as brightness preserving histogram equalization (BBHE), same area sub-image histogram equalization (DSIHE), minimum average brightness error double histogram equalization (MMBEBHE), recursive mean separation histogram Equalization (RMSHE) and Brightness Preserving Motion Blur Histogram Equalization (BPDFHE), etc. In addition, a Gaussian mixture model is introduced to fit the gray distribution, and then the intersection points between the mixture models are used to separate the original histogram, and the histogram equalization is performed separately. These multi-histogram equalization methods can effectively maintain brightness, but when used for dark image enhancement, it will lead to under-enhancement; in addition, since multiple sub-histograms use the same equalization strategy, when the image has a large contrast between light and dark , these methods can easily lead to over-enhancement.

发明内容Contents of the invention

本发明提供了一种基于可扩展分段直方图自适应均衡化方法,其目的在于解决现有方法在增强暗图像过程中,极易导致图像暗区域欠增强,而亮区域出现过度增强或严重的退化现象等问题。The present invention provides an adaptive equalization method based on scalable segmented histograms, and its purpose is to solve the problem of under-enhancement in dark areas of images and over-enhancement or severe seriousness in bright areas in the process of enhancing dark images in existing methods. degradation phenomena and other issues.

一种基于可扩展分段自适应直方图均衡化方法,包括以下步骤:A method based on scalable segment adaptive histogram equalization, comprising the following steps:

步骤1:采用可扩展直方图分段方法对输入的原直方图进行扩展;Step 1: Extend the original input histogram using the scalable histogram segmentation method;

首先将原始直方图Ho分割成N个非重叠的分段直方图hk,k∈[1,…,N];接着将所有分段直方图hk分别扩展到与原始直方图Ho灰度区间相同的直方图,保持分段直方图hk在原始直方图的位置不变,其他位置用零填充,即得到可扩展分段直方图(k∈[1,…,N]), H k x = [ 0 , . . . , h k , . . . , 0 ] , ( k ∈ [ 1 , . . . , N ] ) ; First, the original histogram H o is divided into N non-overlapping segmented histograms h k , k∈[1,...,N]; then all the segmented histograms h k are respectively extended to be as gray as the original histogram H o For the histogram with the same degree interval, keep the position of the segmented histogram h k in the original histogram unchanged, and fill the other positions with zeros, that is, an expandable segmented histogram (k∈[1,...,N]), h k x = [ 0 , . . . , h k , . . . , 0 ] , ( k ∈ [ 1 , . . . , N ] ) ;

步骤2:对可扩展分段直方图进行均衡化处理,每个均衡化后的子直方图具有与原始直方图相同的长度;Step 2: Equalize the scalable segmented histogram, and each equalized sub-histogram has the same length as the original histogram;

步骤3:将步骤2得到的已均衡化子直方图按照下式进行加权混合,获得最终的均衡化直方图Ht(i):Step 3: The equalized sub-histogram obtained in step 2 Perform weighted mixing according to the following formula to obtain the final equalized histogram H t (i):

Hh tt (( ii )) == ΣΣ kk == 11 NN ww kk (( ii )) Hh kk tt (( ii ))

其中,wk(i)是第k个均衡化扩展分段直方图的归一化权值,权值函数N为直方图分段数,i是灰度级,uk与σk分别是权值函数的均值与方差。where w k (i) is the normalized weight of the k-th equalized extended segment histogram, weight function N is the number of histogram segments, i is the gray level, u k and σ k are the mean and variance of the weight function respectively.

运用该方法解决了在亮区域产生一定程度过度增强,而在暗区域产生欠增强的问题。This method solves the problem of over-enhancement in bright areas and under-enhancement in dark areas.

所述权值函数的均值其中,分别是分段直方图hk的第一个与最后一个灰度级;The mean of the weight function in, are the first and last gray levels of the segmented histogram h k respectively;

所述权值函数的方差 为避免图像过度增强的阈值,为分段直方图hk的覆盖宽度,即 The variance of the weight function To avoid over-enhancing the image threshold, is the coverage width of the segmented histogram h k , namely

保证了直方图hk在均衡化过程中,两个对称方向均有相同的分布程度。It is guaranteed that the histogram h k has the same distribution degree in the two symmetrical directions during the equalization process.

所述其中,为分段直方图hk中的灰度均值。said for in, is the gray mean value in the segmented histogram h k .

所述步骤2中选用的均衡化处理为自适应均衡化处理,在现有的直方图均衡化方法提出的优化问题中,采用如下公式优化正则化参数α,β及γ;The equalization process selected in the step 2 is an adaptive equalization process, and the optimization problem proposed in the existing histogram equalization method In , the regularization parameters α, β and γ are optimized using the following formulas;

αα == maxmax (( αα 00 11 -- γγ 00 aa 00 ++ ββ 00 ,, αα ththe th ))

ββ == minmin (( ββ 00 11 -- γγ 00 αα 00 ++ ββ 00 ,, ββ ththe th ))

γ=1-α-βγ=1-α-β

其中,Hx为输入图像扩展后的直方图,Ht为输入图像的目标直方图,Hu为期望均衡分布直方图;H为自适应均衡化处理后得到的直方图,||·||表示欧氏范数,D为双对角差分矩阵;Among them, H x is the expanded histogram of the input image, H t is the target histogram of the input image, Hu is the expected equalization distribution histogram; H is the histogram obtained after adaptive equalization processing, ||·|| Indicates the Euclidean norm, D is the double diagonal difference matrix;

为输入图像扩展后的直方图Hx的灰度级i与输入图像扩展后的直方图Hx的最大灰度级Imax距离测度,i为输入图像扩展后的直方图Hx中的灰度级,L为灰度级数,ni为输入图像扩展后的直方图Hx中灰度级i的频数,Imax是最大灰度级,方差σ为0.2Imax Measure the distance between the gray level i of the expanded histogram H x of the input image and the maximum gray level I max of the expanded histogram H x of the input image, i is the gray level in the expanded histogram H x of the input image Level, L is the number of gray levels, n i is the frequency of gray level i in the expanded histogram H x of the input image, I max is the maximum gray level, and the variance σ is 0.2I max ;

mi为输入图像中像素xj的灰度值I(xj)等于i的像素数目;nG(xj)为像素xj归一化的局部方差,且nG(xj)=G(xj)/I(xj),G(xj)为像素xj处的梯度幅值,G表示输入图像I对应的梯度幅值图,其中, 表示卷积操作,S为Sobel算子模板。 m i is the number of pixels whose gray value I(x j ) of pixel x j in the input image is equal to i; nG(x j ) is the normalized local variance of pixel x j , and nG(x j )=G(x j )/I(x j ), G(x j ) is the gradient magnitude at pixel x j , G represents the gradient magnitude map corresponding to the input image I, where, Indicates the convolution operation, and S is the Sobel operator template.

所述期望均衡分布直方图Hu采用如下公式进行分配:The expected equilibrium distribution histogram H u is distributed using the following formula:

Hh uu (( ii )) == WW kk (( ii )) ii ∉∉ hh kk 11 ii ∈∈ hh kk

式中,i为灰度级。In the formula, i is the gray level.

得到最终的均衡化直方图后,便可很容易的通过直方图修正得到最终的增强图像。After obtaining the final equalized histogram, the final enhanced image can be easily obtained through histogram correction.

有益效果Beneficial effect

本发明提出了一种基于可扩展分段自适应直方图均衡化方法,包括以下步骤:步骤1:采用可扩展直方图分段方法对输入的原直方图进行扩展;步骤2:对扩展后的直方图进行均衡化处理,每个均衡化后的子直方图具有与原始直方图相同的长度;步骤3:将步骤2得到的已均衡化子直方图按照下式进行加权混合,获得最终的均衡化直方图Ht(i);利用该方法采用可扩展直方图分段策略,可实现均衡化后图像灰度重分布到较大的动态范围,有利于暗区域图像的充分增强;运用提出了的自适应直方图均衡化方法,根据图像灰度属性自适应控制灰度均匀分布程度,从而可避免图像的过度增强、欠增强以及不自然的光晕现象产生;整个方法计算速度快,得到了增强效果明显的图像。The present invention proposes an adaptive histogram equalization method based on scalable segmentation, including the following steps: Step 1: expand the original histogram input by using the scalable histogram segmentation method; Step 2: expand the expanded histogram The histogram is equalized, and each equalized sub-histogram has the same length as the original histogram; Step 3: The equalized sub-histogram obtained in step 2 is weighted and mixed according to the following formula to obtain the final equalization Histogram H t (i); Using this method, the scalable histogram segmentation strategy can be used to realize the gray redistribution of the equalized image to a larger dynamic range, which is conducive to the full enhancement of the image in the dark area; the application proposed The self-adaptive histogram equalization method, which adaptively controls the uniform distribution of the gray level according to the image gray level attribute, thus avoiding the over-enhancement, under-enhancement and unnatural halo phenomenon of the image; the calculation speed of the whole method is fast, and the obtained Enhanced images are noticeable.

附图说明Description of drawings

图1为应用本发明所述方法处理图像的过程示意图,其中,图(a)为输入的原始图像,图(b)为原始图像转换成HSV空间图像,图(c)为对图(b)中的V通道图采用可扩展直方图分段方法获得的直方图,图(d)为对图(c)进行自适应均衡化处理得到的直方图,图(e)为对图(d)进行加权处理得到的直方图,图(f)为利用图(e)得到的直方图获得的V通道的增强图像,图(g)为获得的最终增强效果图;Fig. 1 is the schematic diagram of the process of applying the method of the present invention to process image, wherein, figure (a) is the original image of input, and figure (b) is that original image is converted into HSV space image, and figure (c) is to figure (b) The V channel image in the figure is the histogram obtained by using the scalable histogram segmentation method. Figure (d) is the histogram obtained by adaptive equalization processing on the image (c), and the image (e) is the histogram obtained by the image (d). The histogram obtained by the weighting process, figure (f) is the enhanced image of the V channel obtained by utilizing the histogram of figure (e), and figure (g) is the final enhanced effect figure obtained;

图2为应用本发明所述方法和其他直方图均衡化方法对同一图像进行增强处理的对比图,其中,图(a)为原始图像,图(b)为采用RMSHE方法,图(c)为采用BPBFHE方法,图(d)为采用HMF方法,图(e)为采用2DHE方法,图(f)为采用本发明所述方法AEPHE,图(g)为各直方图均衡化方法输入与输出间灰度映射函数,横坐标为输入灰度级,纵坐标为输出灰度级;Fig. 2 is the comparison diagram of applying the method of the present invention and other histogram equalization methods to enhance the same image, wherein, Fig. (a) is the original image, Fig. (b) adopts RMSHE method, and Fig. (c) is Adopt BPBFHE method, figure (d) is to adopt HMF method, figure (e) is to adopt 2DHE method, figure (f) is to adopt method AEPHE of the present invention, figure (g) is each histogram equalization method input and output interval Grayscale mapping function, the abscissa is the input grayscale, and the ordinate is the output grayscale;

图3为当N=3时,对应分段直方图hk的权值函数W1的示意图。FIG. 3 is a schematic diagram of the weight function W 1 corresponding to the segmented histogram h k when N=3.

具体实施方式Detailed ways

下面将结合附图和实施例对本发明做进一步的说明。The present invention will be further described below in conjunction with the accompanying drawings and embodiments.

一种基于可扩展分段自适应直方图均衡化方法,包括以下步骤:A method based on scalable segment adaptive histogram equalization, comprising the following steps:

步骤1:采用可扩展直方图分段方法对输入的原直方图进行扩展;Step 1: Extend the original input histogram using the scalable histogram segmentation method;

首先将原始直方图Ho分割成N个非重叠的分段直方图hk,k∈[1,N];接着将所有分段直方图hk分别扩展到与原始直方图Ho灰度区间相同的直方图,保持分段直方图hk在原始直方图的位置不变,其他位置用零填充,即得到扩展分段直方图(k∈[1,N]), H k x = [ 0 , . . . , h k , . . . , 0 ] , ( k ∈ [ 1 , . . . , N ] ) ; First, the original histogram H o is divided into N non-overlapping segmented histograms h k , k∈[1,N]; then all segmented histograms h k are respectively extended to the gray interval of the original histogram H o For the same histogram, keep the position of the segmented histogram h k in the original histogram unchanged, and fill other positions with zeros, that is, get the extended segmented histogram (k∈[1,N]), h k x = [ 0 , . . . , h k , . . . , 0 ] , ( k ∈ [ 1 , . . . , N ] ) ;

步骤2:对扩展分段直方图进行均衡化处理,每个均衡化后的子直方图具有与原始直方图相同的长度;Step 2: Equalize the extended segmented histogram, and each equalized sub-histogram has the same length as the original histogram;

在现有的直方图均衡化方法提出的优化问题中,采用如下公式优化正则化参数α,β及γ;Optimization problem posed in existing histogram equalization methods In , the regularization parameters α, β and γ are optimized using the following formulas;

αα == maxmax (( αα 00 11 -- γγ 00 aa 00 ++ ββ 00 ,, αα ththe th ))

ββ == minmin (( ββ 00 11 -- γγ 00 αα 00 ++ ββ 00 ,, ββ ththe th ))

γ=1-α-βγ=1-α-β

其中,Hx为输入图像扩展后的直方图,Ht为输入图像的目标直方图,Hu为期望均衡分布直方图;H为自适应均衡化处理后得到的直方图,||·||表示欧氏范数,D为双对角差分矩阵;Among them, H x is the expanded histogram of the input image, H t is the target histogram of the input image, Hu is the expected equalization distribution histogram; H is the histogram obtained after adaptive equalization processing, ||·|| Indicates the Euclidean norm, D is the double diagonal difference matrix;

为输入图像扩展后的直方图Hx的灰度级i与输入图像扩展后的直方图Hx的最大灰度级Imax距离测度,i为输入图像扩展后的直方图Hx中的灰度级,L为灰度级数,ni为输入图像扩展后的直方图Hx中灰度级i的频数,Imax是最大灰度级,方差σ为0.2Imax Measure the distance between the gray level i of the expanded histogram H x of the input image and the maximum gray level I max of the expanded histogram H x of the input image, i is the gray level in the expanded histogram H x of the input image Level, L is the number of gray levels, n i is the frequency of gray level i in the expanded histogram H x of the input image, I max is the maximum gray level, and the variance σ is 0.2I max ;

mi为输入图像中像素xj的灰度值I(xj)等于i的像素数目;nG(xj)为像素xj归一化的局部方差,且nG(xj)=G(xj)/I(xj),G(xj)为像素xj处的梯度幅值,其中, 表示卷积操作,S为Sobel算子模板。 m i is the number of pixels whose gray value I(x j ) of pixel x j in the input image is equal to i; nG(x j ) is the normalized local variance of pixel x j , and nG(x j )=G(x j )/I(x j ), G(x j ) is the gradient magnitude at pixel x j , in, Indicates the convolution operation, and S is the Sobel operator template.

所述期望均衡分布直方图Hu采用如下公式进行分配:The expected equilibrium distribution histogram H u is distributed using the following formula:

Hh uu (( ii )) == WW kk (( ii )) ii ∉∉ hh kk 11 ii ∈∈ hh kk

式中,i为灰度级。In the formula, i is the gray level.

得到最终的均衡化直方图后,便可很容易的通过直方图修正得到最终的增强图像。After obtaining the final equalized histogram, the final enhanced image can be easily obtained through histogram correction.

步骤3:将步骤2得到的已均衡化子直方图按照下式进行加权混合,获得最终的均衡化直方图Ht(i):Step 3: The equalized sub-histogram obtained in step 2 is weighted and mixed according to the following formula to obtain the final equalized histogram H t (i):

Hh tt (( ii )) == ΣΣ kk == 11 NN ww kk (( ii )) Hh kk tt (( ii ))

其中,wk(i)是第k个均衡化扩展分段直方图的归一化权值,权值函数k=[1,…,N],N为直方图分段数,i是灰度级,uk与σk分别是权值函数的均值与方差。where w k (i) is the normalized weight of the k-th equalized extended segment histogram, weight function k=[1,...,N], N is the number of histogram segments, i is the gray level, u k and σ k are the mean and variance of the weight function respectively.

所述权值函数的均值其中,分别是分段直方图hk的第一个与最后一个灰度级;The mean of the weight function in, are the first and last gray levels of the segmented histogram h k respectively;

所述权值函数的方差 为避免图像过度增强的阈值,为分段直方图hk的覆盖宽度,即 The variance of the weight function To avoid image over-enhancement threshold, is the coverage width of the segmented histogram h k , namely

保证了直方图hk在均衡化过程中,两个对称方向均有相同的分布程度。It is guaranteed that the histogram h k has the same distribution degree in the two symmetrical directions during the equalization process.

所述其中,为分段直方图hk中的灰度均值。said for in, is the gray mean value in the segmented histogram h k .

如图1所示,为应用本发明所述方法处理图像的过程示意图,处理过程如下:As shown in Figure 1, it is a schematic diagram of the process of applying the method of the present invention to process images, and the process is as follows:

1)输入原始图像I,并计算原始图像的亮度通道直方图,如图(a)和图(b)所示;1) Input the original image I, and calculate the brightness channel histogram of the original image, as shown in Figure (a) and Figure (b);

2)分割直方图成N分段直方图,并将其分别扩展得到可扩展分段直方图如图(c)所示;2) Split the histogram into N segmented histograms, and expand them respectively to obtain scalable segmented histograms As shown in figure (c);

3)针对每个扩展分段直方图应用提出的自适应直方图均衡化方法,得到的直方图如图(d)所示;3) For each extended segment histogram Applying the proposed adaptive histogram equalization method, the obtained histogram is shown in Figure (d);

(a)利用公式计算每个扩展分段直方图的权值,当N=3时,对应分段直方图hk的权值函数W1的示意图,如图3所示;(a) Using the formula Compute the segmented histogram for each extension The weight of , when N=3, corresponds to the schematic diagram of the weight function W 1 of the segmented histogram h k , as shown in Figure 3;

(b)利用优化正则化参数α,β及γ的公式计算α(k),β(k)及γ(k);(b) Calculate α(k), β(k) and γ(k) using the formulas for optimizing the regularization parameters α, β and γ;

(c)采用公式 H u ( i ) = W k ( i ) i ∉ h k 1 i ∈ h k 修订均匀分布直方图Hu(c) Using the formula h u ( i ) = W k ( i ) i ∉ h k 1 i ∈ h k Revised uniform distribution histogram H u ;

(d)利用公式求解目标直方图计算得到最终均衡化直方图,如图(e)所示,通过直方图修正得到最终的输出图像,如图(f)和图(g)所示。(d) Using the formula Solving for the target histogram The final equalized histogram is calculated, as shown in figure (e), and the final output image is obtained through histogram correction, as shown in figure (f) and figure (g).

为了验证本发明所述方法的有效性,选用不同直方图均衡化处理方法与本发明所述方法对同一原始图像进行均衡化处理,得到如图2中图(b)-图(f)所示图像增强效果对比图,从对比图中,可以看出图(f)对应得到的输入与输出间灰度映射函数明显优于其他方法。In order to verify the effectiveness of the method of the present invention, select different histogram equalization processing methods and the method of the present invention to carry out equalization processing on the same original image, and obtain as shown in Figure 2 (b)-Figure (f) Image enhancement effect comparison chart, from the comparison chart, it can be seen that the grayscale mapping function between the input and output corresponding to figure (f) is obviously better than other methods.

Claims (5)

1.一种基于可扩展分段自适应直方图均衡化方法,其特征在于,包括以下步骤:1. A method based on scalable subsection adaptive histogram equalization, is characterized in that, comprises the following steps: 步骤1:采用可扩展直方图分段方法对输入的原直方图进行扩展;Step 1: Extend the original input histogram using the scalable histogram segmentation method; 首先将原始直方图Ho分割成N个非重叠的分段直方图hk,k∈[1,N];接着将所有分段直方图hk分别扩展到与原始直方图Ho灰度区间相同的直方图,保持分段直方图hk在原始直方图的位置不变,其他位置用零填充,即得到可扩展分段直方图 H k x = [ 0 , . . . , h k , . . . , 0 ] ( k ∈ [ 1 , N ] ) ; First, the original histogram H o is divided into N non-overlapping segmented histograms h k , k∈[1,N]; then all segmented histograms h k are respectively extended to the gray interval of the original histogram H o For the same histogram, keep the position of the segmented histogram h k in the original histogram unchanged, and fill other positions with zeros, that is, an expandable segmented histogram h k x = [ 0 , . . . , h k , . . . , 0 ] ( k ∈ [ 1 , N ] ) ; 步骤2:对可扩展分段直方图进行均衡化处理,每个均衡化后的子直方图具有与原始直方图相同的长度;Step 2: Equalize the scalable segmented histogram, and each equalized sub-histogram has the same length as the original histogram; 步骤3:将步骤2得到的已均衡化子直方图按照下式进行加权混合,获得最终的均衡化直方图Ht(i):Step 3: The equalized sub-histogram obtained in step 2 Perform weighted mixing according to the following formula to obtain the final equalized histogram H t (i): Hh tt (( ii )) == ΣΣ kk == 11 NN ww kk (( ii )) Hh kk tt (( ii )) 其中,wk(i)是第k个均衡化扩展分段直方图的归一化权值,权值函数k=[1,…,N],N为直方图分段数,i是灰度级,uk与σk分别是权值函数的均值与方差。where w k (i) is the normalized weight of the k-th equalized extended segment histogram, weight function k=[1,...,N], N is the number of histogram segments, i is the gray level, u k and σ k are the mean and variance of the weight function respectively. 2.根据权利要求1所述的基于可扩展分段自适应直方图均衡化方法,其特征在于,所述权值函数的均值其中,分别是分段直方图hk的第一个与最后一个灰度级;2. based on scalable segmentation adaptive histogram equalization method according to claim 1, it is characterized in that, the mean value of described weight function in, are the first and last gray levels of the segmented histogram h k respectively; 所述权值函数的方差 为避免图像过度增强的阈值,为分段直方图hk的覆盖宽度,即 The variance of the weight function To avoid image over-enhancement threshold, is the coverage width of the segmented histogram h k , namely 3.根据权利要求2所述的基于可扩展分段自适应直方图均衡化方法,其特征在于,所述其中,为分段直方图hk中的灰度均值。3. based on scalable segmentation adaptive histogram equalization method according to claim 2, it is characterized in that, the for in, is the gray mean value in the segmented histogram h k . 4.根据权利要求1-3任一项所述的基于可扩展分段自适应直方图均衡化方法,其特征在于,所述步骤2中选用的均衡化处理为自适应均衡化处理,在现有的直方图均衡化方法提出的优化问题中,采用如下公式优化正则化参数α,β及γ;4. according to any one of claim 1-3, based on the scalable segmentation adaptive histogram equalization method, it is characterized in that, the equalization processing selected in the step 2 is adaptive equalization processing, in the present The optimization problem posed by some histogram equalization methods In , the regularization parameters α, β and γ are optimized using the following formulas; αα == maxmax (( αα 00 11 -- γγ 00 αα 00 ++ ββ 00 ,, αα ththe th )) ββ == minmin (( ββ 00 11 -- γγ 00 αα 00 ++ ββ 00 ,, ββ ththe th )) γ=1-α-βγ=1-α-β 其中,Hx为输入图像扩展后的直方图,Ht为输入图像的目标直方图,Hu为期望均衡分布直方图;H为自适应均衡化处理后得到的直方图,||·||表示欧氏范数,D为双对角差分矩阵;Among them, H x is the expanded histogram of the input image, H t is the target histogram of the input image, Hu is the expected equalization distribution histogram; H is the histogram obtained after adaptive equalization processing, ||·|| Indicates the Euclidean norm, D is the double diagonal difference matrix; 为输入图像扩展后的直方图Hx的灰度级i与输入图像扩展后的直方图Hx的最大灰度级Imax距离测度,i为输入图像扩展后的直方图Hx中的灰度级,L为灰度级数,ni为输入图像扩展后的直方图Hx中灰度级i的频数,Imax是最大灰度级,方差σ为0.2Imax Measure the distance between the gray level i of the expanded histogram H x of the input image and the maximum gray level I max of the expanded histogram H x of the input image, i is the gray level in the expanded histogram H x of the input image Level, L is the number of gray levels, n i is the frequency of gray level i in the expanded histogram H x of the input image, I max is the maximum gray level, and the variance σ is 0.2I max ; mi为输入图像中像素xj的灰度值I(xj)等于i的像素数目;nG(xj)为像素xj归一化的局部方差,且nG(xj)=G(xj)/I(xj),G(xj)为像素xj处的梯度幅值。 m i is the number of pixels whose gray value I(x j ) of pixel x j in the input image is equal to i; nG(x j ) is the normalized local variance of pixel x j , and nG(x j )=G(x j )/I(x j ), G(x j ) is the gradient magnitude at pixel x j . 5.根据权利要求4所述的基于可扩展分段自适应直方图均衡化方法,其特征在于,所述期望均衡分布直方图Hu采用如下公式进行分配:5. based on scalable segment adaptive histogram equalization method according to claim 4, it is characterized in that, described expectation equalization distribution histogram H adopts following formula to distribute: Hh uu (( ii )) == WW kk (( ii )) ii ∉∉ hh kk 11 ii ∈∈ hh kk 式中,i为灰度级。In the formula, i is the gray level.
CN201410304816.3A 2014-06-30 2014-06-30 Self-adaptation equalization method based on extensible segmentation histogram Active CN104282004B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410304816.3A CN104282004B (en) 2014-06-30 2014-06-30 Self-adaptation equalization method based on extensible segmentation histogram

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410304816.3A CN104282004B (en) 2014-06-30 2014-06-30 Self-adaptation equalization method based on extensible segmentation histogram

Publications (2)

Publication Number Publication Date
CN104282004A CN104282004A (en) 2015-01-14
CN104282004B true CN104282004B (en) 2015-05-20

Family

ID=52256855

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410304816.3A Active CN104282004B (en) 2014-06-30 2014-06-30 Self-adaptation equalization method based on extensible segmentation histogram

Country Status (1)

Country Link
CN (1) CN104282004B (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105635524A (en) * 2015-12-18 2016-06-01 成都国翼电子技术有限公司 Intelligent enhancement method based on dark region histogram area statistics of history frame image
CN108830800B (en) * 2018-05-09 2023-02-28 南京邮电大学 A method for enhancing the brightness of images in dark scenes
CN113393389B (en) * 2021-06-02 2022-05-31 武汉博宇光电系统有限责任公司 Image enhancement method without artificial halation
CN114998186B (en) * 2022-03-31 2023-11-28 南通恒立机械设备有限公司 Method and system for detecting surface scab defect of copper starting sheet based on image processing
CN114494084B (en) * 2022-04-14 2022-07-26 广东欧谱曼迪科技有限公司 Image color homogenizing method and device, electronic equipment and storage medium
CN117974465B (en) * 2024-03-31 2024-06-14 天津市胸科医院 Chest CT image processing method and system
CN119228656B (en) * 2024-12-03 2025-01-28 成都市晶林科技有限公司 Infrared segmentation double-platform histogram enhancement method based on redistribution

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6850642B1 (en) * 2000-01-31 2005-02-01 Micron Technology, Inc. Dynamic histogram equalization for high dynamic range images
CN101510305A (en) * 2008-12-15 2009-08-19 四川虹微技术有限公司 Improved self-adapting histogram equilibrium method
CN102831592A (en) * 2012-08-10 2012-12-19 中国电子科技集团公司第四十一研究所 Image nonlinearity enhancement method based on histogram subsection transformation

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6850642B1 (en) * 2000-01-31 2005-02-01 Micron Technology, Inc. Dynamic histogram equalization for high dynamic range images
CN101510305A (en) * 2008-12-15 2009-08-19 四川虹微技术有限公司 Improved self-adapting histogram equilibrium method
CN102831592A (en) * 2012-08-10 2012-12-19 中国电子科技集团公司第四十一研究所 Image nonlinearity enhancement method based on histogram subsection transformation

Also Published As

Publication number Publication date
CN104282004A (en) 2015-01-14

Similar Documents

Publication Publication Date Title
CN104282004B (en) Self-adaptation equalization method based on extensible segmentation histogram
CN103606137B (en) Keep the histogram equalization method of background and detailed information
Zhu et al. An adaptive histogram equalization algorithm on the image gray level mapping
CN103295194B (en) Brightness-controllable and detail-preserving tone mapping method
CN104166967B (en) Method for improving definition of video image
US10198801B2 (en) Image enhancement using self-examples and external examples
TWI458341B (en) Method of improving image quality for display device
US9336578B2 (en) Interactive tone mapping for high dynamic range video
CN105931201A (en) Image subjective visual effect enhancing method based on wavelet transformation
CN112037144B (en) A low-light image enhancement method based on local contrast stretching
CN106952271A (en) An Image Segmentation Method Based on Superpixel Segmentation and EM/MPM Processing
CN110197463A (en) High dynamic range image tone mapping method and its system based on deep learning
CN104268843A (en) Image self-adaptation enhancing method based on histogram modification
CN106570831A (en) Gray image contrast equalization enhancement method
CN108305232B (en) A single-frame high dynamic range image generation method
CN107945122A (en) Infrared image enhancing method and system based on self-adapting histogram segmentation
CN104463804A (en) Image enhancement method based on intuitional fuzzy set
Singh et al. Contrast enhancement and brightness preservation using global-local image enhancement techniques
CN101211459A (en) Boundary point processed histogram balancing method
CN104134198A (en) Method for carrying out local processing on image
CN105184748A (en) Image bit depth enhancing method
US20130121565A1 (en) Method and Apparatus for Local Region Selection
CN103208103B (en) A kind of enhancement method of low-illumination image based on GPU
CN112991236B (en) Image enhancement method and device based on template
CN104504666A (en) Tone mapping method based on Laplacian pyramid

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant