1. Introduction
Satellite images are widely used for environmental monitoring since they permit access to remote locations and hazardous regions without difficulty [
1]. There are several possible fields of application, including forestry [
2], greenhouses [
3], soil moisture [
4], glaciers [
5], archaeology [
6], cultural heritage [
7], landslides [
8], subsidence phenomena [
9], floods [
10], effects of volcanic eruptions [
11], etc. Moreover, there are also applications concerning the coastal and marine environment, such as the determination of the bathymetry [
12], the identification of chlorophyll quantity [
13] and the monitoring of erosion and nourishment phenomena [
14], for which the identification of the coastline is necessary. Multiple techniques can be applied to satellite images, as well as those obtained from Unmanned Aerial Vehicles (UAVs) [
15] or aerial surveys [
16], to extract the coastline. Over the years, these techniques have developed more and more, with some requiring the calculation of appropriate indices or the application of classification methods.
The extraction of water features from optical images is typically based on the lower reflectance of the water compared to that of the soil in the infrared channels [
17]; on the other hand, water has a peak of reflectance in the green channel.
Based on these principles, in 1996 McFeeters [
18] introduced an index, namely the Normalized Difference Water Index (NDWI), that allows water to be discerned from the ground with excellent results. Successively, many other indices were developed for the identification of water bodies, such as the Modified NDWI (MNDWI) proposed by Xu [
19] which uses green and SWIR bands, the Automated Water Extraction Index (AWEI) proposed by Feyisa et al. [
20] which is a combination of green, Short-Wave Infrared (SWIR) and Near Infrared (NIR) bands, and the Water Index (WI
2015) proposed by Fisher et al. [
21] which makes use of green, red, NIR and two SWIR bands.
On the other hand, by means of classification techniques, supervised and unsupervised, it is possible to obtain thematic maps capable of representing the spatial variation of one or more specific features [
22], such as water and land.
As is known, supervised techniques require some a priori knowledge, or a preliminary visual inspection, of the investigated area in order to achieve training sites [
23,
24]. However, since they need to meet some specific conditions [
25], the intervention of an operator who must manually identify the training sites is required; this operation is obviously time consuming and subject to human error. On the contrary, unsupervised techniques are free from human errors, since they do not require the direct involvement of an operator and need execution times much shorter than supervised methods. In unsupervised classification, pixels are assigned to clusters without taking into account any external data but completely automatically [
26]. However, unsupervised classification could generate mismatches between clusters and actual classes [
27], and as a matter of fact, it is not always usable.
The automation of the shoreline identification process has been the subject of several studies in the past. In 2012 Latini et al. [
28] developed a new neural network algorithm from Synthetic Aperture Radar (SAR) COSMO-SkyMed data. In 2015 Ebaid et al. [
29] proposed a procedure based on edge detection methods and Geographic Information System (GIS) tools applied on infrared bands. In 2016 Saeed and Fatima [
30] used a Sobel edge operator on DubaiSat images. In 2018 Mirsane et al. [
31] integrated radar and optical satellite imagery and applied the wavelet method. In 2019 Dai et al. [
32] used a water probability algorithm based on a group of repeat measurements. In 2020 Yang et al. [
33] presented a comparative framework of sea–land segmentation for Landsat 8 Operational Land Imager (OLI) via semantic segmentation in deep learning techniques. In 2021 Domazetović et al. [
34] developed a coastal extraction tool based on the combination of WorldView-2 multispectral imagery and a stereo-pair-derived digital surface model. Finally, in 2022 Aghdami-Nia et al. [
35] developed a new framework based on a convolutional neural network to improve the performance of sea–land segmentation.
It is therefore clear that the most recent applications in this field aim to reduce calculation times and minimize human error. In this work we propose an innovative method for the extraction of the coastline that relies on the integration of Principal Component Analysis (PCA) and the unsupervised classification of the PCA products. In this way the involvement of the operator in the construction of the training sites and the manually conducted threshold research is totally eliminated and calculation times are reduced.
PCA is widely used in remote sensing, and it is in fact applied both for image classification [
36] and to improve their visualization [
37]. PCA is often used to assess coastline evolution over time [
38,
39,
40]; nevertheless, its application for shoreline detection concerns just a part of the process, above all for enhancing the image geometric resolution (pan-sharpening) [
41] or for reducing the number of hyperspectral bands [
42].
This paper is organized as follows. In
Section 2 the main characteristics of the used dataset (Landsat 9 OLI imagery and Sentinel-2 imagery) and the study areas are summarized.
Section 3 presents the novel methodological approach: the PCA is introduced, explaining its capability to calculate a set of decorrelated bands of which the first component is submitted to unsupervised classification; then the K-means algorithm and the accuracy tests are described.
Section 4 presents and discusses the results, comparing the levels of accuracy of the extracted coastlines.
Section 5 concludes the paper with a generalization of the results.
4. Results and Discussion
The following table (
Table 3) reports the coefficients to obtain the PCA-1 and the percentage of variance that this synthetic band includes.
Considering that PCA-1 provides in all cases high values of standardized variance (in eight cases more than 90% and in the remaining case still higher than 85%), we do not use the other components (PCA-2, PCA-3) for the subsequent experiments.
Figure 5,
Figure 6 and
Figure 7 show the synthetic bands obtained from Landsat 9 OLI dataset, specifically the first component of PCA (PCA-1), NDWI and MNDWI.
By means of visual analysis, the image obtained by PCA presents a greater contrast between water and no-water, allowing the coast to be easily identified.
Figure 8,
Figure 9 and
Figure 10 show the results obtained using Sentinel-2 images with a resolution equal to 10 m, while
Figure 11,
Figure 12 and
Figure 13 show the results obtained using only the bands with a geometric resolution equal to 10 m. Note that the first synthetic principal component (PCA-1) results from processing all images included in the package available on COH as S2–20 m in which there are also blue, green and red bands resampled from 10 m to 20 m.
The Sentinel-2 results also show higher contrast in the PCA-1 image than in the NDWI and MNDWI images between land and sea. However, shallow waters tend to be very bright when applying NDWI and MNDWI, also giving in this case high contrast with the coast.
By applying the K-means algorithm to the previously obtained synthetic bands, two clusters are generated, representative of the water and no-water (soil and vegetation) classes.
To show the difference between the results of K-means applied to different synthetic bands, we select two zones, as reported in
Figure 14: Zone A (Port of Naples) for the Landsat 9 OLI dataset concerning the Campania study area and Zone B (coastal area of San Teodoro) for the Sentinel-2 dataset (10 m) concerning the Sardinia study area.
Figure 15 shows the results that the application of K-means to synthetic images (i.e., PCA-1 and NDWI) derived from L9 generates Zone A (Port of Naples).
Figure 16 shows the results that the application of K-means to synthetic images (i.e., PCA-1 and NDWI) derived from –m generates Zone B (coastal area of San Teodoro).
The coastlines are extracted from the classified images by means of automatic polygonization of the raster files. For testing the positional accuracy of the results, each line is compared with the coastline vectorized manually and analyzed by DRI; the results are shown in
Table 4,
Table 5 and
Table 6.
The first column of the tables indicates the image from which the coastline is automatically extracted, according to the previously presented workflow. Starting from the manually vectorized coastline, the DRI values are calculated, and the statistical values are extracted and reported in the respective columns.
In the first analysis it can be noted that the use of the PCA transformation for this application confirms an excellent result.
As previously mentioned, we consider the pixel size as a reference to define the quality of the results, remembering that the pixel size for each dataset varies, in particular, the Landsat 9 OLI images are 30 m × 30 m, while the Sentinel-2 images have two formats, i.e., 20 m × 20 m and 10 m × 10 m.
Specifically for the Landsat images of the Campania study area, the RMSE value of the PCA method is 12.1 m which is lower compared to the NDWI (14.369 m). The greatest difference can be seen in the maximum values: NDWI reaches 50.574 m, almost double the pixels, while the maximum of the PCA method (34.170 m) is in the order of the pixel size. In addition, using the MNDWI the result in terms of RMSE (16.101 m) is higher than the other water index (the maximum value is 58.986 m), remaining, however, less effective in the PCA.
For the Sardinia area, the scenario respects the trend of the previous one, confirming the best performance of the PCA, with an RMSE value of 8.983 m, while the two water indices, NDWI and MNDWI, provide worse results with RMSE values of 12.490 m and 11.850 m, respectively.
Finally, again for the same type of sensor but with a different scenario located in the Sicilian area, the tests confirm the excellent performance of the PCA (RMSE = 8.864 m) which prevails over the other two methods, NDWI (RMSE = 12.525 m) and MNDWI (RMSE = 11.482 m).
By changing the type of dataset, the results confirm the validity of the proposed method; in fact, for S2–20 m, in the Campania region, the PCA has an RMSE value of 5.394 m while the NDWI has 7.650 m and MNDWI 9.1 m. The maximum values once again highlight the effectiveness of the PCA, as it has a lower value than the pixel size (19.569 m) unlike the two methods that exploit the water index which have higher values (maximum of NDWI is 25.842 m and that of MNDWI is 26.044 m).
In the Sardinia area, the RMSE value for the PCA is equal to 5.064 m, still lower than the value given by the NDWI, which is 6.464 m, and the value of the MNDWI is 6.192 m. The maximum value, even in this situation, presents an evident difference in the three methods considered; in fact, for the NDWI it is 34.952 m, much larger than the pixel size, for the MNDWI it is 20.065 m, almost equal to the pixel size, and for the PCA it is 19.883 m, below the resolution of the cell.
The extracted Sicilian coastline once again establishes the best performance of the PCA (RMSE of 5.4 m) which is better than the two water indices, NDWI (RMSE equal to 8.847 m) and MNDWI (RMSE equal to 8.462 m).
Finally, for the last dataset taken into consideration, –m, in the Campania area, the residuals significantly decrease for the PCA (RMSE equal to 2.924 m) but not in the same proportions for the NDWI and the MNDWI (RMSE equal to 4.927 m and 5.028 m, respectively); the efficiency of the PCA (14 m) is also highlighted by the maximum value of around 20 m for the two other methods.
In the Sardinian area the RMSE value for the NDWI method is 4.280 m and for MNDWI it is 3.982 m, both higher than the PCA value (3.736 m). In this situation, however, we note that the maximum value of the PCA (18.931 m) is slightly worse than that provided by the NDWI (17.544 m); this happens due to the incorrect attribution of one pixel which determines the movement of the coastline (otherwise the value would be 10 m lower), considering that the highest value after the maximum is approximately 4 m lower.
For the last study area, with –m, the situation is further confirmed. In fact, the two methods that use water indices have high RMSE values (that of NDWI is equal to 4.837 m and that of MNDWI is equal to 4.917 m) if compared to the PCA method (3.032 m). Finally, the maximum values remain high for the NDWI and MNDWI (20.816 m and 20.208 m, respectively), while for the PCA it is 16 m.
In summary, PCA always has excellent RMSE results compared to NDWI and MNDWI, the only difference found is in the maximum DRI value for –m in the study area of Sardinia, which instead has a slightly higher value.
It should also be noted that the MNDWI for all datasets presents better results than the NDWI in two out of three geographical areas, specifically Sardinia and Sicily. As previously remarked, the use of the blue band instead of the green band in MNDWI frees the identification of the water from the interference of submerged vegetation, including algae, which, if present, could make water pixels less easy to recognize. Investigations on the specificity of the considered areas and the analysis of the reflectance in the green band seem to confirm the presence of chlorophyll synthesis in the waters of Sicily and Sardinia, but this phenomenon is not of equal intensity in Campania.
To show the difference between the automatically vectorized coastlines obtained through the different adopted approaches, we select two zones, as reported in
Figure 17: Zone C (Port of Torre del Greco) for the Landsat 9 OLI dataset and Zone D (coastal area of San Giovanni) for both Sentinel-2 datasets.
Compared to the results obtained by NDWI, the coastline achieved by PCA presents a greater similarity to the reference coastline in all images; particularly, the higher the resolution, the better the overlap between the reference coastline and the extracted one. This is easily explainable because as the size of the pixel decreases, its content, i.e., the area it encloses, becomes more homogeneous. In other words, near the coastline a 10 m pixel is more likely to contain only water or no water (land and/or vegetation) than a 20 m or 30 m pixel; therefore, the adopted classification method, whether based on PCA, NDWI or MNDWI, is better and correctly attributes pixels that are not “mixed” to a specific class.
Zone C of the Landsat 9 OLI image reported in
Figure 18 largely concerns the Port of Torre Del Greco (Naples). The pier is built with dark-colored stones and, moreover, in the image there are boats on the dock, attributable to lighter pixels in the RGB image. The NDWI completely fails to classify the pier as no-water, identifying only the boats as such; on the contrary, the PCA correctly classifies both the pier and the boats as no-water. Finally, the coastline extracted by NDWI generally appears further back in all situations in which there are dark-colored rocks outlining the shore.
Zone D of the Sentinel-2 images reported in
Figure 19 (S2–20 m) and
Figure 20 (S2–10 m) includes a sandy beach, specifically the surroundings of a dry river mouth. Referring to
Figure 19, the NDWI classifies the river mouth area entirely as water, while the PCA correctly classifies it as no-water. Furthermore, in general, along the beach the NDWI identifies the sand pixels closest to the shore as water rather than no-water (as PCA correctly does); this result could be due to the fact that the elements closest to the coast are wet and therefore they have a spectral signature closer to that of water than dry sand. Referring to
Figure 20 the results obtained using NDWI seem more in line with those obtained using PCA, although a slight difference is still noted at the river mouth. As already noted, when analyzing the DRI results, the effectiveness of PCA with the –m dataset is reduced due to the fact that the number of available bands is reduced and the ability of the first component to enhance the differences between different components (e.g., sand and water) is affected.
In summary, although the increasing of resolution of the image reduces the differences between PCA, NDWI and MNDWI from visual investigation the results obtained using PCA are always more satisfactory than those obtained using NDWI and MNDWI.
Table 7,
Table 8 and
Table 9 show the thematic accuracy values of PCA, NDWI and MNDWI for Landsat 9 OLI, Sentinel-2 at 20 m and Sentinel-2 at 10 m.
The closer the accuracy index values are to 100%, the more satisfactory the results are: in our case every index shows values above 87%. The results are very promising for the proposed method, since PCA shows higher OA values for each dataset compared with NDWI and MNDWI.
The best results are found when PCA is applied to Sentinel-2 images with a 20 m resolution: for all study areas the thematic accuracy is very high (OA = 98.99% for Campania, 99.38% for Sardinia, 99.14% for Sicily), being in every case better than NDWI and MNDWI.
If these values are compared with those of the synthetic bands derived from the Sentinel-2 dataset at 10 m, a slight drop in the performance of the PCA method can be noted for all the applied indices (OA = 98.55% for Campania, 98.99% for Sardinia, 99.13% for Sicily). The opposite happens for the NDWI and MNDWI, for which the indicators mostly show better results compared to the previous case. However, overall, PCA-1 remains better performing than the NDWI and MNDWI.
By analyzing the results relating to the Landsat 9 OLI images, it is still found that the best classification is obtained with PCA-1 for all three study areas considered. In particular, the OA values relating to PCA-1 (OA = 94.91% for Campania, 97.19% for Sardinia, 99.15% for Sicily) remain up to 1-2 percentage points above the corresponding values relating to NDWI (OA = 93.87% for Campania, 95.42% for Sardinia, 97.14% for Sicily) and MNDWI (OA = 91.43% for Campania, 96.88% for Sardinia, 98.41% for Sicily).
Considering the results of all datasets, it is therefore possible to identify a trend in the thematic accuracy with respect to the resolution: for the NDWI and MNDWI we can state that as the resolution increases, the thematic accuracy also improves, while this is not true for PCA-1 since the best results are found for S2–20 m. This result could be explained by the fact that PCA works on all available bands (four bands in the case of –m, nine bands in the case of S2–20 m) unlike NDWI which only works on two bands (green and NIR).
As already evident from the results obtained using the DRI and visual inspection, it can be seen that as the resolution increases the differences between PCA and NDWI and MNDWI become smaller.
Table 10 shows the results of accuracy evaluation carried out on the coastlines extracted from infrared bands treated with K-means.
Comparing
Table 10 with
Table 6,
Table 7 and
Table 8, the infrared bands are particularly effective for the automatic extraction of the coastline. However, the proposed method based on the application of PCA outperforms the infrared-based results.
5. Conclusions
The experiments described in this article concern three different datasets of satellite images: Landsat 9 OLI multispectral images (pixel size: 30 m), the Sentinel-2 dataset including blue, green, red and Near Infrared (NIR) bands (pixel size: 10 m) and the Sentinel-2 dataset including red edge, narrow NIR and Short-Wave Infrared (SWIR) bands (pixel size: 20 m). To have different areas to analyze, three geographical regions are identified: Campania (Gulf of Naples), the eastern part of Sardinia and the western part of Sicily. The tests highlight the effectiveness of the proposed approach for automatic coastline extraction based on the use of PCA and an unsupervised classification method, such as K-means.
The application of PCA on all the images available for each dataset generates a new dataset of highly decorrelated images of which the first (PCA-1), the most decorrelated of all, is used for further processing. This image shows a high contrast between water and no-water, which also visually appears higher than the synthetic NDWI and MNDWI images, generally adopted for the identification of water bodies. Therefore, unsupervised classification by application of K-means to PCA-1 seems natural and the experiments confirmed this expectation.
To establish the accuracy of the results the DRI is used, which provides the deviation between the reference coastline and the automatically extracted one; in addition, the thematic accuracy indices (PA, UA and OA) extracted from the confusion matrix related to the classification layer (water and no-water) are also used for the scope. We also employ the NDWI and MNDWI for comparison.
The outputs confirmed the validity of the proposed method. Indeed, the results are very encouraging: in all cases the PCA-1-based approach is more effective than NDWI- and MNDWI-based approaches, both in terms of positional accuracy (DRI) and thematic accuracy (confusion matrix). It is interesting to note that while the thematic accuracy of NDWI and MNDWI improves as the resolution of each dataset used increases, this does not happen for PCA, implying a probable dependence not only on the geometric resolution but also on the spectral resolution, or rather on the quantity and amplitude of the used bands.
This behavior can also be noted from the DRI analysis: the differences in the results obtained by PCA and NDWI (or MNDWI) decrease as the resolution increases, although PCA remains the best method in any case. This effect could once again be explained by a reduction in the available bands from S2–20 m (nine bands) to –m (four bands).
In light of what has been analyzed, with regard to the future developments of this work, further studies will focus on the possibility of extending the proposed approach to other types of satellite images, in particular those which have a higher resolution than Sentinel-2, in order to evaluate the effectiveness of the suggested method. Furthermore, the use of PCA including not only the first component but also the second and third components will be considered; specifically, supervised and unsupervised classification methods will be tested for the identification of features other than the coastline.