A Visual Method of Measuring Railway-Track Weed Infestation Level

1 Department of Electrical Transport, Faculty of Electrical and Control Engineering, Gdańsk University of Technology, ul. G. Narutowicza 11/12, 80-233 Gdańsk, Poland 2 Department of Highway and Transportation Engineering, Faculty of Civil and Environmental Engineering, Gdańsk University of Technology, ul. G. Narutowicza 11/12, 80-233 Gdańsk, Poland; roksana.licow@pg.edu.pl * Correspondence: jacek.skibicki@pg.edu.pl; Tel.: +48-58-347-29-71


Introduction
The growth of railway traffic and the increasing speed of moving trains require regular inspections of the current conditions of the railway infrastructure, as well as planning and conducting relevant maintenance works [1]. An important element in the maintenance of railroads and their vicinity is the elimination of unwanted vegetation [2]. For a wellmaintained railway track, there should be no vegetation in the ballast. This is a very important issue, as the presence of plants in the railway track leads to the degradation of wooden sleepers with organic material, as well as ballast pollution, which makes surface drainage more difficult and damages the condition of the substructure [3,4]. Under these conditions the track is subject to rapid degradation, with the appearance of characteristic deformations, track settling, and the formation of vertical unevenness of the rails. The water collected in the ballast due to incorrect drainage forms a so-called mud slush, the track becomes unstable and the wooden sleepers, if used, are subject to accelerated rotting processes [5,6].
Therefore, all over the world, unwanted vegetation is removed from railway tracks by spraying it with herbicides or other chemicals [7,8]. Unfortunately, their use negatively affects the environment, especially areas situated in the direct vicinity of the track [9]. In most cases, chemical spraying is done periodically, in accordance with a planned cycle. This practice means that the spraying is done even when there is no need for it, from the point of view of the current weed infestation of the track. In turn, in other places, the planned cycle may include insufficiently frequent spraying, which leads to the appearance of plants and, consequently, degradation of the track superstructure. This situation is generally caused by a lack of automated and objective tools to assess the current condition of track superstructure in terms of the presence of unwanted vegetation.
Modern visual measurement methods are becoming more and more frequently used in areas related to the measurement and diagnostics of elements of rolling stock and railway

Method of Measurement
The measurement of track superstructure weed infestation levels using the visual system includes a series of actions. Firstly, an image is taken using a video camera, showing the area of the examined track superstructure. This image should be recorded in colour in one of the standard colour-coding systems, RGB for instance. Then, colour analysis of the image is performed to find areas marked green. The presence of green objects can be interpreted as the evidence of unwanted vegetation, because under normal conditions there are no green elements on the track.
It is noteworthy that the proposed measurement method can only be applied in the plant vegetation period, i.e., between May and October in the temperate zone in the northern hemisphere. The presence of green colour is a qualitative signal of the occurrence of unwanted vegetation. Determining what percentage of the recorded image is marked green, or how many elements in the image are green, gives the quantitative assessment of the track superstructure weed infestation level. The block diagram of the measurement algorithm is shown in Figure 1.

Practical Execution
To verify the assumptions of the proposed method, measurements were taken from selected railway line segments which included fragments with different track superstructure weed infestation levels. The measurements were performed in the areas without veg- At first, the recorded frame was cut so that the image contained only the surface area of the railway track. Then the photo was analysed for the presence of green colour. Since individual species of flora may differ greatly by shades of green, it is advisable to perform colour analysis for a number of basic shades. In practice, it turned out sufficient to repeat this analysis three times: for light, normal, and dark shades of green. The detection of green colour showed that weeds were present on the railway track at the place of measurement. The next step in the analysis was the quantification of weed infestation level based on the number of matches to the pattern. The results of the analysis were directly proportional to the area contaminated with undesirable vegetation. The algorithm was performed cyclically for all recorded images.

Practical Execution
To verify the assumptions of the proposed method, measurements were taken from selected railway line segments which included fragments with different track superstructure weed infestation levels. The measurements were performed in the areas without vegetation and in those where vegetation occurred abundantly. The video camera used for image recording was mounted at the end of the flatcar so that the recorded image covered the entire area of the railway track superstructure. An additional light source was mounted next to the camera to facilitate recording images when the measuring flatcar passed through lower visibility areas, tunnels for instance. A view of the flatcar with the mounted equipment is shown in Figure 2.

Practical Execution
To verify the assumptions of the proposed method, measurements were taken from selected railway line segments which included fragments with different track superstructure weed infestation levels. The measurements were performed in the areas without vegetation and in those where vegetation occurred abundantly. The video camera used for image recording was mounted at the end of the flatcar so that the recorded image covered the entire area of the railway track superstructure. An additional light source was mounted next to the camera to facilitate recording images when the measuring flatcar passed through lower visibility areas, tunnels for instance. A view of the flatcar with the mounted equipment is shown in Figure 2.  Weed is rare in tunnels, so the main purpose of using an additional light source was not to illuminate these places for measurement purposes. Additional lighting reduces the effect of camera glare when leaving a darkened area. Because the camera applies automatic selection of exposure parameters, thanks to the additional lighting less time was needed to automatically adjust the recording parameters to meet the changing lighting conditions. It also influenced the possibility of correct level of weed infestation measurement, making such measurement possible immediately after leaving a tunnel, for example. The effect of reducing camera glare is shown in Figure 3. Figure 3 shows the sequence of 96 frames (approx. 2.5 s) recorded while leaving a viaduct under full sunlight. With the use of additional lighting, camera blindness lasted only about 0.3 s (15 frames), so short that it was not a problem for the railway track weed infestation level measuring procedure. not to illuminate these places for measurement purposes. Additional lighting reduces the effect of camera glare when leaving a darkened area. Because the camera applies automatic selection of exposure parameters, thanks to the additional lighting less time was needed to automatically adjust the recording parameters to meet the changing lighting conditions. It also influenced the possibility of correct level of weed infestation measurement, making such measurement possible immediately after leaving a tunnel, for example. The effect of reducing camera glare is shown in Figure 3.  Figure 3 shows the sequence of 96 frames (approx. 2.5 s) recorded while leaving a viaduct under full sunlight. With the use of additional lighting, camera blindness lasted only about 0.3 s (15 frames), so short that it was not a problem for the railway track weed infestation level measuring procedure.
The measurements were performed using the Basler camera type acA1440-220uc with lens, the focal length of which was selected such that the camera's view angle covered the entire track superstructure. The recording speed of the camera was 40 frames per second, which enabled recording of the examined railway line segment over its whole length. Individual images recorded in the above way were then analysed using the LabVIEW platform. The built-in colour image analysis algorithms were used to find fragments which coincided in colour with the selected standard. Three colour standards were used, having the form of images of 8 × 8 pixels in dimension, which corresponded to three shades of green occurring in the vegetation cover. Colour standards were obtained by The measurements were performed using the Basler camera type acA1440-220uc with lens, the focal length of which was selected such that the camera's view angle covered the entire track superstructure. The recording speed of the camera was 40 frames per second, which enabled recording of the examined railway line segment over its whole length. Individual images recorded in the above way were then analysed using the LabVIEW platform. The built-in colour image analysis algorithms were used to find fragments which coincided in colour with the selected standard. Three colour standards were used, having the form of images of 8 × 8 pixels in dimension, which corresponded to three shades of green occurring in the vegetation cover. Colour standards were obtained by cutting out the appropriate fragments from selected image frames. The patterns corresponded to the actual shades of green in the image. Before the analysis, each recorded frame was cut to size to remove redundant fragments situated beyond the track superstructure area. Successive stages of the image analysis are shown in Table 1.
As shown in Table 1, the method was successful in detecting unwanted vegetation in the area of the railway track superstructure. The infested areas were detected, and the number of matches indicates the weed infestation intensity in the track superstructure area. cutting out the appropriate fragments from selected image frames. The patterns corresponded to the actual shades of green in the image. Before the analysis, each recorded frame was cut to size to remove redundant fragments situated beyond the track superstructure area. Successive stages of the image analysis are shown in Table 1. As shown in Table 1, the method was successful in detecting unwanted vegetation in the area of the railway track superstructure. The infested areas were detected, and the number of matches indicates the weed infestation intensity in the track superstructure area.

Results of Measurements
The measurements designed to verify the railway track superstructure weed infestation level assessment method were taken on a length of railway line which included sections with different degradation levels. The condition of the analysed sections varied from Source image II Metrology 2022, 2, FOR PEER REVIEW 5 cutting out the appropriate fragments from selected image frames. The patterns corresponded to the actual shades of green in the image. Before the analysis, each recorded frame was cut to size to remove redundant fragments situated beyond the track superstructure area. Successive stages of the image analysis are shown in Table 1. As shown in Table 1, the method was successful in detecting unwanted vegetation in the area of the railway track superstructure. The infested areas were detected, and the number of matches indicates the weed infestation intensity in the track superstructure area.

Results of Measurements
The measurements designed to verify the railway track superstructure weed infestation level assessment method were taken on a length of railway line which included sections with different degradation levels. The condition of the analysed sections varied from Image cut to size III Metrology 2022, 2, FOR PEER REVIEW 5 cutting out the appropriate fragments from selected image frames. The patterns corresponded to the actual shades of green in the image. Before the analysis, each recorded frame was cut to size to remove redundant fragments situated beyond the track superstructure area. Successive stages of the image analysis are shown in Table 1. As shown in Table 1, the method was successful in detecting unwanted vegetation in the area of the railway track superstructure. The infested areas were detected, and the number of matches indicates the weed infestation intensity in the track superstructure area.

Results of Measurements
The measurements designed to verify the railway track superstructure weed infestation level assessment method were taken on a length of railway line which included sections with different degradation levels. The condition of the analysed sections varied from Comparing with standard of green Metrology 2022, 2, FOR PEER REVIEW 5 cutting out the appropriate fragments from selected image frames. The patterns corresponded to the actual shades of green in the image. Before the analysis, each recorded frame was cut to size to remove redundant fragments situated beyond the track superstructure area. Successive stages of the image analysis are shown in Table 1. As shown in Table 1, the method was successful in detecting unwanted vegetation in the area of the railway track superstructure. The infested areas were detected, and the number of matches indicates the weed infestation intensity in the track superstructure area.

Results of Measurements
The measurements designed to verify the railway track superstructure weed infestation level assessment method were taken on a length of railway line which included sections with different degradation levels. The condition of the analysed sections varied from 129 matches IV Metrology 2022, 2, FOR PEER REVIEW 5 cutting out the appropriate fragments from selected image frames. The patterns corresponded to the actual shades of green in the image. Before the analysis, each recorded frame was cut to size to remove redundant fragments situated beyond the track superstructure area. Successive stages of the image analysis are shown in Table 1. As shown in Table 1, the method was successful in detecting unwanted vegetation in the area of the railway track superstructure. The infested areas were detected, and the number of matches indicates the weed infestation intensity in the track superstructure area.

Results of Measurements
The measurements designed to verify the railway track superstructure weed infestation level assessment method were taken on a length of railway line which included sections with different degradation levels. The condition of the analysed sections varied from Comparing with standard of light green Metrology 2022, 2, FOR PEER REVIEW 5 cutting out the appropriate fragments from selected image frames. The patterns corresponded to the actual shades of green in the image. Before the analysis, each recorded frame was cut to size to remove redundant fragments situated beyond the track superstructure area. Successive stages of the image analysis are shown in Table 1. As shown in Table 1, the method was successful in detecting unwanted vegetation in the area of the railway track superstructure. The infested areas were detected, and the number of matches indicates the weed infestation intensity in the track superstructure area.

Results of Measurements
The measurements designed to verify the railway track superstructure weed infestation level assessment method were taken on a length of railway line which included sections with different degradation levels. The condition of the analysed sections varied from 39 matches V Metrology 2022, 2, FOR PEER REVIEW 5 cutting out the appropriate fragments from selected image frames. The patterns corresponded to the actual shades of green in the image. Before the analysis, each recorded frame was cut to size to remove redundant fragments situated beyond the track superstructure area. Successive stages of the image analysis are shown in Table 1. As shown in Table 1, the method was successful in detecting unwanted vegetation in the area of the railway track superstructure. The infested areas were detected, and the number of matches indicates the weed infestation intensity in the track superstructure area.

Results of Measurements
The measurements designed to verify the railway track superstructure weed infestation level assessment method were taken on a length of railway line which included sections with different degradation levels. The condition of the analysed sections varied from Comparing with standard of dark green Metrology 2022, 2, FOR PEER REVIEW 5 cutting out the appropriate fragments from selected image frames. The patterns corresponded to the actual shades of green in the image. Before the analysis, each recorded frame was cut to size to remove redundant fragments situated beyond the track superstructure area. Successive stages of the image analysis are shown in Table 1. As shown in Table 1, the method was successful in detecting unwanted vegetation in the area of the railway track superstructure. The infested areas were detected, and the number of matches indicates the weed infestation intensity in the track superstructure area.

Results of Measurements
The measurements designed to verify the railway track superstructure weed infestation level assessment method were taken on a length of railway line which included sections with different degradation levels. The condition of the analysed sections varied from 86 matches VI Metrology 2022, 2, FOR PEER REVIEW 5 cutting out the appropriate fragments from selected image frames. The patterns corresponded to the actual shades of green in the image. Before the analysis, each recorded frame was cut to size to remove redundant fragments situated beyond the track superstructure area. Successive stages of the image analysis are shown in Table 1. As shown in Table 1, the method was successful in detecting unwanted vegetation in the area of the railway track superstructure. The infested areas were detected, and the number of matches indicates the weed infestation intensity in the track superstructure area.

Results of Measurements
The measurements designed to verify the railway track superstructure weed infestation level assessment method were taken on a length of railway line which included sections with different degradation levels. The condition of the analysed sections varied from 254 matches in total. The result of the measurement testifies to track superstructure infestation with unwanted vegetation.

Results of Measurements
The measurements designed to verify the railway track superstructure weed infestation level assessment method were taken on a length of railway line which included sections with different degradation levels. The condition of the analysed sections varied from very good to heavily degraded. The analysis of the obtained results included the assessment of such elements as system sensitivity, reliability of detection, and sensitivity to external agents including light dimming, change of light incidence angle, etc. Selected results of measurements for different track superstructure maintenance states and varying values of remaining parameters are collated in Tables 2-5. very good to heavily degraded. The analysis of the obtained results included the assessment of such elements as system sensitivity, reliability of detection, and sensitivity to external agents including light dimming, change of light incidence angle, etc. Selected results of measurements for different track superstructure maintenance states and varying values of remaining parameters are collated in Tables 2-5.

2
The presented images show that for well-maintained track with no unwanted vegetation, as a rule, matches with colour standards number from several to more than ten, regardless of the direction of illumination. These false signals were recorded in shaded areas which could be seen as green shaded under some conditions of external illumination. The presented cases also show that the type of superstructure and sleepers do not affect the operation of the detection system.  Table 3. Selected measurement results for the occurrence of single small plants.

4
The presented case shows an area with little vegetation, very dried-up and almost deprived of leaves. Additionally, the light incidence angle caused fading of the green colour. The number of matches (level of measuring signal) did not allow for correct detection of vegetation occurrence.

4
The next photo shows a small plant with blue flowers. The leaves of this plant were detected. However, they are too small for the signal level to allow unmistakable detection of the presence of this plant. The presented images show that for well-maintained track with no unwanted vegetation, as a rule, matches with colour standards number from several to more than ten, regardless of the direction of illumination. These false signals were recorded in shaded areas which could be seen as green shaded under some conditions of external illumination. The presented cases also show that the type of superstructure and sleepers do not affect the operation of the detection system. very good to heavily degraded. The analysis of the obtained results included the assessment of such elements as system sensitivity, reliability of detection, and sensitivity to external agents including light dimming, change of light incidence angle, etc. Selected results of measurements for different track superstructure maintenance states and varying values of remaining parameters are collated in Tables 2-5.

2
The presented images show that for well-maintained track with no unwanted vegetation, as a rule, matches with colour standards number from several to more than ten, regardless of the direction of illumination. These false signals were recorded in shaded areas which could be seen as green shaded under some conditions of external illumination. The presented cases also show that the type of superstructure and sleepers do not affect the operation of the detection system.  Table 3. Selected measurement results for the occurrence of single small plants.

4
The presented case shows an area with little vegetation, very dried-up and almost deprived of leaves. Additionally, the light incidence angle caused fading of the green colour. The number of matches (level of measuring signal) did not allow for correct detection of vegetation occurrence.

4
The next photo shows a small plant with blue flowers. The leaves of this plant were detected. However, they are too small for the signal level to allow unmistakable detection of the presence of this plant. very good to heavily degraded. The analysis of the obtained results included the assessment of such elements as system sensitivity, reliability of detection, and sensitivity to external agents including light dimming, change of light incidence angle, etc. Selected results of measurements for different track superstructure maintenance states and varying values of remaining parameters are collated in Tables 2-5.

2
The presented images show that for well-maintained track with no unwanted vegetation, as a rule, matches with colour standards number from several to more than ten, regardless of the direction of illumination. These false signals were recorded in shaded areas which could be seen as green shaded under some conditions of external illumination. The presented cases also show that the type of superstructure and sleepers do not affect the operation of the detection system.  Table 3. Selected measurement results for the occurrence of single small plants.

4
The presented case shows an area with little vegetation, very dried-up and almost deprived of leaves. Additionally, the light incidence angle caused fading of the green colour. The number of matches (level of measuring signal) did not allow for correct detection of vegetation occurrence.

4
The next photo shows a small plant with blue flowers. The leaves of this plant were detected. However, they are too small for the signal level to allow unmistakable detection of the presence of this plant.

12
Metrology 2022, 2, FOR PEER REVIEW 6 very good to heavily degraded. The analysis of the obtained results included the assessment of such elements as system sensitivity, reliability of detection, and sensitivity to external agents including light dimming, change of light incidence angle, etc. Selected results of measurements for different track superstructure maintenance states and varying values of remaining parameters are collated in Tables 2-5.

2
The presented images show that for well-maintained track with no unwanted vegetation, as a rule, matches with colour standards number from several to more than ten, regardless of the direction of illumination. These false signals were recorded in shaded areas which could be seen as green shaded under some conditions of external illumination. The presented cases also show that the type of superstructure and sleepers do not affect the operation of the detection system.  Table 3. Selected measurement results for the occurrence of single small plants.

4
The presented case shows an area with little vegetation, very dried-up and almost deprived of leaves. Additionally, the light incidence angle caused fading of the green colour. The number of matches (level of measuring signal) did not allow for correct detection of vegetation occurrence.

4
The next photo shows a small plant with blue flowers. The leaves of this plant were detected. However, they are too small for the signal level to allow unmistakable detection of the presence of this plant. very good to heavily degraded. The analysis of the obtained results included the assessment of such elements as system sensitivity, reliability of detection, and sensitivity to external agents including light dimming, change of light incidence angle, etc. Selected results of measurements for different track superstructure maintenance states and varying values of remaining parameters are collated in Tables 2-5.

2
The presented images show that for well-maintained track with no unwanted vegetation, as a rule, matches with colour standards number from several to more than ten, regardless of the direction of illumination. These false signals were recorded in shaded areas which could be seen as green shaded under some conditions of external illumination. The presented cases also show that the type of superstructure and sleepers do not affect the operation of the detection system.  Table 3. Selected measurement results for the occurrence of single small plants.

4
The presented case shows an area with little vegetation, very dried-up and almost deprived of leaves. Additionally, the light incidence angle caused fading of the green colour. The number of matches (level of measuring signal) did not allow for correct detection of vegetation occurrence.

4
The next photo shows a small plant with blue flowers. The leaves of this plant were detected. However, they are too small for the signal level to allow unmistakable detection of the presence of this plant. very good to heavily degraded. The analysis of the obtained results included the assessment of such elements as system sensitivity, reliability of detection, and sensitivity to external agents including light dimming, change of light incidence angle, etc. Selected results of measurements for different track superstructure maintenance states and varying values of remaining parameters are collated in Tables 2-5.

2
The presented images show that for well-maintained track with no unwanted vegetation, as a rule, matches with colour standards number from several to more than ten, regardless of the direction of illumination. These false signals were recorded in shaded areas which could be seen as green shaded under some conditions of external illumination. The presented cases also show that the type of superstructure and sleepers do not affect the operation of the detection system.  Table 3. Selected measurement results for the occurrence of single small plants.

4
The presented case shows an area with little vegetation, very dried-up and almost deprived of leaves. Additionally, the light incidence angle caused fading of the green colour. The number of matches (level of measuring signal) did not allow for correct detection of vegetation occurrence.

4
The next photo shows a small plant with blue flowers. The leaves of this plant were detected. However, they are too small for the signal level to allow unmistakable detection of the presence of this plant.
2 Table 3. Selected measurement results for the occurrence of single small plants.

No. of Matches w [-] Comment
Metrology 2022, 2, FOR PEER REVIEW 6 very good to heavily degraded. The analysis of the obtained results included the assessment of such elements as system sensitivity, reliability of detection, and sensitivity to external agents including light dimming, change of light incidence angle, etc. Selected results of measurements for different track superstructure maintenance states and varying values of remaining parameters are collated in Tables 2-5.

2
The presented images show that for well-maintained track with no unwanted vegetation, as a rule, matches with colour standards number from several to more than ten, regardless of the direction of illumination. These false signals were recorded in shaded areas which could be seen as green shaded under some conditions of external illumination. The presented cases also show that the type of superstructure and sleepers do not affect the operation of the detection system.  Table 3. Selected measurement results for the occurrence of single small plants.

4
The presented case shows an area with little vegetation, very dried-up and almost deprived of leaves. Additionally, the light incidence angle caused fading of the green colour. The number of matches (level of measuring signal) did not allow for correct detection of vegetation occurrence.

4
The next photo shows a small plant with blue flowers. The leaves of this plant were detected. However, they are too small for the signal level to allow unmistakable detection of the presence of this plant. The presented case shows an area with little vegetation, very dried-up and almost deprived of leaves. Additionally, the light incidence angle caused fading of the green colour. The number of matches (level of measuring signal) did not allow for correct detection of vegetation occurrence.
Metrology 2022, 2, FOR PEER REVIEW 6 very good to heavily degraded. The analysis of the obtained results included the assessment of such elements as system sensitivity, reliability of detection, and sensitivity to external agents including light dimming, change of light incidence angle, etc. Selected results of measurements for different track superstructure maintenance states and varying values of remaining parameters are collated in Tables 2-5.

2
The presented images show that for well-maintained track with no unwanted vegetation, as a rule, matches with colour standards number from several to more than ten, regardless of the direction of illumination. These false signals were recorded in shaded areas which could be seen as green shaded under some conditions of external illumination. The presented cases also show that the type of superstructure and sleepers do not affect the operation of the detection system.  Table 3. Selected measurement results for the occurrence of single small plants.

4
The presented case shows an area with little vegetation, very dried-up and almost deprived of leaves. Additionally, the light incidence angle caused fading of the green colour. The number of matches (level of measuring signal) did not allow for correct detection of vegetation occurrence.

4
The next photo shows a small plant with blue flowers. The leaves of this plant were detected. However, they are too small for the signal level to allow unmistakable detection of the presence of this plant.

Image No. of Matches w [-] Comment
Metrology 2022, 2, FOR PEER REVIEW 7 5 Similar situation as in the previous image. The plant has leaves too small for the detection signal level to be high enough to detect it.

34
The occurrence of small vegetation dispersed over a large area generated a slightly higher level of the measurement signal, which differs considerably from the values characteristic of track free from vegetation. This allowed for unmistakable detection of the occurrence of track superstructure weed infestation.

27
These two last examples show occurrence of single larger-dimension plants. In these cases, their detection did not present a problem, and the signal level allowed for unmistakable detection of the presence of unwanted vegetation. 47 Table 4. Selected measurement results for the occurrence of vegetation cover with moderate intensity.

87
The occurrence of unwanted vegetation at moderate intensity generated a clearly higher measurement signal than that for the wellmaintained track. The light incidence angle and the resulting contrast of the image affected neither the system operation nor the certainty of detection. Similar situation as in the previous image. The plant has leaves too small for the detection signal level to be high enough to detect it.

34
The occurrence of small vegetation dispersed over a large area generated a slightly higher level of the measurement signal, which differs considerably from the values characteristic of track free from vegetation. This allowed for unmistakable detection of the occurrence of track superstructure weed infestation.

27
These two last examples show occurrence of single larger-dimension plants. In these cases, their detection did not present a problem, and the signal level allowed for unmistakable detection of the presence of unwanted vegetation. 47 Table 4. Selected measurement results for the occurrence of vegetation cover with moderate intensity.

87
The occurrence of unwanted vegetation at moderate intensity generated a clearly higher measurement signal than that for the wellmaintained track. The light incidence angle and the resulting contrast of the image affected neither the system operation nor the certainty of detection. The occurrence of small vegetation dispersed over a large area generated a slightly higher level of the measurement signal, which differs considerably from the values characteristic of track free from vegetation. This allowed for unmistakable detection of the occurrence of track superstructure weed infestation.
Metrology 2022, 2, FOR PEER REVIEW 7 5 Similar situation as in the previous image. The plant has leaves too small for the detection signal level to be high enough to detect it.

34
The occurrence of small vegetation dispersed over a large area generated a slightly higher level of the measurement signal, which differs considerably from the values characteristic of track free from vegetation. This allowed for unmistakable detection of the occurrence of track superstructure weed infestation.

27
These two last examples show occurrence of single larger-dimension plants. In these cases, their detection did not present a problem, and the signal level allowed for unmistakable detection of the presence of unwanted vegetation. 47 Table 4. Selected measurement results for the occurrence of vegetation cover with moderate intensity.

87
The occurrence of unwanted vegetation at moderate intensity generated a clearly higher measurement signal than that for the wellmaintained track. The light incidence angle and the resulting contrast of the image affected neither the system operation nor the certainty of detection. Similar situation as in the previous image. The plant has leaves too small for the detection signal level to be high enough to detect it.

34
The occurrence of small vegetation dispersed over a large area generated a slightly higher level of the measurement signal, which differs considerably from the values characteristic of track free from vegetation. This allowed for unmistakable detection of the occurrence of track superstructure weed infestation.

27
These two last examples show occurrence of single larger-dimension plants. In these cases, their detection did not present a problem, and the signal level allowed for unmistakable detection of the presence of unwanted vegetation. 47 Table 4. Selected measurement results for the occurrence of vegetation cover with moderate intensity.

87
The occurrence of unwanted vegetation at moderate intensity generated a clearly higher measurement signal than that for the wellmaintained track. The light incidence angle and the resulting contrast of the image affected neither the system operation nor the certainty of detection.  Table 4. Selected measurement results for the occurrence of vegetation cover with moderate intensity.

No. of Matches w [-] Comment
Metrology 2022, 2, FOR PEER REVIEW 7 5 Similar situation as in the previous image. The plant has leaves too small for the detection signal level to be high enough to detect it.

34
The occurrence of small vegetation dispersed over a large area generated a slightly higher level of the measurement signal, which differs considerably from the values characteristic of track free from vegetation. This allowed for unmistakable detection of the occurrence of track superstructure weed infestation.

27
These two last examples show occurrence of single larger-dimension plants. In these cases, their detection did not present a problem, and the signal level allowed for unmistakable detection of the presence of unwanted vegetation. 47 Table 4. Selected measurement results for the occurrence of vegetation cover with moderate intensity.

87
The occurrence of unwanted vegetation at moderate intensity generated a clearly higher measurement signal than that for the wellmaintained track. The light incidence angle and the resulting contrast of the image affected neither the system operation nor the certainty of detection. The occurrence of unwanted vegetation at moderate intensity generated a clearly higher measurement signal than that for the well-maintained track. The light incidence angle and the resulting contrast of the image affected neither the system operation nor the certainty of detection.
Metrology 2022, 2, FOR PEER REVIEW 7 5 Similar situation as in the previous image. The plant has leaves too small for the detection signal level to be high enough to detect it.

34
The occurrence of small vegetation dispersed over a large area generated a slightly higher level of the measurement signal, which differs considerably from the values characteristic of track free from vegetation. This allowed for unmistakable detection of the occurrence of track superstructure weed infestation.

27
These two last examples show occurrence of single larger-dimension plants. In these cases, their detection did not present a problem, and the signal level allowed for unmistakable detection of the presence of unwanted vegetation. 47 Table 4. Selected measurement results for the occurrence of vegetation cover with moderate intensity.

87
The occurrence of unwanted vegetation at moderate intensity generated a clearly higher measurement signal than that for the wellmaintained track. The light incidence angle and the resulting contrast of the image affected neither the system operation nor the certainty of detection. Similar situation as in the previous image. The plant has leaves too small for the detection signal level to be high enough to detect it.

34
The occurrence of small vegetation dispersed over a large area generated a slightly higher level of the measurement signal, which differs considerably from the values characteristic of track free from vegetation. This allowed for unmistakable detection of the occurrence of track superstructure weed infestation.

27
These two last examples show occurrence of single larger-dimension plants. In these cases, their detection did not present a problem, and the signal level allowed for unmistakable detection of the presence of unwanted vegetation. 47 Table 4. Selected measurement results for the occurrence of vegetation cover with moderate intensity.

87
The occurrence of unwanted vegetation at moderate intensity generated a clearly higher measurement signal than that for the wellmaintained track. The light incidence angle and the resulting contrast of the image affected neither the system operation nor the certainty of detection. Similar situation as in the previous image. The plant has leaves too small for the detection signal level to be high enough to detect it.

34
The occurrence of small vegetation dispersed over a large area generated a slightly higher level of the measurement signal, which differs considerably from the values characteristic of track free from vegetation. This allowed for unmistakable detection of the occurrence of track superstructure weed infestation.

27
These two last examples show occurrence of single larger-dimension plants. In these cases, their detection did not present a problem, and the signal level allowed for unmistakable detection of the presence of unwanted vegetation. 47 Table 4. Selected measurement results for the occurrence of vegetation cover with moderate intensity.

87
The occurrence of unwanted vegetation at moderate intensity generated a clearly higher measurement signal than that for the wellmaintained track. The light incidence angle and the resulting contrast of the image affected neither the system operation nor the certainty of detection.

660
Heavy weed infestation of track superstructure resulted in very high values of the measurement signal, on average two orders of magnitude higher than those for track without vegetation. As with the remaining cases, the correctness of system operation did not depend on the sunlight incidence angle.   Table 5. Selected measurement results for extremely infested track superstructure.

No. of Matches w [-] Comment
Metrology 2022, 2, FOR PEER REVIEW 8 225 Table 5. Selected measurement results for extremely infested track superstructure.

660
Heavy weed infestation of track superstructure resulted in very high values of the measurement signal, on average two orders of magnitude higher than those for track without vegetation. As with the remaining cases, the correctness of system operation did not depend on the sunlight incidence angle.  Heavy weed infestation of track superstructure resulted in very high values of the measurement signal, on average two orders of magnitude higher than those for track without vegetation. As with the remaining cases, the correctness of system operation did not depend on the sunlight incidence angle.

660
Heavy weed infestation of track superstructure resulted in very high values of the measurement signal, on average two orders of magnitude higher than those for track without vegetation. As with the remaining cases, the correctness of system operation did not depend on the sunlight incidence angle.   Table 5. Selected measurement results for extremely infested track superstructure.

660
Heavy weed infestation of track superstructure resulted in very high values of the measurement signal, on average two orders of magnitude higher than those for track without vegetation. As with the remaining cases, the correctness of system operation did not depend on the sunlight incidence angle.

660
Heavy weed infestation of track superstructure resulted in very high values of the measurement signal, on average two orders of magnitude higher than those for track without vegetation. As with the remaining cases, the correctness of system operation did not depend on the sunlight incidence angle. The measurement results obtained from individual images provide an opportunity to assess infested areas on which unwanted vegetation occurs. Selected results of this assessment are shown in Figures 4 and 5.

660
Heavy weed infestation of track superstructure resulted in very high values of the measurement signal, on average two orders of magnitude higher than those for track without vegetation. As with the remaining cases, the correctness of system operation did not depend on the sunlight incidence angle.

660
Heavy weed infestation of track superstructure resulted in very high values of the measurement signal, on average two orders of magnitude higher than those for track without vegetation. As with the remaining cases, the correctness of system operation did not depend on the sunlight incidence angle. The measurement results obtained from individual images provide an opportunity to assess infested areas on which unwanted vegetation occurs. Selected results of this assessment are shown in Figures 4 and 5. Case 1, shown in Figure 4, illustrates the measurements taken when passing from a well-maintained section of railway to one with considerable weed infestation. When the measuring flatcar moved through the section without unwanted vegetation, the measurement signal w revealed minor oscillations about zero. After entering the infested section, the signal w increased to an average value of about 500, which testifies to a high level of railway track weed infestation.
Case 2, shown in Figure 5, represents a short railway track fragment characterised by moderate maintenance levels and the occurrence of isolated spots of high weed infestation. The signal w changed value from 20-30 up to as much as 700 in the most infested places.

Conclusions
The results in Tables 2-5 and in Figures 4 and 5 testify to the correctness of operation of the railway-track weed infestation level detection system in the majority of cases. Vegetation with moderate or high intensities of occurrence was detected unmistakably in all cases. Some problems appeared when detecting single small plants, because in these cases the generated measurement signal was not strong enough to be unmistakably distinguished from the measurement noise observed in the absence of vegetation. This problem cannot be solved simply by increasing the detection sensitivity, as in this case the noise level also increased, which resulted in an increasing number of false matches characteristic of well-maintained track. The planned further research will include an attempt to solve this problem by using a higher-resolution camera. The image assessment algorithms require images with minimal dimensions of 8 × 8 pixels. The use of a higher-resolution camera is expected to provide opportunities for detecting smaller objects (plants) than those Case 1, shown in Figure 4, illustrates the measurements taken when passing from a well-maintained section of railway to one with considerable weed infestation. When the measuring flatcar moved through the section without unwanted vegetation, the measurement signal w revealed minor oscillations about zero. After entering the infested section, the signal w increased to an average value of about 500, which testifies to a high level of railway track weed infestation.
Case 2, shown in Figure 5, represents a short railway track fragment characterised by moderate maintenance levels and the occurrence of isolated spots of high weed infestation. The signal w changed value from 20-30 up to as much as 700 in the most infested places.

Conclusions
The results in Tables 2-5 and in Figures 4 and 5 testify to the correctness of operation of the railway-track weed infestation level detection system in the majority of cases. Vegetation with moderate or high intensities of occurrence was detected unmistakably in all cases. Some problems appeared when detecting single small plants, because in these cases the generated measurement signal was not strong enough to be unmistakably distinguished from the measurement noise observed in the absence of vegetation. This problem cannot be solved simply by increasing the detection sensitivity, as in this case the noise level also increased, which resulted in an increasing number of false matches characteristic of well-maintained track. The planned further research will include an attempt to solve this problem by using a higher-resolution camera. The image assessment algorithms require images with minimal dimensions of 8 × 8 pixels. The use of a higher-resolution camera is expected to provide opportunities for detecting smaller objects (plants) than those Case 1, shown in Figure 4, illustrates the measurements taken when passing from a well-maintained section of railway to one with considerable weed infestation. When the measuring flatcar moved through the section without unwanted vegetation, the measurement signal w revealed minor oscillations about zero. After entering the infested section, the signal w increased to an average value of about 500, which testifies to a high level of railway track weed infestation.
Case 2, shown in Figure 5, represents a short railway track fragment characterised by moderate maintenance levels and the occurrence of isolated spots of high weed infestation. The signal w changed value from 20-30 up to as much as 700 in the most infested places.

Conclusions
The results in Tables 2-5 and in Figures 4 and 5 testify to the correctness of operation of the railway-track weed infestation level detection system in the majority of cases. Vegetation with moderate or high intensities of occurrence was detected unmistakably in all cases. Some problems appeared when detecting single small plants, because in these cases the generated measurement signal was not strong enough to be unmistakably distinguished from the measurement noise observed in the absence of vegetation. This problem cannot be solved simply by increasing the detection sensitivity, as in this case the noise level also increased, which resulted in an increasing number of false matches characteristic of well-maintained track. The planned further research will include an attempt to solve this problem by using a higher-resolution camera. The image assessment algorithms require images with minimal dimensions of 8 × 8 pixels. The use of a higher-resolution camera is expected to provide opportunities for detecting smaller objects (plants) than those presently detecable. Another planned task consists in linking the results of the weed infestation level analysis with the absolute position of the measuring flatcar, to provide an opportunity for precise detection of places in which unwanted vegetation occurs.
Despite the abovementioned minor drawback, the presented results confirm high usability of the system for assessing railway-track weed infestation level. The results shown in Figure 5, especially, reveal the system's great potential for assessing places of unwanted vegetation occurrence in both qualitative and quantitative terms. Based on the level of signal w, the intensity of required sprayings can be assessed for a given area, which will enable control of the emission of harmful substances into the environment, decreasing application levels to the minimum required to remove unwanted vegetation from the railway track superstructure.

Data Availability Statement:
The obtained measurement data is confidential and therefore is not on a publicly accessible server.