IMAGE FUSION METHOD BASED ON FOURIER SPECTRUM EXTRACTION
20220148297 · 2022-05-12
Assignee
Inventors
Cpc classification
International classification
G06V10/80
PHYSICS
Abstract
The present invention discloses an image fusion method based on Fourier spectrum extraction, which comprises: step 1, inputting a plurality of to-be-fused images to a processor of a computer by an input unit of the computer, and performing the following steps by the processor of the computer: performing Fourier transform on images at different focus positions, extracting a frequency component corresponding to an image with the maximum frequency amplitude in the images at different focus positions in a transformed frequency domain space, taking the frequency component as a frequency component of a fused image at the corresponding spatial frequency, traversing each frequency to generate a frequency domain component of the fused image, finally performing inverse Fourier transform on the frequency domain component of the fused image to obtain the fused image; and step 2, outputting the fused image obtained by the processor by an output unit of the computer.
Claims
1. An image fusion method based on a Fourier spectrum extraction, comprising: step 1, inputting a plurality of to-be-fused images to a processor of a computer by an input unit of the computer, and performing the following steps by the processor of the computer: performing a Fourier transform on images at different focus positions, extracting a frequency component corresponding to an image with a maximum frequency amplitude in the images at the different focus positions in a transformed frequency domain space, taking the frequency component as a frequency component of a fused image at a corresponding spatial frequency, traversing each of a frequency to generate a frequency domain component of the fused image, finally performing an inverse Fourier transform on the frequency domain component of the fused image to obtain the fused image; and step 2, outputting the fused image, which is obtained by the processor by an output unit of the computer.
2. The image fusion method based on the Fourier spectrum extraction according to claim 1, wherein performing the steps by the processor specifically comprises: (1) obtaining a gray image information of each of the image from the plurality of to-be-fused images:
f.sub.n(x,y), (x<K,y<L), n=1, 2, . . . , N wherein, (x,y) is a pixel coordinate of a gray image, K and L are boundary values of the image in X and Y directions, respectively, and N is a total number of the images; (2) transforming N gray images in a spatial domain, which is obtained in the step (1) into the N gray images in a frequency domain by using a two-dimensional discrete Fourier transform to obtain the frequency component of each of the image:
F.sub.n(f.sub.x,f.sub.y).fwdarw.F(f.sub.x,f.sub.y); and (4) performing an inverse transform on a fused frequency domain component obtained in the step (3) by using a two-dimensional discrete inverse Fourier transform to obtain the gray image, which is reconstructed in the spatial domain, i.e., an image of the N images after fusion:
3. The image fusion method based on the Fourier spectrum extraction according to claim 2, wherein: in the step (1), a number of a plurality of the images N is greater than or equal to 2.
4. The image fusion method based on the Fourier spectrum extraction according to claim 2, wherein: in the step (1), a plurality of fused images have a same field of view and resolution.
5. The image fusion method based on the Fourier spectrum extraction according to claim 2, wherein: in the step (1), the plurality of images have different focus depths for objects at different depth positions or a same object.
Description
BRIEF DESCRIPTION OF THE DRAWINGS
[0022]
[0023]
[0024]
[0025]
[0026]
[0027]
DETAILED DESCRIPTION OF THE EMBODIMENTS
[0028] The present invention will be better understood from the following embodiments. However, it is easily understood by those skilled in the art that the descriptions of the embodiments are only for illustrating the present invention and should not and will not limit the present invention as detailed in the claims.
[0029] As shown in
[0030] step 1, inputting a plurality of to-be-fused images to a processor of a computer by an input unit of the computer, and performing the following steps by the processor of the computer: performing Fourier transform on images at different focus positions, extracting a frequency component corresponding to an image with the maximum frequency amplitude in the images at different focus positions in a transformed frequency domain space, taking the frequency component as a frequency component of a fused image at the corresponding spatial frequency, traversing each frequency to generate a frequency domain component of the fused image, finally performing inverse Fourier transform on the frequency domain component of the fused image to obtain the fused image; and
[0031] step 2, outputting the fused image obtained by the processor by an output unit of the computer.
[0032] The input unit and the output unit are an input interface and an output interface of the processor, respectively, and the input interface and the output interface can be a network communication interface, a USB serial port communication interface, a hard disk interface and the like.
[0033] The image fusion method of the present invention extracts a clear image area based on Fourier transform, thereby generating a picture containing detailed information of objects at different depths in the shooting direction by fusing a plurality of images under the shooting condition of small depth of field. The algorithm of the present invention requires to shoot N images in different depth directions (Z direction) within the same field of view by changing focus positions of lens. Because of the limitation of the depth of field of the lens, each image can be clearly focused on the image plane (X, Y direction) only at a small depth in front and back near the focus plane. In order to display three-dimensional (X, Y, Z direction) information of a photographed object (or space) on one picture, N images are fused to generate one image. Detailed information (X, Y direction) of objects at different depth positions can be obtained from the image.
[0034] As shown in
[0035] (1) obtaining gray image information of each image from the plurality of to-be-fused images:
f.sub.n(x,y),(x<K,y<L), n=1, 2, . . . , N
[0036] wherein, (x,y) is the pixel coordinate of the gray image, and K and L are the boundary values of the image in X and Y directions, respectively; N is the total number of the images, and N is greater than or equal to 2; the plurality of images have the same field of view and resolution; the plurality of images have different focus depths for objects at different depth positions or the same object;
[0037] (2) transforming the N gray images in a spatial domain obtained in the step (1) into the N gray images in a frequency domain by using two-dimensional discrete Fourier transform to obtain the frequency component of each image:
[0038] wherein, (f.sub.x,f.sub.y) is the coordinate of the spatial frequency, and represents the spatial frequency in X and Y directions, |F.sub.n(f.sub.x,f.sub.y)| is the frequency domain amplitude, and the larger the amplitude is, the richer the frequency component is, and the more the detailed information of the image is;
[0039] (3) extracting the frequency component corresponding to the image with the maximum frequency amplitude |F.sub.n(f.sub.x,f.sub.y)| in the N images at the spatial frequency (f.sub.x,f.sub.y) as a frequency component of the fused image at the spatial frequency according to the frequency domain amplitude |F.sub.n(f.sub.x,f.sub.y)| obtained in the step (2), traversing each point (i.e., each spatial frequency (f.sub.x,f.sub.y)) in the frequency domain, and finally generating a frequency domain component of the N fused images by adopting the method:
F.sub.n(f.sub.x,f.sub.y).fwdarw.F(f.sub.x,f.sub.y)
[0040] (4) performing the spatial domain image reconstruction step, wherein F(f.sub.x,f.sub.y) comprises the detailed information of the images at different positions in the N images because of the directionality of f.sub.x,f.sub.y, in order to obtain the fused image effect from the frequency domain to the spatial domain, performing inverse transform on the fused frequency domain component obtained in the step (3) by using two-dimensional discrete inverse Fourier transform to obtain a gray image reconstructed in the spatial domain, i.e., an image of the N fused images:
[0041] f(x,y) is the gray image obtained after reconstruction.
[0042] In