# Range-Doppler Based CFAR Ship Detection with Automatic Training Data Selection
## 3 Training Data Selection
### Target Pre-Detection
The final mathematical expression for the adaptive pre-detection threshold \(\eta_{\text{pre}}(r)\) can then be written as  
\[\eta_{\text{pre}}(r)=\widetilde{A}(r)+\ f\cdot\ \text{SG}(\sigma(r)), \tag{7}\]  
where \(f>1\) is a factor used to determine the decision criterion to set the pre-detection threshold. Figure 8 shows the influence of different factors \(f\) on the outlier detection. From Figures 8 and 9 it is noticed the pre-detection threshold is not only able to detect target peaks but also other high clutter peaks. A threshold based on a setting of \(f=1\) or 2 would cancel most of the peaks which might have originated from the ocean. The goal of target pre-detection is to cancel only the bright targets and high clutter peaks. Therefore, the best value for \(f\) has to be found empirically. For F-SAR X-band HH data it was found that a value of \(f=3.5\) or 4 effectively detects the outliers. To demonstrate the effectiveness of the proposed pre-detection algorithm, it is applied to a real X-band HH polarized RC data in time domain. Exemplary data containing a ship signal are shown in Figure 10. For this particular case, the suitable window size of the median filter was set to 625. For an F-SAR range sample spacing of 0.3 m this value corresponds to an approximately 188 m slant range distance. It is recommended that the window size of the median filter should be in the order of the maximum expected slant range length of the ships to be pre-detected. This ensures proper peak detection capability. Figure 8: Average amplitude range profile with range dependent pre-detection thresholds. A high target peak (=ship) is present at a range of approximately 7500 m. The effectiveness of the MAD based pre-detection is evaluated in three different zones; near (red), mid (green) and far range (blue). Details are shown in Figure 9.  
Figure 9: Details of the pre-detection thresholds computed for different factors \(f\) in (a) near (b) mid and (c) far ranges. The binary pre-detection map of the bright targets and outliers after applying the proposed pre-detection algorithm is shown in Figure 7:0  
To further illustrate the robustness of the pre-detection algorithm, the ratio of the actual (i.e., measured) false alarm rate \(\mathit{PFA}_{\text{est}}\) and the desired false alarm rate \(\mathit{PFA}_{\text{set}}\) was evaluated using the K-distribution sea clutter model (cf. Section 4.1) applied before and after target pre-detection and cancelation. In the optimum case, when the data contain no ships and no spiky clutter, the ratio \(\mathit{PFA}_{\text{est}}/\mathit{PFA}_{\text{set}}\) should be one. Practically this cannot be achieved, since there is always a slight difference between the chosen ocean clutter model and the actual ocean clutter statistics. The measured actual false alarm rate \(\mathit{PFA}_{\text{est}}\) is obtained from the ratio  
Figure 7:1  
where \(n_{\text{detections}}\) is the total number of obtained detections assuming that the evaluated data patch contains no ship targets, and \(n_{\text{total}}\) is the total number of samples contained in the same data patch. From the data shown in Figure 10 the HH, VV and HV polarization channels were chosen for the evaluation. A K-distribution sea clutter model was fit to the data and a CFAR detection threshold was computed for a desired false alarm rate \(\mathit{PFA}_{\text{set}}=10^{-6}\). The measured ratio \(\mathit{PFA}_{\text{est}}/\mathit{PFA}_{\text{set}}\) is shown in Figure 7:2 The higher the ratio the worse is the detection performance. Figure 7:3 Binary detection map after applying the proposed pre-detection algorithm. The pre-detected ship signal (left) as well as spiky clutter peaks can clearly be seen. Figure 7:4 RC F-SAR X-band HH polarized radar data acquired during a linear flight track. Ship signal is indicated in the figure. As observed in Figure 12, irrespective of the polarization channels, the presence of a target severely degrades the estimated false alarm rate.