A catenary image acquisition method based on Yolo
By using a contact network image acquisition method based on 3D point cloud data and the YOLO algorithm, and dynamically adjusting the exposure scheme, the problems of poor image quality and low detection reliability in existing technologies are solved, and efficient and accurate contact network detection is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SICHUAN HANRUIWEI DIGITAL TECHNOLOGY CO LTD
- Filing Date
- 2025-09-18
- Publication Date
- 2026-06-26
AI Technical Summary
In existing overhead contact line inspection technologies, the exposure scheme cannot be dynamically adjusted during image acquisition, resulting in poor image quality, increased hardware costs and image analysis difficulty, and the inability to accurately determine the position of overhead contact line components, affecting the reliability of the inspection.
By collecting 3D point cloud data of the overhead contact line, the spatial coordinates of the components are obtained. The YOLO algorithm is used to obtain a 2D mask of the environmental image. An exposure scheme is generated by combining the light and shadow interference distribution. The exposure is dynamically adjusted. The exposure scheme is adjusted using a prediction model to ensure image quality. The integrity of the components is judged by feature recognition, and secondary acquisition is performed to ensure integrity.
It improves the quality of images and the accuracy of inspection of overhead contact line components, reduces the consumption of computing resources, and enhances the reliability of the system and the efficiency of image acquisition.
Smart Images

Figure CN121147181B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of overhead contact line inspection technology, and in particular to an overhead contact line image acquisition method based on YOLO. Background Technology
[0002] The overhead contact system is the core of the rail transit power supply system, directly providing electricity to trains. Wear, breakage, loosening, or foreign object intrusion in its components (such as conductors, insulators, and suspension devices) can lead to power outages, arcing, or even train stoppages. For example, excessively thin conductors can cause wire breaks, and contaminated insulators can cause short circuits. Regular inspections can detect potential hazards early and prevent major safety accidents. Traditional manual inspections must be conducted during nighttime "maintenance windows," which are inefficient and prone to omissions.
[0003] Existing technologies employ overhead contact line suspension status detection and monitoring devices to achieve high-definition imaging of overhead contact line components. Image analysis is then used to identify defects in these components. This technology can significantly shorten the inspection cycle and reduce reliance on manual labor.
[0004] However, existing monitoring devices require the use of railway tracks, have poor timeliness, and long monitoring cycles. Furthermore, while current technologies employ a strategy of simultaneously capturing images from multiple cameras at different angles, and this data overlay can cover most of the overhead contact line components, it significantly increases the difficulty of image analysis and reduces the accuracy of image recognition. It also greatly increases hardware costs.
[0005] Meanwhile, existing technologies cannot accurately determine the position of overhead contact line components, and often adopt a strategy of continuous shooting. This undoubtedly greatly increases the amount of shooting data, increases the cost of data storage and analysis, and the exposure scheme used in the continuous shooting scheme during the above image acquisition process often cannot be dynamically adjusted to follow the shooting of overhead contact line components.
[0006] However, different overhead contact line components often require different exposure intensities and areas due to differences in materials, locations, and ambient lighting. Existing technologies use a uniform exposure scheme, which is difficult to adapt to the actual imaging needs of various components, thus affecting the quality of the final image and limiting the reliability of defect detection. Summary of the Invention
[0007] The purpose of this invention is to provide a YOLO-based method for acquiring contact network images to solve the above-mentioned problems.
[0008] This invention is achieved through the following technical solution:
[0009] A YOLO-based method for acquiring contact network images, comprising:
[0010] S1: Collect three-dimensional point cloud data of the overhead contact line and obtain the spatial coordinates of the overhead contact line components based on the three-dimensional point cloud data;
[0011] S2: Based on the spatial coordinates, obtain the environmental image of the contact wire components, use the YOLO algorithm to obtain the two-dimensional mask of the environmental image, find the maximum connected component of the two-dimensional mask, and obtain the sequence of contour points of the contact wire components in the environmental image through the boundary tracking algorithm. Connect the contour points end to end to form a closed curve, thereby realizing the selection of the contact wire components and obtaining the image area of the contact wire components.
[0012] S3: Obtain an exposure scheme based on the light and shadow interference distribution of the image area of the contact wire components in the historical environmental image, where light and shadow interference includes light spots and shadows. Use the exposure scheme to control the flash. When the industrial camera acquires the image of the contact wire components, exposure is performed to obtain the exposed image of the contact wire components.
[0013] S4: Use the YOLO algorithm to perform feature recognition on the exposed image of the contact wire components, and determine whether the contact wire components in the exposed image are complete based on the feature recognition results. When the contact wire components in the exposed image are incomplete, perform secondary image acquisition on the contact wire components, and repeat this step until the contact wire components are complete, thereby obtaining the contact wire component image of the contact wire components.
[0014] Furthermore, in S3, the methods for obtaining the exposure scheme include:
[0015] S31: Take several historical environmental images and obtain the types of catenary components based on the historical environmental images. The types of catenary components include the structure, material and processing technology of the components.
[0016] S32: Acquire historical environmental images to determine the acquisition location and external light source of historical environmental images;
[0017] The historical environmental image acquisition location and external light source are input into the prediction model to obtain the light and shadow interference prediction model. The light and shadow interference prediction model is a multi-task model architecture, which includes two sub-task models. Specifically, it includes a spot prediction model for outputting the first brightness value and a shadow prediction model for outputting the second brightness value.
[0018] S33: Based on the type of the contact wire component and its spatial coordinates on the corresponding line, including the position of the contact wire component on its corresponding line and the installation height of the contact wire component, combined with the parameters of the equipment for acquiring images of the contact wire component and the rules for acquiring images of each contact wire component, determine the optimal position for image acquisition.
[0019] S34: Before acquiring environmental images, the optimal acquisition positions of images of each contact wire component on the line and the known external light sources on the line are input into the spot prediction model to predict the spot position of the environmental image acquired at the optimal position. The optimal acquisition positions of images of each contact wire component on the line and the known external light sources on the line are input into the shadow prediction model to predict the shadow position of the environmental image acquired at the optimal position. Based on the spot position and shadow position, a first predicted brightness value and a second predicted brightness value are obtained. Based on the first predicted brightness value and the second predicted brightness value, a first predicted exposure scheme is generated. The first brightness value is the rightmost brightness value in the brightness histogram of the historical environmental image, i.e., the brightness value with the largest value. The second brightness value is the leftmost brightness value in the brightness histogram of the historical environmental image, i.e., the brightness value with the smallest value.
[0020] S35: At the optimal position, environmental image acquisition is performed to obtain a first acquired environmental image, the type of contact wire component is obtained, and the first and second captured brightness values of the image area of the contact wire component in the environmental image are obtained. The first captured brightness value is compared with the first predicted brightness value, and the second captured brightness value is compared with the second predicted brightness value. Based on the comparison result, it is determined whether the light and shadow interference of the environmental image is caused by the detected external light source.
[0021] Furthermore, the step in S35 to determine whether the light and shadow interference in the environmental image is caused by a known external light source is as follows:
[0022] S351: Calculate the difference between the first captured brightness value and the first predicted brightness value, and at the same time calculate the difference between the second captured brightness value and the second predicted brightness value;
[0023] S352: When the difference between the first captured brightness value and the first predicted brightness value is less than the preset maximum value and the difference between the second captured brightness value and the second predicted brightness value is less than the preset maximum value, the actual light and shadow interference position of the environmental image corresponds to the predicted light and shadow interference position, and the light and shadow interference in the environmental image is caused by the detected external light source.
[0024] When the difference between the first captured brightness value and the first predicted brightness value is not less than the preset maximum value, or the difference between the second captured brightness value and the second predicted brightness value is not less than the preset maximum value, the actual light and shadow interference position of the environmental image does not correspond to the predicted light and shadow interference position, then there is an undetected external light source on the shooting line.
[0025] Furthermore, in S35, after generating the second predictive exposure scheme, the first predictive exposure scheme for the remaining contact wire components on the line is modified based on the location and type of the unknown external light source.
[0026] Furthermore, in S32, environmental parameters of historical environmental images are obtained, and the prediction model is trained based on the environmental parameters.
[0027] Furthermore, environmental parameters include the geographical location, weather, time zone, and time of environmental image acquisition.
[0028] Furthermore, in S33, while inputting spatial location coordinates into the prediction model, weather forecast information is also input into the prediction model.
[0029] Furthermore, in S4, the step of determining whether the contact wire components in the exposed image are complete includes: performing feature recognition and extraction on the exposed image of the contact wire components to obtain feature parameters that can be used for classification; determining the type of contact wire components collected this time based on the feature parameters; simultaneously performing grayscale processing on the exposed image to obtain grayscale values; calculating the average grayscale value of the exposed image; and using the average grayscale value as a threshold.
[0030] The exposed image is initially segmented to obtain initial blocks, and the initial grayscale value of the initial blocks is calculated. The difference between the initial grayscale value and a threshold is calculated, and only the initial blocks with a difference not less than a preset maximum value are selected for secondary segmentation to obtain sub-blocks. The average grayscale value of all pixels in each sub-block is calculated, and the original position of the sub-block within the initial block is obtained. Sub-blocks whose grayscale values differ from those of their neighboring sub-blocks are selected to obtain target sub-blocks. These target sub-blocks are used as judgment blocks to determine the high-risk and complex structures of the contact wire components based on their type. The initial block with the most high-risk and complex structures is selected as the theoretical imaging blind zone. When the difference between the initial block with the most blocks and the theoretical blind zone is greater than a preset maximum value, it is determined that the exposure image acquired this time has data loss. At this time, a second image acquisition is performed on the detection target point. When the difference between the initial block with the most blocks and the theoretical blind zone is not greater than the preset maximum value, it is determined that the exposure image acquired this time has no data loss, and a second image acquisition is not performed. That is, the exposure image acquired this time is retained for subsequent fault inspection of contact network components.
[0031] Furthermore, in S4, during the secondary image acquisition, the cause of data loss in the exposed image is determined based on the average grayscale value of the exposed image. If the data loss is caused by underexposure, the exposure position is aligned with the location of the blind zone. If the data loss is caused by overexposure, the control adjustment component moves the exposure position away from the blind zone.
[0032] Furthermore, a track inspection vehicle, applied to the aforementioned YOLO-based contact network image acquisition method, includes a traveling mechanism, a 3D point cloud scanning module, an imaging system, an obstacle avoidance module, and a control system. The 3D point cloud scanning module, imaging system, obstacle avoidance module, and control system are all mounted on the traveling mechanism. The 3D point cloud scanning module acquires 3D point cloud data of the contact network. The imaging system captures environmental images and images of contact network components. The obstacle avoidance module acquires the positional relationship between obstacles and the inspection vehicle. The traveling mechanism drives the 3D point cloud scanning module, the imaging system, and the obstacle avoidance module to move. The control system controls the imaging system based on the 3D point cloud data and the environmental images. The control system also controls the traveling mechanism based on the positional relationship and the 3D point cloud data.
[0033] Compared with the prior art, the invention has the following advantages and beneficial effects:
[0034] 1. This invention acquires environmental images and uses these images to determine the brightness and other environmental conditions of the contact wire components. Based on the determination results, a corresponding exposure scheme is generated, thereby achieving dynamic adjustment of the exposure scheme during the acquisition of contact wire component images. Compared with existing technologies, this solution can significantly improve the quality of the final acquired contact wire component images, thereby improving the accuracy of subsequent contact wire fault inspection based on contact wire component images.
[0035] 2. This invention also trains a prediction model to generate exposure prediction schemes for each contact wire component in the line based on the location of each contact wire component and the location of the detected external light source. The prediction schemes are adjusted according to the actual situation, and the prediction model is adjusted in real time. Compared with the prior art, the accuracy of the predicted exposure scheme obtained by the prediction model gradually improves as image acquisition progresses. This allows for the acquisition of a relatively reliable exposure scheme using only the spatial coordinates of the contact wire components and the location of the detected external light source, reducing the number of image recognition steps during contact wire component image acquisition. This improves the quality of the acquired images while reducing computational resource consumption and enhancing system reliability.
[0036] 3. In this invention, after acquiring complete images of the overhead contact system components, the correspondence between the high-risk and complex structures of the components and the blind spots in the complete images is determined to determine whether the blind spots in the acquired complete images affect the subsequent fault inspection of the overhead contact system components. If there is an impact, a second acquisition of the complete images is performed. Compared with the prior art, this solution further ensures the quality of the final acquired complete images by inspecting the complete images, reducing the probability of a second image acquisition after the entire line has been acquired. Attached Figure Description
[0037] The accompanying drawings, which are included to provide a further understanding of embodiments of the invention and form part of this application, do not constitute a limitation thereof. In the drawings:
[0038] Figure 1 This is a flowchart of the present invention;
[0039] Figure 2 This is a schematic diagram of the detection vehicle in this invention;
[0040] Figure 3 This is a cross-sectional schematic diagram of the adjustment component in this invention.
[0041] The reference numerals in the attached figures represent: 1. Traveling mechanism; 11. Lighting lamp; 12. Wheel frame; 121. Traveling wheel; 2. Imaging system; 21. Gimbal; 22. Environmental camera; 23. Industrial camera; 24. Flash; 25. Adjustment component; 251. Electromagnet; 252. Support plate; 253. Magnetic powder; 254. Permanent magnet; 3. Two-dimensional scanning radar; 4. Time-of-flight sensor. Detailed Implementation
[0042] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to embodiments and accompanying drawings. The illustrative embodiments and descriptions of this invention are for illustrative purposes only and are not intended to limit the invention. It should be noted that this invention is already in the actual research and development stage.
[0043] Example 1
[0044] like Figure 1 As shown, this embodiment includes
[0045] S1: Collect three-dimensional point cloud data of the overhead contact line and obtain the spatial coordinates of the overhead contact line components based on the three-dimensional point cloud data;
[0046] Furthermore, as an exemplary implementation, a specific implementation flow for step S1 is provided:
[0047] S11: The entire contact network is scanned by a 3D laser scanner or structured light depth camera installed on the detection equipment to obtain the original 3D point cloud data including components such as conductors, positioning tubes, and insulators;
[0048] S12: Preprocess the original 3D point cloud data, including using statistical filtering to remove noise, using voxel downsampling to reduce the amount of data, and unifying all data to a coordinate system based on the catenary support structure;
[0049] S13: Perform component segmentation on the preprocessed 3D point cloud data. Use a normal vector and region growing algorithm to divide the 3D point cloud data into different categories and perform geometric fitting on each category. For example, perform cylindrical fitting on the conductor point cloud to extract the center line.
[0050] S14: Extract key points of contact network components based on fitted geometry, including the intersection of conductor centerline and support structure, end point of positioning tube, centroid of insulator, etc., and record them in coordinate form;
[0051] S15: Based on the extracted key point coordinates, calculate the spatial straight-line distance between the detection vehicle and each contact wire component, and determine the relationship between this distance and the preset shooting distance threshold: if the actual distance reaches or is less than the threshold, control the vehicle to stop and perform image acquisition; otherwise, continue to travel along the line.
[0052] S2: Obtain the environmental image of the contact wire components, use the YOLO algorithm to obtain the two-dimensional mask of the environmental image, find the maximum connected component of the two-dimensional mask, and obtain the sequence of contour points of the contact wire components through the boundary tracking algorithm. Connect the contour points end to end to form a closed curve, thereby realizing the selection of the contact wire components and obtaining the image area of the contact wire components.
[0053] Further:
[0054] S21: Collect environmental images based on the spatial coordinates of the contact wire components, and input the environmental images into the YOLO algorithm model as input images;
[0055] The YOLO algorithm model includes an input layer, a feature extraction network, and a detection output layer. The input layer normalizes and scales the environmental image to a fixed size. The feature extraction network uses a convolutional neural network structure to extract multi-scale features from the input image and uses a feature pyramid structure to fuse large-scale structures with small-scale details, so as to adapt to the detection requirements of catenary components at different scales.
[0056] S22: In the detection output layer, the environmental image is divided into several grid cells. Each grid cell simultaneously outputs the category probability vector and bounding box parameters of the contact wire components. The bounding box parameters include the two-dimensional position coordinates of the components in the image and the confidence score of the bounding box.
[0057] S23: Perform non-maximum suppression processing on the prediction results of all grid cells, remove redundant bounding boxes, retain only the prediction boxes with the highest confidence, and generate a two-dimensional mask of the environment image based on the retained bounding boxes. The two-dimensional mask is used to represent the candidate regions of the catenary components in the environment image. Perform connected component analysis on the two-dimensional mask, extract all connected regions, and select the connected region with the largest area as the candidate region of the catenary components.
[0058] S24: Based on the maximum connected component, the boundary tracing algorithm is used to obtain the contour point sequence of the contact wire components, and the contour points are connected end to end to form a closed curve;
[0059] S25: Use closed curves to select the image area of the environment to obtain the image area of the overhead contact line components.
[0060] S3: Obtain an exposure scheme based on the light and shadow interference distribution of the image area of the contact wire components in the historical environmental image. The light and shadow interference includes light spots and shadows. Use the exposure scheme to control the flash. When the industrial camera acquires the image of the contact wire components, exposure is performed to obtain the first exposure image of the contact wire components.
[0061] The steps for obtaining the first exposure scheme include:
[0062] S31: Acquire several historical environmental images, and obtain the types of contact wire components based on the historical environmental images. The types of contact wire components include the structure, material, and processing technology of the components, as well as parameters that affect the reflection and scattering of external light on the surface of the contact wire components.
[0063] S32: Acquire historical environmental images to determine the acquisition location and external light source of historical environmental images;
[0064] The historical environmental image acquisition location and external light source are input into the prediction model to obtain the light and shadow interference prediction model. This model is a multi-task model architecture, including two sub-task models: a light spot prediction model for outputting light spot positions and a shadow prediction model for outputting shadow positions. The external light sources affecting the acquisition of the catenary image mainly include natural light sources, fixed artificial light sources, and moving artificial light sources. Based on the type of light source and the light spots and shadows caused by the same light source on different catenary components, the movement trajectory of the light source can be determined. Based on this data, the spatial coordinates of the catenary components can be correlated with the positions of light spots and shadows in the environmental image.
[0065] Simultaneously, environmental parameters during image acquisition of the aforementioned overhead contact line components are obtained from existing database resources. These environmental parameters include the geographical location (longitude, latitude, altitude, solar altitude angle, and azimuth angle, etc.), weather conditions (cloud cover, aerosol optical thickness, etc.), time zone, and the time of image acquisition, all of which affect the location and intensity of natural light sources. Using these parameters, when acquiring the location and time of environmental image capture, the position of the sun and the intensity of sunlight at that specific location and time can be determined, thus enabling the prediction of the intensity and trajectory of natural light sources (i.e., the sun). Furthermore, during the use of the prediction model, real-time meteorological data is used to calibrate the intensity and trajectory of natural light sources to improve the accuracy of the prediction model.
[0066] Furthermore, a joint loss function is used to train the model. Specifically, weight factors are assigned to the spatial distribution errors predicted by the spot model and the spatial distribution errors predicted by the shadow model, and joint loss is calculated.
[0067] S33: Based on the type of the overhead contact line component and its spatial coordinates on the corresponding line, including the position of the overhead contact line component on its corresponding line and the installation height of the overhead contact line component, and in combination with the parameters of the equipment for acquiring images of the overhead contact line component and the rules for acquiring images of each overhead contact line component, determine the optimal position for image acquisition.
[0068] In other words, during the subsequent image acquisition process, after obtaining the position of the contact wire component (i.e., the spatial coordinates of the corresponding contact wire component) using 3D point cloud data, the optimal position for acquiring the image of that contact wire component can be determined.
[0069] S34: Before acquiring environmental images, the optimal acquisition positions of each contact wire component on the line and the known external light sources on the line are input into the spot prediction model to predict the spot position of the environmental image acquired at the optimal position. The optimal acquisition positions of each contact wire component on the line and the known external light sources on the line are input into the shadow prediction model to predict the shadow position of the environmental image acquired at the optimal position. Based on the spot position and shadow position, a first predicted brightness value and a second predicted brightness value are obtained. A first predicted exposure scheme is generated based on the first predicted brightness value and the second predicted brightness value. The first brightness value is the rightmost brightness value in the brightness histogram of the historical environmental image, i.e., the brightness value with the largest value. The second brightness value is the leftmost brightness value in the brightness histogram of the historical environmental image, i.e., the brightness value with the smallest value.
[0070] Specifically, the light spot prediction model and the shadow prediction model constitute a multi-task learning framework, namely the light spot prediction model. Its basic principle is to simultaneously learn two output tasks—the spatial distribution of light spots and the spatial distribution of shadows—through a shared feature extraction layer. Then, by combining the material properties of the components and the camera's photosensitive characteristics, it achieves the prediction and quantification of different light and shadow interferences. The light spot prediction model includes a shared encoder that uses a deep neural network (Transformer) to map input features to a high-dimensional feature space to obtain a latent representation; a light spot prediction branch (i.e., the light spot prediction model) that outputs the spatial distribution of light spots for direct light interference; and a shadow prediction branch (i.e., the shadow prediction model) that outputs the spatial distribution of shadows for dark areas caused by occlusion. After predicting the light spot and shadow distributions, it combines material and camera parameters and uses the principle of radiative transfer to calculate the local brightness of the image.
[0071] S35: At the optimal position, environmental image acquisition is performed to obtain a first acquired environmental image, the type of contact wire component is obtained, and the first and second captured brightness values of the image area of the contact wire component in the environmental image are obtained. The first captured brightness value is compared with the first predicted brightness value, and the second captured brightness value is compared with the second predicted brightness value. Based on the comparison result, it is determined whether the light and shadow interference of the environmental image is caused by the detected external light source.
[0072] The steps for determining whether the light and shadow interference in the environmental image is caused by the detected external light source are as follows:
[0073] S351: Calculate the difference between the first captured brightness value and the first predicted brightness value, and at the same time calculate the difference between the second captured brightness value and the second predicted brightness value;
[0074] S352: When the difference between the first captured brightness value and the first predicted brightness value is less than the preset maximum value and the difference between the second captured brightness value and the second predicted brightness value is less than the preset maximum value, the actual light and shadow interference position of the environmental image corresponds to the predicted light and shadow interference position, and the light and shadow interference in the environmental image is caused by the detected external light source.
[0075] When the difference between the first captured brightness value and the first predicted brightness value is not less than the preset maximum value, or the difference between the second captured brightness value and the second predicted brightness value is not less than the preset maximum value, the actual light and shadow interference position of the environmental image does not correspond to the predicted light and shadow interference position, then there is an undetected external light source on the shooting line.
[0076] Specifically, the training and input / output process of the above-mentioned light and shadow interference prediction model is as follows: the model is trained using historical acquisition locations (i.e., the best historical locations) (S32); after the light and shadow interference prediction model is trained, the best location (i.e., the best implementation location) is obtained through spatial location coordinates (S33), and the best location is used as one of the inputs to the trained light and shadow interference prediction model to obtain the light spot location and shadow location, and the corresponding first brightness value and second brightness value are obtained based on the light spot location (S34).
[0077] Specifically, the first captured brightness value is compared with the first predicted brightness value. When the difference between the first captured brightness value and the first predicted brightness value is less than the preset maximum value, the actual light spot position in the environmental image corresponds to the predicted light spot position, and the light spot in the environmental image is caused by a known external light source. When the difference between the first captured brightness value and the first predicted brightness value is not less than the predicted maximum value, the actual light spot position in the environmental image does not correspond to the predicted light spot position, and there is an undetected external light source on the shooting line.
[0078] The second captured brightness value of the contact wire component in the environmental image is obtained, and the second captured brightness value is compared with the second predicted brightness value. When the difference between the second captured brightness value and the second predicted brightness value is less than the preset maximum value, the actual shadow position of the environmental image corresponds to the predicted shadow position, and the shadow in the environmental image is caused by a known external light source. When the difference between the second captured brightness value and the second predicted brightness value is not less than the predicted maximum value, the actual shadow position of the environmental image does not correspond to the predicted shadow position, and there is an undetected external light source on the shooting line.
[0079] When it is determined that the light and shadow interference in the image area of the contact wire component in the environmental image is caused by a known external light source, the first predictive exposure scheme is used to perform exposure, and the first exposed image of the contact wire component is obtained. When the industrial camera is acquiring the image of the contact wire component, the first predictive exposure scheme is used to control the flash for exposure.
[0080] When it is determined that there is an undetected external light source in the shooting line, the first shooting brightness value and the second shooting brightness value are input into the prediction model to calculate the position and type of the undetected external light source and obtain the second prediction exposure scheme. The second prediction exposure scheme is used for exposure to obtain the second exposure image of the contact wire component. When the industrial camera is acquiring images of the contact wire component, the second prediction exposure scheme is used to control the flash for exposure.
[0081] The exposure images include a first exposure image and a second exposure image.
[0082] Meanwhile, the location and type of the undiscovered external light source are used to input into the prediction model to retrain it. This allows the training data to be gradually expanded during the shooting process, enabling the prediction model to learn more robust feature representations and decision boundaries. This allows the prediction model to be applied to the generation of exposure schemes for image acquisition under different lighting conditions along the route.
[0083] S4: Use the YOLO algorithm to perform feature recognition on the exposed image of the contact wire components, and determine whether the exposed image is complete based on the feature recognition results. When the exposed image shows complete contact wire components, the exposed image is an image of the contact wire components.
[0084] The process of determining whether an exposed image is complete includes: determining whether the exposed image of the contact wire components is missing high-risk and complex structural data; when the exposed image is missing high-risk and complex structural data, a second image acquisition is performed on the contact wire components to obtain a second acquisition environment image; the second acquisition environment image is exposed according to S35; this step is repeated to perform feature recognition on the second-acquired exposed image until the contact wire components are complete; when the exposed image of the contact wire components does not have missing high-risk and complex structural data, then the exposed image is the image of the contact wire components, thereby improving the completeness of the acquired contact wire component images.
[0085] In this plan, high-risk and complex structures are those among the contact wire components that are complex in structure and have a significant impact on the operation of the contact wire after a failure, such as the crimp joint of the dropper.
[0086] Example 2
[0087] like Figure 2 As shown, this embodiment includes: In S4, the step of determining whether the first exposed image is missing high-risk complex structure data includes: performing feature recognition and extraction on the first exposed image of the contact wire component to obtain feature parameters that can be used for classification; determining the type of contact wire component collected this time based on the feature parameters; simultaneously performing grayscale processing on the first exposed image to obtain grayscale values; calculating the average grayscale value of the first exposed image; and using the average grayscale value as a threshold.
[0088] Calculate the height and width of the initial block according to the set number of rows and columns, and perform initial segmentation of the image based on the height and width to obtain the initial block, and calculate the initial gray value of the initial block.
[0089] The difference between the initial grayscale value and the threshold is calculated. Only initial blocks with a difference not less than a preset maximum value are selected for secondary segmentation to obtain sub-blocks. The average grayscale value of all pixels in each sub-block is calculated, and the original position of the sub-block within the initial block is obtained. The grayscale values and original positions of the sub-blocks are arranged into a two-dimensional matrix. The two-dimensional matrix is input into the Laplacian operator to filter out sub-blocks whose grayscale values are significantly different from those of their neighboring sub-blocks to obtain target sub-blocks. These target sub-blocks are used as judgment blocks. Based on the type of contact network component, the location of high-risk and complex structures (such as suspended insulators) of that component can be determined. Based on the location of the high-risk and complex structures on the component, the location of the high-risk and complex structure can be determined. The location of the structure on the first exposure image of the contact network component is determined, and then the initial block location corresponding to the high-risk and complex structure is determined. The initial block with the most high-risk and complex structures is selected as the theoretical imaging blind zone. When the difference between the location of the initial block with the most determined blocks and the location of the theoretical blind zone is greater than a preset maximum value, it is determined that there is data loss in the image acquired this time. At this time, a second image acquisition is performed on the detection target point. When the difference between the location of the initial block with the most determined blocks and the location of the theoretical blind zone is not greater than the preset maximum value, it is determined that there is no data loss in the first exposure image acquired this time, and a second image acquisition is not performed. That is, the second exposure image acquired this time is retained for subsequent fault inspection of contact network components.
[0090] In S4, during secondary image acquisition, the cause of data loss is determined based on the grayscale value of the image. If the data loss is caused by underexposure, the exposure position is aligned with the location of the blind zone. If the data loss is caused by overexposure, the control adjustment component moves the exposure position away from the blind zone.
[0091] Example 3
[0092] The difference from the above embodiments is that a track inspection vehicle applied to the above method is also disclosed, including a traveling mechanism 1, a three-dimensional point cloud scanning module, an imaging system 2, an obstacle avoidance module, and a control system.
[0093] The three-dimensional point cloud scanning module is used to acquire three-dimensional point cloud data of the overhead contact line. The three-dimensional point cloud scanning module includes a two-dimensional scanning radar 3 and an encoder. The two-dimensional scanning radar 3 is fixedly connected to the vehicle body by bolts. The encoder is coaxially mounted with another running wheel 121 that is mounted on the drive motor. The two-dimensional scanning radar 3 is used to collect two-dimensional profile point cloud data in the direction of travel of the detection vehicle. The encoder is used to acquire the displacement data of the detection vehicle. By stitching the two-dimensional profile point cloud data and the displacement data together, three-dimensional point cloud data can be obtained.
[0094] The traveling mechanism 1 includes a car body, which is equipped with wheel frames, including a first wheel frame and a second wheel frame. The first wheel frame is slidably connected to the car body, and a wheelbase compensation mechanism is provided between the first wheel frame and the car body. The second wheel frame is fixedly connected to the car body by bolts. In this design, the wheelbase compensation mechanism includes several springs, with one end of the spring welded to the car body and the other end welded to the first wheel frame 12. The wheelbase compensation mechanism is used to adjust the distance between the first wheel frame 12 and the car body. Through the action of the springs, the distance between the outer edges of the two wheel frames can be varied between 1405mm and 1475mm. This device can adapt to the thermal expansion and contraction of the rail (the linear expansion coefficient of the rail is 11.8 × 10⁻⁶). -6 The wheel frame is equipped with running wheels 121. The vehicle body has a length not exceeding 1.7 meters, a height and width not exceeding 0.5 meters, and a total weight not exceeding 35 kg, significantly reducing the weight of the inspection vehicle. Each running wheel 121 contains a drive motor; in this embodiment, the drive motor is a servo planetary geared motor. The output end of the drive motor is coaxially welded and fixed to the running wheel 121, and the drive motor is used to drive the running wheel 121 to rotate. (Note: The text also mentions temperature differences, track gauge deviations, and centrifugal force at curves, causing gauge widening at curves. This is addressed by including running wheels 121 on the wheel frame.)
[0095] The shooting system 2 includes a gimbal 21, an environmental camera 22, a photosensor, several industrial cameras 23, and several flash units 24. The photosensor is bolted to the outer wall of the vehicle body, the gimbal 21 is bolted to the center of the top wall of the vehicle body, and any one of the industrial cameras 23 is bolted to the gimbal 21. The remaining industrial cameras 23 are bolted to the end of the top wall of the vehicle body near the wheel frame 12. The industrial cameras 23 are used to acquire images of the contact wire components, the photosensor is used to acquire ambient brightness, and the flash units 24 are used to provide supplementary lighting for the contact wire components. The flash units 24 are bolted to the gimbal 21. The environmental camera 22 is used to acquire environmental images in the direction of travel of the detection vehicle and is bolted to the side wall of the vehicle body.
[0096] The obstacle avoidance module includes a time-of-flight sensor 4, which is bolted to the side wall of the vehicle body. A lighting lamp 11 is bolted to the side wall of the vehicle body for illuminating the track route.
[0097] The control system includes a controller. In this solution, the controller is an embedded host, and the industrial camera 23, flash 24, drive motor, two-dimensional scanning radar 3, encoder, gimbal 21, environmental camera 22 and time-of-flight sensor 4 are all electrically connected to the controller.
[0098] The vehicle body is also equipped with an adjustment assembly 25, which includes a support plate 252. The support plate 252 is hemispherical in shape. The support plate 252 is coaxially welded and fixed to the flash lamp 24. The support plate 252 is rotatably connected to the inspection vehicle, and the flash lamp 24 is spherically hinged to the inspection vehicle. A permanent magnet 254 is provided inside the support plate 252, and a plurality of electromagnets 251 are provided inside the inspection vehicle. The electromagnets 251 are evenly arranged along the axis of the support plate 252, and a magnetic shielding layer is provided on the outer wall of the electromagnets 251. The magnetic shielding layer used in this embodiment is... The shielding layer is made of copper foil, which is wrapped around the electromagnet 251 to prevent the magnetic fields of the electromagnet 251 and the permanent magnet 254 from interfering with the operation of the industrial camera 23, etc. The electromagnet 251 is used to limit the position of the permanent magnet 254 by generating a magnetic field. An angular velocity sensor is embedded in the flash lamp 24. The angular velocity sensor is connected to the controller signal. The angular velocity sensor is used to collect the angle information between the optical axis of the flash lamp 24 and the horizontal plane. The controller is also used to control the operation of the electromagnet 251 according to the angle information and the location of the blind zone.
[0099] The flash lamp 24 has an adjustment cavity, and the adjustment cavity contains magnetic powder 253. The electromagnet 251 is also used to change the distribution position of the magnetic powder 253 in the adjustment cavity. The controller is also used to control the operation of the electromagnet 251 according to the blind spot position and the direction of travel of the detection vehicle.
[0100] The specific implementation method is as follows: When using this solution, the detection vehicle is placed on the track to be collected, and the side wall of the vehicle body equipped with the environmental camera 22 faces the direction of travel of the detection vehicle. Then the detection vehicle is started. During the operation of the detection vehicle, the encoder works continuously to acquire the displacement data of the detection vehicle. At the same time, the two-dimensional point cloud scanning radar works continuously to acquire the two-dimensional point cloud data of the cross-section at each position. By stitching the position data and the two-dimensional point cloud data together, the three-dimensional point cloud data of the track is obtained.
[0101] Meanwhile, during the movement of the inspection vehicle, the environmental camera 22 continuously works to acquire images of the environment in the direction of the vehicle's movement. By continuously and in real-time capturing these environmental images, feature recognition is performed to determine whether there are obstacles in the direction of the vehicle's movement. When there are obstacles in the direction of the vehicle's movement, the time-of-flight sensor 4 senses the surrounding environment in real time and transmits the real-time data (i.e., the positional relationship between the obstacle and the inspection vehicle). Thus, the controller can roughly determine whether an obstacle exists and its approximate location based on the environmental images. Subsequently, based on the data acquired by the time-of-flight sensor 4, it determines whether the obstacle is within the preset safe distance of the inspection vehicle. When the obstacle is within the safe distance of the inspection vehicle, the inspection vehicle may collide with the obstacle. At this time, the control drive motor stops working, and the inspection vehicle is braked.
[0102] During the movement of the inspection vehicle, the controller determines the position of the contact wire components (contact wire suspension or base network suspension) based on the real-time acquired 3D point cloud data. When the inspection vehicle moves to the vicinity of the suspension, there is a delay for a period of time so that the vehicle body remains in motion after the contact wire components are identified. The focus of the industrial camera 23 moves. When the focus of the industrial camera 23 located on both sides of the vehicle body moves to the center position of the suspension, the industrial camera 23 located on both sides of the vehicle body is activated to take pictures of the suspension.
[0103] In this solution, by keeping the vehicle body in motion for a certain period of time after recognizing the overhead contact line component as a suspension, the focus of the industrial camera 23 remains in a moving state after recognizing the overhead contact line component until the focus of the industrial camera 23 moves to the center position of the suspension before taking pictures of the suspension. This ensures that the suspension can fall within the effective image field of the image to a greater extent, thereby improving the acquisition of the suspension.
[0104] When the 3D point cloud data indicates that the inspection vehicle has moved to the vicinity of the suspension, the controller controls the drive motor to operate, causing the vehicle to stop and move backward behind the suspension. At the same time, the controller controls the gimbal 21 to adjust the industrial camera 23 located at the center of the vehicle. By changing the shooting angle of the industrial camera 23, the focus of the industrial camera 23 is moved to the center of the suspension. The industrial camera 23 is then activated to acquire images of the area behind the suspension. The controller then controls the drive motor to operate again, causing the vehicle to move forward to the front of the suspension. The controller then controls the gimbal 21 to operate again, and after the focus of the industrial camera 23 is moved to the center of the suspension, the controller controls the industrial camera 23 to operate and acquire images of the area in front of the suspension.
[0105] In this solution, images are captured from both the front and rear of the vehicle body to ensure that the acquired images contain all information about the front and rear of the suspension, thus avoiding any impact on subsequent troubleshooting of overhead contact line components through image recognition.
[0106] During the above process, the photosensitive sensor works continuously to acquire the brightness of the surrounding environment at the location where the industrial camera 23 acquires images. The controller controls the exposure time of the industrial camera 23 and the opening and closing of the flash 24 according to the ambient brightness to improve the quality of the acquired images.
[0107] At the same time, the controller can also determine whether the environment needs lighting based on the brightness. If the ambient brightness is less than the set value, the ambient brightness is low, which may be at night or in a tunnel, which is not conducive to the work of maintenance personnel. At this time, the controller will turn on the lighting lamp 11 to illuminate the track, making it easier for maintenance personnel to walk on the track bed.
[0108] Example 4
[0109] The vehicle body is also equipped with an adjustment assembly 25, which includes a support plate 252. The support plate 252 is hemispherical in shape. The support plate 252 is coaxially welded and fixed to the flash lamp 24. The support plate 252 is rotatably connected to the inspection vehicle, and the flash lamp 24 is spherically hinged to the inspection vehicle. A permanent magnet 254 is provided inside the support plate 252, and a plurality of electromagnets 251 are provided inside the inspection vehicle. The electromagnets 251 are evenly arranged along the axis of the support plate 252, and a magnetic shielding layer is provided on the outer wall of the electromagnets 251. The magnetic shielding layer used in this embodiment is... The shielding layer is made of copper foil, which is wrapped around the electromagnet 251 to prevent the magnetic fields of the electromagnet 251 and the permanent magnet 254 from interfering with the operation of the industrial camera 23, etc. The electromagnet 251 is used to limit the position of the permanent magnet 254 by generating a magnetic field. An angular velocity sensor is embedded in the flash lamp 24. The angular velocity sensor is connected to the controller signal. The angular velocity sensor is used to collect the angle information between the optical axis of the flash lamp 24 and the horizontal plane. The controller is also used to control the operation of the electromagnet 251 according to the angle information and the location of the blind zone.
[0110] The flash lamp 24 has an adjustment cavity, and the adjustment cavity contains magnetic powder 253. The electromagnet 251 is also used to change the distribution position of the magnetic powder 253 in the adjustment cavity. The controller is also used to control the operation of the electromagnet 251 according to the blind spot position and the direction of travel of the detection vehicle.
[0111] During the operation of this solution, when images of the overhead contact line components are acquired, images with severe data loss are filtered to obtain a set of images with missing data. Based on this set, the images are evaluated to determine the distance the beam of the flash lamp 24 needs to move. Before secondary image acquisition, the controller cuts off the power to the electromagnet 251 and controls the drive motor to return the inspection vehicle to the image acquisition position. When the inspection vehicle opens and closes, due to inertia, the flash lamp 24 maintains its original motion. At this time, the flash lamp 24 and the inspection vehicle move relative to each other, causing the flash lamp 24 to move the support plate 252. The system rotates around the hinge point between the flash lamp 24 and the inspection vehicle. During this process, the angular velocity sensor continuously collects the angle between the flash lamp 24 and the horizontal plane, thereby determining the angle of the light column of the flash lamp 24. When the light column of the flash lamp 24 moves to a suitable angle (since the position of the industrial camera 23 is fixed and the position of the previously acquired image is fixed, it is only necessary to determine the positional relationship between the light column and the industrial camera 23 to determine the positional relationship between the light column and each initial block of the image), the controller reconnects the power supply of the electromagnet 251, and restricts the position of the support plate 252 through the permanent magnet 254, thereby fixing the angle of the flash lamp 24.
[0112] If the direction that the flash lamp 24 needs to be adjusted is at a certain angle to the direction of travel of the inspection vehicle, the flash lamp 24 is unlikely to rotate due to inertia as the inspection vehicle starts and closes. At this time, the controller adjusts the flash lamp 24 according to the angle that needs to be adjusted. If it needs to rotate to the left of the direction of travel of the inspection vehicle, the controller will move the magnetic powder 253 to the corresponding position by generating a corresponding magnetic field through the operation of the electromagnet 251. For example, if the magnetic powder 253 moves to the right, the center of mass of the flash lamp 24 will be moved to the right. Due to the characteristics of inertia, the ability to maintain the state of motion is proportional to the weight of the object. Therefore, as the inspection vehicle starts and closes, the right side of the flash lamp 24 maintains its motion for a longer time than the left side. That is, the flash lamp 24 rotates to the left at this time, thereby realizing the adjustment of the flash lamp 24.
[0113] During the above process, due to the rotational cooperation between the support plate 252 and the inspection vehicle, the rotational speed of the flash lamp 24 is slowed down under the action of the friction between the support plate 252 and the inspection vehicle, thereby avoiding the flash lamp 24 moving too fast, which would cause the flash lamp 24 to shift during the response of the electromagnet 251 and affect the subsequent supplementary lighting effect.
[0114] Compared to solutions using robotic arms, this solution requires no additional kinetic energy input to drive the flash 24, effectively reducing energy consumption during image acquisition. Furthermore, since the light beam covers a certain area, during its movement, when providing fill light, it only needs to be moved to roughly cover the blind spot; similarly, when overexposed, it only needs to be moved to a position where the blind spot cannot be covered. Therefore, this solution eliminates the need for precise adjustment of the flash 24. Compared to solutions using electronic stacking to adjust the flash 24's light beam, this solution maintains the flash 24's adjustment function while offering lower costs, less light effect loss during adjustment, less prone to beam abrupt changes, and more uniform light spots, effectively reducing the impact of light spots on image quality. Compared to solutions using mechanical adjustments such as motors, this solution generates less noise from electrical components during the angle adjustment of the flash lamp 24, effectively reducing the impact of the flash lamp 24 adjustment process on the operation of industrial cameras such as the 23. Even if the adjustment component 25 wears down with increased working time, the wear in this solution is mainly concentrated on the support plate 252, unlike adjustment solutions using motors. However, the wear of the support plate 252 has a smaller impact on the angle adjustment of the flash lamp 24. Before the support plate 252 breaks and fragments jam it, thus preventing the flash lamp 24 from rotating, there is no need to repair or replace the support plate 252. Therefore, the adjustment component 25 used in this solution has a longer lifespan, effectively reducing the cost per use of the inspection vehicle.
[0115] Furthermore, the specific implementation process of the above embodiments is given as follows:
[0116] S1: Collect three-dimensional point cloud data of the overhead contact line, and extract the key detection points and their spatial coordinates of the overhead contact line components based on the point cloud data;
[0117] S2: After obtaining the spatial coordinates of the key points to be detected, the environmental image corresponding to the location is acquired, and the YOLO algorithm is used to select the area containing only the contact wire components. Based on this area, a brightness histogram of the contact wire components is generated.
[0118] S3: Based on the brightness distribution of the brightness histogram, determine the exposure scheme applicable to the contact wire components, adjust the image acquisition parameters according to the exposure scheme, perform exposure compensation on the area where the key detection points are located, and combine the spatial coordinates of the key detection points to complete the acquisition of the target component image.
[0119] S4: Use the YOLO algorithm to perform feature recognition on the acquired target component images and determine whether the recognized images completely cover the key points to be detected; if the coverage is incomplete, perform image acquisition again based on the uncovered key point areas until the acquired images can completely cover all key points to be detected.
[0120] Specifically, the principle and process of obtaining the exposure scheme include:
[0121] S31: Input the historically selected environmental image into the pre-trained image processing model to identify and obtain the corresponding contact wire component type;
[0122] S32: Based on the brightness histogram of historical environmental images, extract the extreme points to locate the light spots and shadow pixels in the environmental images; and combine the spatial distribution of light spots and shadows in several adjacent environmental images, component types, spatial coordinates of image acquisition, acquisition angle, and type and location of external light sources to train the prediction model.
[0123] S33: When acquiring the current environmental image, input its spatial coordinates into the trained prediction model to predict the possible locations of light spots and shadows, and generate a preliminary exposure plan based on the prediction results.
[0124] S34: Subsequently, the currently acquired environmental image is input into the image processing model again to obtain the corresponding component type and generate a brightness histogram of the current environmental image; the actual light spot and shadow pixel points are located according to the peak and valley values of the histogram, and the actual result is compared with the prediction scheme to correct the preliminary exposure scheme, thereby obtaining the final exposure scheme.
[0125] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above description is only a specific embodiment of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A YOLO-based method for acquiring contact network images, characterized in that: include: S1: Collect three-dimensional point cloud data of the overhead contact line and obtain the spatial coordinates of the overhead contact line components based on the three-dimensional point cloud data; S2: Based on the spatial coordinates, obtain the environmental image of the contact wire components, use the YOLO algorithm to obtain the two-dimensional mask of the environmental image, find the maximum connected component of the two-dimensional mask, and obtain the sequence of contour points of the contact wire components in the environmental image through the boundary tracking algorithm. Connect the contour points end to end to form a closed curve, thereby realizing the selection of the contact wire components and obtaining the image region of the contact wire components. S3: Obtain an exposure scheme based on the light and shadow interference distribution of the image area of the contact wire components in the historical environmental image, where light and shadow interference includes light spots and shadows. Use the exposure scheme to control the flash. When the industrial camera acquires the image of the contact wire components, exposure is performed to obtain the exposed image of the contact wire components. S4: Use the YOLO algorithm to perform feature recognition on the exposed image of the contact wire components, and determine whether the contact wire components in the exposed image are complete based on the feature recognition results. When the contact wire components are complete, the exposed image is the image of the contact wire components.
2. The contact wire image acquisition method based on YOLO according to claim 1, characterized in that: In S3, the methods for obtaining the exposure scheme include: S31: Take several historical environmental images and obtain the types of catenary components based on the historical environmental images. The types of catenary components include the structure, material and processing technology of the components. S32: Acquire historical environmental images to determine the acquisition location and external light source of historical environmental images; The historical environmental image acquisition location and external light source are input into the prediction model to obtain the light and shadow interference prediction model. The light and shadow interference prediction model is a multi-task model architecture, which includes two sub-task models. Specifically, it includes a spot prediction model for outputting the first brightness value and a shadow prediction model for outputting the second brightness value. S33: Based on the type of the contact wire component and its spatial coordinates on the corresponding line, including the position of the contact wire component on its corresponding line and the installation height of the contact wire component, combined with the parameters of the equipment for acquiring images of the contact wire component and the rules for acquiring images of each contact wire component, determine the optimal position for image acquisition. S34: Before acquiring environmental images, the optimal acquisition positions of images of each contact wire component on the line and the known external light sources on the line are input into the spot prediction model to predict the spot position of the environmental image acquired at the optimal position. The optimal acquisition positions of images of each contact wire component on the line and the known external light sources on the line are input into the shadow prediction model to predict the shadow position of the environmental image acquired at the optimal position. Based on the spot position and shadow position, a first predicted brightness value and a second predicted brightness value are obtained. Based on the first predicted brightness value and the second predicted brightness value, a first predicted exposure scheme is generated. The first brightness value is the rightmost brightness value in the brightness histogram of the historical environmental image, i.e., the brightness value with the largest value. The second brightness value is the leftmost brightness value in the brightness histogram of the historical environmental image, i.e., the brightness value with the smallest value. S35: At the optimal position, environmental image acquisition is performed to obtain a first acquired environmental image, the type of the contact wire component is obtained, and the first and second captured brightness values of the image area of the contact wire component in the environmental image are obtained. The first captured brightness value is compared with the first predicted brightness value, and the second captured brightness value is compared with the second predicted brightness value. Based on the comparison result, it is determined whether the light and shadow interference of the environmental image is caused by the detected external light source.
3. The contact wire image acquisition method based on YOLO according to claim 2, characterized in that: The steps in S35 to determine whether the light and shadow interference in the environmental image is caused by the detected external light source are as follows: S351: Calculate the difference between the first captured brightness value and the first predicted brightness value, and at the same time calculate the difference between the second captured brightness value and the second predicted brightness value; S352: When the difference between the first captured brightness value and the first predicted brightness value is less than the preset maximum value and the difference between the second captured brightness value and the second predicted brightness value is less than the preset maximum value, the actual light and shadow interference position of the environmental image corresponds to the predicted light and shadow interference position, and the light and shadow interference in the environmental image is caused by the detected external light source. When the difference between the first captured brightness value and the first predicted brightness value is not less than a preset maximum value and the difference between the second captured brightness value and the second predicted brightness value is not less than a preset maximum value, the actual light and shadow interference position of the environmental image does not correspond to the predicted light and shadow interference position, indicating that there is an undetected external light source on the shooting line. When it is determined that there is an undetected external light source on the shooting line, the first captured brightness value and the second captured brightness value are input into the prediction model to calculate the position and type of the undetected external light source, obtain the second predicted exposure scheme, and use the second predicted exposure scheme to perform exposure, thereby obtaining the second exposure image of the contact wire component. When the industrial camera is acquiring images of the contact wire component, the second predicted exposure scheme is used to control the flash for exposure.
4. The contact wire image acquisition method based on YOLO according to claim 3, characterized in that: In S352, after generating the second predictive exposure scheme, the first predictive exposure scheme for the remaining contact wire components on the shooting line is modified based on the location and type of the unknown external light source.
5. The contact wire image acquisition method based on YOLO according to claim 4, characterized in that: In S32, environmental parameters of historical environmental images are also acquired, and the prediction model is trained based on the environmental parameters.
6. The contact wire image acquisition method based on YOLO according to claim 5, characterized in that: Environmental parameters include the geographical location, weather, time zone, and time of environmental image acquisition.
7. The contact wire image acquisition method based on YOLO according to claim 1, characterized in that: In S4, the step of determining whether the contact wire components in the exposed image are complete includes: performing feature recognition and extraction on the exposed image of the contact wire components to obtain feature parameters that can be used for classification; determining the type of contact wire components collected this time based on the feature parameters; performing grayscale processing on the exposed image to obtain grayscale values; calculating the average grayscale value of the exposed image; and using the average grayscale value as a threshold. The exposed image is initially segmented to obtain initial blocks, and the initial grayscale value of the initial blocks is calculated. The difference between the initial grayscale value and a threshold is calculated, and only the initial blocks with a difference not less than a preset maximum value are selected for secondary segmentation to obtain sub-blocks. The average grayscale value of all pixels in each sub-block is calculated, and the original position of the sub-block within the initial block is obtained. Sub-blocks whose grayscale values differ from those of their neighboring sub-blocks are selected to obtain target sub-blocks. These target sub-blocks are used as judgment blocks to determine the high-risk and complex structures of the contact wire components based on their type. The initial block with the most high-risk and complex structures is selected as the theoretical imaging blind zone. When the difference between the initial block with the most blocks and the theoretical blind zone is greater than a preset maximum value, it is determined that the exposure image acquired this time has data loss. At this time, a second image acquisition is performed on the detection target point. When the difference between the initial block with the most blocks and the theoretical blind zone is not greater than the preset maximum value, it is determined that the exposure image acquired this time has no data loss, and a second image acquisition is not performed. That is, the exposure image acquired this time is retained for subsequent fault inspection of contact network components.
8. The contact wire image acquisition method based on YOLO according to claim 7, characterized in that: In S4, during secondary image acquisition, the cause of data loss in the exposed image is determined based on the average grayscale value of the exposed image. If the data loss is caused by underexposure, the exposure position is aligned with the location of the blind zone. If the data loss is caused by overexposure, the control adjustment component moves the exposure position away from the blind zone.
9. A track inspection vehicle, applied to the YOLO-based contact wire image acquisition method according to any one of claims 1-8, characterized in that: The system includes a traveling mechanism (1), a three-dimensional point cloud scanning module, a shooting system (2), an obstacle avoidance module, and a control system. The three-dimensional point cloud scanning module, the shooting system (2), the obstacle avoidance module, and the control system are all installed on the traveling mechanism (1). The three-dimensional point cloud scanning module is used to acquire three-dimensional point cloud data of the contact network. The shooting system (2) is used to obtain environmental images and images of contact network components. The obstacle avoidance module is used to obtain the positional relationship between obstacles and the inspection vehicle. The traveling mechanism (1) is used to drive the three-dimensional point cloud scanning module, the shooting system (2), and the obstacle avoidance module to move. The control system is used to control the shooting system (2) to work according to the three-dimensional point cloud data and to control the shooting system (2) to work according to the environmental images. The control system is also used to control the traveling mechanism (1) to work according to the positional relationship and the three-dimensional point cloud data.