Method for monitoring oil level of hydraulic mechanism
Through multi-spectral camera acquisition and image fusion and combined with neural network models to identify liquid levels, the problem of inaccurate judgment of hydraulic mechanism oil level is solved, and accurate monitoring of hydraulic mechanism oil level and determination of risk levels are achieved.
Patent Information
- Application Number
- CN202411035444.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-31
- Publication Date
- 2025-01-03
AI Technical Summary
The prior art is difficult to accurately identify the oil level of the hydraulic mechanism, especially when the color of the oil is similar to the background or the oil level is not marked, resulting in inaccurate judgment.
A multi-spectral camera is used to collect image information under multiple spectras of the hydraulic mechanism, generate fusion images through image fusion, and use a pre-trained neural network model to identify liquid level. The liquid level and risk level are determined based on the recognition results, and the model parameters are optimized to Improve identification accuracy.
Accurate monitoring of the oil level of the hydraulic mechanism is achieved, effectively solving the problem of inaccurate oil level judgment, especially when the oil level color is similar to the background or the marking is not obvious, the accuracy of judgment is improved.
Smart Images

Figure CN119251538A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of monitoring the oil level of a hydraulic mechanism, and in particular to a method for monitoring the oil level of a hydraulic mechanism. Background Art
[0002] Hydraulic mechanism circuit breakers have the characteristics of smooth operation, reliable action, and can still operate when the mechanism temporarily loses power. Therefore, they are widely used in power systems. As the hydraulic mechanism circuit breaker increases in service life, the sealing gasket will age, break, and contain impurities in the hydraulic oil to varying degrees, resulting in oil leakage in the hydraulic mechanism. At present, in order to detect the oil level in a timely manner, a camera is used to shoot the oil level to identify the oil level in the image. However, since the color of the hydraulic oil is similar to the background, or the oil level mark is not obvious, the oil level judgment is inaccurate. Summary of the invention
[0003] The purpose of the present invention is to provide a method for monitoring the oil level of a hydraulic mechanism, so as to solve the technical problem of how to accurately identify the oil level of the hydraulic mechanism.
[0004] On the one hand, a method for monitoring the oil level of a hydraulic mechanism is provided, comprising:
[0005] The image information of the oil level of the hydraulic mechanism under multiple spectra is collected by a preset image collection device;
[0006] The images of different spectra are fused to obtain a fused image of the current liquid surface;
[0007] The fused image of the current liquid surface is input into a pre-trained image recognition model to perform liquid level recognition on the fused image, and the corresponding final liquid level is determined according to the number of liquid levels contained in the recognition result, and the corresponding risk level is determined by the final liquid level; wherein the image recognition model is a trained image recognition model obtained by pre-training a preset neural network model for liquid level recognition based on labeled image samples, comparing the recognition results with the labeled standard results, and optimizing the parameters of the neural network model based on the comparison results.
[0008] Preferably, the preset image acquisition device at least includes a multi-spectral camera, which is arranged above the oil level window of the hydraulic mechanism and is used to capture the liquid level position through a viewing angle.
[0009] Preferably, obtaining the fused image of the current liquid level specifically includes:
[0010] Assign corresponding weights to images with different spectra, and calculate the corresponding weighted average of all images to generate a fused image;
[0011] When generating a fused image, use an image pyramid of different resolutions, perform fusion at each resolution level, and gradually synthesize the fused resolution level with the resolution level of the previous level to obtain the final image;
[0012] In the final image, the features corresponding to each spectral image are extracted and fused at their corresponding feature levels to reconstruct a fused image of the current liquid surface.
[0013] Preferably, determining the corresponding final liquid level according to the number of liquid levels included in the recognition result specifically includes:
[0014] When the recognition result includes only one liquid level, the recognition result is compared with the preset liquid level position;
[0015] If the recognition result is lower than the preset liquid level, an alarm signal is output;
[0016] If the recognition result is not lower than the preset liquid level position, the distance value between the recognition result and the preset liquid level position is determined.
[0017] Preferably, the determining of the corresponding risk level by the final liquid level specifically includes:
[0018] Compare the distance value between the recognition result and the preset liquid level position with the risk standard to determine the risk level corresponding to the distance value;
[0019] The risk standard is a plurality of distance ranges divided by a plurality of distance thresholds, and each distance range corresponds to a risk level.
[0020] Preferably, determining the corresponding final liquid level according to the number of liquid levels included in the recognition result specifically includes:
[0021] When the recognition result includes multiple liquid levels, the detection frames corresponding to the multiple liquid levels are extracted from the fused image of the current liquid surface respectively;
[0022] Identify the three different RGB color values corresponding to each pixel in each detection frame, and establish the corresponding R value matrix, G value matrix and B value matrix.
[0023] Preferably, it also includes:
[0024] According to the R value matrix, G value matrix and B value matrix, the color mean and the variance of the color distribution of each detection frame are calculated respectively;
[0025] Each detection frame is judged according to a preset color mean range and a color distribution variance range. If only one detection frame among multiple detection frames has a color mean and a color distribution variance within the preset color mean range and a color distribution variance range, the liquid level in the detection frame is the final liquid level.
[0026] Compare the liquid level in the detection frame with a preset liquid level position; if the liquid level in the detection frame is lower than the preset liquid level position, output an alarm signal;
[0027] If the liquid level in the detection frame is not lower than the preset liquid level position, then the distance value between the liquid level in the detection frame and the preset liquid level position is determined.
[0028] Preferably, the determining of the corresponding risk level by the final liquid level specifically includes:
[0029] Compare the distance value between the liquid level in the detection frame and the preset liquid level position with the risk standard to determine the risk level corresponding to the distance value;
[0030] The risk standard is a plurality of distance ranges divided by a plurality of distance thresholds, and each distance range corresponds to a risk level.
[0031] Preferably, it also includes:
[0032] If the color means and the variances of the color distribution corresponding to the multiple detection frames are not within the preset color mean range and the color distribution variance range, it is determined that the image acquisition device may be faulty;
[0033] If the color means and the variances of the color distribution corresponding to the multiple detection frames are all within the preset color mean range and the color distribution variance range, it is determined that the image acquisition device may be faulty.
[0034] Preferably, it also includes:
[0035] When an alarm signal is received, the alarm action is executed through the preset alarm method;
[0036] When the corresponding risk level is determined, risk warning is executed through the corresponding reminder method.
[0037] In summary, the implementation of the embodiments of the present invention has the following beneficial effects:
[0038] The method for monitoring the oil level of a hydraulic mechanism provided by the present invention collects multi-spectral oil level images and performs liquid level recognition on the fused images. By comparing the recognized liquid level with a preset liquid level position, an alarm is issued, or the corresponding risk level is determined based on the distance between the liquid level and the preset liquid level position, thereby accurately monitoring the oil level of the hydraulic mechanism. This method is effective in accurately judging the oil level when the color of the hydraulic oil is similar to the background or the oil level mark is not obvious. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, without paying creative labor, other drawings obtained based on these drawings still belong to the scope of the present invention.
[0040] Figure 1 The main flow diagram of a method for monitoring the oil level of a hydraulic mechanism in an embodiment of the present invention is shown. DETAILED DESCRIPTION
[0041] In order to make the objectives, technical solutions and advantages of the present invention more clear, the present invention will be further described in detail below with reference to the accompanying drawings.
[0042] like Figure 1 FIG. 1 is a schematic diagram of an embodiment of a method for monitoring the oil level of a hydraulic mechanism provided by the present invention. In this embodiment, the method comprises the following steps:
[0043] Step S1, collects image information of the hydraulic mechanism oil level under multiple spectra through a preset image acquisition device; it is understandable that the camera is installed above the hydraulic mechanism oil level window, and the liquid level position can be captured through the viewing angle, so that it can completely capture the hydraulic mechanism oil level. In this embodiment, the camera uses a multi-spectral camera, which is a camera with multiple filters, each filter only allows light of a specific wavelength to pass through, and captures images of the same scene under different spectral bands, so that the obtained image is more accurate.
[0044] In one embodiment, the preset image acquisition device includes at least a multi-spectral camera, which is arranged above the oil level window of the hydraulic mechanism and is used to capture the liquid level position through a viewing angle.
[0045] Step S2, fusing images of different spectra to obtain a fused image of the current liquid level; understandably, fusing images of different spectra to obtain a fused image of the current liquid level in the oil level window.
[0046] In one embodiment, corresponding weights are assigned to images of different spectra, and the weighted average values corresponding to all images are calculated to generate a fused image. When generating the fused image, image pyramids of different resolutions are used to perform fusion at each resolution level, and the fused resolution level is gradually synthesized with the resolution level of the previous level to obtain a final image. In the final image, features corresponding to each spectral image are extracted, and fused at the corresponding feature level to reconstruct a fused image of the current liquid surface.
[0047] Step S3, input the fused image of the current liquid surface into the pre-trained image recognition model to perform liquid level recognition on the fused image, determine the corresponding final liquid level according to the number of liquid levels contained in the recognition result, and determine the corresponding risk level through the final liquid level; wherein, the image recognition model is a trained image recognition model obtained by pre-training a preset neural network model for liquid level recognition according to the labeled image samples, and comparing the recognition results with the labeled standard results, and optimizing the parameters of the neural network model according to the comparison results. It can be understood that the liquid level recognition is performed on the fused image according to the image recognition model. The image recognition model adopts a neural network model, pre-trains the neural network for liquid level recognition according to the labeled image samples, compares the recognition results with the labeled standard results, and optimizes the parameters of the neural network model according to the comparison results, and finally outputs the trained image recognition model.
[0048] When the image recognition model is used for recognition, only one liquid level may be recognized or multiple liquid levels may be recognized. Different processing is required for different numbers of liquid level recognition situations, as follows:
[0049] In one embodiment, the determining of the corresponding final liquid level according to the number of liquid levels included in the recognition result specifically includes: when the recognition result includes only one liquid level, comparing the recognition result with a preset liquid level position; if the recognition result is lower than the preset liquid level position, outputting an alarm signal; if the recognition result is not lower than the preset liquid level position, determining the distance value between the recognition result and the preset liquid level position. It is understandable that when a liquid level is recognized in the fused image, if the liquid level is lower than the preset liquid level position, the corresponding alarm device will sound an alarm, and the corresponding alarm device may use a buzzer.
[0050] Specifically, the distance value between the recognition result and the preset liquid level position is compared with the risk standard to determine the risk level corresponding to the distance value; wherein, the risk standard is a plurality of distance ranges divided by a plurality of distance thresholds, and each distance range corresponds to a risk level. It is understandable that the risk level corresponding to the different distances between the recognition liquid level and the preset liquid level position, such as the longer the distance, the higher the risk level, is divided according to the actual situation. According to the distance between the liquid level and the preset liquid level position, the corresponding risk level is determined, and the risk level is displayed on the display screen. If the liquid level is not lower than the preset liquid level position, no alarm is issued.
[0051] In one embodiment, the method of determining the corresponding final liquid level according to the number of liquid levels included in the recognition result specifically includes: when the recognition result includes multiple liquid levels, extracting detection frames corresponding to the multiple liquid levels from the fused image of the current liquid surface respectively; identifying three different RGB color values corresponding to each pixel in each detection frame, and establishing corresponding R value matrix, G value matrix and B value matrix. It can be understood that, for example, when there are two liquid levels, namely the first liquid level and the second liquid level, the areas where the two liquid levels are located are extracted respectively, for example, a detection frame of a specific size is used, such as forming a detection frame based on a distance x above and below the liquid level, and x can be a value set according to the actual setting. The first liquid level and the second liquid level are framed according to the detection frame as the first area where the first liquid level is located and the second area where the second liquid level is located, and the first area and the second area do not intersect. In this embodiment, the size setting of the detection frame can be set according to the distance between the first liquid level and the second liquid level.
[0052] Specifically, the color mean and the variance of the color distribution corresponding to each detection frame are calculated respectively according to the R value matrix, the G value matrix and the B value matrix; each detection frame is judged according to the preset color mean range and the variance range of the color distribution, if the color mean and the variance of the color distribution corresponding to only one detection frame among multiple detection frames are within the preset color mean range and the variance range of the color distribution, then the liquid level in the detection frame is the final liquid level; it can be understood that if the color mean and the variance of the color distribution of one area in the first area and the second area are within the corresponding color mean range and the variance range of the color distribution, the area is considered to be a qualified area, that is, the liquid level in the area is the final liquid level, thereby ensuring the accuracy of identifying the liquid level.
[0053] The three different RGB color values (i.e., R color value, G color value, and B color value, referred to as R value, G value, and B value) corresponding to each pixel in the first area and the second area are respectively established, and the corresponding R value matrix, G value matrix, and B value matrix are established. For example, the R value matrix in the first area is:
[0054]
[0055] The color means and the variance of the color distribution corresponding to the first region and the second region are calculated respectively according to the R value matrix, the G value matrix and the B value matrix. For example, the mean is calculated using numpy.mean(). In this embodiment, the mean and variance are calculated using three different RGB color values corresponding to each pixel and the number of pixels, and the formula is as follows:
[0056]
[0057] Where N is the total number of pixels in the central area, y represents any one of the three primary colors RGB, and X yiis the R value, G value or B value corresponding to the i-th pixel in the central area.
[0058] More specifically, the liquid level in the detection frame is compared with the preset liquid level position; if the liquid level in the detection frame is lower than the preset liquid level position, an alarm signal is output; if the liquid level in the detection frame is not lower than the preset liquid level position, the distance value between the liquid level in the detection frame and the preset liquid level position is determined. The distance value between the liquid level in the detection frame and the preset liquid level position is compared with the risk standard to determine the risk level corresponding to the distance value; wherein the risk standard is a plurality of distance ranges divided by a plurality of distance thresholds, and each distance range corresponds to a risk level. If the final liquid level is lower than the preset liquid level position, the corresponding alarm device will sound an alarm, and determine the corresponding risk level according to the distance between the liquid level and the preset liquid level position, and display the risk level on the display screen. If the liquid level is not lower than the preset liquid level position, no alarm will be sounded.
[0059] In one embodiment, if the color means and the variances of the color distribution corresponding to the multiple detection frames are not within the preset color mean range and the color distribution variance range, it is determined that the image acquisition device may have a fault; if the color means and the variances of the color distribution corresponding to the multiple detection frames are within the preset color mean range and the color distribution variance range, it is determined that the image acquisition device may have a fault. It can be understood that a color mean range and a color distribution variance range are calculated according to the area where the liquid surface is located. The color means and the variances of the color distribution of the first area and the second area are compared with the color mean range and the color distribution variance range respectively. If the first area and the second area are not within the color mean range and the color distribution variance range, the two areas are considered to be unqualified areas. However, the possibility that both liquid levels are unqualified is extremely small, so feedback information that the camera may have a fault is sent to the staff to prompt the staff to check the camera. If the first area and the second area are both within the color mean range and the color distribution variance range, the two areas are considered qualified areas. However, the possibility that both liquid levels are qualified is also extremely small. Therefore, feedback information that the oil level window may be faulty is sent to the staff.
[0060] In one embodiment, when an alarm signal is received, an alarm action is performed through a preset alarm method; when a corresponding risk level is determined, a risk warning is performed through a corresponding reminder method.
[0061] In summary, the implementation of the embodiments of the present invention has the following beneficial effects:
[0062] The method for monitoring the oil level of a hydraulic mechanism provided by the present invention collects multi-spectral oil level images and performs liquid level recognition on the fused images. By comparing the recognized liquid level with a preset liquid level position, an alarm is issued, or the corresponding risk level is determined based on the distance between the liquid level and the preset liquid level position, thereby accurately monitoring the oil level of the hydraulic mechanism. This method is effective in accurately judging the oil level when the color of the hydraulic oil is similar to the background or the oil level mark is not obvious.
[0063] The above disclosure is only the preferred embodiment of the present invention, which certainly cannot be used to limit the scope of the present invention. Therefore, equivalent changes made according to the claims of the present invention are still within the scope of the present invention.
Claims
1. A method for monitoring the oil level of a hydraulic mechanism, characterized in that: include: The image information of the oil level of the hydraulic mechanism under multiple spectra is collected by a preset image collection device; The images of different spectra are fused to obtain a fused image of the current liquid surface; The fused image of the current liquid surface is input into a pre-trained image recognition model to perform liquid level recognition on the fused image, and the corresponding final liquid level is determined according to the number of liquid levels contained in the recognition result, and the corresponding risk level is determined by the final liquid level; wherein the image recognition model is a trained image recognition model obtained by pre-training a preset neural network model for liquid level recognition based on labeled image samples, comparing the recognition results with the labeled standard results, and optimizing the parameters of the neural network model based on the comparison results.
2. The method according to claim 1, characterized in that The preset image acquisition device at least includes a multi-spectral camera, which is arranged above the oil level window of the hydraulic mechanism and is used to capture the liquid level position through a viewing angle.
3. The method according to claim 2, characterized in that The step of obtaining the fused image of the current liquid surface specifically includes: Assign corresponding weights to images with different spectra, and calculate the corresponding weighted average of all images to generate a fused image; When generating a fused image, use an image pyramid of different resolutions, perform fusion at each resolution level, and gradually synthesize the fused resolution level with the resolution level of the previous level to obtain the final image; In the final image, the features corresponding to each spectral image are extracted and fused at their corresponding feature levels to reconstruct a fused image of the current liquid surface.
4. The method according to claim 3, characterized in that The step of determining the corresponding final liquid level according to the number of liquid levels included in the recognition result specifically includes: When the recognition result includes only one liquid level, the recognition result is compared with the preset liquid level position; If the recognition result is lower than the preset liquid level, an alarm signal is output; If the recognition result is not lower than the preset liquid level position, the distance value between the recognition result and the preset liquid level position is determined.
5. The method according to claim 4, characterized in that The determination of the corresponding risk level by the final liquid level specifically includes: Compare the distance value between the recognition result and the preset liquid level position with the risk standard to determine the risk level corresponding to the distance value; The risk standard is a plurality of distance ranges divided by a plurality of distance thresholds, and each distance range corresponds to a risk level.
6. The method according to claim 3, characterized in that The step of determining the corresponding final liquid level according to the number of liquid levels included in the recognition result specifically includes: When the recognition result includes multiple liquid levels, the detection frames corresponding to the multiple liquid levels are extracted from the fused image of the current liquid surface respectively; Identify the three different RGB color values corresponding to each pixel in each detection frame, and establish the corresponding R value matrix, G value matrix and B value matrix.
7. The method according to claim 6, characterized in that Also includes, According to the R value matrix, G value matrix and B value matrix, the color mean and the variance of the color distribution of each detection frame are calculated respectively; Each detection frame is judged according to a preset color mean range and a color distribution variance range. If only one detection frame among multiple detection frames has a color mean and a color distribution variance within the preset color mean range and a color distribution variance range, the liquid level in the detection frame is the final liquid level. Compare the liquid level in the detection frame with a preset liquid level position; if the liquid level in the detection frame is lower than the preset liquid level position, output an alarm signal; If the liquid level in the detection frame is not lower than the preset liquid level position, then the distance value between the liquid level in the detection frame and the preset liquid level position is determined.
8. The method according to claim 7, characterized in that The determination of the corresponding risk level by the final liquid level specifically includes: Compare the distance value between the liquid level in the detection frame and the preset liquid level position with the risk standard to determine the risk level corresponding to the distance value; The risk standard is a plurality of distance ranges divided by a plurality of distance thresholds, and each distance range corresponds to a risk level.
9. The method according to claim 7, characterized in that Also includes, If the color means and the variances of the color distribution corresponding to the multiple detection frames are not within the preset color mean range and the color distribution variance range, it is determined that the image acquisition device may be faulty; If the color means and the variances of the color distribution corresponding to the multiple detection frames are all within the preset color mean range and the color distribution variance range, it is determined that the image acquisition device may be faulty.
10. The method according to claim 5 or 8, characterized in that Also includes, When an alarm signal is received, the alarm action is executed through the preset alarm method; When the corresponding risk level is determined, risk warning is executed through the corresponding reminder method.
