[go: up one dir, main page]

CN112215773B - Local motion deblurring method, device and storage medium based on visual saliency - Google Patents

Local motion deblurring method, device and storage medium based on visual saliency Download PDF

Info

Publication number
CN112215773B
CN112215773B CN202011084727.4A CN202011084727A CN112215773B CN 112215773 B CN112215773 B CN 112215773B CN 202011084727 A CN202011084727 A CN 202011084727A CN 112215773 B CN112215773 B CN 112215773B
Authority
CN
China
Prior art keywords
image
saliency
foreground
map
background
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202011084727.4A
Other languages
Chinese (zh)
Other versions
CN112215773A (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.)
Xinjiang University
Original Assignee
Xinjiang 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 Xinjiang University filed Critical Xinjiang University
Priority to CN202011084727.4A priority Critical patent/CN112215773B/en
Publication of CN112215773A publication Critical patent/CN112215773A/en
Application granted granted Critical
Publication of CN112215773B publication Critical patent/CN112215773B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/73Deblurring; Sharpening
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/70Denoising; Smoothing
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/77Retouching; Inpainting; Scratch removal
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20172Image enhancement details
    • G06T2207/20201Motion blur correction

Landscapes

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

Abstract

The invention discloses a local motion deblurring method, a device and a storage medium based on visual saliency, wherein the method comprises the following steps: detecting a saliency map of the fuzzy region by adopting the popular regularization random walk saliency, and using a detection result for marking the fuzzy region in the image; performing binarization operation on the saliency map by adopting an Otsu method based on heredity, segmenting a fuzzy foreground and a clear background into different map layers, and acquiring a foreground and background segmentation binarization image; substituting the obtained binary image into an image deblurring model based on an MAP framework for optimization, and iteratively estimating an initial fuzzy kernel and a potential image; listing the priors of the initial fuzzy kernel and the potential image, and solving the initial fuzzy kernel and the potential image based on iterative weighted least square; and further optimizing a solution result by adopting improved self-adaptive guide filtering, and keeping the edge information of the image.

Description

基于视觉显著性的局部运动去模糊方法、装置及存储介质Local motion deblurring method, device and storage medium based on visual saliency

技术领域technical field

本发明涉及图像运动去模糊技术,属于图像处理领域,尤其涉及一种基于视觉显著性的局部运动去模糊方法、装置及存储介质。The invention relates to image motion deblurring technology, belongs to the field of image processing, in particular to a visual saliency-based partial motion deblurring method, device and storage medium.

背景技术Background technique

运动模糊图像是由于摄像机与运动物体在曝光时间内有相对运动而产生的模糊,图像的模糊导致无法看清想要观察的目标物体,或者从图像中获取有价值的信息。而且拍摄过程是短暂并且不易复制重现的,很多情况下不能重新拍摄以获得清晰的图像,因此运动模糊的复原技术的研究就变得尤为重要,它应用于道路视频监控、工业生产、刑事侦查、天文观测、及军事卫星跟踪等领域。Motion blurred images are blurred due to the relative motion between the camera and the moving object within the exposure time. The blurred image makes it impossible to see the target object you want to observe, or to obtain valuable information from the image. Moreover, the shooting process is short and difficult to reproduce. In many cases, it is impossible to re-shoot to obtain a clear image. Therefore, the research on motion blur restoration technology has become particularly important. It is used in road video surveillance, industrial production, and criminal investigation. , astronomical observation, and military satellite tracking and other fields.

近年来,运动模糊图像复原方法已经取得了很大的进展,但这类方法对于局部模糊图像复原问题仍存在一定的局限性。由于前景与背景成像过程不同,使得全局一致的模糊模型不能很好的建模图像形成过程,并且由于物体的快速运动,会造成模糊是突然变化的,因此一些基于相机抖动建模的非一致去模糊方法对于这种局部运动模糊问题也不能很好的处理。还有一些现有的方法通过建立混合相机系统来获取运动物体的额外信息,但这类方法需要精心设计的硬件支持。In recent years, motion blurred image restoration methods have made great progress, but such methods still have certain limitations for the local blurred image restoration problem. Due to the difference between the foreground and the background imaging process, the globally consistent blur model cannot model the image formation process well, and due to the fast motion of the object, the blur will change suddenly, so some non-uniform blur models based on camera shake modeling Blur methods can't handle this kind of local motion blur well. There are also some existing methods to obtain additional information of moving objects by building a hybrid camera system, but such methods require well-designed hardware support.

此外,还有一些基于图像分割的局部运动模糊图像复原方法,这些方法很大程度的依赖分割质量,如果分割不精确则不会得到很好的图像复原效果,无法满足实际应用中的多种需要。In addition, there are some local motion blurred image restoration methods based on image segmentation. These methods depend on the segmentation quality to a large extent. If the segmentation is not accurate, the image restoration effect will not be very good, and it cannot meet various needs in practical applications. .

发明内容Contents of the invention

本发明提供了一种基于视觉显著性的局部运动去模糊方法、装置及存储介质,本发明提高了图像的清晰度,复原出了更高质量的清晰图像,有效的增强了图像的对比度和边缘细节,并解决了图像中模糊区域纹理信息丢失的问题,详见下文描述:The invention provides a local motion deblurring method, device and storage medium based on visual salience. The invention improves the definition of the image, restores a higher-quality clear image, and effectively enhances the contrast and edge of the image. Details, and solve the problem of texture information loss in blurred areas in the image, see the description below for details:

第一方面,一种基于视觉显著性的局部运动去模糊方法,所述方法包括:In the first aspect, a local motion deblurring method based on visual saliency, the method comprising:

采用流行正则化随机游走显著性检测模糊区域的显著图,将检测结果用于标记图像中的模糊区域;Using popular regularized random walk saliency to detect the saliency map of the blurred area, and use the detection result to mark the blurred area in the image;

采用基于遗传的大津法对显著图进行二值化操作,将模糊前景与清晰背景分割成不同的图层,获取到前景、背景分割二值化图像;The genetic-based Otsu method is used to binarize the saliency map, and the blurred foreground and clear background are divided into different layers, and the foreground and background segmentation binarized images are obtained;

将得到的二值化图像带入基于MAP框架的图像去模糊模型进行优化,迭代估计初始模糊核和潜在图像;Bring the obtained binarized image into the image deblurring model based on the MAP framework for optimization, and iteratively estimate the initial blur kernel and potential image;

列出初始模糊核和潜在图像的先验,并基于迭代加权最小二乘对初始模糊核和潜在图像求解;List the priors for the initial blur kernel and latent image, and solve for the initial blur kernel and latent image based on iteratively weighted least squares;

采用改进的自适应引导滤波对求解结果进一步优化,保持图像的边缘信息。The improved adaptive guided filtering is used to further optimize the solution results and keep the edge information of the image.

在一种实现方式中,所述采用采用流行正则化随机游走显著性检测模糊区域的显著图具体为:In an implementation manner, the saliency map of the fuzzy region detected using the popularity regularized random walk saliency is specifically:

根据定位和消除错误边界的手段来优化边界所产生的影响,获取背景显著性值;Optimize the impact of boundaries according to the means of locating and eliminating false boundaries, and obtain background saliency values;

根据前景查询的显著性估计来优化单纯的背景查询;Optimizing pure background queries based on saliency estimates for foreground queries;

基于随机游走模型,提出拟合约束,用于继承前景查询的显著性值,获取最终的显著性图。Based on the random walk model, a fitting constraint is proposed to inherit the saliency value of the foreground query to obtain the final saliency map.

在一种实现方式中,所述将得到的二值化图像带入基于MAP框架的图像去模糊模型进行优化具体为:In one implementation, the optimization of the obtained binarized image into the image deblurring model based on the MAP framework is as follows:

引入图像分割项li,将图像分割为不同的图层,对各个图层进行模糊核估计以及清晰潜像的恢复。The image segmentation item l i is introduced, the image is divided into different layers, the blur kernel is estimated and the clear latent image is recovered for each layer.

在一种实现方式中,所述改进的自适应引导滤波具体为:In an implementation manner, the improved adaptive guided filtering is specifically:

采用加权最小二乘滤波器WLS构造引导图像:The guided image is constructed using a weighted least squares filter WLS:

Figure BDA0002719970180000021
Figure BDA0002719970180000021

其中,WLS(G)v为加权最小二乘滤波器WLS构造的引导图像,Gv为图像像素的空间位置v对应的引导图像,Iv为图像像素的空间位置v对应的输入图像,v表示图像像素点 (x,y)的空间位置,指数τ决定了输入图像I在像素点v(x,y)梯度变化的敏感度,η是平滑项参数,

Figure BDA0002719970180000022
Figure BDA0002719970180000023
分别是G在x和y方向上的一阶偏导数,表示图像的陡峭程度;τx,v和τy,v为细化的权重系数;Among them, WLS(G) v is the guide image constructed by the weighted least squares filter WLS, G v is the guide image corresponding to the spatial position v of the image pixel, I v is the input image corresponding to the spatial position v of the image pixel, and v represents The spatial position of the image pixel point (x, y), the index τ determines the sensitivity of the input image I to the gradient change of the pixel point v(x, y), η is the smoothing parameter,
Figure BDA0002719970180000022
and
Figure BDA0002719970180000023
They are the first-order partial derivatives of G in the x and y directions, indicating the steepness of the image; τ x, v and τ y, v are the refined weight coefficients;

根据引导图像与输出图像之间的局部线性模型,将所有像素的局部方差的平均值纳入引导滤波的代价函数中;引入自适应放大因子β抑制噪声。According to the local linear model between the guide image and the output image, the average value of the local variance of all pixels is incorporated into the cost function of the guide filter; an adaptive amplification factor β is introduced to suppress noise.

第二方面,一种基于视觉显著性的局部运动去模糊装置,所述装置包括:In the second aspect, a local motion deblurring device based on visual saliency, the device comprising:

检测与标记模块,用于采用流行正则化随机游走显著性检测模糊区域的显著图,将检测结果用于标记图像中的模糊区域;The detection and labeling module is used to detect the saliency map of the fuzzy region using the popular regularized random walk saliency, and uses the detection result to mark the fuzzy region in the image;

第一获取模块,用于采用基于遗传的大津法对显著图进行二值化操作,将模糊前景与清晰背景分割成不同的图层,获取到前景、背景分割二值化图像;The first acquisition module is used to perform a binarization operation on the saliency map by using the Otsu method based on genetics, divide the fuzzy foreground and the clear background into different layers, and obtain the foreground and background segmentation binarized images;

第一优化模块,用于将得到的二值化图像带入基于MAP框架的图像去模糊模型进行优化,迭代估计初始模糊核和潜在图像;The first optimization module is used to bring the obtained binary image into the image deblurring model based on the MAP framework for optimization, and iteratively estimates the initial blurring kernel and potential image;

第二获取模块,用于列出初始模糊核和潜在图像的先验,并基于迭代加权最小二乘对初始模糊核和潜在图像求解;The second acquisition module is used to list the priors of the initial blur kernel and the potential image, and solve the initial blur kernel and the potential image based on iterative weighted least squares;

第二优化模块,用于采用改进的自适应引导滤波对求解结果进一步优化,保持图像的边缘信息。The second optimization module is used to further optimize the solution result by adopting the improved self-adaptive guiding filter, and keep the edge information of the image.

在一种实现方式中,所述检测与标记模块包括:In an implementation manner, the detection and marking module includes:

检测单元,用于根据定位和消除错误边界的手段来优化边界所产生的影响,获取背景显著性值;根据前景查询的显著性估计来优化单纯的背景查询;The detection unit is used to optimize the influence of the boundary according to the means of locating and eliminating the wrong boundary, and obtain the background saliency value; optimize the pure background query according to the saliency estimation of the foreground query;

拟合约束单元,用于基于随机游走模型,提出拟合约束,用于继承前景查询的显著性值,获取最终的显著性图。The fitting constraint unit is used to propose a fitting constraint based on the random walk model, and is used to inherit the saliency value of the foreground query to obtain the final saliency map.

在一种实现方式中,所述第一优化模块包括:In an implementation manner, the first optimization module includes:

分割与恢复单元,用于引入图像分割项li,将图像分割为不同的图层,对各个图层进行模糊核估计以及清晰潜像的恢复。The segmentation and restoration unit is used to introduce the image segmentation item l i , divide the image into different layers, perform blur kernel estimation on each layer and restore the clear latent image.

第三方面,一种基于视觉显著性的局部运动去模糊装置,所述装置包括:处理器和存储器,所述存储器中存储有程序指令,所述处理器调用存储器中存储的程序指令以使装置执行第一方面所述的方法步骤。In a third aspect, a local motion deblurring device based on visual saliency, the device includes: a processor and a memory, and program instructions are stored in the memory, and the processor invokes the program instructions stored in the memory to make the device Execute the method steps described in the first aspect.

第四方面,一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,所述计算机程序包括程序指令,所述程序指令被处理器执行时使所述处理器执行第一方面所述的方法步骤。In a fourth aspect, a computer-readable storage medium stores a computer program, the computer program includes program instructions, and when the program instructions are executed by a processor, the processor executes the first aspect The method steps described.

本发明提供的技术方案的有益效果是:The beneficial effects of the technical solution provided by the invention are:

1、针对最大化后验去模糊框架中模糊核和潜在图像的求解问题,本发明采用一种有效的迭代加权最小二乘算法来优化物体运动模糊估计模型求解,即在用拉普拉斯先验求解模糊核,稀疏图像梯度先验求解清晰潜像的基础上,进一步解决原有算法存在最优解不准确,算法效率低这一问题;1. Aiming at the problem of solving the blur kernel and potential image in the maximum posterior deblurring framework, the present invention adopts an effective iterative weighted least squares algorithm to optimize the solution of the object motion blur estimation model, that is, using Laplace first On the basis of solving the fuzzy kernel empirically and solving the clear latent image priori with the sparse image gradient, it further solves the problem of inaccurate optimal solution and low algorithm efficiency in the original algorithm;

2、本发明采用改进的自适应引导滤波算法解决了严重的运动模糊中纹理边缘细节难恢复的问题,通过保持图像的边缘信息,自适应抑制噪声,进一步提高了图像的清晰度,丰富了图像的细节信息。2. The present invention uses an improved self-adaptive guided filtering algorithm to solve the problem of difficult recovery of texture edge details in severe motion blur. By maintaining the edge information of the image and adaptively suppressing noise, the definition of the image is further improved and the image is enriched. details.

附图说明Description of drawings

图1为本发明提供的一种基于视觉显著性的局部运动去模糊方法的流程图;Fig. 1 is a flow chart of a local motion deblurring method based on visual saliency provided by the present invention;

图2为本发明提供的一种基于视觉显著性的局部运动去模糊方法的另一流程图;Fig. 2 is another flowchart of a local motion deblurring method based on visual saliency provided by the present invention;

图3为局部运动模糊图像的示意图;3 is a schematic diagram of a local motion blurred image;

图4为对图3去模糊处理后的目标图像的示意图;Fig. 4 is a schematic diagram of the target image after deblurring processing in Fig. 3;

图5为另一局部运动模糊图像的示意图;Fig. 5 is a schematic diagram of another partial motion blurred image;

图6为对图5去模糊处理后的目标图像的示意图;Fig. 6 is a schematic diagram of the target image after deblurring processing in Fig. 5;

图7为另一局部运动模糊图像的示意图;Fig. 7 is a schematic diagram of another partial motion blurred image;

图8为对图7去模糊处理后的目标图像的示意图;Fig. 8 is a schematic diagram of the target image after deblurring processing in Fig. 7;

图9为本发明提供的一种基于视觉显著性的局部运动去模糊装置的结构示意图;9 is a schematic structural diagram of a local motion deblurring device based on visual saliency provided by the present invention;

图10为检测与标记模块的结构示意图;Fig. 10 is a schematic structural diagram of a detection and marking module;

图11为本发明提供的一种基于视觉显著性的局部运动去模糊装置的另一结构示意图。FIG. 11 is another structural schematic diagram of a local motion deblurring device based on visual saliency provided by the present invention.

具体实施方式Detailed ways

为使本发明的目的、技术方案和优点更加清楚,下面对本发明实施方式作进一步地详细描述。In order to make the purpose, technical solution and advantages of the present invention clearer, the implementation manners of the present invention will be further described in detail below.

参见图1,本发明实施例提出了一种基于视觉显著性的局部运动去模糊方法,该方法包括以下步骤:Referring to FIG. 1 , an embodiment of the present invention proposes a local motion deblurring method based on visual saliency, which includes the following steps:

步骤101:采用流行正则化随机游走显著性检测模糊区域的显著图,将检测结果用于标记图像中的模糊区域;Step 101: using popular regularized random walk saliency to detect the saliency map of the fuzzy region, and using the detection result to mark the fuzzy region in the image;

由于物体运动造成的局部模糊图像中,每个区域的模糊核通常是不一致的,为此需要分层求解模糊核,求解出的模糊核用于恢复清晰图像,因此本发明实施例采用流行正则化随机游走显著性检测模糊区域的显著图,用以标记图像中的模糊区域。In the local blurred image caused by object movement, the blur kernel of each region is usually inconsistent, so it is necessary to solve the blur kernel layer by layer, and the solved blur kernel is used to restore the clear image, so the embodiment of the present invention adopts popular regularization Random walk saliency detection saliency map of blurred regions, used to mark blurred regions in images.

步骤102:采用基于遗传算法的Ostu(大津法)阈值分割对显著图进行二值化操作,将模糊前景与清晰背景分割成不同的图层,进而获取到前景分割二值化图像和背景分割二值化图像;Step 102: Use the Ostu (Otsu method) threshold segmentation based on genetic algorithm to perform binarization operation on the saliency map, divide the fuzzy foreground and clear background into different layers, and then obtain the foreground segmentation binarized image and background segmentation two value image;

后续步骤通过不同的图层估计模糊核,即通过上述操作提高了模糊核估计的准确性。The subsequent steps estimate the blur kernel through different layers, that is, the accuracy of blur kernel estimation is improved through the above operations.

其中,Ostu是确定图像二值化分割阈值的算法,也称作最大类间方差法,为本领域技术人员所公知,本发明实施例对此不做赘述。Wherein, Ostu is an algorithm for determining the image binarization segmentation threshold, also known as the maximum inter-class variance method, which is well known to those skilled in the art, and will not be described in detail in the embodiments of the present invention.

步骤103:将得到的二值化图像带入基于MAP框架的图像去模糊模型进行优化,即从模糊图像中迭代估计模糊核和潜在图像;Step 103: Bring the obtained binarized image into the image deblurring model based on the MAP framework for optimization, that is, iteratively estimate the blur kernel and potential image from the blurred image;

在这基于MAP框架的图像去模糊模型中,分割算法能够有效地引导运动模糊估汁,同时运动模糊估计反过来有助于分割估计,从而能较好地去除图像中的局部模糊。将该步骤得到的潜在的图像和模糊核作为中间结果,通过后续步骤的处理进一步得到最终的准确的模糊核,进而输出恢复后的清晰图像。In this image deblurring model based on the MAP framework, the segmentation algorithm can effectively guide the motion blur estimation, and the motion blur estimation in turn helps the segmentation estimation, so that the local blur in the image can be better removed. The potential image and blur kernel obtained in this step are used as intermediate results, and the final accurate blur kernel is further obtained through subsequent steps, and then the restored clear image is output.

其中,优化的最大后验去模糊框架为本领域技术人员所公知,本发明实施例对此不做赘述。Wherein, the optimized maximum a posteriori deblurring framework is well known to those skilled in the art, and this embodiment of the present invention will not describe it in detail.

步骤104:采用拉普拉斯先验和稀疏图像梯度先验分别列出初始模糊核和潜在图像的先验,基于先验值、迭代加权最小二乘算法对初始模糊核和潜在图像进一步求解;Step 104: using Laplacian prior and sparse image gradient prior to list the priors of the initial blur kernel and latent image respectively, and further solving the initial blur kernel and latent image based on the prior value and iterative weighted least squares algorithm;

针对最大后验去模糊框架中模糊核和潜在图像的求解问题,采用一种有效的迭代加权最小二乘算法对图像去模糊模型进行求解,即先用拉普拉斯先验和稀疏图像梯度先验分别定义求解初始模糊核和潜在图像的先验,然后用迭代加权最小二成算法对图像去模糊模型进一步优化求解,进一步解决原有算法存在最优解不准确,算法的效率低这一问题。Aiming at the problem of solving the blur kernel and latent image in the maximum a posteriori deblurring framework, an effective iterative weighted least squares algorithm is used to solve the image deblurring model, that is, the Laplacian prior and the sparse image gradient prior are used to solve the image deblurring model. Define and solve the prior of the initial blur kernel and potential image respectively, and then use the iterative weighted least square algorithm to further optimize and solve the image deblurring model, and further solve the problem of inaccurate optimal solution and low efficiency of the original algorithm .

步骤105:采用改进的自适应引导滤波对步骤104的求解结果进一步的优化,用于解决运动模糊较为严重时在纹理边缘细节模糊的问题,通过保持图像的边缘信息,自适应抑制噪声,进一步提高了图像的清晰度,丰富了图像的细节信息。Step 105: Use the improved adaptive guided filtering to further optimize the solution result of step 104, which is used to solve the problem of blurred texture edge details when the motion blur is relatively serious. By maintaining the edge information of the image, adaptively suppressing noise, and further improving It improves the clarity of the image and enriches the details of the image.

综上所述,本发明实施例通过上述步骤101-步骤105提高了图像的清晰度,复原出了更高质量的清晰图像,有效的增强了图像的对比度和边缘细节,并解决了图像中模糊区域纹理信息丢失的问题。In summary, the embodiment of the present invention improves the definition of the image through the above steps 101 to 105, restores a clear image of higher quality, effectively enhances the contrast and edge details of the image, and solves the problem of blurring in the image The problem of loss of area texture information.

下面结合图2、具体的计算公式,对上述实施例中的一种基于显著性的局部运动模糊恢复方法进行详细地细化和扩展,本发明采用的实验对象为不同模糊程度的局部运动模糊图像,针对模糊图像中信息丢失的问题,该方法包括以下步骤:In the following, in conjunction with Fig. 2 and the specific calculation formula, a saliency-based local motion blur recovery method in the above embodiment is detailed and expanded. The experimental objects used in the present invention are local motion blur images with different degrees of blur , aiming at the problem of information loss in blurred images, the method includes the following steps:

步骤201:采用流行正则化随机游走显著性检测模糊区域的显著图,用于标记图像中的模糊区域;Step 201: using popular regularized random walk saliency to detect the saliency map of the fuzzy region, which is used to mark the fuzzy region in the image;

由于物体运动造成的局部模糊图像中,模糊核通常是不一致的,需要分层求解模糊核,因此本发明实施例采用流行正则化随机游走显著性检测模糊区域的显著图,用以标记图像中的模糊区域,该算法既利用了局域特征,又利用了图像细节信息,提供更准确的显著性估计。In the local blurred image caused by object motion, the blur kernel is usually inconsistent, and the blur kernel needs to be solved hierarchically. Therefore, the embodiment of the present invention uses the popular regularized random walk saliency to detect the saliency map of the blur region to mark the image The algorithm uses both local features and image detail information to provide more accurate saliency estimation.

在进行背景显著性检测之前,通过定位和消除错误边界的手段来优化边界所产生的影响。基于流行排序正则化框架,删除属于背景的概率最小的那些边界,并且通过背景查询生成显著性估计,流行排序函数如下所示:The impact of boundaries is optimized by locating and eliminating false boundaries before performing background saliency detection. Based on the popular ranking regularization framework, those boundaries with the smallest probability of belonging to the background are deleted, and the saliency estimation is generated through the background query. The popular ranking function is as follows:

Figure BDA0002719970180000061
Figure BDA0002719970180000061

其中,f*为流行排序函数值,dii,djj分别为局部图的度矩阵(本领域的专业术语,在此不做赘述)第i,j行的对角元素,参数α为控制平滑约束(加号之前的第一项)和拟合约束(加号之后的第二项)之间的平衡;fi为i节点的排序值,fj为j节点的排序值,ωij是图边缘的权重矩阵,n为元素数,y是指示向量,定义为y=[y1,…,yn]T,则通过逐像素相乘,得到背景显著性:Among them, f * is the value of the popular ranking function, d ii and d jj are the degree matrix of the local graph (technical terms in this field, so I won’t go into details here), and the diagonal elements of the i and j rows, and the parameter α is the control smoothing The balance between constraints (the first item before the plus sign) and fitting constraints (the second item after the plus sign); f i is the ranking value of node i, f j is the ranking value of node j, and ω ij is the graph The weight matrix of the edge, n is the number of elements, y is the indicator vector, defined as y=[y 1 ,…,y n ] T , then the background saliency can be obtained by pixel-by-pixel multiplication:

Figure BDA0002719970180000062
Figure BDA0002719970180000062

其中,l是目标区域中的总像素数,n是总超像素数,Sl(i)为基于前景的显着性值,fl *(i) 由公式(1)计算,在这里l对应于消除错误边界后的三个边界位置,Sstep1(i)为一次排序的背景显著性估计值。where l is the total number of pixels in the target region, n is the total number of superpixels, S l (i) is the foreground-based saliency value, f l * (i) is calculated by formula (1), where l corresponds to At the three boundary positions after the error boundary is eliminated, S step1 (i) is the background saliency estimation value of a ranking.

但是单纯的背景查询有时候对于完全描述前景信息是不准确的,特别是当显著性目标结构复杂且与背景布局方面相似时。鉴于此,提出了接下来的基于前景查询的显著性估计,排序函数

Figure BDA0002719970180000063
可以直接从方程(1)计算,并将其作为前景显着性估计处理如下:But pure background query is sometimes inaccurate for fully describing foreground information, especially when the saliency objects are complex in structure and similar in layout aspect to the background. In view of this, the next foreground query based saliency estimation, ranking function
Figure BDA0002719970180000063
can be computed directly from Equation (1) and treated as a foreground saliency estimate as follows:

Sstep2(i)=f(i),i=1,...,n, (3)S step2 (i)=f(i),i=1,...,n, (3)

其中,Sstep2(i)为二次排序的前景显著性估计值,f(i)为i超像素的排序函数估计值。Among them, S step2 (i) is the estimated value of the foreground saliency of the secondary ranking, and f(i) is the estimated value of the ranking function of the i superpixel.

同时利用流行正则化随机游走算法以生成像素级显著图,而该像素级的显著图来自基于超像素的背景以及前景的显著性估计。At the same time, the popular regularized random walk algorithm is used to generate a pixel-level saliency map, and the pixel-level saliency map comes from the background and foreground saliency estimation based on superpixels.

本发明实施例基于随机游走模型,提出了一种拟合约束:The embodiment of the present invention proposes a fitting constraint based on the random walk model:

Figure BDA0002719970180000071
Figure BDA0002719970180000071

其中,Dir为狄利克雷积分,Y是一个逐像素的指示向量,继承步骤Sstep2的值。正则化的随机游动排序是按像素级计算的,因此pk和Y都是N×1的向量,L是N×N的矩阵,其中N是图像中的总像素数,T为矩阵的转置,k为1或2,其中k=1对应于背景标签, k=2对应于前景标签。Among them, Dir is the Dirichlet integral, Y is a pixel-by-pixel indicator vector, and inherits the value of step S step2 . The regularized random walk ordering is computed at the pixel level, so both p k and Y are N×1 vectors, L is an N×N matrix, where N is the total number of pixels in the image, and T is the transformation of the matrix set, k is 1 or 2, where k=1 corresponds to the background label, and k=2 corresponds to the foreground label.

步骤202:采用基于遗传算法的Ostu阈值分割算法对显著图进行二值化操作;Step 202: Binarize the saliency map by using the Ostu threshold segmentation algorithm based on the genetic algorithm;

具体实现时在得到显著图后采用基于遗传算法的Ostu阈值分割算法对显著图进行二值化操作,其中白色表示显著区域部分用1来表示,黑色对应的非显著区域用0来表示。In the specific implementation, after the saliency map is obtained, the Ostu threshold segmentation algorithm based on genetic algorithm is used to perform binarization operation on the saliency map, in which white represents the salient area part is represented by 1, and the black corresponding non-salient area is represented by 0.

传统的Ostu算法针对图像本身的灰度信息进行处理,像素和邻域之间的空间信息并未得以处理,故图像在受到噪声或其它外界因素干扰时容易造成分割错误,并且计算步骤繁琐。而遗传算法在运行过程中具有全局搜索和并行性的特点,可对阈值进行智能化的择优处理,在很大程度上提高了图像分割的处理效率。因此本发明实施例结合遗传算法通过寻求最优Ostu阈值,切实提高图像分割效率,并利用形态学运算来消除噪点,优化分割结果。The traditional Ostu algorithm processes the grayscale information of the image itself, but does not process the spatial information between pixels and neighborhoods. Therefore, when the image is disturbed by noise or other external factors, it is easy to cause segmentation errors, and the calculation steps are cumbersome. The genetic algorithm has the characteristics of global search and parallelism in the running process, and it can intelligently select the optimal threshold value, which greatly improves the processing efficiency of image segmentation. Therefore, the embodiment of the present invention combines the genetic algorithm to effectively improve the image segmentation efficiency by seeking the optimal Ostu threshold, and uses morphological operations to eliminate noise and optimize the segmentation result.

步骤203:从模糊图像B中估计潜在图像X和模糊核K,对基于MAP(最大后验) 框架的图像去模糊模型进行了优化,引入图像分割项li,将图像分割为不同的图层,并对各个图层进行模糊核估计以及潜像X的恢复;Step 203: Estimate the latent image X and blur kernel K from the blurred image B, optimize the image deblurring model based on the MAP (Maximum A Posteriori) framework, introduce the image segmentation item l i , and divide the image into different layers , and perform blur kernel estimation and latent image X recovery on each layer;

上述提出优化的图像去模糊模型是:The optimized image deblurring model proposed above is:

Figure BDA0002719970180000072
Figure BDA0002719970180000072

其中,m表示分割图层数,li表示第i个图层的二值图,并和输入图像有相同的大小, Ki是第i个图层对应的模糊核,同时满足

Figure BDA0002719970180000073
p为概率符号,p(X)为潜像X的先验概率,p(K)为模糊核K的先验概率,p(li|Ki,X)为引入分割项li推导得到的先验概率, p(Ki)为第i个图层对应的模糊核的先验概率,p(B|K,X)为从模糊图像B中估计潜在图像X和模糊核K的概率,p(B|li,Ki,X)为似然概率。Among them, m represents the number of segmentation layers, l i represents the binary image of the i-th layer, and has the same size as the input image, K i is the blur kernel corresponding to the i-th layer, and satisfies
Figure BDA0002719970180000073
p is the probability symbol, p(X) is the prior probability of the latent image X, p(K) is the prior probability of the blur kernel K, p(l i |K i ,X) is derived by introducing the segmentation item l i Prior probability, p(K i ) is the prior probability of the blur kernel corresponding to the i-th layer, p(B|K,X) is the probability of estimating the potential image X and the blur kernel K from the blurred image B, p (B|l i ,K i ,X) is the likelihood probability.

其中,优化的图像去模糊模型的关键是从中求解出潜在图像X和模糊核K。Among them, the key to the optimized image deblurring model is to solve the latent image X and blur kernel K from it.

步骤204:通过交替最小化公式迭代求解潜在的清晰图像X和模糊核Ki,并且引入一种有效的迭代加权最小二乘(IRLS)算法对图像去模糊模型进行最优化求解;Step 204: iteratively solve the potential clear image X and the blur kernel K i through the alternate minimization formula, and introduce an effective iterative weighted least squares (IRLS) algorithm to optimize the image deblurring model;

基于上面的讨论,本发明实施例需要定义清晰潜像X和模糊核Ki的先验p(X)和p(Ki)。即使用稀疏图像梯度先验定义清晰潜像X的先验p(X),以及用拉普拉斯先验定义模糊核Ki的先验p(Ki):Based on the above discussion, the embodiments of the present invention need to define the priors p(X) and p(K i ) of the clear latent image X and the blur kernel K i . That is, use the sparse image gradient prior to define the prior p(X) of the clear latent image X, and use the Laplace prior to define the prior p(K i ) of the blur kernel K i :

Figure BDA0002719970180000081
Figure BDA0002719970180000081

其中,

Figure BDA0002719970180000082
Figure BDA0002719970180000083
Figure BDA0002719970180000084
分别表示x,y方向上微分算子;λ和γ是权重参数;ZX和ZK是正则项,Xu为像素空间位置u 的清晰潜像,Kiu为第i个图层像素空间位置u对应的模糊核,u为一个像素的空间位置。in,
Figure BDA0002719970180000082
Figure BDA0002719970180000083
and
Figure BDA0002719970180000084
Denote the differential operator in the x and y directions respectively; λ and γ are weight parameters; Z X and Z K are regular terms, X u is the clear latent image of the pixel space position u, and K iu is the pixel space position of the i-th layer The blur kernel corresponding to u, where u is the spatial position of a pixel.

利用上一次迭代的模糊核K,对中间潜在图像X进行估计:Using the blur kernel K from the previous iteration, the intermediate latent image X is estimated:

Figure BDA0002719970180000085
Figure BDA0002719970180000085

其中,liu为第i个图层像素空间位置u对应的二值图,Xu为像素空间位置u的清晰潜像。Among them, l iu is the binary image corresponding to the pixel space position u of the i-th layer, and X u is the clear latent image of the pixel space position u.

采用IRLS算法对以下公式进行求解:The IRLS algorithm is used to solve the following formula:

Figure BDA0002719970180000086
Figure BDA0002719970180000086

其中,ωdu=|(x*Ki-B)u|-1,

Figure BDA0002719970180000087
t表示迭代索引,u表示每个像素的空间位置,liu为第i个图层像素空间位置u对应的二值图。Among them, ω du =|(x*K i -B) u | -1 ,
Figure BDA0002719970180000087
t represents the iteration index, u represents the spatial position of each pixel, l iu is the binary image corresponding to the i-th layer pixel spatial position u.

给定中间潜在图像,对模糊核进行估计。由于基于图像梯度的核估计能够取得更好的结果,因此用数据拟合项中的图像导数代替图像强度,并去除小的梯度值来估计模糊核,则模糊核Ki估计为:Given an intermediate latent image, estimate the blur kernel. Since the kernel estimation based on the image gradient can achieve better results, the image derivative in the data fitting item is used to replace the image intensity, and the small gradient value is removed to estimate the blur kernel, then the blur kernel K i is estimated as:

Figure BDA0002719970180000088
Figure BDA0002719970180000088

其中,

Figure BDA0002719970180000091
为梯度算子。in,
Figure BDA0002719970180000091
is the gradient operator.

与潜像X求解相似,采用IRLS算法对以下公式进行求解:Similar to the solution of the latent image X, the IRLS algorithm is used to solve the following formula:

Figure BDA0002719970180000092
Figure BDA0002719970180000092

其中,

Figure BDA0002719970180000093
ωu=|Kiu|-1。in,
Figure BDA0002719970180000093
ω u = |K iu | −1 .

步骤205:针对运动模糊较为严重时,采用改进的自适应引导滤波算法来进一步增强图像,提高图像的清晰度,丰富图像的细节信息。Step 205: When the motion blur is serious, use an improved adaptive guided filtering algorithm to further enhance the image, improve the definition of the image, and enrich the detail information of the image.

引导滤波器是一种能增强图像细节的滤波器。该滤波器通过一幅引导图像对输入图像进行滤波处理,滤波过程中的引导图像记为G,输入图像记为I,滤波输出图像记为Q,假设在以像素r为中心的窗口ωr中引导图像G和输出图像Q之间存在如下的局部线性模型:A guided filter is a filter that enhances image detail. The filter filters the input image through a guide image. The guide image in the filtering process is denoted as G, the input image is denoted as I, and the filtered output image is denoted as Q. Assume that in the window ω r centered on the pixel r There is a local linear model between the guide image G and the output image Q as follows:

Figure BDA0002719970180000094
Figure BDA0002719970180000094

其中,ar和br为窗口ωr中的线性系数。Among them, a r and b r are the linear coefficients in the window ω r .

首先为了使得图像的细节进一步增强,充分获得引导图像的边缘特征,本发明实施例采用加权最小二乘滤波器WLS来构造图像的引导图像,如下所示:First, in order to further enhance the details of the image and fully obtain the edge features of the guide image, the embodiment of the present invention uses a weighted least squares filter WLS to construct the guide image of the image, as shown below:

Figure BDA0002719970180000095
Figure BDA0002719970180000095

其中,WLS(G)v为加权最小二乘滤波器WLS构造的引导图像,Gv为图像像素的空间位置v对应的引导图像,Iv为图像像素的空间位置v对应的输入图像,v表示图像像素点 (x,y)的空间位置,指数τ决定了输入图像I在像素点v(x,y)梯度变化的敏感度,η是平滑项参数,

Figure BDA0002719970180000096
Figure BDA0002719970180000097
分别是G在x和y方向上的一阶偏导数,表示图像的陡峭程度;τx,v和τy,v细化权重系数,可确定图像I的边缘,不同陡峭程度边缘具有不同的权重系数。Among them, WLS(G) v is the guide image constructed by the weighted least squares filter WLS, G v is the guide image corresponding to the spatial position v of the image pixel, I v is the input image corresponding to the spatial position v of the image pixel, and v represents The spatial position of the image pixel point (x, y), the index τ determines the sensitivity of the input image I to the gradient change of the pixel point v(x, y), η is the smoothing parameter,
Figure BDA0002719970180000096
and
Figure BDA0002719970180000097
They are the first-order partial derivatives of G in the x and y directions, indicating the steepness of the image; τ x,v and τ y , v refine the weight coefficients, which can determine the edge of the image I, and the edges with different steepness have different weights coefficient.

其次,引导图像滤波虽然具有良好的保边性,但它容易受到边缘附近的光晕伪影的影响。因此将所有像素的局部方差的平均值纳入引导滤波的代价函数中,以精确地保持边缘。则所有像素的局部方差的平均值定义为:Second, guided image filtering, although good at preserving edges, is susceptible to halo artifacts near edges. Therefore, the average of the local variances of all pixels is incorporated into the cost function of guided filtering to preserve edges precisely. Then the mean value of the local variance of all pixels is defined as:

Figure BDA0002719970180000098
Figure BDA0002719970180000098

其中,N是引导图像的像素数;

Figure BDA0002719970180000101
为标准差的平均值,
Figure BDA0002719970180000102
是引导图像在窗口ωr中的局部方差。因此在窗口中对代价函数求最小解为:Wherein, N is the number of pixels of the guide image;
Figure BDA0002719970180000101
is the mean of the standard deviation,
Figure BDA0002719970180000102
is the local variance of the guided image in the window ωr . Therefore, the minimum solution to the cost function in the window is:

Figure BDA0002719970180000103
Figure BDA0002719970180000103

其中,ε是正则项平滑参数,用于防止ar过大。Among them, ε is the smoothing parameter of the regular term, which is used to prevent a r from being too large.

最后,背景中的噪声往往由于细节层J的放大因子而被放大。一般的情况下细节层的放大系数设置为固定值,但是在增强图像的同时也会放大噪声,因此在细节层引入自适应放大因子β,来抑制噪声,提高细节。将细节层乘以放大因子β:Finally, the noise in the background is often amplified due to the amplification factor of the detail layer J. In general, the magnification factor of the detail layer is set to a fixed value, but the noise will be amplified while enhancing the image, so an adaptive magnification factor β is introduced in the detail layer to suppress noise and improve details. Multiply the detail layer by the magnification factor β:

J'=β·J=β·(G-Q) (15)J'=β·J=β·(G-Q) (15)

其中,J′是增强的细节层。当β的值小时,细节将被抑制。另一方面,β的值较大时,噪声会放大。因此,在噪声抑制同时又能增强细节,将β设为:where J′ is the enhanced detail layer. When the value of β is small, details will be suppressed. On the other hand, when the value of β is large, the noise will be amplified. Therefore, to enhance the details while suppressing the noise, set β as:

Figure BDA0002719970180000104
Figure BDA0002719970180000104

因此最终的输出图像为:F=Q+J′,

Figure BDA0002719970180000105
为窗口ωr中的线性系数a的均值。Therefore, the final output image is: F=Q+J',
Figure BDA0002719970180000105
is the mean value of the linear coefficient a in the window ω r .

基于同一发明构思,作为上述方法的实现,参见图9,本发明实施例还提供了一种基于视觉显著性的局部运动去模糊装置,该装置包括:Based on the same inventive concept, as an implementation of the above method, referring to FIG. 9, an embodiment of the present invention also provides a local motion deblurring device based on visual saliency, which includes:

检测与标记模块1,用于采用流行正则化随机游走显著性检测模糊区域的显著图,将检测结果用于标记图像中的模糊区域;The detection and marking module 1 is used to detect the saliency map of the fuzzy region by using the popular regularized random walk saliency, and use the detection result to mark the fuzzy region in the image;

第一获取模块2,用于采用基于遗传的大津法对显著图进行二值化操作,将模糊前景与清晰背景分割成不同的图层,获取到前景、背景分割二值化图像;The first acquisition module 2 is used to perform a binarization operation on the saliency map using the Otsu method based on genetics, divide the fuzzy foreground and the clear background into different layers, and obtain the foreground and background segmentation binarized images;

第一优化模块3,用于将得到的二值化图像带入基于MAP框架的图像去模糊模型进行优化,迭代估计初始模糊核和潜在图像;The first optimization module 3 is used to bring the obtained binary image into the image deblurring model based on the MAP framework for optimization, iteratively estimating the initial blur kernel and potential image;

第二获取模块4,用于列出初始模糊核和潜在图像的先验,并基于迭代加权最小二乘对初始模糊核和潜在图像求解;The second acquisition module 4 is used to list the priors of the initial blur kernel and the potential image, and solve the initial blur kernel and the potential image based on iterative weighted least squares;

第二优化模块5,用于采用改进的自适应引导滤波对求解结果进一步优化,保持图像的边缘信息。The second optimization module 5 is used to further optimize the solution result by adopting the improved self-adaptive guided filtering, and keep the edge information of the image.

具体实现时,参见图10,该检测与标记模块1包括:During specific implementation, referring to Fig. 10, the detection and marking module 1 includes:

检测单元11,用于根据定位和消除错误边界的手段来优化边界所产生的影响,获取背景显著性值;根据前景查询的显著性估计来优化单纯的背景查询;The detection unit 11 is used to optimize the influence of the boundary according to the means of locating and eliminating the wrong boundary, and obtain the background saliency value; optimize the pure background query according to the saliency estimation of the foreground query;

拟合约束单元12,用于基于随机游走模型,提出拟合约束,用于继承前景查询的显著性值,获取最终的显著性图;The fitting constraint unit 12 is used to propose a fitting constraint based on the random walk model, and is used to inherit the saliency value of the foreground query to obtain the final saliency map;

标记单元13,用于将检测结果用于标记图像中的模糊区域。The marking unit 13 is configured to use the detection result to mark blurred areas in the image.

在一种实现方式中,第一优化模块2包括:In one implementation, the first optimization module 2 includes:

分割与恢复单元,用于引入图像分割项li,将图像分割为不同的图层,对各个图层进行模糊核估计以及清晰潜像的恢复。The segmentation and restoration unit is used to introduce the image segmentation item l i , divide the image into different layers, perform blur kernel estimation on each layer and restore the clear latent image.

这里需要指出的是,以上实施例中的装置描述是与上述方法实施例描述相对应的,本发明实施例在此不做赘述。It should be pointed out here that the device descriptions in the above embodiments correspond to the descriptions of the above method embodiments, and details are not described in this embodiment of the present invention.

上述各个模块、单元的执行主体可以是计算机、单片机、微控制器等具有计算功能的器件,具体实现时,本发明实施例对执行主体不做限制,根据实际应用中的需要进行选择。The execution subjects of the above-mentioned modules and units may be devices with computing functions such as computers, single-chip microcomputers, microcontrollers, etc. During specific implementation, the embodiment of the present invention does not limit the execution subject, and the execution subjects are selected according to the needs of practical applications.

基于同一发明构思,本发明实施例还提供了一种基于视觉显著性的局部运动去模糊装置,参见图11,该装置包括:处理器6和存储器7,存储器7中存储有程序指令,处理器 6调用存储器7中存储的程序指令以使装置执行实施例中的以下方法步骤:Based on the same inventive concept, an embodiment of the present invention also provides a local motion deblurring device based on visual saliency, as shown in FIG. 6 calling the program instructions stored in the memory 7 to make the device perform the following method steps in the embodiment:

采用流行正则化随机游走显著性检测模糊区域的显著图,将检测结果用于标记图像中的模糊区域;Using popular regularized random walk saliency to detect the saliency map of the blurred area, and use the detection result to mark the blurred area in the image;

采用基于遗传的大津法对显著图进行二值化操作,将模糊前景与清晰背景分割成不同的图层,获取到前景、背景分割二值化图像;The genetic-based Otsu method is used to binarize the saliency map, and the blurred foreground and clear background are divided into different layers, and the foreground and background segmentation binarized images are obtained;

将得到的二值化图像带入基于MAP框架的图像去模糊模型进行优化,迭代估计初始模糊核和潜在图像;Bring the obtained binarized image into the image deblurring model based on the MAP framework for optimization, and iteratively estimate the initial blur kernel and potential image;

列出初始模糊核和潜在图像的先验,并基于迭代加权最小二乘对初始模糊核和潜在图像求解;List the priors for the initial blur kernel and latent image, and solve for the initial blur kernel and latent image based on iteratively weighted least squares;

采用改进的自适应引导滤波对求解结果进一步优化,保持图像的边缘信息。The improved adaptive guided filtering is used to further optimize the solution results and keep the edge information of the image.

这里需要指出的是,以上实施例中的装置描述是与实施例中的方法描述相对应的,本发明实施例在此不做赘述。It should be pointed out here that the device descriptions in the above embodiments correspond to the method descriptions in the embodiments, and the embodiments of the present invention will not be repeated here.

上述的处理器和存储器的执行主体可以是计算机、单片机、微控制器等具有计算功能的器件,具体实现时,本发明实施例对执行主体不做限制,根据实际应用中的需要进行选择。The execution subject of the above-mentioned processor and memory may be a device with computing functions such as a computer, a single-chip microcomputer, and a microcontroller. When implementing it, the embodiment of the present invention does not limit the execution subject, and it can be selected according to the needs of practical applications.

存储器7和处理器6之间通过总线8传输数据信号,本发明实施例对此不做赘述。Data signals are transmitted between the memory 7 and the processor 6 through the bus 8, which will not be described in detail in this embodiment of the present invention.

基于同一发明构思,本发明实施例还提供了一种计算机可读存储介质,存储介质包括存储的程序,在程序运行时控制存储介质所在的设备执行上述实施例中的方法步骤。Based on the same inventive concept, an embodiment of the present invention also provides a computer-readable storage medium, the storage medium includes a stored program, and when the program is running, the device where the storage medium is located is controlled to execute the method steps in the above embodiments.

该计算机可读存储介质包括但不限于快闪存储器、硬盘、固态硬盘等。The computer-readable storage medium includes, but is not limited to, flash memory, hard disk, solid-state hard disk, and the like.

这里需要指出的是,以上实施例中的可读存储介质描述是与实施例中的方法描述相对应的,本发明实施例在此不做赘述。It should be pointed out here that the description of the readable storage medium in the above embodiments corresponds to the description of the method in the embodiments, and the embodiments of the present invention will not be repeated here.

在上述实施例中,可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现。计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行所述计算机程序指令时,全部或部分地产生按照本发明实施例的流程或功能。In the above embodiments, all or part of them may be implemented by software, hardware, firmware or any combination thereof. When implemented using software, it may be implemented in whole or in part in the form of a computer program product. A computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on the computer, the processes or functions according to the embodiments of the present invention will be generated in whole or in part.

计算机可以是通用计算机、专用计算机、计算机网络、或者其他可编程装置。计算机指令可以存储在计算机可读存储介质中,或者通过计算机可读存储介质进行传输。计算机可读存储介质可以是计算机能够存取的任何可用介质或者是包含一个或多个可用介质集成的服务器、数据中心等数据存储设备。可用介质可以是磁性介质或者半导体介质等。A computer can be a general purpose computer, special purpose computer, computer network, or other programmable device. Computer instructions may be stored in or transmitted over computer-readable storage media. The computer-readable storage medium may be any available medium that can be accessed by a computer, or a data storage device such as a server, a data center, etc. integrated with one or more available media. Available media can be magnetic media or semiconductor media, etc.

本发明实施例对各器件的型号除做特殊说明的以外,其他器件的型号不做限制,只要能完成上述功能的器件均可。In the embodiments of the present invention, unless otherwise specified, the models of the devices are not limited, as long as they can complete the above functions.

本领域技术人员可以理解附图只是一个优选实施例的示意图,上述本发明实施例序号仅仅为了描述,不代表实施例的优劣。Those skilled in the art can understand that the accompanying drawing is only a schematic diagram of a preferred embodiment, and the serial numbers of the above-mentioned embodiments of the present invention are for description only, and do not represent the advantages and disadvantages of the embodiments.

以上所述仅为本发明的较佳实施例,并不用以限制本发明,凡在本发明的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。The above descriptions are only preferred embodiments of the present invention, and are not intended to limit the present invention. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present invention shall be included in the protection of the present invention. within range.

Claims (6)

1.一种基于视觉显著性的局部运动去模糊方法,其特征在于,所述方法包括:1. A local motion deblurring method based on visual saliency, characterized in that the method comprises: 采用流行正则化随机游走显著性检测模糊区域的显著图,将检测结果用于标记图像中的模糊区域;Using popular regularized random walk saliency to detect the saliency map of the blurred area, and use the detection result to mark the blurred area in the image; 采用基于遗传的大津法对显著图进行二值化操作,将模糊前景与清晰背景分割成不同的图层,获取到前景、背景分割二值化图像;The genetic-based Otsu method is used to binarize the saliency map, and the fuzzy foreground and clear background are divided into different layers, and the foreground and background segmentation binarized images are obtained; 将得到的二值化图像带入基于MAP框架的图像去模糊模型进行优化,迭代估计初始模糊核和潜在图像;Bring the obtained binarized image into the image deblurring model based on the MAP framework for optimization, and iteratively estimate the initial blur kernel and potential image; 列出初始模糊核和潜在图像的先验,并基于迭代加权最小二乘对初始模糊核和潜在图像求解;List the priors for the initial blur kernel and latent image, and solve for the initial blur kernel and latent image based on iteratively weighted least squares; 采用改进的自适应引导滤波对求解结果进一步优化,保持图像的边缘信息;The improved adaptive guided filtering is used to further optimize the solution results and maintain the edge information of the image; 其中,所述采用流行正则化随机游走显著性检测模糊区域的显著图具体为:Wherein, the saliency map of the fuzzy region detected by the popularity regularized random walk saliency is specifically: 根据定位和消除错误边界的手段来优化边界所产生的影响,获取背景显著性值;Optimize the impact of boundaries according to the means of locating and eliminating false boundaries, and obtain background saliency values; 根据前景查询的显著性估计来优化单纯的背景查询;Optimizing pure background queries based on saliency estimates for foreground queries; 基于随机游走模型,提出拟合约束,用于继承前景查询的显著性值,获取最终的显著性图;Based on the random walk model, a fitting constraint is proposed to inherit the saliency value of the foreground query to obtain the final saliency map; 背景显著性值:Background significance value:
Figure FDA0003801122060000011
Figure FDA0003801122060000011
其中,l是目标区域中的总像素数,n是总超像素数,Sl(i)为基于前景的显着性值,fl *(i)为流行排序函数值,Sstep1(i)为一次排序的背景显著性估计值;where l is the total number of pixels in the target region, n is the total number of superpixels, S l (i) is the foreground-based saliency value, f l * (i) is the value of the popular ranking function, S step1 (i) is the background saliency estimate for a ranking; 前景查询的显著性估计:Saliency estimation for foreground queries: Sstep2(i)=f(i),i=1,...,n,S step2 (i)=f(i),i=1,...,n, 其中,Sstep2(i)为二次排序的前景显著性估计值,f(i)为i超像素的排序函数估计值;Among them, S step2 (i) is the estimated value of the foreground saliency of the secondary ranking, and f(i) is the estimated value of the ranking function of the i superpixel; 所述拟合约束:The fit constraints:
Figure FDA0003801122060000012
Figure FDA0003801122060000012
其中,Dir为狄利克雷积分,Y是一个逐像素的指示向量,继承步骤Sstep2的值,pk和Y都是N×1的向量,L是N×N的矩阵,N是图像中的总像素数,T为矩阵的转置,k为1或2;Among them, Dir is the Dirichlet integral, Y is a pixel-by-pixel indicator vector, inherits the value of step S step2 , p k and Y are both N×1 vectors, L is an N×N matrix, and N is the image in The total number of pixels, T is the transpose of the matrix, k is 1 or 2; 其中,所述将得到的二值化图像带入基于MAP框架的图像去模糊模型进行优化具体为:Wherein, the described binarized image that will obtain is brought into the image deblurring model based on MAP framework to optimize specifically as follows: 引入图像分割项li,将图像分割为不同的图层,对各个图层进行模糊核估计以及清晰潜像的恢复;Introduce the image segmentation item l i , divide the image into different layers, estimate the blur kernel and recover the clear latent image for each layer; 所述改进的自适应引导滤波具体为:The improved adaptive guided filtering is specifically: 采用加权最小二乘滤波器WLS构造引导图像:The guided image is constructed using a weighted least squares filter WLS:
Figure FDA0003801122060000021
Figure FDA0003801122060000021
其中,WLS(G)v为加权最小二乘滤波器WLS构造的引导图像,Gv为图像像素的空间位置v对应的引导图像,Iv为图像像素的空间位置v对应的输入图像,v表示图像像素点(x,y)的空间位置,指数τ决定了输入图像I在像素点v(x,y)梯度变化的敏感度,η是平滑项参数,
Figure FDA0003801122060000022
Figure FDA0003801122060000023
分别是G在x和y方向上的一阶偏导数,表示图像的陡峭程度;τx,v和τy,v为细化的权重系数;
Among them, WLS(G) v is the guide image constructed by the weighted least squares filter WLS, G v is the guide image corresponding to the spatial position v of the image pixel, I v is the input image corresponding to the spatial position v of the image pixel, and v represents The spatial position of the image pixel point (x, y), the index τ determines the sensitivity of the input image I to the gradient change of the pixel point v(x, y), η is the smoothing parameter,
Figure FDA0003801122060000022
and
Figure FDA0003801122060000023
are the first-order partial derivatives of G in the x and y directions, indicating the steepness of the image; τ x,v and τ y,v are the weight coefficients for refinement;
根据引导图像与输出图像之间的局部线性模型,将所有像素的局部方差的平均值纳入引导滤波的代价函数中,引入自适应放大因子β抑制噪声。According to the local linear model between the guide image and the output image, the average value of the local variance of all pixels is incorporated into the cost function of the guide filter, and an adaptive amplification factor β is introduced to suppress noise.
2.一种基于视觉显著性的局部运动去模糊装置,其特征在于,所述装置用于执行权利要求1中的所述局部运动去模糊方法,所述装置包括:2. A local motion deblurring device based on visual saliency, wherein the device is used to implement the local motion deblurring method in claim 1, the device comprising: 检测与标记模块,用于采用流行正则化随机游走显著性检测模糊区域的显著图,将检测结果用于标记图像中的模糊区域;The detection and labeling module is used to detect the saliency map of the fuzzy region using the popular regularized random walk saliency, and uses the detection result to mark the fuzzy region in the image; 第一获取模块,用于采用基于遗传的大津法对显著图进行二值化操作,将模糊前景与清晰背景分割成不同的图层,获取到前景、背景分割二值化图像;The first acquisition module is used to perform a binarization operation on the saliency map by using the Otsu method based on genetics, divide the fuzzy foreground and the clear background into different layers, and obtain the foreground and background segmentation binarized images; 第一优化模块,用于将得到的二值化图像带入基于MAP框架的图像去模糊模型进行优化,迭代估计初始模糊核和潜在图像;The first optimization module is used to bring the obtained binary image into the image deblurring model based on the MAP framework for optimization, and iteratively estimates the initial blurring kernel and potential image; 第二获取模块,用于列出初始模糊核和潜在图像的先验,并基于迭代加权最小二乘对初始模糊核和潜在图像求解;The second acquisition module is used to list the priors of the initial blur kernel and the potential image, and solve the initial blur kernel and the potential image based on iterative weighted least squares; 第二优化模块,用于采用改进的自适应引导滤波对求解结果进一步优化,保持图像的边缘信息。The second optimization module is used to further optimize the solution result by adopting the improved self-adaptive guidance filter, and keep the edge information of the image. 3.根据权利要求2所述的一种基于视觉显著性的局部运动去模糊装置,其特征在于,所述检测与标记模块包括:3. A local motion deblurring device based on visual saliency according to claim 2, wherein the detection and marking module comprises: 检测单元,用于根据定位和消除错误边界的手段来优化边界所产生的影响,获取背景显著性值;根据前景查询的显著性估计来优化单纯的背景查询;The detection unit is used to optimize the influence of the boundary according to the means of locating and eliminating the wrong boundary, and obtain the background saliency value; optimize the pure background query according to the saliency estimation of the foreground query; 拟合约束单元,用于基于随机游走模型,提出拟合约束,用于继承前景查询的显著性值,获取最终的显著性图。The fitting constraint unit is used to propose a fitting constraint based on the random walk model, and is used to inherit the saliency value of the foreground query to obtain the final saliency map. 4.根据权利要求2所述的一种基于视觉显著性的局部运动去模糊装置,其特征在于,所述第一优化模块包括:4. A kind of local motion deblurring device based on visual saliency according to claim 2, characterized in that, the first optimization module comprises: 分割与恢复单元,用于引入图像分割项li,将图像分割为不同的图层,对各个图层进行模糊核估计以及清晰潜像的恢复。The segmentation and restoration unit is used to introduce the image segmentation item l i , divide the image into different layers, perform blur kernel estimation on each layer and restore the clear latent image. 5.一种基于视觉显著性的局部运动去模糊装置,其特征在于,所述装置包括:处理器和存储器,所述存储器中存储有程序指令,所述处理器调用存储器中存储的程序指令以使装置执行权利要求1所述的方法步骤。5. A local motion deblurring device based on visual saliency, characterized in that the device comprises: a processor and a memory, wherein program instructions are stored in the memory, and the processor calls the program instructions stored in the memory to causing the device to perform the method steps of claim 1. 6.一种计算机可读存储介质,其特征在于,所述计算机可读存储介质存储有计算机程序,所述计算机程序包括程序指令,所述程序指令被处理器执行时使所述处理器执行权利要求1所述的方法步骤。6. A computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, the computer program includes program instructions, and when the program instructions are executed by a processor, the processor executes the rights The method steps described in claim 1.
CN202011084727.4A 2020-10-12 2020-10-12 Local motion deblurring method, device and storage medium based on visual saliency Active CN112215773B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011084727.4A CN112215773B (en) 2020-10-12 2020-10-12 Local motion deblurring method, device and storage medium based on visual saliency

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011084727.4A CN112215773B (en) 2020-10-12 2020-10-12 Local motion deblurring method, device and storage medium based on visual saliency

Publications (2)

Publication Number Publication Date
CN112215773A CN112215773A (en) 2021-01-12
CN112215773B true CN112215773B (en) 2023-02-17

Family

ID=74054521

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011084727.4A Active CN112215773B (en) 2020-10-12 2020-10-12 Local motion deblurring method, device and storage medium based on visual saliency

Country Status (1)

Country Link
CN (1) CN112215773B (en)

Families Citing this family (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113177890B (en) * 2021-04-27 2023-04-18 深圳市慧鲤科技有限公司 Image processing method and device, electronic equipment and storage medium
CN113034407B (en) * 2021-04-27 2022-07-05 深圳市慧鲤科技有限公司 Image processing method and device, electronic equipment and storage medium
CN113284080B (en) * 2021-06-17 2025-04-18 Oppo广东移动通信有限公司 Image processing method and device, electronic device and storage medium
CN113313655B (en) * 2021-06-28 2022-09-23 合肥工业大学 Blind image deblurring method based on saliency mapping and gradient cepstrum technology
CN113706572B (en) * 2021-08-25 2023-10-20 北京大学 End-to-end panoramic image segmentation method based on query vector
CN114037710A (en) * 2021-10-13 2022-02-11 北京百度网讯科技有限公司 Image segmentation method, device, electronic device and storage medium
CN115205216B (en) * 2022-06-16 2025-09-09 中国科学院光电技术研究所 Infrared small target detection method based on saliency and weighted guide filtering
CN118918165B (en) * 2024-07-12 2025-07-22 中原工学院 Machine tool size measurement method based on machine vision and adaptive guide filtering
CN120047350B (en) * 2024-12-31 2025-12-30 中国人民解放军32002部队 An image deblurring method enhanced with prior information
CN120257656B (en) * 2025-05-30 2025-08-22 华中科技大学 Satellite image simulation method and system for simulating real scene

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103514582A (en) * 2012-06-27 2014-01-15 郑州大学 Visual saliency-based image deblurring method
CN104766287A (en) * 2015-05-08 2015-07-08 哈尔滨工业大学 Blurred image blind restoration method based on significance detection
CN108154488A (en) * 2017-12-27 2018-06-12 西北工业大学 A kind of image motion ambiguity removal method based on specific image block analysis
CN108564528A (en) * 2018-04-17 2018-09-21 福州大学 A kind of portrait photo automatic background weakening method based on conspicuousness detection

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8750645B2 (en) * 2009-12-10 2014-06-10 Microsoft Corporation Generating a composite image from video frames
US8928772B2 (en) * 2012-09-21 2015-01-06 Eastman Kodak Company Controlling the sharpness of a digital image
US9607391B2 (en) * 2015-08-04 2017-03-28 Adobe Systems Incorporated Image object segmentation using examples

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103514582A (en) * 2012-06-27 2014-01-15 郑州大学 Visual saliency-based image deblurring method
CN104766287A (en) * 2015-05-08 2015-07-08 哈尔滨工业大学 Blurred image blind restoration method based on significance detection
CN108154488A (en) * 2017-12-27 2018-06-12 西北工业大学 A kind of image motion ambiguity removal method based on specific image block analysis
CN108564528A (en) * 2018-04-17 2018-09-21 福州大学 A kind of portrait photo automatic background weakening method based on conspicuousness detection

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
"Edge-Preserving Decompositions for Multi-Scale Tone and Detail Manipulation";Zeev Farbman et al;《ACM Transactions on Graphicds(TOG)》;20080831;第3小节 *
"Reversion Correction and Regularized Random Walk Ranking for Saliency Detection";Yuchen Yuan et a;《IEEE TRANSACTIONS ON IMAGE PROCESSING, VOL. 27, NO. 3, MARCH 2018》;20171012;第1312页左栏第14行至右栏第3行,第III小节 *
"Soft-Segmentation Guided Object Motion Deblurring";Jinshan Pan et al;《2016 IEEE Conference on Computer Vision and Pattern Recognition》;20161216;第3小节 *

Also Published As

Publication number Publication date
CN112215773A (en) 2021-01-12

Similar Documents

Publication Publication Date Title
CN112215773B (en) Local motion deblurring method, device and storage medium based on visual saliency
Yang Recursive bilateral filtering
Chen et al. Robust image and video dehazing with visual artifact suppression via gradient residual minimization
Ayvaci et al. Sparse occlusion detection with optical flow
Hu et al. Good regions to deblur
Jiao et al. Local stereo matching with improved matching cost and disparity refinement
Li et al. SPM-BP: Sped-up PatchMatch belief propagation for continuous MRFs
Hacohen et al. Deblurring by example using dense correspondence
Pan et al. Spatially variant linear representation models for joint filtering
CN112364865A (en) Method for detecting small moving target in complex scene
CN109685806B (en) Image saliency detection method and device
WO2017135120A1 (en) Computationally efficient frame rate conversion system
CN105574823B (en) A kind of deblurring method and device of blurred picture out of focus
CN109685830B (en) Target tracking method, device and equipment and computer storage medium
Zhang et al. Improved image deblurring based on salient-region segmentation
Wang et al. RT-Deblur: Real-time image deblurring for object detection
Huang et al. Image saliency detection via multi-scale iterative CNN
Cai et al. Water–air imaging: Distorted image reconstruction based on a twice registration algorithm
Wang et al. An efficient remote sensing image denoising method in extended discrete shearlet domain
CN109993151A (en) A 3D video visual attention detection method based on multi-module fully convolutional network
Su et al. Restoration of turbulence-degraded images using the modified convolutional neural network
Bai et al. Restoration of turbulence-degraded images based on deep convolutional network
Zhou et al. Single image dehazing based on weighted variational regularized model
Tu et al. Improved color patch similarity measure based weighted median filter
Robinson et al. Foreground segmentation in atmospheric turbulence degraded video sequences to aid in background stabilization

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