Disclosure of Invention
Aiming at the problems in the prior art, the invention provides a method for detecting a small target of a remote unmanned aerial vehicle based on an infrared image, which is used for realizing accurate detection of the small target.
The invention is realized by the following technical scheme:
a remote unmanned aerial vehicle small target detection method based on infrared images comprises the following steps:
step 1, constructing cumulative direction derivative convolution kernels of multiple scales in all directions of an infrared image;
step 2, optimizing the output of the average absolute gray difference algorithm, introducing a step function, eliminating negative contrast and only keeping positive contrast;
step 3, calculating the weighting coefficient of the optimized average absolute gray difference algorithm by adopting an accumulative direction derivative convolution kernel for each scale to obtain the weighting coefficient of each direction on each scale;
step 4, taking the response with the minimum weighting coefficient at the same position in each direction on each scale as the response graph D of the scale2;
Step 5, response graph D is formed on each scale2Obtaining response maps AAD on different scales as weighting coefficients of optimized average absolute gray difference algorithmi;
Step 6, forming a maximum response graph AAD by the maximum response values of the same position on different scalesiAnd as a final response image, carrying out contour extraction on the final response image to obtain a suspected target on the infrared image.
Preferably, the directions in step 1 are four directions, namely east-west-south-north;
the multiple scales in step 1 are four scales, 3 × 3,5 × 5,7 × 7 and 9 × 9 respectively.
Preferably, in step 2, the expression of the optimized mean absolute gray difference algorithm is as follows:
D1=|μΦ-μΩ|2×H(μΦ-μΩ)
wherein, muΦIs the total number of pixels in the target area and muΩThe total number of pixels in the area is background, and H is a step function and has a positive value.
Preferably, the expression of the step function H is as follows:
preferably, the expression of the weighting coefficient of each direction in each scale in step 3 is as follows:
CDDn=I*kn×H(I*kn)
CDDe=I*ke×H(I*ke)
CDDs=I*ks×H(I*ks)
CDDw=I*kw×H(I*kw)
wherein I is an original infrared image, ke,ks,kw,knPerforming convolution operation on the image and the convolution kernel by four-direction convolution kernel, H is a step function, I x k is the image, and CDDn,CDDe,CDDs,CDDwRespectively, the weighting coefficients of four directions.
Preferably, the expression of the final response graph in step 6 is as follows:
AADCDD=max{AADi,AADi+2,AADi+5,AADi+7}
preferably, the method further comprises the following steps:
step 8, determining the credibility of the suspected target by adopting the peak signal-to-noise ratio;
preferably, the method for determining the reliability of the suspected target by using the peak signal-to-noise ratio is as follows:
PSNR=(MAXI-bmean)/sqrtf(MES)
wherein bmean is the target background mean, MAXIThe maximum value of the pixel in the suspected area.
Preferably, step 9 is executed after step 8, the peak signal-to-noise ratio is compared with a preset sensitivity threshold, and a final target is input according to a comparison result.
10. A system of a remote unmanned aerial vehicle small target detection method based on infrared images comprises,
the system comprises an accumulation direction derivative convolution kernel module, a calculation module and a calculation module, wherein the accumulation direction derivative convolution kernel module is used for constructing an accumulation direction derivative convolution kernel of a plurality of scales in each direction of the infrared image;
the average absolute gray difference algorithm optimization module is used for optimizing the output of the average absolute gray difference algorithm, introducing a step function, eliminating negative contrast and only keeping positive contrast;
the weighting coefficient module is used for calculating the weighting coefficient of the optimized average absolute gray difference algorithm by adopting an accumulative direction derivative convolution kernel for each scale;
the scale response graph module is used for taking the response with the smallest weighting coefficient at the same position in each direction on each scale as the response graph of the scale;
the maximum response image module is used for taking the response image as a weighting coefficient of an optimized average absolute gray difference algorithm on each scale to obtain response images on different scales;
and the suspected target extraction module is used for taking the maximum response values of the same positions on different scales as a final response image, and performing contour extraction on the final response image to obtain a suspected target on the infrared image.
Compared with the prior art, the invention has the following beneficial technical effects:
according to the method for detecting the small target of the remote unmanned aerial vehicle based on the infrared image, provided by the invention, for the detection problem of the moving target in the complex background environment, an effective cumulative direction derivative convolution kernel is constructed and used for distinguishing between a target area and a non-target area, and the convolution operation is carried out on the complex background image containing the small target in multiple directions by adopting the method for constructing the convolution kernel, so that the small target close to a complex cloud layer can be effectively enhanced, and the problem of insufficient detection performance of the moving target close to the complex background environment is solved by introducing the cumulative direction derivative convolution kernel. Constructing the cumulative directional derivative convolution kernel solves the problem of the AAGD algorithm that addresses the high-intensity response of abrupt edges. Secondly, the main reason that the existing algorithm is sensitive to the abrupt edge is that due to two-dimensional filtering, directional information is ignored in the filtering process executed by a two-dimensional kernel, and the directional method for eliminating the sharp edge and the complex background is based on the cumulative derivative convolution kernel.
Detailed Description
The present invention will now be described in further detail with reference to the attached drawings, which are illustrative, but not limiting, of the present invention.
Referring to fig. 1-12, a method for detecting a small target of a remote unmanned aerial vehicle based on infrared images comprises the following steps:
step 1, constructing cumulative direction derivative convolution kernels of multiple scales in all directions of the infrared image.
Specifically, four scales are adopted to construct the cumulative direction derivative convolution kernel k in four directions of east, west, south and northe,ks,kw,knThe four dimensions are 3 × 3,5 × 5,7 × 7 and 9 × 9, respectively.
Step 2, optimizing the output of the average absolute gray difference algorithm (AAGD), introducing a step function, eliminating negative contrast, only keeping positive contrast, and optimizing the average absolute gray difference algorithm D1The output value of (a) is expressed as follows:
average absolute gray difference algorithm expression before optimization
Optimized average absolute gray difference algorithm expression
D1=|μΦ-μΩ|2×H(μΦ-μΩ) (2)
Wherein, I (x, y), Nφ,NΩRespectively representing the pixel value at the (x, y) position, the total number of pixels contained in the phi set and the total number of pixels contained in the omega set, wherein H is a step function and has a positive value, and the expression is as follows:
the output value of the original AAGD algorithm utilizes the square of the absolute value of the difference between the average values of the target window and the background window, so that positive and negative contrasts are enhanced, the temperature of a small infrared object is higher than that of the surrounding environment, so that only positive local contrast exists, the optimized AAGD algorithm D1 is provided based on the small infrared object, the negative contrast is eliminated, only positive contrast is reserved, and the optimization can greatly reduce false alarm of images and enhance the reliability of detection targets.
The conventional AAGD has many false responses in the filtered image (fig. 5 a). These spurious responses are eliminated by the thresholding represented in equation (2), as shown in fig. 5 b. Therefore, false alarm of some cloud layers, especially thick cloud layers, can be reduced greatly, and the problem of false alarm of hole-like regions is solved by introducing a step function into an AAGD algorithm.
Step 3, calculating the weighting coefficient of the optimized AAGD algorithm by adopting an accumulative direction derivative convolution kernel on each scale to obtain the weighting coefficient of each direction on each scale, namely, each convolution kernel is convoluted with the original infrared image, and the expression is as follows:
CDDn=I*kn×H(I*kn)
CDDe=I*ke×H(I*ke)
CDDs=I*ks×H(I*ks)
CDDw=I*kw×H(I*kw) (4)
wherein I is an original infrared image, ke,ks,kw,knPerforming convolution operation on the image and the convolution kernel by four-direction convolution kernel, H is a step function, I x k is the image, and CDDn,CDDe,CDDs,CDDwThe weighting coefficients of the AAGD algorithm are optimized for four directions, respectively, thus obtaining the weighting coefficients of each direction on 4 scales.
Step 4, taking the response with the smallest weighting coefficient at the same position in each direction on each scale as a response graph D of the scale2Will respond to the graph D2As an output result, to eliminate high intensity edges and structural background.
D2=min{CDDn,CDDe,CDDs,CDDw} (5)
Wherein D is2The response map is a response map of a certain scale, and the same position is the same coordinate.
Step 5, response graph D is formed on each scale2AAGD algorithm D as optimization1To obtain response maps AAD on different scalesi。
AADi=D1×D2 (6)
And 6, selecting the maximum response value at the same position on different scales as a final response graph.
AADCDD=max{AAD3,AAD5,AAD7,AAD9} (7)
And 7, carrying out contour extraction on the final response image to obtain a suspected target area.
The suspected target area comprises position information and size information, and the probability that the suspected target area is a target is higher when the response value of the suspected target area is higher.
And 8, determining the reliability of the suspected target by adopting the peak signal-to-noise ratio.
There are typically multiple suspect regions in a map. For further quantitative analysis, the confidence of the suspected target is calculated using the peak signal-to-noise ratio (PSNR), which is defined as:
given a suspected target area of size m × n, the Mean Square Error (MSE) is defined as:
PSNR=(MAXI-bmean)/sqrtf(MES)
wherein bmean is the target background mean, MAXIThe maximum value of the pixel in the suspected area. In order to ensure the accuracy of psnr, calculation is carried out on 16-bit (short type) originally acquired image data, so that conversion errors caused by conversion of the data into 8-bit (uchar type) calculation are avoided, reliable information around a suspected target is fully utilized, and the reliability is improved.
The peak signal-to-noise ratio (PSNR) is introduced, the peak signal-to-noise ratio (PSNR) is combined with a suspected target area and a background area, surrounding information is fully utilized, the reliability of a target is well represented, and the specific calculation process is that calculation is carried out on collected original 16-bit data instead of converting 16 bits into 8-bit images, so that errors caused by data conversion are reduced.
And 9, comparing the peak signal-to-noise ratio with a preset sensitivity threshold, and inputting a final target according to a comparison result.
The sensitivity of the detection system is set. The algorithm can perform reconnaissance on three different levels, high, medium and low, according to different sensitivity thresholds, and the sensitivity is usually set to medium.
Simulation verification
To study the performance of the algorithm, a real infrared image containing a small target was simulated, and an ideal target detection algorithm could map the entire input image (except the target region) to zero (black), enhancing only the target region. The algorithm effectively inhibits background clutter and enhances target areas, and the images comprise complex scenes such as thick clouds, fog, backlight and the like.
Through verification, the low-altitude slow-speed small target detection method based on the infrared image, such as the remote unmanned aerial vehicle, detects various complex environments, such as thick clouds, rainy days, cloudy days, sunny days, cloudy days, backlight and the like, in all weather (day and night), no dead angle is formed around the equipment by 360 degrees, the detection distance can reach 6km at the maximum, and 4 pixels are the minimum target pixel 2 x 2.
The most efficient existing infrared small target detection algorithm Average Absolute Gray Difference (AAGD), which directly benefits from the local contrast of the target region, is based on the natural contrast of the infrared target region with its surrounding local background. Consider two locally nested windows per pixel (fig. 1), in which the square of the absolute difference between the average of the pixels belonging to the target window and the average of the pixels belonging to the background window is calculated as the output value. Since AAGD benefits from a local averaging operator, it can effectively suppress background noise. Furthermore, since the algorithm can be implemented using local averaging, real-time operation is easily achieved. Although the AAGD algorithm has excellent performance in real and noisy scenes, there are three major limitations to the algorithm, specifically as follows:
first, there is no difference in positive and negative contrast in the AAGD algorithm. Thus, regions where both local contrast (target region) and local contrast (void region) are negative will be enhanced. As shown in fig. 2, the area corresponding to the hole-like area (the upper rectangle of fig. 2 a) is erroneously enhanced, which in turn increases the false alarm rate.
Secondly, when the background of the infrared image contains a sharp edge of high intensity, the detection performance of the AAGD algorithm is drastically reduced. To better illustrate this problem, the AAGD algorithm in FIG. 3 becomes more responsive to edges, which returns a strong response to non-target regions. It has been found through extensive research that the response is proportional to the square of the edge sharpness.
Finally, the algorithm cannot enhance target maneuvers close to complex backgrounds. When the flying small target approaches the cloud layer edge and other complex scenes, most background windows are mixedWave occupancy, which in turn increases the average μ of the background windowΩ. Therefore, the AAGD target enhancement ability sharply decreases. As shown in fig. 4. The AAGD algorithm can effectively enhance the target region when the target is on a uniform local background (fig. 4 b). As flying small targets get closer and closer into the high intensity cloud edge (fig. 4c), the AAGD response to the target zone becomes more attenuated (fig. 4 d).
The invention provides a method for detecting a small target of a remote unmanned aerial vehicle based on an infrared image, which is used for solving the problem that a moving target is detected in a complex background environment, wherein the problem is not limited to an AAGD algorithm, but all detection algorithms (such as PCM and LCM) utilizing a background window have the problem. To address this limitation, the detection capability of the algorithm is enhanced, the spatial distribution of the target pixels is considered, and an effective cumulative direction derivative convolution kernel is constructed for discrimination between the target region and the non-target region. The two-dimensional gaussian distribution (fig. 6a) is the most common model for modeling the spatial distribution of small infrared targets. The spatial distribution of the small infrared targets is simulated by considering two-dimensional Gaussian distribution, and the convolution operation is carried out on the complex background image containing the small targets in four directions by adopting a method for constructing a convolution kernel, so that the small targets close to the complex cloud layer can be effectively enhanced. FIG. 7 is a convolution kernel constructed by us, and an accumulative direction derivative convolution kernel is introduced to solve the problem that the detection performance of a maneuvering target is insufficient when the maneuvering target is close to a complex background environment. Fig. 8 shows the result of applying the convolution kernel to the infrared image containing the small target close to the high-intensity background clutter, and the proposed kernel can effectively enhance the small target close to the high-intensity background clutter, reduce false negative, and achieve accurate detection of the target.
Secondly, the problem of high-intensity response of abrupt edges is solved by constructing an accumulative directional derivative convolution kernel by an AAGD algorithm. This problem is not limited to only the AAGD algorithm, and almost all other detection algorithms suffer from this limitation. The main reason that existing algorithms are sensitive to abrupt edges is due to two-dimensional filtering. When the image is a two-dimensional signal, performing a filtering process by a two-dimensional kernel ignores directional information, which is important for distinguishing target and non-target areas in the field of small target detection. For example, sharp edges have only large intensity variations in some directions, while small infrared targets have relative contrast in all directions. Based on this fact, we propose a two-dimensional kernel based on cumulative derivatives (fig. 7) which is divided into four different directions to eliminate the sharp edges and the complex background orientation method, four-direction cumulative derivative kernels as shown in fig. 9, which use cumulative direction derivative convolution kernels to solve the high intensity sharp edge problem, and fig. 10 shows the edge removal feature of the proposed weighting coefficients.
The invention also provides a system of the remote unmanned aerial vehicle small target detection method based on the infrared image, which comprises an accumulated direction derivative convolution kernel module, an average absolute gray difference algorithm optimization module and a weighting coefficient module
The system comprises an accumulation direction derivative convolution kernel module, a calculation module and a calculation module, wherein the accumulation direction derivative convolution kernel module is used for constructing an accumulation direction derivative convolution kernel of a plurality of scales in each direction of the infrared image;
the average absolute gray difference algorithm optimization module is used for optimizing the output of the average absolute gray difference algorithm, introducing a step function, eliminating negative contrast and only keeping positive contrast;
the weighting coefficient module is used for calculating the weighting coefficient of the optimized average absolute gray difference algorithm by adopting an accumulative direction derivative convolution kernel for each scale;
the scale response graph module is used for taking the response with the minimum directional weighting coefficient on each scale as the response graph of the scale;
the maximum response image module is used for taking the response image as a weighting coefficient of an optimized average absolute gray difference algorithm on each scale to obtain response images on different scales;
and the suspected target extraction module is used for taking the maximum response values on different scales as a final response image, and performing contour extraction on the final response image to obtain a suspected target on the infrared image.
In an exemplary embodiment, a computer readable storage medium is also provided, which stores a computer program that, when executed by a processor, implements the steps of the infrared image based long range drone small target detection method. The computer storage medium may be any available medium or data storage device that can be accessed by a computer, including but not limited to magnetic memory (e.g., floppy disk, hard disk, magnetic tape, magneto-optical disk (MO), etc.), optical memory (e.g., CD, DVD, BD, HVD, etc.), and semiconductor memory (e.g., ROM, EPROM, EEPROM, nonvolatile memory (NANDFLASH), Solid State Disk (SSD)), etc.
In an exemplary embodiment, there is also provided a terminal correction system, which includes a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the infrared image-based remote unmanned aerial vehicle small target detection method when executing the computer program. The processor may be a Central Processing Unit (CPU), other general purpose processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf programmable gate array (FPGA) or other programmable logic device, discrete gate or transistor logic, discrete hardware components, etc.
The above-mentioned contents are only for illustrating the technical idea of the present invention, and the protection scope of the present invention is not limited thereby, and any modification made on the basis of the technical idea of the present invention falls within the protection scope of the claims of the present invention.