## 4 Discussion  
The comparative evaluation of classical and deep learning-based edge detection algorithms in this study offers valuable insights into their respective strengths and limitations within the realm of cultural heritage conservation. Classical methods, such as Sobel and Canny, consistently achieved higher F1 scores, especially in artworks with distinct contours and high contrast. These algorithms are well established in image processing and excel at detecting sharp intensity transitions. However, their performance heavily relies on the visual clarity of the input image. In artworks featuring diffused brushwork, layered textures, or gradients, these methods often result in fragmented or noisy edge maps. Their dependence on fixed thresholds and local gradients limits their adaptability to the complex visuals found in contemporary and modern art. Conversely, the deep learning-based DexiNed model produced more visually coherent and accurate edge maps, although its F1 score was consistently lower than that of the classical methods. This discrepancy can be attributed to several factors. Firstly, DexiNed was trained using the BIPED dataset (Barcelona Images for Perceptual Edge Detection), which primarily consists of scenes with well-defined objects. Consequently, the model may struggle with the ambiguities and textured edges present in cultural heritage artworks. Secondly, the evaluation metrics, particularly the F1 score, are sensitive to pixel-level alignment with the ground truth. Since DexiNed tends to produce smoother edges that may not precisely match the annotated contour, it is penalized despite exhibiting high structural similarity, as reflected in its SSIM values. The characteristics of the [PERSON] collection played a central role in shaping the outcomes of this study. The 4 selected artworks were chosen from a larger set of 24 easel paintings available to the conservators of the University of Valencia. Selection criteria included the presence of documented flood-related damage, the availability of high-resolution imaging, and the relevance of the works to ongoing conservation efforts. Additionally, the selected artworks present varying degrees of visual complexity and edge definition, which allow us to test the algorithms under different levels of difficulty from a human perception standpoint. While the sample size is limited, the chosen pieces represent a range of visual styles and technical challenges, from flat, high-contrast compositions to layered, textured surfaces. This diversity provided an initial test for evaluating the algorithms' performance. The integration of preprocessing and post-processing techniques--such as grayscale conversion, histogram equalization, adaptive thresholds, binarization, and skeletonization--proved essential for enhancing edge clarity and reducing noise. These steps were particularly beneficial in artworks with layered or textured surfaces, where raw edges detection often produces excessive noise or missed contours. The use of a \(15\times 15\) tolerance kernel in the evaluation also helped account for minor spatial deviations, offering a realistic assessment of algorithm performance. The runtime analysis highlights a fundamental trade-off between visual accuracy and computational efficiency. Although DexiNed generates edge maps that are more visually coherent and structurally faithful, its high computational demand restricts its use in scenarios where processing speed is crucial. This is especially pertinent in cultural heritage conservation, where technical resources might be limited and rapid decision-making is often necessary, particularly in post-disaster situations. In contrast, classical methods, while less advanced in terms of visual representation, offer faster and more lightweight implementation. This makes them valuable for preliminary documentation tasks or for integration into hybrid workflows, where an initial quick detection process can subsequently be refined with more advanced techniques.