1. Introduction
Small infrared (IR) target detection has been widely used in airborne early warning, IR guidance, surveillance and tracking, and others. Usually, the earlier we detect a small IR target, the more time we get for dealing with it, and thus the more suitable decision can be made. However, factors such as low signaltonoise ratio (SNR), variable target sizes, variable target intensity, less shape and texture information, blurred edges, and serious background clutters, cause small IR target detection to be a challenging task.
So far, many IR target detection algorithms have been developed ranging from recursive estimation techniques [
1] to partial sum of the tensor nuclear norm [
2]. Among them, morphology filtering such as the tophat transform and its variants plays an important role [
3,
4]. Tophat transforms are also combined with other techniques such as genetic algorithm [
5] to improve the detection performance. Though these methods can detect targets to a certain degree, their performance is greatly degraded under complex background clutters.
Over the last few years, it is widely shared that algorithms derived from visual attention mechanics work well for detecting a small target. The early work in 1998 made intellectuals pour attention into visual attention distribution [
6], and then saliency estimation methods corresponding to visual attention became popular in small IR target detection [
7]. Wang et al. are the early researchers to use the Difference of Gaussian (DoG) filters to get a saliency map for detecting real targets [
8]. However, due to problems like signal interference, a small target does not strictly obey the 2D Gaussian distribution, and thus cannot be successfully detected by merely adopting DoG filters. Further studies on visual attention focus on the relationship between a target and its neighborhoods. The local contrast method [
9,
10], the multiscale patchbased contrast measure [
11], weighted local difference measure [
12], human visual mechanism detectors [
13,
14], variance difference detector [
15], entropybased contrast measure [
16], weighted local contrast detector [
17], local intensity and gradient detector [
18], visual saliency guided detector [
19], local difference adaptive measure [
20], the adaptive local measurement contrast, and salient region extraction and gradient vector processing [
21] are reported successively, demonstrating that the contrast between a target and its neighbor is helpful for small IR target detection.
Though many improved algorithms have been reported, it is still challenging to detect a small IR target in images with low SNR, low contrast, and serious background clutters. This paper presents an effective detection method based on the Mexicanhat distribution. A raw IR image is first processed by the modified tophat transformation [
22] and the DoG filter, getting a filtered IR image. Then, the adjacent region around a pixel of the filtered image is radially divided into three subregions. Next, the pixels whose adjacent regions have the Mexicanhat distribution are determined as candidate targets. Finally, a small target is segmented out by locating the brightest pixel. Experimental results show that the adoption of the Mexicanhat distribution benefits our method with higher detection rate, lower false alarm rate, and faster detection speed than existing detectors. Though the existing detector in [
15] is resemble to our method, it performs on raw IR images and only compares the relationship between two regions. On contrast, we operate on the filtered image and detect an IR target based on the Mexicanhat distribution, and our experimental results show that such strategy can effectively enhance the small IR target and improve the detection rate.
The rest of the paper is organized as follows.
Section 2 analyzes the characteristics of the adjacent region of a target in a DoGfiltered image.
Section 3 describes the details of the proposed method.
Section 4 presents experimental results along with some analysis. Finally,
Section 5 gives some conclusions.
2. MexicanHat Distribution of the Adjacent Region around an IR Target
Let
I(
x,
y) be an image. Then its DoGfiltered image,
${\mathit{I}}_{DoG}$, is formed by (1) [
23]:
where
${\sigma}_{1}$ and
${\sigma}_{2}$ are the standard deviations of the two Gaussian kernels, ‘*’ is the convolution operation given by (2).
After careful observation, we find the pixel intensity of the adjacent region around an IR target shows a regular brightdarkbright pattern along the radial direction. Specifically,
Figure 1 illustrates such brightdarkbright pattern. The center pixel of a target patch is the brightest, and then the intensity decreases gradually along the radial direction until reaching the lowest value. After that, the intensity increases again. As shown in
Figure 1c, the profile of such brightdarkbright pattern is like a Mexican hat, and thus we call it Mexicanhat distribution in this paper.
Based on the above observations, we propose to detect small targets in IR images via the Mexicanhat distribution. As shown in
Figure 2, we first divide the adjacent region of a small target into three subregions along the radial direction that are respectively termed as
${R}_{0}$,
${R}_{1}$, and
${R}_{2}$. For a small target positioned at (
r,
c),
${R}_{0}$ is a (2
L + 1) × (2
L + 1) square image region centered at (
r,
c), and
${R}_{1}$ is onepixel square border just outside
${R}_{0}$, and
${R}_{2}$ is onepixel square border without four corner pixels outside
${R}_{1}$. According to the Mexicanhat distribution, we know that the intensity relationship between the three subregions of a target roughly meets the brightdarkbright pattern, and thus have the following rule:
Rule 1: If the mean intensity of ${R}_{0}$ is both larger than ${R}_{1}$ and ${R}_{2}$, and the mean intensity of ${R}_{1}$ is smaller than ${R}_{2}$, then the center of ${R}_{0}$ can be a candidate target center.
3. The Proposed Method
As shown in
Figure 3, the proposed fourstep method for detecting a small IR target is based on the Mexicanhat distribution. To increase the contrast between small targets and the background, the modified tophat transformation [
22] is first applied to a raw IR image, followed by DoG filtering. Then, the Mexicanhatdistribution based
Rule 1 is applied to the DoG image, getting candidate targets. Finally, a small IR target is detected by locating the brightest pixel.
Here, to deal with the variable size of small IR targets, the following iteration strategy is adopted when applying
Rule 1 to a DoG image. First, let the halfwidth,
L, of region
${R}_{0}$ ranges from 1 to 5, implying the size of region
${R}_{0}$ varies from
$3\times 3$ to
$11\times 11$ that is consistent to the recognition that a small target usually occupies less than 80 pixels [
24]. Then for each
L,
Rule 1 is applied to the adjacent of each pixel of the DoGfiltered image. Those pixels that meet
Rule 1 are labeled as candidates, and their intensity is emphasized by the mean intensity of
${R}_{1}$. Meanwhile, the corresponding size of
${R}_{0}$, i.e., (2
L + 1) × (2
L + 1) are recorded as the target size.
Algorithm 1 presents the details for finding candidate targets as well as their sizes. Considering small IR targets are usually brighter than the background,
Rule 1 is merely applied to the patches whose center pixel is brighter than
$th={\mu}_{0}+{\sigma}_{0}$ with
${\mu}_{0}$ and
${\sigma}_{0}$ being the mean intensity and the standard variance of the DoGfiltered image.
Algorithm 1 Candidate target detection. 
 1:
Input: ${\mathit{I}}_{DoG}$—the DoGfiltered image H,W—the height and the width of ${\mathit{I}}_{DoG}$ th—threshold  2:
Output: ${\mathit{I}}_{can}$—the image with enhanced candidate targets (${\mathit{r}}_{can}$, ${\mathit{c}}_{can}$)—the coordinates of candidates s—the size of candidates inten—the mean intensity of candidates  3:
for$\mathit{r}=1$ to $\mathit{H}$ do  4:
for $\mathit{c}=1$ to $\mathit{W}$ do  5:
if ${\mathit{I}}_{DoG}$(r, c) > th then  6:
for $\mathit{L}=1$ to 5 do  7:
Locate subregions ${R}_{0}$, ${R}_{1}$ and ${R}_{2}$ according to Figure 2;  8:
${m}_{i}=$ mean intensity of ${R}_{i}$, with $i=0$, 1 and 2.  9:
if ${m}_{0}>{m}_{1}$, ${m}_{0}>{m}_{2}$, and ${m}_{1}<{m}_{2}$ then  10:
(${\mathit{r}}_{can}$, ${\mathit{c}}_{can}$) = (r, c) s(${\mathit{r}}_{can}$, ${\mathit{c}}_{can}$) = $(2L+1)\times (2L+1)$ inten(${\mathit{r}}_{can}$, ${\mathit{c}}_{can}$) = ${m}_{0}$ ${\mathit{I}}_{can}$(${\mathit{r}}_{can}$, ${\mathit{c}}_{can}$) = ${\mathit{I}}_{DoG}$(${\mathit{r}}_{can}$, ${\mathit{c}}_{can}$) − ${m}_{1}$  11:
else  12:
break;  13:
end if  14:
end for  15:
end if  16:
end for  17:
end for

Next, to further remove false targets, the statistics of subregions
${R}_{0}$,
${R}_{1}$ and
${R}_{2}$ are calculated. For real small IR targets, their intensity might not strictly meet the Mexicanhat distribution. For example, the first row of
Figure 4 shows that the center pixel of a target is not the brightest, and the second row shows that nearly half of pixels in region
${R}_{1}$ and in region
${R}_{2}$ don’t meet the Mexicanhat distribution. Therefore, for a candidate target located at (
r,
c), (3) is adopted to calculate the ratio of the number of pixels in
${R}_{1}$ being darker than the mean intensity of
${R}_{0}$ to the total pixels of
${R}_{1}$.
where
${m}_{0}$ is the mean intensity of
${R}_{0}$, and
$Card(.)$ represents the cardinality of a set.
Then the pixel by pixel differences between
${R}_{1}$ and
${R}_{2}$ are calculated along the row direction and the column direction, respectively, followed by the computation of the ratio of the number of pixels in
${R}_{1}$ being darker than the corresponding pixels in
${R}_{2}$ to the total pixels with (4) and (5).
where
$({x}_{L},y)$ and
$({x}_{R},y)$ represent pixels of the first and the last columns in
R_{1}, and
$(x,{y}_{U})$ and
$(x,{y}_{D})$ are the pixels of the first and the last rows in
${R}_{1}$. Equation (5) indicates that each corner element in
${R}_{1}$ has been compared two times, so the total number of pixels in (4) is given by
Card(
${R}_{1}$) + 4 rather than
Card(
${R}_{1}$).
Having the ratios of ${\mathit{Rt}}_{10}$ and ${\mathit{Rt}}_{12}$, we compare them with two predetermined thresholds ${\mathit{th}}_{10}$ and ${\mathit{th}}_{12}$, and use Rule 2 to detect a true small target. Finally, Rule 3 is applied to both target regions and nontarget regions to further enhance targets while suppressing nontargets.
Rule 2: If ${\mathit{Rt}}_{10}>{\mathit{th}}_{10}$ and ${\mathit{Rt}}_{12}>{\mathit{th}}_{12}$, then the corresponding pixel position (r, c) is the center of a small target.
Rule 3: If (
r,
c) is the center of a small target, then use (6) to enhance it; otherwise use (7) to suppress it.
where
${\mathit{I}}_{Final}(\mathit{r},\mathit{c})$,
$I(r,c)$ and
${I}_{DoG}(r,c)$ represent the final enhanced IR image, the raw IR image, and the DoGfiltered image, max(.) and min(.) are the maximum and the minimum functions.
Since small targets in both a raw IR image and DoGfiltered image are usually brighter than their surroundings, the term
$I(r,c)\times {I}_{DoG}(r,c)$ in (6) and (7) can enhance targets while suppressing backgrounds. Moreover, since both
${\mathit{Rt}}_{10}$ and
${\mathit{Rt}}_{12}$ are positive numbers smaller than 1, the term
$\sqrt{max({\mathit{Rt}}_{10},{\mathit{Rt}}_{12})}$ in (6) is always bigger than the term
${(min({\mathit{Rt}}_{10},{\mathit{Rt}}_{12}))}^{2}$ in (7). Therefore, by applying (6) and (7) to targets and nontargets, we can get a final image with salient targets. As a result, the target is easily detected by assigning the pixel with the maximum intensity as the target center. Algorithm 2 gives the details of our method for detecting small IR target.
Algorithm 2 Our method for detecting small IR target. 
 1:
Input: I, ${\mathit{I}}_{DoG}$—raw IR image and the corresponding DoG image ${\mathit{th}}_{10}$, ${\mathit{th}}_{12}$—thresholds H,W—the height and the width of $\mathit{I}$  2:
Output: (${\mathit{r}}_{tar}$, ${\mathit{c}}_{tar}$)—target center  3:
for$\mathit{r}=1$ to $\mathit{H}$ do  4:
for $\mathit{c}=1$ to $\mathit{W}$ do  5:
if $(\mathit{r},\mathit{c})$ is the center of a candidate target then  6:
compute ${R}_{10}$ and ${R}_{12}$ with (3)–(5).  7:
if ${\mathit{R}}_{10}>{\mathit{th}}_{10}$ and ${\mathit{R}}_{12}>{\mathit{th}}_{12}$ then  8:
use (6) to get ${\mathit{I}}_{Final}(\mathit{r},\mathit{c})$  9:
else  10:
use (7) to get ${\mathit{I}}_{Final}(\mathit{r},\mathit{c})$  11:
end if  12:
end if  13:
end for  14:
end for  15:
$\left[{\mathit{r}}_{tar}\phantom{\rule{4pt}{0ex}}{\mathit{c}}_{tar}\right]=\underset{1\le r\le \mathit{H},1\le c\le \mathit{W}}{max}$ (${\mathit{I}}_{Final}(\mathit{r},\mathit{c})$)

5. Conclusions
In this paper, we have proposed a new method for detecting small IR targets. Our method is based on that the adjacent region of a small target in a DoGfiltered image roughly holds the Mexicanhat distribution. Our experimental results on both realworld and synthetic IR images show that our method is quite effective in enhancing small IR targets while suppressing background clutters. In terms of SCRG, BSF, ${P}_{d}$, and ${P}_{f}$, our method outperforms both the traditional and stateoftheart methods. Moreover, it runs faster than the RLCM, the LIG, the Max–median, and the Max–mean.
Our experimental results show that our method performs rather well in single target detection and can also be directly used for detecting multitargets in simple background. However, such direct use degrades the detection performance when the background is very complicated. Thus, our future work will focus on detecting multitargets in complex background via such a method.