WO2020107308A1 - Low-light-level image rapid enhancement method and apparatus based on retinex - Google Patents

Low-light-level image rapid enhancement method and apparatus based on retinex Download PDF

Info

Publication number
WO2020107308A1
WO2020107308A1 PCT/CN2018/118097 CN2018118097W WO2020107308A1 WO 2020107308 A1 WO2020107308 A1 WO 2020107308A1 CN 2018118097 W CN2018118097 W CN 2018118097W WO 2020107308 A1 WO2020107308 A1 WO 2020107308A1
Authority
WO
WIPO (PCT)
Prior art keywords
retinex
image
low
pixel value
minimum pixel
Prior art date
Application number
PCT/CN2018/118097
Other languages
French (fr)
Chinese (zh)
Inventor
高峡
高月仁
李罡
杨海涛
康海凤
李海新
成景坤
耿华
史守帆
祁志雷
马桂泽
王鹏
谷明静
吕晓栓
Original Assignee
唐山曹妃甸联城科技有限公司
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 唐山曹妃甸联城科技有限公司 filed Critical 唐山曹妃甸联城科技有限公司
Priority to PCT/CN2018/118097 priority Critical patent/WO2020107308A1/en
Publication of WO2020107308A1 publication Critical patent/WO2020107308A1/en

Links

Images

Classifications

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

Abstract

Disclosed are a low-light-level image rapid enhancement method and apparatus based on Retinex, belonging to the technical field of image processing. The method comprises: selecting, from an original color image, the minimum value in three channels of R, G and B of each pixel point, so as to obtain a minimum pixel value image (S102); carrying out Retinex processing of a weighted Gaussian model on the minimum pixel value image to obtain a Retinex-processed image (S104); carrying out self-adaptive brightness adjustment on the Retinex-processed image, and calculating a difference image according to the Retinex-processed and brightness-adjusted image and the minimum pixel value image (S106); and respectively adding three channels of R, G and B of each pixel point of the original image to corresponding difference values of the difference image, so as to obtain an enhanced color image (S108).

Description

一种基于Retinex的微光图像快速增强方法及其装置Retinex-based low-light image rapid enhancement method and device 技术领域Technical field
本发明涉及图像处理技术领域,尤其涉及一种基于Retinex的微光图像快速增强方法和装置。The invention relates to the technical field of image processing, and in particular to a method and device for rapid enhancement of low-light images based on Retinex.
背景技术Background technique
图像增强是指利用各种数学方法和变换手段提高图像中感兴趣物体的对比度和清晰度,以满足特定应用的图像处理技术。现有的图像增强技术可分为空间统一方法和空间非统一方法两类。空间统一方法主要包括:对数压缩,伽玛校正,直方图均衡,基于人眼对比敏感度的方法,基于Retinex方法等。后一类方法较多,它们往往针对专门的应用而设计,因此算法效果好,但是计算复杂度一般较高。其中,最具代表性的就是基于Retinex的增强方法。Retinex对于输入图像的处理效果是一种模仿人类视觉系统的非线性处理,它可以改善图像的光照条件,锐化图像的细节,并且使输出图像的色彩或灰度分布自然地接近实际场景。在过去的几十年里有众多的研究人员提出了不同的实现方法,有单尺度Retinex算法和多尺度Retinex算法等。Image enhancement refers to the use of various mathematical methods and transformation methods to improve the contrast and clarity of objects of interest in an image to meet specific application image processing techniques. Existing image enhancement technologies can be divided into two types: spatial unified methods and spatial non-unified methods. The methods of spatial unification mainly include: logarithmic compression, gamma correction, histogram equalization, methods based on contrast sensitivity of human eyes, and methods based on Retinex. There are many methods in the latter category. They are often designed for specialized applications, so the algorithm works well, but the computational complexity is generally high. Among them, the most representative is the enhancement method based on Retinex. The processing effect of Retinex on the input image is a non-linear process that imitates the human visual system. It can improve the lighting conditions of the image, sharpen the details of the image, and make the color or grayscale distribution of the output image naturally close to the actual scene. In the past few decades, many researchers have proposed different implementation methods, including single-scale Retinex algorithm and multi-scale Retinex algorithm.
然而,尽管多尺度Retinex算法在实验中展现了它相对一般图像增强算法的优势,但由于其在多个尺度上分别做耗时的卷积运算,因此,计算量较大。However, although the multi-scale Retinex algorithm demonstrates its advantages over general image enhancement algorithms in experiments, due to its time-consuming convolution operations on multiple scales, the computational load is large.
发明内容Summary of the invention
有鉴于目前微光图像增强结果存在过亮、局部偏色现象且计算量大,本发明要解决的技术问题是提供一种基于Retinex的微光图像快速增强方法和装置,以防止图像出现过亮、偏色现象,且减少计算量,提高处理效率。In view of the fact that the current low-light image enhancement results have over-brightness, partial color cast and a large amount of calculation, the technical problem to be solved by the present invention is to provide a Retinex-based rapid enhancement method and device for low-light image to prevent the image from being too bright , Color cast phenomenon, and reduce the amount of calculation, improve processing efficiency.
本发明解决上述技术问题所采用的技术方案如下:The technical solutions adopted by the present invention to solve the above technical problems are as follows:
根据本发明的一个方面,提供的一种基于Retinex的微光图像快速增强方法包括:According to an aspect of the present invention, a method for rapidly enhancing a low-light image based on Retinex includes:
从原始图像选取每一个像素点的R、G、B三通道中的最小值,得到最小像素值图;Select the minimum value of the R, G, and B channels of each pixel from the original image to obtain the minimum pixel value map;
对最小像素值图进行加权高斯模型的Retinex处理,得到Retinex处理后的 图像;Perform Retinex processing of the weighted Gaussian model on the minimum pixel value map to obtain the Retinex processed image;
根据Retinex处理后的图像和最小像素值图计算差值图;Calculate the difference map based on the image processed by Retinex and the minimum pixel value map;
对原始图像的每个像素点R、G、B三通道分别与差值图对应的差值相加,得到增强后的彩色图像。The three channels R, G, and B of the original image are added to the difference corresponding to the difference map to obtain an enhanced color image.
优选地,对最小像素值图进行加权高斯模型的Retinex处理包括:Preferably, the Retinex processing of the weighted Gaussian model on the minimum pixel value map includes:
计算多个高斯模型加权后的加权高斯模型;Calculate the weighted Gaussian model after weighting multiple Gaussian models;
在最小像素值图上做基于加权高斯模型的Retinex处理。Do Retinex processing based on the weighted Gaussian model on the minimum pixel value map.
优选地,计算多个高斯模型加权后的加权高斯模型按下列公式进行:Preferably, calculating the weighted Gaussian model after weighting multiple Gaussian models is performed according to the following formula:
Figure PCTCN2018118097-appb-000001
Figure PCTCN2018118097-appb-000001
<mrow><mi>G</mi><mo>=</mo><munderover><mi>&Sigma;</mi><mrow><mi>k</mi><mo>=</mo><mn>1</mn></mrow><mi>N</mi></munderover><msub><mi>w</mi><mi>k</mi></msub><msub><mi>G</mi><mi>k</mi></msub></mrow><mrow><mi>G</mi><mo>=</mo><munderover><mi>&Sigma;</mi><mrow><mi>k</mi><mo>=</mo> <mn>1</mn></mrow><mi>N</mi></munderover><msub><mi>w</mi><mi>k</mi></msub><msub> <mi>G</mi><mi>k</mi></msub></mrow>
其中,G表示加权高斯模型,k=1…N,N表示高斯模板个数,wk表示对应第k个尺度的权重因子,Gk表示第k个高斯函数。Where G represents the weighted Gaussian model, k=1...N, N represents the number of Gaussian templates, wk represents the weighting factor corresponding to the kth scale, and Gk represents the kth Gaussian function.
优选地,在最小像素值图上做基于加权高斯模型的Retinex处理按以下公式进行:Preferably, the Retinex processing based on the weighted Gaussian model is performed on the minimum pixel value map according to the following formula:
I_retinex=exp(logI_min-log(G*I_min))I_retinex=exp(logI_min-log(G*I_min))
其中,I_Retinex表示处理后图像,*表示卷积操作,其中G是加权高斯模型,I_min表示像素的最小像素图。Among them, I_Retinex represents the processed image, * represents the convolution operation, where G is the weighted Gaussian model, and I_min represents the minimum pixel map of pixels.
优选地,上述方法还包括:对Retinex处理后的图像进行自适应亮度调整。Preferably, the above method further includes: performing adaptive brightness adjustment on the image processed by Retinex.
优选地,Retinex处理后的图像进行自适应亮度调整包括:Preferably, the adaptive brightness adjustment of the Retinex processed image includes:
(a)按以下公式确定亮度调整参数的取值:(a) Determine the value of the brightness adjustment parameter according to the following formula:
Figure PCTCN2018118097-appb-000002
Figure PCTCN2018118097-appb-000002
<mrow><mi>a</mi><mo>=</mo><mfenced open='{'close=”><mtable><mtr><mtd><msub><mi>a</mi><mrow><mi>low</mi><mn>1</mn></mrow></msub></mtd><mtd><mi>if</mi></mtd><mtd><mi>I</mi><mo>_</mo><mi>retinex</mi><mo>&GreaterEqual;</mo><mi>Thred</mi><mo>_</mo><mi>high</mi></mtd></mtr><mtr><mtd><msub><mi>a</mi><mrow><mi>low</mi><mn>2</mn></mrow></msub></mtd><mtd><mi>if</mi></mtd><mtd><mi>I</mi><mo>_</mo><mi>retinex</mi><mo>&lt;</mo><mi>Thred</mi><mo>_</mo><mi>low</mi></mtd></mtr></mtable></mfenced></mrow><mrow><mi>a</mi><mo>=</mo><mfenced opened='{'close=""<mtable><mtr><mtd><msub><mi>a</mi> <mrow><mi>low</mi><mn>1</mn></mrow></msub></mtd><mtd><mi>if</mi></mtd><mtd>< mi>I</mi><mo>_</mo><mi>retinex</mi><mo>&GreaterEqual;</mo><mi>Thred</mi><mo>_</mo><mi >high</mi></mtd></mtr><mtr><mtd><msub><mi>a</mi><mrow><mi>low</mi><mn>2</mn> </mrow></msub></mtd><mtd><mi>if</mi></mtd><mtd><mi>I</mi><mo>_</mo><mi>retinex </mi><mo>&lt;</mo><mi>Thred</mi><mo>_</mo><mi>low</mi></mtd></mtr></mtable>< /mfenced></mrow>
其中,a为亮度调整参数,Thred_high和Thred_low分别表示预设的高亮度阈值和低亮度阈值,alow1和alow2分别表示对应条件的亮度调整参数,I_Retinex表示Retinex处理后的图像。Among them, a is the brightness adjustment parameter, Thred_high and Thred_low respectively represent the preset high brightness threshold and low brightness threshold, alow1 and alow2 respectively represent the brightness adjustment parameters of the corresponding conditions, and I_Retinex represents the image after Retinex processing.
(b)根据亮度调整参数进行亮度调整具体包括以下步骤:(b) The brightness adjustment according to the brightness adjustment parameters specifically includes the following steps:
判断I_Retinex是否大于Thred_high,或是否小于Thred_low,如果是,则根据亮度调整参数a的取值按下述公式进行调整,否则不进行亮度调整。Determine whether I_Retinex is greater than Thred_high or less than Thred_low. If yes, adjust according to the value of the brightness adjustment parameter a according to the following formula, otherwise brightness adjustment is not performed.
Figure PCTCN2018118097-appb-000003
Figure PCTCN2018118097-appb-000003
<mrow><mi>I</mi><mo>_</mo><mi>correct</mi><mo>=</mo><mfrac><mn>2</mn><msup><mrow><mn>1</mn><mo>+</mo><mi>e</mi></mrow><mrow><mo>-</mo><mi>a</mi><mo>&CenterDot;</mo><mi>I</mi><mo>_</mo><mi>retinex</mi></mrow></msup></mfrac><mo>-</mo><mn>1</mn></mrow><mrow><mi>I</mi><mo>_</mo><mi>correct</mi><mo>=</mo><mfrac><mn>2</mn><msup>< mrow><mn>1</mn><mo>+</mo><mi>e</mi></mrow><mrow><mo>-</mo><mi>a</mi>< mo>&CenterDot;</mo><mi>I</mi><mo>_</mo><mi>retinex</mi></mrow></msup></mfrac><mo>-</ mo><mn>1</mn></mrow>
其中,I_Retinex表示Retinex处理后的图像数据,a是亮度校正参数,I_corret表示亮度校正后的图像数据。Among them, I_Retinex represents the image data after Retinex processing, a is the brightness correction parameter, and I_corret represents the image data after brightness correction.
根据本发明的另一个方面,提供的一种基于Retinex的微光图像快速增强 装置包括:According to another aspect of the present invention, a device for rapidly enhancing a low-light image based on Retinex includes:
最小像素值图获取模块,从原始图像选择每一个像素点的R、G、B三通道中的最小值,得到最小像素值图;The minimum pixel value map acquisition module selects the minimum value of the R, G, and B channels of each pixel from the original image to obtain the minimum pixel value map;
Retinex处理模块,对最小像素值图进行加权高斯模型的Retinex处理,得到Retinex处理后的图像;The Retinex processing module performs Retinex processing of the weighted Gaussian model on the minimum pixel value map to obtain the Retinex processed image;
差值图计算模块,根据Retinex处理后图像和最小像素值图计算差值图;The difference map calculation module calculates the difference map according to the Retinex processed image and the minimum pixel value map;
增强图像计算模块,对原始图像的每个像素点R、G、B三通道分别与差值图对应的差值相加,得到增强后的彩色图像。The enhanced image calculation module adds each pixel R, G, and B of the original image to the difference corresponding to the difference map to obtain an enhanced color image.
优选地,Retinex处理模块进一步包括:加权高斯模型计算单元和Retinex处理单元,其中:Preferably, the Retinex processing module further includes: a weighted Gaussian model calculation unit and a Retinex processing unit, wherein:
加权高斯模型计算单元,用于计算多个高斯模型加权后的加权高斯模型;Weighted Gaussian model calculation unit, used to calculate the weighted Gaussian model of multiple Gaussian models after weighting;
Retinex处理单元,用于对最小像素值图上做基于加权高斯模型的Retinex处理。The Retinex processing unit is used to perform Retinex processing based on the weighted Gaussian model on the minimum pixel value map.
优选地,上述装置还包括自适应亮度调整模块,用于对Retinex处理后的图像进行自适应亮度调整。自适应亮度调整模块进一步包括:Preferably, the above device further includes an adaptive brightness adjustment module, which is used to perform adaptive brightness adjustment on the image processed by Retinex. The adaptive brightness adjustment module further includes:
调整参数确定单元,用于确定亮度调整参数;The adjustment parameter determination unit is used to determine the brightness adjustment parameter;
调整单元,用于根据调整参数对Retinex处理后的图像进行亮度调整。The adjustment unit is used to adjust the brightness of the image processed by Retinex according to the adjustment parameters.
本发明实施例的方法和装置,通过利用加权后的高斯模型做Retinex处理,能够提高视频图像低照度区域的对比度,突出细节信息,同时将原来的三次卷积运算改成只做一次卷积运算,大大减少了计算量,提高了处理效率。此外,通过对Retinex处理后的图像进行自适应亮度校正,避免了增强后的图像出现过亮及局部偏色现象。The method and device of the embodiment of the present invention can improve the contrast of the low-illumination area of the video image and highlight the details by using the weighted Gaussian model for Retinex processing, and at the same time change the original three convolution operations to only one convolution operation , Greatly reducing the amount of calculation and improving processing efficiency. In addition, by performing adaptive brightness correction on the image processed by Retinex, the phenomenon of over-brightness and partial color cast in the enhanced image is avoided.
附图说明BRIEF DESCRIPTION
为了更清楚地说明本发明实施例的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly explain the technical solutions of the embodiments of the present invention, the drawings required for the description of the embodiments will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present invention. Those of ordinary skill in the art can obtain other drawings based on these drawings without creative efforts.
图1为本发明实施例提供的一种基于Retinex的微光图像快速增强方法流 程图;FIG. 1 is a flowchart of a method for rapidly enhancing a low-light image based on Retinex according to an embodiment of the present invention;
图2为本发明优选实施例提供的一种基于Retinex的微光图像快速增强方法流程图;2 is a flowchart of a method for rapidly enhancing low-light images based on Retinex according to a preferred embodiment of the present invention;
图3为本发明实施例提供的一种基于Retinex的微光图像快速增强装置的结构示意图FIG. 3 is a schematic structural diagram of a device for rapidly enhancing low-light images based on Retinex according to an embodiment of the present invention
具体实施方式detailed description
为了使本发明的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本发明进行进一步详细说明。应当理解,此处所描述的具体实施例仅仅用以解释本发明,并不用于限定本发明。In order to make the objectives, technical solutions and advantages of the present invention clearer, the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention, and are not intended to limit the present invention.
以下结合附图对本发明进行详细描述。The present invention will be described in detail below with reference to the drawings.
如图1为本发明实施例提供的一种基于Retinex的微光图像快速增强方法流程图,该方法包括:FIG. 1 is a flowchart of a method for rapidly enhancing a low-light image based on Retinex according to an embodiment of the present invention. The method includes:
S102、从原始图像选取每一个像素点的R、G、B三通道中的最小值,得到最小像素值图;S102. Select the minimum value of the R, G, and B channels of each pixel from the original image to obtain a minimum pixel value map;
S104、对最小像素值图进行加权高斯模型的Retinex处理,得到Retinex处理后的图像;S104. Perform Retinex processing of the weighted Gaussian model on the minimum pixel value map to obtain the Retinex processed image;
S106、根据Retinex处理后的图像和最小像素值图计算差值图;S106. Calculate the difference map according to the Retinex processed image and the minimum pixel value map;
S108、对原始图像的每个像素点R、G、B三通道分别与差值图对应的差值相加,得到增强后的彩色图像。S108. For each pixel R, G, and B of the original image, add the difference corresponding to the difference map to obtain an enhanced color image.
如图2为本发明优选实施例提供的一种基于Retinex的微光图像快速增强方法流程图,该方法包括:FIG. 2 is a flowchart of a Retinex-based low-light image rapid enhancement method provided by a preferred embodiment of the present invention. The method includes:
S201、采集一帧彩色图像数据S201. Collect a frame of color image data
本发明处理的彩色图像是R、G、B空间,若为其它空间图像,需先其转换成R、G、B空间。The color image processed by the present invention is R, G, B space, if it is other space image, it needs to be converted into R, G, B space first.
S202、计算彩色图像的最小像素值图S202. Calculate the minimum pixel value map of the color image
最小像素值,即某一像素点三个通道的最小值,定义:The minimum pixel value, which is the minimum value of the three channels of a pixel, is defined as:
I_min=min(R,G,B)(1)I_min=min(R,G,B)(1)
其中,R、G、B分别为图像的三个颜色通道,I_min是像素的最小像素值。Among them, R, G, B are the three color channels of the image, and I_min is the minimum pixel value of the pixel.
S203、对最小像素值图进行加权高斯模型的Retinex处理S203. Perform Retinex processing of the weighted Gaussian model on the minimum pixel value map
I_retinex=exp(logI_min-log(G*I_min))    (2)I_retinex=exp(logI_min-log(G*I_min)) (2)
其中,I_Retinex表示处理后图像数据,*表示卷积操作,I_min表示像素的最小像素图,其中G是加权高斯模型:Among them, I_Retinex represents the processed image data, * represents the convolution operation, I_min represents the minimum pixel map of pixels, where G is the weighted Gaussian model:
Figure PCTCN2018118097-appb-000004
Figure PCTCN2018118097-appb-000004
<mrow><mi>G</mi><mo>=</mo><munderover><mi>&Sigma;</mi><mrow><mi>k</mi><mo>=</mo><mn>1</mn></mrow><mi>N</mi></munderover><msub><mi>w</mi><mi>k</mi></msub><msub><mi>G</mi><mi>k</mi></msub><mo>-</mo><mo>-</mo><mo>-</mo><mrow><mo>(</mo><mn>3</mn><mo>)</mo></mrow></mrow><mrow><mi>G</mi><mo>=</mo><munderover><mi>&Sigma;</mi><mrow><mi>k</mi><mo>=</mo> <mn>1</mn></mrow><mi>N</mi></munderover><msub><mi>w</mi><mi>k</mi></msub><msub> <mi>G</mi><mi>k</mi></msub><mo>-</mo><mo>-</mo><mo>-</mo><mrow><mo> (</mo><mn>3</mn><mo>)</mo></mrow></mrow>
其中,G表示加权高斯模型,k=1…N,N表示高斯模板个数,wk表示对应第k个尺度的权重因子,Gk表示第k个高斯函数。本实施例中,N取3,故本实施例中wk一般取0.3,其二维表达式为:Where G represents the weighted Gaussian model, k=1...N, N represents the number of Gaussian templates, wk represents the weighting factor corresponding to the kth scale, and Gk represents the kth Gaussian function. In this embodiment, N takes 3, so in this embodiment wk generally takes 0.3, and its two-dimensional expression is:
Figure PCTCN2018118097-appb-000005
Figure PCTCN2018118097-appb-000005
<mrow><msub><mi>G</mi><mi>k</mi></msub><mrow><mo>(</mo><mi>x</mi><mo>,</mo><mi>y</mi><mo>)</mo></mrow><mo>=</mo><mo>=</mo><msub><mi>&lambda;</mi><mi>k</mi></msub><mo>&CenterDot;</mo><msup><mi>e</mi><mrow><mo>-</mo><mfrac><mrow><msup><mi>x</mi><mn>2</mn></msup><mo>+</mo><msup><mi>y</mi><mn>2</mn></msup></mrow><msup><msub><mi>c</mi><mi>k</mi></msub><mn>2</mn></msup></mfrac></mrow></msup><mo>-</mo><mo>-</mo><mo>-</mo><mrow><mo>(</mo><mn>4</mn><mo>)</mo></mrow></mrow><mrow><msub><mi>G</mi><mi>k</mi></msub><mrow><mo>(</mo><mi>x</mi><mo>,< /mo><mi>y</mi><mo>)</mo></mrow><mo>=</mo><mo>=</mo><msub><mi>&lambda;</mi ><mi>k</mi></msub><mo>&CenterDot;</mo><msup><mi>e</mi><mrow><mo>-</mo><mfrac><mrow> <msup><mi>x</mi><mn>2</mn></msup><mo>+</mo><msup><mi>y</mi><mn>2</mn> </msup></mrow><msup><msub><mi>c</mi><mi>k</mi></msub><mn>2</mn></msup></mfrac> </mrow></msup><mo>-</mo><mo>-</mo><mo>-</mo><mrow><mo>(</mo><mn>4</mn ><mo>)</mo></mrow></mrow>
其中ck是尺度常量,决定了对入射分量的估计,即决定了最终的增强效果,一般选择小、中、大三个尺度。λk是归一化因子,使得:Where ck is a scale constant, which determines the estimation of the incident component, that is, the final enhancement effect. Generally, the three scales of small, medium, and large are selected. λk is a normalization factor such that:
∫∫G k(x,y)dxdy=1          (5) ∫∫G k (x, y) dxdy=1 (5)
<mrow><mo>&Integral;</mo><mo>&Integral;</mo><msub><mi>G</mi><mi>k</mi></msub><mrow><mo>(</mo><mi>x</mi><mo>,</mo><mi>y</mi><mo>)</mo></mrow><mi>dxdy</mi><mo>=</mo><mn>1</mn><mo>-</mo><mo>-</mo><mo>-</mo><mrow><mo>(</mo><mn>5</mn><mo>)</mo></mrow></mrow><mrow><mo>&Integral;</mo><mo>&Integral;</mo><msub><mi>G</mi><mi>k</mi></msub><mrow><mo> (</mo><mi>x</mi><mo>,</mo><mi>y</mi><mo>)</mo></mrow><mi>dxdy</mi>< mo>=</mo><mn>1</mn><mo>-</mo><mo>-</mo><mo>-</mo><mrow><mo>(</mo> <mn>5</mn><mo>)</mo></mrow></mrow>
S204、对Retinex处理后的图像进行自适应亮度调整S204. Perform adaptive brightness adjustment on the image processed by Retinex
Retinex处理后的图像常出现过亮、局部偏色现象,因此,需要对I_Retinex进行亮度调整,得I_correct。具体按公式(6)进行:The images processed by Retinex often have over-brightness and partial color cast. Therefore, you need to adjust the brightness of I_Retinex to get I_correct. According to formula (6):
Figure PCTCN2018118097-appb-000006
Figure PCTCN2018118097-appb-000006
<mrow><mi>I</mi><mo>_</mo><mi>correct</mi><mo>=</mo><mfrac><mn>2</mn><msup><mrow><mn>1</mn><mo>+</mo><mi>e</mi></mrow><mrow><mo>-</mo><mi>a</mi><mo>&CenterDot;</mo><mi>I</mi><mo>_</mo><mi>retinex</mi></mrow></msup></mfrac><mo>-</mo><mn>1</mn><mo>-</mo><mo>-</mo><mo>-</mo><mrow><mo>(</mo><mn>6</mn><mo>)</mo></mrow></mrow><mrow><mi>I</mi><mo>_</mo><mi>correct</mi><mo>=</mo><mfrac><mn>2</mn><msup>< mrow><mn>1</mn><mo>+</mo><mi>e</mi></mrow><mrow><mo>-</mo><mi>a</mi>< mo>&CenterDot;</mo><mi>I</mi><mo>_</mo><mi>retinex</mi></mrow></msup></mfrac><mo>-</ mo><mn>1</mn><mo>-</mo><mo>-</mo><mo>-</mo><mrow><mo>(</mo><mn>6< /mn><mo>)</mo></mrow></mrow>
其中a是校正参数:Where a is the correction parameter:
Figure PCTCN2018118097-appb-000007
Figure PCTCN2018118097-appb-000007
<mrow><mi>a</mi><mo>=</mo><mfenced open='{'close='-'><mtable><mtr><mtd><msub><mi>a</mi><mrow><mi>low</mi><mn>1</mn></mrow></msub></mtd><mtd><mi>if</mi></mtd><mtd><mi>I</mi><mo>_</mo><mi>retinex</mi><mo>></mo><mi>Thred</mi><mo>_</mo><mi>high</mi></mtd></mtr><mtr><mtd><msub><mi>a</mi><mrow><mi>low</mi><mn>2</mn></mrow></msub></mtd><mtd><mi>if</mi> </mtd><mtd><mi>I</mi><mo>_</mo><mi>retinex</mi><mo>&lt;</mo><mi>Thred</mi><mo>_</mo><mi>low</mi></mtd></mtr></mtable></mfenced><mo>-</mo><mo>-</mo><mo>-</mo><mrow><mo>(</mo><mn>7</mn><mo>)</mo></mrow></mrow><mrow><mi>a</mi><mo>=</mo><mfenced opened='{'close='-'><mtable><mtr><mtd><msub><mi>a</ mi><mrow><mi>low</mi><mn>1</mn></mrow></msub></mtd><mtd><mi>if</mi></mtd><mtd ><mi>I</mi><mo>_</mo><mi>retinex</mi><mo>></mo><mi>Thred</mi><mo>_</mo>< mi>high</mi></mtd></mtr><mtr><mtd><msub><mi>a</mi><mrow><mi>low</mi><mn>2</mn ></mrow></msub></mtd><mtd><mi>if</mi> </mtd><mtd><mi>I</mi><mo>_</mo><mi> retinex</mi><mo>&lt;</mo><mi>Thred</mi><mo>_</mo><mi>low</mi></mtd></mtr></mtable> </mfenced><mo>-</mo><mo>-</mo><mo>-</mo><mrow><mo>(</mo><mn>7</mn><mo> )</mo></mrow></mrow>
其中,a为亮度调整参数,Thred_high和Thred_low分别表示预设的高亮度阈值和低亮度阈值,alow1和alow2分别表示对应条件的亮度调整参数,他们由实验结果取得,通常,Thred_high=0.7,Thred_low=0.1,alow1=3,alow2=2,I_Retinex表示Retinex处理后的图像数据。Among them, a is the brightness adjustment parameter, Thred_high and Thred_low respectively represent the preset high brightness threshold and low brightness threshold, and alow1 and alow2 respectively represent the brightness adjustment parameters of the corresponding conditions, they are obtained from the experimental results, usually, Thred_high=0.7, Thred_low= 0.1, alow1=3, alow2=2, I_Retinex represents the image data after Retinex processing.
S205、计算差值图S205. Calculate the difference map
将S204计算出的I_corret代入公式(8),计算I_corret与I_min的差值图Idiffer:Substitute the I_corret calculated in S204 into formula (8), and calculate the difference graph Idiffer between I_corret and I_min:
Idiffer=I_correct-I_min    (8)Idiffer=I_correct-I_min (8)
S206、计算增强后的图像S206. Calculate the enhanced image
对原始输入图像的每一个像素点的R、G、B三个通道分别与对应的Idiffer相加,即得增强后的彩色图像。The R, G, and B channels of each pixel of the original input image are added to the corresponding Idiffer, respectively, to obtain an enhanced color image.
采用本发明实施例的方法,通过利用加权后的高斯模型做Retinex处理,能够提高视频图像低照度区域的对比度,突出细节信息,同时将原来的三次卷积运算改成只做一次卷积运算,大大减少了计算量,提高了处理效率。此外,对Retinex处理后的图像进行自适应亮度校正,避免了增强后的图像出现过亮及局部偏色现象。Using the method of the embodiment of the present invention, by using the weighted Gaussian model for Retinex processing, it can improve the contrast of the low-illumination area of the video image, highlight the details, and change the original three convolution operations to only one convolution operation. Greatly reduce the amount of calculation and improve processing efficiency. In addition, adaptive brightness correction is performed on the Retinex-processed image to avoid over-brightness and partial color cast in the enhanced image.
如图3所示是本发明实施例提供的一种基于Retinex的微光图像快速增强装置的模块结构示意图,该装置包括:As shown in FIG. 3, it is a schematic structural diagram of a module for a rapid enhancement device for low-light images based on Retinex according to an embodiment of the present invention. The device includes:
最小像素值图获取模块10,用于从原始图像选取每一个像素点的R、G、B三通道中的最小值,得到最小像素值图;The minimum pixel value map acquisition module 10 is used to select the minimum value of the R, G, and B channels of each pixel from the original image to obtain a minimum pixel value map;
Retinex处理模块20,用于对最小像素值图进行加权高斯模型的Retinex处理,得到Retinex处理后的图像;The Retinex processing module 20 is used to perform Retinex processing of the weighted Gaussian model on the minimum pixel value map to obtain the Retinex processed image;
进一步地,Retinex处理模块20包括加权高斯模型计算单元201和Retinex处理单元202,其中:Further, the Retinex processing module 20 includes a weighted Gaussian model calculation unit 201 and a Retinex processing unit 202, where:
加权高斯模型计算单元201,用于计算多个高斯模型加权后的加权高斯模型;The weighted Gaussian model calculation unit 201 is used to calculate a weighted Gaussian model after weighting multiple Gaussian models;
Retinex处理单元202,用于对最小像素值图上做基于加权高斯模型的Retinex处理。The Retinex processing unit 202 is used to perform Retinex processing based on the weighted Gaussian model on the minimum pixel value map.
亮度调整模块30,用于对Retinex处理后的图像进行自适应亮度调整;Brightness adjustment module 30, used for adaptive brightness adjustment of the image processed by Retinex;
进一步地,亮度调整模块30包括调整参数确定单元301和调整单元302,其中:Further, the brightness adjustment module 30 includes an adjustment parameter determination unit 301 and an adjustment unit 302, where:
调整参数确定单元301,用于确定亮度调整参数;The adjustment parameter determination unit 301 is used to determine the brightness adjustment parameter;
调整单元302,用于根据调整参数对Retinex处理后的图像进行亮度调整。The adjusting unit 302 is used to adjust the brightness of the image processed by Retinex according to the adjustment parameters.
差值图计算模块40,根据Retinex处理后图像和最小像素值图计算差值图;The difference map calculation module 40 calculates the difference map according to the Retinex processed image and the minimum pixel value map;
增强图像计算模块50,对原始图像的每个像素点R、G、B三通道分别与差值图对应的差值相加,得到增强后的彩色图像。The enhanced image calculation module 50 adds the difference value corresponding to the difference map to the three channels R, G, and B of each pixel of the original image to obtain an enhanced color image.
采用本发明实施例的装置,通过利用加权后的高斯模型做Retinex处理,能够提高视频图像低照度区域的对比度,突出细节信息,同时将原来的三次卷积运算改成只做一次卷积运算,大大减少了计算量,提高了处理效率。此外,对Retinex处理后的图像进行自适应亮度校正,避免了增强后的图像出现过亮及局部偏色现象。Using the device of the embodiment of the present invention, by using the weighted Gaussian model for Retinex processing, the contrast of the low-illuminance region of the video image can be improved, the details information can be highlighted, and the original three convolution operations are changed to only one convolution operation. Greatly reduce the amount of calculation and improve processing efficiency. In addition, adaptive brightness correction is performed on the Retinex-processed image to avoid over-brightness and partial color cast in the enhanced image.
以上参照附图说明了本发明的优选实施例,并非因此局限本发明的权利范围。本领域技术人员不脱离本发明的范围和实质,可以有多种变型方案实现本发明,比如作为一个实施例的特征可用于另一实施例而得到又一实施例。凡在运用本发明的技术构思之内所作的任何修改、等同替换和改进,均应在本发明的权利范围之内。The preferred embodiments of the present invention have been described above with reference to the accompanying drawings, and thus do not limit the scope of the rights of the present invention. A person skilled in the art does not deviate from the scope and essence of the present invention, and there can be many variants to implement the present invention. For example, the features of one embodiment can be used in another embodiment to obtain another embodiment. Any modification, equivalent replacement and improvement made within the technical concept of applying the present invention shall fall within the scope of the rights of the present invention.

Claims (10)

  1. 一种基于Retinex的微光图像快速增强方法,其特征在于,包括:A rapid enhancement method of low-light image based on Retinex, which is characterized by:
    从原始图像选取每一个像素点的R、G、B三通道中的最小值,得到最小像素值图;Select the minimum value of the R, G, and B channels of each pixel from the original image to obtain the minimum pixel value map;
    对所述最小像素值图进行加权高斯模型的Retinex处理,得到Retinex处理后的图像;Performing Retinex processing of the weighted Gaussian model on the minimum pixel value map to obtain an image after Retinex processing;
    根据所述Retinex处理后的图像和所述最小像素值图计算差值图;Calculating a difference map according to the image processed by the Retinex and the minimum pixel value map;
    对原始图像的每个像素点R、G、B三通道分别与差值图对应的差值相加,得到增强后的彩色图像。The three channels R, G, and B of the original image are added to the difference corresponding to the difference map to obtain an enhanced color image.
  2. 根据权利要求1所述的微光图像增强方法,其特征在于,对所述最小像素值图进行加权高斯模型的Retinex处理包括:The low-light image enhancement method according to claim 1, wherein the Retinex processing of the weighted Gaussian model on the minimum pixel value map includes:
    计算多个高斯模型加权后的加权高斯模型;Calculate the weighted Gaussian model after weighting multiple Gaussian models;
    在最小像素值图上做基于加权高斯模型的Retinex处理。Do Retinex processing based on the weighted Gaussian model on the minimum pixel value map.
  3. 根据权利要求2所述的微光图像增强方法,其特征在于,所述计算多个高斯模型加权后的加权高斯模型按下列公式进行。The low-light image enhancement method according to claim 2, wherein the weighted Gaussian model after calculating the weights of the plurality of Gaussian models is performed according to the following formula.
    Figure PCTCN2018118097-appb-100001
    Figure PCTCN2018118097-appb-100001
  4. 根据权利要求2所述的微光图像增强方法,其特征在于,所述在最小像素值图上做基于加权高斯模型的Retinex处理按以下公式进行:The low-light image enhancement method according to claim 2, wherein the Retinex processing based on the weighted Gaussian model on the minimum pixel value map is performed according to the following formula:
    I_retinex=exp(logI_min-log(G*I_min))I_retinex=exp(logI_min-log(G*I_min))
    其中,I_Retinex表示Retinex处理后的图像,*表示卷积操作,其中G是加权高斯模型,I_min表示像素的最小像素值图。Among them, I_Retinex represents the image processed by Retinex, * represents the convolution operation, where G is the weighted Gaussian model, and I_min represents the minimum pixel value map of pixels.
  5. 根据权利要求1所述的微光图像增强方法,其特征在于,所述方法还包括:对所述Retinex处理后的图像进行自适应亮度调整。The low-light image enhancement method according to claim 1, wherein the method further comprises: performing adaptive brightness adjustment on the image processed by the Retinex.
  6. 根据权利要求5所述的微光图像增强方法,其特征在于,对所述Retinex处理后的图像进行自适应亮度调整包括:The low-light image enhancement method according to claim 5, wherein the adaptive brightness adjustment of the image processed by the Retinex includes:
    (a)按以下公式确定亮度调整参数的取值(a) Determine the value of the brightness adjustment parameter according to the following formula
    Figure PCTCN2018118097-appb-100002
    Figure PCTCN2018118097-appb-100002
    其中,a为亮度调整参数,Thred_high和Thred_low分别表示预设的高亮度阈值和低亮度阈值,alow1和alow2分别表示对应条件的亮度调整参数,I_Retinex表示Retinex处理后的图像。Among them, a is the brightness adjustment parameter, Thred_high and Thred_low respectively represent the preset high brightness threshold and low brightness threshold, alow1 and alow2 respectively represent the brightness adjustment parameters of the corresponding conditions, and I_Retinex represents the image after Retinex processing.
  7. 根据根据权利要求6所述的微光图像增强方法,其特征在于,对所述Retinex处理后的图像进行自适应亮度调整还包括以下步骤:The low-light image enhancement method according to claim 6, wherein the adaptive brightness adjustment of the Retinex processed image further comprises the following steps:
    (b)判断I_Retinex是否大于Thred_high,或是否小于Thred_low,如果是,则根据亮度调整参数a的取值按下述公式进行亮度调整,否则不进行亮度调整;(b) Determine whether I_Retinex is greater than Thred_high or less than Thred_low. If yes, adjust the brightness according to the following formula according to the value of brightness adjustment parameter a, otherwise do not perform brightness adjustment;
    Figure PCTCN2018118097-appb-100003
    Figure PCTCN2018118097-appb-100003
    其中,I_Retinex表示Retinex处理后的图像,a是亮度校正参数,I_corret表示亮度校正后的图像。Among them, I_Retinex represents the image after Retinex processing, a is the brightness correction parameter, and I_corret represents the image after brightness correction.
  8. 一种基于Retinex的微光图像快速增强装置,其特征在于,包括:A low-light image rapid enhancement device based on Retinex is characterized by comprising:
    最小像素值图获取模块,从原始图像选择每一个像素点的R、G、B三通道中的最小值,得到最小像素值图;The minimum pixel value map acquisition module selects the minimum value of the R, G, and B channels of each pixel from the original image to obtain the minimum pixel value map;
    Retinex处理模块,对所述最小像素值图进行加权高斯模型的Retinex处理,得到Retinex处理后的图像;The Retinex processing module performs Retinex processing of the weighted Gaussian model on the minimum pixel value map to obtain the Retinex processed image;
    差值图计算模块,根据所述Retinex处理后图像和所述最小像素值图计算差值图;The difference map calculation module calculates the difference map according to the Retinex processed image and the minimum pixel value map;
    增强图像计算模块,对原始图像的每个像素点R、G、B三通道分别与差值图对应的差值相加,得到增强后的彩色图像。The enhanced image calculation module adds each pixel R, G, and B of the original image to the difference corresponding to the difference map to obtain an enhanced color image.
  9. 根据权利要求8所述的微光图像快速增强装置,其特征在于,所述Retinex处理模块包括:The low-light image rapid enhancement device according to claim 8, wherein the Retinex processing module comprises:
    加权高斯模型计算单元,用于计算多个高斯模型加权后的加权高斯模型;Weighted Gaussian model calculation unit, used to calculate the weighted Gaussian model of multiple Gaussian models after weighting;
    Retinex处理单元,用于在最小像素值图上做基于加权高斯模型的Retinex 处理。The Retinex processing unit is used to perform Retinex processing based on the weighted Gaussian model on the minimum pixel value map.
  10. 根据权利要求8或9所述的微光图像快速增强装置,其特征在于,所述装置还包括亮度调整模块,用于对所述Retinex处理后的图像进行自适应亮度调整,还进一步包括:The low-light image rapid enhancement device according to claim 8 or 9, characterized in that the device further comprises a brightness adjustment module for performing adaptive brightness adjustment on the image processed by the Retinex, and further comprising:
    调整参数确定单元,用于确定亮度调整参数;The adjustment parameter determination unit is used to determine the brightness adjustment parameter;
    调整单元,用于根据调整参数对Retinex处理后的图像进行亮度调整。The adjustment unit is used to adjust the brightness of the image processed by Retinex according to the adjustment parameters.
PCT/CN2018/118097 2018-11-29 2018-11-29 Low-light-level image rapid enhancement method and apparatus based on retinex WO2020107308A1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
PCT/CN2018/118097 WO2020107308A1 (en) 2018-11-29 2018-11-29 Low-light-level image rapid enhancement method and apparatus based on retinex

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2018/118097 WO2020107308A1 (en) 2018-11-29 2018-11-29 Low-light-level image rapid enhancement method and apparatus based on retinex

Publications (1)

Publication Number Publication Date
WO2020107308A1 true WO2020107308A1 (en) 2020-06-04

Family

ID=70854425

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/118097 WO2020107308A1 (en) 2018-11-29 2018-11-29 Low-light-level image rapid enhancement method and apparatus based on retinex

Country Status (1)

Country Link
WO (1) WO2020107308A1 (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102194220A (en) * 2011-05-10 2011-09-21 西安理工大学 Image enhancement method based on combination of sharpening strength and gray scale distribution
CN103295206A (en) * 2013-06-25 2013-09-11 安科智慧城市技术(中国)有限公司 low-light-level image enhancement method and device based on Retinex
CN103295205A (en) * 2013-06-25 2013-09-11 安科智慧城市技术(中国)有限公司 Low-light-level image quick enhancement method and device based on Retinex

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102194220A (en) * 2011-05-10 2011-09-21 西安理工大学 Image enhancement method based on combination of sharpening strength and gray scale distribution
CN103295206A (en) * 2013-06-25 2013-09-11 安科智慧城市技术(中国)有限公司 low-light-level image enhancement method and device based on Retinex
CN103295205A (en) * 2013-06-25 2013-09-11 安科智慧城市技术(中国)有限公司 Low-light-level image quick enhancement method and device based on Retinex

Similar Documents

Publication Publication Date Title
Yadav et al. Contrast limited adaptive histogram equalization based enhancement for real time video system
Chang et al. Automatic contrast-limited adaptive histogram equalization with dual gamma correction
US10339643B2 (en) Algorithm and device for image processing
Li et al. Visual-salience-based tone mapping for high dynamic range images
US8447132B1 (en) Dynamic range correction based on image content
EP2076013B1 (en) Method of high dynamic range compression
CN103440630B (en) Show and detail enhancing method based on the Larger Dynamic scope infrared image guiding wave filter
EP2833317B1 (en) Image display device and/or method therefor
JP5150353B2 (en) Contrast enhancement method, apparatus, imaging apparatus, and storage medium
Zhu et al. An adaptive histogram equalization algorithm on the image gray level mapping
US8644638B2 (en) Automatic localized adjustment of image shadows and highlights
CN103218778B (en) The disposal route of a kind of image and video and device
US7359572B2 (en) Automatic analysis and adjustment of digital images with exposure problems
US7570831B2 (en) System and method for estimating image noise
KR101518722B1 (en) Image enhancement processing method and apparatus for distortion correction by air particle like fog
JP4870618B2 (en) Image data automatic mapping method and image processing device
US7570829B2 (en) Selection of alternative image processing operations to maintain high image quality
US9984445B2 (en) Tone mapping
CN108986050B (en) Image and video enhancement method based on multi-branch convolutional neural network
Poddar et al. Non-parametric modified histogram equalisation for contrast enhancement
Ju et al. Single image dehazing via an improved atmospheric scattering model
US7899267B2 (en) Dynamic range compensation by filter cascade
JP4870617B2 (en) Image data automatic mapping method and image processing device
US7327504B2 (en) Method of detecting clipped image pixels
US10237527B2 (en) Convolutional color correction in digital images

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 18941168

Country of ref document: EP

Kind code of ref document: A1