The relative density and directional distribution of signal photons are key characteristics that can vary substantially across different areas. This variability reduces the effectiveness and general applicability of methods that rely on preset density thresholds and photon distribution directions. To address this issue, we propose a signal photon extraction method that leverages both the spatial density and directional distribution characteristics inherent in photon data.
Figure 2 illustrates the main workflow of this study, which consists of three key components: (1) Data preprocessing phase, where raw ATL03 data undergoes photon segmentation based on the along-elevation density distribution, thereby separating the above-water and underwater photon subspaces. (2) Directional density feature computation—after distance scaling, the directional indices of neighboring photons and their distances from the central photon are calculated; through direction-aware distance adjustment and aggregation, a density representation incorporating directional characteristics is obtained. (3) Density threshold determination for signal photon extraction, coupled with iterative secondary extraction to identify surface, land, and seabed photons. Additionally, to enhance the adaptability of proposed algorithm, this study designed metrics for identifying optimal parameters. Finally, the extraction performance of the proposed algorithm is systematically evaluated and validated.
2.2.2. Calculation of Density Representation
Underwater signal photons are not only characterized by higher local density than noise photons, but also by exhibiting more structured and directional spatial patterns. As shown in
Figure 2, to capture these characteristics, we analyze the spatial configuration of neighboring photons and quantify the degree of anisotropy in their local distribution. By measuring how strongly the neighboring photons are aligned along a predominant direction, we obtain a directional descriptor that reflects the underlying structure of the photon field.
This directional metric is then incorporated into the computation of the k-nearest neighbor distances, effectively refining the local density representation. In this way, photon clusters with clear geometric structure can be distinguished from more isotropic and randomly distributed noise photons, which enhances the robustness of signal photon identification. The detailed procedure is as follows.
Step 1. Scale the along-track distance:
To effectively utilize density features at the overall scale, it is necessary to ensure that the neighborhood of each photon contains sufficient global structural information. Therefore, the along-track distances of the photon point cloud are compressed so that the neighborhood constructed for each photon covers a relatively larger extent of the overall structure. Based on empirical observations, the along-track distance of each photon is multiplied by a scaling coefficient of 0.025. This correcting scale allows each photon neighborhood to incorporate more overall-scale density characteristics in the subsequent analysis.
Step 2. Define neighboring photons:
Let each photon in the photon space be represented by a two-dimensional coordinate vector as:
where
represents the scaled along-track distance,
represents elevation. This yields the vectors
. For each photon
in the dataset, find its
nearest neighbors (
Figure 4a), denoted as
, where
denotes the j-th neighboring photon of
.
Step 3. Calculate directionality index:
For each photon
, first compute its neighborhood photon average
, i.e., calculate the mean values of all neighborhood photons along-track coordinate and along-elevation coordinate, respectively. Then construct the local covariance matrix using its
nearest neighbors:
Since
,
is a
real symmetric matrix.
For each photon
, performing an eigenvalue decomposition on its covariance matrix
. yields the corresponding eigenvalues
and eigenvectors
,
, where
represents the first principal component direction of the local neighborhood of
(
Figure 4b). To quantify the directionality of the spatial distribution of neighboring photons and to control the subsequent adjustment, we define a directionality-based scaling factor
as:
when
, the neighborhood is more elongated along the first principal component
, and
. A smaller
indicates stronger directionality and implies stronger compression along
in the subsequent adjustment step.
Step 4. Adjust neighboring photon positions:
Based on the directionality-based scaling factor , we adjust the positions of neighboring photons to account for the influence of locally directional structure on their spatial distance from photon .
In the principal component coordinate system, only the first component is scaled by
, while the second component remains unchanged. This projection–scaling back–projection procedure can be equivalently expressed as a single linear transformation in the original coordinate system. For any neighboring photon
, its adjusted position
is given by
where
is the diagonal scaling matrix that scales only the first principal component, and
is the eigenvector matrix of
.
Geometrically, this transformation is equivalent to first projecting
onto the basis spanned by
and
, then scaling the component along the first principal component direction by a factor of
while keeping component along the second component unchanged, and finally mapping the result back into the original coordinate system. In this way, the dispersion along the first principal component direction is compressed, enabling directionality to be reflected in subsequent distance calculations (
Figure 4c).
Step 5. Calculate adjusted distances:
After obtaining the adjusted positions
, we compute the new Euclidean distance between each neighboring photon and the photon
:
where
denotes the Euclidean distance. Compared with the original distance
the adjusted distance
explicitly incorporates the influence of directional structure on the spatial relationship between photons.
Finally, for each photon
, we sum the adjusted distances of its
nearest neighbors:
where
is a density representation of the central photon
that accounts for directional effects. The smaller the value of
, the greater the density of
; conversely, the larger the value of
, the smaller the density of
.
2.2.3. Signal Photons Extraction
The photon density representation is a key indicator for distinguishing signal photons from noise photons. As shown in
Figure 2, based on the density measure
defined above, we determine a density boundary that separates signal photons from noise photons. This is achieved by grading the density values and automatically computing an optimal density threshold. In addition, to further improve the reliability of underwater signal photon extraction, we apply a secondary refinement (re-extraction) to the coarsely classified signal photons. The detailed procedure is as follows.
Step 1. Density grading:
First, we compute the range of density values
over the entire dataset and obtain the minimum and maximum values,
and
. This range is then divided into
density grades using linear binning. The bin width is defined as
where
is the total number of grades. Each photon
is assigned to a density grade
according to:
where
denotes the greatest integer less than or equal to
,
is the uniform width of each density grade.
Step 2. Density threshold calculation:
To separate signal photons from noise photons based on their density grades, we determine an optimal grade threshold using the Otsu method [
31,
32]. This method selects the threshold that maximizes the between-class variance between two groups.
We construct a histogram of the discrete grades
and normalize it to obtain the probability of each grade. For a candidate threshold
, the photons are divided into two classes:
Let the
and
denote the weights of the signal and noise classes;
and
denote their mean grades, respectively, the between-class variance
for threshold
is given by
We evaluate
for all possible thresholds
, and select the threshold that maximizes the between-class variance
:
Photons with are retained as candidate signal photons, while those with are classified as noise.
Step 3. Re-extraction:
To further improve the accuracy of signal photon extraction, we perform a secondary extraction on the candidate signal photons obtained in Step 2. In this stage, the density characteristics are re-evaluated within the subset of candidate signal photons using exactly the same parameters and procedure as in the initial extraction. A new density threshold is computed on this subset, and photons that do not satisfy this refined threshold are discarded (from Step 2 in
Section 2.2.2 to Step 2 in
Section 2.2.3). This iterative refinement helps reduce the number of noise photons that were misclassified as signal photons in the initial extraction.
2.2.4. Adaptive Determination of the k-Nearest Neighbors Parameter
In the proposed algorithm, the number of nearest neighbors, , is a sensitivity parameter that requires adjustment based on the dataset. To enhance the adaptivity of the algorithm, this study designs an index, based on prior distribution of ideal signal photons, to evaluate the continuity and width of extracted signal photons. By comparing the values of this index, the optimal number of nearest neighbors can be efficiently determined.
For the extraction of signal photons from any given ATL03 dataset over a specific shallow-water area, the ideally extracted signal photons should exhibit the following properties: the signal photons should be continuous and smooth, and noise photons should not be mistakenly identified as signal photons; the width of the signal photon should be as slim as possible and clearly separated from noise photons; at the same time, all the true signal photons present in the data should be identified as completely as possible. In contrast, four typical patterns correspond to unsatisfactory extraction performance: (1) a large number of noise photons are misclassified as signal photons (
Figure 5a); (2) noise photons adjacent to the signal photons are incorrectly classified as signal photons, which leads to a broader extraction result (
Figure 5b); (3) the signal photons are not continuous and exhibit obvious gaps (
Figure 5c); (4) the extraction is overly conservative, resulting in an insufficient number of valid signal photons (
Figure 5d).
Based on these observations, the two parts of the index are designed as follows. The first part is a continuity index, which focuses on the continuity of signal photons and the accuracy of their extraction. The specific procedure is as follows:
Step 1. Quantifying the elevation variation of extracted signal photons:
The normal along-track gap of ATL03 photon data is 0.7 m. The extracted signal photons are therefore clustered according to identical along-track coordinates, and the mean elevation within each cluster is computed, yielding a new point sequence
, where
denotes the along-track coordinate of the i-th cluster,
denotes the mean elevation of photons within that cluster, and
is the total number of signal-photon clusters. The sum of squared first-order differences in elevation for this sequence is then computed as:
where the quantity
characterizes, to some extent, the smoothness of the extracted signal photons. If noise photons are misclassified as signal photons, the mean elevation of the affected cluster may deviate abnormally from that of neighboring signal-photon clusters, increasing
and consequently leading to a larger value of
.
Step 2. Penalizing interruptions in extracted signal photons:
In this study, all along-track gaps between signal-photon clusters are examined. If the gap exceeds 70 m (Equivalent to the loss of 100 clusters of signal photons), it is regarded as an abnormal interruption and is penalized. The total penalty
is computed as:
where
is the number of interruptions that receive a penalty,
is the vertical range of the photon data, and
is the number of missing photon clusters within the j-th interruption. The latter is calculated as
, where
denotes the along-track distance between the two clusters at the ends of the interruption.
Step 3. Computing the continuity index:
After quantifying both the smoothness and continuity of the extracted signal photons, the continuity index
is defined as:
where
is the ratio of the number of extracted signal photons to the total number of photons. Dividing by
prevents extremely conservative extraction results (e.g., only a single signal photon being extracted) from receiving an artificially favorable score. A smaller value of
indicates, to some extent, better smoothness and continuity of the extracted signal photons.
The second part is a sharpness index, which reflects the width of the signal photons. It is computed as:
where
is the total number of signal-photon clusters,
denotes the variance of the elevation coordinates of photons within the i-th cluster, and
is again the ratio of the number of extracted signal photons to the total number of photons, used to avoid overly conservative extraction results. A smaller value of
indicates, to some extent, slimmer width of the extracted signal photons.
Finally, the overall index used in this study for parameter evaluation is obtained by multiplying the two parts:
Within the same dataset, a smaller value of indicates, to some extent, better performance of signal-photon extraction under the corresponding parameter setting. Therefore, for a given dataset, the optimal parameter can be efficiently selected by comparing the index values associated with different choices of .
2.2.6. Evaluation Methods for Algorithm Performance
Following the aforementioned procedure to obtain signal photons, it is necessary to further validate the effectiveness of the algorithm. In this study, manually labeled signal photons are regarded as ground-truth signal photons. Ground-truth selection was performed by researchers by jointly referencing the confidence labels from ATL03, the classification labels from ATL08, and visual interpretation. Manual labeling was conducted using PhotonLabeling, a custom-developed interactive software designed for ICESat-2 photon data annotation (publicly available for download at:
https://github.com/zwshi-pku/PhotonLabeling). These ground-truth signal photons are used to compute the precision (P), recall (R), and F1-score of the extracted results. Precision represents the proportion of true signal photons among the extracted signal photons, whereas recall denotes the proportion of ground-truth signal photons that are correctly identified by the algorithm. The F1-score is the harmonic mean of precision and recall. The formulas for calculating these metrics are as follows:
where TP represents the number of correctly detected signal photons, FP is the number of erroneously detected signal photons, and FN is the number of noise photons incorrectly detected as signal photons.
The extraction results for areas E and F are validated using the CUDEM from the Puerto Rico area. Subsequently, regression analysis is performed on the extracted signal photon elevations and the corresponding CUDEM elevations, with evaluation metrics including the coefficient of determination (), RMSE (root-mean-square error), and MAE (mean absolute error) calculated to assess the model’s performance.
To illustrate the effectiveness of our approach, we compare it with two established algorithms, namely DBSCAN [
21,
22] and HDWC (Heterogeneous Density and Weak Connectivity) [
17]. For fair comparison, the parameters of both reference methods were tuned according to settings reported in the corresponding literature, ensuring that each method operates under its recommended configuration. Additionally, photon classification labels from the ATL24 bathymetry product have been incorporated into the comparison framework. Because the primary focus of this study is the extraction of underwater signal photons, the evaluation exclusively uses underwater photon data, allowing a direct comparison of performance on the target task.