1. Introduction
Mangrove forests are vital to Earth’s ecological balance, contributing significantly to climate regulation, biodiversity conservation, and the provision of resources to human populations [
1]. These ecosystems deliver a wide range of essential services, including food production, climate regulation, erosion control, sediment retention, and protection against wind and storms. Mangroves also play a crucial role in shoreline stabilization, dune anchoring, carbon sequestration and storage, pollination, biodiversity support, biomass exportation, and cultural benefits such as recreation, ecotourism, and landscape preservation [
2,
3]. Recent findings suggest that mangroves contribute approximately USD 42 billion annually to global fisheries, store an impressive 25.5 million tons of carbon each year, and provide flood protection to over 15 million people [
4,
5].
Drones, or uncrewed aerial vehicles (UAVs), are used for data gathering in many domains, particularly for mapping coastal ecosystems like mangroves, forests, and dune plants [
6,
7]. With sensors like multispectral cameras and LIDAR, these devices capture clear images, providing insights into land coverage and plant formations. In mangrove research, UAVs offer more adaptability than traditional satellite remote sensing due to their altitude and viewing flexibility [
8]. Such attributes are key for identifying conservation areas, monitoring ecological changes, and assessing human impacts [
9].
Recent years have seen a surge in studies validating the use of UAVs equipped with optical sensors for mapping mangrove coverage. Examples include the works of [
10,
11,
12,
13,
14,
15,
16,
17,
18], among others. These studies collectively affirm the advantages of UAVs in this context, especially when combining optical sensors with digital surface (canopy) models. This integrated approach has been shown to yield significantly more accurate results in mapping mangrove areas compared to traditional satellite imaging methods. However, while previous studies have successfully demonstrated the effectiveness of UAV-based classification, a comprehensive review of sample size and resolution trade-offs remains limited. Studies have used image resolutions ranging from 1 cm to 10 cm per pixel, with finer resolutions generally improving classification accuracy but requiring extensive computational resources. Training sample sizes also vary significantly, with some studies utilizing fewer than 100 labeled trees per species, whereas others require larger datasets exceeding several hundred samples for robust classification models.
Additionally, the use of UAV imagery processing has become increasingly important in accurately determining mangrove forest biophysical parameters like aboveground biomass (AGB), volume, leaf area index (LAI), and blue carbon (BC) stocks, offering a more efficient and precise method for ecological assessment [
3,
19]. Traditionally, these parameters were measured through direct field surveys, which are labor-intensive, time-consuming, and often prone to errors due to the complex and inaccessible nature of mangrove environments. Mangroves have dense canopies, irregular tree structures, and are often located in tidal areas, making it difficult to obtain precise ground-based measurements of canopy height, tree density, and biomass distribution. These challenges impact prediction accuracy because small errors in field data can lead to significant miscalculations when scaled up across large forest areas [
20].
With UAV-based methods, these limitations are reduced, but challenges remain. UAVs capture high-resolution imagery, but the accuracy of predictions depends on the quality of the data and the ability to process complex canopy structures accurately. Variations in tree height, uneven canopy cover, and species diversity make it difficult to develop generalized models. To address this, allometric equations are employed to estimate biomass from UAV-measurable parameters like canopy height and area [
21]. However, these equations are species- and site-specific, meaning that differences in environmental conditions, tree species, and forest density can reduce the generalizability of the models. Supervised regression and machine learning techniques are therefore used to improve the accuracy of predictions by refining these models based on patterns in UAV data, and they are validated using field data from plot measurements or individual trees to ensure robustness. Despite these advancements, the inherent variability in mangrove ecosystems still poses challenges to achieving high prediction accuracy without extensive calibration and validation efforts. Contributions in this field include studies by [
22,
23,
24,
25], which exemplify the effectiveness of these techniques.
Achieving this requires the application of geographic object-based image analysis (GEOBIA) that operates through two intertwined stages: 1—individual tree segmentation, where meaningful “geo-objects” are defined by grouping neighboring pixels with analogous spectral and spatial attributes as crown polygons, and 2—classification, where each segmented object is allocated to predetermined classes (species) using machine learning algorithms, drawing upon their spectral, textural, spatial, and topological attributes [
26].
Although some studies have successfully applied UAV-based approaches to mangrove assessment (see, for example, [
27]), several methodological challenges remain. The objective of this research is to address these challenges by refining the tools and techniques used in UAV imagery analysis, with the expected outcomes of improving accuracy and efficiency in mangrove forest monitoring. Accurate species identification in mangrove ecosystems is crucial for understanding species distribution, improving zonation studies, and supporting ecological research, as different mangrove species exhibit distinct adaptations to environmental gradients and contribute uniquely to ecosystem functioning. Specifically, this study aims to (1) identify which tree segmentation algorithms most effectively represent “tree objects” in complex mangrove ecosystems, (2) determine the optimal balance between image scales and resolutions in UAV surveys—particularly how altitude affects species discrimination and overall resolution, (3) evaluate the number of training samples required for reliable classification models, and (4) analyze how distinct spectral and textural patterns can enable the accurate identification of individual species across different environmental conditions, such as varying sediment and climatological settings. By addressing these gaps, the research seeks to enhance the precision of UAV-based mangrove mapping, contribute to more effective conservation and management strategies, and advance ecological studies related to mangrove forest dynamics.
By applying this approach across two diverse regions—São Paulo and Pernambuco—this study captures the variability in mangrove ecosystems influenced by differing environmental conditions, such as sediment composition and climate. The analysis focuses on improving species-level classification and tree segmentation accuracy, offering fine-scale insights into the spatial distribution and structure of mangrove forests. Ultimately, this framework is expected to provide a scalable and adaptable tool for ecological assessments, supporting local and regional conservation efforts and informing policymakers about sustainable management practices.
2. Materials and Methods
2.1. Study Areas
The work was carried out in two target areas in Brazil: in the state of Pernambuco, on the northeast coast (Suape Estuarine Bay), and in the state of São Paulo, on the southeast coast (Cardoso Island—Cananeia/Iguape Estuarine Lagoon System (CIELS)). The target areas were chosen based on a combination of factors, including their similarities, such as (a) being target areas with similar dimensions; (b) being associated with protected inland estuarine environments; (c) being areas where specific problems have already been recognized by previous studies, with access to abundant pre-established data and information related to ongoing or previous research projects; and (d) having relatively easy access and infrastructure for surveys and fieldwork; and differences, such as (a) being located in different coastal settings (tropical–mesotidal/subtropical–microtidal) and (b) having different levels of environmental conservation and management policies.
The Cardoso Island mangrove area is in the Cananéia–Iguape Estuarine Lagoonal System (CIELS) (
Figure 1), on the border between the state of São Paulo and the state of Paraná, in southeastern Brazil. The CIELS is formed by the confluence of three estuarine–lagoon channels (Mar Pequeno, Cananéia, and Cubatão), forming a bay-shaped body of water locally known as Trapandé Bay. The region is very important for containing the best-preserved coastal forest in the southeast of Brazil. This plain is surrounded by crystalline rocks of the granite complexes known as Serra do Mar [
28,
29,
30,
31]. With an approximate length of 33 km and a width of between 0.5 km and 13.0 km, within the CIELS, Cardoso Island State Park was created in 1962 and has an area of 22,500 ha, containing more than a third of the remaining forest in the state of São Paulo. As the largest continuous region of the Atlantic Forest biome in the state, much of the park’s biodiversity is made up of mangroves [
32]. The region has been listed as a World Heritage Site by the United Nations Educational, Scientific and Cultural Organization (UNESCO) since 1999.
The studied site is the Perequê River subtropical mangrove (25°04′S; 47°54′W), a mangrove fragment on the northern part of Cardoso Island drained by the approximately 9.5 km-long coastal river, and is characterized by a semi-diurnal meso-tidal regime, with spring tides presenting an average range of 1.2 m [
31]. The climate is humid subtropical (2269 mm and 21.3 °C mean pluvial fall and temperature), Cwa according to the Köppen classification, presenting a humid rainy season in the summer (December–March). This site is among the most extensively researched mangrove areas within the CIELS, with notable studies by [
32,
33]. The predominant mangrove species here encompass the red mangrove (
Rhizophora mangle), white mangrove (
Laguncularia racemosa), and black mangrove (
Avicennia schaeriana).
Hibiscus pernamburcensis is found in dry transition zones, while
Spartina alterniflora occupies the mangrove fringe. Basin areas are typically ruled by
R. mangle and
A. schaueriana, presenting diminished structural growth due to infrequent flooding and sandy substrate.
The estuarine bay of Suape (8°22′S; 34°57′W) is located about 40 km south of Recife (Pernambuco, Brazil) and is formed by the association of the estuaries of the coastal rivers Massangana and Tatuoca, which flow into this bay (
Figure 2). The studied mangrove is situated near the mouth of a tidal channel, which drains the southern face of the Santo Agostinho granite and volcanic complex, eventually merging with the lower estuary of the Massangana River/Suape Bay [
34]. The area experiences a semi-diurnal meso-tidal regime, boasting tidal amplitudes of 0.97 m for neap tides and 2.07 m for spring tides. The climate in the Suape Bay area is tropical hot and humid (2000 mm and 25.0 °C mean pluvial fall and temperature), As’ type according to the Köppen classification, with a humid rainy season in the autumn–winter, distributed from March to August [
35].
The lagoon–estuary region has been seriously impacted by the construction of the Suape Industrial and Port Complex through physical and structural modifications caused by industrialization and disorderly population growth. According to [
36,
37], the main impacting processes in Suape are related to sedimentation dredging; siltation/erosion; reef blasting; landfills on the reef, mangrove, and coastal plain; large vessel traffic; and industrial and domestic effluent discharges. The latter are the main sources of contamination of water and sediments with heavy metals [
34,
38] and organic pollutants, which has significantly affected the Suape mangrove areas [
39].
Braga et al. (1989) [
40] described four species in the region: R. mangle,
L. racemosa, and sparse occurrence
of A. schauerianna and
A. germinans, without a defined zonation. A fifth species,
Conocarpus erectus, occurs only in the mangrove–dune transition. There is a notable predominance of R. mangle and
L. racemosa occurring in the region, and no occurrence of the genus
Avicennia was recorded in the specific region of the study area.
2.2. Uncrewed Aerial Vehicle (UAV) Imaging
The surveys were carried out using a DJI Phantom P4 drone equipped with a multispectral sensor (P4M). The P4M includes six image sensors: a visible light camera (RGB) and five multispectral cameras—blue (B: 450–475 nm), green (G: 515–595 nm), red (R: 640–670 nm), red edge (RE: 725–775 nm), and near infrared (NIR: 840–890 nm). The camera’s focal length is 5.74 mm, with an image size of 1600 × 1300 pixels and a sensor size of 4.87 mm × 3.96 mm. The equipment is equipped with an onboard radiometer that compensates for and equalizes image brightness. Flights were planned using the DJI GS PRO application at a speed of 1.4 m/s, with an 85% lateral and longitudinal overlap. Mapping flights were conducted at an altitude of 120 m, which is considered ideal for general mapping purposes, providing a pixel resolution of approximately 6.2 cm. For species differentiation, flights were performed at an altitude of 50 m, yielding a resolution of approximately 1.4 cm, which proved sufficient for species identification in our research.
The Suape mangrove flights were conducted in April 2022, while the Cardoso Island mangrove flight took place in May 2023. Both flights were carried out in the morning under low tide conditions, with partly cloudy weather and no winds that could disrupt the flight plan. For the Suape mangrove, the imaging flight produced 2987 images, covering a total area of 31 ha, with an additional 588 images captured during two detail flights in separate regions, reflecting the need to account for the heterogeneous forest structure. In contrast, the Cardoso Island mapping flight generated 2870 photos covering 36.01 ha, while a single detailing flight produced 2002 images over an area of 0.83 ha, focusing on one section due to the relative homogeneity of the mangrove forest (see
Figure 1 and
Figure 2).
Additional flights were also conducted at lower altitudes (40 and 30 m) to obtain higher-resolution imagery. However, for species identification and training classification purposes (see item 2.5), the 1.4 cm resolution was deemed adequate. Lower-altitude flights introduced challenges, including greater difficulty in alignment and orthomosaic creation, and required more time to survey the same area due to reduced coverage per flight.
Pre-processing steps were applied to ensure accurate and consistent data. The “zero” level was calibrated based on water position, adjusting elevation values using tidal-level data to establish a consistent reference across all images and minimize discrepancies caused by water-level variations. Additionally, radiometric correction was performed using in-flight sensor parameters to standardize reflectance values, compensating for variations in illumination and sensor response.
The UAV imagery was processed using the “structure from motion” (SfM) methodology in the PIX4D Mapper 4.6. software [
41]. This technique, rooted in the foundational principles of stereoscopic photogrammetry, leverages geometric attributes from an array of images captured at different angular orientations. This created a sparse point cloud, established through the consistent identification of salient features across various images. This orientation ensured that each photograph was aligned relative to shared, identifiable points, streamlining the data processing stage.
Subsequently, a dense point cloud was derived by correlating congruent pixel sets from the initially aligned images. Using this dense data structure, 3D spatial models were crafted utilizing the scale invariant feature transform (SIFT) algorithm. This technique allowed for the correlation of unique points from multiple perspectives within a 3D framework, leading to the creation of a digital surface model (DSM) that captured topographical variations and the intricate geographical elements of the canopy surface [
42]. Thus, for each survey area, orthomosaics of each flight were generated for the visible range with all bands (blue, green, and red), the red edge (RE) band, and the near-infrared (NIR) band, and the associated DSM. Further insights into these methodologies, including their applications, advantages, and limitations, can be explored in comprehensive review works by [
43,
44,
45]. These reviews delve into the advancements in remote sensing techniques, the integration of multispectral and hyperspectral data for environmental analysis, and the development of digital models for accurate representation of surface features. Additionally, they provide a critical discussion on the use of advanced algorithms, such as SIFT, in enhancing the precision of spatial data processing and their implications for monitoring and managing natural and anthropogenic landscapes.
2.3. Tree Segmentation
Segmentation in the context of GEOBIA refers to the process by which an image is partitioned into homogeneous regions, called segments or objects. These distinct entities amalgamate pixels sharing analogous attributes like reflectance, texture, and morphology. Contrasting traditional pixel-centric methodologies, OBIA centralizes its analysis on these objectified aggregates, mirroring a more human-centric visual interpretation [
46]. For forestry studies, these “objects” predominantly represent the arboreal tree crowns within the defined area [
47].
This study used the multi-resolution algorithm contained in the E-cognition 9.5 software (Trimble), which is frequently used in segmentation operations [
48,
49] and depends on three parameters entered by the user: (1) the homogeneity criterion or scale parameter (ESP), which determines the maximum heterogeneity allowed for the segments generated; (2) the shape parameter, describing the weight of the brightness and shape criteria in the segmentation process; and (3) the compactness, describing the weight of the smoothness criterion to separate the segments [
50]. The definition of these parameters for the generation of an optimal segmentation is complex and highly dependent on analysis guided by empirical results [
46]. Several exploratory analyses were carried out using different scale parameters and band combinations (e.g., DSM, RE NIR RGB) in conjunction with vegetation indices (e.g., NDVI) as basic inputs for the segmentation tests. Based on these analyses, it was determined that the R, G, B, and NIR bands used with parameters of ESP = 120, S = 0.9, and C = 0.5 for both areas were capable of better discriminating between individual tree segments. It should be noted that these parameters are specific to the imaging conditions of this study and are not necessarily reproducible for analysis in other circumstances of resolution and luminosity. A detailed description of the effectiveness of segmentation methods in mangroves can be found in the work by [
51].
It is also worth noting that the process of segmenting tree canopy in mangroves is challenging due to the low biodiversity, spectral differentiation between species, and overlapping crowns. This characteristic can create undesirable effects, such as the suitability of the segmentation parameters, which can adjust the algorithm for one part of the area and worsen the quality of the segmentation in other nearby areas. However, in general, statistically, the set of delineated trees can represent the local structure well, i.e., it is possible to establish, on average, a good estimate of the total number of trees and local concentration, while “over-segmented” (many segments representing one tree) or “under-segmented” (one segment representing several individuals) regions tend to compensate for each other, in which case the objects represent not trees specifically but statistical segments representing the number of individuals in a forest. For a stricter definition, in this case, the objects were called TO, or “Tree Objects”, also used in the work of [
51].
After segmentation, each TO was represented as a polygonal feature in a vector file, (e.g., shapefile), stored within a georeferenced database. This allowed for the aggregation of diverse attributes, including average intensity values of an object across spectral bands (R, G, B, RE, NIR) and tree height metrics derived from the surface model (e.g., average height, maximum height, height range). Moreover, canopy shape parameters (like area, diameter, shape index, and asymmetry) and texture parameters using the GLCM (gray-level co-occurrence matrix) method by Haralick [
52] were also included. The GLCM captures the spatial relationship between pixel intensities, where the matrix value at (i, j) reveals the frequency of adjacency between pixels of intensities i and j within each TO. Analyzing the GLCM, one can derive texture descriptors. In our study, we focused on the near-infrared band for its pronounced contrast in vegetative regions and computed GLCM texture parameters, including “energy”, “entropy”, “homogeneity”, and “dissimilarity”.
In order to better highlight vegetation response, vegetation indices were also used to quantify vegetation cover and health by exploiting the differential reflection properties of vegetation across various spectral bands [
53,
54,
55]. The following indices were used: the normalized difference vegetation index (NDVI), green vegetation index (GNVI), red edge vegetation index (REVI), and chlorophyll vegetation index (CVI).
After completing the calculations for the spectral, textural, shape, and volume features, we structured a geodatabase using the ArcGIS Pro (3.X) system. This allowed for the creation of thematic maps for each parameter, serving as a foundational layer for the ensuing classification process.
Table 1 details the parameters calculated for each tree object (TO), along with their descriptions.
2.4. Field Data
To correlate the data obtained by UAVs with direct in situ measurements, five forest inventory plots were established: two in the Suape area and three in the Cardoso Island area.
The structure attributes of the mangrove vegetation were obtained in delimited plots of variable size using the methodology proposed by Schaeffer-Novelli [
56]. Diameter at breast height (DBH) measurements were taken from plants over 1 m in height. Georeferenced species identification and determination of the number of live and dead trunks were carried out. The areas of the plots were determined to contain at least 20 individuals over 2 m in height each. The areas of the plots were chosen to cover the mangrove sub-environments such as the fringe and basin to obtain data representative of the structure of the forest.
The highest trees were individually photographed, measured, geo-referenced, and correlated with the canopies identified on the identification (50 m) and mapping (120 m) UAV flights and then used as training samples for the classification process (see item 2.5). The heights and diameters of the canopies were also measured using laser rangefinders to calibrate the digital elevation models and segmentation algorithms. The detailed table containing all measurement data, including DBH, species identification, and tree classification, as well as images of the plot locations, are available in the
Supplementary Materials accompanying this article.
2.5. Classification
Classification in remote sensing and geospatial analysis involves categorizing objects based on attributes like spectral signatures, texture, and spatial context [
46,
57]. The classification focused on the taxonomic identification of the mangrove, i.e., it sought to identify the species of the trees delimited by the segmentation process for each object based on known training samples identified in the forest plots and UAV detail flights (i.e., supervised classification [
58]). Although mangroves have low biodiversity, their classification can be a challenge since different tree species can have similar spectral, textural, and shape characteristics, and on the other hand, within a single species, there can be significant variations in terms of shape, size, and spectral appearance, depending on local growing conditions (see details in [
59,
60,
61,
62]).
In this regard, machine learning (ML) algorithms have proven particularly useful, as they offer a great capacity to model non-linear relationships and complex interactions between variables based on training samples, which may not be captured by more traditional methods. This capability is especially valuable in environments where spectral, textural, and contextual features interrelate in intricate ways, particularly as in the case of mangroves [
63]. There are numerous machine learning (ML) classification algorithms, each with different mathematical foundations and optimization strategies. However, this study does not aim to conduct an exhaustive comparison of ML models. Instead, we focus on developing a scalable and adaptable OBIA framework, using widely adopted ML methods that represent different classification paradigms. We selected random forest (RF), deep neural network (DNN), and Naïve Bayes (NB) because they offer distinct mathematical approaches, thereby covering a broad spectrum of ML strategies: RF represents ensemble decision tree methods, DNN captures deep learning-based pattern recognition, and NB serves as a probabilistic classifier. These models are commonly used in remote sensing applications and provide a practical yet effective range of classification techniques for mangrove species identification. A full review of the details of each of the main ML algorithms and details on the formalism and parameterization of the models is detailed in [
64,
65,
66].
The following classes were considered: Rhizophora
mangle,
L. racemosa, and
A. schauerianna; however, for the Suape region, the species
A. schauerianna was not considered since its occurrence in the mangrove is significantly rarer (corroborated by [
40] and the forest inventory plot data, which did not identify any occurrence of this species). The “gap/shadows” class was also considered for objects with low reflectance, as well as the “channel/water” and “sandbank” classes in non-vegetated areas. In the Suape region, the “other” class was also considered, since regions of coastal vegetation (different from mangroves) were identified in some areas, specifically on the borders of the study area.
Training samples for the classifiers were derived from images captured during low-altitude flights, which provided a ground sampling distance of approximately 1.4 cm per pixel at 50 m altitude. By flying at this relatively low altitude, we obtained high-resolution aerial imagery of both the established plots and additional areas of interest. Individual tree crowns were discernible at this scale, allowing expert ecologists familiar with the local mangrove species to visually identify and confirm species directly from these images. To ensure accuracy, these low-altitude identifications were cross-referenced with the ground-based plot data in regions where we had both in situ and aerial observations. This approach effectively bridges the gap between on-the-ground measurements and remotely sensed imagery, increasing both the spatial extent and the reliability of our species-labeled dataset.
Once we had established a larger, verified set of species-labeled points from the low-altitude imagery, we integrated these identifications into higher-altitude (e.g.,120 m) orthomosaics. Although these orthomosaics provide broader spatial coverage suitable for large-scale mapping, their coarser resolution makes direct species-level identification more challenging. By transferring the confirmed species labels from the high-resolution imagery, we were able to consistently associate species with individual tree crowns even in the coarser orthomosaics. This expanded our training dataset considerably and enabled classification over extensive areas beyond the immediate vicinity of the field plots. Additionally, these images were specifically linked to trees measured on site, ensuring that species identifications were grounded in direct field observations. For each species class, a minimum of 130 samples were selected, with approximately 100 used for training and the remainder allocated for accuracy testing, ensuring both robust model training and reliable model validation.
The modeling was developed using a script in “Python 3.12” (via the “NumPy” and “Sklearn” libraries) and reproduced in the “Orange Data Mining 3.2” software for the preparation of graphs and statistical tests. The Python code used for the modeling process is available in the
Supplementary Materials, along with a sample file of the training table used, to facilitate reproducibility and further analysis.
2.6. Analyzing Species Spatial Distribution
Once species have been classified based on segmentation and classification supported by tying in with field measurements, a logical next step for a high-resolution analysis is to assess the spatial distribution of these trees, specifically regarding the ordering (e.g., concentration and/or random distribution) of the species in the mangrove ecosystem. Various metrics can be used to determine this spatial patterning, and it is not the focus of this study to evaluate each of them. A vast biography can be found in works such as [
67,
68]. One of the most direct forms for this type of analysis is the determination of hot spot zones for each species using Gi* (Getis–Ord) spatial statistics. This method identifies clusters of high values (hot spots) and low values (cold spots) within the study area, providing a clear visualization of the spatial intensity and distribution patterns of different species.
Each species in the two studied areas was summarized within a grid (fishnet) with a 20 m resolution, where the Gi* score statistic was calculated to assess the degree of spatial clustering, with positive Gi* scores indicating hot spots and negative scores indicating cold spots. P-values associated with each Gi* score were computed to determine the statistical significance of the observed clustering, identifying cells with statistically significant Gi* scores as true hot spots or cold spots. The results were displayed using maps, highlighting areas of significant species concentration and dispersion. Detailed methods of Getis–Ord spatial statistics applied to forest application can be accessed in [
69,
70].
Figure 3 presents the study’s conceptual and methodological scheme, succinctly outlining the research framework and analytical steps employed in this article.
3. Results
The use of OBIA (object-based image analysis) proved effective for classifying mangroves using high-resolution UAV (unmanned aerial vehicle) imaging. This approach relies on two main processes: segmentation and subsequent classification. Segmentation of trees and mangrove forests, however, is complex and challenging to apply universally. Segmentation parameters, such as edge index and scale, often work well for one region of the study area but not for others. For instance, parameters that fit the Cardoso Island region did not apply to the Suape region, necessitating empirical adjustments for each area. Nevertheless, by using field-obtained data from the tops of the plots, it was possible to fine-tune the parameters to the local context and then generalize them to other study regions. The use of infra-red and red-edge bands significantly enhanced crown discrimination, reducing the subjectivity of applying segmentation parameters compared to using RGB images alone.
Through the segmentation process, tree crowns could be individualized. By extracting values related to their shape, texture, and spectral indices, a series of parameters could be associated with these objects (or tree objects, TOs). This resulted in the creation of a structured database within the ESRI ArcGIS Pro platform. This database comprises the 24 distinct parameters, organized as detailed in
Table 1 (
Section 2.3). This enabled the creation of thematic maps for all stored parameters, facilitating the development of vegetation structure atlases. Such atlases could include data on average tree height, crown area, diverse vegetation indices, and both geometric and textural parameters. These comprehensive map collections are crucial for conducting broad analyses of mangrove vegetation’s structural patterns, offering insights into generic aspects of vegetation like biomass estimates, which can readily be acquired from UAV flights conducted at mapping altitude surveys, which are straightforward and cost-effective.
Figure 4 and
Figure 5 show examples of thematic maps for the Cardoso Island and Suape regions, respectively, highlighting distributions of geometric variables (shape index); texture (represented by entropy); the average DSM value, which indicates tree height; and the NDVI, reflecting vegetation vigor and coverage.
Based on this information, three supervised classification algorithms based on machine learning (ML) were applied to classify the study areas: “random forest”, “Naive Bayes”, and “deep neural network”.
Hyperparameter tuning was conducted using GridSearchCV, optimizing random forest and deep neural network (DNN) models. The best random forest configuration included 50 trees, no depth limit, and a minimum split of two samples, while the DNN model performed best with three hidden layers (200, 100, 50), a learning rate of 0.001, 500 training iterations, and the ReLU activation function. The Naïve Bayes model required no significant tuning. Training and evaluation followed a 70–30 train–test split, and cross-validation (5-fold) was used to ensure model robustness. The complete implementation, including training epochs and activation details, is available in the Python code in the
Supplementary Materials.
Figure 6 and
Figure 7 show, in the form of confusion matrices, the capacity of each of the algorithms used to discriminate each of the classes for Cardoso Island and Suape, respectively. Based on these models, species classification maps were generated for the areas (represented in the maps shown in
Figure 8 for the Cardoso Island region and
Figure 9 for the Suape region). After model parameterization tests, the best results (e.g., models that best “fit” the data distribution) were incorporated into the previously described OBIA data models.
In the two study sites, the random forest models showed slightly better accuracy. This was particularly evident for Cardoso Island, where the classifiers struggled more with the presence of R. mangle and A. schaeriana specimens. However, all algorithms were better at differentiating L. racemosa trees in both the Cardoso Island and Suape regions. Consequently, the distribution based on the random forest model was used for subsequent analyses as reference.
The classification performance was tested using statistical metrics to establish the contribution of each variable in distinguishing tree crowns across the Suape and Cardoso Island areas. The evaluated parameters were grouped into four categories: spectral, textural, height, and shape-related features. Among these, spectral parameters, including band values and mean tree height, demonstrated the highest contribution to classification performance, slightly outperforming vegetation indices such as the NDVI. In contrast, shape-related parameters, including tree crown symmetry and roundness, showed limited discriminative power, indicating lower relevance for the task. The complete table of statistical results can be accessed in the
Supplementary Materials.
The distribution of tree species exhibited a distinct zonation in the two study areas. Hotspot analyses based on the Gi–Ord statistic revealed a clear compartmentalization in Cardoso Island (
Figure 10). In this area,
L. racemosa predominates in the fringe regions, particularly near the estuarine channel (
Figure 10b), while
R. mangle and
A. schaueriana are concentrated in the inner portions of the mangrove, sharing the same area (
Figure 10a). In contrast, the Suape Mangrove presents a different pattern. Despite the absence of
A. schaueriana,
L. racemosa primarily concentrates in the inner portions of the mangrove, whereas R. mangle is found in the areas closest to the estuarine channel (
Figure 10c,d).
The two regions exhibited differences not only in tree species distribution but also in structural characteristics. For instance, considering only
R. mangle trees, those in the Suape region generally had larger canopy areas, averaging 7.2 m
2. Conversely, trees in the Cardoso Island mangrove had a smaller average canopy area of 5.3 m
2. Interestingly, average heights displayed a reverse trend:
R. mangle trees in Suape averaged a height of 6.5 m, while those in the Cardoso Island mangrove stood taller, with an average height of 7.8 m, as shown in the tree distribution histograms in
Figure 11. On the other hand,
L. racemosa trees had a significantly higher average height in Suape (8.5 m) compared to on Cardoso Island (4.2 m).
The establishment of a geodatabase of specific trees, or tree objects (TOs), with multiple associated parameters opens up a myriad of possibilities for data representation. Among these, the creation of 3D models stands out, as the height of the trees can be estimated using digital surface models (DSMs). In these 3D representations, each species is symbolized by a rendered icon with a height proportional to the actual tree, providing an intuitive and detailed visual representation. This approach is incredibly useful for visualization and decision-making processes, offering stakeholders a clear, interactive way to understand spatial patterns and the characteristics of different tree species.
Figure 12 illustrates examples of synthetic 3D visualizations of mangroves, showcasing data linked to specifically chosen trees, thereby highlighting the utility of this method in environmental analysis and management.
4. Discussion
The method used for mapping mangroves from multispectral UAV imagery using object-based image analysis (OBIA) proved to be effective for segmenting and classifying tree species in mangrove forests, in particular in the selected studied areas. Multispectral images demonstrated clear superiority over conventional RGB images, particularly in the processes of segmenting tree canopies and in classification tasks. These additional spectral bands provided critical information that improved the distinction between different vegetation types and health conditions, thereby leading to higher accuracy. The use of texture parameters (GLCM) and band ratios (derived from vegetation indices) proved quite important in enhancing the classification process. In contrast, the shape indices had minimal impact on the performance of the classifier algorithms. Recent deep-learning frameworks, such as UrmsNet [
71], show promise but often require extensive computational resources and large annotated datasets. Our method prioritizes interpretability, adaptability, and lower data-processing demands, making it practical for routine ecological monitoring. The demonstrated applicability across distinct ecological settings reinforces its robustness.
Using two survey altitudes, specifically 120 m and 50 m, further optimized the mapping process. Higher-altitude flights, referred to as “mapping resolution”, allowed for the coverage of larger areas, which is essential for comprehensive landscape-level mapping. On the other hand, lower-altitude flights, or “detail resolution”, facilitated the identification of species within smaller survey areas due to the finer resolution of the images captured. This approach, combined with in situ validation plots, was crucial for training the classification models in a more efficient and accurate manner. The dual-altitude strategy ensured that both broad-scale and fine-scale details were effectively captured and analyzed, resulting in a robust and thorough mapping of mangrove ecosystems.
Regarding the object classifier performance, the random forest model exhibited slightly better performance compared to deep neural networks and Naive Bayes due to its ensemble learning approach, which combines multiple decision trees to enhance predictive accuracy. Unlike deep neural networks, which require extensive training data, random forests efficiently handle smaller datasets and are less prone to overfitting, such as the case of this study. Additionally, the simplicity of random forests in dealing with feature interactions and non-linear relationships gave them an edge over the more complex deep neural networks and the simpler, probabilistic-based Naive Bayes. This balance of complexity and interpretability made random forests particularly effective in differentiating between species in ecological datasets, where the presence of certain specimens, such as
R. mangle and
A. schaueriana, introduced variability and classification challenges. These results corroborate other similar studies of mangrove species classification using UAVs, specifically the work by [
18].
The results highlight the significance of spectral and height-based parameters in improving classification accuracy. For instance, pure mean NIR values showed the highest information gain (0.856) and gain ratio (0.428), followed closely by mean green and brightness, with slightly lower but still notable contributions. Additionally, height metrics such as mean height (0.812) provided complementary insights, particularly for capturing structural variability. While texture-related metrics performed moderately well, shape-related features exhibited consistently low scores across metrics, reinforcing their limited utility. The diverse evaluation criteria, including the Gini index, ANOVA, and ReliefF, further validate these observations, with high ANOVA F-values and Chi-squared scores for spectral features indicating their robust contribution to the classification. These findings underline the importance of integrating spectral and structural metrics for enhanced classification of mangrove tree crowns.
Spectral information, particularly in the near-infrared (NIR) region, proved crucial for distinguishing between mangrove species. NIR reflectance captures variations in leaf structure, water content, and vegetation health, making it a key parameter in identifying subtle differences among species. Texture features derived from grey-level co-occurrence matrices (GLCMs) provided complementary information, highlighting variations in canopy roughness and heterogeneity. These patterns are often linked to species-specific growth forms and environmental adaptations. Height data, derived from the UAV’s digital surface model (DSM), also played an important role, as different mangrove species exhibit distinct vertical structures, which help differentiate species in mixed stands. However, shape parameters were found to have no significant impact on classification performance. This is likely because mangrove species often exhibit variable crown shapes across different environmental conditions and growth stages, making shape a less reliable indicator of species identity.
The classification results were highly reliable for Laguncularia racemosa and non-vegetation classes (e.g., shadows, water, sandbanks), demonstrating the robustness of the OBIA framework. However, some confusion occurred between Rhizophora mangle and Avicennia schaueriana, particularly in the Cardoso Island region. This misclassification was primarily due to spectral similarity in the near-infrared range, structural overlaps influenced by growth stages, and environmental variability such as sediment composition and tidal exposure. While canopy height helped differentiate species, younger Avicennia trees exhibited height profiles closer to Rhizophora Mangle, reducing model precision. Additionally, segmentation challenges arose in dense, overlapping canopies, sometimes causing over- or under-segmentation. Expanding training sample diversity to include a broader range of ecological conditions and tree development stages could improve classification accuracy.
Importantly, the use of multiple ML models—random forest (RF), deep neural network (DNN), and naïve bayes (NB)—produced consistent classification results, reinforcing the reliability of the chosen approach. Alternative ML methods tested showed similar performance, suggesting that future improvements should focus on refining training data, optimizing segmentation, and incorporating additional remote sensing techniques (e.g., LiDAR, hyperspectral imaging, or multitemporal UAV surveys) rather than relying solely on different classification algorithms.
Beyond classification performance, the spatial distribution of mangrove species also revealed distinct zonation patterns influenced by local environmental conditions: a clear difference in the zonation of the two mangroves was observed, despite having the same species. In Suape, an estuary with larger tidal amplitudes, low freshwater input, and terrigenous material, the mangrove swamp is sandier; hence, the trees are more densely established, with fewer gaps, and with a predominance of
Rhizophora mangle trees with more laterally extensive roots, resulting in trees with larger canopies. In contrast, the Cardoso Island region, characterized by less intense tides and higher input of muddy material (also associated with greater rainfall and freshwater in the estuarine system), features a mangrove with a muddier texture, taller trees, and more gaps, likely due to local tree falls and a less firm substrate. Additionally, small concentrations of
L. racemosa are found in fringe areas of the Cardoso Island mangrove, where coarser sediments have been deposited, indicating that this species is associated with coarser texture substrate. In Suape,
L. racemosa specimens are significantly taller, with sizes comparable to those of
R. Mangle. The relationship of the size and distribution of mangrove trees and their relationships with the sediment texture and tidal flows were described in [
72,
73,
74,
75].
The results can be integrated into long-term conservation strategies by enabling periodic assessments of mangrove health, structure, and zonal species composition. Furthermore, incorporating these techniques into coastal management plans can facilitate habitat restoration efforts, carbon stock estimation, and early detection of deforestation or degradation events.
An important point is that once the most significant parameters for classification have been established and an automatic classification routine has been set up, it becomes possible to create an automated practice for mapping mangrove areas, allowing for significant savings in time and resources. It should also be emphasized that the repeatability of this method in different areas could also allow for a training image library to be developed (e.g., from detail flights), improving supervised classification algorithms.
While this study demonstrates high classification accuracy using UAV-based multispectral imaging, seasonal variations in vegetation structure, leaf reflectance properties, and illumination conditions could influence classification outcomes. Future studies should evaluate the stability of the method by testing it across different seasons and varying lighting conditions to assess its generalizability.
More in-depth analyses of distribution and spatial correlations can lead to more complex conclusions about the distribution of species in mangrove ecosystems and their relationships with external factors. For example, niche analyses that are normally carried out on a regional scale can be developed at the level of small areas. In addition, the estimation of biophysical parameters, such as biomass, through the application of species-specific allometric equations can significantly improve the accuracy of blue carbon estimations; furthermore, it may be important to calibrating regional or global blue carbon inventories. However, sub-stratum vegetation is not imaged, which may introduce significant uncertainty into these estimates.
5. Conclusions
This study demonstrates the significant potential of UAV technology for high-resolution mapping of mangrove ecosystems. By integrating UAV-based multispectral imagery with geographic object-based image analysis (GEOBIA) and machine learning (ML), we successfully classified mangrove species with high accuracy. This approach enhances our understanding of species-specific distribution patterns and provides valuable insights into the structural complexity of mangrove forests.
The results emphasize the superiority of UAV-based remote sensing over traditional methods, particularly in the ability to classify species at a fine spatial scale. The inclusion of multiple spectral bands, along with texture and height parameters, significantly improved classification accuracy. Moreover, by applying this methodology in two distinct ecological settings—Cardoso Island (subtropical) and Suape (tropical)—we demonstrated its adaptability across different environmental conditions. However, the study also highlights key challenges and future directions for research. Seasonal variations, lighting conditions, and tidal cycles may influence classification accuracy and should be further investigated. Expanding the application of this methodology to different mangrove types and regions worldwide will help validate its universality and refine its predictive power. Additionally, improving classification models by integrating multi-temporal data and testing alternative ML algorithms could further enhance species differentiation and ecosystem monitoring capabilities.
Beyond scientific contributions, this approach holds great promise for mangrove conservation and management. By integrating UAV-based classification methods into existing environmental monitoring programs, stakeholders can efficiently track changes in mangrove extent, species composition, and structural health. This has direct applications in habitat restoration, carbon stock estimation, and policymaking for coastal resilience. The method can also serve as a cost-effective and scalable tool for long-term mangrove protection, aiding conservation efforts against climate change and anthropogenic pressures. Thus, while the presented approach has demonstrated high efficiency in mangrove mapping and species classification, further refinement and broader application are essential for optimizing its accuracy and practical implementation. Future research should focus on assessing its performance under different environmental conditions, developing automated workflows, and integrating UAV-based data into national and global mangrove monitoring frameworks. Since this study focused on two distinct regions, we can highlight that this already provides insight into methodological robustness across different environmental conditions (e.g., Cardoso Island, with subtropical conditions, and Suape, with tropical conditions). However, we could mention that further validation in other latitudinal gradients, geomorphological settings, and mangrove types (e.g., Pacific or Indo-Pacific mangroves) would be beneficial.