Disclosure of Invention
Aiming at the problem that the abnormal detection of the railway track cannot identify the abnormal tilting of the cover plate in the prior art, the invention provides a method for detecting the abnormal detection of the ballast bed cover plate of the railway track, which is used for acquiring depth information of the ballast bed cover plate, identifying the abnormal tilting of the cover plate, carrying out real-time compensation processing on images and improving the detection precision and efficiency.
In order to achieve the technical purpose, the technical scheme provided by the invention is that the method for detecting the abnormity of the track bed cover plate of the railway track comprises the following steps:
S1, synchronously acquiring track area images from different angles by using at least two cameras, calculating depth values of a track bed cover plate according to parallax of the same target track area in different camera imaging, and constructing a track bed cover plate three-dimensional model;
s2, performing real-time compensation processing on the images in the high-speed running process of the train;
s3, setting a periodic action sequence comprising different illumination intensities, focal length adjustment and shooting frame rate change, setting the duration of each action according to the train running speed and the camera shooting frequency, and collecting a plurality of groups of track images in each action duration;
S4, extracting characteristic points of the images under each action, carrying out characteristic matching and depth value fusion, and judging that the abnormality is caused by the change of the ballast bed cover plate body, the camera shooting parameters or the train running speed;
S5, constructing a ghost rule model based on the abnormal judgment result, correcting the subsequent image in real time, generating an abnormal candidate region through the region proposal network, classifying and position regression of the candidate region, and judging whether the ballast cover plate has the defects, the tilting abnormality and the positioning.
According to the technical scheme, the track area images are synchronously acquired from different angles through at least two cameras, the binocular vision principle is simulated, the depth value of the ballast bed cover plate can be accurately calculated, a fine three-dimensional model is built, abundant three-dimensional space data are provided for subsequent anomaly detection, and the state of the ballast bed cover plate can be comprehensively understood. In the high-speed running process of the train, the real-time compensation processing is carried out on the images, so that the motion blur is effectively eliminated, the contrast is enhanced, and the clear and high-quality images can be obtained even in a high-speed motion environment. The method has the advantages that the periodic action sequences comprising different illumination intensities, focal length adjustment and shooting frame rate change are set, and the duration of each action is set according to the train running speed and the camera shooting frequency, so that the detection method can adapt to different environmental conditions, and the robustness and the applicability of detection are improved. The characteristic points of the images under each action are extracted, and the characteristic matching and depth value fusion are carried out, so that whether the abnormality is caused by the ballast bed cover plate body, the camera shooting parameters or the train running speed change can be accurately judged, various factors are comprehensively considered, and the accuracy and the comprehensiveness of abnormality judgment are improved. The method has the advantages that the ghost rule model is built based on the abnormal judgment result, the follow-up image is corrected and analyzed in real time by utilizing the deep learning network, abnormal candidate areas are generated through the area proposal network, classification and position regression are performed, the accurate positioning and classification of the defects, tilting and other anomalies of the ballast bed cover plate can be realized, the detection accuracy is improved, and the detection efficiency is remarkably improved.
The invention is still further arranged that the method further comprises a camera setting optimization, the camera setting optimization being:
setting a camera to shoot at three different positions, selecting positions according to the layout of a ballast bed cover plate and an abnormal candidate region, controlling the camera to switch at the different positions through a mechanical device, calibrating internal parameters and external parameters of the camera by shooting images of a calibration plate with known size after each switch, comparing the image differences at the different positions, splicing the images by using an image splicing algorithm, and analyzing the image differences at the different positions in the spliced images to assist in judging the abnormal reasons;
Or three cameras are arranged at the same position to shoot images from different angles or adopt different parameters, when shooting is carried out at different angles, angle selection ensures that different side information of a track area cover plate is acquired, when shooting is carried out at different parameters, the parameters comprise exposure time, focal length and aperture, when the shooting is carried out at different parameters, the automatic control and synchronous shooting technology is adopted to ensure that the image time reference is the same, when comparing the images, the image registration and fusion technology is adopted to decompose the images into sub-bands with different scales, the weighted average method is adopted to fuse the sub-band characteristics of the images of the different cameras, a corresponding relation model of image difference and anomaly factors is established, and the anomaly cause is determined according to the difference point.
In the technical scheme, a single camera is controlled to be switched at three different positions through a mechanical device, so that a multi-position camera switching strategy is formed, and the camera can be ensured to cover all areas of a ballast bed cover plate, in particular to areas easy to be abnormal. After each switching, the calibration device is used for shooting the images of the calibration plates with known sizes, and the internal parameters and the external parameters of the camera are accurately calibrated, so that the images shot at different positions are ensured to have consistent geometric relations, and a solid foundation is laid for subsequent image splicing and difference analysis. And images shot at different positions are spliced into a complete image in a seamless mode by utilizing an image splicing algorithm, so that detection personnel can observe the state of the ballast cover plate comprehensively. Meanwhile, the difference of images at different positions in the spliced image is analyzed, so that the abnormality cause can be accurately and assisted to be judged, and the detection accuracy and efficiency are improved. Three cameras are arranged at the same position, images are shot from different angles or with different parameters (such as exposure time, focal length, aperture and the like), a multi-camera array strategy is formed, more comprehensive and various information of the ballast bed cover plate is obtained, and the shooting mode of the multi-angle and multi-parameter is beneficial to capturing fine changes of the ballast bed cover plate and provides more clues for abnormality detection. By adopting the image registration and fusion technology, images shot by different cameras are accurately aligned and fused, the fused images not only retain useful information shot by each camera, but also fuse the characteristics of sub-bands with different scales through a weighted average method, so that the image characteristics are further enriched, and the accuracy of anomaly detection is improved. The corresponding relation model of the image difference and the abnormal factors is established, the abnormal reasons are determined according to the difference points in the fusion image, and various factors such as illumination change and shooting angle difference can be comprehensively considered, so that whether the abnormality is caused by the ballast bed cover plate body or other external factors can be accurately judged.
In step S1, the depth value of the ballast cover plate is calculated according to the parallax of the same target track area in different camera images, the three-dimensional model of the ballast cover plate is constructed by dividing one camera acquired image into a plurality of small image blocks, searching the most similar area in the other camera image, calculating the parallax of the pixel points through calculating the displacement of the image blocks, calculating the depth value according to the triangulation principle, and constructing the three-dimensional model of the ballast cover plate.
In the technical scheme, an image acquired by one camera is divided into a plurality of small image blocks, the most similar area is searched in the other camera image, the parallax of a pixel point is obtained by calculating the displacement of the image blocks, and then the depth value of the road bed cover plate is accurately calculated according to the triangulation principle. By using the depth value obtained by calculation, a three-dimensional model of the track bed cover plate can be constructed, the shape, the position and the spatial relation of the track bed cover plate can be intuitively displayed, abundant three-dimensional space data are provided for subsequent anomaly detection, and through the three-dimensional model, a detector can more comprehensively know the state of the track bed cover plate, thereby being beneficial to finding potential anomalies or defects. Based on the depth value calculated accurately and the constructed three-dimensional model, fine detection of the ballast bed cover plate can be achieved. By comparing the three-dimensional model with the model in the normal state, the abnormity or deformation of the ballast bed cover plate can be found more easily, the accuracy of abnormity detection is improved, and potential safety hazards can be found in advance. The method for simulating the binocular vision principle by the stereo matching algorithm has stronger robustness, can stably work under different illumination conditions, shooting angles and distances, and can adapt to various complicated railway track environments, so that the stability and the reliability of the system are improved.
The invention is further provided that in step S2, the real-time compensation processing of the image in the high-speed running process of the train comprises the following steps:
Calculating the motion blur degree of an image according to the train running speed and camera shooting parameters by adopting an algorithm based on a motion blur model, and recovering a blurred image by an inverse filtering method;
extracting feature points from continuous frame images by a feature point detection algorithm, calculating motion vectors between adjacent frames of the feature points according to an optical flow method to obtain overall motion information of the images, reversely compensating the blurred images based on the overall motion information of the images, resampling by a bilinear interpolation algorithm, and carrying out regional treatment on the images according to a self-adaptive histogram equalization algorithm.
In the technical scheme, the motion blur degree of the image can be accurately calculated by combining the driving speed of the train and the shooting parameters of the camera based on the motion blur model algorithm. The fuzzy image is restored by the inverse filtering method, so that the image blurring phenomenon caused by high-speed movement of the train is effectively eliminated, the image edge is clearer, and the details are richer. And extracting feature points from the continuous frame images by using a feature point detection algorithm, and calculating motion vectors between adjacent frames of the feature points by using an optical flow method, so as to obtain the overall motion information of the images. Based on this information, the blurred image is compensated reversely, and image distortion due to motion blur is corrected. And then resampling the image by adopting a bilinear interpolation algorithm, further smoothing the image, eliminating saw teeth or distortion phenomenon generated in the compensation process, and obviously improving the image quality. And carrying out regional treatment on the image by adopting an adaptive histogram equalization algorithm. The algorithm can automatically adjust the contrast according to the brightness distribution of different areas of the image, so that the details of dark parts in the image are clearer and the details of bright parts are richer. Meanwhile, the problem of noise amplification and detail loss caused by global histogram equalization can be avoided by the regional processing mode, so that the image contrast is more naturally and uniformly improved. By enhancing the contrast of the image, the characteristics of textures, edges and the like of the track bed cover plate are more outstanding, and the subsequent anomaly detection algorithm is helpful for more accurately identifying the anomaly phenomena such as missing, tilting and the like of the track bed cover plate. Meanwhile, the contrast is improved, so that a detector can observe the image more clearly, and the detection efficiency and accuracy are improved.
The invention further provides that in the step S3, the feature points of the images under each action are extracted, feature matching and depth value fusion are carried out, wherein the image feature extraction and matching algorithm is used for processing the photographed images under different actions, the feature points are extracted, descriptors among the feature points are calculated, the feature points are matched through the similarity of the descriptors, and the difference of the feature points among the images under different actions is analyzed by combining the depth values.
According to the technical scheme, the image feature extraction and matching algorithm is utilized, the salient feature points in the photographed images under different actions can be accurately extracted, and descriptors among the feature points are calculated. By comparing the similarity of descriptors, the feature points in different images can be accurately matched, and a reliable basis is provided for subsequent depth value fusion and anomaly judgment. And analyzing the difference of the characteristic points among different action images by combining the depth values. The depth values provide three-dimensional coordinates of the feature points, which facilitate an understanding of the position and relationship of the feature points in space. By analyzing the characteristic point differences, whether the differences are caused by the abnormal phenomena such as the deficiency, tilting and the like of the ballast bed cover plate body or caused by factors such as the shooting parameters of a camera and the change of the train running speed can be judged, and the depth value fusion analysis method improves the accuracy and the comprehensiveness of the abnormal judgment. Based on the result of feature matching and depth value fusion, whether the ballast bed cover plate is abnormal or not can be accurately judged, and the abnormal position is positioned, so that the accuracy of abnormality detection is improved, timely measures are taken to repair, and the safe operation of the railway track is guaranteed. The feature extraction and matching algorithm has high calculation efficiency and can rapidly process a large amount of image data. Meanwhile, the detection method has stronger robustness to factors such as different illumination conditions, shooting angles, distances and the like by combining with the depth value for analysis, and can stably work in various complex railway track environments.
The invention is still further configured that in step S4, the judging abnormality is derived from a ballast bed cover plate body, camera shooting parameters or train running speed change, including:
comparing the matching values of the characteristic points and the changes of the depth values under different action sequences, and judging that the ballast cover plate body is abnormal if the characteristic points are failed to match or the depth values have local depth mutation and uneven surfaces;
analyzing the influence of different exposure time, focal length and aperture on the image characteristics, and judging that the shooting parameters of the camera are abnormal if the characteristic points are successfully matched but the overall depth deviation and the image blurring occur after the depth values are fused;
And setting the duration of the action sequence according to the train running speed and the camera shooting frequency, and judging that the train running speed is abnormal due to the change if the feature point matching and depth value fusion result shows motion blur and image dislocation.
In the technical scheme, when the characteristic points fail to match or the depth value has local depth mutation and uneven surface, the characteristic points are judged to be abnormal in the body of the ballast bed cover plate, and physical changes of the ballast bed cover plate, such as missing, tilting and the like, can be directly detected, so that accurate information is provided for timely taking measures to repair. When the feature points are successfully matched but the depth values are fused and then the overall depth deviation and the image blurring occur, the camera shooting parameters are judged to be abnormal, the image quality problem caused by improper camera parameter setting (such as exposure time, focal length, aperture and the like) can be identified, and the camera parameters can be adjusted to acquire images with higher quality. And setting the duration of the action sequence according to the train running speed and the camera shooting frequency, and judging that the train running speed is abnormal caused by the change of the train running speed when the motion blur and the image dislocation occur in the result of feature point matching and depth value fusion, so that the influence of the train running speed change on the image acquisition and detection process can be detected, and the method is beneficial to optimizing a detection algorithm to adapt to different train running speeds. By comprehensively considering a plurality of factors to judge the abnormal source, misjudgment and missed judgment caused by single factor judgment are avoided, the accuracy of abnormal judgment is improved, and the detection method is more comprehensive and reliable.
The invention is still further configured that in step S5, the constructing the ghost rule model based on the abnormal judgment result includes:
Adopting BakeMesh method, copying the geometric model of the ballast bed cover plate, and adjusting the transparency and position at different time points to create the ghost effect;
Performing post-processing on the acquired ballast bed cover plate image by using a screen post-processing technology to generate a ghost effect, and analyzing the movement track and state change of the ballast bed cover plate by comparing ghost images at different time points;
and adjusting the vertex position of the ballast bed cover plate geometric model by a vertex deviation method, and simulating the state change of the ballast bed cover plate geometric model at different time points to generate a continuous ghost effect.
According to the technical scheme, a BakeMesh method is adopted, the transparency and the position of the ballast bed cover plate are adjusted at different time points by copying the geometric model of the ballast bed cover plate, so that a ghost effect is created, the state change of the ballast bed cover plate at different time points can be intuitively displayed, visual support is provided for analysts, and the analysts can more clearly observe the movement track and the state change trend of the ballast bed cover plate. By means of the screen post-processing technology, post-processing is carried out on the acquired ballast bed cover plate image, a ghost effect is generated, the fidelity of the ghost effect can be further enhanced, the ghost image is more similar to the real situation, and more accurate visual information is provided for analysts. By means of the vertex deviation method, the vertex position of the ballast bed cover plate geometric model is adjusted, state changes of the ballast bed cover plate geometric model at different time points are simulated, continuous ghost effects are generated, the generation process of the ghost effects can be controlled more finely, the ghost effects are more continuous and natural, and smoother observation experience is provided for analysts. By comparing the residual images at different time points, the movement track and state change of the ballast bed cover plate can be analyzed, so that the movement rule and state change trend of the ballast bed cover plate at different time points can be understood, and important data support is provided for subsequent abnormality detection and state evaluation. Meanwhile, by analyzing the ghost law, the future state change of the ballast bed cover plate can be predicted, and a basis is provided for taking measures in advance to repair.
The invention is still further configured that in step S5, the performing real-time correction on the subsequent image includes:
denoising and contrast enhancement preprocessing is carried out on the acquired ballast bed cover plate image according to the convolutional neural network;
integrating a multi-head self-attention module into a deep learning network to capture complex features in the track bed cover plate image;
And designing a cross-layer weighting cascade structure, fusing depth network hole and shallow information, and optimizing regression convergence of the defect boundary.
In the technical scheme, the collected ballast bed cover plate image is subjected to denoising and contrast enhancement pretreatment through the convolutional neural network, so that noise in the image is effectively eliminated, the definition and contrast of the image are improved, the subsequent feature extraction and defect detection are more accurate, and higher-quality image data is provided for the whole detection flow. The multi-head self-attention module is integrated into the deep learning network, so that the network can capture complex features in the track bed cover plate image, a self-attention mechanism can pay attention to key information in the image, and the multi-head design can capture features in different aspects, so that the diversity and the robustness of feature extraction are improved, the state of the track bed cover plate can be more comprehensively understood, and the accuracy of anomaly detection is improved. The cross-layer weighting cascade structure is designed, the hole view and shallow layer information of the depth network are fused, regression convergence of the defect boundary is optimized, advantages of the depth network and the shallow layer network can be fully utilized, detection accuracy and convergence speed of the defect boundary are improved, a detection model can more accurately position the defect position of the ballast bed cover plate, and more accurate information is provided for subsequent repair work. The detection model can be dynamically adjusted, the method is suitable for image changes at different time points and in environments, and the real-time performance and accuracy of detection are improved. The whole detection process is more efficient and reliable, and powerful support is provided for detecting the abnormality of the ballast cover plate of the railway track.
The present invention is still further configured such that, in step S5, the generating the abnormal candidate area through the area proposal network includes:
Extracting implicit semantic features from an original input picture according to a convolutional neural network;
the regional proposal network learns through a supervised learning method, and generates a group of target proposals at each position of the feature map, wherein the target proposals serve as abnormal candidate regions;
classifying and position regression are carried out on candidate areas generated by the area proposal network, and the characteristics of railway images are learned through training a large amount of data.
According to the technical scheme, the regional proposal network learns through a supervised learning method, a group of target proposals are generated at each position of the feature map and used as abnormal candidate regions, the candidate regions can be generated efficiently, the calculation amount of all abnormal candidate regions in the traditional method is avoided, and the detection efficiency is greatly improved. The target proposal generated by the regional proposal network is based on the implicit semantic features extracted from the original input picture by the convolutional neural network, and key information in the image can be captured, so that the generated target proposal can more accurately locate abnormal candidate regions. This helps the subsequent classification and location regression steps to more accurately determine anomalies. Classifying and position regression are carried out on candidate areas generated by the area proposal network, and the characteristics of railway images are learned through training a large amount of data. Classification and position regression can be enabled to be more accurate, and therefore detection accuracy is improved. Meanwhile, the candidate areas are subjected to preliminary screening, and the follow-up treatment only needs to pay attention to the areas, so that the detection precision is further improved. The regional proposal network learns and generates candidate regions through a supervised learning method, so that the method can adapt to the detection of the abnormity of the railway track ballast cover plate under different scenes. The method can generate accurate candidate areas no matter the illumination conditions, the shooting angles or the ballast bed cover plate types are different, and a reliable basis is provided for subsequent detection.
The invention is further arranged that the optical axis of the camera and the plane of the ballast bed form a certain included angle so as to ensure that the visual field of the two cameras completely covers the area of the ballast bed cover plate, and the calculation formula of the included angle between the optical axis of the camera and the plane of the ballast bed is as follows:
;
Wherein θ is the angle between the optical axis of the camera and the plane of the ballast bed, W is the width of the ballast bed, and H is the height of the camera relative to the plane of the ballast bed when the train is running.
The method has the beneficial effects that (1) the depth value of the ballast bed cover plate is obtained, the abnormal tilting of the cover plate is identified, the image is subjected to real-time compensation processing, and the detection precision and efficiency are improved; (2) synchronously acquiring images of a track area from different angles through at least two cameras, simulating a binocular vision principle, accurately calculating the depth value of a ballast bed cover plate, constructing a fine three-dimensional model, providing abundant three-dimensional space data for subsequent abnormal detection, helping to more comprehensively understand the state of the ballast bed cover plate, carrying out real-time compensation processing on the images in the high-speed running process of a train, effectively eliminating motion blur and enhancing contrast, ensuring that clear and high-quality images can be acquired even in the high-speed motion environment, setting periodic action sequences comprising different illumination intensities, focal length adjustment and shooting frame rate change, setting the duration of each action according to the running speed of the train and the shooting frequency of the camera, enabling the detection method to adapt to different environmental conditions, improving the robustness and applicability of detection, extracting the characteristic points of the images under each action, accurately judging whether the abnormality is sourced from the ballast bed cover plate body, the camera shooting parameters or the train running speed change, comprehensively considering various factors, improving the accuracy and the comprehensive judgment, comprehensively judging the safety, accurately judging the position of the abnormal bed, accurately correcting the abnormal position by utilizing the network, accurately classifying and accurately setting the abnormal position, accurately classifying the abnormal position, and the network, and accurately classifying the abnormal position, and the network, and the abnormal position and the like are only being constructed by using the candidate network, and the detection efficiency is also remarkably improved.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the present invention more apparent, the present invention will be described in further detail with reference to the accompanying drawings and examples, it being understood that the detailed description herein is merely a preferred embodiment of the present invention, which is intended to illustrate the present invention, and not to limit the scope of the invention, as all other embodiments obtained by those skilled in the art without making any inventive effort fall within the scope of the present invention.
As shown in fig. 1 to 4, as a first embodiment of the present invention, a track bed cover abnormality detection method of a railway track is characterized by comprising the steps of:
S1, synchronously acquiring track area images from different angles by using at least two cameras, calculating depth values of a track bed cover plate according to parallax of the same target track area in different camera imaging, and constructing a track bed cover plate three-dimensional model;
s2, performing real-time compensation processing on the images in the high-speed running process of the train;
s3, setting a periodic action sequence comprising different illumination intensities, focal length adjustment and shooting frame rate change, setting the duration of each action according to the train running speed and the camera shooting frequency, and collecting a plurality of groups of track images in each action duration;
S4, extracting characteristic points of the images under each action, carrying out characteristic matching and depth value fusion, and judging that the abnormality is caused by the change of the ballast bed cover plate body, the camera shooting parameters or the train running speed;
S5, constructing a ghost rule model based on the abnormal judgment result, correcting the subsequent image in real time, generating an abnormal candidate region through the region proposal network, classifying and position regression of the candidate region, and judging whether the ballast cover plate has the defects, the tilting abnormality and the positioning.
In the embodiment, the track area images are synchronously acquired from different angles through at least two cameras, the binocular vision principle is simulated by utilizing a stereo matching algorithm, the depth value of the ballast bed cover plate can be accurately calculated, a fine three-dimensional model is built, abundant stereo space data are provided for subsequent anomaly detection, and the state of the ballast bed cover plate is better understood comprehensively. In the high-speed running process of the train, the real-time compensation processing is carried out on the images, so that the motion blur is effectively eliminated, the contrast is enhanced, and the clear and high-quality images can be obtained even in a high-speed motion environment. The method has the advantages that the periodic action sequences comprising different illumination intensities, focal length adjustment and shooting frame rate change are set, and the duration of each action is set according to the train running speed and the camera shooting frequency, so that the detection method can adapt to different environmental conditions, and the robustness and the applicability of detection are improved. The characteristic points of the images under each action are extracted, and the characteristic matching and depth value fusion are carried out, so that whether the abnormality is caused by the ballast bed cover plate body, the camera shooting parameters or the train running speed change can be accurately judged, various factors are comprehensively considered, and the accuracy and the comprehensiveness of abnormality judgment are improved. The method has the advantages that the ghost rule model is built based on the abnormal judgment result, the follow-up image is corrected and analyzed in real time by utilizing the deep learning network, abnormal candidate areas are generated through the area proposal network, classification and position regression are performed, the accurate positioning and classification of the defects, tilting and other anomalies of the ballast bed cover plate can be realized, the detection accuracy is improved, and the detection efficiency is remarkably improved.
In one embodiment of the invention, the method further comprises camera setting optimization, the camera setting optimization being:
setting a camera to shoot at three different positions, selecting positions according to the layout of a ballast bed cover plate and an abnormal candidate region, controlling the camera to switch at the different positions through a mechanical device, calibrating internal parameters and external parameters of the camera by shooting images of a calibration plate with known size after each switch, comparing the image differences at the different positions, splicing the images by using an image splicing algorithm, and analyzing the image differences at the different positions in the spliced images to assist in judging the abnormal reasons;
Or three cameras are arranged at the same position to shoot images from different angles or adopt different parameters, when shooting is carried out at different angles, angle selection ensures that different side information of a track area cover plate is acquired, when shooting is carried out at different parameters, the parameters comprise exposure time, focal length and aperture, when the shooting is carried out at different parameters, the automatic control and synchronous shooting technology is adopted to ensure that the image time reference is the same, when comparing the images, the image registration and fusion technology is adopted to decompose the images into sub-bands with different scales, the weighted average method is adopted to fuse the sub-band characteristics of the images of the different cameras, a corresponding relation model of image difference and anomaly factors is established, and the anomaly cause is determined according to the difference point.
According to the technical scheme, a single camera is controlled to be switched at three different positions through the mechanical device, so that a multi-position camera switching strategy is formed, and the camera can be ensured to cover all areas of the ballast bed cover plate, particularly the areas easy to be abnormal. After each switching, the calibration device is used for shooting the images of the calibration plates with known sizes, and the internal parameters and the external parameters of the camera are accurately calibrated, so that the images shot at different positions are ensured to have consistent geometric relations, and a solid foundation is laid for subsequent image splicing and difference analysis. And images shot at different positions are spliced into a complete image in a seamless mode by utilizing an image splicing algorithm, so that detection personnel can observe the state of the ballast cover plate comprehensively. Meanwhile, the difference of images at different positions in the spliced image is analyzed, so that the abnormality cause can be accurately and assisted to be judged, and the detection accuracy and efficiency are improved.
Three cameras are arranged at the same position, images are shot from different angles or with different parameters (such as exposure time, focal length, aperture and the like), a multi-camera array strategy is formed, more comprehensive and various information of the ballast bed cover plate is obtained, and the shooting mode of the multi-angle and multi-parameter is beneficial to capturing fine changes of the ballast bed cover plate and provides more clues for abnormality detection. By adopting the image registration and fusion technology, images shot by different cameras are accurately aligned and fused, the fused images not only retain useful information shot by each camera, but also fuse the characteristics of sub-bands with different scales through a weighted average method, so that the image characteristics are further enriched, and the accuracy of anomaly detection is improved. The corresponding relation model of the image difference and the abnormal factors is established, the abnormal reasons are determined according to the difference points in the fusion image, and various factors such as illumination change and shooting angle difference can be comprehensively considered, so that whether the abnormality is caused by a ballast bed cover plate body or other external factors can be accurately judged.
It will be appreciated that image registration is the process of matching, overlaying two or more images acquired at different times, with different sensors (imaging devices) or under different conditions (weather, illuminance, camera position and angle, etc.). The method comprises the specific steps of feature detection, matching, conversion model calculation and image resampling. Feature detection may be manual or automatic detection of salient and unique objects (e.g., closed boundary regions, edges, contours, intersections, corner points, etc.). Feature matching is then the establishment of a correlation between scene image and reference image features. The transformation model computes the type and parameters of the mapping function used to align the sensed image with the reference image. Image resampling is the conversion of the sensed image using a mapping function and the computation of image values for non-integer coordinates using a suitable interpolation technique.
It can be understood that the image fusion is to extract the beneficial information in the respective channels to the maximum extent through image processing, computer technology and the like from the image data about the same target acquired by the multi-source channels, and finally integrate the beneficial information into a high-quality image. Image fusion aims at improving image quality and interpretation accuracy, and improving reliability of computer interpretation and spatial resolution and spectral resolution of an original image. The fusion method comprises multi-sensor image fusion (such as visible light image and infrared image fusion) and single-sensor multi-focus image fusion.
In one embodiment of the invention, in step S1, according to the parallax of the same target track area in different camera images, calculating the depth value of the ballast bed cover plate comprises dividing one camera acquired image into a plurality of small image blocks, searching the most similar area in the other camera image, calculating the displacement of the image blocks to obtain the parallax of the pixel points, calculating the depth value according to the triangulation principle, and constructing the three-dimensional model of the ballast bed cover plate.
According to the technical scheme, an image acquired by one camera is divided into a plurality of small image blocks, the most similar area is searched in the other camera image, the parallax of the pixel points is obtained by calculating the displacement of the image blocks, and then the depth value of the road bed cover plate is accurately calculated according to the triangulation principle. By using the depth value obtained by calculation, a three-dimensional model of the track bed cover plate can be constructed, the shape, the position and the spatial relation of the track bed cover plate can be intuitively displayed, abundant three-dimensional space data are provided for subsequent anomaly detection, and through the three-dimensional model, a detector can more comprehensively know the state of the track bed cover plate, thereby being beneficial to finding potential anomalies or defects. Based on the depth value calculated accurately and the constructed three-dimensional model, fine detection of the ballast bed cover plate can be achieved. By comparing the three-dimensional model with the model in the normal state, the abnormity or deformation of the ballast bed cover plate can be found more easily, the accuracy of abnormity detection is improved, and potential safety hazards can be found in advance. The method for simulating the binocular vision principle by the stereo matching algorithm has stronger robustness, can stably work under different illumination conditions, shooting angles and distances, and can adapt to various complicated railway track environments, so that the stability and the reliability of the system are improved.
It will be appreciated that in stereo matching, the most similar region means that most points visible in one view are also visible in the other view, and the matched image regions are similar in appearance. In order to find the most similar areas, a closely related method is typically used, i.e. for each pixel, the matching point to which it is most similar is found in another image, which can be done by calculating the similarity of small windows (patches) around the pixel, e.g. using a sum of squares or a cross correlation method.
It will be appreciated that triangulation is a key technique for acquiring three-dimensional information in computer vision, which uses epipolar geometry and homography to solve for camera motion and feature point depth. Specifically, for matching feature points in two images, their coordinates in three-dimensional space can be calculated by the principle of triangulation. The principle of triangulation involves epipolar geometry constraints and homography, which typically requires approximation of the depth of a feature point by least squares, because in actual operation, two lines of sight (a line connecting the two camera optical centers to the feature point) often cannot intersect exactly due to noise.
It can be appreciated that the method for establishing the three-dimensional model of the ballast bed cover plate is similar to that of a steel rail, and can be constructed by a two-dimensional contour line reconstruction three-dimensional entity technology. The key point is to calculate the position of the ballast bed cover plate, which can be calculated according to the position and the track gauge of the central line of the line. By acquiring the two-dimensional contour line of the ballast bed cover plate and utilizing the three-dimensional reconstruction technology in computer graphics, a three-dimensional model of the ballast bed cover plate can be constructed, so that the structure and the state of the ballast bed cover plate can be displayed and analyzed more intuitively.
In one embodiment of the present invention, in step S2, the performing real-time compensation processing on the image during the high-speed running process of the train includes:
Calculating the motion blur degree of an image according to the train running speed and camera shooting parameters by adopting an algorithm based on a motion blur model, and recovering a blurred image by an inverse filtering method;
extracting feature points from continuous frame images by a feature point detection algorithm, calculating motion vectors between adjacent frames of the feature points according to an optical flow method to obtain overall motion information of the images, reversely compensating the blurred images based on the overall motion information of the images, resampling by a bilinear interpolation algorithm, and carrying out regional treatment on the images according to a self-adaptive histogram equalization algorithm.
According to the technical scheme, the motion blur degree of the image can be accurately calculated by combining the driving speed of the train and the shooting parameters of the camera based on the motion blur model algorithm. The fuzzy image is restored by the inverse filtering method, so that the image blurring phenomenon caused by high-speed movement of the train is effectively eliminated, the image edge is clearer, and the details are richer. And extracting feature points from the continuous frame images by using a feature point detection algorithm, and calculating motion vectors between adjacent frames of the feature points by using an optical flow method, so as to obtain the overall motion information of the images. Based on this information, the blurred image is compensated reversely, and image distortion due to motion blur is corrected. And then resampling the image by adopting a bilinear interpolation algorithm, further smoothing the image, eliminating saw teeth or distortion phenomenon generated in the compensation process, and obviously improving the image quality. And carrying out regional treatment on the image by adopting an adaptive histogram equalization algorithm. The algorithm can automatically adjust the contrast according to the brightness distribution of different areas of the image, so that the details of dark parts in the image are clearer and the details of bright parts are richer. Meanwhile, the problem of noise amplification and detail loss caused by global histogram equalization can be avoided by the regional processing mode, so that the image contrast is more naturally and uniformly improved. By enhancing the contrast of the image, the characteristics of textures, edges and the like of the track bed cover plate are more outstanding, and the subsequent anomaly detection algorithm is helpful for more accurately identifying the anomaly phenomena such as missing, tilting and the like of the track bed cover plate. Meanwhile, the contrast is improved, so that a detector can observe the image more clearly, and the detection efficiency and accuracy are improved.
It will be appreciated that algorithms based on motion blur models are used to simulate and handle image blur due to rapid movement of objects. Motion blur algorithms include linear motion blur, rotational motion blur, scaled motion blur, and the like. These algorithms are generally based on the property of visual inertia that, when the light applied to the human eye suddenly disappears, the sensation of brightness does not disappear immediately, but instead drops approximately exponentially and gradually disappears. By simulating such a motion blur effect, an image can be deblurred or an image having a motion blur effect can be generated.
It will be appreciated that there are a number of methods for calculating the degree of motion blur of an image, including fourier transform, wavelet transform, laplace operator, gradient method, and the like. The Fourier transform method realizes high-pass filtering by shielding the central area of the spectrogram, retains high-frequency information such as image edges and the like, and evaluates the blurring degree by solving the average value of the spectrogram. The wavelet transformation rule utilizes wavelet transformation to carry out multi-scale decomposition on an image, extracts high-frequency detail information, and judges the degree of blurring by analyzing the energy distribution of the detail information. The Laplace operator method and the gradient rule respectively reflect the edge information by calculating a second derivative graph and a gradient of the image, so as to evaluate the blurring degree.
It will be appreciated that feature point detection algorithms are used to detect points with significant features in an image, such as corner points, edge points, etc. Common feature point detection algorithms include FAST, SURF, SIFT, and the like. The FAST algorithm detects corner points by comparing the brightness of pixels, and has the characteristic of high speed. The SURF and SIFT algorithm extracts feature points by constructing a scale pyramid and calculating the principal direction of key points, has scale invariance and rotation invariance, and is suitable for detecting the feature points of images with different scales and rotation angles.
It will be appreciated that optical flow is a technique in computer vision for calculating the motion of each pixel in an image between successive frames. The Lucas-Kanade optical flow algorithm is a commonly used optical flow algorithm that calculates the motion vectors of pixels by matching images within a local window and assuming that the pixels within the window have the same motion. The algorithm computes motion vectors for pixels within a window by minimizing an error function, typically involving solving a system of linear equations. The optical flow method is widely applied in the fields of motion calculation, target tracking, video compression and the like.
It will be appreciated that bilinear interpolation is an image interpolation algorithm that calculates the value of a new image pixel during image scaling, rotation, etc. The algorithm calculates the value of the new image pixel by using the pixel values of four nearest neighbors in the original image through a bilinear interpolation formula. Bilinear interpolation algorithm is widely applied in image processing and computer vision, and can better maintain the smoothness and continuity of images.
It will be appreciated that an adaptive histogram equalization algorithm is a technique for image enhancement that changes the image contrast by computing the local histogram of the image and redistributing the brightness. Unlike conventional histogram equalization methods, adaptive histogram equalization is equalization based on local regions of the image, thereby avoiding excessive enhancement or distortion problems due to global equalization. The algorithm can remarkably improve the contrast of local areas, preserve image details and is suitable for images with uneven contrast. In the method for detecting the abnormality of the ballast cover plate of the railway track, the self-adaptive histogram equalization algorithm can be used for carrying out enhancement processing on the acquired image of the ballast cover plate, and the contrast and the definition of the image are improved, so that the abnormality of the ballast cover plate is detected more accurately.
It will be appreciated that recovering the blurred image by the inverse filtering method comprises the steps of:
performing Fourier transform on the blurred image to convert the blurred image from a space domain to a frequency domain, so as to obtain a blurred function;
Calculating the Fourier transform of the fuzzy function;
In the frequency domain, obtaining an estimate of the Fourier transform of the original image by dividing the blurring function by the Fourier transform of the blurring function;
And performing inverse Fourier transform on the estimation of the Fourier transform of the original image, and converting the estimation of the Fourier transform of the original image back to a space domain to obtain a restored image.
In step S3, extracting the characteristic points of the images under each action, and carrying out characteristic matching and depth value fusion comprises the steps of processing the photographed images under different actions by using an image characteristic extraction and matching algorithm, extracting the characteristic points, calculating descriptors among the characteristic points, matching the characteristic points by comparing the similarity of the descriptors, and analyzing the characteristic point differences among the images of different actions by combining the depth values.
According to the technical scheme, the image feature extraction and matching algorithm is utilized, the salient feature points in the photographed images under different actions can be accurately extracted, and descriptors among the feature points are calculated. By comparing the similarity of descriptors, the feature points in different images can be accurately matched, and a reliable basis is provided for subsequent depth value fusion and anomaly judgment. And analyzing the difference of the characteristic points among different action images by combining the depth values. The depth values provide three-dimensional coordinates of the feature points, which facilitate an understanding of the position and relationship of the feature points in space. By analyzing the characteristic point differences, whether the differences are caused by the abnormal phenomena such as the deficiency, tilting and the like of the ballast bed cover plate body or caused by factors such as the shooting parameters of a camera and the change of the train running speed can be judged, and the depth value fusion analysis method improves the accuracy and the comprehensiveness of the abnormal judgment. Based on the result of feature matching and depth value fusion, whether the ballast bed cover plate is abnormal or not can be accurately judged, and the abnormal position is positioned, so that the accuracy of abnormality detection is improved, timely measures are taken to repair, and the safe operation of the railway track is guaranteed. The feature extraction and matching algorithm has high calculation efficiency and can rapidly process a large amount of image data. Meanwhile, the detection method has stronger robustness to factors such as different illumination conditions, shooting angles, distances and the like by combining with the depth value for analysis, and can stably work in various complex railway track environments.
Preferably, in step S4, the determining that the abnormality is caused by a ballast cover body, a camera shooting parameter or a change in a running speed of the train includes:
comparing the matching values of the characteristic points and the changes of the depth values under different action sequences, and judging that the ballast cover plate body is abnormal if the characteristic points are failed to match or the depth values have local depth mutation and uneven surfaces;
analyzing the influence of different exposure time, focal length and aperture on the image characteristics, and judging that the shooting parameters of the camera are abnormal if the characteristic points are successfully matched but the overall depth deviation and the image blurring occur after the depth values are fused;
And setting the duration of the action sequence according to the train running speed and the camera shooting frequency, and judging that the train running speed is abnormal due to the change if the feature point matching and depth value fusion result shows motion blur and image dislocation.
In the technical scheme, when the characteristic points fail to match or the depth value has local depth mutation and uneven surface, the characteristic points are judged to be abnormal in the body of the ballast bed cover plate, and physical changes of the ballast bed cover plate, such as missing, tilting and the like, can be directly detected, so that accurate information is provided for timely taking measures to repair. When the feature points are successfully matched but the depth values are fused and then the overall depth deviation and the image blurring occur, the camera shooting parameters are judged to be abnormal, the image quality problem caused by improper camera parameter setting (such as exposure time, focal length, aperture and the like) can be identified, and the camera parameters can be adjusted to acquire images with higher quality. And setting the duration of the action sequence according to the train running speed and the camera shooting frequency, and judging that the train running speed is abnormal caused by the change of the train running speed when the motion blur and the image dislocation occur in the result of feature point matching and depth value fusion, so that the influence of the train running speed change on the image acquisition and detection process can be detected, and the method is beneficial to optimizing a detection algorithm to adapt to different train running speeds. By comprehensively considering a plurality of factors to judge the abnormal source, misjudgment and missed judgment caused by single factor judgment are avoided, the accuracy of abnormal judgment is improved, and the detection method is more comprehensive and reliable.
In step S5, the constructing the ghost rule model based on the abnormal result includes:
Adopting BakeMesh method, copying the geometric model of the ballast bed cover plate, and adjusting the transparency and position at different time points to create the ghost effect;
Performing post-processing on the acquired ballast bed cover plate image by using a screen post-processing technology to generate a ghost effect, and analyzing the movement track and state change of the ballast bed cover plate by comparing ghost images at different time points;
and adjusting the vertex position of the ballast bed cover plate geometric model by a vertex deviation method, and simulating the state change of the ballast bed cover plate geometric model at different time points to generate a continuous ghost effect.
According to the technical scheme, a BakeMesh method is adopted, the transparency and the position of the ballast bed cover plate are adjusted at different time points by copying the geometric model of the ballast bed cover plate, so that a ghost effect is created, the state change of the ballast bed cover plate at different time points can be intuitively displayed, visual support is provided for analysts, and the analysts can more clearly observe the movement track and the state change trend of the ballast bed cover plate. By means of the screen post-processing technology, post-processing is carried out on the acquired ballast bed cover plate image, a ghost effect is generated, the fidelity of the ghost effect can be further enhanced, the ghost image is more similar to the real situation, and more accurate visual information is provided for analysts. By means of the vertex deviation method, the vertex position of the ballast bed cover plate geometric model is adjusted, state changes of the ballast bed cover plate geometric model at different time points are simulated, continuous ghost effects are generated, the generation process of the ghost effects can be controlled more finely, the ghost effects are more continuous and natural, and smoother observation experience is provided for analysts. By comparing the residual images at different time points, the movement track and state change of the ballast bed cover plate can be analyzed, so that the movement rule and state change trend of the ballast bed cover plate at different time points can be understood, and important data support is provided for subsequent abnormality detection and state evaluation. Meanwhile, by analyzing the ghost law, the future state change of the ballast bed cover plate can be predicted, and a basis is provided for taking measures in advance to repair.
Preferably, in step S5, the performing real-time correction on the subsequent image includes:
denoising and contrast enhancement preprocessing is carried out on the acquired ballast bed cover plate image according to the convolutional neural network;
integrating a multi-head self-attention module into a deep learning network to capture complex features in the track bed cover plate image;
And designing a cross-layer weighting cascade structure, fusing depth network hole and shallow information, and optimizing regression convergence of the defect boundary.
The collected ballast bed cover plate image is subjected to denoising and contrast enhancement pretreatment through the convolutional neural network, so that noise in the image is effectively eliminated, the definition and contrast of the image are improved, subsequent feature extraction and defect detection are more accurate, and higher-quality image data is provided for the whole detection flow. The multi-head self-attention module is integrated into the deep learning network, so that the network can capture complex features in the track bed cover plate image, a self-attention mechanism can pay attention to key information in the image, and the multi-head design can capture features in different aspects, so that the diversity and the robustness of feature extraction are improved, the state of the track bed cover plate can be more comprehensively understood, and the accuracy of anomaly detection is improved. The cross-layer weighting cascade structure is designed, the hole view and shallow layer information of the depth network are fused, regression convergence of the defect boundary is optimized, advantages of the depth network and the shallow layer network can be fully utilized, detection accuracy and convergence speed of the defect boundary are improved, a detection model can more accurately position the defect position of the ballast bed cover plate, and more accurate information is provided for subsequent repair work. The detection model can be dynamically adjusted, the method is suitable for image changes at different time points and in environments, and the real-time performance and accuracy of detection are improved. The whole detection process is more efficient and reliable, and powerful support is provided for detecting the abnormality of the ballast cover plate of the railway track.
The camera optical axis and the ballast bed plane form a certain included angle so as to ensure that the visual fields of the two cameras completely cover the ballast bed cover plate area, and the calculation formula of the included angle between the camera optical axis and the ballast bed plane is as follows:
;
Wherein θ is the angle between the optical axis of the camera and the plane of the ballast bed, W is the width of the ballast bed, and H is the height of the camera relative to the plane of the ballast bed when the train is running.
In step S5, the generating the abnormal candidate area through the area proposal network includes:
Extracting implicit semantic features from an original input picture according to a convolutional neural network;
the regional proposal network learns through a supervised learning method, and generates a group of target proposals at each position of the feature map, wherein the target proposals serve as abnormal candidate regions;
classifying and position regression are carried out on candidate areas generated by the area proposal network, and the characteristics of railway images are learned through training a large amount of data.
The regional proposal network learns through a supervised learning method, generates a group of target proposals at each position of the feature map as abnormal candidate regions, can efficiently generate the candidate regions, avoids the calculation amount of all abnormal candidate regions in the traditional method, and greatly improves the detection efficiency. The target proposal generated by the regional proposal network is based on the implicit semantic features extracted from the original input picture by the convolutional neural network, and key information in the image can be captured, so that the generated target proposal can more accurately locate abnormal candidate regions. This helps the subsequent classification and location regression steps to more accurately determine anomalies. Classifying and position regression are carried out on candidate areas generated by the area proposal network, and the characteristics of railway images are learned through training a large amount of data. Classification and position regression can be enabled to be more accurate, and therefore detection accuracy is improved. Meanwhile, the candidate areas are subjected to preliminary screening, and the follow-up treatment only needs to pay attention to the areas, so that the detection precision is further improved. The regional proposal network learns and generates candidate regions through a supervised learning method, so that the method can adapt to the detection of the abnormity of the railway track ballast cover plate under different scenes. The method can generate accurate candidate areas no matter the illumination conditions, the shooting angles or the ballast bed cover plate types are different, and a reliable basis is provided for subsequent detection.
The foregoing embodiments are provided for further explanation of the present invention and are not to be construed as limiting the scope of the present invention, and some insubstantial modifications and variations of the present invention, which are within the scope of the invention, will be suggested to those skilled in the art in light of the foregoing teachings.