## 2 Methods
### Cascaded Edge Detection  
Edge detection is crucial for intelligent rock discontinuity recognition, with high-performance edge detection operators being essential for achieving optimal detection outcomes. At present, the mainstream edge detection methods are mainly on the basis of the principle of differential operation and feature analysis. The representative algorithms include the [PERSON] operator, Sobel operator, and Prewitt operator on the basis of the first-order differential; the Laplacian operator [23] on the basis of the second-order differential; wavelet transform on the basis of multi-scale analysis; morphological method on the basis of topological features; and the Phase Congruency algorithm [24] combined with phase consistency. Among them, the Canny edge detection operator [25] shows significant advantages due to its unique algorithm design. Building on the principles of the Cannyalgorithm, we integrate non-maximum suppression, a dual-threshold mechanism, and edge smoothing to identify discontinuity edges from the 2D planes converted from 3D point cloud RGB information. At the same time, parallel computing is adopted to optimize the processing speed of the algorithm, so as to achieve rapid batch processing of massive point cloud data, save data processing time, and improve efficiency. Non-maximum suppression (NMS) refines edges by comparing the gradient amplitudes of adjacent pixels along the gradient direction, retaining only local maxima and suppressing non-maximum gradient amplitudes. First, gradient magnitudes are normalized to ensure scale consistency across the point cloud. Non-maximum suppression (NMS) is then applied to refine edges by comparing the gradient amplitudes of neighboring points along the gradient direction. Specifically, for each point in the 3D point cloud, NMS checks the two immediate neighbors aligned with its gradient direction (quantized into 8 discrete intervals, e.g., 0\({}^{\circ}\), 45\({}^{\circ}\), 90\({}^{\circ}\), etc.). If the current point's gradient magnitude is not the maximum among these three points, it is suppressed as a non-edge. This process eliminates spurious edges caused by noise or redundant detections from multi-channel gradient fusion, thereby avoiding artifacts such as \"double edges\" or blurred boundaries. To adapt NMS to 3D data, gradient directions are projected onto a 2D plane for quantization, and neighborhood comparisons are performed within this plane. Each quantized direction defines a unique comparison axis (e.g., horizontal, vertical, or diagonal), determining which neighboring points are evaluated. By retaining only local maxima, NMS suppresses amplitude fluctuations induced by sensor noise or minor color variations between RGB channels, ensuring that edges follow the dominant gradient direction with high spatial coherence. Additionally, the quantization of gradient directions standardizes edge topology, enabling the continuous tracing of discontinuities even in geometrically complex regions. Threshold selection serves as the \"quality controller\" in edge detection, directly impacting result efficacy by striking a balance between sensitivity (detecting faint edges) and specificity (suppressing noise). A custom dual-threshold mechanism is adopted by use of empirically optimized thresholds to categorize pixels into three classes, as Table 1 shows. This dual-threshold strategy maximizes the retention of genuine weak edges while enhancing edge continuity. Proper threshold settings enable the algorithm to achieve high-precision, low-noise edge extraction in complex geological scenes. To adapt to large-scale point cloud processing, a parallel architecture distributes subregions of the point cloud across CPU cores using ProcessPoolExecutor. Dynamic task allocation minimizes idle cores, achieving near-linear speedup. The design of cascade edge detection can improve the practicability of the algorithm in complex geological scenes while ensuring edge accuracy.