Over-limit detection method and system for oil level at gearbox at bottom of train
By using an image analysis framework that integrates high-resolution visual imaging with multi-source prior knowledge, the problems of high misjudgment rate, low efficiency, and difficult sensor installation in oil level detection of train undercarriage gearboxes have been solved, achieving fully automatic, high-precision, and robust oil level detection.
Patent Information
- Application Number
- CN202610051223.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-01-15
- Publication Date
- 2026-02-13
- Estimated Expiration
- 2046-01-15
AI Technical Summary
In the existing technology, the detection of oil level in the gearbox under the train relies on manual visual inspection, which has a high error rate and low efficiency. Contact or non-contact sensors are bulky, difficult to install, and have poor versatility. In addition, traditional vision methods are unstable in complex backgrounds and cannot accurately map the oil level.
An image analysis framework that integrates high-resolution visual imaging with multi-source prior knowledge is adopted. Images are acquired through a visual camera, a baseline is fitted, the inner line of the observation window is extracted, and the actual oil level is calculated by combining the camera attitude and tank parameters. The baseline is dynamically calibrated to achieve fully automatic and high-precision detection.
Without altering the original structure, it achieves high-precision and robust oil level determination, resisting interference from light fluctuations, contamination, and marker wear. Through established application scenarios, it solves the problem of strong resistance to interference from light fluctuations and contamination. Combined with a triple verification mechanism, it ensures reliable results.
Smart Images

Figure CN121521222A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of rail transit detection technology, more particularly to a method for detecting the over-limit of oil level at the gear box of train underframe. BACKGROUND
[0002] In the operation and maintenance system of rail transit equipment, the state monitoring of key components of train running gear is directly related to the operation safety and service life. Among them, the core transmission and air supply unit such as the gear box and the air source device of the train underframe highly depend on the lubricating liquid to realize the functions of friction reduction, heat dissipation and corrosion prevention, and the stability of the oil level is a prerequisite for ensuring the long-term reliable operation of the equipment. In order to realize the dynamic perception of the lubricating state, the existing design generally integrates a small transparent observation window on the gear box shell, and is assisted by scale marks or reference marks, and the internal oil quantity is reflected in real time through the liquid level meter.
[0003] The traditional detection mode mainly relies on manual visual inspection, which has the defects of high dependence on the subjective cognition and on-site concentration of the operator. On the one hand, factors such as light condition fluctuation, stain shielding and visual angle deviation can easily lead to misjudgment. On the other hand, under the conditions of large-scale and high-frequency train inspection tasks, manual operation is inefficient and has a high rate of missed detection, which cannot meet the urgent needs of the current railway system for preventive maintenance and intelligent operation and maintenance. In order to overcome the above limitations, the industry has gradually introduced automatic detection schemes based on contact or non-contact sensors. However, such schemes often need to integrate the sensing element directly into the liquid level meter body, resulting in a significant increase in the overall volume. The space layout of the train underframe is extremely compact, and various pipelines, cables and structural components are densely intertwined. It is difficult to find a suitable installation position for the large-volume sensor, and it may even interfere with the existing equipment layout, which seriously restricts its engineering applicability.
[0004] However, with the continuous development of unmanned technology, the current judgment method using machine vision is adopted. However, the traditional visual method mainly uses single threshold segmentation or edge detection, which is difficult to stably identify the double-line structure under complex background, low contrast and partial shielding conditions, and cannot establish the accurate mapping relationship between the double-line structure and the real oil level. Correspondingly, even if the image data is obtained, if the joint modeling of the camera pose, the observation window inclination and the oil cavity geometric parameters is lacking, it is also impossible to accurately convert the pixel coordinates into physical height, resulting in inaccurate determination results. If the setting of the reference line only relies on fixed marking points without considering the dynamic influence of the actual oil surface shape on the reference, systematic deviation will be caused by factors such as marking wear and visual angle drift in the long-term use, which ultimately weakens the detection reliability. SUMMARY
[0005] In view of the problems existing in the prior art, the purpose of the present application is to overcome the high misjudgment rate and low efficiency caused by manual visual inspection in the prior art, and the engineering applicability defects such as volume increase, installation difficulty and poor universality caused by the use of contact or non-contact sensors.
[0006] Therefore, the present application provides a train undercarriage gear box oil level over-limit detection method and system, based on a high-resolution visual imaging and multi-source prior knowledge fusion image analysis framework, without changing the original liquid level meter physical structure and introducing additional sensing hardware, realizing full-automatic, high-precision and strong robustness discrimination of the gear box lubricating equipment oil level state.
[0007] To achieve the above object, the present application provides the following technical scheme: A train undercarriage gear box oil level over-limit detection method, comprising the following steps: An image acquisition step, acquiring an original image containing a gear box oil level observation window through a visual camera, and generating a target image through image processing; A reference line fitting step, positioning the observation window region in the target image, extracting and verifying the marker region, determining whether the marker region is double-sided or single-sided, and fitting an initial reference line according to the center point coordinates of the marker region; An observation window line extraction step, extracting two target lines in the observation window region, the target lines being an oil liquid and observation window contact line and a characteristic line formed by oil liquid refraction respectively; An actual oil level judgment step, calculating the actual oil level height and generating an image level oil level line through the shooting angle of the visual camera, the oil tank setting angle and the position of the two target lines; A reference line calibration step, calibrating the initial reference line according to the deflection amount of the oil level line and the midline of the two target lines; An oil level state judgment step, judging whether the oil level is over-limit according to the position relationship between the calibrated reference line and the oil level line.
[0008] Further, the observation window line extraction step includes a line extraction strategy, which includes extracting a straight line with continuous pixel distribution and meeting the preset line width range and gray value mutation characteristics in the observation window region through a line detection algorithm, and then filtering out the interference line segments in the observation window through the length, direction and position parameters of the straight line, retaining the two target lines, calculating the continuous pixel proportion of each target line after retention, and determining that two continuous lines can be extracted when the continuous pixel proportions of the two target lines both reach a preset threshold, otherwise determining that two continuous lines cannot be extracted.
[0009] Further, the line estimation step is further included, when it is determined that two continuous lines cannot be extracted, then the broken part of the discontinuous line segment is completed by a curve interpolation algorithm according to the end point coordinates and the trend of the line segment, if only part of the feature points are extracted, then the feature points are grouped by a clustering algorithm to determine the line trend, and then the completed or clustered line is adjusted by constraint according to the preset structure parameters of the gear box oil level observation window and the physical characteristics of the oil, to obtain the final estimated line.
[0010] Further, the oil level line generation strategy is included in the actual oil level judgment step, the oil level line generation strategy includes acquiring the shooting angle of the camera through the attitude sensor data of the camera, calling the preset gear box installation parameter database to acquire the setting angle of the oil tank, establishing the mapping model of the image pixel coordinates and the actual physical coordinates of the gear box according to the camera calibration parameters, the shooting angle and the setting angle of the oil tank, converting the pixel coordinates of the two continuous lines or the estimated line into the actual physical coordinates through the mapping model, and solving the height value of the actual oil level through the geometric calculation method according to the oil cavity structure parameters of the gear box, and generating the image pixel level oil level line corresponding to the actual oil level height.
[0011] Further, the calibration strategy is included in the reference line calibration step, the calibration strategy includes acquiring the pixel coordinates of the two continuous lines or the estimated line in the image pixel coordinate system, calculating the midpoint coordinates of the two lines under the same horizontal coordinate or vertical coordinate, fitting the pixel level center line of the two lines through a straight line fitting algorithm, calculating the angle deflection and position offset of the actual oil level line and the center line, the angle deflection is calculated through the vector dot product formula, the position offset is the average value of the vertical coordinate difference of the two lines under the same horizontal coordinate or the average value of the horizontal coordinate difference under the same vertical coordinate, the angle is corrected through a rotation matrix according to the angle deflection, and the position is corrected through a translation transformation according to the position offset, to obtain the calibrated reference line.
[0012] Further, the marker region identification and analysis step includes the marker region discrimination strategy, the marker region discrimination strategy includes separating the oil level observation window region from the preprocessed image through an image segmentation algorithm, extracting the outline of the observation window through an edge detection algorithm to determine the range of the observation window in the image, searching for the target region in the observation window region through a feature matching algorithm according to the preset marker region features, removing the false target through morphological operation and verifying the region geometric parameters to determine the final marker region, and then counting the number of the verified marker regions to determine the double-sided marker state that there is one effective marker region on each side of the observation window, or the single-sided marker state that there is only one effective marker region on one side.
[0013] Further, the baseline fitting step includes a fitting strategy, the fitting strategy includes determining the center point coordinates of each effective marker area by a geometric center calculation method, if it is a double-sided marker area, using a straight line fitting algorithm to fit the initial baseline with the two center points as the reference points; if it is a single-sided marker area, combining the preset observation window structure parameters and geometric constraints, using a constrained straight line fitting algorithm to fit the initial baseline with the single-sided center point as the known point.
[0014] Further, it further includes a result verification and output step, the result verification and output step includes a physical verification strategy, a data consistency verification strategy and an algorithm accuracy verification strategy, if the physical verification strategy, the data consistency verification strategy and the algorithm accuracy verification strategy are all verified, the oil level state, the actual oil level height, the detection time and the camera and gearbox related parameters are output, if any one of the strategies fails to verify, an abnormal prompt information is output.
[0015] Further, the physical verification strategy includes judging whether the actual oil level height is within the physical capacity range of the gearbox oil cavity, the data consistency verification strategy includes comparing the current detection result with the historical detection data to analyze whether the change trend conforms to the normal loss law, and the algorithm accuracy verification strategy includes verifying whether the calculation accuracy of the oil level line meets the preset error threshold through the preset standard reference.
[0016] An oil level over-limit detection system at a gearbox at the bottom of a train, comprising: An image acquisition module acquires an original image containing a gearbox oil level observation window through a visual camera, and generates a target image through image processing; A baseline fitting module locates the observation window area in the target image, extracts and verifies the marker area, judges whether the marker area exists on both sides or on one side, and fits the initial baseline according to the center point coordinates of the marker area; An observation window inner line extraction module extracts two target lines in the observation window area, the target lines are respectively the oil liquid and the observation window contact line and the characteristic line formed by the oil liquid refraction; An actual oil level judgment module calculates the actual oil level height and generates an image-level oil level line through the shooting angle of the visual camera, the oil tank setting angle and the position of the two target lines; A baseline calibration module calibrates the initial baseline according to the deflection amount of the oil level line and the midline of the two target lines; An oil level state determination module determines whether the oil level is over-limit according to the positional relationship between the calibrated baseline and the oil level line.
[0017] The beneficial effects of the present application are: constructing an oil level over-limit detection framework, effectively solving the problems of high misjudgment rate and low efficiency of traditional manual inspection, difficult installation of contact or non-contact sensors, and poor universality, without changing the original gear box structure, through the cooperation of visual cameras and attitude sensors, adapting to fixed installation or inspection robot carrying scenes, compatible with different models of gear boxes, in addition, through the bilateral or unilateral adaptation of the marker area to fit the initial reference line, the complementarity of double-line extraction and line estimation, accurate mapping of pixels and physical coordinates, and dynamic calibration of the reference line, the detection accuracy is guaranteed layer by layer, the interference ability is strong against light fluctuation, stain shielding, and marker wear, combined with a three-fold verification mechanism, the result is reliable, realizing full-automatic and high-precision detection of oil level. BRIEF DESCRIPTION OF DRAWINGS
[0018] Figure 1 is the overall flowchart in the present application; Figure 2 is the flowchart of reference line fitting in the present application; Figure 3 is the flowchart of line estimation and actual oil level calculation in the present application. DETAILED DESCRIPTION
[0019] The present application will be further described in detail below in combination with the drawings and examples. Identical parts are denoted by identical reference numerals in the following description. It should be noted that the words "front", "back", "left", "right", "up" and "down" used in the following description refer to the directions in the drawings, and the words "bottom surface" and "top surface", "inner" and "outer" refer to the directions towards or away from the geometric center of a particular part.
[0020] The present application provides an oil level over-limit detection method and system for train underfloor gear box, the core of which is to construct an image analysis framework based on high-resolution visual imaging and multi-source prior knowledge fusion, to realize full-automatic, high-precision and strong robustness discrimination of oil level state of gear box and other multi-type lubricating equipment such as air compressor.
[0021] In actual deployment, the system includes an image acquisition module, a reference line fitting module, an in-window line extraction module, an actual oil level judgment module, a reference line calibration module, and an oil level state judgment module, and each module is connected through data transmission to build physical mapping, dynamic calibration and state judgment.
[0022] Specifically, as Figure 1As shown, in the oil level over-limit detection method, first, in the image acquisition stage, the image acquisition module performs image acquisition tasks through an industrial vision camera. The industrial vision camera can be installed at the bottom of the train or carried by a patrol robot to take images. The image acquisition module acquires an original image containing a gear box oil level observation window through the vision camera, and then corrects and denoises the original image to eliminate lens distortion and environmental noise interference, generating a clear target image to provide high-quality data for subsequent analysis.
[0023] Second, in the marker area identification and analysis stage, first, the target image is classified at the pixel level through a semantic segmentation network to accurately separate the oil level observation window area and exclude background interference. The network uses a U-Net architecture, the encoder part is based on a ResNet-34 backbone network, the decoder part includes a skip connection and an up-sampling module, and the training data set includes thousands of gear box observation window images under different light, stains, and shielding conditions. Through the network, the system can accurately separate the observation window area and exclude background interference such as pipelines, cables, and stains. Then, the Canny edge detection algorithm is used to extract the outer contour of the observation window, and the Hough transform is used to fit the rectangular boundary to determine the accurate coordinate range of the observation window in the image. In this area, feature matching is performed through a pre-set marker area feature template, such as shape, size ratio, or grayscale features, etc. Pseudo-targets are removed through morphological operations, and the region geometry parameters are verified to determine and only keep the region that meets the design specifications as the effective marker area. For example, local reflections and stain-formed marker-like areas are pseudo-targets and need to be removed. Then, the number of effective marker areas is counted to determine whether it is in a double-sided existence state (i.e., there is one effective marker area on the left and right sides of the observation window) or a single-sided existence state (i.e., there is only one effective marker area on one side).
[0024] Third, in the baseline fitting stage, as shown, Figure 2 the geometric center coordinates of each effective marker area are calculated. For the double-sided existence state, the left marker area center point ( ) and the right marker area center point ( ) are obtained, and a straight line equation is fitted using the least squares method to fit the initial baseline line through the observation window. This method relies on the symmetry of the double-sided markers to ensure that the baseline is consistent with the structural baseline of the observation window, where the slope , and the intercept , the obtained straight line is the initial baseline; for the single-sided existence state, the single-sided center point ( ) is obtained, and a pre-stored observation window structure parameter database (containing observation window width, marker area design position, and structural symmetry axis information) is called. The database includes the observation window width , the standard distance of the marker area from the observation window edge And the maximum allowed inclination of the reference line with the horizontal direction , as the known point, constraint the straight line slope , and force the straight line to pass through the theoretical symmetry axis , the initial reference line equation is solved by using the linear least square method with constraints, which avoids the deviation of the reference line caused by the missing of the unilateral mark.
[0025] The reference line fitting of the application can adopt differentiated fitting strategies for different scenarios where the mark area exists on both sides or only on one side, and effectively avoids the interference of factors such as mark wear, stain shielding, and perspective deviation through feature screening and false target elimination, solving the problem that the traditional fixed reference is easily affected by the environment and fails, ensuring that the reference line can be stably established under various complex working conditions. In addition, by combining the observation window structure parameters and geometric constraints, the initial reference line accurately corresponds to the physical reference height of the gear box oil cavity, providing a unified and reliable reference standard for subsequent actual oil level height calculation and reference line calibration, avoiding the misjudgment of oil level out-of-limit caused by reference deviation, and improving the detection accuracy.
[0026] Fourthly, in the line extraction stage in the observation window, double-line feature extraction is performed in the positioned pipe wiping window area. First, the sub-image corresponding to the observation window is pre-processed, the gray difference between the oil and non-oil area and the feature line and the background is improved by the contrast enhancement algorithm to weaken the interference of uneven light and slight stains; at the same time, the image noise is reduced by using the smoothing filter algorithm to avoid that the noise points are misjudged as line features, and clear and pure image data is provided for the line detection algorithm; Then, the line detection algorithm is used to scan the pre-processed observation window sub-image comprehensively, and the straight line segments with continuous pixel distribution characteristics are selected. In the selection process, according to the preset line width range, the line segments that are too thin (may be noise) or too wide (may be background texture) are eliminated; at the same time, the line segments with gray value mutation characteristics are identified, which usually correspond to the interface between oil and air and the contact surface between oil and observation window, and are potential target line candidates. On this basis, the system calculates the continuity index of each candidate line segment, projects the line segment to its main direction, and counts the proportion of continuous non-zero pixels. The proportion can directly reflect the completeness of the line segment. If there are two line segments, and the continuous pixel proportion of each line segment is greater than 85%, and the distance between the two line segments in the vertical direction is within the preset range , it is indicated that the line segment has not been obviously broken, and it is determined that two continuous target lines are successfully extracted, which are the oil and glass contact line and the secondary feature line formed by oil refraction, otherwise it is determined that two continuous lines cannot be extracted, and the subsequent estimation stage is entered for completion and reconstruction.
[0027] The observation window inner line extraction stage of the application screens and accurately positions layer by layer, effectively avoids interference of factors such as background texture, noise, stains and the like, ensures that two target lines directly related to the oil level are accurately extracted from a complex image, in addition, through quantitative determination of the proportion of consecutive pixels, two scenes of directly extracting a coherent line and needing line estimation are clearly divided, which provides clear triggering conditions for the subsequent line estimation step, ensures that when the target line is broken, the completion mechanism can be started in time, avoids interruption of the detection process or misalignment of the result due to incomplete line segments, and guarantees the continuity and integrity of the detection process.
[0028] Fifth, in the online estimation stage, as shown in Figure 3 , the broken line segments or sparse feature points are reconstructed and completed, and for any broken line in or , first, the end point coordinates of the broken line segment are extracted, the direction vector of the end point line is calculated to determine the overall trend of the line segment, the curve interpolation algorithm is used to complete the broken part along the trend of the line segment with the end points as the starting and ending nodes, so that the completed line segment is consistent with the original line segment in trend and curvature without obvious abrupt transitions; during the completion process, the structure boundary of the observation window is referred to in real time to avoid the completion line segment exceeding the effective range of the observation window, specifically, the end point coordinates and are extracted, the local trend vector is calculated, the missing segment is filled by extending along the direction using cubic spline interpolation, and the interpolation node interval is 1 pixel; If only discrete feature points are detected, the abnormal points deviating from the overall distribution trend are removed, K-means clustering is performed on all candidate points to group the remaining effective feature points, the line trend corresponding to each group of feature points is determined based on the position distribution and density of the feature points, the Euclidean distance is used for distance measurement, and after clustering, a straight line is fitted for each cluster of points to obtain an initial trend line; Subsequently, a preset fluid physical constraint model is called, which stipulates that the real oil surface is a horizontal plane in a static equilibrium state, so after considering the inclination of the observation window, the and should be approximately parallel in the physical space, and the distance between them should satisfy , wherein is the equivalent distance of the optical path, and accordingly, parallelism constraint and distance constraint are imposed on the estimated line, that is, the two target lines are approximately parallel in the physical space, and the distance conforms to the law of oil refraction, the optimal adjustment amount is solved by the Lagrange multiplier method, and the final estimated line and are output.
[0029] The line estimation in the application is aimed at the case of target line missing, and the reconstruction of line features is realized through differentiated estimation strategies, solving the problem that the traditional visual detection cannot continue due to incomplete line segments, and providing reliable estimated line data in time when the target line is missing, avoiding the termination of the detection process due to the missing of core features, ensuring the continuity of the whole process from image acquisition to oil level determination, in addition, through the dual constraints of observation window structure parameters and oil physical properties, the problem of estimated line deviating from the actual target line caused by simply relying on algorithm interpolation or clustering is effectively avoided, ensuring that the estimated line is consistent with the actual scene in trend, position and spacing, and providing accurate data support for subsequent actual oil level height calculation.
[0030] Sixth, in the actual oil level height calculation stage, as shown in Figure 3 , first, the camera pose parameters are obtained, if the camera is mounted on a patrol robot, the pitch angle and roll angle of the camera optical axis relative to the world coordinate system are obtained through the six-axis inertial measurement unit built in the robot, if it is fixedly installed, the pre-calibrated pose angle is read from the installation file, at the same time, the installation parameters of the gear box of this type are called from the gear box digital twin model database, including the observation window plane normal vector , the height of the oil cavity bottom reference surface and the position of the observation window center point in the gear box coordinate system , based on the above parameters, the system constructs the mapping model of image pixel coordinates to gear box physical coordinates , which is defined by the camera calibration intrinsic matrix , extrinsic rotation matrix and translation vector , which satisfies: , wherein is a scale factor, through inverse projection, all pixel points on and ( and ) are converted into three-dimensional space point cloud, then, the plane equations of the two groups of point clouds are fitted : and : According to the principle of optical refraction, the real oil surface is located between and , and its height can be solved by weighted average: , wherein , respectively , Z coordinate on the center cross section of the oil cavity, weight Oil liquid refractive index, final Convert to height relative to the bottom of the oil cavity , and back-project back to the image plane to generate an image-level oil level line .
[0031] The actual oil level height calculation in the application fuses multiple source information such as camera calibration parameters, shooting angles, oil tank setting angles, etc., to establish an accurate mapping model of pixel coordinates and physical coordinates, and converts the target line or estimated line in the image into the real oil level height, solving the problem of the inability to quantify in traditional visual detection, and whether the camera is fixedly installed or carried by a patrol robot, the error caused by changes in shooting angle and distance can be compensated through dynamic calling of posture parameters and installation parameters, and the structural differences of the oil cavities of different models of gearboxes are compatible, without the need for separate debugging for specific scenarios. In addition, geometric solving is performed in combination with the optical refraction characteristics of the oil and the geometric parameters of the gearbox oil cavity, ensuring that the calculation process conforms to the physical principles and equipment structure logic, avoiding numerical deviations caused by relying solely on image features, and even in the case of poor imaging quality, the accuracy of the oil level height calculation can be ensured through parameter constraints.
[0032] Seventh, in the reference line calibration stage, the centers of and are calculated in the image coordinate system , specifically, the horizontal coordinates are calculated and , the midpoint is taken, and a straight line is fitted , then the deflection amount between and is calculated, and the angle deflection amount is calculated The dot product formula of the direction vectors of the two straight lines and is calculated: , Position offset is taken as the average of all down , and the initial reference line is calibrated: first, apply the rotation transformation matrix around the image center , then apply the translation vector , and get the calibrated reference line .
[0033] The reference line calibration in the application is based on the deflection amount of the oil liquid level line and the center line of the target line, the initial reference line is corrected in angle and position through rotation matrix and translation transformation, the reference deviation caused by factors such as mark wear, visual angle drift and installation error is effectively offset, the angle deflection amount is calculated through the vector dot product formula, the position offset amount is calculated through the mean value of coordinate difference, the calibration process is realized through standardized mathematical operation, subjective factor interference is avoided, the calibration logic under different detection scenes and different equipment is unified, and the consistency and repeatability of the detection result are improved.
[0034] Eighth, in the oil state determination stage, the relative position of and is calculated, if the two straight lines intersect, it is determined that the oil level is in the normal interval, if the two straight lines are parallel and the distance , is a preset threshold, it is determined that the limit is exceeded, further, if is above , it is determined that the oil level is too high, if it is below, it is determined that the oil level is too low.
[0035] Ninth, in the result verification and output stage, three verifications are performed, wherein the physical verification: whether satisfies , the data consistency verification: if there is a detection record in the history database within the last 7 days, the daily average change rate of is calculated, if the absolute value exceeds n millimeters per day, it is marked as an abnormal trend; the algorithm accuracy verification: two standard height marks (such as scale lines) are preset in the observation window, the physical height is known, the image position is calculated by back calculation, the reconstruction error is calculated, if the root mean square error is 1 pixel, it is determined that the accuracy is insufficient; only when the three verifications are passed, the system outputs the final result, including the state label, value, timestamp, camera ID, gearbox serial number and key parameters, otherwise an abnormal code is output and a re-detection process is triggered.
[0036] The above is only the preferred embodiment of the application, the protection scope of the application is not limited to the above-mentioned embodiments, any technical solution belonging to the idea of the application is within the protection scope of the application. It should be noted that for ordinary technical personnel in the technical field, some improvements and decorations without departing from the principle of the application are also considered as the protection scope of the application.
Claims
1. A method for detecting excessive oil level at the gearbox under a train, characterized in that: Includes the following steps: The image acquisition step involves using a vision camera to acquire the original image containing the gearbox oil level observation window, and then generating the target image through image processing. The baseline fitting step involves locating the observation window region in the target image, extracting and verifying the marker region, determining whether the marker region exists on both sides or on one side, and fitting the initial baseline based on the center point coordinates of the marker region. The observation window inner line extraction step involves extracting two target lines within the observation window area. The target lines are the contact line between the oil and the observation window and the feature line formed by the refraction of the oil. The actual oil level determination process involves calculating the actual oil level height and generating an image-level oil level line based on the shooting angle of the vision camera, the setting angle of the oil tank, and the positions of the two target lines. The baseline calibration step involves calibrating the initial baseline based on the deflection of the oil level line and the midline of the two target lines. The oil level status determination procedure involves judging whether the oil level exceeds the limit based on the positional relationship between the calibrated baseline and the oil level line.
2. The method for detecting excessive oil level at the gearbox under a train as described in claim 1, characterized in that: The line extraction step within the observation window includes a line extraction strategy. This strategy involves using a line detection algorithm to extract straight lines within the observation window region that have continuous pixel distribution and conform to a preset line width range and grayscale value abrupt change characteristics. Then, interference line segments within the observation window are filtered out using the length, direction, and position parameters of the straight lines, retaining two target lines. The percentage of continuous pixels for each retained target line is calculated. When the percentage of continuous pixels for both target lines reaches a preset threshold, it is determined that two continuous lines can be extracted; otherwise, it is determined that two continuous lines cannot be extracted.
3. The method for detecting excessive oil level at the gearbox under a train as described in claim 2, characterized in that: It also includes a line prediction step. If it is determined that two continuous lines cannot be extracted, the broken parts are filled in by curve interpolation algorithm based on the endpoint coordinates and trend of the line segments. If only some feature points are extracted, the feature points are grouped by clustering algorithm to determine the line trend. Then, the lines after filling or clustering are constrained and adjusted according to the preset gearbox oil level observation window structure parameters and the physical properties of the oil to obtain the final predicted line.
4. The method for detecting excessive oil level at the gearbox under a train as described in claim 3, characterized in that: The actual oil level determination step includes an oil level line generation strategy. The oil level line generation strategy includes obtaining the shooting angle of the visual camera through the camera's attitude sensor data, obtaining the setting angle of the oil tank by calling the preset gearbox installation parameter database, establishing a mapping model between image pixel coordinates and the actual physical coordinates of the gearbox based on the camera calibration parameters, shooting angle, and oil tank setting angle, converting the pixel coordinates of two continuous lines or estimated lines into actual physical coordinates through the mapping model, and then solving the actual oil level height value through geometric calculation methods using the oil chamber structure parameters of the gearbox, and generating an image pixel-level oil level line corresponding to the actual oil level height.
5. The method for detecting excessive oil level at the gearbox under a train as described in claim 1 or 4, characterized in that: The baseline calibration step includes a calibration strategy, which involves obtaining the pixel coordinates of two continuous lines or estimated lines in the image pixel coordinate system, calculating the midpoint coordinates of the two lines under the same horizontal or vertical coordinate, fitting the pixel-level midline of the two lines using a straight line fitting algorithm, and then calculating the angular deflection and positional offset of the actual oil level line relative to the midline. The angular deflection is calculated using the vector dot product formula, and the positional offset is the average difference between the vertical coordinates of the two lines under the same horizontal coordinate or the average difference between the horizontal coordinates under the same vertical coordinate. The angle is corrected using a rotation matrix based on the angular deflection, and the position is corrected using a translation transformation based on the positional offset to obtain the calibrated baseline.
6. The method for detecting excessive oil level at the gearbox under a train as described in claim 5, characterized in that: The marked region identification and analysis step includes a marked region discrimination strategy. The marked region discrimination strategy includes separating the oil level observation window region from the preprocessed image using an image segmentation algorithm, extracting the outline of the observation window using an edge detection algorithm, determining the range of the observation window in the image, searching for target regions within the observation window region using a feature matching algorithm based on preset marked region features, removing false targets and verifying the region's geometric parameters through morphological operations, determining the final marked region, and then counting the number of verified marked regions to determine whether it is a double-sided marked state with one effective marked region on each side of the observation window, or a single-sided marked state with only one effective marked region on one side.
7. The method for detecting excessive oil level at the gearbox under a train as described in claim 6, characterized in that: The baseline fitting step includes a fitting strategy, which includes determining the center point coordinates of each effective marked area through a geometric center calculation method. If it is a double-sided marked area, a straight line fitting algorithm is used to fit the initial baseline with the two center points as reference points. If it is a single-sided marked area, the constrained straight line fitting algorithm is used to fit the initial baseline with the single-sided center point as the known point, based on the preset observation window structure parameters and geometric constraints.
8. The method for detecting excessive oil level at the gearbox under a train as described in claim 1, characterized in that: It also includes a result verification and output step, which includes a physical verification strategy, a data consistency verification strategy, and an algorithm accuracy verification strategy. If the physical verification strategy, the data consistency verification strategy, and the algorithm accuracy verification strategy are all verified to be successful, the oil level status, the actual oil level height, the detection time, and the relevant parameters of the camera and gearbox will be output. If any one of the strategies fails verification, an abnormal prompt message will be output.
9. The method for detecting excessive oil level at the gearbox under a train as described in claim 8, characterized in that: The physical verification strategy includes determining whether the actual oil level height is within the physical capacity range of the gearbox oil chamber. The data consistency verification strategy includes comparing the current test results with historical test data and analyzing whether the trend of change conforms to the normal wear and tear pattern. The algorithm accuracy verification strategy includes verifying whether the calculation accuracy of the oil level line meets the preset error threshold by using a preset standard reference.
10. A system for detecting excessive oil level at the gearbox under a train, characterized in that: include: The image acquisition module acquires the original image containing the gearbox oil level observation window through a vision camera, and generates the target image through image processing; The baseline fitting module locates the observation window region in the target image, extracts and verifies the marked region, determines whether the marked region exists on both sides or on one side, and fits the initial baseline based on the center point coordinates of the marked region. The observation window inner line extraction module extracts two target lines within the observation window area, namely the contact line between the oil and the observation window and the feature line formed by the refraction of the oil. The actual oil level determination module calculates the actual oil level height and generates an image-level oil level line by using the shooting angle of the vision camera, the setting angle of the oil tank, and the position of the two target lines. The baseline calibration module calibrates the initial baseline based on the deflection of the oil level line and the midline of the two target lines. The oil level status determination module determines whether the oil level exceeds the limit based on the positional relationship between the calibrated baseline and the oil level line.
Citation Information
Patent Citations
Photoelectric multichannel communicating pipe liquid level bridge deflection measuring device and method
CN113029477A
Liquid level detection and measurement method based on machine vision
CN113188633A
Device, method and beverage dispenser for determining the volume of a container
EP4092378A1