CN112053309A - Image enhancement method and image enhancement device - Google Patents

Image enhancement method and image enhancement device Download PDF

Info

Publication number
CN112053309A
CN112053309A CN202011150564.5A CN202011150564A CN112053309A CN 112053309 A CN112053309 A CN 112053309A CN 202011150564 A CN202011150564 A CN 202011150564A CN 112053309 A CN112053309 A CN 112053309A
Authority
CN
China
Prior art keywords
image
channel
stre
histogram
unit
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.)
Pending
Application number
CN202011150564.5A
Other languages
Chinese (zh)
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.)
North Minzu University
Original Assignee
North Minzu 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 North Minzu University filed Critical North Minzu University
Priority to CN202011150564.5A priority Critical patent/CN112053309A/en
Publication of CN112053309A publication Critical patent/CN112053309A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/40Image enhancement or restoration using histogram techniques

Landscapes

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

Abstract

An image enhancement method, comprising: obtaining a source image Iin(u, v); stretching IinR, G and B-channel color amplitude of (u, v), resulting in color amplitude stretched image Istre(u, v); conversion Istre(u, v) color space of (I)stre(u, V) converting from RGB space to HSV space to obtain hue component H (u, V), brightness component V (u, V) and saturation component S (u, V); weighting and calculating V (u, V) to obtain a new V channel image Vout(u, v); stretching S (u, v) to obtain a stretched S channel image Sout(u, v); inverse transformation of H (u, V), Vout(u, v) and Sout(u, v) to RGB space to obtain image I after image enhancementout(u, v). The embodiment of the invention also provides a device for implementing the image enhancement method.

Description

一种图像增强方法及图像增强装置Image enhancement method and image enhancement device

技术领域technical field

本发明涉及图像处理技术领域,特别涉及一种图像增强方法及图像增强装置。The present invention relates to the technical field of image processing, and in particular, to an image enhancement method and an image enhancement device.

背景技术Background technique

彩色数字图像是反馈自然界信息的重要媒介,在不利的拍摄环境下,捕捉的图像通常具有低对比度,甚至有严重色偏的降质图像。Color digital images are an important medium for feeding back information about nature. Under unfavorable shooting conditions, the captured images usually have low contrast and even degraded images with severe color casts.

从低质量图像中获得更多的信息,现有技术提出一些增强图像的算法用以优化图像,例如:子直方图均衡化算法可利用阈值将原图像的直方图分解成若干个子直方图,并对子直方图分别进行均衡操作;修正直方图均衡化算法可通过修正直方图频率值和累积分布函数的方式来控制算法效果;局部直方图均衡化算法则依据图像的空间位置实施局部均衡化操作;还有基于变换域均衡化图像增强技术,它是通过将处于空域的图像变换至其他域进行均衡化图像增强。这些方法虽然起到了优化作用,但是也有弊端:子直方图均衡化算法需要实施多次均衡化操作,而且难以选取到合适的阈值;修正直方图均衡化算法虽然只需要实施一次均衡化操作,但是难以找到满意的修正方法和剪切参数;直方图变分规定化技术算法计算量大,且难以设计出合适的目标直方图;局部直方图均衡化算法难以找到合适的方法消除该算法导致的“块效应”现象和“过增强”现象;基于变换域均衡化图像增强技术则是算法复杂度过高。To obtain more information from low-quality images, some algorithms for image enhancement are proposed in the prior art to optimize the image. Perform equalization operations on the sub-histograms respectively; the modified histogram equalization algorithm can control the effect of the algorithm by modifying the histogram frequency value and the cumulative distribution function; the local histogram equalization algorithm implements local equalization operations according to the spatial position of the image ; There is also image enhancement technology based on transform domain equalization, which is equalized image enhancement by transforming the image in the spatial domain to other domains. Although these methods play an optimization role, they also have drawbacks: the sub-histogram equalization algorithm needs to perform multiple equalization operations, and it is difficult to select an appropriate threshold; although the modified histogram equalization algorithm only needs to perform an equalization operation, It is difficult to find a satisfactory correction method and clipping parameters; the histogram variational specification technology algorithm has a large amount of calculation, and it is difficult to design a suitable target histogram; it is difficult to find a suitable method for the local histogram equalization algorithm "block effect" phenomenon and "over-enhancement" phenomenon; image enhancement technology based on transform domain equalization is the algorithm complexity is too high.

发明内容SUMMARY OF THE INVENTION

有鉴于此,为了从低质量图像中获得更多的信息,且克服以上弊端,有必要提供一种图像增强方法及图像增强装置。In view of this, in order to obtain more information from low-quality images and overcome the above drawbacks, it is necessary to provide an image enhancement method and an image enhancement apparatus.

本发明实施例提供一种图像增强方法,包括如下步骤:An embodiment of the present invention provides an image enhancement method, comprising the following steps:

获取源图像Iin(u,v),Iin(u,v)={Rin(u,v),Gin(u,v),Bin(u,v)};Obtain the source image I in (u, v), I in (u, v)={R in (u, v), G in (u, v), B in (u, v)};

拉伸Iin(u,v)的R、G和B通道颜色幅度,得到颜色幅度拉伸后的图像Istre(u,v),Istre(u,v)={Rstre(u,v),Gstre(u,v),Bstre(u,v)};Stretch the color amplitudes of the R, G and B channels of I in (u,v) to obtain the image I stre (u, v) after the color amplitude is stretched, I stre (u, v) = {R stre (u, v ),G stre (u,v),B stre (u,v)};

转换Istre(u,v)的颜色空间,使Istre(u,v)从RGB空间转换至HSV空间,得到色调分量H(u,v)、亮度分量V(u,v)和饱和度分量S(u,v);Convert the color space of I stre (u, v), so that I stre (u, v) is converted from RGB space to HSV space, and obtains the hue component H(u, v), the luminance component V(u, v) and the saturation component S(u,v);

加权计算V(u,v),得到新的V通道图像Vout(u,v);Weighted calculation V(u, v) to obtain a new V channel image V out (u, v);

拉伸S(u,v),得到拉伸后的S通道图像Sout(u,v);Stretch S(u, v) to obtain the stretched S channel image S out (u, v);

逆变换H(u,v)、Vout(u,v)和Sout(u,v)至RGB空间,得到图像增强后的图像Iout(u,v),Iout(u,v)={Rout(u,v),Gout(u,v),Bout(u,v)}。Inversely transform H(u,v), Vout (u,v) and Sout (u,v) to RGB space to obtain the image Iout(u,v) after image enhancement, Iout (u,v)={ Rout (u,v), Gout (u,v), Bout (u,v)}.

本发明实施例还提供一种图像增强装置,其可包括:Embodiments of the present invention further provide an image enhancement device, which may include:

获取单元,用于获取源图像Iin(u,v),Iin(u,v)={Rin(u,v),Gin(u,v),Bin(u,v)};an acquisition unit for acquiring a source image I in (u, v), I in (u, v)={R in (u, v), G in (u, v), B in (u, v)};

RGB拉伸单元,用于拉伸Iin(u,v)的R、G和B通道颜色幅度,得到颜色幅度拉伸后的图像Istre(u,v),Istre(u,v)={Rstre(u,v),Gstre(u,v),Bstre(u,v)};The RGB stretching unit is used to stretch the R, G and B channel color amplitudes of I in (u, v) to obtain the image I stre (u, v) after the color amplitude is stretched, I stre (u, v) = {R stre (u,v),G stre (u,v),B stre (u,v)};

转换单元,用于转换Istre(u,v)的颜色空间,使Istre(u,v)从RGB空间转换至HSV空间,得到色调分量H(u,v)、亮度分量V(u,v)和饱和度分量S(u,v);The conversion unit is used to convert the color space of I stre (u, v), so that I stre (u, v) is converted from the RGB space to the HSV space, and the hue component H(u, v) and the luminance component V(u, v are obtained. ) and the saturation component S(u,v);

计算单元,用于加权计算V(u,v),得到新的V通道图像Vout(u,v);a calculation unit for weighted calculation V(u, v) to obtain a new V channel image V out (u, v);

饱和度分量拉伸单元,用于拉伸S(u,v),得到拉伸后的S通道图像Sout(u,v);The saturation component stretching unit is used to stretch S(u, v) to obtain the stretched S channel image S out (u, v);

逆变换单元,用于逆变换H(u,v)、Vout(u,v)和Sout(u,v)至RGB空间,得到图像增强后的图像Iout(u,v),Iout(u,v)={Rout(u,v),Gout(u,v),Bout(u,v)}。An inverse transform unit for inversely transforming H(u,v), Vout (u,v) and Sout (u,v) to RGB space to obtain an image-enhanced image Iout (u,v), Iout (u,v)={ Rout (u,v), Gout (u,v), Bout (u,v)}.

本发明实施例将源图像先进行R、G和B通道颜色幅度拉伸,再基于HSV空间调整V通道图像和S通道图像,使V通道图像直方图均衡化和S通道图像灰度值最大化拉伸,再将调整后的图像逆变换至RGB空间,得到增强后的图像,本发明实施例提供的方法能够克服传统直方图均衡化算法带来的“过增强”现象,计算过程简明、复杂度低,并能够有效地改善图像的对比度和亮度信息,获得高对比度和高色彩亮度的增强图像。In the embodiment of the present invention, the R, G, and B channel color amplitudes of the source image are first stretched, and then the V channel image and the S channel image are adjusted based on the HSV space, so as to equalize the histogram of the V channel image and maximize the gray value of the S channel image. Stretch, and then inversely transform the adjusted image to RGB space to obtain an enhanced image. The method provided by the embodiment of the present invention can overcome the "over-enhancement" phenomenon caused by the traditional histogram equalization algorithm, and the calculation process is simple and complicated. It can effectively improve the contrast and brightness information of the image, and obtain an enhanced image with high contrast and high color brightness.

附图说明Description of drawings

为了更清楚地说明本发明实施例的技术方案,下面将对实施例中所需要使用的附图作简单的介绍,显而易见地,下面描述中的附图是本发明实施例的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to explain the technical solutions of the embodiments of the present invention more clearly, the following will briefly introduce the drawings that need to be used in the embodiments. Obviously, the drawings in the following description are some embodiments of the embodiments of the present invention. For those of ordinary skill in the art, other drawings can also be obtained from these drawings without any creative effort.

附图1是一较佳实施方式的图像增强方法的步骤流程图。FIG. 1 is a flow chart of steps of an image enhancement method according to a preferred embodiment.

附图2是本发明实施例的实施方法效果展示图。FIG. 2 is a diagram showing the effect of an implementation method of an embodiment of the present invention.

附图3是本发明实施例中对V通道实施加权直方图均衡化算法前后的变化参照图。FIG. 3 is a reference diagram of changes before and after the weighted histogram equalization algorithm is implemented on the V channel in an embodiment of the present invention.

附图4是本发明实施例对加权均衡化后的直方图实施重新映射前后的变化参照图。FIG. 4 is a reference diagram of changes before and after the weighted equalization histogram is remapped according to an embodiment of the present invention.

附图5是本发明实施例对S通道实施饱和度最大化拉伸算法前后的变化参照图。FIG. 5 is a reference diagram of changes before and after the saturation maximization stretching algorithm is implemented on the S channel according to an embodiment of the present invention.

附图6是本发明实施例对于名为“earth”的场景图的6种方案增强结果对照参考图。FIG. 6 is a comparison reference diagram of enhancement results of six schemes for a scene graph named "earth" according to an embodiment of the present invention.

附图7是本发明实施例对于名为“earth”的场景图的6种方案直方图结果对照参考图。FIG. 7 is a comparison reference diagram of histogram results of six schemes for a scene graph named "earth" according to an embodiment of the present invention.

附图8是本发明实施例对于名为“road”的场景图的6种方案增强结果对照参考图。FIG. 8 is a comparison reference diagram of enhancement results of six schemes for a scene graph named “road” according to an embodiment of the present invention.

附图9是本发明实施例对于名为“road”的场景图的6种方案直方图结果对照参考图。FIG. 9 is a comparison reference diagram of histogram results of six schemes for a scene graph named “road” according to an embodiment of the present invention.

附图10是本发明实施例对于名为“126007”的场景图的6种方案增强结果对照参考图。FIG. 10 is a comparison reference diagram of enhancement results of six schemes for a scene graph named “126007” according to an embodiment of the present invention.

附图11是本发明实施例对于名为“126007”的场景图的6种方案直方图结果对照参考图。FIG. 11 is a comparison reference diagram of histogram results of six schemes for a scene graph named “126007” according to an embodiment of the present invention.

附图12是本发明实施例对于名为“5096”的场景图的6种方案增强结果对照参考图。FIG. 12 is a comparison reference diagram of enhancement results of six schemes for a scene graph named "5096" according to an embodiment of the present invention.

附图13是本发明实施例对于名为“5096”的场景图的6种方案直方图结果对照参考图。FIG. 13 is a reference diagram for comparing the histogram results of six schemes for a scene graph named “5096” according to an embodiment of the present invention.

附图14是一较佳实施方式的图像增强装置的结构组成示意图。FIG. 14 is a schematic diagram of the structure and composition of an image enhancement apparatus according to a preferred embodiment.

附图15是第一较佳实施方式的RGB拉伸单元12的结构组成示意图。FIG. 15 is a schematic diagram of the structure and composition of the RGB stretching unit 12 according to the first preferred embodiment.

附图16是第二较佳实施方式的RGB拉伸单元12的结构组成示意图。FIG. 16 is a schematic diagram of the structure and composition of the RGB stretching unit 12 according to the second preferred embodiment.

附图17是第三较佳实施方式的RGB拉伸单元12的结构组成示意图。FIG. 17 is a schematic diagram of the structure and composition of the RGB stretching unit 12 according to the third preferred embodiment.

附图18是一较佳实施方式的计算单元14的结构组成示意图。FIG. 18 is a schematic structural diagram of the computing unit 14 according to a preferred embodiment.

附图19是一较佳实施方式的加权计算单元141的结构组成示意图。FIG. 19 is a schematic diagram of the structure and composition of the weighting calculation unit 141 in a preferred embodiment.

具体实施方式Detailed ways

下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。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. Obviously, the described embodiments are part of the embodiments of the present invention, but not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.

本发明实施例提供一种图像增强方法,实现该方法的主体为一种图像增强装置,该装置可以为具有图像处理功能的终端设备。请参照图1和图2,本发明实施例提供的图像增强方法的实施步骤具体可以包括:An embodiment of the present invention provides an image enhancement method, and the main body implementing the method is an image enhancement apparatus, and the apparatus may be a terminal device with an image processing function. Referring to FIG. 1 and FIG. 2 , the implementation steps of the image enhancement method provided by the embodiment of the present invention may specifically include:

步骤S110,获取源图像Iin(u,v),其中,Iin(u,v)={Rin(u,v),Gin(u,v),Bin(u,v)};Step S110, acquiring a source image I in (u, v), where I in (u, v)={R in (u, v), G in (u, v), B in (u, v)};

步骤S111,拉伸源图像Iin(u,v)的R、G和B通道颜色幅度,得到颜色幅度拉伸后的图像Istre(u,v),Istre(u,v)={Rstre(u,v),Gstre(u,v),Bstre(u,v)};Step S111, stretch the color amplitudes of the R, G and B channels of the source image I in (u, v) to obtain an image I stre (u, v) after the color amplitude is stretched, where I stre (u, v)={R stre (u,v),G stre (u,v),B stre (u,v)};

步骤S112,转换图像Istre(u,v)的颜色空间,使图像Istre(u,v)从RGB空间转换至HSV空间,得到色调分量H(u,v)、亮度分量V(u,v)和饱和度分量S(u,v);Step S112, convert the color space of the image I stre (u, v), so that the image I stre (u, v) is converted from the RGB space to the HSV space to obtain the hue component H(u, v), the luminance component V(u, v) ) and the saturation component S(u,v);

步骤S113,加权计算V(u,v),得到新的V通道图像Vout(u,v);Step S113, weighted calculation V(u, v) to obtain a new V channel image V out (u, v);

步骤S114,拉伸S(u,v),得到拉伸后的S通道图像Sout(u,v);Step S114, stretch S(u, v) to obtain the stretched S channel image S out (u, v);

步骤S115,逆变换H(u,v)、Vout(u,v)和Sout(u,v)至RGB空间,得到图像增强后的图像Iout(u,v),Iout(u,v)={Rout(u,v),Gout(u,v),Bout(u,v)}。Step S115, inversely transform H(u,v), Vout (u,v) and Sout (u,v) to RGB space to obtain an image enhanced image Iout (u,v), Iout (u, v)={ Rout (u,v), Gout (u,v), Bout (u,v)}.

本发明实施例首先是对输入的RGB格式的彩色源图像Iin(u,v)在RGB空间中,分别对其R,G和B通道进行颜色幅度拉伸,源图像Iin(u,v)可以被表示为:In the embodiment of the present invention, the input color source image I in (u, v) in RGB format is firstly in RGB space, and its R, G and B channels are respectively subjected to color amplitude stretching, and the source image I in (u, v ) can be expressed as:

Iin(u,v)={Rin(u,v),Gin(u,v),Bin(u,v)} (1)I in (u,v)={R in (u,v),G in (u,v),B in (u,v)} (1)

其中(u,v)表示源图像的像素位置,并满足u=1,...,U,v=1,...,V。where (u, v) represents the pixel position of the source image and satisfies u=1,...,U,v=1,...,V.

为了减少因不利的捕获环境所引起的图像失真,RGB空间颜色通道拉伸可作为图像对比度增强的预处理算法,将每个颜色通道都拉伸到所允许的最大范围。拉伸Iin(u,v)的R、G和B通道颜色幅度,得到颜色幅度拉伸后的图像Istre(u,v),图像Istre(u,v)可以被表示为:To reduce image distortion caused by unfavorable capture environments, RGB space color channel stretching can be used as a preprocessing algorithm for image contrast enhancement, stretching each color channel to the maximum allowed range. Stretch the color amplitudes of the R, G and B channels of I in (u,v) to obtain the image I stre (u,v) after the color amplitude is stretched. The image I stre (u,v) can be expressed as:

Istre(u,v)={Rstre(u,v),Gstre(u,v),Bstre(u,v)} (2)I stre (u,v)={R stre (u,v),G stre (u,v),B stre (u,v)} (2)

具体的,实现拉伸Iin(u,v)的R通道颜色幅度的步骤具体可包括:计算Iin(u,v)的R通道颜色幅度取值范围;选取计算出的R通道颜色幅度取值范围中的最高值;拉伸R通道颜色幅度至R通道颜色幅度取值范围中的最高值,得到Rstre(u,v)。Specifically, the step of realizing the R channel color amplitude of stretching I in (u, v) may specifically include: calculating the value range of the R channel color amplitude of I in (u, v); selecting the calculated R channel color amplitude to take The highest value in the value range; stretch the R channel color amplitude to the highest value in the R channel color amplitude value range to get R stre (u,v).

R通道的颜色拉伸公式可用公式(3)表示The color stretching formula of the R channel can be expressed by formula (3)

Figure BDA0002741071130000041
Figure BDA0002741071130000041

其中min({R(u,v)})和max({R(u,v)})分别表示R通道中像素的最小值和最大值。where min({R(u,v)}) and max({R(u,v)}) represent the minimum and maximum values of pixels in the R channel, respectively.

具体的,实现拉伸Iin(u,v)的G通道颜色幅度的步骤具体可包括:计算Iin(u,v)的G通道颜色幅度取值范围;选取计算出的G通道颜色幅度取值范围中的最高值;拉伸G通道颜色幅度至G通道颜色幅度取值范围中的最高值,得到Gstre(u,v)。Specifically, the step of realizing the G channel color amplitude of stretching I in (u, v) may specifically include: calculating the value range of the G channel color amplitude of I in (u, v); selecting the calculated G channel color amplitude to take The highest value in the value range; stretch the G channel color amplitude to the highest value in the value range of the G channel color amplitude to obtain G stre (u,v).

G通道的颜色拉伸公式可用公式(4)表示The color stretching formula of G channel can be expressed by formula (4)

Figure BDA0002741071130000051
Figure BDA0002741071130000051

其中min({G(u,v)})和max({G(u,v)})分别表示R通道中像素的最小值和最大值。where min({G(u,v)}) and max({G(u,v)}) represent the minimum and maximum values of pixels in the R channel, respectively.

具体的,实现拉伸Iin(u,v)的B通道颜色幅度的步骤具体可包括:计算Iin(u,v)的B通道颜色幅度取值范围;选取计算出的B通道颜色幅度取值范围中的最高值;拉伸B通道颜色幅度至B通道颜色幅度取值范围中的最高值,得到Bstre(u,v)。Specifically, the step of realizing the B channel color amplitude of stretching I in (u, v) may specifically include: calculating the value range of the B channel color amplitude of I in (u, v); selecting the calculated B channel color amplitude to take The highest value in the value range; stretch the B channel color amplitude to the highest value in the B channel color amplitude value range to get B stre (u,v).

B通道的颜色拉伸公式可用公式(5)表示The color stretching formula of the B channel can be expressed by formula (5)

Figure BDA0002741071130000052
Figure BDA0002741071130000052

其中min({B(u,v)})和max({B(u,v)})分别表示R通道中像素的最小值和最大值。where min({B(u,v)}) and max({B(u,v)}) represent the minimum and maximum values of pixels in the R channel, respectively.

RGB格式的图像难以区分图像的色度,亮度和饱和度信息。如果直接在RGB颜色空间增强源图像的对比度,则R,G和B三者之间的比例关系极易被破坏,故而产生色彩失真现象。HSV(hue,saturation,value)颜色空间比其他颜色空间更符合人类对颜色感知的体验,可以很大程度的减少图像的细节信息和颜色信息的相互干扰。在步骤S112中,转换Istre(u,v)的颜色空间,使Istre(u,v)从RGB空间转换至HSV空间,得到色调分量H(u,v)、亮度分量V(u,v)和饱和度分量S(u,v)。将RGB色彩空间转换为HSV色彩空间的转换函数可以用公式(6)表示:An image in RGB format has difficulty distinguishing the chrominance, brightness and saturation information of the image. If the contrast of the source image is directly enhanced in the RGB color space, the proportional relationship between R, G and B is easily destroyed, resulting in color distortion. The HSV (hue, saturation, value) color space is more in line with the human experience of color perception than other color spaces, and can greatly reduce the mutual interference between the detail information of the image and the color information. In step S112, the color space of Isre (u, v) is converted, so that Isre (u, v) is converted from the RGB space to the HSV space, and the hue component H(u, v) and the luminance component V(u, v) are obtained ) and the saturation component S(u,v). The conversion function for converting the RGB color space to the HSV color space can be expressed by formula (6):

Figure BDA0002741071130000053
Figure BDA0002741071130000053

传统的直方图均衡化算法通常由于“过增强”而产生伪像,均匀分布的直方图可以保留图像更多的细节信息,本发明实施例通过一种优化准则将直方图的灰度级进行组合优化,从而获得满意的直方图,达到改善图像质量的目的。The traditional histogram equalization algorithm usually produces artifacts due to "over-enhancement". The evenly distributed histogram can retain more detailed information of the image. The embodiment of the present invention combines the gray levels of the histogram through an optimization criterion. optimization, so as to obtain a satisfactory histogram and achieve the purpose of improving the image quality.

在步骤S113中,对V通道进行加权直方图均衡化操作,加权计算V(u,v),得到新的V通道图像Vout(u,v),具体的实施方式可包括以下步骤:将V(u,v)对应直方图h(i)的灰度值进行加权计算,得到加权后的直方图hW(i);将hW(i)归一化,得到hN(i);映射hN(i)中的非空强度等级,使hN(i)的直方图分布均匀,得到加权计算后的Vout(u,v)。In step S113, a weighted histogram equalization operation is performed on the V channel, and V(u, v) is weighted to obtain a new V channel image V out (u, v). The specific implementation may include the following steps: (u, v) perform weighted calculation corresponding to the gray value of the histogram h(i) to obtain the weighted histogram h W (i); normalize h W (i) to obtain h N (i); map The non-null intensity levels in h N (i) make the histogram distribution of h N (i) uniform, resulting in a weighted calculated V out (u,v).

加权后的直方图hW(i)可用公式(7)表示:The weighted histogram h W (i) can be expressed by formula (7):

hW(i)=β×h(i)+ω×max{(h(i))},0<ω<1,ω+β=1 (7)h W (i)=β×h(i)+ω×max{(h(i))},0<ω<1,ω+β=1 (7)

其中,hW(i)是加权后的直方图,h(i)表示直方图,max{h(i)}是最大灰度值,i=0,1,...,L-1,当h(i)=(L-1),则满足Among them, h W (i) is the weighted histogram, h(i) is the histogram, max{h(i)} is the maximum gray value, i=0,1,...,L-1, when h(i)=(L-1), then satisfy

hW(i)max=(ω+β)×(L-1)=(L-1) (8)h W (i) max =(ω+β)×(L-1)=(L-1) (8)

由公式(7)和(8)可以得出,该优化准则可以确保输出的灰度级始终保持在[0,L-1]范围内。对于源图像较暗部分,该优化准则可以使低灰度值增大;对于源图像较亮部分,该优化准则使得高灰度值变小。可有效地避免直方图的过度增强,很大程度的减少伪影的产生,并且确保在保持图像亮度的同时增强图像的对比度。直方图的加权前后的变化如图3所示。由图3中的图3b可以看出,低灰度值在加权均衡优化之后会得以恢复更多的信息内容。From formulas (7) and (8), it can be concluded that the optimization criterion can ensure that the output gray level is always kept in the range of [0, L-1]. For the darker part of the source image, the optimization criterion can increase the low gray value; for the brighter part of the source image, the optimization criterion makes the high gray value smaller. It can effectively avoid excessive enhancement of the histogram, reduce the generation of artifacts to a great extent, and ensure that the contrast of the image is enhanced while maintaining the brightness of the image. The changes before and after the weighting of the histogram are shown in FIG. 3 . It can be seen from Fig. 3b in Fig. 3 that the low gray value can recover more information content after the weighted equalization optimization.

本发明实施例将hW(i)归一化,得到hN(i),其中,直方图hN(i)可用公式(9)表示:The embodiment of the present invention normalizes h W (i) to obtain h N (i), wherein the histogram h N (i) can be represented by formula (9):

Figure BDA0002741071130000061
Figure BDA0002741071130000061

映射hN(i)中的非空强度等级,使hN(i)的直方图分布均匀,得到加权计算后的Vout(u,v)。Map the non-null intensity levels in hN (i) to make the histogram distribution of hN (i) uniform, and obtain the weighted Vout (u,v).

对加权优化后的直方图进行均衡化操作仍然可能会出现部分灰度值丢失现象,如图3所示,通过观察直方图的变化可以检测出丢失的灰度值,因此,需要将非空的灰度值重新映射到整个区间,以便获得具有均匀分布的直方图。The equalization operation of the weighted optimized histogram may still cause some loss of gray value. As shown in Figure 3, the lost gray value can be detected by observing the change of the histogram. Therefore, the non-empty gray value needs to be The grayscale values are remapped to the entire interval in order to obtain a histogram with a uniform distribution.

首先指定一个集合Ω来储存非空的灰度值。公式定义如下:First specify a set Ω to store non-empty grayscale values. The formula is defined as follows:

Ω={Ω(m)=hN(i)|hN(i)>0} (10)Ω={Ω(m)=h N (i)|h N (i)>0} (10)

其中,Ω(m)将存储直方图均衡后生成的非空灰度值的数目,且满足m=1,2,...,mmax。如果m≠0时,则需要将其重新映射到[0,L-1]。使用以下计算规则来确保最终的输出直方图可以均匀地覆盖在整个空间。该计算准则如下所示:Wherein, Ω(m) will store the number of non-null grayscale values generated after histogram equalization, and satisfy m=1, 2, . . . , m max . If m≠0, it needs to be remapped to [0,L-1]. Use the following calculation rules to ensure that the final output histogram covers the entire space evenly. The calculation guidelines are as follows:

Figure BDA0002741071130000062
Figure BDA0002741071130000062

直方图重新映射过程如图4所示,图4中清晰的显示直方图重新映射之前,直方图明显有分布不均匀现象,经重新映射之后,所有非空灰度值都均匀分布在[0,1]范围内。The histogram remapping process is shown in Figure 4. Figure 4 clearly shows that before the histogram remapping, the histogram is obviously unevenly distributed. After remapping, all non-empty gray values are evenly distributed in [0, 1] range.

另外,本发明实施例还对公式(7)中所涉及的权值参数ω和β给出了选取方案,通过黄金分割算法进行搜索和选取:选定初始搜索范围;选定亮度误差作为迭代的目标函数;通过目标函数进行迭代,以缩小初始搜索范围;通过缩小的初始搜索范围重复迭代操作,直至将初始搜索范围缩小至目标精度;计算出获得最优权值参数ω和β。In addition, the embodiment of the present invention also provides a selection scheme for the weight parameters ω and β involved in formula (7), and searches and selects through the golden section algorithm: select the initial search range; select the brightness error as the iterative Objective function; iterate through the objective function to narrow the initial search range; repeat the iterative operation through the narrowed initial search range until the initial search range is narrowed to the target accuracy; calculate and obtain the optimal weight parameters ω and β.

为了达到对比度增强和亮度保持的双重目的,首先需要定义一个目标函数J,如下所示:In order to achieve the dual purpose of contrast enhancement and brightness preservation, we first need to define an objective function J, as shown below:

Figure BDA0002741071130000071
Figure BDA0002741071130000071

Figure BDA0002741071130000072
Figure BDA0002741071130000072

其中

Figure BDA0002741071130000073
和Iin,m分别是增强图像和输入图像的平均亮度,H表示熵值;亮度误差作为目标函数的惩罚项,当存在亮度误差时,熵值将作为最小值输出,如果不存在亮度误差,则图像熵值将恢复为原始值;最后,需要满足条件是亮度误差应最小,目标函数J应最大化。此时的权值为最佳权重。in
Figure BDA0002741071130000073
and I in,m are the average brightness of the enhanced image and the input image, respectively, and H represents the entropy value; the brightness error is used as the penalty term of the objective function. When there is a brightness error, the entropy value will be output as the minimum value. If there is no brightness error, Then the image entropy value will be restored to the original value; finally, the conditions that need to be satisfied are that the brightness error should be minimized and the objective function J should be maximized. The weight at this time is the best weight.

当输入的源图像为Iin(u,v),输入图像的平均亮度值Iin,m时,使用公式(12)和公式(13),黄金分割算法搜索权值参数算法步骤的具体实施方式可如下:When the input source image is I in (u, v), and the average brightness value of the input image is I in, m , using formula (12) and formula (13), the golden section algorithm searches for the specific implementation of the weight parameter algorithm steps Can be as follows:

步骤S210,输入黄金分割点ρ=0.618,迭代初始值α1=eps,α2=1-eps;Step S210, input the golden section point ρ=0.618, and iterate the initial value α 1 =eps, α 2 =1-eps;

步骤S211,误差范围记为Δα=α12,并确定一个较小的精确度值τ,其中τ→ε=10-4Step S211, the error range is denoted as Δα=α 1 −α 2 , and a smaller accuracy value τ is determined, where τ→ε=10 −4 ;

步骤S212,计算α12所对应的目标函数J1,J2Step S212, calculating the objective functions J 1 , J 2 corresponding to α 1 , α 2 ;

步骤S213,当满足Δα>τ、J1>J2时,更新区间端点公式,设置α2=α1+ρ×Δα,并将J2记为目标函数;反之,更新区间端点公式,设置α1=α1+(1-ρ)×Δα,同时J1记为目标函数;Step S213, when Δα>τ and J 1 >J 2 are satisfied, update the interval endpoint formula, set α 21 +ρ×Δα, and record J 2 as the objective function; otherwise, update the interval endpoint formula, set α 11 +(1-ρ)×Δα, and J 1 is recorded as the objective function;

步骤S214,不断更新区间端点α12和目标函数J1,J2,重复实施步骤S213,直到满足Δα<τ时,结束搜索步骤;Step S214, continuously update interval endpoints α 1 , α 2 and objective functions J 1 , J 2 , repeat step S213, until Δα<τ is satisfied, end the search step;

步骤S215,返回并计算权值参数ω和β,其中,ω=0.5×(α12),β=1-ω。Step S215, return and calculate the weight parameters ω and β, where ω=0.5×(α 12 ), and β=1−ω.

进一步可选地,本发明实施例中V通道图像实施加权直方图均衡后,可以极大地改善图像的对比度和细节信息,但当图像再转换回RGB空间时,也可能会发生去饱和或色彩损失现象。通过步骤S114,可将S(u,v)图像对应的直方图的灰度值进行最大化拉伸,使S(u,v)图像对应的直方图分布均匀,得到增强后的Sout(u,v)图像。Further optionally, after the weighted histogram equalization is performed on the V-channel image in the embodiment of the present invention, the contrast and detail information of the image can be greatly improved, but when the image is converted back to the RGB space, desaturation or color loss may also occur. Phenomenon. Through step S114, the gray value of the histogram corresponding to the S(u,v) image can be maximized and stretched, so that the distribution of the histogram corresponding to the S(u,v) image is uniform, and the enhanced S out (u ,v) image.

在HSV空间中,其亮度和饱和度分别为等式(14)和等式(15):In HSV space, its brightness and saturation are equations (14) and (15), respectively:

V=max{R,G,B} (14)V=max{R,G,B} (14)

Figure BDA0002741071130000074
Figure BDA0002741071130000074

其中R,G和B是RGB的归一化值,当增强V通道图像时,图像像素强度会趋于L-1,因此存在V=max{R,G,B}=(L-1),公式改或者表示成如下形式:Where R, G and B are the normalized values of RGB, when the V channel image is enhanced, the image pixel intensity will tend to L-1, so there is V=max{R,G,B}=(L-1), The formula is modified or expressed as follows:

R(u,v)=(L-1),G(u,v)=(L-1),B(u,v)=(L-1)(16)R(u,v)=(L-1), G(u,v)=(L-1), B(u,v)=(L-1)(16)

根据等式(15),最小饱和度如下所示:According to equation (15), the minimum saturation is as follows:

Figure BDA0002741071130000081
Figure BDA0002741071130000081

其中,图像的饱和度越高,显示的颜色类型越多,为了显示更多的颜色信息,需要扩展饱和度信息至最大范围:Among them, the higher the saturation of the image, the more color types are displayed. In order to display more color information, the saturation information needs to be expanded to the maximum range:

Sout(u,v)=max{Sin(u,v)} (18)S out (u,v)=max{S in (u,v)} (18)

图像饱和度拉伸过程如图5所示。通过图5中的图5b显示,饱和度被拉伸之后,所对应的图像恢复了更多的细节信息。The image saturation stretching process is shown in Figure 5. Figure 5b in Figure 5 shows that after the saturation is stretched, the corresponding image recovers more detailed information.

最后,在步骤S115,可对得到的最终V通道增强图像Vout(u,v)和最终S通道增强图像Sout(u,v),还有原来的H(u,v)作HSV与RGB颜色空间逆变换得到最终的增强图像Iout(u,v),变换函数如公式(19)所示:Finally, in step S115, the obtained final V channel enhanced image V out (u, v) and the final S channel enhanced image S out (u, v), as well as the original H (u, v) can be processed as HSV and RGB The final enhanced image I out (u, v) is obtained by inverse color space transformation, and the transformation function is shown in formula (19):

Figure BDA0002741071130000082
Figure BDA0002741071130000082

最后得到的增强图像Iout(u,v)为:The final enhanced image I out (u, v) is:

Iout(u,v)={Rout(u,v),Gout(u,v),Bout(u,v)} (20)I out (u,v)={R out (u,v),G out (u,v),B out (u,v)} (20)

在仿真实验中,将本发明实施例所提出的方法与传统直方图均衡化方法(HE)、限制对比度的自适应均衡化方法(CLAHE)、平均直方图均衡方法(AvHeq)以及直方图最大覆盖方法(MaxCover)进行效果对比,请一并参照图6-图13。In the simulation experiments, the method proposed in the embodiment of the present invention is compared with the traditional histogram equalization method (HE), the contrast-limited adaptive equalization method (CLAHE), the average histogram equalization method (AvHeq) and the maximum coverage of the histogram. Method (MaxCover) to compare the effect, please refer to Figure 6-Figure 13 together.

图6和图7是名为“earth”的场景图的增强结果比较图和对应的直方图对照参考图。其中图6a、图7a分别是源图像和对应的直方图。图6b和7b分别是采用传统HE方法得到的增强结果和所对应的直方图结果。图6c和7c是分别是采样CLAHE方法得到的增强结果和所对应的直方图结果。图6d和7d分别是采用AvHeq方法得到的增强结果和所对应的直方图结果。图6e和7e分别是采用MaxCover方法得到的增强结果和所对应的直方图结果。图6f和7f分别是采用本发明方法得到的增强结果和所对应的直方图结果。FIG. 6 and FIG. 7 are a comparison graph of the enhancement result of the scene graph named "earth" and the corresponding histogram comparison reference graph. Figure 6a and Figure 7a are the source image and the corresponding histogram, respectively. Figures 6b and 7b are the enhancement results and the corresponding histogram results obtained by the traditional HE method, respectively. Figures 6c and 7c are the enhancement results and the corresponding histogram results obtained by the sampling CLAHE method, respectively. Figures 6d and 7d are the enhancement results and the corresponding histogram results obtained by the AvHeq method, respectively. Figures 6e and 7e are the enhancement results and the corresponding histogram results obtained by the MaxCover method, respectively. Figures 6f and 7f are the enhancement results and the corresponding histogram results obtained by the method of the present invention, respectively.

从图6b、图6c、图6d和6e可以看到四种方法都能够改善图像质量。虽然图6b和图6c中源图像整体的对比度有所提升且岩石内部的纹理也显现了出来,但是这两种方法所对应的直方图7b和图7c中显示,源图像的直方图形状并未被有效地保留。图6d中显示图像的部分细节颜色信息并未被有效地恢复。图6e和7e中显示图像细节信息丢失严重且整体效果模糊,以及所对应的直方图结果并未均匀分布至整个区间。图6f和7f是采用本发明方法所得的结果,结果显示源图像的纹理细节信息显示得更加清晰。另外,直方图结果也更好。可见本发明实施例提供的方法可以更好的提高图像对比度,并有效地恢复源图像的颜色信息。It can be seen from Figure 6b, Figure 6c, Figure 6d and Figure 6e that all four methods can improve the image quality. Although the overall contrast of the source image in Figures 6b and 6c is improved and the texture inside the rock is also revealed, the histograms corresponding to these two methods in Figures 7b and 7c show that the shape of the histogram of the source image does not is effectively reserved. Part of the detailed color information of the image shown in Fig. 6d is not recovered efficiently. Figures 6e and 7e show that the image details are seriously lost and the overall effect is blurred, and the corresponding histogram results are not evenly distributed to the entire interval. Figures 6f and 7f are the results obtained by using the method of the present invention, and the results show that the texture detail information of the source image is displayed more clearly. Also, the histogram results are better. It can be seen that the method provided by the embodiment of the present invention can better improve the image contrast and effectively restore the color information of the source image.

图8和图9是本发明对于名为“road”的场景图的增强结果比较图和对应的直方图对照参考图。其中图8a、图9a分别是源图像和源图像对应的直方图。图8b和图9b分别是采用传统HE方法得到的增强结果和其所对应的直方图结果。图8c和图9c是分别是采样CLAHE方法得到的增强结果和所对应的直方图结果。图8d和图9d分别是采用AvHeq方法得到的增强结果和所对应的直方图结果。图8e和图9e分别是采用MaxCover方法得到的增强结果和所对应的直方图结果。图8f和图9f分别是采用本发明方法得到的增强结果和所对应的直方图结果。FIG. 8 and FIG. 9 are a comparison diagram of an enhancement result of the present invention for a scene graph named "road" and a corresponding histogram comparison reference diagram. 8a and 9a are the source image and the histogram corresponding to the source image, respectively. Figure 8b and Figure 9b are the enhancement results obtained by the traditional HE method and the corresponding histogram results, respectively. Figures 8c and 9c are the enhancement results and the corresponding histogram results obtained by the sampling CLAHE method, respectively. Figure 8d and Figure 9d are the enhancement results and the corresponding histogram results obtained by the AvHeq method, respectively. Figures 8e and 9e are the enhancement results and the corresponding histogram results obtained by using the MaxCover method, respectively. Fig. 8f and Fig. 9f are respectively the enhancement result obtained by the method of the present invention and the corresponding histogram result.

如图8b和8c所示,采用HE方法和CLAHE方法对于源图像去雾效果比较明显,但是颜色信息并未恢复。图8d、图8e、图9d和图9e显示采用AvgHe方法和MaxCover方法可以有效地保持源图像直方图形状,但是去雾效果和色彩信息恢复效果均不满意。而本发明实施例的结果如图8f所示,主观视觉效果最好,尤其是左右两边的房屋、汽车以及远处的树木颜色信息恢复效果明显,细节部分也得到了有效地增强。As shown in Figures 8b and 8c, the HE method and the CLAHE method have obvious dehazing effect on the source image, but the color information is not restored. Figure 8d, Figure 8e, Figure 9d, and Figure 9e show that the AvgHe method and the MaxCover method can effectively preserve the shape of the source image histogram, but the dehazing effect and color information recovery effect are not satisfactory. The result of the embodiment of the present invention is shown in Fig. 8f, the subjective visual effect is the best, especially the color information of the houses, cars on the left and right sides, and the trees in the distance are restored obviously, and the details are also effectively enhanced.

图10和图11是本发明对于名为“126007”的场景图的增强结果比较图和对应的直方图对照参考图。其中图10a、图11a分别是源图像和对应的直方图。图10b和图11b分别是采用传统HE方法得到的增强结果和所对应的直方图结果。图10c和图11c是分别是采样CLAHE方法得到的增强结果和所对应的直方图结果。图10d和图11d分别是采用AvHeq方法得到的增强结果和所对应的直方图结果。图10e和图11e分别是采用MaxCover方法得到的增强结果和所对应的直方图结果。图10f和图11f分别是采用本发明方法得到的增强结果和所对应的直方图结果。FIG. 10 and FIG. 11 are the comparison diagrams of the enhancement results of the present invention for the scene graph named "126007" and the corresponding histogram comparison reference diagrams. Figure 10a and Figure 11a are the source image and the corresponding histogram, respectively. Figure 10b and Figure 11b are the enhancement results and the corresponding histogram results obtained by the traditional HE method, respectively. Figure 10c and Figure 11c are the enhancement results and the corresponding histogram results obtained by the sampling CLAHE method, respectively. Figure 10d and Figure 11d are the enhancement results and the corresponding histogram results obtained by the AvHeq method, respectively. Figures 10e and 11e are the enhancement results and the corresponding histogram results obtained by using the MaxCover method, respectively. FIG. 10f and FIG. 11f are the enhancement results and the corresponding histogram results obtained by the method of the present invention, respectively.

图10b和10c,采用HE方法和CLAHE方法对于源图像的部分天空颜色有失真现象;图10d、图10e显示采用AvgHe方法和MaxCover方法对于源图像并未获得满意的亮度保持效果,图像整体对比度依然偏暗;而本发明实施例的结果如图10f所示,对于源图像并未出现颜色失真现象,在保持亮度的同时对比度得到很大的改善。Figures 10b and 10c, the HE method and the CLAHE method are used to distort part of the sky color of the source image; Figures 10d and 10e show that the AvgHe method and the MaxCover method do not obtain satisfactory brightness preservation effect for the source image, and the overall contrast of the image is still However, the result of the embodiment of the present invention is shown in Fig. 10f, no color distortion occurs in the source image, and the contrast is greatly improved while maintaining the brightness.

图12和图13是本发明对于名为“5096”的场景图的增强结果比较图和对应的直方图对照参考图。其中图12a、图13a分别是源图像和对应的直方图。图12b和图13b分别是采用传统HE方法得到的增强结果和所对应的直方图结果。图12c和图13c是分别是采样CLAHE方法得到的增强结果和所对应的直方图结果。图12d和图13d分别是采用AvHeq方法得到的增强结果和所对应的直方图结果。图12e和图13e分别是采用MaxCover方法得到的增强结果和所对应的直方图结果。图12f和图13f分别是采用本发明方法得到的增强结果和所对应的直方图结果。FIG. 12 and FIG. 13 are a comparison diagram of the enhancement result of the present invention for a scene graph named "5096" and a corresponding histogram comparison reference diagram. Figure 12a and Figure 13a are the source image and the corresponding histogram, respectively. Figure 12b and Figure 13b are the enhancement results and the corresponding histogram results obtained by the traditional HE method, respectively. Figure 12c and Figure 13c are the enhancement results and the corresponding histogram results obtained by the sampling CLAHE method, respectively. Figure 12d and Figure 13d are the enhancement results and the corresponding histogram results obtained by the AvHeq method, respectively. Figure 12e and Figure 13e are the enhancement results and the corresponding histogram results obtained by using the MaxCover method, respectively. Fig. 12f and Fig. 13f are respectively the enhancement result and the corresponding histogram result obtained by the method of the present invention.

图12b和图12c,采用HE方法和CLAHE方法对于源图像部分地面出现过增强现象,且天空颜色出现失真。图12d、图12e显示采用AvgHe方法和MaxCover方法对于源图像细节信息恢复具有良好效果。而本发明实施例的结果如图12f所示,对于源图像的墙壁、砖块和天空色彩信息色彩还原效果较为满意,整体的亮度信息也得到了良好的提高。As shown in Figure 12b and Figure 12c, the HE method and the CLAHE method are used to enhance the ground part of the source image, and the sky color is distorted. Figures 12d and 12e show that the AvgHe method and the MaxCover method have a good effect on the restoration of source image detail information. However, the result of the embodiment of the present invention is shown in Fig. 12f, the color restoration effect of the wall, brick and sky color information of the source image is satisfactory, and the overall brightness information is also well improved.

图像增强结果的评价分为主观评价和客观评价,主观评价通过视觉系统直接观察实验结果图像的亮度信息、对比度信息和色彩信息的增强效果。客观评价就是利用图像统计参数进行判定。本发明试验结果可采用熵值、图像清晰度(Tenengrad梯度)和平均梯度指标作为客观平价数据内容。The evaluation of image enhancement results is divided into subjective evaluation and objective evaluation. The subjective evaluation directly observes the enhancement effect of the brightness information, contrast information and color information of the experimental result image through the visual system. Objective evaluation is to use image statistical parameters to make judgments. The test results of the present invention can adopt entropy value, image clarity (Tenengrad gradient) and average gradient index as objective parity data content.

图像熵值可以表征图像信息量。熵值越大,表示保留的细节信息越丰富。公式(13)可以作为熵值测试依据。The image entropy value can characterize the amount of image information. The larger the entropy value, the richer the retained detail information. Formula (13) can be used as the test basis for entropy value.

图像清晰度反映图像的整体视觉效果,较高的清晰度测试结果表示图像的主观视觉质量更好。可通过公式(21)表示:Image sharpness reflects the overall visual effect of the image, and higher sharpness test results indicate better subjective visual quality of the image. It can be expressed by formula (21):

Figure BDA0002741071130000101
Figure BDA0002741071130000101

Figure BDA0002741071130000102
Figure BDA0002741071130000102

其中,T为阈值,Δmx(u,v)和Δnx(u,v)分别是像素(u,v)水平方向和垂直方向上像素之间的差异。where T is the threshold, and Δm x (u,v) and Δnx( u ,v) are the differences between the pixels in the horizontal and vertical directions of the pixel (u,v), respectively.

平均梯度描述图像细节的丰富度,较高的平均梯度测试结果表明图像的细节越丰富。可通过公式(23)表示:The average gradient describes the richness of image details, and a higher average gradient test result indicates the richer the image details. It can be expressed by formula (23):

Figure BDA0002741071130000103
Figure BDA0002741071130000103

其中f(u,v)像素的灰度级,

Figure BDA0002741071130000104
Figure BDA0002741071130000105
表示行和列中的可变像素数量。四组增强实验的熵值、清晰度和平均梯度客观数据结果如表格1所示:where f(u,v) is the gray level of the pixel,
Figure BDA0002741071130000104
and
Figure BDA0002741071130000105
Represents a variable number of pixels in rows and columns. The objective data results of entropy, sharpness and average gradient of the four groups of enhancement experiments are shown in Table 1:

Figure BDA0002741071130000111
Figure BDA0002741071130000111

表格1 不同算法的客观评价指标数据Table 1 Objective evaluation index data of different algorithms

由表格1中的数据可以得到,在四组图像增强结果参数对比中,采用本发明实施例方法所得的清晰度数据和平均梯度数据结果均是最大的,表示增强效果是最佳的。图6、图8和图12的熵值数据结果较其他增强算法也取得了最大数据结果。虽然图10的AvHeq算法的熵值测试结果为7.7242,比本发明所提方法的要高一些,但是已经定性的表明,本发明实施例所提方法在视觉感知效果方面比AvHeq算法性能更高,综合效果更好,对于图像的亮度保持和颜色信息恢复方面相比于其他方案能够获得更佳的结果。It can be obtained from the data in Table 1 that in the comparison of the four groups of image enhancement result parameters, the results of the sharpness data and the average gradient data obtained by the method of the embodiment of the present invention are both the largest, indicating that the enhancement effect is the best. The entropy data results of Figure 6, Figure 8 and Figure 12 also achieve the largest data results compared to other enhancement algorithms. Although the entropy value test result of the AvHeq algorithm in FIG. 10 is 7.7242, which is higher than that of the method proposed in the present invention, it has been qualitatively shown that the method proposed in the embodiment of the present invention has higher performance than the AvHeq algorithm in terms of visual perception effect, The comprehensive effect is better, and better results can be obtained compared with other schemes in terms of image brightness preservation and color information recovery.

本发明实施例将源图像先进行R、G和B通道颜色幅度拉伸,再基于HSV空间调整V通道图像和S通道图像,使V通道图像直方图均衡化和S通道图像灰度值最大化拉伸,再将调整后的图像逆变换至RGB空间,得到增强后的图像,本发明实施例提供的方法克服了传统直方图均衡化算法带来的“过增强”现象,计算过程简明、复杂度低,并能够有效地改善图像的对比度和亮度信息,获得了高对比度和高色彩亮度的增强图像。In the embodiment of the present invention, the R, G, and B channel color amplitudes of the source image are first stretched, and then the V channel image and the S channel image are adjusted based on the HSV space, so as to equalize the histogram of the V channel image and maximize the gray value of the S channel image. stretch, and then inversely transform the adjusted image into RGB space to obtain an enhanced image. The method provided by the embodiment of the present invention overcomes the “over-enhancement” phenomenon caused by the traditional histogram equalization algorithm, and the calculation process is concise and complicated. It can effectively improve the contrast and brightness information of the image, and obtain an enhanced image with high contrast and high color brightness.

请参照图14,本发明实施例还提供一种图像增强装置,可用于实施图1、图2所示的方法,具体的,本发明实施例提供的图像增强装置包括:Referring to FIG. 14 , an embodiment of the present invention further provides an image enhancement apparatus, which can be used to implement the methods shown in FIG. 1 and FIG. 2 . Specifically, the image enhancement apparatus provided by the embodiment of the present invention includes:

获取单元11,用于获取源图像Iin(u,v),Iin(u,v)={Rin(u,v),Gin(u,v),Bin(u,v)},;具体实施方式可参考前述步骤S110;Obtaining unit 11, for obtaining the source image I in (u, v), I in (u, v)={R in (u, v), G in (u, v), B in (u, v)} ,; the specific implementation can refer to the aforementioned step S110;

RGB拉伸单元12,用于拉伸Iin(u,v)的R、G和B通道颜色幅度,得到颜色幅度拉伸后的图像Istre(u,v),Istre(u,v)={Rstre(u,v),Gstre(u,v),Bstre(u,v)};具体实施方式可参考前述步骤S111;The RGB stretching unit 12 is used to stretch the color amplitudes of the R, G and B channels of I in (u, v) to obtain the image I stre (u, v) after the color amplitude is stretched, I stre (u, v) ={R stre (u, v), G stre (u, v), B stre (u, v)}; for the specific implementation, refer to the aforementioned step S111;

转换单元13,用于转换Istre(u,v)的颜色空间,使Istre(u,v)从RGB空间转换至HSV空间,得到色调分量H(u,v)、亮度分量V(u,v)和饱和度分量S(u,v);具体实施方式可参考前述步骤S112;The conversion unit 13 is used to convert the color space of I stre (u, v), so that I stre (u, v) is converted from the RGB space to the HSV space to obtain the hue component H(u, v), the luminance component V(u, v) and the saturation component S(u, v); the specific implementation can refer to the aforementioned step S112;

计算单元14,用于加权计算V(u,v),得到新的V通道图像Vout(u,v);具体实施方式可参考前述步骤S113;The calculation unit 14 is used for weighted calculation V(u, v) to obtain a new V channel image V out (u, v); for a specific implementation, refer to the aforementioned step S113;

饱和度分量拉伸单元15,用于拉伸S(u,v),得到拉伸后的S通道图像Sout(u,v);具体实施方式可参考前述步骤S114;The saturation component stretching unit 15 is used to stretch S(u, v) to obtain the stretched S channel image S out (u, v); for the specific implementation, refer to the aforementioned step S114;

逆变换单元16,用于逆变换H(u,v)、Vout(u,v)和Sout(u,v)至RGB空间,得到图像增强后的图像Iout(u,v),Iout(u,v)={Rout(u,v),Gout(u,v),Bout(u,v)};具体实施方式可参考前述步骤S115。The inverse transform unit 16 is used for inversely transforming H(u,v), Vout (u,v) and Sout (u,v) to RGB space to obtain an enhanced image Iout (u,v), I out (u, v)={R out (u, v), G out (u, v), B out (u, v)}; the specific implementation can refer to the aforementioned step S115.

进一步可选地,如附图15所示,本发明实施例提供的RGB拉伸单元12可包括R计算单元121、R选取单元122、R拉伸单元123,用于具体实施拉伸R通道颜色幅度:Further optionally, as shown in FIG. 15 , the RGB stretching unit 12 provided by the embodiment of the present invention may include an R calculation unit 121 , an R selection unit 122 , and an R stretching unit 123 , which are used to specifically stretch the color of the R channel. Amplitude:

R计算单元121,用于计算Iin(u,v)的R通道颜色幅度取值范围;R calculation unit 121, for calculating the R channel color amplitude value range of I in (u, v);

R选取单元122,用于选取计算出的R通道颜色幅度取值范围中的最高值;R selection unit 122, for selecting the highest value in the calculated R channel color amplitude value range;

R拉伸单元123,用于拉伸R通道颜色幅度至R通道颜色幅度取值范围中的最高值,得到Rstre(u,v);The R stretching unit 123 is used to stretch the color amplitude of the R channel to the highest value in the range of the color amplitude of the R channel to obtain R stre (u, v);

进一步可选地,如附图16所示,本发明实施例提供的RGB拉伸单元12可包括G计算单元124、G选取单元125、G拉伸单元126,用于具体实施拉伸G通道颜色幅度:Further optionally, as shown in FIG. 16 , the RGB stretching unit 12 provided in the embodiment of the present invention may include a G calculation unit 124, a G selection unit 125, and a G stretching unit 126, which are used to specifically implement the stretching of the G channel color. Amplitude:

G计算单元124,用于计算Iin(u,v)的G通道颜色幅度取值范围;The G calculation unit 124 is used to calculate the G channel color amplitude value range of I in (u, v);

G选取单元125,用于选取计算出的G通道颜色幅度取值范围中的最高值;G selection unit 125 is used to select the highest value in the calculated G channel color amplitude value range;

G拉伸单元126,用于拉伸G通道颜色幅度至G通道颜色幅度取值范围中的最高值,得到Gstre(u,v);The G stretching unit 126 is used to stretch the color amplitude of the G channel to the highest value in the range of the color amplitude of the G channel to obtain G stre (u, v);

进一步可选地,如附图17所示,本发明实施例提供的RGB拉伸单元12可包括B计算单元127、B选取单元128、B拉伸单元129,用于具体实施拉伸B通道颜色幅度:Further optionally, as shown in FIG. 17 , the RGB stretching unit 12 provided by the embodiment of the present invention may include a B calculation unit 127 , a B selection unit 128 , and a B stretching unit 129 for specifically implementing the stretching of the B channel color. Amplitude:

B计算单元127,用于计算Iin(u,v)的B通道颜色幅度取值范围;B calculation unit 127, for calculating the B channel color amplitude value range of I in (u, v);

B选取单元128,用于选取计算出的B通道颜色幅度取值范围中的最高值;B selection unit 128 is used to select the highest value in the calculated B channel color amplitude value range;

B拉伸单元129,用于拉伸B通道颜色幅度至B通道颜色幅度取值范围中的最高值,得到Bstre(u,v)。The B stretching unit 129 is used to stretch the color amplitude of the B channel to the highest value in the value range of the color amplitude of the B channel to obtain B stre (u, v).

进一步可选地,如附图18所示,本发明实施例提供的计算单元14可包括加权计算单元141、归一化单元142、映射单元143,用于实施加权均衡计算:Further optionally, as shown in FIG. 18 , the calculation unit 14 provided in this embodiment of the present invention may include a weighted calculation unit 141, a normalization unit 142, and a mapping unit 143 for implementing weighted equalization calculation:

加权计算单元141,用于将V(u,v)对应直方图h(i)的灰度值进行加权计算,得到加权后的直方图hW(i),hW(i)=β×h(i)+ω×max{(h(i))},0<ω<1,ω+β=1,max{h(i)}为最大灰度值;The weighted calculation unit 141 is configured to perform weighted calculation on the gray value of V(u, v) corresponding to the histogram h(i) to obtain the weighted histogram hW (i), hW (i)=β×h (i)+ω×max{(h(i))}, 0<ω<1, ω+β=1, max{h(i)} is the maximum gray value;

归一化单元142,用于将hW(i)归一化,得到hN(i),其中,The normalization unit 142 is used to normalize h W (i) to obtain h N (i), wherein,

Figure BDA0002741071130000131
Figure BDA0002741071130000131

映射单元143,用于映射hN(i)中的非空强度等级,使hN(i)的直方图分布均匀,得到加权计算后的Vout(u,v)。The mapping unit 143 is configured to map the non-null intensity levels in h N (i), so that the histogram distribution of h N (i) is uniform, and the weighted V out (u, v) is obtained.

进一步可选地,如附图19所示,本发明实施例提供的加权计算单元141还可包括选定单元1411、迭代与缩小单元1412、最优权值参数计算单元1413,用于实施最优权值参数ω和β的选取:Further optionally, as shown in FIG. 19 , the weighting calculation unit 141 provided in this embodiment of the present invention may further include a selection unit 1411 , an iteration and reduction unit 1412 , and an optimal weight parameter calculation unit 1413 , for implementing the optimal Selection of weight parameters ω and β:

选定单元1411,用于选定初始搜索范围;还用于选定亮度误差作为迭代的目标函数;The selection unit 1411 is used to select the initial search range; it is also used to select the luminance error as the iterative objective function;

迭代与缩小单元1412,用于通过目标函数进行迭代,以缩小初始搜索范围;还用于通过缩小的初始搜索范围重复迭代操作,直至将初始搜索范围缩小至目标精度;The iteration and narrowing unit 1412 is used to iterate through the objective function to narrow the initial search range; and is also used to repeat the iterative operation through the narrowed initial search range until the initial search range is narrowed to the target precision;

最优权值参数计算单元1413,用于计算出获得最优权值参数ω和β。The optimal weight parameter calculation unit 1413 is configured to calculate and obtain the optimal weight parameters ω and β.

本发明实施例的饱和度分量拉伸单元15具体可用于将S(u,v)图像对应的直方图的强度等级进行灰度值最大化拉伸,使S(u,v)图像对应的直方图分布均匀,得到增强后的Sout(u,v)图像。具体实施方式可参照前述步骤,在此不做赘述。The saturation component stretching unit 15 in the embodiment of the present invention can be specifically used to maximize the gray value of the intensity level of the histogram corresponding to the S(u,v) image, so that the histogram corresponding to the S(u,v) image can be stretched to the maximum extent. The image distribution is uniform, and the enhanced S out (u, v) image is obtained. For a specific implementation manner, reference may be made to the foregoing steps, which will not be repeated here.

本发明实施例的图像增强装置将源图像先进行R、G和B通道颜色幅度拉伸,再基于HSV空间调整V通道图像和S通道图像,使V通道图像直方图均衡化和S通道图像灰度值最大化拉伸,再将调整后的图像逆变换至RGB空间,得到增强后的图像,本发明实施例提供的图像增强装置克服了传统直方图均衡化算法带来的“过增强”现象,计算过程简明、复杂度低,并能够有效地改善图像的对比度和亮度信息,获得了高对比度和高色彩亮度的增强图像。The image enhancement device of the embodiment of the present invention firstly stretches the color amplitude of R, G and B channels of the source image, and then adjusts the V channel image and the S channel image based on the HSV space, so that the histogram of the V channel image is equalized and the S channel image is grayed out. The degree value is maximized and stretched, and then the adjusted image is inversely transformed into RGB space to obtain an enhanced image. The image enhancement device provided by the embodiment of the present invention overcomes the "over-enhancement" phenomenon caused by the traditional histogram equalization algorithm. , the calculation process is simple, the complexity is low, and the contrast and brightness information of the image can be effectively improved, and an enhanced image with high contrast and high color brightness is obtained.

本发明实施例中所述模块或单元,可以通过通用集成电路,例如CPU(CentralProcessing Unit,中央处理器),或通过ASIC(Application Specific IntegratedCircuit,专用集成电路)来实现。The modules or units in the embodiments of the present invention may be implemented by a general-purpose integrated circuit, such as a CPU (Central Processing Unit, central processing unit), or an ASIC (Application Specific Integrated Circuit, an application-specific integrated circuit).

本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机程序来指令相关的硬件来完成,所述的程序可存储于一计算机可读取存储介质中,该程序在执行时,可包括如上述各方法的实施例的流程。其中,所述的存储介质可为磁碟、光盘、只读存储记忆体(Read-Only Memory,ROM)或随机存储记忆体(Random AccessMemory,RAM)等。Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be implemented by instructing relevant hardware through a computer program, and the program can be stored in a computer-readable storage medium. During execution, the processes of the embodiments of the above-mentioned methods may be included. The storage medium may be a magnetic disk, an optical disk, a read-only memory (Read-Only Memory, ROM), or a random access memory (Random Access Memory, RAM) or the like.

本发明实施例方法中的步骤可以根据实际需要进行顺序调整、合并和删减。The steps in the method of the embodiment of the present invention may be adjusted, combined and deleted in sequence according to actual needs.

本发明实施例装置中的模块或单元可以根据实际需要进行合并、划分和删减。The modules or units in the apparatus of the embodiment of the present invention may be combined, divided, and deleted according to actual needs.

以上所揭露的仅为本发明较佳实施例而已,当然不能以此来限定本发明之权利范围,本领域普通技术人员可以理解实现上述实施例的全部或部分流程,并依本发明权利要求所作的等同变化,仍属于发明所涵盖的范围。What is disclosed above is only the preferred embodiment of the present invention, of course, it cannot limit the scope of the right of the present invention. Those of ordinary skill in the art can understand that all or part of the process of realizing the above-mentioned embodiment can be made according to the claims of the present invention. The equivalent changes of the invention still belong to the scope covered by the invention.

Claims (10)

1.一种图像增强方法,其特征在于,所述方法包括:1. an image enhancement method, is characterized in that, described method comprises: 获取源图像Iin(u,v),所述Iin(u,v)={Rin(u,v),Gin(u,v),Bin(u,v)};Obtain the source image I in (u, v), the I in (u, v)={R in (u, v), G in (u, v), B in (u, v)}; 拉伸所述Iin(u,v)的R、G和B通道颜色幅度,得到颜色幅度拉伸后的图像Istre(u,v),所述Istre(u,v)={Rstre(u,v),Gstre(u,v),Bstre(u,v)};Stretch the R, G, and B channel color amplitudes of the I in (u, v) to obtain an image I stre (u, v) after the color amplitude is stretched, the I stre (u, v)={R stre (u,v),G stre (u,v),B stre (u,v)}; 转换所述Istre(u,v)的颜色空间,使所述Istre(u,v)从RGB空间转换至HSV空间,得到色调分量H(u,v)、亮度分量V(u,v)和饱和度分量S(u,v);Convert the color space of the I stre (u, v) to convert the I stre (u, v) from the RGB space to the HSV space to obtain the hue component H(u, v) and the luminance component V(u, v) and the saturation component S(u,v); 加权计算所述V(u,v),得到新的V通道图像Vout(u,v);Weighted calculation of the V(u, v) to obtain a new V channel image V out (u, v); 拉伸所述S(u,v),得到拉伸后的S通道图像Sout(u,v);Stretch the S(u, v) to obtain the stretched S channel image S out (u, v); 逆变换所述H(u,v)、所述Vout(u,v)和所述Sout(u,v)至RGB空间,得到图像增强后的图像Iout(u,v),所述Iout(u,v)={Rout(u,v),Gout(u,v),Bout(u,v)}。Inversely transform the H(u,v), the Vout (u,v) and the Sout (u,v) to the RGB space to obtain an image enhanced image Iout (u,v), the Iout (u,v)={ Rout (u,v), Gout (u,v), Bout (u,v)}. 2.如权利要求1所述的方法,其特征在于,所述拉伸所述Iin(u,v)的R、G和B通道颜色幅度,具体包括:2. The method according to claim 1, wherein the R, G and B channel color amplitudes of the stretched I in (u, v) specifically include: 计算所述Iin(u,v)的R通道颜色幅度取值范围;Calculate the R channel color amplitude value range of described I in (u, v); 选取计算出的所述R通道颜色幅度取值范围中的最高值;Select the highest value in the calculated R channel color amplitude value range; 拉伸所述R通道颜色幅度至所述R通道颜色幅度取值范围中的最高值,得到所述Rstre(u,v);Stretch the R channel color amplitude to the highest value in the R channel color amplitude value range to obtain the R stre (u, v); 计算所述Iin(u,v)的G通道颜色幅度取值范围;Calculate the range of values of the G channel color amplitude of the I in (u, v); 选取计算出的所述G通道颜色幅度取值范围中的最高值;Select the highest value in the calculated G channel color amplitude value range; 拉伸所述G通道颜色幅度至所述G通道颜色幅度取值范围中的最高值,得到所述Gstre(u,v);Stretch the G channel color amplitude to the highest value in the G channel color amplitude value range to obtain the G stre (u, v); 计算所述Iin(u,v)的B通道颜色幅度取值范围;Calculate the B channel color amplitude value range of the I in (u, v); 选取计算出的所述B通道颜色幅度取值范围中的最高值;Select the highest value in the calculated B channel color amplitude value range; 拉伸所述B通道颜色幅度至所述B通道颜色幅度取值范围中的最高值,得到所述Bstre(u,v)。The B channel color amplitude is stretched to the highest value in the value range of the B channel color amplitude to obtain the B stre (u, v). 3.如权利要求1所述的方法,其特征在于,所述加权计算所述V(u,v),得到新的V通道图像Vout(u,v),具体包括:3. The method of claim 1, wherein the weighted calculation V(u, v) obtains a new V channel image V out (u, v), specifically comprising: 将所述V(u,v)对应直方图h(i)的灰度值进行加权计算,得到加权后的直方图hW(i),所述hW(i)=β×h(i)+ω×max{(h(i))},0<ω<1,ω+β=1,所述max{h(i)}为最大灰度值;Perform weighted calculation on the gray value of the histogram h(i) corresponding to the V(u,v) to obtain the weighted histogram hW (i), the hW (i)=β×h(i) +ω×max{(h(i))}, 0<ω<1, ω+β=1, the max{h(i)} is the maximum gray value; 将所述hW(i)归一化,得到hN(i),其中,Normalize the hW (i) to obtain hN (i), where,
Figure FDA0002741071120000021
Figure FDA0002741071120000021
映射所述hN(i)中的非空强度等级,使所述hN(i)的直方图分布均匀,得到加权计算后的所述Vout(u,v)。The non-empty intensity levels in the h N (i) are mapped to make the histogram distribution of the h N (i) uniform, and the V out (u, v) after the weighting calculation is obtained.
4.如权利要求3所述的方法,其特征在于,所述将所述V(u,v)对应直方图h(i)的灰度值进行加权计算,得到加权后的直方图hW(i)之前,还包括:4. method as claimed in claim 3, is characterized in that, described by described V (u, v) the gray value of corresponding histogram h (i) is weighted and calculated, obtains weighted histogram h W ( i) before, also include: 选定初始搜索范围;Select the initial search scope; 选定亮度误差作为迭代的目标函数;Select the luminance error as the iterative objective function; 通过所述目标函数进行迭代,以缩小所述初始搜索范围;Iterating through the objective function to narrow the initial search range; 通过缩小的所述初始搜索范围重复所述迭代操作,直至将所述初始搜索范围缩小至目标精度;Repeating the iterative operation by reducing the initial search range until the initial search range is narrowed to a target precision; 计算出获得最优权值参数所述ω和所述β。The ω and the β are calculated to obtain the optimal weight parameters. 5.如权利要求1所述的方法,其特征在于,所述拉伸所述S(u,v),得到拉伸后的S通道图像Sout(u,v),具体包括:5. The method according to claim 1, wherein the stretching of the S(u, v) to obtain the stretched S channel image S out (u, v) specifically includes: 将所述S(u,v)图像对应的直方图的强度等级进行灰度值最大化拉伸,使所述S(u,v)图像对应的直方图分布均匀,得到增强后的所述Sout(u,v)图像。The intensity level of the histogram corresponding to the S(u,v) image is stretched to maximize the gray value, so that the distribution of the histogram corresponding to the S(u,v) image is uniform, and the enhanced S(u,v) image is obtained. out (u,v) image. 6.一种图像增强装置,其特征在于,所述装置包括:6. An image enhancement device, characterized in that the device comprises: 获取单元,用于获取源图像Iin(u,v),所述Iin(u,v)={Rin(u,v),Gin(u,v),Bin(u,v)};an acquisition unit for acquiring a source image I in (u, v), the I in (u, v)={R in (u, v), G in (u, v), B in (u, v) }; RGB拉伸单元,用于拉伸所述Iin(u,v)的R、G和B通道颜色幅度,得到颜色幅度拉伸后的图像Istre(u,v),所述Istre(u,v)={Rstre(u,v),Gstre(u,v),Bstre(u,v)};The RGB stretching unit is used to stretch the color amplitudes of the R, G and B channels of the I in (u, v) to obtain an image I stre (u, v) after the color amplitude is stretched, and the I stre (u, v) ,v)={R stre (u,v),G stre (u,v),B stre (u,v)}; 转换单元,用于转换所述Istre(u,v)的颜色空间,使所述Istre(u,v)从RGB空间转换至HSV空间,得到色调分量H(u,v)、亮度分量V(u,v)和饱和度分量S(u,v);A conversion unit, configured to convert the color space of the I stre (u, v), so that the I stre (u, v) is converted from the RGB space to the HSV space to obtain the hue component H(u, v), the luminance component V (u,v) and the saturation component S(u,v); 计算单元,用于加权计算所述V(u,v),得到新的V通道图像Vout(u,v);a calculation unit, used for weighted calculation of the V(u, v), to obtain a new V channel image V out (u, v); 饱和度分量拉伸单元,用于拉伸所述S(u,v),得到拉伸后的S通道图像Sout(u,v);a saturation component stretching unit, used to stretch the S(u, v) to obtain the stretched S channel image S out (u, v); 逆变换单元,用于逆变换所述H(u,v)、所述Vout(u,v)和所述Sout(u,v)至RGB空间,得到图像增强后的图像Iout(u,v),所述Iout(u,v)={Rout(u,v),Gout(u,v),Bout(u,v)}。an inverse transform unit for inversely transforming the H(u,v), the Vout (u,v) and the Sout (u,v) to the RGB space, to obtain an image enhanced image Iout (u , v), the I out (u, v)={R out (u, v), G out (u, v), B out (u, v)}. 7.如权利要求6所述装置,其特征在于,所述RGB拉伸单元包括:7. The device of claim 6, wherein the RGB stretching unit comprises: R计算单元,用于计算所述Iin(u,v)的R通道颜色幅度取值范围;R calculation unit, for calculating the R channel color amplitude value range of the I in (u, v); R选取单元,用于选取计算出的所述R通道颜色幅度取值范围中的最高值;R selection unit, for selecting the highest value in the calculated R channel color amplitude value range; R拉伸单元,用于拉伸所述R通道颜色幅度至所述R通道颜色幅度取值范围中的最高值,得到所述Rstre(u,v);The R stretching unit is used to stretch the color amplitude of the R channel to the highest value in the range of the color amplitude of the R channel to obtain the R stre (u, v); G计算单元,用于计算所述Iin(u,v)的G通道颜色幅度取值范围;G calculation unit, for calculating the G channel color amplitude value range of the I in (u, v); G选取单元,用于选取计算出的所述G通道颜色幅度取值范围中的最高值;G selection unit, for selecting the highest value in the calculated G channel color amplitude value range; G拉伸单元,用于拉伸所述G通道颜色幅度至所述G通道颜色幅度取值范围中的最高值,得到所述Gstre(u,v);G stretching unit, used for stretching the color amplitude of the G channel to the highest value in the value range of the color amplitude of the G channel, to obtain the G stre (u, v); B计算单元,用于计算所述Iin(u,v)的B通道颜色幅度取值范围;B calculation unit, for calculating the B channel color amplitude value range of the I in (u, v); B选取单元,用于选取计算出的所述B通道颜色幅度取值范围中的最高值;B selection unit, for selecting the highest value in the calculated B channel color amplitude value range; B拉伸单元,用于拉伸所述B通道颜色幅度至所述B通道颜色幅度取值范围中的最高值,得到所述Bstre(u,v)。The B stretching unit is used to stretch the color amplitude of the B channel to the highest value in the value range of the color amplitude of the B channel to obtain the B stre (u, v). 8.如权利要求6所述装置,其特征在于,所述计算单元包括:8. The apparatus of claim 6, wherein the computing unit comprises: 加权计算单元,用于将所述V(u,v)对应直方图h(i)的灰度值进行加权计算,得到加权后的直方图hW(i),所述hW(i)=β×h(i)+ω×max{(h(i))},0<ω<1,ω+β=1,所述max{h(i)}为最大灰度值;A weighted calculation unit, configured to perform weighted calculation on the gray value of the histogram h(i) corresponding to the V(u, v) to obtain the weighted histogram hW (i), where the hW (i)= β×h(i)+ω×max{(h(i))}, 0<ω<1, ω+β=1, the max{h(i)} is the maximum gray value; 归一化单元,用于将所述hW(i)归一化,得到hN(i),其中,A normalization unit for normalizing the hW (i) to obtain hN (i), where,
Figure FDA0002741071120000031
Figure FDA0002741071120000031
映射单元,用于映射所述hN(i)中的非空强度等级,使所述hN(i)的直方图分布均匀,得到加权计算后的所述Vout(u,v)。A mapping unit, configured to map the non-empty intensity levels in the h N (i), so that the histogram distribution of the h N (i) is uniform, and the weighted V out (u, v) is obtained.
9.如权利要求8所述装置,其特征在于,所述加权计算单元包括:9. The apparatus according to claim 8, wherein the weight calculation unit comprises: 选定单元,用于选定初始搜索范围;还用于选定亮度误差作为迭代的目标函数;迭代与缩小单元,用于通过所述目标函数进行迭代,以缩小所述初始搜索范围;还用于通过缩小的所述初始搜索范围重复所述迭代操作,直至将所述初始搜索范围缩小至目标精度;a selection unit for selecting an initial search range; also for selecting a luminance error as an iterative objective function; an iterative and narrowing unit for iterating through the objective function to narrow the initial search range; also using repeating the iterative operation through the narrowed initial search range until the initial search range is narrowed to the target precision; 最优权值参数计算单元,用于计算出获得最优权值参数所述ω和所述β。The optimal weight parameter calculation unit is configured to calculate the ω and the β to obtain the optimal weight parameter. 10.如权利要求6所述装置,其特征在于,所述饱和度分量拉伸单元具体是用于将所述S(u,v)图像对应的直方图的灰度值进行最大化拉伸,使所述S(u,v)图像对应的直方图分布均匀,得到增强后的所述Sout(u,v)图像。10 . The apparatus according to claim 6 , wherein the saturation component stretching unit is specifically configured to maximize the stretching of the gray value of the histogram corresponding to the S(u,v) image, 10 . The histogram corresponding to the S(u,v) image is uniformly distributed to obtain the enhanced S out (u,v) image.
CN202011150564.5A 2020-10-24 2020-10-24 Image enhancement method and image enhancement device Pending CN112053309A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011150564.5A CN112053309A (en) 2020-10-24 2020-10-24 Image enhancement method and image enhancement device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011150564.5A CN112053309A (en) 2020-10-24 2020-10-24 Image enhancement method and image enhancement device

Publications (1)

Publication Number Publication Date
CN112053309A true CN112053309A (en) 2020-12-08

Family

ID=73606600

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011150564.5A Pending CN112053309A (en) 2020-10-24 2020-10-24 Image enhancement method and image enhancement device

Country Status (1)

Country Link
CN (1) CN112053309A (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111163268A (en) * 2020-01-09 2020-05-15 腾讯科技(深圳)有限公司 Image processing method and device and computer storage medium
CN113888434A (en) * 2021-10-11 2022-01-04 复旦大学 Sand and dust image enhancement method
CN114494256A (en) * 2022-04-14 2022-05-13 武汉金龙电线电缆有限公司 Electric wire production defect detection method based on image processing
CN115205297A (en) * 2022-09-19 2022-10-18 汶上县金振机械制造有限公司 Abnormal state detection method for pneumatic winch
CN115222606A (en) * 2021-04-16 2022-10-21 腾讯科技(深圳)有限公司 Image processing method, image processing device, computer readable medium and electronic equipment
CN115953327A (en) * 2023-03-09 2023-04-11 极限人工智能有限公司 Image enhancement method and system, readable storage medium and electronic equipment
CN118212236A (en) * 2024-05-21 2024-06-18 山东新美达科技材料有限公司 Method for processing surface image of color-coated steel plate

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103886565A (en) * 2014-03-13 2014-06-25 北京工业大学 Nighttime color image enhancement method based on purpose optimization and histogram equalization
CN109447910A (en) * 2018-10-09 2019-03-08 湖南源信光电科技股份有限公司 A kind of low-luminance color image enchancing method based on fuzzy theory
CN110047051A (en) * 2019-04-24 2019-07-23 郑州轻工业学院 A kind of non-uniform lighting colour-image reinforcing method

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103886565A (en) * 2014-03-13 2014-06-25 北京工业大学 Nighttime color image enhancement method based on purpose optimization and histogram equalization
CN109447910A (en) * 2018-10-09 2019-03-08 湖南源信光电科技股份有限公司 A kind of low-luminance color image enchancing method based on fuzzy theory
CN110047051A (en) * 2019-04-24 2019-07-23 郑州轻工业学院 A kind of non-uniform lighting colour-image reinforcing method

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
S.C.F. LIN ET AL.: ""Image enhancement using the averaging histogram equalization (AVHEQ) approach for contrast improvement and brightness preservation"", 《COMPUTERS AND ELECTRICAL ENGINEERING》 *
刘言: ""图像清晰化算法研究与实现"", 《中国优秀博硕士学位论文全文数据库(硕士)信息科技辑》 *

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111163268A (en) * 2020-01-09 2020-05-15 腾讯科技(深圳)有限公司 Image processing method and device and computer storage medium
CN115222606A (en) * 2021-04-16 2022-10-21 腾讯科技(深圳)有限公司 Image processing method, image processing device, computer readable medium and electronic equipment
CN113888434A (en) * 2021-10-11 2022-01-04 复旦大学 Sand and dust image enhancement method
CN114494256A (en) * 2022-04-14 2022-05-13 武汉金龙电线电缆有限公司 Electric wire production defect detection method based on image processing
CN114494256B (en) * 2022-04-14 2022-06-14 武汉金龙电线电缆有限公司 Electric wire production defect detection method based on image processing
CN115205297A (en) * 2022-09-19 2022-10-18 汶上县金振机械制造有限公司 Abnormal state detection method for pneumatic winch
CN115953327A (en) * 2023-03-09 2023-04-11 极限人工智能有限公司 Image enhancement method and system, readable storage medium and electronic equipment
CN115953327B (en) * 2023-03-09 2023-09-12 极限人工智能有限公司 Image enhancement method, system, readable storage medium and electronic equipment
CN118212236A (en) * 2024-05-21 2024-06-18 山东新美达科技材料有限公司 Method for processing surface image of color-coated steel plate

Similar Documents

Publication Publication Date Title
CN112053309A (en) Image enhancement method and image enhancement device
CN103295194B (en) Brightness-controllable and detail-preserving tone mapping method
CN104700376B (en) Image histogram equalization Enhancement Method based on gamma correction and smothing filtering
US8594456B2 (en) Image denoising method
CN107527333A (en) A kind of rapid image Enhancement Method based on gamma transformation
CN112037144B (en) A low-light image enhancement method based on local contrast stretching
US8885965B2 (en) Image denoising method
CN110807742B (en) A low-light image enhancement method based on integrated network
CN111047543B (en) Image enhancement method, device and storage medium
CN111968041A (en) Self-adaptive image enhancement method
CN110648290A (en) A dual-core non-local mean image denoising method based on SURE parameter optimization
CN110189266B (en) Self-adaptive rapid image enhancement method
CN110298792B (en) Low-light image enhancement and denoising method, system and computer equipment
CN111105371B (en) Enhancement method of low-contrast infrared image
CN109982090B (en) Sampling rate self-adaptive block compression sensing method combining gray level entropy and blind deconvolution
CN104268843A (en) Image self-adaptation enhancing method based on histogram modification
CN110852955A (en) Image enhancement method based on image intensity threshold and adaptive cutting
CN107895350B (en) HDR image generation method based on self-adaptive double gamma transformation
CN112911166A (en) Method, device, chip, medium and camera equipment for adjusting image brightness
CN110809126A (en) Video frame interpolation method and system based on adaptive deformable convolution
CN114708157A (en) Image compression method, electronic device, and computer-readable storage medium
CN110232669A (en) A kind of tone mapping method and system of high dynamic range images
CN113129300A (en) Drainage pipeline defect detection method, device, equipment and medium for reducing false detection rate
US20130287299A1 (en) Image processing apparatus
CN112991240A (en) Image self-adaptive enhancement algorithm for real-time image enhancement

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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20201208