Railway track image abnormal region segmentation system combined with fractal dimension feature extraction
By combining the fractal dimension feature extraction system, the problem of noise interference and feature extraction in the recognition of abnormal areas of track image is solved, and high-precision segmentation of abnormal areas of track image is achieved, which significantly improves detection efficiency and accuracy.
Patent Information
- Application Number
- CN202510639855.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-19
- Publication Date
- 2025-06-20
- Estimated Expiration
- 2045-05-19
AI Technical Summary
The prior art has problems such as noise interference, single feature extraction and insufficient segmentation coherence in the identification of track image abnormal areas, resulting in false detection and missed detection.
A railway track image abnormal area segmentation system is adopted that combines fractal dimension feature extraction, which includes a preprocessing unit, a multi-scale fractal feature processing unit, an abnormal area processing unit and a segmentation unit. High-precision segmentation of orbital image abnormal areas is achieved through iterative smooth denoising, multi-scale fractal dimension calculation, nonlinear fusion, spectral clustering methods and morphological operations.
It effectively solves the problem of noise interference and single feature extraction, improves the identification accuracy and segmentation coherence of abnormal areas, significantly reduces the false detection and missed detection rates, and improves detection efficiency and accuracy.
Smart Images

Figure CN120182308A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of image analysis, and particularly relates to a railway track image abnormal area segmentation system combined with fractal dimension feature extraction. Background Art
[0002] With the rapid development of the railway transportation industry, the issues of track safety and stability have received increasing attention. As a key infrastructure for train operation, railway tracks, abnormal phenomena such as cracks, wear, and debris accumulation on their surfaces may pose a direct threat to the safety of train operation. Therefore, how to quickly and accurately identify the abnormal areas on the track surface and conduct quantitative analysis and segmentation of them has become an important technical issue in the field of track maintenance. Traditional track inspection methods usually rely on manual inspection or low-automation equipment, which are inefficient and easily affected by subjective factors, and are difficult to meet the requirements of modern railway transportation for high-efficiency and accurate detection.
[0003] In recent years, track abnormal detection methods based on image processing technology have gradually become a research hotspot. These methods collect track images and automatically identify the abnormal areas of the track by combining image processing algorithms, which have advantages such as non-contact, high efficiency, easy data storage, and repeated analysis compared with traditional methods. However, the currently disclosed related technologies still have certain limitations, mainly concentrated in the following aspects: First, track images are usually collected in complex actual scenarios, and factors such as environmental illumination, track surface pollution, and dust coverage will cause significant interference to the image quality, resulting in more noise. This noise often has certain similarities with the characteristics of track abnormal areas. For example, surface texture noise may overlap with the texture characteristics of track cracks, resulting in a significant increase in the false detection rate of abnormal areas. In existing technologies, simple smoothing or denoising algorithms are often used to process image noise, such as Gaussian filtering, median filtering, etc. Although these methods can eliminate noise to a certain extent, they will inevitably weaken the boundary characteristics of track abnormal areas, causing the problem of missed detection of abnormal areas. Second, some current segmentation methods have deficiencies in multi-scale feature analysis of abnormal areas. The abnormal areas of railway tracks are diverse, and their spatial characteristics can cover various types from fine cracks to large-area erosion. In traditional methods, a single scale is often used for feature extraction and analysis. For example, image gradient analysis or texture feature extraction methods based on fixed windows are difficult to simultaneously meet the detection requirements of fine cracks and large-scale erosion. This single-scale feature extraction method is unable to handle complex track abnormalities effectively, resulting in incomplete recognition of some abnormal areas. Summary of the Invention
[0004] In view of this, the main object of the present invention is to provide a railway track image abnormal area segmentation system combined with fractal dimension feature extraction, which realizes high-precision segmentation of abnormal areas in track images. The present invention effectively solves the problems of false detection and missed detection caused by noise interference, single feature extraction, insufficient segmentation coherence, etc. in the prior art, and has strong robustness and adaptability. Through the present invention, abnormal areas such as track cracks, erosion, and debris can be efficiently identified, providing accurate and reliable technical support for the safety monitoring and maintenance of railway tracks, and significantly improving the detection efficiency and detection accuracy.
[0005] The technical solution adopted by the present invention is as follows: A railway track image abnormal area segmentation system combined with fractal dimension feature extraction, the system includes: a preprocessing unit, a multi-scale fractal feature processing unit, an abnormal area processing unit, and a segmentation unit; the preprocessing unit is used to receive the original railway track image, iteratively smooth it at multiple scales using partial differential equations, suppress noise and retain the main structure, and output the denoising result; the multi-scale fractal feature processing unit is used to calculate the local fractal dimension at multiple different window scales based on the denoising result, perform non-linear fusion on the local fractal dimensions of different window scales, and suppress noise points through the Laplace regularization method to obtain the fused fractal dimension, and form a feature vector by combining the fused fractal dimension and the gradient of the denoising result; the abnormal area processing unit is used to, based on the feature vector, use the spectral clustering method to cluster pixels into several categories, judge one or several categories as candidate abnormal areas according to the threshold, perform morphological operations of dilation and erosion on the candidate abnormal areas to remove isolated noise or fill gaps, and then perform connected domain screening to obtain the processed candidate abnormal areas; the segmentation unit is used to perform an intersection operation on the processed candidate abnormal areas and the track mask to obtain the track abnormal areas.
[0006] Further, let represent the original railway track image, which characterizes the pixel value of the original railway track image at , and through the following formula, iteratively smooth it at multiple scales using partial differential equations, suppress noise and retain the main structure, and output the denoising result: ; Among them, is a Gaussian kernel function with a standard deviation of , represents convolution; is a diffusion coefficient function, , which determines the diffusion speed at the edge or smooth area, is a variable of the diffusion coefficient function, is a preset sensitivity value; is a time step variable; is the gradient operator; is the L2 norm operator; Set ; represents the pixel value at at time step ; Set the maximum time step to , then the denoising result is , which represents the pixel value of the denoising result at : ; wherein, is the X-axis coordinate; is the Y-axis coordinate.
[0007] Furthermore, based on the denoising result, the local fractal dimension is calculated using the box-counting method at multiple different window scales; Let represent the window centered at the coordinate on the denoising result, with a scale of and a size of ; The local fractal dimension of box-counting is denoted as , and statistics are performed at different box scales , defined as: ; wherein, is the box side length; represents the total number of boxes required to cover the entire window at the current scale ; is the coordinate position of the th box in the denoising result; is the integer subscript index; is used to measure whether there is an intersection between the window and , defined as: ; wherein, is the discriminant function; when is greater than the set value, .
[0008] Furthermore, let the scale set be , and is obtained respectively at each scale ; is the integer subscript index, taking values from 1 to ; is the number of scales; Through the following formula, the local fractal dimensions of different window scales are non-linearly fused, and noise is suppressed by the Laplace regularization method to obtain the fused fractal dimension : ; Among them, , is the scale weight; is the mean parameter, and its value range is from 3 to 6; represents that on the denoising result, centered at the coordinate , with the scale of , and the size of , the local fractal dimension of the box counting of the window; is the non - linear fusion index, and its value range is from 2 to 5; is the Laplace operator; is the Laplace regularization coefficient, and its value range is from 0.3 to 0.7.
[0009] Furthermore, based on the eigenvectors, using the spectral clustering method to cluster pixels into several categories, and the process of judging one or several categories as candidate abnormal regions according to the threshold specifically includes: To measure the similarity between pixels in the feature space, use the Gaussian kernel function to calculate the similarity between the eigenvectors corresponding to every two pixels; Record the similarities through a matrix, which is called the similarity matrix; Each item in the matrix represents the similarity between two pixels; Use the similarity matrix to construct a graph structure, where each pixel is a node in the graph, and the similarity between nodes is used as the weight of the edge; Then, based on the degree matrix and similarity matrix of the graph, calculate the normalized graph Laplacian matrix; By calculating the eigenvalues and eigenvectors of the graph Laplacian matrix, map the nodes in the original high - dimensional feature space to a low - dimensional space; Select the first eigenvectors, representing the data after dimensionality reduction; In the space after dimensionality reduction, use the k - means clustering algorithm to group all pixel points, and divide them into categories, each category representing a pixel region with similar features; k - means clustering determines the category attribution of each pixel and the center point of each category through an iterative optimization method; After clustering, each pixel has a category label; According to the clustering result, combined with prior knowledge or statistical features, select one or more categories as candidate abnormal regions; Finally, generate a binary mask, where the pixels in the abnormal region are marked as 1 and the pixels in the normal region are marked as 0.
[0010] Furthermore, the category labels include: normal region, abnormal region, background region, edge transition region, debris region, and shadow region.
[0011] Furthermore, through the following formula, perform morphological operations of dilation, erosion, and closing on the candidate abnormal region: ; Among them, is a binary mask; is a dilation operation; is an erosion operation; is a dilation element, which is a circular structuring element; is an erosion element, which is a circular structuring element; is the radius of is the radius of ; is a morphological intermediate result.
[0012] Further, perform connected component filtering on the morphological intermediate result to obtain the processed candidate abnormal region ; where is a connected component filtering operator, indicating that only connected regions with an area greater than are retained.
[0013] Further, through the following formula, perform an intersection operation between the processed candidate abnormal region and the orbit mask to obtain the orbit abnormal region: ; where is the orbit abnormal region; is the orbit mask.
[0014] Adopting the above technical solutions, the present invention has the following beneficial effects: The present invention realizes the accurate identification of abnormal regions in track images. The fractal dimension is an effective tool for quantifying the complexity of regions, which can reflect the differences in texture and geometric characteristics between normal and abnormal regions in track images. Normal track regions usually have regularity and smoothness, while abnormal regions such as cracks, erosion, or debris are characterized by complex textures and irregular structures. The present invention uses the fractal dimension to quantitatively describe these differences, enabling the clear distinction of abnormal regions in the track from normal regions. Compared with traditional detection methods that rely on pixel intensity or single texture features, the application of the fractal dimension significantly improves the sensitivity and accuracy of detecting abnormal regions. Secondly, the present invention adopts a multi-scale fusion method in the calculation of the fractal dimension, fully considering the diversity and spatial distribution characteristics of abnormal regions in the track. Abnormal regions in railway tracks can manifest as fine cracks or large-scale erosion or debris, and single-scale feature extraction often fails to capture these different types of abnormal features simultaneously. The present invention calculates the fractal dimension at multiple scales and non-linearly fuses the features at each scale to generate a comprehensive fractal feature map. This multi-scale feature extraction method can not only effectively cover different types of abnormal regions but also enhance the stability of the features, making the detection results more comprehensive and accurate. In addition, the present invention further combines the spectral clustering method based on the fractal dimension to divide the pixels in the track image into several categories. This clustering method fully considers the complex characteristics of abnormal regions in the track image. By constructing a similarity matrix between pixel points and using the idea of graph theory for classification, it effectively solves the problem of non-linear feature distribution in the track image. Compared with traditional segmentation methods based on pixel intensity thresholds, spectral clustering can better adapt to the diverse scenarios of track images. Especially in the case of complex lighting conditions or large background interference, the clustering algorithm of the present invention shows stronger robustness. Description of the Drawings
[0015] Figure 1 It is a schematic structural diagram of a system for segmenting abnormal regions in railway track images combined with fractal dimension feature extraction provided by an embodiment of the present invention. Detailed Embodiments
[0016] All features disclosed in this specification, or all steps in any disclosed method or process, except for mutually exclusive features and / or steps, can be combined in any manner.
[0017] Any feature disclosed in this specification (including any additional claims, abstract) can be replaced by other equivalent or similar-purpose alternative features unless specifically stated. That is, unless specifically stated, each feature is only an example of a series of equivalent or similar features.
[0018] Example 1: Reference Figure 1 The invention discloses a railway track image abnormal region segmentation system combined with fractal dimension feature extraction, the system comprising: a preprocessing unit, a multi-scale fractal feature processing unit, an abnormal region processing unit and a segmentation unit; the preprocessing unit is used to receive the original railway track image, iteratively smooth the image at multiple scales using partial differential equations, suppress noise and retain the main structure, and output a denoising result; the multi-scale fractal feature processing unit is used to calculate the local fractal dimension at multiple different window scales based on the denoising result, perform nonlinear fusion on the local fractal dimensions of different window scales, and perform Laplace canonical square on the abnormal region segmentation unit; the multi-scale fractal feature processing unit is used to calculate the local fractal dimension at multiple different window scales based on the denoising result, perform nonlinear fusion on the local fractal dimensions of different window scales, and perform Laplace canonical square on the abnormal region segmentation unit; the multi-scale fractal feature processing unit is used to calculate the local fractal dimension at multiple different window scales based on the denoising result, and ... The noise points are suppressed by the formula to obtain the fused fractal dimension, and the fused fractal dimension and the gradient of the denoising result are combined into a feature vector; the abnormal area processing unit is used to cluster the pixels into several categories based on the feature vector by using the spectral clustering method, and one or several categories are judged as candidate abnormal areas according to the threshold value, and the candidate abnormal areas are subjected to morphological operations of dilation and corrosion to remove isolated noise or fill gaps, and then connected domain screening is performed to obtain the processed candidate abnormal areas; the segmentation unit is used to perform an intersection operation on the processed candidate abnormal areas and the track mask to obtain the track abnormal area.
[0019] Specifically, the main purpose of the preprocessing unit is to suppress noise and smooth the input railway track image, while retaining the main structural features in the image as much as possible, such as the edge of the track, cracks and other important abnormal area features. This process uses the iterative smoothing mechanism of partial differential equations (PDE) at multiple scales to effectively solve the common complex environmental interference problems in railway track images, such as image distortion caused by insufficient light, track surface pollution, debris or other non-structural noise. Through the effective operation of the preprocessing unit, high-quality basic data input can be provided for the subsequent fractal dimension feature extraction and abnormal area segmentation. The principle of this unit is based on the anisotropic diffusion model, which dynamically adjusts the diffusion intensity according to the gradient characteristics of the local area of the track image in the spatial domain. Railway track images usually contain two typical characteristics: one is that abnormal areas such as track edges and cracks have high gradient characteristics, which are manifested as drastic changes in pixel intensity; the other is that the track surface and background area usually have low gradient characteristics, which are manifested as gentle changes in pixel intensity. The anisotropic diffusion model uses this characteristic to enhance diffusion in flat areas of the track image (such as the track surface or background), making the intensity values between pixels tend to be consistent, thereby removing small-scale random noise; while in the edge area, important details and boundary information of the image are retained by suppressing diffusion. Specifically, the diffusion coefficient is dynamically adjusted according to the image gradient, that is, when the gradient is small, the diffusion coefficient is large, allowing more pixel intensity to diffuse; when the gradient is large, the diffusion coefficient tends to zero, thereby protecting the characteristics of the boundary and abnormal area.
[0020] The preprocessing unit also adopts a multi-scale processing mechanism, which enables the system to take into account the feature details at different spatial scales in railway track images. For example, the features of track cracks, edges, and noises may exhibit different patterns at different pixel levels. By iteratively evolving the image at multiple diffusion scales, this unit can not only eliminate fine noises but also smooth local variations within regions at a larger scale while still retaining detail structures such as track cracks and damages. The essence of multi-scale processing is to gradually update the image pixel values during the evolution at different time steps, so that the low-frequency components of the image are strengthened while the high-frequency noise components are gradually attenuated. This mechanism not only improves the accuracy of fractal dimension calculation but also ensures the detectability of abnormal regions in subsequent steps. In the railway track scenario, the sources of noise are complex and diverse, such as dust, gravel, debris in the natural environment, and fluctuations in lighting conditions, all of which will interfere with the segmentation results of track abnormal regions. If the fractal dimension features are directly extracted from the unprocessed image, the presence of noise will lead to the instability of the fractal dimension, thus affecting the system's judgment of abnormal regions. The preprocessing unit effectively reduces the interference of noise on fractal dimension calculation by performing pixel-by-pixel and multi-scale smoothing iterations on the image, making the feature extraction stage more robust. At the same time, the processing process of this unit also protects the boundary features of abnormal regions. For example, at the track edge or crack, due to the dynamic adjustment mechanism of the diffusion coefficient, the boundary information can be retained with high precision, which provides high-quality input for subsequent segmentation tasks. In addition, the edge characteristics in railway track images and the geometric structures of abnormal regions are often highly local, which requires the preprocessing unit to have regional adaptability when denoising the image. The greatest advantage of the anisotropic diffusion model is its ability to perform differential processing on different regions according to the gradient information of the image, and this adaptive diffusion strategy is crucial for the extraction of fractal dimension. The essence of fractal dimension is a quantitative measure of the complexity of local regions in an image. If the local structural characteristics of the image are damaged during the preprocessing stage, it will directly affect the calculation accuracy of the fractal dimension. By implementing gradient-adaptive smoothing processing in the preprocessing stage, this unit not only provides more stable image features for fractal dimension extraction but also enhances the reliability of subsequent abnormal region segmentation. Another key design of the preprocessing unit lies in its selection of multi-scale time steps. In actual railway track images, the scales of noise and abnormal regions may vary greatly, and single-scale diffusion processing may not be able to balance denoising and structure retention. By introducing the time step as an evolution parameter, the preprocessing unit can gradually adjust the diffusion intensity at different time scales, thus suppressing noise at a larger scale while retaining the details of abnormal regions at a smaller scale. This multi-scale characteristic ensures that the preprocessing unit can adapt to various feature patterns in complex scenarios, laying a solid foundation for the stable extraction of fractal dimension.
[0021] The multi-scale fractal feature processing unit is a key part of the railway track image abnormal area segmentation system that combines fractal dimension feature extraction. Its core function is to calculate and fuse the fractal dimensions of multi-scale local regions of the track image, extract the feature information of the regional complexity in the image, and use these features to identify the abnormal areas of the track. The fractal dimension is a mathematical tool for quantifying regional complexity, which can well characterize the texture, edge, and detail change characteristics of different regions in the track image. In railway track images, normal track areas usually have a relatively regular structure, showing a low fractal dimension, while abnormal areas (such as cracks, erosion, foreign objects, etc.) tend to have a high fractal dimension due to the irregularity of their texture and geometric structure. The multi-scale fractal feature processing unit can capture the features of abnormal areas at different spatial resolutions by extracting fractal dimensions at different scales, thereby improving the accuracy and robustness of abnormal area segmentation.
[0022] The first key task of the multi-scale fractal feature processing unit is to calculate the fractal dimension within a local window based on the preprocessed denoised image. In railway track images, due to the complex and variable environment, the manifestation scales of anomalies such as cracks, wear, and foreign objects may vary. To comprehensively cover these features, the unit divides the track image into blocks at multiple window scales and calculates the fractal dimension of each local region one by one. Here, the calculation of the local fractal dimension is essentially a statistical process used to measure the complexity of different regions in the track image. For example, on a smooth and flat track surface, the pixel value changes tend to be stable, and its local fractal dimension will be relatively low; while in abnormal regions such as cracks and debris, the pixel value changes show more complex fluctuations, and its fractal dimension will increase significantly. Therefore, by calculating the fractal dimension in blocks, the local complexity of the track image can be accurately quantified, providing basic data for subsequent segmentation. In addition to the fractal dimension calculation at a single scale, the unit also expands the feature extraction ability through multi-scale analysis. In actual railway track detection, the morphological features of abnormal regions may span multiple spatial scales. For example, a tiny crack may only show anomalies within a small window, while a larger erosion area may require a larger window to be fully covered. Therefore, the multi-scale fractal feature processing unit gradually expands the analysis range from small to large by setting multiple window scales, enabling the system to capture both local and global abnormal features simultaneously. The fractal dimensions calculated at different window scales are not directly used for subsequent segmentation but are integrated through a non-linear fusion method. The fusion process is based on multi-scale weight assignment, and the size of the weights can be dynamically adjusted according to the characteristics of the actual track image. For example, certain intermediate-scale features can be emphasized preferentially to avoid feature loss caused by overly large or small windows. The fused multi-scale fractal dimension feature map shows higher robustness and stability in space and can clearly reflect the comprehensive complexity of abnormal regions in the track image. To further improve the quality of the feature map, the multi-scale fractal feature processing unit also introduces a Laplacian regularization operation to suppress the influence of noise on the fractal dimension map. In railway track images, some abnormal regions may be covered by a small range of high-fractal noise, which may come from light changes or surface texture interference. If these noise features are directly passed to the subsequent segmentation unit, it will significantly reduce the accuracy of anomaly detection. Laplacian regularization smooths the local changes in the feature map, smoothing isolated high-fractal noise points into background values, thereby highlighting the fractal differences between abnormal regions and normal regions. This operation effectively improves the system's ability to identify abnormal regions in the track and reduces the possibility of false detection and missed detection. The regularization intensity can also be adjusted according to the complexity of the track image during the regularization process to ensure that the smoothing process does not cause excessive loss of the features of real abnormal regions.In addition to the calculation and fusion of fractal dimension features, this unit also combines these fractal features with the gradient features of the denoised image to further enhance the system's sensitivity to abnormal regions. Abnormal regions in railway track images often not only have high fractal dimensions but also significant gradient changes. Abnormal phenomena such as cracks and edges usually manifest as sharp changes in pixel intensity, which can be captured through gradient operations. Therefore, this unit constructs a high-dimensional feature vector during output, which includes the fused fractal dimension features and the gradient features of the denoised image. This high-dimensional feature vector can comprehensively reflect the multi-dimensional information of each pixel in the track image, thus providing more accurate data support for subsequent segmentation of abnormal regions.
[0023] The abnormal region processing unit is responsible for initially identifying abnormal regions in the track and optimizing these regions through morphological and connectivity analysis, while the segmentation unit further constrains the segmentation results based on the track mask, ensuring that the finally output abnormal regions are strictly limited within the track range. This processing flow can not only effectively handle complex interferences in track images but also ensure the high precision and high robustness of the system's detection of abnormal regions, providing reliable technical support for track safety detection and maintenance. The first step of the abnormal region processing unit is to classify the input high-dimensional feature vector using spectral clustering. The high-dimensional feature vector is composed of multi-scale fractal dimension features and the gradient features of the denoised image, and can comprehensively characterize the complexity and variation characteristics of each pixel in the track image. Spectral clustering is a clustering method based on graph theory, and its core idea is to construct a similarity matrix between pixel points and map the pixel points into a low-dimensional manifold space to achieve efficient clustering of non-linearly distributed data. In track images, pixel points in different regions are naturally distributed into several relatively independent clusters due to differences in fractal dimensions and gradient features. By calculating the similarity between these points and decomposing and reducing the dimension of the global structure of the data points based on the similarity matrix, spectral clustering can divide the pixel points in the track image into several categories, including normal track regions, abnormal regions, and background regions, etc.
[0024] Specifically, the construction of the similarity matrix is achieved through the Gaussian kernel function, which can quantify the similarity degree according to the Euclidean distance between pixel feature vectors. In the track image, adjacent pixels have a high similarity value due to their similar fractal dimensions and gradient features, while the similarity value of pixels across regions is significantly reduced due to large feature differences. This quantization mechanism based on feature similarity ensures that the spectral clustering method can effectively capture the regional distribution characteristics in the track image. By normalizing the similarity matrix, constructing the graph Laplacian matrix, and performing eigenvalue decomposition on it, the high-dimensional features in the track image can be mapped to a low-dimensional space. In this low-dimensional space, the relationship between each pixel point is clearer, enabling the subsequent clustering process to more accurately identify the abnormal regions of the track. After clustering, the abnormal region processing unit selects one or several types of pixels as candidate abnormal regions by analyzing the category characteristics of the clustering results. In this process, threshold judgment is an important link, and the judgment conditions can be set based on the statistical characteristics of the fractal dimension or gradient features. For example, abnormal regions such as track cracks or foreign objects usually exhibit a high fractal dimension or drastic gradient changes, while the fractal dimensions and gradient features of the background region and the normal track region are relatively smooth. Therefore, the selection of candidate abnormal regions can exclude the interference points in the normal region and the background region through the comprehensive analysis of the fractal dimension distribution and gradient changes, and initially identify the set of pixel points that may be abnormal. However, the initially identified candidate abnormal regions are not directly output as the final result because there may be noise interference or incomplete features in the railway track image. To optimize the quality of the candidate abnormal regions, the abnormal region processing unit corrects them through morphological operations. Morphological operations are classical methods in image processing, which can adjust the morphological characteristics of regions through operations such as dilation, erosion, opening, and closing. In the present invention, the dilation operation is used to fill small holes in the candidate abnormal regions, making the region more coherent; the erosion operation is used to remove isolated noise points, thereby reducing the possibility of misjudgment. The closing operation combining dilation and erosion can further smooth the boundary of the abnormal region, making the finally output region more regular. The abnormal regions of the track often have a certain spatial continuity, and morphological operations can enhance this connectivity feature, making the candidate abnormal regions more conform to the actual abnormal distribution of the track.
[0025] In addition, the abnormal area processing unit further screens the abnormal areas through connected component analysis. The noise points in the railway track image usually appear as small-area, unconnected isolated areas, while the real abnormal areas have a larger spatial scale and connectivity. Connected component analysis can calculate the area and shape characteristics of each connected block in the candidate abnormal areas, thereby filtering out those isolated noise blocks that do not conform to the characteristics of the abnormal areas. Through this process, the system can significantly improve the accuracy of the abnormal areas, reduce the false detection rate, and provide high-quality input for the subsequent segmentation unit. After the abnormal area processing unit is completed, the segmentation unit will limit the track range of the processed candidate abnormal areas. In the railway track image, the distribution of the abnormal areas should be strictly limited within the track range, and the areas outside the track range, even if judged as abnormal, do not belong to the objects concerned by the system. The segmentation unit completes this range constraint by performing an intersection operation between the candidate abnormal areas and the track mask. The generation of the track mask usually depends on prior track geometric information or edge detection results. For example, two parallel boundary lines of the track are detected through the Hough transform, and a closed track area mask is generated. In practical applications, the accuracy of the track mask is crucial for the quality of the segmentation results. If the track mask can accurately cover the actual area of the track, the segmentation unit can strictly limit the abnormal areas within the track range; if the accuracy of the track mask is low, it may lead to missed or misjudged abnormal areas. The intersection operation between the track mask and the candidate abnormal areas is a simple and efficient logical operation. The abnormal pixels within the track range are retained, while the abnormal pixels outside the track range are filtered, thereby obtaining the final segmentation result of the track abnormal areas. This result can not only accurately reflect the distribution of the abnormal areas on the track but also be directly used for subsequent track maintenance and safety assessment work.
[0026] Embodiment 2: Let represent the original railway track image, which characterizes the pixel value of the original railway track image at . Through the following formula, the partial differential equation is used to iteratively smooth at multiple scales, suppress noise, and retain the main structure, and the denoising result is output: ; where is a Gaussian kernel function with a standard deviation of , represents convolution; is a diffusion coefficient function, , which determines the diffusion speed in the edge or smooth area, is a variable of the diffusion coefficient function, is a preset sensitivity value; is a time step variable; is a gradient operator; is an L2 norm operator; Set ; Set the maximum time step to , then the denoising result is , which represents the pixel value of the denoising result at : ; Among them, is the X-axis coordinate; is the Y-axis coordinate.
[0027] Specifically, the core idea of the formula is based on the diffusion control of the image gradient. By introducing the diffusion coefficient function , the diffusion intensity is dynamically adjusted, enabling the processing of the image in different regions to have a high degree of locality and self-adaptability. In flat regions, such as the uniform texture part of the track surface, the gradient change of pixels is small, and the value of the diffusion coefficient function approaches 1. At this time, the diffusion speed is fast, and the intensity between pixels gradually tends to be consistent, effectively suppressing noise. In edge regions, such as abnormal regions like track cracks and wear, the gradient change is large, and the value of the diffusion coefficient function is close to 0, thus suppressing diffusion and protecting the boundary information from being blurred. This diffusion mechanism based on gradient control is clearly reflected in the formula. Through the norm calculation of the gradient, the gradient amplitude at different positions in the image is captured and used as the input variable of the diffusion coefficient function to achieve dynamic adjustment of the diffusion intensity. To further improve the effect of the diffusion process, the formula also introduces a Gaussian smoothing kernel , which is used to perform preliminary smoothing on the image in each iteration. The standard deviation of the Gaussian kernel function determines the smoothing scale. Its role is to reduce the discreteness of the local pixel gradient, making the calculation of the diffusion coefficient more stable, and at the same time suppressing tiny high-frequency noise. The small granular noise commonly found in railway track images and the random texture interference in the background can be significantly weakened through the preprocessing of the Gaussian smoothing kernel, while the large gradient features at the track boundary can still be well retained under the action of the Gaussian kernel. This multi-scale Gaussian smoothing not only enhances the robustness of the diffusion process but also provides flexibility for the global smoothing of the track image.
[0028] The time variable in the formula is the key control parameter for the multi-scale iterative process, and its physical meaning can be understood as the time step of the diffusion process. In practical applications, as the time step increases, the diffusion process gradually becomes stable, the image noise is gradually suppressed, and the main structure of the track area is retained. At the initial moment , the corresponding image is the original unprocessed image, which contains a large amount of noise and texture details; while at the final moment , the corresponding image This is the result after denoising, showing clear track boundary features and significant abnormal regions. This design that controls the diffusion degree through time steps enables the system to flexibly adjust the denoising intensity according to the specific characteristics of the track image, thus adapting to different track image scenarios. The form of the diffusion coefficient function is also an important part of this formula, and its specific expression is , where is the variable of the diffusion coefficient function, determined by the image gradient magnitude, is the preset sensitivity value, used to adjust the influence of the gradient on the diffusion intensity. Abnormal regions such as cracks and edges in the track image are usually accompanied by significant gradient changes. When the gradient magnitude is large, the diffusion coefficient will rapidly decrease, resulting in the strong suppression of the diffusion process in these regions, thus effectively protecting the structural characteristics of the abnormal regions. For the smooth regions on the track surface, the gradient magnitude is small, the diffusion coefficient is close to 1, and the diffusion process can proceed smoothly, and the effect of smoothing processing is more obvious. By adjusting the sensitivity parameter , the adaptability of the system to different types of track images can be further optimized. For example, in a scenario with strong noise, a larger value can be selected to increase the diffusion intensity, so as to achieve a more significant denoising effect; while in a scenario where the characteristics of abnormal regions are more prominent, a smaller value can be selected to strengthen the boundary protection.
[0029] Example 3: Based on the denoising result, calculate the local fractal dimension using the box-counting method at multiple different window scales; let represent a window centered at the coordinate on the denoising result, with a scale of and a size of ; the local fractal dimension of box-counting is denoted as , and statistics are carried out at different box scales , defined as: ; where is the box side length; represents the total number of boxes required to cover the entire window at the current scale ; is the coordinate position of the th box in the denoising result; is the integer subscript index; is used to measure whether there is an intersection between the window and , defined as: ; Among them, is the discrimination function; when is greater than the set value, .
[0030] Among them, the core of the formula is based on the box-counting method, which is a method for calculating the fractal dimension by covering the target area with grids of different scales. To achieve the local fractal dimension analysis of the orbital image, a local window centered at the coordinate with a scale of is introduced into the formula. This design allows the system to independently calculate the fractal dimension for each local area of the image, thus accurately capturing the spatial variation characteristics on the orbit. In the orbital image, the normal area usually has a smooth structure and a low fractal dimension; while the abnormal area shows a high fractal dimension due to the presence of cracks or foreign objects. This difference provides a clear discrimination basis for the segmentation of the orbital image. In the formula, the fractal dimension is calculated by statistically counting the number of boxes required to cover the window . The side length of the box defines the scale of the grid. As gradually decreases, the number of boxes covering the target area will increase regularly. This increasing rule reflects the geometric complexity of the area, and the calculation of the fractal dimension quantifies the growth rate of this rule. When the structure of the area is more complex, as the box scale decreases, the growth rate of the box number is faster, and the value of the fractal dimension is also larger. To ensure the accuracy and robustness of the calculation, the formula strictly defines the intersection between the box and the area mathematically. Specifically, determining whether the box covers a part of the window area depends on the intersection discrimination function . The core of this function lies in integrating the intersection area to measure the effectiveness of the pixels in the box. If the intersection is non-empty and meets certain conditions (such as the pixel value exceeds the set threshold), the contribution of the intersection is included in the box statistics; otherwise, the contribution of the box is zero. This design quantifies the intersection area through integration, enabling the calculation result to more accurately reflect the actual characteristics of different areas in the orbital image.
[0031] The discrimination function in the formula is another key part of the entire calculation process. It divides the pixels into two categories: meeting the conditions and not meeting the conditions through thresholding the pixel values of the denoised image. Specifically, when the pixel value exceeds a certain set value, , indicating that the pixel may belong to the abnormal area; otherwise , indicating that the pixel is a background or normal area. By introducing a discriminant function, the system can exclude the interference of irrelevant background pixels and thus focus on the analysis of the fractal characteristics of the track and abnormal areas. In the track image abnormal area segmentation system, the multi-scale calculation of the fractal dimension is a very important step. The abnormal areas on the track may appear as fine cracks, or large-scale erosion or debris, and there may be significant differences in the spatial scales of these abnormalities. Therefore, the system adjusts the side length of the box and the window size to statistically analyze the fractal dimension at different scales. Small-scale boxes and windows help capture fine abnormal features, while large-scale boxes and windows can reflect the global characteristics of large-scale abnormal areas. The multi-scale analysis method enables the fractal dimension calculation to comprehensively cover various features in the track image, thereby enhancing the detection ability of the system. The abnormal areas in the track image usually have a relatively high fractal dimension, which stems from the texture complexity and boundary irregularity of the abnormal areas. For example, the edges of track cracks show characteristics of refinement and fracture at different scales, resulting in a much higher growth rate of the number of boxes than that of the flat track surface area; while the foreign object area, due to the high-frequency texture changes on its surface, also causes an increase in the fractal dimension. By analyzing the fractal dimension of the denoised image, the system can accurately identify the abnormal areas in the track image and avoid false detections caused by background noise or local details of normal areas. In addition, the logarithmic relationship is introduced into the formula through the definition of the fractal dimension, making the calculation result more robust and adaptable. In railway track images, the distribution of noise and abnormal areas often has large local variations. The logarithmic relationship can compress the range of these variations to a certain extent, thereby enhancing the stability of the fractal dimension calculation. Combining with the denoising result, this formula further improves the abnormal area detection ability of the system in complex environments.
[0032] Example 4: Let the scale set be , and at each scale , is obtained respectively; is an integer subscript index, taking values from 1 to ; is the number of scales; Through the following formula, the local fractal dimensions of different window scales are non-linearly fused, and noise is suppressed by the Laplacian regularization method to obtain the fused fractal dimension : ; where is the scale weight; is the mean parameter, with a value range of 3 to 6; represents the denoising result centered at the coordinate with a scale of , the local fractal dimension of the box counting of a window of size ; is the non - linear fusion exponent, and its value range is from 2 to 5; is the Laplace operator; is the Laplace regularization coefficient, and its value range is from 0.3 to 0.7.
[0033] Specifically, assume that the fractal dimensions of the orbital image at different scales have been calculated, and are denoted as respectively, where represents the scale of the th window, and are the spatial coordinates of the pixels. The fractal dimension essentially describes the complexity of the local area of the orbit, and it can quantify the degree of change in the distribution of pixel gray values. For example, the fractal dimension of the smooth area on the orbit surface is relatively low, while the fractal dimension of the abnormal areas (such as cracks, wear, or debris) is relatively high, and its distribution changes with the window scale . To synthesize these multi - scale features, this embodiment designs a weighted fusion formula, where the fractal dimension of each scale is assigned a weight . The setting of the weight takes into account the characteristics of the orbital image to ensure that the influence of features at different scales on the fusion result meets the actual requirements. The expression of the weight is , where is an adjustable parameter, usually taking values from 3 to 6, used to adjust the relative importance between scales. Smaller scales correspond to the contributions of fine features (such as cracks or texture details), while larger scales reflect the characteristics of abnormal distributions over a wider range. Through the dynamic adjustment of the weight, the system can achieve a balance between detailed features and global features. For example, for a scenario where it is necessary to highlight the cracks on the orbit, the details can be made more prominent by increasing the weight of the small scale; while when identifying abnormal areas in a larger region (such as erosion or large - area debris), the proportion of the weight of the large scale can be increased. This flexible weight assignment mechanism makes the fusion process both global and able to retain local characteristics. The non - linear fusion exponent is another key parameter in the formula, and its value range is from 2 to 5, which controls the non - linear superposition method of the fractal dimensions of each scale during the fusion process. When is relatively small, the formula tends to average, and the fusion result is less sensitive to each scale; while when is relatively large, the fusion result is more sensitive to the features of certain specific scales. This non - linear design can effectively cope with the uneven distribution of the complexity of abnormal areas in the orbital image. For example, in the area where cracks are concentrated, the fractal dimension of a specific scale may be extremely prominent. At this time, a larger The value will enhance the proportion of these significant features in the fusion result, thereby improving the accuracy of anomaly detection.
[0034] In addition to the non-linear fusion part, the fusion result is further optimized by Laplacian regularization in the formula. There are often some high-frequency noises or isolated local features in the orbital images. These noises may come from uneven illumination or background interference during the acquisition process. If these high-frequency features are directly passed to the final result, it may lead to errors in the detection of abnormal regions. To solve this problem, in this embodiment, a Laplacian operator is introduced into the fusion result. By constraining the second-order derivative of the feature map, the suppression of noise points is achieved. The role of Laplacian regularization is similar to a kind of spatial smoothing process. It can weaken the mutation of local features, making the distribution of abnormal regions more coherent. For example, in the boundary region around the orbital crack, regularization can make these boundaries smoother, thus avoiding the appearance of discontinuous or incomplete phenomena in the detection results. The strength of Laplacian regularization is controlled by the regularization coefficient , and the value range is from 0.3 to 0.7. A smaller value indicates that the role of regularization is weak, which is suitable for scenarios with less noise; while a larger value will significantly smooth the feature map and is suitable for scenarios with strong noise. For example, in the case of poor lighting conditions and complex surface textures of the orbit, appropriately increasing the value can effectively improve the quality of the segmentation result. In addition, the Laplacian operator can also weaken the isolated noise points in the abnormal region. These noise points are usually caused by accidental light intensity fluctuations and do not have the characteristics of the orbital abnormal region. Under the action of regularization, the influence of these noise points will be greatly weakened, making the final feature map more real and reliable. Through the combination of non-linear fusion and Laplacian regularization, the formula of Embodiment 4 realizes the comprehensive characterization and optimization of the complex characteristics of the abnormal region in the orbital image. The fusion process finds a balance between the global and the local by adjusting the scale weight and the non-linear exponent, ensuring the multi-scale comprehensive perception of the abnormal region; while the regularization process makes the final fractal feature map more robust and accurate by smoothing the high-frequency noise and isolated points.
[0035] Example 5: Based on the feature vectors, using the spectral clustering method to cluster pixels into several categories, and judging one or several of them as candidate abnormal regions according to the threshold. The specific process includes: In order to measure the similarity between pixels in the feature space, the Gaussian kernel function is used to calculate the similarity between the feature vectors corresponding to each pair of pixels; the similarities are recorded through a matrix, which is called the similarity matrix; each item in the matrix represents the similarity between two pixels; using the similarity matrix, a graph structure is constructed, where each pixel is a node in the graph, and the similarity between nodes is used as the weight of the edge; then, based on the degree matrix and the similarity matrix of the graph, the normalized graph Laplacian matrix is calculated; by calculating the eigenvalues and eigenvectors of the graph Laplacian matrix, the nodes in the original high-dimensional feature space are mapped into a low-dimensional space; select the first feature vectors, representing the data after dimensionality reduction; in the space after dimensionality reduction, use the k-means clustering algorithm to group all pixel points and divide them into categories, and each category represents a pixel region with similar features; k-means clustering determines the category attribution of each pixel and the center point of each category through an iterative optimization method; after clustering, each pixel has a category label; according to the clustering results, combined with prior knowledge or statistical features, select one or more categories as candidate abnormal regions; finally, a binary mask is generated, where the pixels in the abnormal region are marked as 1 and the pixels in the normal region are marked as 0.
[0036] Specifically, let the feature vector be . In order to measure the similarity between different points in the feature space, a similarity matrix between feature points is constructed. The similarity is usually defined by the Gaussian kernel, and the formula is as follows: ; where respectively represent the feature vectors of pixel points and in the feature space. is the Euclidean distance, which is used to measure the feature difference between two points. is the Gaussian kernel width parameter, which is used to control the decline speed of the similarity; The smaller it is, the more the similarity is limited to the local neighborhood. After calculating the similarities of all pixel points, the similarity matrix is obtained, where is the total number of all pixel points in the image. Based on the similarity matrix , the graph Laplacian matrix is constructed for the core operation of spectral clustering. It is divided into the following steps: Construct the degree matrix : The degree matrix is a diagonal matrix, and its diagonal elements are the "degrees" of each point, that is: ; Calculate the normalized Laplacian matrix : The graph Laplacian matrix is defined as: ; where is the identity matrix. By solving the first eigenvectors of the normalized Laplacian matrix (corresponding to the smallest eigenvalues, ignoring the first zero eigenvalue), the high-dimensional feature data is reduced to dimensions. The formula is as follows: ; where: is the th eigenvector of the normalized Laplacian matrix . is the dimensionality reduction result of all pixel points in the -dimensional space. Using the -means clustering algorithm on the eigenvector matrix , the pixel points are divided into classes. The formula is as follows: Define the objective function to find the cluster centers : ; where, is the dimensionality reduction feature vector of the th pixel point. is the class label of the th pixel point (from 1 to ). is the cluster center of the th class.
[0037] -means is optimized by iterating the following two steps: Classification: Assign each point to the nearest cluster center: ; Update: Recalculate each cluster center: ; In the clustering result, according to prior knowledge or statistical features, select one or more classes as "candidate abnormal regions". For example: Suppose the fractal feature value of the abnormal region is large, these classes can be marked as abnormal classes. Define the abnormal class mask as : ; is the pixel point of the clustering result label. is the set of categories determined to be abnormal. is the candidate abnormal region mask, which marks whether the pixel belongs to the abnormal region (1 indicates abnormal, 0 indicates normal). will be used as the input for the next morphological processing to further optimize the abnormal region.
[0038] Example 6: The category labels include: normal region, abnormal region, background region, edge transition region, sundry region, and shadow region.
[0039] Specifically, the normal region is the main part of the orbital image, usually showing uniform texture and intensity distribution, with a lower fractal dimension and smaller gradient values. These regions represent the intact orbital surface, which is the most stable part of the orbital image and also the reference region for system detection. By labeling the normal regions, the system can quickly exclude a large number of irrelevant pixels, thus concentrating resources on processing the real abnormal regions. The abnormal regions are the focus of detection, which usually include physical defects such as cracks, wear, and erosion on the orbit. The fractal dimension of the abnormal regions is significantly higher than that of the normal regions, showing complex texture characteristics, and at the same time having large fluctuations in gradient values and intensity distributions. These regions need to be identified through fine feature extraction and clustering algorithms. In the present invention, through the comprehensive analysis of the fractal dimension and gradient, these regions can be effectively labeled and marked as "1" as the key when generating the mask. The background region refers to the part outside the orbit, such as ballast, soil, plants, etc. Since the texture and intensity distribution of the background region are usually significantly different from those of the orbital region, their fractal dimension and gradient characteristics also show large deviations. The detection and elimination of the background region are crucial for improving the accuracy of the system, because misclassifying these pixels as abnormal regions may lead to a high false detection rate. During the spectral clustering process, the background region is usually divided into an independent class, and its class label can be quickly identified and excluded. The edge transition region is located between the orbit and the background, usually showing a relatively blurred transition texture. This region may include the orbit edge or track fasteners, etc., which have certain differences from the texture and intensity characteristics of the main orbital region but are still related to the orbital region. Such pixels play a role in connecting the background and the orbit in the orbital image. By independently labeling these regions, the system can avoid misidentifying the orbit edge as an abnormal region and can more clearly define the actual scope of the orbit. The debris region refers to foreign objects on the orbital surface, such as fallen leaves, stones, or human leftovers. The texture complexity and gradient values of these regions are usually higher than those of the normal regions, but they are different from the manifestations of orbital abnormal regions (such as cracks). The separation of the debris region can effectively avoid the interference of these non-structural abnormalities on the detection results. In the system, by combining the fractal dimension, gradient value, and intensity distribution characteristics, the debris region can be independently labeled and excluded from the abnormal detection results. The labeling of the shadow region takes into account the interference of the change of illumination conditions during the image acquisition process on the system. The shadow region usually shows the characteristics of lower intensity values and smaller gradient changes. Although the shadow does not directly affect the orbital structure, if not processed, the shadow region may be misjudged as an abnormal region, thus reducing the detection accuracy of the system. By setting an independent label for the shadow region and combining prior knowledge for exclusion, the robustness of the system can be greatly improved.
[0040] Example 7: Perform morphological operations of dilation, erosion, and closing on the candidate abnormal region through the following formula: ; wherein, is a binary mask; is a dilation operation; is an erosion operation; is a dilation element, which is a circular structuring element; is an erosion element, which is a circular structuring element; is the radius of is the radius of ; is a morphological intermediate result.
[0041] Specifically, the core idea of the formula is to first perform a dilation operation on the candidate abnormal region to expand the boundary of the local region outward, thereby filling the possible gaps or small fractures inside the abnormal region. In railway track images, abnormal regions usually appear as irregular cracks, erosions, or debris, and the boundaries of these regions may be incomplete due to image resolution limitations or noise interference. Through the dilation operation, the formula can fill the gaps between adjacent pixels without affecting the overall shape of the abnormal region, thereby enhancing the connectivity of the abnormal region. The dilation operation relies on a circular structuring element , and its radius determines the scope of expansion. For slender structures such as railway track cracks, selecting an appropriate can ensure that the dilation effect will neither overly blur the boundary nor fully fill the fine crack breakpoints. After the dilation is completed, the formula further introduces an erosion operation to refine the dilated region. The purpose of erosion is to contract the boundary inward to eliminate the pseudo-features that may be introduced due to dilation and remove the isolated noise points that may exist on the boundary of the abnormal region. In railway track images, these isolated points may be caused by uneven illumination or local abnormalities in surface texture. If directly retained in the segmentation result, it may lead to misjudgment. The erosion operation effectively removes these isolated points through the constraint of the structuring element , and makes the boundary of the abnormal region smoother and more natural. The structuring element in the erosion operation has a smaller radius , and satisfies , which forms a good balance between dilation and erosion, that is, dilation is responsible for connection and filling, and erosion is responsible for repair and refinement.
[0042] The process of combining dilation and erosion operations in the formula is actually the implementation of a closing operation. The closing operation smoothes the boundaries of the abnormal area while maintaining the connectivity of the area through the order of dilation first and then erosion. In the detection of track cracks, the closing operation can effectively remove small holes in the area and eliminate local irregular features on the boundary, so that the segmentation result is more in line with the actual form of the track anomaly. This processing method is particularly suitable for scenarios where there are a lot of texture or noise interference on the track surface. It can enhance the integrity of the area while suppressing the influence of interference factors. In addition, in order to balance the different effects of dilation and erosion on the final result, the formula introduces a normalization coefficient , which is used to adjust the relative weights of dilation and erosion. This design is very important because the scale and shape of the abnormal areas in the track image may vary greatly. In areas with fine cracks, the effect of dilation may be more significant, while in the case of large abnormal areas, the refinement of erosion is more important. Through the dynamic adjustment of the normalization coefficient, the formula can adapt to the characteristics of different abnormal areas, so that the effects of dilation and erosion are optimally balanced. The final result of the morphological operation It is an optimized binary mask that marks the pixel distribution of abnormal areas in the track image. Compared with the candidate abnormal area mask , the result is smoother and more coherent, and most of the isolated noise points and pseudo-anomaly areas are removed. This optimization is of great significance for the practical application of track anomaly detection systems. On the one hand, the detection accuracy of track cracks and wear is improved, because the closed operation enhances the connectivity of these abnormal areas, allowing them to be detected in a complete form; on the other hand, the suppression of noise and pseudo-features reduces the possibility of false detection, thereby improving the robustness and reliability of the system.
[0043] Example 8: Morphological intermediate results Perform connected domain screening to obtain candidate abnormal regions after processing ;in, It is a connected domain screening operator, which means that only the connected domains with an area greater than connected area.
[0044] Specifically, Example 8 uses a connected domain screening operator to filter the morphological intermediate results Perform optimization processing to generate the final candidate abnormal area . The core of this step lies in using the geometric characteristics of connected components to screen out connected regions with sufficient area, thereby removing isolated noise points or pseudo-abnormal regions that may remain after morphological processing. This process is crucial in the abnormal region segmentation system of orbital images because the abnormal regions in orbital images usually appear as structures with large spatial coherence, such as cracks, wear, or debris, while isolated bright noise points or small-area pseudo-regions often stem from background interference or computational errors and lack practical significance. Without connected component screening, these pseudo-features may interfere with the accuracy of the segmentation result, thereby reducing the system's ability to detect orbital abnormalities. In the intermediate result of morphological processing , the abnormal regions have been optimized for their connectivity and boundary characteristics through morphological operations such as dilation, erosion, and closing. However, due to the possible existence of isolated high-noise points or discontinuous feature regions in orbital images, these irregular small regions may still appear in the segmentation result. To further clean up these interfering regions, Example 8 proposes a connected component screening method that uses the operator to achieve a one-by-one analysis of all connected regions in . The connected component screening operator is based on geometric constraints and directly removes those connected regions with an area smaller than the set threshold , and only retains regions with an area greater than . In this way, the system can effectively remove isolated small regions and ensure that the segmentation result only contains abnormal regions with physical significance. The key to connected component screening lies in the detection and area calculation of connected regions in the binary image. In , each point with a pixel value of 1 represents a possible abnormal region. The system forms connected components by connecting all adjacent pixel points and calculates the area of each connected component. If the area of a certain connected component is greater than the threshold , it is considered that this connected component has practical significance and can be retained as a candidate abnormal region; otherwise, this connected component is regarded as noise or a pseudo-abnormal region and is excluded. Threshold The setting is usually adjusted according to the resolution of the track image and the minimum size of the abnormal area in the actual scene. For example, for an abnormal area such as a track crack, its minimum connected area may correspond to several pixels to dozens of pixels, depending on the resolution of image acquisition; while isolated bright noise points usually only occupy one or a few pixels, and they can be effectively excluded by setting a reasonable area threshold. This screening process not only improves the accuracy of the segmentation result but also enhances the robustness of the system. In railway track images, the spatial distribution of abnormal areas often has a certain coherence. For example, cracks usually extend linearly along the track direction, while erosion or debris may cover a relatively large continuous area. By analyzing the regional coherence, the connected component filtering further verifies the rationality of the candidate abnormal areas, thus effectively avoiding the influence of noise on the segmentation result. At the same time, this process can also optimize the boundary of the abnormal area, making it closer to the shape characteristics of the actual track anomaly. Finally, through the connected component filtering operator , the morphological intermediate result is further optimized to . In , each pixel marked as 1 represents a screened abnormal area, whose connectivity and area characteristics conform to the characteristics of actual track anomalies, while all isolated small areas or pseudo areas are excluded. This final abnormal area mask can not only provide high-quality segmentation results for track anomaly detection but also significantly reduce the possibility of false detection and missed detection, providing reliable data support for track safety monitoring and maintenance work.
[0045] Example 9: Through the following formula, the processed candidate abnormal area and the track mask are intersected to obtain the track abnormal area: ; where is the track abnormal area; is the track mask.
[0046] Specifically, the calculation process of is as follows: Calculate the gradient magnitude of the denoised image and compare it with the threshold
[0047] ; if the gradient exceeds the threshold, it is marked as 1, otherwise 0. where represents the gradient of the image at (which can be calculated by methods such as Sobel, Prewitt, etc.). represents the gradient magnitude (Euclidean norm). is the gradient threshold. The obtained binary edge map, where 1 indicates that it may belong to the track edge or other strong contrast structures, and 0 indicates the non-edge area.
[0048] The two rails of the track usually appear as two roughly parallel straight lines in the image. By performing the Hough line transform on the edge map, votes can be accumulated in the parameter space to find the two most prominent parallel lines. A line can be represented in polar coordinates as: ; where is the distance from the line to the origin of the coordinates, and is the angle between the normal and the axis. For each pixel in the binary edge map , if , then accumulate within the range of : ; where, is the width and height of the image. represents the discrete or continuous Dirac function (which is often discretized in implementation). is the accumulation matrix of the Hough parameter space. Find the top several local maxima in . For simplicity, assume that the two "most obvious" approximately parallel lines are found. Here, it is required that , indicating that the two edges of the track are almost parallel. is the corresponding polar coordinate distance, and we can set . With the parameters of the two approximately parallel lines, the region between the two lines can be defined as the "track region" using geometric conditions. For parallel lines, it satisfies: ; then the "track region" can be regarded as the coordinates satisfying: ; ; where, is the polar coordinate distance of the two parallel lines obtained by Hough detection, and . is the normal direction of these two parallel lines. is the binary mask of the track ROI, where 1 indicates the region between the two edge lines of the track, and 0 indicates outside the track.
[0049] Although the specific embodiments of the present invention have been described above, those skilled in the art should understand that these specific embodiments are merely illustrative. Without departing from the principles and essence of the present invention, those skilled in the art can make various omissions, substitutions, and changes to the details of the above methods and systems. For example, combining the above method steps so as to perform substantially the same function in a substantially the same manner to achieve substantially the same result falls within the scope of the present invention. Therefore, the scope of the present invention is only defined by the appended claims.
Claims
1. The railway track image abnormal area segmentation system combined with fractal dimension feature extraction is characterized by: The system comprises: a preprocessing unit, a multi-scale fractal feature processing unit, an abnormal region processing unit and a segmentation unit; the preprocessing unit is used to receive the original railway track image, iteratively smooth at multiple scales using partial differential equations, suppress noise and retain the main structure, and output the denoising result; the multi-scale fractal feature processing unit is used to calculate the local fractal dimension at multiple different window scales based on the denoising result, perform nonlinear fusion on the local fractal dimensions of different window scales, suppress noise points by Laplace regularization, obtain the fused fractal dimension, and form a feature vector with the fused fractal dimension and the gradient of the denoising result; the abnormal region processing unit is used to cluster pixels into several categories by using a spectral clustering method on the basis of the feature vector, judge one or several categories as candidate abnormal regions according to a threshold, perform morphological operations of expansion and corrosion on the candidate abnormal regions, remove isolated noise or fill gaps, and then perform connected domain screening to obtain the processed candidate abnormal regions; the segmentation unit is used to perform an intersection operation on the processed candidate abnormal regions and the track mask to obtain the track abnormal region.
2. The railway track image abnormal area segmentation system combined with fractal dimension feature extraction as claimed in claim 1 is characterized in that: make represents the original railway track image, which represents the original railway track image in The pixel value at is iteratively smoothed at multiple scales using partial differential equations using the following formula to suppress noise and retain the main structure, and the denoising result is output: ; in, The standard deviation is The Gaussian kernel function, represents convolution; is the diffusion coefficient function, , determines the diffusion speed at the edge or smooth area, is the diffusion coefficient function variable, is the preset sensitivity value; is the time step variable; is the gradient operator; is the L2 norm operator; set ; Represents the time step At The pixel value at ; Set the maximum time step to , the denoising result is , which characterizes the denoising result in Pixel value at: ; in, is the X-axis coordinate; is the Y-axis coordinate.
3. The railway track image abnormal area segmentation system combined with fractal dimension feature extraction as claimed in claim 2 is characterized in that: Based on the denoising results, the local fractal dimension is calculated at multiple different window scales using the box counting method; Indicates the coordinates on the denoising result Centered at , the size is The local fractal dimension of the box count is , at different box sizes The following statistics are defined as: ; in, is the length of the box side; Indicates the current scale Next, cover the entire window The total number of boxes required; For the The coordinate position of each box in the denoising result; is an integer subscript index; For measuring window and Whether there is an intersection is defined as: ; in, is the discriminant function; when When it is greater than the set value, .
4. The railway track image abnormal area segmentation system combined with fractal dimension feature extraction as claimed in claim 3 is characterized in that: Let the scale set be , at each scale The following were obtained ; is an integer subscript index, ranging from 1 to ; is the scale number; the local fractal dimensions of different window scales are nonlinearly fused by the following formula, and the noise is suppressed by Laplace regularization to obtain the fused fractal dimension : ; in, , is the scale weight; is the mean parameter, ranging from 3 to 6; Indicates the coordinates on the denoising result Centered at , the size is The local fractal dimension of the box count of the window; is the nonlinear fusion index, ranging from 2 to 5; is the Laplace operator; is the Laplace regularization coefficient, ranging from 0.3 to 0.
7.
5. The railway track image abnormal area segmentation system combined with fractal dimension feature extraction as claimed in claim 4 is characterized in that: Based on the feature vector, the spectral clustering method is used to cluster the pixels into several categories. The process of judging one or several categories as candidate abnormal areas according to the threshold includes: in order to measure the similarity between pixels in the feature space, the Gaussian kernel function is used to calculate the similarity between the feature vectors corresponding to every two pixels; the similarity is recorded through a matrix, which is called the similarity matrix; each item in the matrix represents the similarity between two pixels; using the similarity matrix, a graph structure is constructed, in which each pixel is regarded as a node in the graph, and the similarity between the nodes is regarded as the weight of the edge; then, based on the degree matrix and the similarity matrix of the graph, the normalized graph Laplacian matrix is calculated; by calculating the eigenvalues and eigenvectors of the graph Laplacian matrix, the nodes in the original high-dimensional feature space are mapped to the low-dimensional space; the previous feature vectors, representing the data after dimensionality reduction; in the space after dimensionality reduction, the k-means clustering algorithm is used to group all pixels and divide them into Classes, each class represents a pixel area with similar characteristics; k-means clustering determines the category of each pixel and the center point of each class through iterative optimization method; after clustering, each pixel has a category label; according to the clustering results, combined with prior knowledge or statistical characteristics, one or more categories are selected as candidate abnormal areas; finally, a binary mask is generated, in which pixels in abnormal areas are marked as 1 and pixels in normal areas are marked as 0.
6. The railway track image abnormal area segmentation system combined with fractal dimension feature extraction as claimed in claim 5, characterized in that: The category labels include: normal area, abnormal area, background area, edge transition area, debris area and shadow area.
7. The railway track image abnormal area segmentation system combined with fractal dimension feature extraction as claimed in claim 6 is characterized in that: The following formula is used to perform morphological operations of dilation, erosion and closing on the candidate abnormal regions: ; in, is a binary mask; For expansion operation; For corrosion operations; is the expansion element, which is a circular structural element; is the corrosion element, which is a circular structural element; for The radius of for The radius of ; It is the intermediate morphological result.
8. The railway track image abnormal region segmentation system combined with fractal dimension feature extraction as claimed in claim 7, characterized in that: Then the morphological intermediate results Perform connected domain screening to obtain candidate abnormal regions after processing ;in, It is a connected domain screening operator, which means that only the connected domains with an area greater than connected area.
9. The railway track image abnormal area segmentation system combined with fractal dimension feature extraction as claimed in claim 8, characterized in that: The processed candidate anomaly region is intersected with the orbit mask by the following formula to obtain the orbit anomaly region: ; in, It is the track anomaly area; is the orbital mask.
Citation Information
Patent Citations
Railway fastener defect online detection and identification method based on machine vision
CN116757990A
Liquid crystal display screen defect detection method, system, equipment and medium
CN119722672A
Information processing method, medical image diagnostic apparatus, and information processing system
US20220031274A1
Cited By
Abnormal action monitoring method for flame phagocytic experiment of protective equipment
CN121053588A
Abnormal object detection method and device based on industrial scene, equipment and medium
CN121505338A