## 1 Introduction  
Rail travel is one of the safest means of transportation [1], and its use has been steadily increasing post-pandemic, already being at levels similar to or higher than those in 2019. In 2023, EU rail passenger transport hit its highest level in years, reaching 429 billion passenger-kilometers, surpassing the pre-pandemic numbers of 2019 for the first time [2]. In the European Union alone, as of 2022, there were 201,922 km of rail tracks [3]. Considering the significant length of rail tracks in Europe, railway intrusion, i.e., when an unexpected object is within the railroad's clearance gauge, is one of the major safety topics. In 2022 alone, in the European Union, there were 43 serious injuries or fatalities caused by collisions, including with obstacles, and 27 caused by derailments, out of a recorded total of 126 rail-related serious injuries or fatalities [4]. If any potential obstacles on the railway can be detected ahead of time, this would contribute to avoiding accidents and preventing deaths, damages, and service disruptions. While advancements in safety technology have been made, effectively detecting and mitigating these hazards remains an ongoing challenge. The search for improved railway safety has spurred extensive research into obstacle detection technologies over the last few decades [5; 6; 7; 8; 9]. In the literature, it is possible to find a wide array of technologies that have been used to address this issue [10; 11; 12; 13], ranging from camera-based to radar. Many such approaches employ data fusion [14; 15; 16], mitigating the limitations of some methods with the upsides of others. Camera-based obstacle detection systems are particularly popular in the automotive sector, being the basis of Tesla's Autopilot obstacle detection algorithms [17]. Although such camera-based systems can be cheaper due to a reduced hardware cost, they are also significantly affected by light conditions and other environmental factors, such as dirt and rain. Radar, on the other hand, is significantly more weather-independent and long-range but presents smaller spatial resolution and, thus, less information in complex environments. LiDAR (Light Detection and Ranging) is another widely used approach for obstacle detection in autonomous vehicles and is a major part of Waymo's algorithms [18]. It creates a 3D representation of the world around the object, which can be leveraged to detect obstacles. However, the amount and type of data make its processing more complex and computationally heavy. Nonetheless, it also has significant advantages over cameras [19; 20] in that it provides a 3D representation of the surroundings while being unaffected by lighting conditions. As all methods have inherent upsides and downsides, they are usually combined with other technologies in data fusion approaches, with any pair of the three mentioned approaches being common [11; 14; 17; 18]. Other sources for fusion data, while also used, are less common. In automotive applications, the sensing devices are almost always included in the vehicle, as it would not be feasible otherwise. On the other hand, in railway applications, due to the fact that trains follow a consistent pre-determined path, it is feasible to monitor only critical regions using fixed sensing devices. Several studies have focused on using LiDAR in a fixed position along the railway, such as at level crossings. In these cases, a LiDAR sensor is usually assembled atop a post to monitor just a limited surrounding area. For example, in [21], a 3D mechanical LiDAR system, fixed near a railway and able to scan an area of 50 m, is presented, and the authors also describe the methods and rail extraction algorithms developed and used for obstacle detection: an SFRE (scanline feature-based rail extraction) algorithm that retains track characteristics is used, combined with Octree downsampling to reduce computational overhead.