[go: up one dir, main page]

CN116579958B - Multi-focus image fusion method of depth neural network guided by regional difference priori - Google Patents

Multi-focus image fusion method of depth neural network guided by regional difference priori Download PDF

Info

Publication number
CN116579958B
CN116579958B CN202310233028.9A CN202310233028A CN116579958B CN 116579958 B CN116579958 B CN 116579958B CN 202310233028 A CN202310233028 A CN 202310233028A CN 116579958 B CN116579958 B CN 116579958B
Authority
CN
China
Prior art keywords
image
focus
images
neural network
fusion
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
CN202310233028.9A
Other languages
Chinese (zh)
Other versions
CN116579958A (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.)
Chongqing University of Post and Telecommunications
Original Assignee
Chongqing University of Post and Telecommunications
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 Chongqing University of Post and Telecommunications filed Critical Chongqing University of Post and Telecommunications
Priority to CN202310233028.9A priority Critical patent/CN116579958B/en
Publication of CN116579958A publication Critical patent/CN116579958A/en
Application granted granted Critical
Publication of CN116579958B publication Critical patent/CN116579958B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/50Image enhancement or restoration using two or more images, e.g. averaging or subtraction
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/20Image enhancement or restoration using local operators
    • G06T5/30Erosion or dilatation, e.g. thinning
    • 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
    • G06T7/00Image analysis
    • G06T7/30Determination of transform parameters for the alignment of images, i.e. image registration
    • 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/20024Filtering details
    • G06T2207/20032Median filtering
    • 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/20081Training; Learning
    • 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/20084Artificial neural networks [ANN]
    • 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/20088Trinocular vision calculations; trifocal tensor
    • 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/20212Image combination
    • G06T2207/20221Image fusion; Image merging
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02TCLIMATE CHANGE MITIGATION TECHNOLOGIES RELATED TO TRANSPORTATION
    • Y02T10/00Road transport of goods or passengers
    • Y02T10/10Internal combustion engine [ICE] based vehicles
    • Y02T10/40Engine management systems

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Evolutionary Computation (AREA)
  • Artificial Intelligence (AREA)
  • Biomedical Technology (AREA)
  • Biophysics (AREA)
  • Computational Linguistics (AREA)
  • Health & Medical Sciences (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Molecular Biology (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Image Analysis (AREA)

Abstract

The invention discloses a multi-focus image fusion method of a region difference priori guided deep neural network, and relates to the technical fields of digital image processing, computer vision, deep learning and the like. The method comprises the specific steps of 1) manufacturing a disclosed multi-focus image data set, 2) preprocessing the disclosed multi-focus image data set, including technologies such as image denoising, image enhancement and image registration, 3) obtaining region difference priori information by utilizing morphological operation-expansion and corrosion enhancement of differences between pairs of multi-focus images, 4) designing a depth neural network guided by the region difference priori, and 5) fusing the multi-focus images in a test set by utilizing a model obtained through training to obtain a final fusion result. The method utilizes the proposed region difference priori, and combines the model obtained by the prior deep neural network training to improve the accuracy of focusing measurement and obtain a fusion image with higher quality.

Description

Multi-focus image fusion method of depth neural network guided by regional difference priori
Technical Field
The invention relates to a multi-focus image fusion method of a region difference priori guided deep neural network, belonging to the technical fields of digital image processing, computer vision, deep learning and the like.
Background
Because the existing optical camera system is limited by the depth of field of the lens, the image obtained when shooting the same scene is usually an image with clear partial area and blurred or defocused partial area, and an ideal full-focus image is difficult to generate. However, this can present a significant challenge for tasks requiring accurate analysis of the entire scene, such as robot vision, medical imaging, and the like. And many other popular computer vision tasks often require the full focus image to be further processed, such as detection and segmentation. In view of the above problems, a current common approach is a multi-focus image fusion algorithm. With the rapid development of deep learning and fusion techniques, the field of multi-focus image fusion is continually explored and developed with new methods and techniques. So far, research into multi-focus image fusion has been continued for more than 30 years, during which numerous algorithms have been published. These algorithms can be broadly divided into two main categories, reconstruction policy-based methods and decision policy-based methods, based on the differences in fusion policies employed in the fusion process. The reconstruction strategy based method generally consists of three steps, image decomposition, decomposition coefficient fusion and reconstruction. Such algorithms treat defocused images in different focused scenes as degraded images of an ideal fully focused image. In this mode, multi-focus image fusion actually becomes an image enhancement task to obtain a fully focused image from a degraded image. Similar to the additional enhancement task, such reconstruction strategy-based methods inevitably generate pixel defects, such as luminance and color distortions, in the generated fusion image. Thus, decision strategy-based approaches have begun to prevail.
Unlike the reconstruction strategy-based approach, decision strategy-based work is mainly focused on how to generate an accurate decision graph. And then selecting focusing parts from the defocused images through the decision graph to combine to form a full-focusing image. In such a method, a Focus Measurement (FM) step is used to obtain a decision map, and Focus measurement can be accomplished by manual design as well as deep learning. Depending on how focus measurements are implemented, decision strategy based methods can continue to be classified into methods based on manually designed FM and methods based on learnable FM. Methods based on manually designed FM are popular, but such methods have difficulty in handling complex scenes and limit applicable space, greatly limiting the performance of multi-focus image fusion.
With the continuous development of deep learning technology, the method based on the learning FM mainly uses a convolutional neural network as a main framework to develop research. In such methods, the deep neural network is considered a tool for implementing FM, and can learn a mapping from defocused images to decision graphs directly. The method based on the learnable FM can automatically learn a more accurate decision chart, which is difficult to achieve by the method based on the manual design FM. Because CNN possesses strong learning ability, the performance of multi-focus image fusion task is further improved compared with the method based on artificial design FM. However, although current methods of learning FM achieve some degree of boosting, decision graphs generated in such methods still suffer from the phenomenon of holes. Therefore, how to effectively improve the accuracy of focusing measurement and effectively improve the hole phenomenon in the decision diagram is more and more important.
CN113313663A, a multi-focus image fusion method based on zero sample learning, a multi-focus image fusion network structure IM-Net is used for fusing information contained in an input multi-focus image, the IM-Net comprises two combined sub-networks I-Net and M-Net, the I-Net models the depth priori of the fusion image, the M-Net models the depth priori of the focus image, zero sample learning is realized through extracted priori information, reconstruction constraint is applied to the IM-Net, so that information of a source image pair can be transmitted to the fusion image better, high-layer semantic information can keep brightness consistency of adjacent pixels, guiding loss provides guiding information for finding a clear area for the IM-Net, and experimental results indicate the effectiveness of the method.
The method in this patent still achieves their objective by designing a complex network structure, but the improvement of the fusion effect is limited and increases the computational burden. The invention considers how to improve the fusion efficiency from a brand new angle, namely, the difference between the focusing part and the defocusing part in the defocusing image pair is strengthened to provide the region difference priori, so that a simple neural network is designed in a priori, and a good fusion effect can be achieved. Further, the use of region difference priors in neural networks is simple and efficient and has versatility.
Disclosure of Invention
The invention aims to solve the problems existing in the existing learning-based FM method. A multi-focus image fusion method of a depth neural network guided by regional difference priori is provided. The technical scheme of the invention is as follows:
A multi-focus image fusion method of a region difference prior guided deep neural network, comprising the following steps:
(1) Collecting original image samples and making a multi-focus image training set for training;
(2) Performing image preprocessing operations including image denoising, image enhancement and image registration on the multi-focus image to realize data enhancement;
(3) Obtaining regional difference prior information using morphological operations, i.e., differences between pairs of multi-focused images of dilation and erosion enhancement;
(4) Designing a depth neural network guided by the regional difference priori based on the regional difference priori information obtained in the step (3), and performing model training;
(5) And (3) testing the multi-focus images in the test set by using the model obtained by training in the step (4) to obtain a final fusion result.
Further, the step (2) performs image preprocessing operations including image denoising, image enhancement and image registration on the multi-focus image to enhance data, and specifically includes:
image denoising is specifically to remove image noise by using certain artificially designed low-pass filters, such as median filtering and wiener filtering;
the image enhancement specifically comprises the steps of directly carrying out various linear or nonlinear operations on the image, and carrying out enhancement treatment on the pixel gray value of the image;
The image registration method comprises the steps of extracting features of two images to obtain feature points, finding matched feature point pairs through similarity measurement, obtaining image space coordinate transformation parameters through the matched feature point pairs, and finally carrying out image registration through the coordinate transformation parameters.
Further, the step (3) of obtaining the region difference priori information by using the morphological operation, that is, the difference between the expansion and corrosion enhancement paired multi-focus images, specifically includes:
the expansion of a structural element SE at a position (x, y) of an image f is defined as follows:
wherein SE is a structural element, f is a gray scale image; s, t are moving steps;
the erosion of an image f at the location (x, y) by the structural element SE is defined as follows:
Is a corrosion operation;
Given a pair of grayscale images I a and I b, performing a global expansion operation on I a and I b results in a pair of images D a and D b, which are defined as follows:
Wherein dilate is a global expansion operation, since the expansion of the gray image by SE at any position (x, y) is defined as the maximum of the overlapping area, whereby the gray values of the pixels of images D a and D b will rise, subtracting I from D, while the variation of the in-focus and out-of-focus portions defined between D and I is:
wherein D focus、Ifocus represents the focusing part in D and I;
Δ focus↑、Δdefocus↑ represents the amount of change in the focusing and defocusing portions between D and I, respectively;
D defocus、Idefocus represents defocused portions in D and I, and likewise, by performing a global erosion operation on images I a and I b, a pair of images E a and E b are obtained, which can be described as:
Where erode is a global erosion operation, the erosion of the gray image by SE at any location (x, y) is defined as the minimum of the overlapping area, so the gray values of the pixels in images E a and E b will drop, subtracting E from I, and defining the variation of the in-focus and out-of-focus portions between I and E, which can be described as:
Considering the purpose of region difference reinforcement, i.e. both Δ focus↑Δdefocus↑ and Δ focus↓Δdefocus↓ are valid, the best way to obtain region difference priors is given by:
dilate(Ia),erode(Ia);dilate(Ib),erode(Ib)
Wherein I a,dilate(Ia) represents that I a and dilate (I a) are connected together in the channel dimension.
Further, in the step (4), a deep neural network guided by a regional difference priori is designed and model training is performed, and the training process is as follows:
Where p is the generated focus map, For the reference image to be a reference image,
I represents the i-th batch;
j represents the j-th channel;
a reference image representing the jth channel of the ith lot;
A focus map representing the jth channel of the ith lot;
N represents the batch size, C represents the number of channels, the output of a two-channel focusing graph p is used as a neural network by training, each output value is the focusing score of a corresponding pixel in a pair of source images, then an initial decision graph is generated by comparing the focusing scores of two channels in p, the initial decision graph is perfected by adopting a fully connected conditional random field CRF, and then a final decision graph W is obtained.
Further, the method comprises the steps of generating an initial decision graph T by comparing the focus scores of two channels in p, perfecting the initial decision graph by adopting a fully connected conditional random field CRF, and then obtaining a final decision graph W, wherein the method specifically comprises the following steps:
obtaining an initial decision diagram;
Each pixel i is provided with a class label x i and a corresponding observed value y i, so that each pixel point is used as a node, the relation between pixels is used as an edge, namely, a conditional random field is formed, the class label x i corresponding to the pixel i is estimated through the observed variable y i, and the initial decision diagram can be perfected through the technology.
Further, in the step (5), final image fusion is performed, which is expressed as follows:
Ffusion(x,y)=A(x,y)W(x,y)+B(x,y)(1-W(x,y))
Wherein A and B are source images, W is a final decision graph, pixel multiplication is performed, and F fusion is a final fusion result.
The invention has the advantages and beneficial effects as follows:
The multi-focus image fusion method of the depth neural network guided by the regional difference priori provided by the invention is an effective method which is generated based on the regional difference priori information and can effectively improve the focus measurement precision. The method improves the problems existing in the prior learning-based FM method, can effectively fuse to obtain high-quality fused images when facing various fused scenes at the same time, and can be applied to other neural network models by regional difference priori, thereby having universality.
The invention realizes the multi-focus image fusion task by utilizing the technologies of digital image processing, computer vision, deep learning and the like. The invention relates to a method based on regional difference priori information, which utilizes the difference between defocused images of morphological operation expansion and corrosion reinforcement pairs to obtain regional difference priori, and designs a novel deep neural network to generate a better decision diagram so as to obtain a final fusion result. The invention has the following advantages:
(1) The pytorch platform is utilized for training and testing, so that the efficiency is high;
(2) The method is a method for improving the focusing measurement precision based on the region difference priori, and can achieve the purpose of strengthening the region difference only by using simple morphological operation, so as to obtain the region difference priori. The use of the region difference priori information is simple and efficient;
(3) The regional difference priori obtained by the invention can effectively improve the quality of the fusion image obtained under various fusion scenes;
(4) The invention has good lifting effect on other neural network methods;
(5) Aiming at the difficult-to-determine area in the multi-focus image, the area difference priori can bring about the improvement of the precision of focus measurement to a certain extent;
(6) The method can assist related image detection and image segmentation work, has practical significance and achieves better effects.
The innovation of the invention is mainly the steps of claims 3, 4.
Taking into account the differences between the enhanced defocused image versus the focused and defocused portions to obtain region difference prior information is a significant innovation, from which other approaches have never seen multi-focused image fusion.
The method has the advantage that the acquired region difference priori is due to the fact that the sensitivity degree of the focusing part and the defocusing part to morphological operation, namely expansion and corrosion, is completely different, namely the focusing part has a more intense response to the expansion and corrosion operation, so that after the operation is applied, the focusing part and the defocusing part can generate completely different changes, the purpose of difference strengthening is achieved, and the method meets the aim of us. Meanwhile, the region difference priori provided by the invention has universality and can be used in other multi-focus image fusion methods to improve the focus measurement precision of the multi-focus image fusion methods. For any different fusion scene, the quality of the fusion image obtained by using the region difference priori is very high, and the use of the region difference priori is simple and efficient.
Drawings
FIG. 1 is a system flow diagram of a preferred embodiment of the present invention;
fig. 2 (a 1) to (a 6) are original images and images after the region difference enhancing operation;
FIGS. 2 (b 1) - (b 4) are decision graphs obtained in a scene without regional differential prior participation and decision graphs obtained in a scene with regional differential prior participation;
fig. 2 (b 5) - (b 6) are examples of two final fused images.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and specifically described below with reference to the drawings in the embodiments of the present invention. The described embodiments are only a few embodiments of the present invention.
The technical scheme for solving the technical problems is as follows:
as shown in fig. 1, a multi-focus image fusion method of a region difference prior guided deep neural network includes the following steps:
Collecting original image samples and manufacturing a multi-focus image training set for training;
secondly, the common image preprocessing operation is used for the manufactured multi-focus image training set to realize data enhancement;
The third step, the difference between the multi-focus images in the pair of expansion and corrosion enhancement is utilized to obtain the prior information of the regional difference, the step comprises the steps of carrying out expansion operation and corrosion operation on the multi-focus images and effectively combining the multi-focus images to realize the purpose of regional difference enhancement, and the specific steps are as follows:
Since the focusing and defocusing portions are sensitive to different degrees for the expansion and corrosion operations, i.e. the focusing portion is more sensitive to the morphological operations, the focusing and defocusing portions may change significantly when the morphological operations are performed on the two portions. Image processing of an image by dilation and erosion operations relies on a Structural Element (SE) which is defined as dilation of an image f at locations (x, y) as follows:
wherein SE is a structural element, f is a gray scale image; Is an expansion operation.
The erosion of an image f at the location (x, y) by the structural element SE is defined as follows:
wherein SE is a structural element, f is a gray scale image; is an etching operation.
Given a pair of grayscale images I a and I b, performing a global expansion operation on I a and I b results in a pair of images D a and D b, which are defined as follows:
Wherein dilate is a global expansion operation. The expansion of the gray image due to SE at any position (x, y) is defined as the maximum value of the overlapping area. Thus, the gray values of the pixels of the images D a and D b rise. Subtracting I from D, while defining the variation of the in-focus and out-of-focus portions between D and I as:
where D focus、Ifocus represents the focused portions in D and I, and D defocus、Idefocus represents the defocused portions in D and I. Likewise, by performing a global erosion operation on images I a and I b, a pair of images E a and E b is obtained. It can be described as:
Wherein erode is a global etching operation. The erosion of the gray scale image by SE at any location (x, y) is defined as the minimum of overlapping areas. Thus, the gray values of the pixels in the images E a and E b will decrease. Subtracting E from I and defining the variation of the in-focus and out-of-focus parts between I and E, it can be described as:
It can be noted that the existing learning FM-based methods are all designed with complex network structures to achieve the purpose of improving the focus measurement accuracy, and can achieve the effect of improvement to a certain extent but still have the hole phenomenon, and additionally increase the calculation burden. Therefore, the invention provides the region difference priori as the guiding priori of the deep neural network, and considers the purpose of region difference reinforcement, namely delta focus↑Δdefocus↑ and delta focus↓Δdefocus↓ can be effectively established, and the best mode for obtaining the region difference priori is provided as follows:
dilate(Ia),erode(Ia);dilate(Ib),erode(Ib)
wherein I a,dilate(Ia) represents that I a and dilate (I a) are connected together in the channel dimension. The purpose of the above formula is to significantly improve the accuracy of focus measurement by maximizing the difference between the focused and defocused portions.
Designing a depth neural network guided by the regional difference priori for the regional difference priori obtained in the step (3), and performing model training, wherein the training process is as follows:
Where p is the generated focus map, For reference pictures, N represents the batch size and C represents the number of channels. By effectively training, a two-channel focus map p is used as the output of the neural network, where each output value is the focus score of a corresponding pixel in the paired source images. An initial decision map is then generated by comparing the focus scores of the two channels in p. Considering that there may be some imperfections in the initial decision diagram, a fully connected Conditional Random Field (CRF) is used to refine the initial decision diagram, and then the final decision diagram W is obtained.
And fifthly, performing fusion test on the input multi-focus images by using the model trained in the step (4) to obtain a final fusion result.
The experimental method comprises the following steps:
in the experimental process, we made a disclosed multi-focus image dataset, and trained the neural network with 90% of it as the training set, and another 10% as the validation set to verify the fusion quality of the proposed region difference a priori guided multi-focus image fusion method of the deep neural network.
The first step is to perform data enhancement operation on the manufactured multi-focus image training set by utilizing image preprocessing operation, wherein the data enhancement operation comprises image denoising, image enhancement and image registration.
And secondly, running a python program, inputting the training set picture and the corresponding label into a deep neural network, and obtaining a final trained model after tuning the training parameters.
And thirdly, testing the images in the test set by using the trained model and calculating the quality index of the fused image.
Experiments prove that the method provided by the invention can effectively improve the precision of focusing measurement after training, and the quality of the fused image of the multi-focusing image under various fused scenes is effectively improved.
The system, apparatus, module or unit set forth in the above embodiments may be implemented in particular by a computer chip or entity, or by a product having a certain function.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises an element.
The above examples should be understood as illustrative only and not limiting the scope of the invention. Various changes and modifications to the present invention may be made by one skilled in the art after reading the teachings herein, and such equivalent changes and modifications are intended to fall within the scope of the invention as defined in the appended claims.

Claims (6)

1.一种区域差异先验引导的深度神经网络的多聚焦图像融合方法,其特征在于,包括以下步骤:1. A multi-focus image fusion method of a deep neural network guided by regional difference priors, characterized in that it includes the following steps: (1)、收集原始图像样本并制作用于训练的多聚焦图像训练集;(1) Collect original image samples and create a multi-focus image training set for training; (2)、对多聚焦图像进行包括图像去噪、图像增强、图像配准在内的图像预处理操作实现数据增强;(2) Perform image preprocessing operations including image denoising, image enhancement, and image registration on multi-focus images to achieve data enhancement; (3)、利用形态学操作,即膨胀和腐蚀强化成对的多聚焦图像之间的差异获得区域差异先验信息;给定一对灰度图像Ia和Ib,对Ia和Ib进行全局膨胀操作得到一对图像Da和Db,其定义如下:(3) Using morphological operations, namely dilation and erosion, the differences between paired multi-focus images are enhanced to obtain regional difference prior information. Given a pair of grayscale images Ia and Ib , a global dilation operation is performed on Ia and Ib to obtain a pair of images Da and Db , which are defined as follows: 其中dilate为全局膨胀操作,由于SE在任意位置(x,y)对灰度图像的膨胀被定义为重叠区域的最大值,由此,图像Da和Db的像素的灰度值会上升,用D减去I,同时定义在D和I之间的聚焦和散焦部分的变化为:Where dilate is a global dilation operation. Since the dilation of the grayscale image by SE at any position (x, y) is defined as the maximum value of the overlapping area, the grayscale values of the pixels of images Da and Db will increase. Subtract I from D, and define the changes in the focused and defocused parts between D and I as: 其中Dfocus、Ifocus表示D和I中的聚焦部分;Where D focus and I focus represent the focused parts of D and I; Δfocus↑、Δdefocus↑分别表示D和I之间的聚焦和散焦部分的变化量;Δ focus↑ and Δ defocus↑ represent the changes in the focused and defocused parts between D and I, respectively; Ddefocus、Idefocus表示D和I中的散焦部分;同样地,通过对图像Ia和Ib进行全局腐蚀操作,得到一对图像Ea和Eb,它可以被描述为:D defocus and I defocus represent the defocused parts in D and I; similarly, by performing a global erosion operation on images I a and I b , a pair of images E a and E b are obtained, which can be described as: 其中erode为全局腐蚀操作,在任何位置(x,y)的SE对灰度图像的腐蚀被定义为重叠区域的最小值;因此,图像Ea和Eb中的像素的灰度值将下降;从I中减去E,并且定义I和E之间的聚焦和散焦部分的变化,它可以被描述为:Where erode is a global erosion operation, and the erosion of the grayscale image by SE at any position (x, y) is defined as the minimum value of the overlapping area; therefore, the grayscale value of the pixels in images Ea and Eb will decrease; subtract E from I, and define the change in the focused and defocused parts between I and E, which can be described as: 考虑区域差异强化的目的,即Δfocus↑>>Δdefocus↑和Δfocus↓>>Δdefocus↓都是能够有效成立的,给出获得区域差异先验的最佳方式如下:Considering the purpose of regional difference enhancement, that is, Δ focus↑ >> Δ defocus↑ and Δ focus↓ >> Δ defocus↓ are both valid, the best way to obtain regional difference priors is given as follows: dilate(Ia),erode(Ia);dilate(Ib),erode(Ib)dilate(I a ),erode(I a ); dilate(I b ),erode(I b ) 其中,erode(Ia),dilate(Ia)代表的是在通道维度上将erode(Ia)和dilate(Ia)连接在一块;Among them, erode(I a ), dilate(I a ) represents connecting erode(I a ) and dilate(I a ) together in the channel dimension; (4)、基于步骤(3)得到的区域差异先验信息,设计一个区域差异先验引导的深度神经网络并进行模型训练;(4) Based on the regional difference prior information obtained in step (3), a deep neural network guided by regional difference prior is designed and model training is performed; (5)、利用步骤(4)训练得到的模型对测试集中的多聚焦图像进行测试,得到最终的融合结果。(5) Use the model trained in step (4) to test the multi-focus images in the test set to obtain the final fusion result. 2.根据权利要求1所述的区域差异先验引导的深度神经网络的多聚焦图像融合方法,其特征在于,所述步骤(2)对多聚焦图像进行包括图像去噪、图像增强、图像配准在内的图像预处理操作实现数据增强,具体包括:2. The multi-focus image fusion method of the deep neural network guided by regional difference prior according to claim 1 is characterized in that the step (2) performs image preprocessing operations including image denoising, image enhancement, and image registration on the multi-focus image to achieve data enhancement, specifically comprising: 图像去噪具体为:利用某些人工设计的低通滤波器,如中值滤波和维纳滤波来去除图像噪声;Image denoising specifically involves: using some artificially designed low-pass filters, such as median filtering and Wiener filtering, to remove image noise; 图像增强具体为:直接对图像进行各种线性或非线性运算,对图像的像素灰度值做增强处理;Image enhancement specifically includes: performing various linear or nonlinear operations directly on the image and enhancing the pixel grayscale value of the image; 图像配准具体为:对两幅图像进行特征提取得到特征点;通过进行相似性度量找到匹配的特征点对;然后通过匹配的特征点对得到图像空间坐标变换参数;最后由坐标变换参数进行图像配准。Image registration is specifically as follows: extract features from two images to obtain feature points; find matching feature point pairs by performing similarity measurement; then obtain image space coordinate transformation parameters through the matching feature point pairs; and finally perform image registration based on the coordinate transformation parameters. 3.根据权利要求1所述的区域差异先验引导的深度神经网络的多聚焦图像融合方法,其特征在于,所述步骤(3)、利用形态学操作,即膨胀和腐蚀强化成对的多聚焦图像之间的差异获得区域差异先验信息,具体包括:3. The multi-focus image fusion method of deep neural network guided by regional difference prior according to claim 1 is characterized in that the step (3) uses morphological operations, i.e., dilation and erosion, to strengthen the difference between paired multi-focus images to obtain regional difference prior information, specifically comprising: 结构元素SE对一幅图像f在位置(x,y)处的膨胀,其定义如下:The structural element SE is the expansion of an image f at position (x, y), which is defined as follows: 其中SE为结构元素;f为灰度图像;为膨胀操作;s、t为移动步长;Where SE is the structural element; f is the grayscale image; is the expansion operation; s, t are the moving steps; 结构元素SE对一幅图像f在位置(x,y)处的腐蚀,其定义如下:The structural element SE erodes an image f at position (x, y) and is defined as follows: 为腐蚀操作。 For corrosion operation. 4.根据权利要求1所述的区域差异先验引导的深度神经网络的多聚焦图像融合方法,其特征在于,所述步骤(4)中设计一个区域差异先验引导的深度神经网络并进行模型训练,其训练过程如下:4. The multi-focus image fusion method of the deep neural network guided by regional difference prior according to claim 1 is characterized in that in the step (4), a deep neural network guided by regional difference prior is designed and model training is performed, and the training process is as follows: 其中p为生成的聚焦图,为参考图像,Where p is the generated focus map, is the reference image, i表示第i个批次;i represents the i-th batch; j表示第j个通道;j represents the jth channel; 表示第i个批次第j个通道的参考图像; represents the reference image of the jth channel of the i-th batch; 表示第i个批次第j个通道的聚焦图; Represents the focus map of the jth channel of the i-th batch; N表示批量大小;C表示通道数量,通过训练一个双通道的聚焦图p被作为神经网络的输出,其中每个输出值是成对的源图像中相应像素的聚焦得分;随后,通过比较p中两个通道的聚焦得分,生成一个初始决策图;采用全连接条件随机场CRF来完善初始决策图,随后得到最终的决策图W。N represents the batch size; C represents the number of channels. A two-channel focus map p is trained as the output of the neural network, where each output value is the focus score of the corresponding pixel in the paired source image; then, an initial decision map is generated by comparing the focus scores of the two channels in p; the fully connected conditional random field CRF is used to improve the initial decision map, and then the final decision map W is obtained. 5.根据权利要求4所述的区域差异先验引导的深度神经网络的多聚焦图像融合方法,其特征在于,所述通过比较p中两个通道的聚焦得分,生成一个初始决策图T;采用全连接条件随机场CRF来完善初始决策图,随后得到最终的决策图W,具体包括:5. The multi-focus image fusion method of the deep neural network guided by regional difference prior according to claim 4 is characterized in that an initial decision graph T is generated by comparing the focus scores of the two channels in p; the fully connected conditional random field CRF is used to improve the initial decision graph, and then the final decision graph W is obtained, which specifically includes: 得到初始决策图; Get the initial decision graph; 对于每个像素i具有类别标签xi还有对应的观测值yi,这样每个像素点作为节点,像素与像素间的关系作为边,即构成了一个条件随机场,通过观测变量yi来推测像素i对应的类别标签xi;通过以上技术,可以对初始决策图进行完善。For each pixel i, there is a category label xi and a corresponding observation value yi . In this way, each pixel point is used as a node, and the relationship between pixels is used as an edge, which constitutes a conditional random field. The category label xi corresponding to pixel i is inferred through the observed variable yi . Through the above technology, the initial decision graph can be improved. 6.根据权利要求5所述的区域差异先验引导的深度神经网络的多聚焦图像融合方法,其特征在于,所述步骤(5)中进行最后的图像融合,其表达如下:6. The multi-focus image fusion method of deep neural network guided by regional difference prior according to claim 5, characterized in that the final image fusion is performed in step (5), which is expressed as follows: Ffusion(x,y)=A(x,y)⊙W(x,y)+B(x,y)⊙(1-W(x,y))F fusion (x,y)=A(x,y)⊙W(x,y)+B(x,y)⊙(1-W(x,y)) 其中A和B为源图像,W为最终决策图,⊙为像素点乘,Ffusion为最终融合结果。Where A and B are source images, W is the final decision map, ⊙ is the pixel multiplication, and F fusion is the final fusion result.
CN202310233028.9A 2023-03-10 2023-03-10 Multi-focus image fusion method of depth neural network guided by regional difference priori Active CN116579958B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310233028.9A CN116579958B (en) 2023-03-10 2023-03-10 Multi-focus image fusion method of depth neural network guided by regional difference priori

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310233028.9A CN116579958B (en) 2023-03-10 2023-03-10 Multi-focus image fusion method of depth neural network guided by regional difference priori

Publications (2)

Publication Number Publication Date
CN116579958A CN116579958A (en) 2023-08-11
CN116579958B true CN116579958B (en) 2025-05-30

Family

ID=87534758

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310233028.9A Active CN116579958B (en) 2023-03-10 2023-03-10 Multi-focus image fusion method of depth neural network guided by regional difference priori

Country Status (1)

Country Link
CN (1) CN116579958B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116993644B (en) * 2023-09-27 2024-01-19 广东工业大学 A multi-focus image fusion method and device based on image segmentation

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103985108A (en) * 2014-06-03 2014-08-13 北京航空航天大学 Method for multi-focus image fusion through boundary detection and multi-scale morphology definition measurement
CN106339998A (en) * 2016-08-18 2017-01-18 南京理工大学 Multi-focus image fusion method based on contrast pyramid transformation

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7907769B2 (en) * 2004-05-13 2011-03-15 The Charles Stark Draper Laboratory, Inc. Image-based methods for measuring global nuclear patterns as epigenetic markers of cell differentiation

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103985108A (en) * 2014-06-03 2014-08-13 北京航空航天大学 Method for multi-focus image fusion through boundary detection and multi-scale morphology definition measurement
CN106339998A (en) * 2016-08-18 2017-01-18 南京理工大学 Multi-focus image fusion method based on contrast pyramid transformation

Also Published As

Publication number Publication date
CN116579958A (en) 2023-08-11

Similar Documents

Publication Publication Date Title
Ma et al. SMFuse: Multi-focus image fusion via self-supervised mask-optimization
Du et al. Image segmentation-based multi-focus image fusion through multi-scale convolutional neural network
CN110334779B (en) Multi-focus image fusion method based on PSPNet detail extraction
CN114463211B (en) An underwater image enhancement method based on turbidity classification
CN107093166B (en) The seamless joint method of low coincidence factor micro-image
CN110428463B (en) Method for automatically extracting center of image in out-of-focus fuzzy centering of aspheric optical element
CN106447640B (en) Multi-focus image fusion method and device based on dictionary learning and rotation-guided filtering
CN111462027B (en) Multi-focus image fusion method based on multi-scale gradient and matting
CN113763300B (en) A Multi-focus Image Fusion Method Combined with Depth Context and Convolutional Conditional Random Field
Ali et al. Robust focus volume regularization in shape from focus
CN105894483B (en) A kind of multi-focus image fusing method based on multi-scale image analysis and block consistency checking
CN113052755A (en) High-resolution image intelligent matting method based on deep learning
CN116579958B (en) Multi-focus image fusion method of depth neural network guided by regional difference priori
CN108230282A (en) A kind of multi-focus image fusing method and system based on AGF
CN110555820A (en) Image fusion method based on convolutional neural network and dynamic guide filtering
CN116051411A (en) Microscopic image fuzzy kernel extraction and defocusing restoration method based on depth convolution network
CN113496485B (en) Satellite remote sensing image quality evaluation method and device
CN106534661A (en) Automatic focus algorithm accumulated based on strongest edge gradient Laplasse operator
Yang et al. Shape-Guided Detection: A joint network combining object detection and underwater image enhancement together
Shim et al. Improving depth computation from robust focus approximation
CN114708271A (en) A medical image segmentation method based on highlight removal
CN112508828A (en) Multi-focus image fusion method based on sparse representation and guided filtering
CN116805985A (en) Image processing method, electronic device and storage medium
Zhu et al. Mutli-focus image fusion based on guided filter and image matting network
CN115908502A (en) Related filtering visual target tracking method based on low-rank multi-mode feature interaction model

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