Infrared weak and small target image simulation method based on Gaussian model
Technical Field
The invention belongs to the field of infrared image processing, and particularly relates to an infrared small and weak target image simulation method based on a Gaussian model.
Background
Because infrared detection has the advantages of all-weather passive detection and the like, a detection alarm system consisting of infrared devices has incomparable advantages of systems such as radar and the like, and is widely applied to various detection alarm systems. To accomplish detection and tracking of the target as quickly as possible, the operation needs to be done at a greater distance. At this time, the target signal strength is weak, and the signal-to-noise ratio is low; the shape is small, occupying only a few pixels in the image, which makes the object appear as a weak infrared object. An effective detection tracking algorithm is a core technology of an infrared alarm system.
In general, to provide accurate, controllable and repeatable design basis and experimental conditions for simulation verification of detection and tracking algorithms, a large number of infrared weak and small target image sequences with known target positions and target characteristics are required. Currently, the main modes for acquiring infrared weak and small image sequences are a field shooting method and a simulation method. The method of shooting on the spot is to shoot and collect real weak and small targets through a thermal infrared imager to obtain images, and the motion characteristic and the radiation characteristic of the targets are usually difficult to control. Moreover, it takes much effort and time to calibrate the target coordinate position, which makes this method unsuitable for a large number of simulation verifications in a laboratory. Therefore, generating an infrared target image by simulation is an effective technical means for research and analysis, and is an effective technical complement to a real-time imaging method.
At present, the infrared image simulation method mainly comprises a calculation simulation method and a semi-physical simulation method. The method for calculating and simulating comprises the steps of mapping an infrared radiation numerical value of an object to a shape model of the object according to a strict mapping relation through a calibrated infrared spectrum radiation characteristic curve of the object to obtain a simulated infrared image. For example, zhou Jiang et al, in "near infrared scene simulation based on visible light image", published in optical technology 2015, volume 41, phase 1, propose a simulation technique for simulating and calculating an infrared scene by using the spectral reflectance of a typical feature and an image of the typical feature collected by a calibrated CMOS camera. The method establishes a mapping relation of gray values of visible light and near-infrared images by combining a camera radiation calibration result and the reflectivity of a ground object target, performs image segmentation on a simple scene, and can quickly convert the visible light image into the near-infrared image by using a lookup table. Because the method adopts the visible light camera for acquisition, the method can obtain image scenes with rich contents. However, because the method depends on obtaining accurate infrared spectrum reflectivity of an object and an accurate visible light/infrared mapping model, the method is difficult to effectively simulate the details such as image textures, and the like, so that the details of the simulated image have larger distortion compared with a real infrared image, and further the embedded target information has lower goodness of fit compared with a real target.
The semi-physical simulation method is to image the simulated infrared weak and small target through an infrared detector to obtain the infrared weak and small target simulation image. For example, wu Di, published in "an infrared scene/point source target simulator technical research" in infrared technology 2015, volume 37, phase 1, proposes an infrared scene/point source target simulator, which includes a point source target/interference channel, a relay optical system, an imaging channel, a multi-target composite system, a motion control system, and a mechanical support and connection structure, and can simultaneously simulate one path of point source target, four paths of point source interference, and one path of infrared scene. Because the simulation device adopts the real infrared detector to collect the scene, the obtained infrared image has higher image resolution and abundant detail characteristics. However, the device is composed of a plurality of systems and connecting devices, so that the device is complex in structure, high in manufacturing cost and high in implementation difficulty. In addition, because the device only adopts a spot method to simulate the infrared target, the radiation characteristic and the motion characteristic of the target cannot be adjusted as required. And the target position in the acquired infrared image still needs to be positioned again, so that the complexity of algorithm simulation is increased.
Disclosure of Invention
The invention aims to overcome the defects in the prior art, provides an infrared weak and small target image simulation method based on a Gaussian model, and is used for solving the problems that the existing simulation method cannot simultaneously realize rich details of a simulation image, a simulation device is simple in structure, and simulation target parameters can be controlled.
The technical idea of the invention is that according to the characteristic that the Gaussian distribution can effectively reflect the radiation distribution of the infrared dim target, the infrared dim target is modeled by a two-dimensional discrete Gaussian model to obtain a simulated infrared dim target model, then a real shot infrared background image sequence is adopted as a background image sequence for simulation, the simulated infrared dim target is mapped to the background image sequence according to the required motion track type of the infrared dim target, and further the simulated infrared dim target image sequence is obtained.
According to the technical thought, the technical scheme adopted for achieving the purpose of the invention is as follows:
1. an infrared small target image simulation method based on a Gaussian model is characterized by comprising the following steps:
(1) Acquiring an infrared background image sequence:
(11) Continuously collecting the real infrared background by using a thermal infrared imager to obtain an original infrared background image sequence;
(12) Cutting the obtained original infrared background image sequence;
(13) Performing mirror image expansion on the edge of the cut original infrared background image sequence, so that an accurate simulation target can be generated at the edge of the image sequence;
(2) Acquiring a simulated infrared small target model:
(21) Setting parameters of the simulated infrared dim target, including the size of the simulated infrared dim target and the signal-to-noise ratio (SNR);
(22) Calculating the pixel peak s of the simulated infrared dim target, i.e.
s=SNR×σ+μ
The SNR represents the signal-to-noise ratio of the simulated infrared dim target, and the sigma and the mu respectively represent the standard deviation and the mean value of a local neighborhood taking the pixel peak value of the simulated infrared dim target as the center;
(23) Two-dimensional discrete Gaussian distribution is obtained by discretizing a two-dimensional continuous Gaussian function, and a matrix of a Gaussian model with the same size as the simulated infrared weak and small target can be expressed as follows:
wherein M (i, j) represents a matrix of the Gaussian model, (i, j) represents coordinate position information in the matrix of the Gaussian model, exp (-) represents an exponential operation with a natural constant e as a base, z is a constant representing the size of the simulated infrared dim target, and specifies
z=(tar-1)/2
Wherein tar represents the size of the simulated infrared dim target;
(24) According to the pixel peak value of the simulated infrared dim target obtained in the step (22) and the matrix of the Gaussian model obtained in the step (23), obtaining a simulated infrared dim target model as follows:
wherein T (i, j) represents the simulated infrared dim target model, (i, j) represents the coordinate position information in the simulated infrared dim target model, and M max Is the maximum value in the matrix M (i, j) of the Gaussian model, M min Is the minimum value in the Gaussian model matrix M (i, j), s tableShowing the pixel peak value of the simulated infrared dim target, and mu shows the mean value of a local neighborhood taking the simulated infrared dim target peak value pixel as the center;
(3) Acquiring a simulated infrared small target motion track:
(31) Selecting a simulated infrared small target motion track model;
(32) Setting simulated infrared small target motion track parameters comprising the set simulated infrared small target motion speed and motion starting position;
(33) Acquiring a simulated infrared dim small target motion track according to the selected simulated infrared dim small target motion track model and the set simulated infrared dim small target motion track parameters;
(4) Acquiring a simulated infrared weak and small target image sequence:
(41) Setting the total frame number of the simulated infrared dim target image sequence;
(42) And synthesizing the obtained infrared background image sequence, the simulated infrared small target model and the simulated infrared small target motion track to obtain a simulated infrared small target image sequence.
In the above method for simulating an infrared dim target image based on a gaussian model, the mirror image expansion of the edge of the clipped original infrared background image sequence in step (13) is specifically performed by:
(131) Setting a matrix of mirror image expansion images, wherein the size of the matrix is (m +2 t) × (n +2 t), m and n respectively represent rows and columns of the original clipped infrared background image, and t represents the width of expansion of the original infrared background image;
(132) Assigning the cut original infrared background image to the range from the t +1 th row to the t + m th row and from the t +1 st column to the t + n th column of the mirror image expansion image matrix;
(133) Assigning data of t columns 1,2 and … of the mirror image expansion image matrix to data of 2t columns, … and t +1 columns respectively; data assignment of the t + m +1, t + m +2, …,2t + m column is data of t + m, t + m-1, …, m +1 column;
(134) Assigning data of t rows of 1,2 and … of the mirror image expansion image matrix as data of 2t, … and t +1 rows respectively; data assignment of the t + n +1, t + n +2, …,2t + n is data of the t + n, t + n-1, …, n +1 line;
(135) And (5) repeating the steps (131) to (134) until all the clipped original infrared background images are processed, and acquiring an infrared background image sequence.
In the above method for simulating an infrared small dim target image based on a gaussian model, the selected simulated infrared small dim target motion track model in step (31) is a linear model or a parabolic model, wherein:
a straight line model of a simulated infrared weak small target motion track model, and a kth simulated motion track coordinate (x) k ,y k ) Comprises the following steps:
wherein a and b are parameters of the linear motion model respectively; delta x is the increment of each frame of the simulated infrared weak and small target along the x-axis direction, and the unit is a pixel, namely the motion speed of the infrared weak and small target along the x-axis direction is delta x, and the unit is a pixel/frame;
parabolic model of simulated infrared weak small target motion track model, k-th simulated motion track coordinate (x) k ,y k ) Comprises the following steps:
wherein a ', b ' and c ' are parameters of a parabolic motion model respectively; and deltax is the increment of each frame of the simulated infrared weak and small target along the x-axis direction, and the unit is a pixel, namely the motion speed of the infrared weak and small target along the x-axis direction is deltax and the unit is a pixel/frame.
In the above method for simulating an infrared dim target image based on a gaussian model, the total frame number of the simulated infrared dim target image sequence set in step (41) is specifically defined as:
0<L≤min{(N-x 1 )/Δx,R}
wherein, L represents the total frame number of the simulated infrared dim target image scene sequence simulation, min {. DEG represents the minimum value operation, N represents the column number of the simulated infrared dim target image background, and x 1 The method comprises the steps of representing an abscissa value of a simulated infrared small and weak target in a first frame of an infrared small and weak target image scene sequence, representing the motion speed of the simulated infrared small and weak target, and representing the total frame number of an acquired image sequence.
In the above method for simulating an infrared dim target image based on a gaussian model, the step (42) of obtaining a simulated infrared dim target image sequence specifically comprises the following steps:
(421) Simulated infrared weak and small target motion track (x) k ,y k ) Intercepting a local neighborhood with a set size from the kth frame infrared background image sequence as a center, and calculating a mean value mu and a standard deviation sigma in the neighborhood according to the local neighborhood;
(422) Substituting the calculated mean value mu and standard deviation sigma into a simulated infrared small and weak target model to obtain the pixel value of the simulated infrared small and weak target;
(423) According to the simulated infrared weak and small target motion track (x) k ,y k ) Adding the obtained pixel value of the simulated infrared dim target with the kth frame infrared background image sequence to obtain a kth frame simulated infrared dim target image;
(424) And (4) repeating the steps (421) to (423) until the set L frames of simulation images are completed, and obtaining a simulated infrared weak and small target image sequence.
Compared with the prior art, the invention has the following advantages:
firstly, because the invention uses the real infrared image background sequence collected by the high-performance thermal infrared imager as the original infrared background image sequence, the accurate and reliable original infrared background can be obtained, compared with the method for generating the infrared scene image by calculating and simulating in the prior art, the method does not need to classify the scene, does not need an accurate spectrum mapping model, has simple simulation steps, small calculated amount, high reality degree of the simulated infrared weak and small target image and rich texture detail characteristics.
Secondly, the infrared dim target is simulated by using a modeling simulation method and the radiation characteristics of the infrared dim target are simulated by adopting a Gaussian model, so the infrared dim target with controllable parameters and accurate infrared radiation distribution can be obtained. Compared with the existing semi-physical simulation method, the method does not need a complex optical system and a connecting device, and has the advantages of simple structure of the simulation device and controllable parameters of the simulated infrared dim target size, the signal-to-noise ratio, the flight path and the like.
Drawings
FIG. 1 is a block diagram of the overall process of the present invention;
FIG. 2 is a block diagram of a sequence of acquiring an infrared background image according to the present invention;
FIG. 3 is a block diagram of a process for obtaining a simulated infrared small dim target model according to the present invention;
FIG. 4 is a block diagram of the process of acquiring a simulated infrared small dim target motion track according to the present invention;
FIG. 5 is a block diagram of the process of acquiring a simulated infrared small dim target sequence according to the present invention;
FIG. 6 is a three-dimensional display of a simulated infrared small dim target image, a simulated infrared small dim target partial enlargement, and a simulated infrared small dim target partial enlargement, respectively, of the present invention;
fig. 7 is a three-dimensional display diagram of a real shot infrared small target image, a real shot infrared small target partial enlarged view and a real shot infrared small target partial enlarged view, respectively.
Detailed Description
The invention is described in further detail below with reference to the figures and the specific embodiments.
Referring to fig. 1, in the embodiment, a sky background image shot by a real thermal infrared imager is used as experimental data, and software MATLAB2012a is used as a simulation tool, and the simulation implementation steps include acquiring an infrared background image sequence; acquiring a simulated infrared small target model; and acquiring a simulated infrared small target motion track and a simulated infrared small target image sequence.
Referring to fig. 2, the steps of acquiring the infrared background image sequence are as follows:
step 1: and continuously acquiring the real infrared background by using a thermal infrared imager to obtain an original infrared background image sequence. In this embodiment, the real infrared image background sequence is a sky background, and the size of the sky background is 640 × 480 pixels.
Step 2: and cutting the obtained original infrared background image sequence. In order to facilitate comparison of the algorithm, the collected infrared image needs to be cut to achieve the same criterion, in this embodiment, the background of the simulated infrared weak and small target image with 256 × 256 pixels is cut from the 150 th row and 150 th column of the original infrared background image to the right lower side of the original infrared image background, and the cut image is an image with 256 × 256 size.
And step 3: and performing mirror image expansion on the edge of the clipped original infrared background image sequence, so that an accurate simulation target can be generated at the image edge. In this embodiment, an image expansion width t =10, a number of rows m =256 of an image, and a number of columns n =256 of the image are set, and then the mirror image expansion specifically includes the steps of:
step 31: initializing a mirror image expansion image matrix, setting the matrix size to (256 + 20) x (256 + 20), i.e. 276 x 276 pixel size;
step 32: assigning the clipped original infrared background image to the range from the 11 th row to the 266 th row and from the 11 th column to the 266 th column of the expanded image matrix;
step 33: assigning 10 columns of data of 1,2, … of the expanded image matrix as 20 th, … and 11 th columns of data respectively; 267, 268, …,276 column data is assigned as 266, 265, …,257 column data;
step 34: assigning the data of the 10 th row of 1,2, … and the 10 th row of the expanded image matrix as the data of the 20 th, … and 11 th row respectively; data for 267, 268, …,276 is assigned to data for 266, 265, …, 257.
Step 35: and repeating the steps 31 to 34 until the whole process of the clipped original infrared background image is finished, and acquiring an infrared background image sequence.
Referring to fig. 3, the step of obtaining the simulated infrared dim target model is:
step 1: setting simulated infrared small target parameters, wherein the size of the simulated infrared small target is 5 × 5 and the signal-to-noise ratio SNR =6 in the embodiment;
step 2: acquiring a pixel peak value of the infrared dim target and a matrix of a Gaussian model according to the size and the signal-to-noise ratio of the simulated infrared dim target so as to obtain a simulated infrared dim target model;
step 21: calculating the pixel peak s of the simulated infrared dim target, i.e.
s=SNR×σ+μ
The SNR represents the signal-to-noise ratio of the simulated infrared dim target, and the sigma and the mu respectively represent the standard deviation and the mean value of a local neighborhood taking the pixel peak value of the simulated infrared dim target as the center;
step 22: two-dimensional discrete Gaussian distribution is obtained by discretizing a two-dimensional continuous Gaussian function, and a matrix of a Gaussian model with the same size as the simulated infrared weak and small target can be expressed as follows:
wherein M (i, j) represents a matrix of the Gaussian model, (i, j) represents coordinate position information in the matrix of the Gaussian model, exp (-) represents exponential operation with a natural constant e as a base, z is a constant representing the size of the simulated infrared weak and small target, and the method specifies
z=(tar-1)/2
Wherein tar is the size of the simulated infrared dim target;
step 23: according to the gray peak value of the simulation target obtained in the step 21 and the gaussian model matrix in the step 22, obtaining a simulation infrared dim target model as follows:
wherein T (i, j) represents the simulated infrared dim target model, (i, j) represents the coordinate position information in the simulated infrared dim target model, and M max Is the maximum value in the Gaussian model matrix M (i, j), M min Is the minimum value in the gaussian model matrix M (i, j), s represents the pixel peak of the simulated infrared small and weak target, and μ represents the mean value of the local neighborhood centered on the simulated infrared small and weak target peak pixel.
Referring to fig. 4, the step of obtaining the simulated motion track of the infrared dim small target is as follows:
step 1: selecting the type of the simulated infrared weak and small target motion track, wherein the model of the type is a straight line model or a parabolic model, and the embodiment selects the straight line model, namely the motion track coordinate (x) of the kth simulation k ,y k ) Comprises the following steps:
wherein a and b are parameters of the linear motion model respectively; delta x is the increment of each frame of the simulated infrared weak and small target along the x-axis direction, and the unit is a pixel, namely the motion speed of the infrared weak and small target along the x-axis direction is delta x, and the unit is a pixel/frame;
step 2: setting simulated infrared small target motion track parameters, in this embodiment, setting parameters a =1 and b =10 of a linear motion model, a motion speed Δ x =1 pixel/frame, and a motion start position x 1 =30;
And step 3: obtaining the simulated infrared dim small target motion track according to the selected simulated infrared dim small target motion track type and the set simulated infrared dim small target motion track parameter, namely, obtaining the simulated infrared dim small target motion track
Referring to fig. 5, the steps of acquiring the simulated infrared dim target image sequence are as follows:
step 1: setting the total frame number of the simulated infrared dim target image sequence, wherein the total frame number needs to meet the requirement
0<L≤min{(N-x 1 )/Δx,R}
Wherein, L represents the total frame number of the simulated infrared dim target image scene sequence simulation, min {. DEG represents the minimum value operation, N represents the column number of the simulated infrared dim target image background, and x 1 The method comprises the steps of representing an abscissa value of a simulated infrared small and weak target in a first frame of an infrared small and weak target image scene sequence, representing the motion speed of the simulated infrared small and weak target, and representing the total frame number of an acquired image sequence. For example, in the present embodiment, since N =256,x 1 If =30, Δ x =1, r =500, then 0 < L ≦ 226. Therefore, in this embodiment, the total frame number L of the simulated infrared weak and small target image sequence is set to 226.
Step 2: synthesizing the obtained infrared background image sequence, the simulated infrared dim small target model and the simulated infrared dim small target motion track to obtain a simulated infrared dim small target image sequence, which comprises the following specific steps:
step 21: simulated infrared small target motion track (x) k ,y k ) As a center, intercepting a local neighborhood with a set size in the kth frame infrared background image sequence, and calculating a mean value mu and a standard deviation sigma in the neighborhood according to the local neighborhood; for example, in the first frame in this embodiment, according to the motion track coordinates (30, 40) of the first frame, a 9 × 9 local neighborhood is taken to calculate to obtain a background mean value μ =120.87 and a background standard deviation σ =26.046;
step 22: and (3) substituting the mean value mu and the standard deviation sigma calculated in the step (21) into the simulated infrared dim target model to obtain the pixel value of the simulated infrared dim target. For example, in the first frame of this embodiment, the average value μ =120.87 and the standard deviation σ =26.046 are introduced into the infrared weak and small target model to obtain the target pixel value of the first frame
Step 23: according to the simulated infrared weak and small target motion track (x) k ,y k ) And adding the pixel value of the simulated infrared small target obtained in the step 22 and the k frame infrared background image sequence to obtain a k frame simulated infrared small target image. In the first frame of this embodiment, according to the simulated motion track coordinates (30, 40) of the infrared dim small target in the first frame, the simulated infrared dim small target image of the 1 st frame can be obtained by adding the pixel value T of the simulated infrared dim small target obtained in step 22 to the infrared background image sequence of the 1 st frame, and the simulation result is shown in fig. 4 (a);
step 24: and (5) repeating the steps 21 to 23 until the set 226 frames of simulation images are completed, so as to obtain the simulated infrared weak and small target image sequence.
The foregoing description is only one specific embodiment of the present invention, and it will be apparent to those skilled in the art that various modifications and variations in form and detail can be made without departing from the principle and structure of the invention, but these modifications and variations are within the scope of the invention as defined in the appended claims.
The effect of the present invention will be further described below with reference to the simulation result and the actually shot infrared weak and small target image.
A frame of simulated infrared small target image generated by the above embodiment is shown in fig. 6 (a), where the black frame indicates the position of the simulated infrared small target; a partial enlarged view of the simulated infrared small target is shown in fig. 6 (b), and a three-dimensional display of the partial enlarged view of the simulated infrared small target is shown in fig. 6 (c).
An image containing the infrared weak and small target, which is acquired by a real thermal infrared imager, is shown in fig. 7 (a), wherein a black frame indicates the position of the real infrared weak and small target; a partial enlarged view of the real infrared small target is shown in fig. 7 (b), and a three-dimensional display of the partial enlarged view of the real infrared small target is shown in fig. 7 (c).
By comparing fig. 6 (a) and fig. 7 (a), it can be seen that the infrared image generated by the simulation of the present invention is similar to the actually acquired infrared image, and has abundant detailed features such as texture.
By comparing fig. 6 (b) and fig. 7 (b), it can be seen that the infrared target generated by the gaussian model simulation of the present invention has a similar visual effect compared with the real infrared weak target.
By comparing fig. 6 (c) and fig. 7 (c), it can be seen that the infrared target generated by the gaussian model simulation in the present invention is similar to the real infrared dim target, and the gray levels thereof respectively obey the characteristic that the gray level of the target center is higher than the gray level of the target edge. Therefore, the simulated infrared dim target can accurately simulate the gray distribution of the real infrared dim target.