A method and system for detecting an over-limit oil level at a gear box of a train bottom

By using an image analysis framework that combines high-resolution visual imaging with multi-source knowledge fusion, the problems of high misjudgment rate, low efficiency, and difficult sensor installation in train undercarriage gearbox oil level detection have been solved, realizing fully automatic and high-precision oil level detection that is adaptable to different types of gearboxes.

CN121521222BActive Publication Date: 2026-04-21CRRC HANGZHOU DIGITAL TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
CRRC HANGZHOU DIGITAL TECH CO LTD
Filing Date
2026-01-15
Publication Date
2026-04-21

AI Technical Summary

Technical Problem

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 result in increased size, difficult installation, and poor versatility. Furthermore, traditional vision methods are unstable in complex backgrounds and cannot accurately map the oil level.

Method used

An image analysis framework that integrates high-resolution visual imaging and multi-source prior knowledge is adopted. Images are acquired through a visual camera, a baseline is fitted, feature lines within the observation window are extracted, the actual oil level is calculated by combining an attitude sensor, a pixel-to-physical coordinate mapping is established, and the baseline is dynamically calibrated to achieve fully automatic and high-precision detection.

Benefits of technology

Without altering the original structure, it achieves high-precision and robust identification of oil level status, resists interference from light fluctuations, dirt occlusion, and marker wear, ensuring the reliability and consistency of detection results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121521222B_ABST
    Figure CN121521222B_ABST
Patent Text Reader

Abstract

This invention discloses a method and system for detecting excessive oil levels in a train undercarriage gearbox, relating to the field of rail transit inspection technology. The method acquires the original image of the gearbox oil level observation window using a vision camera and processes it to generate a target image; it locates the observation window area and extracts the verification mark area, fitting an initial baseline; it extracts the oil contact line and refraction feature line within the observation window, and when line segments are discontinuous, it uses interpolation or clustering algorithms to estimate and complete them; it establishes a pixel-to-physical coordinate mapping model based on the camera shooting angle, the tank setting angle, and the target line position, calculates the actual oil level height, and generates an image-level oil level line; it calibrates the baseline based on the deflection of the oil level line and the target line's centerline, and finally determines whether the oil level exceeds the limit based on the positional relationship between the calibrated baseline and the oil level line; this invention requires no modification to the original structure, achieves fully automatic and high-precision detection, has strong anti-interference capabilities, wide adaptability, and ensures train operation safety.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of rail transit testing technology, and more specifically to a method for detecting excessive oil levels in the gearbox under a train. Background Technology

[0002] In the operation and maintenance system of rail transit equipment, the condition monitoring of key components of the train running gear is directly related to operational safety and service life. Among them, core transmission and air supply units such as the undercarriage gearbox and air source device rely heavily on lubricating fluid for friction reduction, heat dissipation, and corrosion prevention. The stability of the lubrication level is a prerequisite for ensuring the long-term reliable operation of the equipment. To achieve dynamic sensing of lubrication status, existing designs generally integrate small transparent observation windows on the gearbox housing, supplemented by scale markings or reference marks, to reflect the internal oil level in real time through a level gauge.

[0003] Traditional inspection methods mainly rely on manual visual inspection, which is flawed because it is highly dependent on the operator's subjective perception and on-site concentration. On the one hand, factors such as fluctuations in lighting conditions, dirt obstruction, and viewing angle deviation can easily lead to misjudgments. On the other hand, under large-scale, high-frequency train inspection tasks, manual operation is inefficient and has a high rate of missed inspections, making it difficult to meet the current railway system's urgent needs for preventive maintenance and intelligent operation and maintenance. To overcome these limitations, the industry has gradually introduced automated inspection solutions based on contact or non-contact sensors. However, such solutions often require the sensor element to be directly integrated into the level gauge body, resulting in a significant increase in overall size. The space under the train is extremely compact, with various pipes, cables, and structural components intertwined and densely packed, making it difficult to find a suitable installation location for large-volume sensors. They may even interfere with the existing equipment layout, seriously restricting their engineering applicability.

[0004] However, with the continuous development of unmanned technology, machine vision is now used for judgment. However, traditional vision methods mostly use single threshold segmentation or edge detection, which makes it difficult to stably identify double-line structures under complex backgrounds, low contrast, and partial occlusion conditions, and it is even more impossible to establish an accurate mapping relationship between them and the actual oil level. Correspondingly, even if image data is acquired, if there is a lack of joint modeling of camera pose, observation window tilt angle, and oil cavity geometric parameters, it is impossible to accurately convert pixel coordinates into physical height, resulting in inaccurate judgment results. If the setting of the reference line only relies on fixed marker points without considering the dynamic influence of the actual oil surface shape on the reference, systematic deviations will occur in long-term use due to factors such as marker wear and viewpoint drift, ultimately weakening the reliability of detection. Summary of the Invention

[0005] In view of the shortcomings of the existing technology, the purpose of this invention is to overcome the problems of high misjudgment rate and low efficiency caused by reliance on manual visual inspection, as well as the engineering applicability defects caused by the use of contact or non-contact sensors, such as increased size, difficult installation and poor versatility.

[0006] Therefore, this invention provides a method and system for detecting excessive oil level at the gearbox under a train. Based on an image analysis framework that integrates high-resolution visual imaging and multi-source prior knowledge, it achieves fully automatic, high-precision, and robust determination of the oil level status of the gearbox lubrication equipment without changing the original physical structure of the level gauge or introducing additional sensing hardware.

[0007] To achieve the above objectives, the present invention provides the following technical solution:

[0008] A method for detecting excessive oil level at the gearbox under a train includes the following steps:

[0009] 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.

[0010] 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.

[0011] 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.

[0012] 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.

[0013] 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.

[0014] 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.

[0015] Furthermore, the line extraction step within the observation window includes a line extraction strategy. This strategy involves extracting straight lines with continuous pixel distribution within the observation window area using a line detection algorithm, and conforming 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.

[0016] Furthermore, 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 completed or clustered lines 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.

[0017] Furthermore, 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 a 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.

[0018] Furthermore, the baseline calibration step includes a calibration strategy, which includes 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 of the differences in the vertical coordinates of the two lines under the same horizontal coordinate or the average of the differences in 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.

[0019] Furthermore, 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.

[0020] Furthermore, the baseline fitting step includes a fitting strategy, which includes determining the coordinates of the center point 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, a constrained straight line fitting algorithm is used to fit the initial baseline with the single-sided center point as a known point, in combination with the preset observation window structure parameters and geometric constraints.

[0021] Furthermore, 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 are output. If any one of the strategies fails verification, an abnormal prompt message is output.

[0022] Furthermore, 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; and 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.

[0023] A system for detecting excessive oil level at the gearbox under a train car, comprising:

[0024] 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;

[0025] The baseline fitting module locates the observation window region in the target image, extracts and verifies the marker region, determines whether the marker region exists on both sides or on one side, and fits the initial baseline based on the center point coordinates of the marker region.

[0026] 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.

[0027] 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.

[0028] 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.

[0029] 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.

[0030] The beneficial effects of this invention are as follows: It constructs an oil level over-limit detection framework, effectively solving the problems of high misjudgment rate and low efficiency in traditional manual inspection, as well as the difficulty in installing contact or non-contact sensors and poor versatility. It does not require modification of the original gearbox structure. Through the collaboration of a vision camera and an attitude sensor, it can be adapted to fixed installation or inspection robot scenarios and is compatible with different models of gearboxes. In addition, through the adaptation and fitting of the initial baseline on both sides or one side of the marked area, the complementary extraction of dual lines and line prediction, the accurate mapping of pixels and physical coordinates, and the dynamic calibration of the baseline, the detection accuracy is guaranteed layer by layer. It has strong resistance to interference from light fluctuations, dirt occlusion, and marker wear. Combined with a triple verification mechanism, it ensures the reliability of the results and realizes fully automatic and high-precision oil level detection. Attached Figure Description

[0031] Figure 1 This is the overall flowchart of the present invention;

[0032] Figure 2 This is a flowchart of baseline fitting in this invention;

[0033] Figure 3 This is a flowchart of the midline estimation and actual oil level calculation in this invention. Detailed Implementation

[0034] The present invention will be further described in detail below with reference to the accompanying drawings and embodiments. Identical components are denoted by the same reference numerals. It should be noted that the terms "front," "rear," "left," "right," "upper," and "lower" used in the following description refer to directions in the accompanying drawings, and the terms "bottom surface," "top surface," "inner," and "outer" refer to directions toward or away from the geometric center of a specific component, respectively.

[0035] This invention provides a method and system for detecting excessive oil levels in the gearbox of a train. Its core lies in constructing an image analysis framework based on high-resolution visual imaging and multi-source prior knowledge fusion to achieve fully automatic, high-precision, and robust identification of the oil level status of various lubrication equipment such as gearboxes and air compressors.

[0036] In actual deployment, the system includes an image acquisition module, a baseline fitting module, an observation window inner line extraction module, an actual oil level judgment module, a baseline calibration module, and an oil level status judgment module. The modules establish physical mapping, dynamic calibration, and status judgment through data transmission.

[0037] Specifically, such as Figure 1 As shown, in the oil level over-limit detection method, firstly, in the image acquisition stage, the image acquisition module performs the image acquisition task through an industrial vision camera. This can be an industrial vision camera installed on the bottom of the train, or an industrial vision camera mounted on an inspection robot to take images. The image acquisition module acquires the original image containing the gearbox oil level observation window through the vision camera. Then, the original image is corrected and denoised to eliminate lens distortion and environmental noise interference, generating a clear target image, providing high-quality data for subsequent analysis.

[0038] Secondly, in the labeled region recognition and analysis stage, the target image is first classified at the pixel level using a semantic segmentation network to accurately separate the oil level observation window region and eliminate background interference. This network adopts a U-Net architecture, with its encoder part based on a ResNet-34 backbone network and its decoder part including skip connections and upsampling modules. The training dataset covers thousands of gearbox observation window images under different lighting, stain, and occlusion conditions. Through this network, the system can accurately separate the observation window region and eliminate background interference, such as pipes, cables, and stains. Subsequently, the Canny edge detection algorithm is used to extract the outer wheel of the observation window. The outline is fitted with a rectangular boundary using Hough transform to determine the precise coordinate range of the observation window in the image. Within this area, feature matching is performed using a preset marker region feature template, such as shape, size ratio, or grayscale features. False targets are removed through morphological operations, and the geometric parameters of the region are verified. Only regions that meet the design specifications are identified and retained as valid marker regions. For example, marker regions formed by local reflections or stains are false targets and need to be removed. The number of valid marker regions is then counted to determine whether they exist on both sides (i.e., there is a valid marker region on each side of the observation window) or on one side (only one side has a valid marker region).

[0039] Third, in the baseline fitting stage, such as Figure 2 As shown, the geometric center coordinates of each valid marked region are calculated. For the state with both sides present, the center point of the left marked region is obtained. ) and the center point of the marked area on the right ( The least squares method is used to fit the linear equation, thus fitting an initial baseline that runs through the observation window. This method relies on the symmetry of the double-sided markings to ensure that the baseline is consistent with the structural baseline of the observation window, where the slope... ,intercept The resulting straight line is the initial baseline; for a state where only one side exists, obtain the center point of that side ( It then calls the pre-stored observation window structure parameter database (containing information such as observation window width, marked area design position, and structural symmetry axis). This database includes the observation window width. Standard distance between the marked area and the edge of the observation window and the maximum permissible tilt angle between the baseline and the horizontal direction. ,by( Given a point, constrain the slope of the line. And force the line to pass through the theoretical axis of symmetry. The initial baseline equation is solved using a constrained linear least squares method to avoid baseline offset due to missing unilateral markers.

[0040] The baseline fitting of this invention can adopt differentiated fitting strategies for different scenarios where the marked area exists on both sides or only one side. At the same time, through feature screening and false target removal, it effectively avoids interference from factors such as mark wear, stain occlusion, and viewing angle deviation, solving the problem that traditional fixed baselines are easily affected by environmental factors and fail. It ensures that the baseline can be stably established under various complex working conditions. In addition, by combining the structural parameters of the observation window and geometric constraints, the fitted initial baseline corresponds precisely to the physical reference height of the gearbox oil cavity. This provides a unified and reliable reference standard for subsequent calculation of actual oil level height and baseline calibration, avoiding inaccurate judgment of oil level exceeding the limit due to baseline deviation and improving detection accuracy.

[0041] Fourth, in the observation window line extraction stage, dual-line feature extraction is performed within the located tube wiping window area. First, the sub-image corresponding to the observation window is preprocessed in a targeted manner. The contrast enhancement algorithm is used to improve the grayscale difference between oil and non-oil areas, and between feature lines and background, thereby reducing the interference caused by uneven lighting and slight stains. At the same time, a smoothing filter algorithm is used to reduce image noise and prevent noise points from being misjudged as line features, thus providing clear and clean image data for the line detection algorithm.

[0042] Subsequently, a line detection algorithm is used to comprehensively scan the preprocessed observation window image, filtering out straight line segments with continuous pixel distribution characteristics. During the filtering process, line segments that are too thin (possibly noise) or too wide (possibly background texture) are removed according to a preset line width range. At the same time, line segments with abrupt changes in grayscale values ​​are identified. These line segments usually correspond to the interface between oil and air, or the contact surface between oil and the observation window, and are potential candidate target lines. Based on this, the system calculates the continuity index of each candidate line segment, projects the line segment onto its main direction, and counts the percentage of continuous non-zero pixels. This percentage can intuitively reflect the integrity of the line segment. If there are two line segments, their continuous pixel percentages are both greater than 85%, and the distance between them in the vertical direction is within a preset range. If the line segment shows no obvious break, then it is determined that two continuous target lines have been successfully extracted, namely... Oil and glass contact line and Secondary feature lines formed by oil refraction are used; otherwise, it is determined that two continuous lines cannot be extracted, and the process proceeds to the subsequent prediction stage for completion and reconstruction.

[0043] The observation window of this invention employs layer-by-layer screening and precise positioning in the line extraction stage, effectively avoiding interference from background textures, noise, stains, and other factors. This ensures the accurate extraction of two target lines directly related to the oil level from complex images. Furthermore, by quantifying the proportion of continuous pixels, it clearly distinguishes between two scenarios: those where continuous lines can be directly extracted and those requiring line estimation. This provides clear triggering conditions for subsequent line estimation steps, ensuring that a completion mechanism can be activated promptly when a target line is broken. This prevents interruptions in the detection process or inaccurate results due to incomplete line segments, thus guaranteeing the continuity and integrity of the detection process.

[0044] Fifth, the online forecasting stage, such as Figure 3 As shown, completion and reconstruction are performed on broken line segments or sparse feature points. or If any line breaks, first extract the coordinates of the endpoints of the broken line segment. Calculate the direction vector of the line connecting the endpoints to determine the overall trend of the line segment. Using a curve interpolation algorithm, with the endpoints as the starting and ending nodes, complete the broken section along the trend of the line segment. Ensure that the completed line segment maintains the same direction and curvature as the original line segment, without any obvious abrupt changes. During the completion process, the structural boundary of the observation window is referenced simultaneously to avoid the completed line segment exceeding the effective range of the observation window. Specifically, extract the coordinates of its endpoints (…). )and( ), calculate the local direction vector Using cubic spline interpolation along Extend the direction to fill in the missing segments, with an interpolation node spacing of 1 pixel;

[0045] If only discrete feature points are detected, all discrete feature points are preprocessed to remove outliers that deviate from the overall distribution trend. K-means clustering is performed on all candidate points to group the remaining effective feature points. Based on the location distribution and density of feature points, the linear trend corresponding to each group of feature points is determined. Euclidean distance is used as the distance metric. After clustering, a straight line is fitted to each cluster of points to obtain the initial trend line.

[0046] Subsequently, a preset fluid physics constraint model is invoked. This model stipulates that the actual oil surface is horizontal under static equilibrium conditions. Therefore, the observation window tilt angle is taken into account. Then, it is obtained from the gearbox installation parameter database. and They should be approximately parallel in physical space, and their spacing should be... satisfy ,in The equivalent spacing of the optical path is used to impose parallelism and spacing constraints on the predicted lines, ensuring that the two target lines are approximately parallel in physical space and that the spacing conforms to the laws of oil refraction. The optimal adjustment is solved using the Lagrange multiplier method to output the final predicted line. and .

[0047] The line prediction in this invention addresses the issue of missing target lines by reconstructing line features through a differentiated prediction strategy. This solves the problem of traditional visual detection being unable to continue detection due to incomplete line segments. Furthermore, it provides reliable predicted line data in a timely manner when the target line is missing, preventing the detection process from terminating due to missing core features and ensuring the continuity of the entire process from image acquisition to oil level determination. In addition, through the dual constraints of the observation window structure parameters and the physical properties of the oil, it effectively avoids the problem of predicted lines deviating from the actual target lines caused by simply relying on algorithm interpolation or clustering. This ensures that the predicted lines conform to the actual scenario in terms of direction, position, and spacing, providing accurate data support for subsequent calculation of the actual oil level height.

[0048] Sixth, in the actual oil level calculation stage, such as Figure 3 As shown, the camera attitude parameters are first obtained. If the camera is mounted on an inspection robot, the pitch angle of the camera's optical axis relative to the world coordinate system is obtained through the robot's built-in six-axis inertial measurement unit. With roll angle If it is a fixed installation, the pre-calibrated attitude angles are read from the installation file. At the same time, the installation parameters of this gearbox model are retrieved from the gearbox digital twin model database, including the normal vector of the observation window plane. Height of the reference plane at the bottom of the oil cavity And the position of the center point of the observation window in the gearbox coordinate system. Based on the above parameters, the system constructs the image pixel coordinates ( ) to gearbox physical coordinates ( The mapping model, which consists of the camera calibration intrinsic parameter matrix, is described. extrinsic rotation matrix Translation vector Commonly defined, satisfying:

[0049] ,

[0050] in As the scale factor, through inverse projection, and ( and All pixels on the graph are converted into a 3D point cloud. Then, the plane equations of the two point clouds are fitted. : and : According to the principle of optical refraction, the actual oil surface lie in and The height between them can be solved by weighted average:

[0051] ,

[0052] in , They are respectively , The Z-coordinate on the cross-section at the center of the oil cavity, weight The refractive index of the oil will ultimately Converted to height relative to the bottom of the oil chamber The image is then projected back onto the image plane to generate an image-level oil level line. .

[0053] The actual oil level height calculation in this invention integrates multi-source information such as camera calibration parameters, shooting angle, and oil tank setting angle to establish a precise mapping model between pixel coordinates and physical coordinates. This transforms the target line or estimated line in the image into the actual oil level height, solving the problem of traditional visual inspection's inability to quantify. Whether the camera is fixedly installed or mounted on an inspection robot, the dynamic use of posture and installation parameters can compensate for errors caused by changes in shooting angle and distance. It is compatible with the differences in oil chamber structure of different gearbox models, eliminating the need for separate debugging for specific scenarios. Furthermore, by combining the optical refraction characteristics of oil and the geometric parameters of the gearbox oil chamber for geometric solution, the calculation process is ensured to conform to physical principles and equipment structural logic, avoiding numerical deviations caused by simply relying on image features. Even in cases of poor image quality, parameter constraints can ensure the accuracy of the oil level height calculation.

[0054] Seventh, during the baseline calibration phase, calculations are performed in the image coordinate system. and center Specifically, for the x-axis ,calculate and The vertical axis of this column and Take the midpoint Fitted straight line Then, calculation and Deflection between, angular deflection Through the direction vectors of the two lines and Dot product formula calculation:

[0055] ,

[0056] Position offset Take as all Down The mean of the initial baseline Perform calibration: First, apply a rotation transformation matrix around the image center. Then apply a translation vector The calibrated baseline was obtained. .

[0057] The baseline calibration in this invention is based on the deflection of the oil level line and the center line of the target line. The initial baseline is corrected in angle and position by rotation matrix and translation transformation, which effectively offsets the baseline offset caused by factors such as mark wear, viewing angle drift and installation error. The angular deflection is calculated by vector dot product formula and the position offset is calculated by the average of coordinate difference. The calibration process is implemented by standardized mathematical operations, avoiding interference from subjective factors, ensuring the uniformity of calibration logic under different detection scenarios and different equipment, and improving the consistency and repeatability of detection results.

[0058] Eighth, in the oil condition determination stage, calculate... and The relative positions of the two lines are such that if they intersect, the oil level is considered to be within the normal range; if they are parallel and the distance between them is less than 1, the oil level is considered to be within the normal range. , If the preset threshold is exceeded, it is determined that the limit has been exceeded. Furthermore, if... Position and If the oil level is above the mark, it is determined that the oil level is too high; if it is below the mark, it is determined that the oil level is too low.

[0059] Ninth, in the result verification and output stage, perform triple verification, including physical verification: checking... Does it meet the requirements? Data consistency verification: If there are detection records within the last 7 days in the historical database, then calculate... The daily average rate of change, if the absolute value exceeds n millimeters per day, is marked as an abnormal trend; Algorithm accuracy verification: Two standard height markers (such as scale lines) are preset in the observation window, their physical heights are known, and the reconstruction error is calculated by inferring their image positions. If the root mean square error is less than 1 pixel, the accuracy is deemed insufficient; Only when all three verifications pass, the system outputs the final result, including status labels, The output should include the value, timestamp, camera ID, gearbox serial number, and key parameters; otherwise, an exception code should be output and a re-inspection process should be triggered.

[0060] The above are merely preferred embodiments of the present invention. The scope of protection of the present invention is not limited to the above embodiments. All technical solutions falling within the scope of the present invention's concept are within the scope of protection of the present invention. It should be noted that for those skilled in the art, any improvements and modifications made without departing from the principles of the present invention should also be considered within the scope of protection of the present invention.

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 midline of the two target lines is a straight line fitted by taking the midpoint of the distance between the two target lines in the same column of the vertical coordinate. The oil level status determination step 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 midline of the two target lines is a straight line fitted by taking the midpoint of the distance between the two target lines in the same column of the vertical coordinate. 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

  • Device, method and beverage dispenser for determining the volume of a container

    EP4092378A1