# Data-Free Area Detection and Evaluation for Marine Satellite Data Products
## 3 Endmember of Turbid Water, Clean Water and Sea Ice
### 3.3 Optimal Threshold Automatic Acquisition via the Improved SAM (ISAM) Algorithm  
The SAM [50] was chosen as the recognition classification method in this study. It is a method based on vector space and spectral shape analysis. It is suitable for the image recognition and classification of the overall similarity of spectral shapes of marine coverage objects [51]. In SAM, the spectral data appear as vectors in multidimensional space, and the angle between the spectrum of a pixel and the standard spectral vector of a sample is  
Figure 5: Cloud detection results and spatial location determination: (**a**) GOCI, (**b**) MODIS and (**c**) OLCI. Figure 6: Spectral information of the endmembers of the ocean coverage object: (**a**) GOCI, (**b**) MODIS and (**c**) OLCI. determined by employing a corresponding computational equation (Figure 7). Furthermore, a suitable angle threshold is set. If the angles between two spectral vectors are less than the threshold, they are classified as a single category in feature identification. The equation for calculating the angle between the spectra is expressed as follows:  
\[\theta=\cos^{-1}\frac{T.R}{||T||\cdot||R||}=\cos^{-1}\frac{\sum_{i=1}^{n}t_{i} \cdot r_{i}}{\sqrt{\sum_{i=1}^{n}t_{i}^{2}}\sqrt{\sum_{i=1}^{n}t_{i}^{2}}}, \tag{6}\]  
where \(\theta\) is the angle representing the similarity between the different spectra. As the \(\theta\) becomes smaller, the similarities between the two spectra become greater, and as the \(\theta\) becomes larger, the difference becomes greater. \(T(t_{1},t_{2}\ldots t_{n})\) is the sample spectral library spectrum of the n bands, and \(R(r_{1},r_{2}\ldots r_{n})\) is the data of the spectra to be classified. When \(M(T_{1},T_{2}\ldots T_{m})\) sample points are selected as the spectral library spectra in an image class, the class center is used as the geometric mean vector of the selected spectra in the region. \[\overline{T}=\frac{1}{M}\sum_{1}^{M}T_{i}, \tag{7}\]  
The angle \(\theta\) threshold (\(0-\pi/2\)) of the two spectral vectors in the SAM algorithm is particularly critical. The accuracy of recognition classification is affected by either an extremely large threshold or an extremely small threshold. When the threshold is extremely large, misclassifications occur. When the threshold is extremely small, some data are unclassified. Only an appropriate threshold can increase the rigor of the classification results. Therefore, this study improves the SAM, also called ISAM, algorithm to automatically obtain the most suitable threshold value, reduce the subjective influence of human intervention and increase the objectivity of the classification results. The specific improvement measures are based on the SAM algorithm. First, we evenly selected 100 training samples for each class of ocean objects and removed half of the samples in the data-free areas of the Level 2 product data from the training samples, and we used them as validation samples. The reason for selecting half of the samples and using them as validation samples was that all of the cloud pixels were present in the data-free  
Figure 7: Schematic diagram of the SAM recognition classification principle. area. Then, each class of marine coverage type objects is given an initial angle threshold. It is iteratively calculated using the overall accuracy of the classification as the judgment criterion. Different iteration steps can be artificially set to adjust the time complexity of the algorithm, allowing for the obtainment of the angular threshold results for each class of classified objects. The initial angle of each type of object is set to 0.05 radians (R), and the iteration step size is selected to be 0.005. There were threshold interactions between object classes and differences in pixel size between data. This resulted in different classification thresholds for each object between different data sets (Table 3). The impact of the difference in spatial resolution between the data on the classification results is analyzed in depth in the subsequent discussion section.