Performance of segmentation (watershed and meanshift) and image transformation (MNF-laplacian filter) methods for extracting complex coastlines from Pleiades images: the case of the Kerkena archipelago, Tunisia
The shoreline is an area characterised by ‘permanent and particularly rapid mobility on a geological time scale, but also on a human time scale’ (; ). This environment, whose morphology is shaped by fluctuations in the coastline, is becoming increasingly sought after. For more than a century, human occupation has been intensifying, with increasing coastal development (; ). Yet these human settlements are becoming increasingly vulnerable to phenomena related to climate change (increased frequency of storms, sea-level rise). In this context, managing the risk of coastal erosion is becoming a major challenge, and requires considering the evolution of the shoreline dynamics.
In recent years, monitoring changes in the coastline has been widely discussed (; ; ; ; ; ; ; ), mainly with a view to managing these vulnerable areas. In fact, geospatial data enables diachronic monitoring of coastal areas and provides information on territorial and environmental dynamics. The availability of such data also makes it possible to take stock of these dynamics and quantify measures of shoreline change. Shoreline detection techniques, which initially focused on visual interpretation, have increasingly turned towards automatic methods that can be reproduced elsewhere (; ; ; ). Monitoring coastline movement using geospatial data is therefore part of a process to produce reliable results. However, various processing methods can be used to obtain similar results.
The Kerkena archipelago lies to the south-east of the Tunisian coastline, on the north part of the Gulf of Gabès, 20 km off the coast of Sfax. Approximately 35 km long and 10 km wide, it comprises a group of twelve islets and two main islands: Gharbi (48 km2) and Chergui (99 km2). These two islands cover around 150 km2, a large part of which is occupied by sebkhas (marshes–lands that are periodically flooded and unsuitable for farming due to their salinity). This location in the Gulf of Gabès is conducive to complex hydrodynamic phenomena, with a convergence of currents of Atlantic origin, entering through the Chebba Strait, and those of Levantine origin, entering through the Sfax Strait (). The archipelago is subject to significant tidal variation, as is the rest of the Gulf of Gabès, to which it belongs. With a coastline 181 km long, the archipelago’s coastal zone is mainly characterised by the presence of cliffs or micro-cliffs cut into various substrates, large salt marshes favoured by an important tide and limited sandy shorelines. The western side, where the archaeological site of Borj El H’ssar and the tourist facilities in the Sidi Frej area are located, is more exposed to the prevailing winds and sea currents, while the eastern sector of the archipelago is more protected from these hydrodynamic agents (Figure 1). The exposure of this sector to the prevailing winds and the lithological complexity, with alternating hard rock and loose sediment, favour differential erosion, which is justified by the presence of a rugged profile, unlike the eastern sector, which has a straight shape. The study area covers the sector from Karaba beach to the tourist sector of Sidi Frej, including the archaeological site of Borj El H’ssar (Figure 1).
FIGURE 1
3 Methods and datasets
3.1 Satellite data characteristics and pre-processing protocols
After orthorectification and resampling, the coastline was automatically extracted and compared with a manual extraction.
3.2 Coastline extraction methodology
Two automatic coastline extraction methods have been applied (Figure 3). The first is based on image segmentation using the MeanShift and WaterShed algorithms. The second is based on image transformation using the MNF algorithm, followed by discrimination of new images using a 7 × 7 convolution Laplacian filter. These methods were compared with the one based on digitizing the coastline using photointerpretation.
En is the margin of error for digitizing the coastline, Egeoref is the margin of error for georeferencing, which is obtained by re-aligning the image with the reference data (Google satellite imagery), and Edig is the margin of error linked to the uncertainty in digitizing the coastline. The latter depends on visibility of the coastline, the experience, the knowledge of the study area and must be included at the discretion of the operator responsible for Digitization. For the 2022 image, the accuracy of the Digitization around the Borj El H’ssar site has been improved by the use of DGPS points taken in the field during a Tunisian-French mission in 2022. The margin of error for Digitization is therefore 0.27 m for the 2012 image and 0.23 m for 2022.
3.2.2 Automatic coastline extraction using image segmentation
The coastline was extracted from the image segmentation using the WaterShed algorithm and the MeanShift algorithm. WaterShed uses the spectral information of the image translated into shades of grey to group pixels with the same spectral characteristics. It considers a grayscale image as a topographical relief where each pixel has an altitude, from which we simulate flooding and calculate the gradient of the image. The areas of high intensity form the hilltops, while the low intensities form the valleys (
Hugueny, 2014
). Watershed lines are then created to prevent merging when two valleys of different intensities meet (
Beucher, 1992
). Given that the coastline limits chosen for this study are the limit of the wetting zone and the limit of the cliff and/or developments, which in this case correspond to the point of water undercutting at high tide, this segmentation makes it possible to detect the contours of the geographical objects that characterise the coastal zone studied. The MeanShift algorithm, on the other hand, is based on an iterative gradient ascent procedure for unsupervised clustering and/or mode determination (
Zegaoua, 2012
). It relies not only on information about individual pixel values, but also on contours: texture, shape and topology (
Bengoufa et al., 2021
). The advantage of this algorithm lies in the fact that it improves images by reducing noise and improving the sharpness of contours. MeanShift transforms the image by considering a colour space in which each cluster corresponds to segmented regions of the original image (
Beck et al., 2018
).
• In order to optimize our results when applying segmentation, we carried out a spatial initialization of the image. This removes low contrast minima and highlights pixels with a high probability of belonging to the same class. The result is a classified image with pixel contrasts in the form of classes based on the spectral characteristics of the objects. These classes are considered as relief by the WaterShed algorithm for the definition of valleys (classes or objects) and as clusters by the MeanShift algorithm for the definition of regions. Smoothing is then used to avoid over-segmentation of the image as far as possible. The Meanshift Smoothing algorithm was used to perform this smoothing. After testing different gradients coefficients (0; 0.5; 0.75; 1), we chose the 0.5 coefficient for this study (Figure 4. 1). This produces a more uniform image and good segmentation.
• The smoothing results were then segmented, firstly using the WaterShed algorithm and secondly using the MeanShift algorithm (Figure 4. 2).
• We then vectorized the segmented output (Figure 4 3 and A), which was then converted into simplified lines.
• Finally, we extracted the line corresponding to the chosen reference (Figure 4. B, yellow line).
FIGURE 4
Coastline extraction process using image smoothing and segmentation (A). vectorized the segmented output (B). Extracted line corresponding to the chosen reference.
3.2.3 Automatic coastline recognition by image transformation
The methodology for automated coastline identification and extraction, as employed in this study, builds upon the approach developed by
Gadal et al. (2023a)
. This technique relies on image transformation processes, specifically the application of the Minimum Noise Fraction (MNF) algorithm, followed by the detection of landscape structures through the use of a Laplacian filter applied to the MNF-transformed images.
• The MNF transformation serves to enhance image quality by isolating noise, thereby optimizing the data for subsequent analysis while reducing computational demands (Gadal et al., 2023a). Based on the spectral information of the bands and the variation in surface reflectivity, the images are decomposed and then reconstructed in the form of components with groups of pixels (Figure 5B).
• After analysing the MNF results, we improved the discrimination between geographical objects on the chosen MNF component using a 7 × 7 convolution Laplacian filter. The Laplacian filter highlights landscape structures based on areas of high change intensity (Gadal et al., 2023a), with good recognition of linear objects. For this case study, the newly produced MNF-2 (MNF on second spectral bande of the image) image was chosen for further processing, as it clearly identifies the different references for the position of the coastline. The application of the MNF and then the 7 × 7 Laplacian filter improves local discrimination between the geographical objects that characterise the study area (water, cliff edges, dry sand, wet sand, urban developments, etc.) by spatially contextualising them on surfaces measuring 3.5 m by 3.5 m (Figure 5).
FIGURE 5
Different stages in the automatic extraction of the coastline (A) FMB transformation component which highlights the boundary between the different objects, (B) Laplacian filter with 7 × 7 pixel applied to the FMB component, (C) Selection from the raster calculator on the result of the Laplacian filter, (D) Vector conversion of the output after selection then simplified line conversion to obtain the coastline.
3.2.4 Extraction of coastlines using GIS
The results of the previous processing operations (image transformation and segmentation) are imported into the geographic information system, QGIS. For the results of the image transformation, we performed a thresholding in order to extract the coastline lines identified by the 7 × 7 Laplacian filter which selects values above two in order to ensure good harmony and continuity of the lines. The output is then converted into vector polygons and simplified lines, applying a simplification tolerance value equal to the image sampling (0.5 m). This eliminates the effects of pixelation (line with steps) and produces a line that we define as the reference coastline for each type of coastline in the study area (red line in Figure 5D).
Once the coastlines had been obtained, we imported them into a second GIS software package, ArcGIS, in order to calculate the kinematics of the coastline using the Digital Shoreline Analysis System (DSAS) module. To ensure that the results obtained can be properly interpreted, the overall margin of error (Table 1) needs to be calculated. This is determined using the following formulae (Gadal et al., 2023b; Thior et al., 2021):and
TABLE 1
Methods
Ea (extraction precision) in m
E: global error in m/year
Image 2012
Image 2022
WaterShed
0.39
0.38
±0.05
MeanShift
0.38
0.40
±0.05
MNF-Filtre
0.47
0.17
±0.04
Error margins.
Ea: margin of extraction error (in metres) for each year (2012 and 2022). Egeoref: margin of error linked to the georeferencing of images, which is obtained after orthorectification of each image and then georeferencing in relation to the reference data in question (Google satellite). As orthorectification was carried out on the OTB, georeferencing was carried out on ArcGIS using the adjustment transformation algorithm. This algorithm optimizes local accuracy and is based on the combination of a polynomial transformation and irregular triangulated network (TIN) interpolation techniques.2 The adjustment transformation performs a polynomial transformation using two sets of control points and adjusts the control points locally to better match the target control points, using a TIN interpolation technique. Nine control points were taken into account for this study over a portion of the image approximately 4 km long and less than 2 km wide. ArcGIS provides a direct georeferencing error margin of 0.15 m for the 2012 image and 0.13 m for the 2022 image. Eavdist: margin of error linked to the accuracy of the extraction obtained using the average distances between the digitized coastlines and the automatically extracted coastlines. Eα: the overall margin of error in m/year.
3.3 Comparative statistics of coastline extraction methods using DSAS
In order to assess the performance of the different methods applied, we based ourselves on the statistical analysis of kinematics using the DSAS module in ArcGIS. The Digital Shoreline Analysis System (DSAS) is a statistical tool used to quantitatively measure geographical changes between several linear objects. Three indices were taken into account to assess the performance of the extraction methods.
1) The Net Shoreline Movement (NSM), which gives the net evolution statistics between two lines (in this case, it is the manually digitized coastline reference and the automatically extracted coastlines), 2) The Shoreline Change Envelope (SCE), which calculates the average distance between different coastlines. 3) The End Point Rate (EPR) calculates the net change and divides the values obtained by the difference between the most recent year of measurement (2022) and the oldest year (2012) to obtain the average annual rate of change.
Statistics showing the distance between the Digitized coastline and other extraction methods.
The variations between the features extracted by image transformation (MNF-Laplacian filter) and those Digitized can be explained by the choice of components for the minimum noise fraction used for further processing. The quality of the component depends on the spectral information in the base image and the quality of the pre-processing carried out. In addition, the orientation of the filter can have an impact on the accuracy of the result (Gadal et al., 2023b). In the case of MeanShift image segmentation, improving the sharpness of cluster edges can influence the output result. This improvement favors over-segmentation and therefore the detection of notches caused by differential erosion in the cliff zone. Indeed, it is on this cliff sector characterised by the presence of notches that the greatest fluctuations in the position of the coastline are noted. The differences between the features extracted by segmentation (WaterShed and MeanShift) on the two images (2012 and 2022) can be explained by the complexity of the reflectivity of the objects for each year as well as the land cover and also by the characteristics of the space, in particular the change in land occupation and therefore the difference in spectral information, given that the objects do not reflect in the same way (Figure 6). In addition, the segmentation algorithms used interpret the information differently, which may justify the variation in the position of the shoreline. This difference in interpretation is confirmed by the maximum distance between the extracted features and the Digitized one.
FIGURE 6
Characterisation of objects according to the characteristics of the zone and the method used for segmentation (MeanShift in this case).
4.2 Assessment of coastal evolution
In this section, we analyse the evolution of the coastline between 2012 and 2022 according to the different extraction methods. The analysis is based on the EPR and NSM indices. Table 3 shows the diachronic statistics for shoreline change using the different methods. The extraction methods using the WaterShed and MNF-Laplacian filter yield average change rates that closely align with those obtained through manual digitization, with values of -0.32 m/year for WaterShed, -0.29 m/year for the MNF-Laplacian filter, and -0.31 m/year for digitization. The coastlines extracted using the MeanShift algorithm show a more significant change, with an average of −0.33 m/year. Nevertheless, these results demonstrate that the three computational methods are very close in analysing changes in the coastline (difference of 0.03 m between the lowest and highest average).
TABLE 3
Extraction method
EPR (m/year)
NSM (m)
Average
Min
Max
Standard deviation
Average
Min
Max
Standard deviation
WaterShed
−0.32
−1.39
1.28
0.35
−3.35
−13.9
12.8
3.50
Mean-Shift
−0.33
−1.42
1.27
0.35
−3.30
−14.1
12.7
3.54
MNF-Filtre Laplacien
−0.29
−1.37
1.28
0.34
−3.15
−13.7
12.8
3.48
Manual Digitization
−0.31
−1.42
1.25
0.34
−3.10
−14.2
12.5
3.48
Statistics (EPR and NSM) for shoreline change between 2012 and 2022, using each extraction method.
Comparison of NSM statistics for the different extraction methods used.
As the study area features different types of coastline (cliff coast, sandy coast and developed coast), it is interesting to determine the performance of each method on the different types of coastline.
4.3 Performance of extraction methods in relation to coast types
Performance of the different extraction methods applied (WaterShed, MNF-Laplacien filter, MeanShift) in the relation to the types of coastlines that characterise the study area (developed coastline, sandy coastline and cliff boundary). The WaterShed algorithm detects the shoreline more easily.
If we consider the percentage (Table 4) of coastline extracted by each method, we can see that the method based on the combination of the MNF and the Laplacian filter performs better, having extracted 98.8% of the coastline studied, compared with 98.5% for the MeanShift and 97.4% for the Watershed. The low percentage of coastline extracted by the WaterShed can be explained by the algorithm’s segmentation method, which results in the discontinuity of the shoreline in certain sectors where the areas of the pixel classes are larger. In addition, the shadows generated by the geographical objects that define the study area (trees, cliffs) interfere with the detection of the shoreline and hence the discontinuity of the coastline (Figure 9).
TABLE 4
EPR (m/year)
Qualitative assessment
Extraction method
Average
Min
Max
Standard deviation
Percentage of coastline extracted
Development limit
Wetting limit
Cliff limit
WaterShed
−0.32
−1.39
1.28
0.35
97.4
Good detection
Good detection
Complex
MeanShift
−0.33
−1.42
1.27
0.35
98.5
Complex but precise
Complex but precise
More precise
MNF-Laplacian Filter
−0.29
−1.37
1.28
0.34
98.8
Complex but precise
Complex but precise
Complex but precise
Statistics from the EPR index showing the performance of the different extraction methods.
FIGURE 9
Image segmentation using the WaterShed and MeanShift algorithms.
4.4 Evolution of the shoreline between 2012 and 2022: an overall retreat of the shoreline over 10Â years
After analysing the performance of the different shoreline extraction methods used (WaterShed, MeanShift and MNF-Laplacian filter) on each type of coastline, we extracted the shoreline for each sector according to the best performing method. For urbanised and sandy coasts, the features extracted by WaterShed were used. For cliff coasts, on the other hand, the features extracted by MeanShift were taken into account. The coastlines obtained were used to quantify recent changes in the shoreline over a 10-year period from 2012 to 2022, from Karaba beach to the Sidi Frej tourist area, including the Borj El H’ssar archaeological site. The results of kinematics based on the EPR index were used for this analysis of the diachronic evolution of the coastline. The statistics show an overall retreat of the shoreline with an average of −0.33 m/year (margin of error ±0.05 m/year). On a geomorphological level, this recession is caused by the continuous action of hydrodynamic agents (waves, currents) eroding the shoreline. There is also the difference in rock types, which encourages differential erosion and, as a result, the collapse of boulders precisely in the cliff areas. In addition the absence of sedimentary input from inland towards the shore, combined with the rise in sea level (IPCC, 2022) and the subsidence that has occurred in the area since ancient times (Oueslati, 1995b), means that the shoreline is continually retreating. The sedimentary input in this sector comes mainly from the erosion of the cliffs, whose blocks are left scattered along the foreshore. These blocks gradually disintegrate on contact with the water and the sediment is transported towards the south of archipelago following the prevailing longshore drift. As a result, the shoreline is retreating across the entire study area. This erosion is greatest at Grand Hôtel beach and Borj El H’ssar, with rates of −0.83 m/year and −0.34 m/year respectively. The erosion of the Grand Hôtel beach is attributable to the presence of loose sand, easily erodible. It has been reflected in the nibbling away of the tombolo in front of the hotel, which favoured the accumulation of sediment transported by the longshore drift. This tombolo also enabled the Grand Hôtel beach to benefit from the contributions of the sediment coming from the erosion of the Borj El H’ssar cliffs (Oueslati, 2004; Etienne and Etienne, 2014). However, this arrangement no longer entirely plays its role, as shown by the statistics for trends between 2012 and 2022, which are contrary to those of Etienne, (2014) showing progradation of the shoreline in this same sector between 1960 and 2010. The ineffectiveness of this tombolo can be explained by the fragility of the sediments that characterise the beach, but also by the intensification of hydrodynamic agents. On the other hand, to the south of the Grand Hôtel, there has been significant progradation. This accretion, with an average of +0.66 m/year, is due to the installation of a structure designed to protect the tourist facilities in this sector. In the Borj El H’ssar area, coastal erosion is evident, with an average of −0.34 m/year. This sector, which supplies sediment (Oueslati, 2004; Etienne, 2014) in the form of debris torn from the cliffs, has long been exposed to coastal erosion (Oueslati,1995a, Oueslati,1995b; Oueslati, 2004). The archaeological remains that have come to light over the years, most of which are underwater at high tide or form the point where the waves lap (in the foreground of the cliffs), confirm this retreat of the shoreline. Faced with this situation of continuous retreat of the shoreline, local people are implementing adaptation strategies by building protective walls in front of their properties. One of these protective walls, built before 2012 along a private individual’s premises and constituting the point of wave erosion, is the reason for the stability of the coastline between the Borj El H’ssar site and the cliff zone (Figure 10). In fact, the presence of these facilities ensures a stability that can be characterized as relative and ‘temporary’ and may raise the debate about the effectiveness of these infrastructures and their participation in the intensification of erosive action (Oueslati, 2010). Observation of the current morphology of the coast reveals its convex-concave appearance, proof of the difference in intensity of the action of the dynamic agents, which are more apparent in the southern part of the protective wall.
FIGURE 10
Summary of the evolution of the coastline between 2012 and 2022 based on the End Point Rate, showing areas of erosion (red: negative values), areas of progradation (green: positive values) and areas of stability (yellow).
In terms of the percentage of coastline extracted, the method based on the MNF-Laplacian filter combination performs best, with 98.8% of coastline extracted. It is followed by the MeanShift method with 98.5% of coastline extracted. The WaterShed method had the lowest percentage, with 97.4% of ribs extracted. As for the performance of the extraction methods by type of coastline, the results show that the WaterShed method performs best. It detects the shoreline perfectly on developed coasts and on sandy coasts. On cliff coasts, on the other hand, the MeanShift and MNF-Laplacian filter algorithms perform better. However, detecting the coastline on these cliff areas is complex due to the shadow cast by the cliffs when the satellite images are taken and the over-segmentation of the images.
The datasets presented in this article are not readily available because Images processed are not shareable. Requests to access the datasets should be directed to luc.diatta@cerege.fr.
Author contributions
LD: Data curation, Data acquisition, Formal Analysis, Investigation, Methodology, Software, Writing – original draft. KS: Data acquisition, investigation, Writing original draft, Writing – review and editing. ZA: Writing original draft, investigation. SB: Writing original draft, investigation. AD: Writing original draft, investigation. AO: Writing original draft, Writing - review and editing, investigation. LL: Data acquisition, Methodology, Software, Writing original draft.
We are grateful to the 2022 Tunisian-French mission working on the salt heritage in Kerkena Project (direction AD, INP and KS, CNRS, with funding from the Fyssen Foundation), for allowing us to use their geo-referenced survey points. We also wish to thank our reviewers for their helpful suggestions.
Conflict of interest
The authors declare that the research was conducted in the absence of any commercial or financial relationships that could be construed as a potential conflict of interest.
Generative AI statement
The author(s) declare that no Generative AI was used in the creation of this manuscript.
Publisher’s note
All claims expressed in this article are solely those of the authors and do not necessarily represent those of their affiliated organizations, or those of the publisher, the editors and the reviewers. Any product that may be evaluated in this article, or claim that may be made by its manufacturer, is not guaranteed or endorsed by the publisher.
BoussettaA.NiculescuS.BengoufaS.ZagrarniM. F. (2023). Deep and machine learning methods for the (semi-)automatic extraction of sandy shoreline and erosion risk assessment basing on remote sensing data (case of Jerba island, Tunisia). Remote Sens. Appl. Soc. Environ.32, 101084. 10.1016/j.rsase.2023.101084
GadalS.GloaguenT. (2023a). The evolution of the south-eastern sea coastline between 1988 and 2018 by remote sensing, in GISTAM 2023 9th international conference on geographical information systems theory, applications and management, ATHENA, 37–47. Available online at: https://hal.science/hal-04080526v2.
GadalS.GloaguenT. (2023b). Performance of landsat 8 OLI and sentinel 2 MSI images based on MNF versus PCA algorithms and convolution operators for automatic Lithuanian coastline extraction. SN Comput. Sci.5. 10.1007/s42979-024-02623-9
LouatiM.SaïdiH.ZargouniF. (2014). Shoreline change assessment using remote sensing and GIS techniques: a case study of the Medjerda delta coast, Tunisia. Arabian J. Geosciences8, 4239–4255. 10.1007/s12517-014-1472-1
OueslatiA. (1995a). The evolution of low Tunisian coasts in historical times: from progradation to erosion and salinization. Quat. Int.29-30, 41–47. 10.1016/1040-6182(95)00006-5
Diatta LS, Schörle K, Akacha Z, Bettaieb S, Drine A, Oueslati A and Lapierre L (2025) Performance of segmentation (watershed and meanshift) and image transformation (MNF-laplacian filter) methods for extracting complex coastlines from Pleiades images: the case of the Kerkena archipelago, Tunisia. Front. Remote Sens. 6:1542241. doi: 10.3389/frsen.2025.1542241
This is an open-access article distributed under the terms of the Creative Commons Attribution License (CC BY). The use, distribution or reproduction in other forums is permitted, provided the original author(s) and the copyright owner(s) are credited and that the original publication in this journal is cited, in accordance with accepted academic practice. No use, distribution or reproduction is permitted which does not comply with these terms.
All claims expressed in this article are solely those of the authors and do not necessarily represent those of their affiliated organizations, or those of the publisher, the editors and the reviewers. Any product that may be evaluated in this article or claim that may be made by its manufacturer is not guaranteed or endorsed by the publisher.