[go: up one dir, main page]

CN115660994A - Image enhancement method based on regional least square estimation - Google Patents

Image enhancement method based on regional least square estimation Download PDF

Info

Publication number
CN115660994A
CN115660994A CN202211365819.9A CN202211365819A CN115660994A CN 115660994 A CN115660994 A CN 115660994A CN 202211365819 A CN202211365819 A CN 202211365819A CN 115660994 A CN115660994 A CN 115660994A
Authority
CN
China
Prior art keywords
image
gray
enhanced
boundary pixel
boundary
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.)
Granted
Application number
CN202211365819.9A
Other languages
Chinese (zh)
Other versions
CN115660994B (en
Inventor
赵蓝飞
刘发强
李士俊
李国庆
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Harbin University of Science and Technology
Original Assignee
Harbin University of Science and Technology
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Harbin University of Science and Technology filed Critical Harbin University of Science and Technology
Priority to CN202211365819.9A priority Critical patent/CN115660994B/en
Publication of CN115660994A publication Critical patent/CN115660994A/en
Application granted granted Critical
Publication of CN115660994B publication Critical patent/CN115660994B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Image Processing (AREA)

Abstract

一种基于区域最小二乘估计的图像增强方法,它属于图像处理技术领域。本发明解决了采用现有方法获得的增强图像的质量差的问题。本发明方法由基于分段亮度线性映射的区域边界亮度计算方法以及基于区域最小二乘法的非边界像素亮度计算方法两部分构成,基于分段亮度线性映射的区域边界亮度计算方法决定了增强图像整体的亮度分布,基于区域最小二乘法的非边界像素亮度计算方法计算非边界像素点的亮度从而使增强图像的细节特性与原始图像保持一致。本发明设计的算法能够增强图像的亮度分布,提升图像整体的可视化效果,增强图像的局部细节得到有效地保持,提高了增强图像的质量。本发明方法可以应用于图像处理领域用。

Figure 202211365819

The invention relates to an image enhancement method based on area least square estimation, which belongs to the technical field of image processing. The invention solves the problem of poor quality of the enhanced image obtained by the existing method. The method of the present invention is composed of two parts: the calculation method of the area boundary brightness based on the segmental brightness linear mapping and the non-boundary pixel brightness calculation method based on the regional least squares method, and the area boundary brightness calculation method based on the segmental brightness linear mapping determines the overall enhanced image The non-boundary pixel brightness calculation method based on the regional least squares method calculates the brightness of the non-boundary pixel points so that the details of the enhanced image are consistent with the original image. The algorithm designed by the invention can enhance the brightness distribution of the image, improve the overall visualization effect of the image, effectively maintain the local details of the enhanced image, and improve the quality of the enhanced image. The method of the invention can be applied in the field of image processing.

Figure 202211365819

Description

一种基于区域最小二乘估计的图像增强方法An Image Enhancement Method Based on Regional Least Square Estimation

技术领域technical field

本发明属于图像处理技术领域,具体涉及一种基于区域最小二乘估计的图像增强方法。The invention belongs to the technical field of image processing, and in particular relates to an image enhancement method based on region least square estimation.

背景技术Background technique

图像增强通过增强图像中的对比度、局部细节纹理等特征,从而解决图像在采集与传输过程中由较差的环境光以及设备缺陷引起的图像视觉效果欠佳问题,提升数字图像的图像质量。早期的图像增强算法包括:直方图均衡化算法,自适应滤波算法,对比度增强算法。这三种算法都能在一定程度上提高图像质量,但是增强图像的局部细节、清晰度以及图像整体亮度分布提升幅度较为有限,导致采用现有方法获得的增强图像的质量仍然较差,有待进一步提高。Image enhancement solves the problem of poor image visual effect caused by poor ambient light and equipment defects in the process of image acquisition and transmission by enhancing the contrast and local detail texture of the image, and improves the image quality of digital images. Early image enhancement algorithms include: histogram equalization algorithm, adaptive filtering algorithm, and contrast enhancement algorithm. These three algorithms can improve the image quality to a certain extent, but the local details and clarity of the enhanced image and the improvement of the overall brightness distribution of the image are relatively limited, resulting in the poor quality of the enhanced image obtained by the existing method, which needs to be further improved. improve.

发明内容Contents of the invention

本发明的目的是为解决采用现有方法获得的增强图像的质量差的问题,而提出的一种基于区域最小二乘估计的图像增强方法,在保证原始图像局部细节特性的前提下,提升增强图像整体的明暗对比效果。The purpose of the present invention is to solve the problem of poor quality of the enhanced image obtained by the existing method, and propose an image enhancement method based on regional least squares estimation, under the premise of ensuring the local detail characteristics of the original image, improve the enhancement The overall chiaroscuro effect of the image.

本发明为解决上述技术问题所采取的技术方案是:The technical scheme that the present invention takes for solving the problems of the technologies described above is:

一种基于区域最小二乘估计的图像增强方法,所述方法具体包括以下步骤:An image enhancement method based on regional least squares estimation, the method specifically includes the following steps:

步骤一、将待增强图像平面划分为N个8×8区域,获得N个图像分块;Step 1. Divide the image plane to be enhanced into N 8×8 regions to obtain N image blocks;

步骤二、计算出待增强图像的低照度分段点

Figure BDA0003918252040000011
和高亮度分段点
Figure BDA0003918252040000012
Step 2. Calculate the low-illuminance segmentation points of the image to be enhanced
Figure BDA0003918252040000011
and high-brightness segment points
Figure BDA0003918252040000012

步骤三、利用步骤二中计算出的低照度分段点

Figure BDA0003918252040000013
和高亮度分段点
Figure BDA0003918252040000014
对各个图像分块中的每个边界像素分别进行分段亮度线性映射,得到各个图像分块中的每个边界像素所对应的增强后亮度值;Step 3. Use the low-illuminance segmentation points calculated in step 2
Figure BDA0003918252040000013
and high-brightness segment points
Figure BDA0003918252040000014
performing segmented luminance linear mapping on each boundary pixel in each image block, to obtain an enhanced luminance value corresponding to each boundary pixel in each image block;

步骤四、再根据各个图像分块中的每个边界像素所对应的增强后亮度值,计算出各个图像分块中每个非边界像素所对应的增强后亮度值。Step 4: Calculate the enhanced brightness value corresponding to each non-boundary pixel in each image block according to the enhanced brightness value corresponding to each boundary pixel in each image block.

本发明的有益效果是:The beneficial effects of the present invention are:

本发明方法由基于分段亮度线性映射的区域边界亮度计算方法以及基于区域最小二乘法的非边界像素亮度计算方法两部分构成,基于分段亮度线性映射的区域边界亮度计算方法决定了增强图像整体的亮度分布,基于区域最小二乘法的非边界像素亮度计算方法计算非边界像素点的亮度从而使增强图像的细节特性与原始图像保持一致。The method of the present invention is composed of two parts: the area boundary brightness calculation method based on the segmental brightness linear mapping and the non-boundary pixel brightness calculation method based on the regional least squares method. The area boundary brightness calculation method based on the segmental brightness linear mapping determines the overall enhanced image The non-boundary pixel brightness calculation method based on the regional least squares method calculates the brightness of the non-boundary pixel points so that the details of the enhanced image are consistent with the original image.

实验结果表明,本发明设计的算法能够增强图像的亮度分布,提升图像整体的可视化效果,增强图像的局部细节得到有效地保持,提高了增强图像的质量。Experimental results show that the algorithm designed by the invention can enhance the brightness distribution of the image, improve the overall visualization effect of the image, effectively maintain the local details of the enhanced image, and improve the quality of the enhanced image.

附图说明Description of drawings

图1为边界像素和非边界像素编号的示意图;Fig. 1 is a schematic diagram of boundary pixels and non-boundary pixel numbers;

图2为图像kodim;Figure 2 is the image kodim;

图3为图像kodim对应的分段亮度线性映射函数的示意图;Fig. 3 is the schematic diagram of the segmental luminance linear mapping function corresponding to the image kodim;

图4为图像kodim对应的增强图像;Fig. 4 is the enhanced image corresponding to image kodim;

图5为原始图像road;Figure 5 is the original image road;

图6为原始图像road对应的分段亮度线性映射函数的示意图;Fig. 6 is a schematic diagram of a segmented luminance linear mapping function corresponding to the original image road;

图7为图像road对应的增强图像;Figure 7 is an enhanced image corresponding to the image road;

图8为图像seabed;Figure 8 is the image seabed;

图9为图像seabed对应的分段亮度线性映射函数的示意图;Fig. 9 is a schematic diagram of a segmented luminance linear mapping function corresponding to an image seabed;

图10为图像seabed对应的增强图像。Figure 10 is the enhanced image corresponding to the image seabed.

具体实施方式Detailed ways

具体实施方式一、本实施方式所述的一种基于区域最小二乘估计的图像增强方法,所述方法具体包括以下步骤:Specific Embodiments 1. A method for image enhancement based on regional least squares estimation described in this embodiment, the method specifically includes the following steps:

步骤一、将待增强图像平面划分为N个8×8区域,获得N个图像分块;Step 1. Divide the image plane to be enhanced into N 8×8 regions to obtain N image blocks;

若待增强图像的宽度或者高度无法被8整除,则通过复制图像右端边界和底部边界的方式使复制边界之后的图像的宽度和高度均能被8整除。由于每个图像分块的区域大小均为8×8,则每个区域均包括28个边界像素以及36个非边界像素。如图1所示,是8×8区域以及边界像素和非边界像素编号的示意图;If the width or height of the image to be enhanced cannot be divisible by 8, the width and height of the image after the copied border are both divisible by 8 by copying the right and bottom borders of the image. Since the area size of each image block is 8×8, each area includes 28 boundary pixels and 36 non-boundary pixels. As shown in Figure 1, it is a schematic diagram of an 8×8 area and the numbers of boundary pixels and non-boundary pixels;

步骤二、计算出待增强图像的低照度分段点

Figure BDA0003918252040000021
和高亮度分段点
Figure BDA0003918252040000022
Step 2. Calculate the low-illuminance segmentation points of the image to be enhanced
Figure BDA0003918252040000021
and high-brightness segment points
Figure BDA0003918252040000022

步骤三、利用步骤二中计算出的低照度分段点

Figure BDA0003918252040000023
和高亮度分段点
Figure BDA0003918252040000024
对各个图像分块中的每个边界像素分别进行分段亮度线性映射,得到各个图像分块中的每个边界像素所对应的增强后亮度值;Step 3. Use the low-illuminance segmentation points calculated in step 2
Figure BDA0003918252040000023
and high-brightness segment points
Figure BDA0003918252040000024
performing segmented luminance linear mapping on each boundary pixel in each image block, to obtain an enhanced luminance value corresponding to each boundary pixel in each image block;

步骤四、再根据各个图像分块中的每个边界像素所对应的增强后亮度值,计算出各个图像分块中每个非边界像素所对应的增强后亮度值。Step 4: Calculate the enhanced brightness value corresponding to each non-boundary pixel in each image block according to the enhanced brightness value corresponding to each boundary pixel in each image block.

具体实施方式二:本实施方式与具体实施方式一不同的是,所述低照度分段点

Figure BDA0003918252040000025
的计算方法为:Specific embodiment two: the difference between this embodiment and specific embodiment one is that the low-illuminance segmentation point
Figure BDA0003918252040000025
The calculation method is:

步骤1、在灰度区间[0,127]内任意选中一个灰度作为低照度分段点TlStep 1. Randomly select a gray level in the gray level interval [0,127] as the low-illuminance segmentation point T1 ;

步骤2、计算待增强图像在灰度区间[0,Tl]的灰度中位数Ml(Tl),Ml(Tl)的计算方式如式(1)所示:Step 2. Calculate the gray-scale median M l (T l ) of the image to be enhanced in the gray-scale interval [0, T l ]. The calculation method of M l (T l ) is shown in formula (1):

Figure BDA0003918252040000031
Figure BDA0003918252040000031

其中,符号

Figure BDA0003918252040000032
表示向下取整运算;Among them, the symbol
Figure BDA0003918252040000032
Indicates the rounding down operation;

步骤3、根据灰度直方图计算待增强图像在灰度区间[Tl+1,127]的灰度均值Al(Tl),Al(Tl)的计算方式如式(2)所示:Step 3. Calculate the average gray value A l (T l ) of the image to be enhanced in the gray interval [T l + 1,127] according to the gray histogram. The calculation method of A l ( T l ) is shown in formula (2):

Figure BDA0003918252040000033
Figure BDA0003918252040000033

其中,b表示灰阶,Hb表示灰阶b对应的灰度分布;Wherein, b represents the gray scale, and H b represents the gray distribution corresponding to the gray scale b;

步骤4、计算均值Al(Tl)与中位数Ml(Tl)的差值Dl(Tl),Dl(Tl)的计算方式如式(3)所示:Step 4. Calculate the difference D l (T l ) between the mean A l (T l ) and the median M l (T l ). The calculation method of D l ( T l ) is shown in formula (3):

Dl(Tl)=Al(Tl)-Ml(Tl) (3)D l (T l )=A l (T l )-M l (T l ) (3)

步骤5、重复步骤1至步骤4的过程,使低照度分段点Tl在灰度区间[0,127]内进行遍历,找到最大的差值Dl(Tl)所对应的低照度分段点作为最终的低照度分段点

Figure BDA0003918252040000034
Step 5. Repeat the process from step 1 to step 4 to traverse the low-illuminance segmentation point T l in the gray scale interval [0,127], and find the low-illuminance segmentation point corresponding to the largest difference D l (T l ) as the final low-light segmentation point
Figure BDA0003918252040000034
Right now

Figure BDA0003918252040000035
Figure BDA0003918252040000035

其它步骤及参数与具体实施方式一相同。Other steps and parameters are the same as those in Embodiment 1.

具体实施方式三:本实施方式与具体实施方式一或二不同的是,所述高亮度分段点

Figure BDA0003918252040000038
的计算方法为:Specific Embodiment 3: The difference between this embodiment and Specific Embodiment 1 or 2 is that the high-brightness segmentation point
Figure BDA0003918252040000038
The calculation method is:

步骤(1)、在灰度区间[128,255]内任意选中一个灰度作为高照度分段点ThStep (1), arbitrarily select a gray level in the gray level interval [128,255] as the high-illuminance segmentation point T h ;

步骤(2)、计算待增强图像在灰度区间[Th,255]的灰度中位数Mh(Th),Mh(Th)的计算方式如式(5)所示:Step (2), calculating the gray-scale median M h (T h ) of the image to be enhanced in the gray-scale interval [T h , 255], the calculation method of M h ( T h ) is shown in formula (5):

Figure BDA0003918252040000036
Figure BDA0003918252040000036

其中,符号

Figure BDA0003918252040000037
表示向上取整运算;Among them, the symbol
Figure BDA0003918252040000037
Represents an upward rounding operation;

步骤(3)、根据灰度直方图计算待增强图像在灰度区间[128,Th+1]的灰度均值Ah(Th),Ah(Th)的计算方式如式(6)所示:Step (3), calculate the gray value A h (T h ) of the image to be enhanced in the gray range [128, T h +1] according to the gray histogram, and the calculation method of A h (T h ) is as formula (6 ) as shown:

Figure BDA0003918252040000041
Figure BDA0003918252040000041

其中,b表示灰阶,Hb表示灰阶b对应的灰度分布;Wherein, b represents the gray scale, and H b represents the gray distribution corresponding to the gray scale b;

步骤(4)、计算灰度均值Ah(Th)与灰度中位数Mh(Th)的差值Dh(Th),Dh(Th)的计算方式如式(7)所示:Step (4), calculating the difference D h (T h ) between the gray-scale mean A h (T h ) and the gray-scale median M h (T h ), the calculation method of D h ( T h ) is as in formula (7 ) as shown:

Dh(Th)=Mh(Th)-Ah(Th) (7)D h (T h ) = M h (T h )-A h (T h ) (7)

步骤(5)、重复步骤(1)至步骤(4)的过程,使高照度分段点Th在灰度区间[128,255]内进行遍历,找到最大的差值Dh(Th)所对应的分段点作为最终的高照度分段点

Figure BDA0003918252040000042
Figure BDA0003918252040000043
的计算方式如式(8)所示:Step (5), repeat the process from step (1) to step (4), make the high-illuminance segmentation point T h traverse in the gray scale interval [128,255], and find the maximum difference D h (T h ) corresponding to The segmentation point of is used as the final high-illuminance segmentation point
Figure BDA0003918252040000042
Figure BDA0003918252040000043
The calculation method of is shown in formula (8):

Figure BDA0003918252040000044
Figure BDA0003918252040000044

其它步骤及参数与具体实施方式一或二相同。Other steps and parameters are the same as those in Embodiment 1 or Embodiment 2.

具体实施方式四:本实施方式与具体实施方式一至三之一不同的是,所述步骤三的具体过程为:Specific implementation mode four: this implementation mode is different from one of the specific implementation modes one to three in that the specific process of the step three is:

低照度分段点

Figure BDA0003918252040000045
和高照度分段点
Figure BDA0003918252040000046
所对应的灰度值如式(9)所示:low light segment
Figure BDA0003918252040000045
and high-illuminance segment points
Figure BDA0003918252040000046
The corresponding gray value is shown in formula (9):

Figure BDA0003918252040000047
Figure BDA0003918252040000047

其中,

Figure BDA0003918252040000048
Figure BDA0003918252040000049
对应的灰度值,
Figure BDA00039182520400000410
Figure BDA00039182520400000411
对应的灰度值,
Figure BDA00039182520400000412
Figure BDA00039182520400000413
对应的累计概率分布,
Figure BDA00039182520400000414
Figure BDA00039182520400000415
对应的累计概率分布;in,
Figure BDA0003918252040000048
for
Figure BDA0003918252040000049
The corresponding gray value,
Figure BDA00039182520400000410
for
Figure BDA00039182520400000411
The corresponding gray value,
Figure BDA00039182520400000412
for
Figure BDA00039182520400000413
The corresponding cumulative probability distribution,
Figure BDA00039182520400000414
for
Figure BDA00039182520400000415
The corresponding cumulative probability distribution;

对各个图像分块中的每个边界像素分别进行分段线性亮度映射,得到各个图像分块中的每个边界像素所对应的增强后亮度值;performing piecewise linear luminance mapping on each boundary pixel in each image block to obtain an enhanced luminance value corresponding to each boundary pixel in each image block;

分段线性亮度映射表达式如式(10)所示:The piecewise linear brightness mapping expression is shown in formula (10):

Figure BDA0003918252040000051
Figure BDA0003918252040000051

其中,I代表边界像素的亮度值,

Figure BDA0003918252040000052
代表边界像素所对应的增强后亮度值。Among them, I represents the brightness value of the boundary pixel,
Figure BDA0003918252040000052
Represents the enhanced brightness value corresponding to the boundary pixel.

如图1所示,每个图像分块均包括28个边界像素,根据本实施方式的方法可以获得每个图像分块的28个边界像素所对应的增强后亮度值。As shown in FIG. 1 , each image block includes 28 boundary pixels, and the enhanced brightness value corresponding to the 28 boundary pixels of each image block can be obtained according to the method of this embodiment.

其它步骤及参数与具体实施方式一至三之一相同。Other steps and parameters are the same as those in Embodiments 1 to 3.

具体实施方式五:本实施方式与具体实施方式一至四之一不同的是,所述步骤四的具体过程为:Specific implementation mode five: the difference between this implementation mode and one of the specific implementation modes one to four is that the specific process of the step four is:

步骤S1、对于全部N个区域内的第k个非边界像素,构建一个关于28个边界权重且具有累加形式的函数fk12,...,ω28),函数fk12,...,ω28)如式(11)所示:Step S1. For the k-th non-boundary pixel in all N regions, construct a function f k12 ,...,ω 28 ) with respect to 28 boundary weights and in cumulative form, the function f k12 ,...,ω 28 ) is shown in formula (11):

fk12,...,ω28)=∑i1Ii,12Ii,2+···+ω28Ii,28-Ii(k))2 (11)f k12 ,...,ω 28 )=∑ i1 I i,12 I i,2 +···+ω 28 I i,28 -I i (k) ) 2 (11)

其中,ω12,...,ω28为各个边界像素对应的权重,Ii,1代表第i个区域内的第1个边界像素所对应的增强后亮度值,i=1,2,…,N,Ii(k)表示第i个区域内的第k个非边界像素在待增强图像中的原始亮度值;Among them, ω 1 , ω 2 ,..., ω 28 are the weights corresponding to each boundary pixel, I i,1 represents the enhanced brightness value corresponding to the first boundary pixel in the i-th region, i=1, 2,...,N, I i (k) represents the original brightness value of the kth non-boundary pixel in the i-th region in the image to be enhanced;

根据最小二乘准则,对函数fk12,...,ω28)的任意边界像素权重ωj的导函数为0,即公式(12)成立:According to the least squares criterion, the derivative function of any boundary pixel weight ω j to the function f k12 ,...,ω 28 ) is 0, that is, formula (12) holds:

Figure BDA0003918252040000053
Figure BDA0003918252040000053

其中,j=1,2,…,28;Among them, j=1,2,...,28;

将全部边界权重带入公式(12),并结合公式(11)得到式(13)所示的关于边界权重的线性方程组:Bring all the boundary weights into formula (12), and combine with formula (11) to get the linear equations about the boundary weight shown in formula (13):

Figure BDA0003918252040000054
Figure BDA0003918252040000054

通过雅克比迭代法对公式(13)进行求解,得到任意边界权重的最优解,如式(14)所示:Formula (13) is solved by the Jacobian iteration method, and the optimal solution of any boundary weight is obtained, as shown in formula (14):

Figure BDA0003918252040000061
Figure BDA0003918252040000061

其中,上标t表示迭代次数,

Figure BDA0003918252040000062
表示第t次迭代获得的第j个边界像素的权重,
Figure BDA0003918252040000063
表示第t-1次迭代获得的第j个边界像素的权重;Among them, the superscript t represents the number of iterations,
Figure BDA0003918252040000062
Indicates the weight of the jth boundary pixel obtained in the tth iteration,
Figure BDA0003918252040000063
Indicates the weight of the jth boundary pixel obtained in the t-1th iteration;

当对于全体边界像素公式(15)恒成立时雅克比迭代法收敛:When the formula (15) holds true for all boundary pixels, the Jacobian iteration method converges:

Figure BDA0003918252040000064
Figure BDA0003918252040000064

Figure BDA0003918252040000065
即为边界像素权重的最小二乘估计结果;不同区域内同一位置的非边界像素均对应一组相同的边界权重;
Figure BDA0003918252040000065
That is, the least squares estimation result of the boundary pixel weight; the non-boundary pixels at the same position in different regions correspond to the same set of boundary weights;

步骤S2、计算第i个区域内第k个非边界像素的增强后亮度值

Figure BDA0003918252040000066
Step S2. Calculating the enhanced brightness value of the kth non-boundary pixel in the i-th region
Figure BDA0003918252040000066

Figure BDA0003918252040000067
Figure BDA0003918252040000067

步骤S3、重复步骤S1至步骤S2的过程,分别得到各个图像分块中每个非边界像素所对应的增强后亮度值。Step S3, repeating the process from step S1 to step S2 to obtain the enhanced brightness value corresponding to each non-boundary pixel in each image block.

其它步骤及参数与具体实施方式一至四之一相同。Other steps and parameters are the same as in one of the specific embodiments 1 to 4.

实验结果与分析Experimental results and analysis

本发明通过台式机对算法进行仿真实验。台式机的硬件配置:中央处理器的型号为i5-12400F,显示卡规格为RTX3060,内存容量为128G。台式机的操作系统为Windows 11,仿真软件平台为Matlab 2020a。算法的输入和输出均为jpg格式的灰度图像。仿真结果如图2至图10所示。The present invention carries out simulation experiments on the algorithm through a desktop computer. The hardware configuration of the desktop computer: the model of the central processing unit is i5-12400F, the specification of the display card is RTX3060, and the memory capacity is 128G. The desktop operating system is Windows 11, and the simulation software platform is Matlab 2020a. The input and output of the algorithm are grayscale images in jpg format. The simulation results are shown in Figure 2 to Figure 10.

对比原始图像和增强图像可知:本发明设计算法能够提高图像整体的视觉观感,增强图像的对比度得到有效地提升。光照不充分的区域像素的亮度得到有效地拉伸从而提高区域的可视性。另外,增强图像对于原始图像的局部细节保持能力较为突出,增强图像中各目标的边缘和轮廓较为清晰。因此本发明设计算法可以有效地提高图像质量,增强图像的视觉效果得到大幅度的改善。Comparing the original image and the enhanced image, it can be seen that the design algorithm of the present invention can improve the overall visual perception of the image, and the contrast of the enhanced image can be effectively improved. The brightness of pixels in poorly lit areas is effectively stretched to improve the visibility of the area. In addition, the enhanced image has a better ability to maintain the local details of the original image, and the edges and contours of each target in the enhanced image are clearer. Therefore, the design algorithm of the present invention can effectively improve the image quality, and the visual effect of the enhanced image is greatly improved.

本发明的上述算例仅为详细地说明本发明的计算模型和计算流程,而并非是对本发明的实施方式的限定。对于所属领域的普通技术人员来说,在上述说明的基础上还可以做出其它不同形式的变化或变动,这里无法对所有的实施方式予以穷举,凡是属于本发明的技术方案所引伸出的显而易见的变化或变动仍处于本发明的保护范围之列。The above calculation example of the present invention is only to describe the calculation model and calculation process of the present invention in detail, but not to limit the implementation of the present invention. For those of ordinary skill in the art, on the basis of the above description, other changes or changes in different forms can also be made, and all implementation modes cannot be exhaustively listed here. Obvious changes or modifications are still within the protection scope of the present invention.

Claims (5)

1. An image enhancement method based on regional least squares estimation is characterized by specifically comprising the following steps:
dividing an image plane to be enhanced into N8 x 8 areas to obtain N image blocks;
step two, calculating low illumination segmentation points of the image to be enhanced
Figure FDA0003918252030000011
And high luminance segmentation points
Figure FDA0003918252030000012
Step three, utilizing the low illumination segmentation points calculated in the step two
Figure FDA0003918252030000013
And high luminance segmentation points
Figure FDA0003918252030000014
Performing piecewise brightness linear mapping on each boundary pixel in each image block to obtain an enhanced brightness value corresponding to each boundary pixel in each image block;
and fourthly, calculating an enhanced brightness value corresponding to each non-boundary pixel in each image block according to the enhanced brightness value corresponding to each boundary pixel in each image block.
2. The image enhancement method based on area least squares estimation of claim 1, wherein the low illumination segmentation points
Figure FDA0003918252030000015
The calculation method comprises the following steps:
step 1, in the gray scale interval [0,127]Arbitrarily selecting one gray level as low-illumination segmentation point T l
Step 2, calculating the gray scale interval [0,T ] of the image to be enhanced l ]Middle number of gray levels M l (T l ),M l (T l ) The calculation method of (2) is shown in formula (1):
Figure FDA0003918252030000016
wherein, the symbol
Figure FDA0003918252030000017
Indicating a rounding-down operation;
Step 3, calculating the gray level interval [ T ] of the image to be enhanced according to the gray level histogram l +1,127]Gray level mean value A of l (T l ),A l (T l ) The calculation method of (2) is shown as the following formula:
Figure FDA0003918252030000018
wherein b represents a gray scale, H b Representing the gray distribution corresponding to the gray scale b;
step 4, calculating the mean value A l (T l ) And median M l (T l ) Difference D of l (T l ),D l (T l ) The calculation method of (2) is shown in formula (3):
D l (T l )=A l (T l )-M l (T l ) (3)
step 5, repeating the processes from step 1 to step 4 to make the low illumination segmentation point T l In the gray scale interval [0,127]Internally traversing to find the maximum difference D l (T l ) The corresponding low-illumination segmentation point is used as the final low-illumination segmentation point
Figure FDA0003918252030000019
Namely, it is
Figure FDA0003918252030000021
3. The image enhancement method based on regional least squares estimation of claim 1, wherein the high brightness segmentation points
Figure FDA0003918252030000022
The calculation method comprises the following steps:
step (1), in the gray scale interval [128,255]Arbitrarily selecting one gray level as high illumination segmentation point T h
Step (2), calculating the gray scale interval [ T ] of the image to be enhanced h ,255]Middle number of gray levels M h (T h ),M h (T h ) Is calculated as shown in equation (5):
Figure FDA0003918252030000023
wherein, the symbol
Figure FDA0003918252030000024
Represents a ceiling operation;
step (3), calculating the gray level interval [128, T ] of the image to be enhanced according to the gray level histogram h +1]Gray level mean value A of h (T h ),A h (T h ) Is calculated as shown in equation (6):
Figure FDA0003918252030000025
wherein b represents a gray scale, H b Representing the gray distribution corresponding to the gray scale b;
step (4), calculating the gray average value A h (T h ) And the median M of the gray scale h (T h ) Difference D of h (T h ),D h (T h ) Is calculated as shown in equation (7):
D h (T h )=M h (T h )-A h (T h ) (7)
step (5) repeating the processes from the step (1) to the step (4) to enable the high-illumination segmentation point T h In the gray scale interval [128,255]Internally traversing to find the maximum difference D h (T h ) The corresponding segmentation point is used as the final high-illumination segmentation point
Figure FDA0003918252030000026
Figure FDA0003918252030000027
Is calculated as shown in equation (8):
Figure FDA0003918252030000028
4. the image enhancement method based on regional least squares estimation according to claim 1, wherein the specific process of the third step is as follows:
low light level segmentation point
Figure FDA0003918252030000029
And high illumination segmentation point
Figure FDA00039182520300000210
The corresponding gray scale value is shown as the formula (9):
Figure FDA00039182520300000211
wherein ,
Figure FDA0003918252030000031
is composed of
Figure FDA0003918252030000032
The corresponding gray-scale value of the gray-scale value,
Figure FDA0003918252030000033
is composed of
Figure FDA0003918252030000034
The corresponding gray-scale value of the gray-scale value,
Figure FDA0003918252030000035
is composed of
Figure FDA0003918252030000036
The corresponding cumulative probability distribution is then calculated,
Figure FDA0003918252030000037
is composed of
Figure FDA0003918252030000038
Corresponding cumulative probability distributions;
performing piecewise linear brightness mapping on each boundary pixel in each image block to obtain an enhanced brightness value corresponding to each boundary pixel in each image block;
the piecewise linear luminance mapping expression is shown in equation (10):
Figure FDA0003918252030000039
wherein I represents the luminance value of the boundary pixel,
Figure FDA00039182520300000310
representing the enhanced luminance values corresponding to the boundary pixels.
5. The image enhancement method based on regional least squares estimation according to claim 1, wherein the specific process of the fourth step is as follows:
step S1, constructing a function f which is related to 28 boundary weights and has an accumulation form for the kth non-boundary pixel in all N areas k12 ,...,ω 28 ) Function f k12 ,...,ω 28 ) As shown in formula (11):
f k12 ,...,ω 28 )=∑ i1 I i,12 I i,2 +···+ω 28 I i,28 -I i (k)) 2 (11)
wherein ,ω12 ,...,ω 28 Weights for the respective boundary pixels, I i,1 Represents the enhanced brightness value corresponding to the 1 st boundary pixel in the ith area, I =1,2, …, N, I i (k) Representing the original brightness value of the kth non-boundary pixel in the ith area in the image to be enhanced;
according to the least square criterion, for function f k12 ,...,ω 28 ) Arbitrary boundary pixel weight ω j The derivative function of (a) is 0, i.e., equation (12) holds:
Figure FDA00039182520300000311
wherein j =1,2, …,28;
substituting all the boundary weights into equation (12), and combining equation (11) to obtain a linear equation system regarding the boundary weights shown in equation (13):
Figure FDA0003918252030000041
solving the formula (13) by a Jacobian iteration method to obtain an optimal solution of any boundary weight, as shown in the formula (14):
Figure FDA0003918252030000042
wherein the superscript t represents the number of iterations,
Figure FDA0003918252030000043
representing the weight of the jth boundary pixel obtained at the tth iteration,
Figure FDA0003918252030000044
representing the weight of the jth boundary pixel obtained by the t-1 iteration;
the jacobian iteration method converges when equation (15) holds for all boundary pixels:
Figure FDA0003918252030000045
Figure FDA0003918252030000046
the least square estimation result of the boundary pixel weight is obtained;
s2, calculating an enhanced brightness value of a kth non-boundary pixel in the ith area
Figure FDA0003918252030000047
Figure FDA0003918252030000048
And S3, repeating the processes from the step S1 to the step S2, and respectively obtaining the enhanced brightness value corresponding to each non-boundary pixel in each image block.
CN202211365819.9A 2022-10-31 2022-10-31 Image enhancement method based on regional least square estimation Expired - Fee Related CN115660994B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211365819.9A CN115660994B (en) 2022-10-31 2022-10-31 Image enhancement method based on regional least square estimation

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211365819.9A CN115660994B (en) 2022-10-31 2022-10-31 Image enhancement method based on regional least square estimation

Publications (2)

Publication Number Publication Date
CN115660994A true CN115660994A (en) 2023-01-31
CN115660994B CN115660994B (en) 2023-06-09

Family

ID=84995294

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211365819.9A Expired - Fee Related CN115660994B (en) 2022-10-31 2022-10-31 Image enhancement method based on regional least square estimation

Country Status (1)

Country Link
CN (1) CN115660994B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116703888A (en) * 2023-07-28 2023-09-05 菏泽城建新型工程材料有限公司 Auxiliary abnormality detection method and system for bored pile construction

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6236751B1 (en) * 1998-09-23 2001-05-22 Xerox Corporation Automatic method for determining piecewise linear transformation from an image histogram
CN101340511A (en) * 2008-08-07 2009-01-07 中兴通讯股份有限公司 Adaptive video image enhancing method based on lightness detection
CN102298770A (en) * 2011-08-11 2011-12-28 奇瑞汽车股份有限公司 Method and apparatus for enhancing image contrast
CN105654438A (en) * 2015-12-27 2016-06-08 西南技术物理研究所 Gray scale image fitting enhancement method based on local histogram equalization
CN106897972A (en) * 2016-12-28 2017-06-27 南京第五十五所技术开发有限公司 A kind of self-adapting histogram underwater picture Enhancement Method of white balance and dark primary
CN109064426A (en) * 2018-07-26 2018-12-21 电子科技大学 A kind of method and device for inhibiting dazzle in low-light (level) image and enhancing image
JP2019207603A (en) * 2018-05-30 2019-12-05 株式会社朋栄 Tone mapping processing method by maximizing edge intensity, and hdr video conversion device
CN112037144A (en) * 2020-08-31 2020-12-04 哈尔滨理工大学 A low-light image enhancement method based on local contrast stretching
CN114429426A (en) * 2021-12-20 2022-05-03 哈尔滨理工大学 Low-illumination image quality improvement method based on Retinex model

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6236751B1 (en) * 1998-09-23 2001-05-22 Xerox Corporation Automatic method for determining piecewise linear transformation from an image histogram
CN101340511A (en) * 2008-08-07 2009-01-07 中兴通讯股份有限公司 Adaptive video image enhancing method based on lightness detection
CN102298770A (en) * 2011-08-11 2011-12-28 奇瑞汽车股份有限公司 Method and apparatus for enhancing image contrast
CN105654438A (en) * 2015-12-27 2016-06-08 西南技术物理研究所 Gray scale image fitting enhancement method based on local histogram equalization
CN106897972A (en) * 2016-12-28 2017-06-27 南京第五十五所技术开发有限公司 A kind of self-adapting histogram underwater picture Enhancement Method of white balance and dark primary
JP2019207603A (en) * 2018-05-30 2019-12-05 株式会社朋栄 Tone mapping processing method by maximizing edge intensity, and hdr video conversion device
CN109064426A (en) * 2018-07-26 2018-12-21 电子科技大学 A kind of method and device for inhibiting dazzle in low-light (level) image and enhancing image
CN112037144A (en) * 2020-08-31 2020-12-04 哈尔滨理工大学 A low-light image enhancement method based on local contrast stretching
CN114429426A (en) * 2021-12-20 2022-05-03 哈尔滨理工大学 Low-illumination image quality improvement method based on Retinex model

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
ZHENGHUA HUANG等: "Global–local image enhancement with contrast improvement based on weighted least squares" *
武治国等: "一种基于直方图非线性变换的图像对比度增强方法" *
章刚玄: "红外影像增强与硬件加速技术研究", pages 9 - 20 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116703888A (en) * 2023-07-28 2023-09-05 菏泽城建新型工程材料有限公司 Auxiliary abnormality detection method and system for bored pile construction
CN116703888B (en) * 2023-07-28 2023-10-20 菏泽城建新型工程材料有限公司 Auxiliary abnormality detection method and system for bored pile construction

Also Published As

Publication number Publication date
CN115660994B (en) 2023-06-09

Similar Documents

Publication Publication Date Title
CN108510485B (en) A reference-free image quality assessment method based on convolutional neural network
CN108876743B (en) A kind of image fast dehazing method, system, terminal and storage medium
Wang et al. Dehazing for images with large sky region
CN112037144B (en) A low-light image enhancement method based on local contrast stretching
CN110807742B (en) A low-light image enhancement method based on integrated network
CN108564597B (en) Video foreground object extraction method fusing Gaussian mixture model and H-S optical flow method
CN110443778B (en) A method for detecting irregular defects in industrial products
CN107767349B (en) A kind of method of Image Warping enhancing
CN106204447A (en) The super resolution ratio reconstruction method with convolutional neural networks is divided based on total variance
CN108537756A (en) Single image to the fog method based on image co-registration
CN103353987A (en) Superpixel segmentation method based on fuzzy theory
CN108765336A (en) Image defogging method based on dark bright primary colors priori with auto-adaptive parameter optimization
CN103530847A (en) Infrared image enhancing method
CN107292842A (en) The image deblurring method suppressed based on prior-constrained and outlier
CN107154026B (en) A Method of Eliminating Pavement Shadows Based on Adaptive Luminance Elevation Model
CN103606137A (en) Histogram equalization method for maintaining background and detail information
CN110400274B (en) An infrared image enhancement method for vehicle-mounted infrared pedestrian detection
CN111311512B (en) Random noise correction method
CN109345525B (en) Ghost-removed high-dynamic-range image quality evaluation method
CN113327206B (en) Image fuzzy processing method of intelligent power transmission line inspection system based on artificial intelligence
CN102622729A (en) Spatial self-adaptive block-matching image denoising method based on fuzzy set theory
CN116309435A (en) Medical image specular reflection restoration method and system
CN115660994B (en) Image enhancement method based on regional least square estimation
CN105913391B (en) A kind of defogging method can be changed Morphological Reconstruction based on shape
CN104268845A (en) Self-adaptive double local reinforcement method of extreme-value temperature difference short wave infrared image

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20230609

CF01 Termination of patent right due to non-payment of annual fee