## 3 Data Processing
### Ship Detection  
Ship detection is performed with the Wavelet Transform (WT) [5], a mathematical tool that permits the decomposition of a generic function into a base of simple ones. These basic functions are localized in the spatial and wave-number domains and can be defined in such a way that each one takes a specific portion of this space. These portions are known as _scales_ and are characterized by the ratios between the resolutions adopted in both domains. For instance, scales can be defined with fine resolution in the spatial domain but worse value in the frequency one and vice versa. Note that WT is an extension of the Fourier Transform where the signal is analyzed with a unique scale. Among all the wavelets variants, the Stationary Wavelet Transform 2D (SWT2) is specially suited for images because permits the processing of 2D features. This allows the definition of advanced morphological analysis that isolates particular features according to the patterns captured along the different scales. This is the case of ships that present a marked _coherent_ response in contrast to the noise-like _incoherent_ behavior of the sea [6]. Such characteristics have been exploited in the approach recently proposed by UPC [6] to enhance ship reflectivity contrast. Two advantages are identified:  
Figure 3: Snapshot of coastline isolation (blue line) for an ENVISAT image of the bay of Gibraltar (left). Differences between _image_ (red line) and _shape_ (yellow line) processing modes (right). * No fine thresholding is needed as the dynamic range between the reflectivity values of ship and sea signatures (i.e. the contrast among signatures) is notably increased. * The processing approach is extremely simple as the main operation relies on a pointwise multiplication among all the products of the considered scales. This is complemented with the operations inherent in WT processing, i.e. the transformation from space to wavelet domain and vice versa. The result is an image where the 2-D local maxima indicate ship location. In SIDECAR, a variant of the previous approach has been defined in order to add features useful for the operational case. Instead of the pointwise multiplication, particular combinations of the different sub-products at the first scale are applied. They exploit the properties of WT for which the products of each scale can also be obtained via a recursive filtering of the original image with series of low and high frequency filters [5]. As low- and high-frequency filtering is applied along rows and columns, four products result. With them, SIDECAR follows the following simple procedure:  
* The two products derived from low- (A, H) and high-frequency (V, D) filtering applied along image rows are multiplied among them. * The Inverse WT is applied to these two sets and two intermediate images are generated in the spatial domain. In each image, ship presence is identified by clusters of local maxima. The center of each cluster (in fact, the actual ship location) is localized by using the MATLAB\({}^{\copyright}\) cluster procedure that links pairs of points according to a Euclidean distance. The kernel of this function is a linkage method that generates a hierarchical cluster tree from the previous distances. The number of clusters is determined by iterating the previous procedure with an increasing number of maximum clusters, still the difference between two of them is below a fixed threshold. This value is tuned according to experience and the processing of some test samples. The overall ship detection report is stored in a database where possible duplicates are erased (ships located in both intermediate images). This method provides two advantages:  
1. **Proximity**. The previous algorithm provides a manner to detect close targets without losing the capability to detect small and low reflective ships. The threshold fixing the ending criteria in the cluster procedure quantifies the performance of the algorithm for both items.