A method and system for evaluating a lubricating oil sediment ring
By performing grayscale conversion and Gaussian filtering preprocessing on lubricating oil precipitation ring test paper, combined with morphological gradient transformation and watershed algorithm, the accuracy problems of boundary recognition and region segmentation in lubricating oil precipitation ring detection were solved, achieving high-precision precipitation ring detection.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- TONGYI PETROLEUM CHEM CO LTD
- Filing Date
- 2025-09-08
- Publication Date
- 2026-04-10
AI Technical Summary
Existing methods for detecting lubricating oil sediment rings are highly subjective, inefficient, and inconsistent. They are difficult to accurately identify sediment ring boundaries and perform high-precision region segmentation in complex environments, leading to a decrease in the reliability of the detection system.
After grayscale conversion and Gaussian filtering preprocessing, the edge features of the precipitation ring are extracted by morphological gradient transformation. Combined with the watershed algorithm and the ring diffusion characteristics of the precipitation ring, false boundaries are eliminated, and the geometric center coordinates and ring width of the precipitation ring are extracted.
It achieves high-precision identification of precipitation ring boundaries against complex test strip texture backgrounds, eliminates false boundary interference, ensures the accuracy and reliability of test results, and outputs precise precipitation ring geometric parameters.
Smart Images

Figure CN121186029B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of lubricating oil detection, and in particular to a lubricating oil sediment ring detection evaluation processing method and system. BACKGROUND
[0002] Lubricating oil quality detection is a core link of industrial equipment maintenance and automobile maintenance, and is directly related to equipment operation safety and service life. The lubricating oil sediment ring test paper detection method is widely used due to its simple operation and low cost, and the content of impurities in the lubricating oil and the degree of pollution are judged by observing the morphology of the sediment ring formed on the test paper. With the increasing demand for automated detection, intelligent detection methods based on image processing have gradually become an important development direction in this field. Traditional lubricating oil sediment ring detection mainly relies on manual visual judgment, which has strong subjectivity, low efficiency and poor consistency. The existing automated detection methods mostly use simple edge detection or threshold segmentation techniques, which are not effective in dealing with complex backgrounds and weak boundaries, and cannot meet the precision requirements in actual applications. The core challenge of lubricating oil sediment ring test paper image detection lies in the complexity of the sediment ring boundary. The inherent texture structure of the test paper is similar to the gray distribution of the sediment ring boundary, or the boundary is difficult to distinguish due to test paper wrinkles, making it difficult for traditional edge detection algorithms to accurately distinguish between the real sediment ring boundary and the pseudo-boundary caused by test paper texture. This ambiguity in boundary recognition further affects the accuracy of region segmentation, as it is difficult to effectively distinguish between real boundaries and pseudo-boundaries, making the subsequent image segmentation process prone to over-segmentation or under-segmentation. The lack of region segmentation accuracy directly affects the accurate extraction of the geometric parameters of the sediment ring, including the positioning deviation of the ring center and the measurement error of the ring width, ultimately leading to a decrease in the reliability of the entire detection system. How to accurately identify the real boundary of the sediment ring in a complex test paper texture background and achieve high-precision region segmentation and geometric parameter extraction has become a key problem in the development of lubricating oil sediment ring test paper image automatic detection technology. SUMMARY
[0003] The present application provides a lubricating oil sediment ring detection evaluation processing method and system, which solves the above technical problems pointed out in the prior art.
[0004] The present application provides a lubricating oil sediment ring detection evaluation processing method, comprising the following operation steps:
[0005] An original image of the lubricating oil sediment ring test paper is obtained, and grayscale and Gaussian filter preprocessing are performed to obtain a preprocessed lubricating oil sediment ring test paper image;
[0006] The preprocessed lubricating oil sediment ring test paper image is extracted based on morphological gradient transformation to extract the sediment ring edge feature, and a gradient amplitude graph is generated;
[0007] The initial marking area is obtained by binarizing the gradient amplitude graph, the sub-area boundary gray response graph of the sediment ring is constructed by distance transformation on the initial marking area, and the local gray jump points are obtained by identifying the sub-area boundary gray response graph of the sediment ring.
[0008] The effective sediment ring image is obtained by excluding the false curve boundary caused by the test paper texture in combination with the ring diffusion characteristics of the sediment ring.
[0009] The geometric center coordinates and the ring width of the effective sediment ring image are extracted, and the detection result is output.
[0010] Preferably, the local gray jump points are obtained by identifying the sub-area boundary gray response graph of the sediment ring, including the following operation steps:
[0011] The distance transformation graph is obtained based on the Euclidean distance from each foreground pixel point in the initial marking area to the nearest background pixel point.
[0012] The multiple sub-areas are obtained by connected component analysis of the initial marking area based on the distance transformation graph.
[0013] The boundary pixel points of each sub-area are obtained; and the sub-area boundary gray response value is calculated based on the boundary pixel points of the i-th sub-area, the boundary pixel points of the neighboring sub-area of the i-th sub-area, and the ring integrity evaluation coefficient of the i-th sub-area.
[0014] The sub-area boundary gray response graph is constructed based on the sub-area boundary gray response value and the spatial position coordinates of each edge pixel point.
[0015] The multiple local gray jump points are obtained by local maximum detection processing on the sub-area boundary gray response graph of the sediment ring.
[0016] Preferably, the ring integrity evaluation coefficient of the i-th sub-area is obtained by the following operation steps:
[0017] The target boundary pixel points of the i-th sub-area are obtained by gradient amplitude consistency test processing on each edge pixel point, and the target boundary pixel point set of the i-th sub-area is obtained based on the target boundary pixel points.
[0018] The radial density distribution matrix is constructed based on the target boundary pixel point set of the i-th sub-area and the geometric center of the sub-area; and the sediment ring diffusion index is calculated based on the radial density distribution matrix.
[0019] extracting gradient directions of target boundary pixel points of the i-th sub-region; constructing a transverse continuity matrix according to the gradient directions; and calculating a precipitated ring boundary gradual change continuity coefficient according to the transverse continuity matrix;
[0020] constructing an inter-ring coupling matrix according to the neighborhood sub-region set, and calculating a precipitated ring inter-ring coupling coefficient based on the inter-ring coupling matrix;
[0021] comprehensively calculating a ring integrity evaluation coefficient of the i-th sub-region according to the precipitated ring diffusion index, the precipitated ring boundary gradual change continuity coefficient, and the precipitated ring inter-ring coupling coefficient.
[0022] Preferably, the gradient amplitudes of the edge pixel points are subjected to physical field consistency test processing to screen out false boundary pixel points, thereby obtaining a plurality of target boundary pixel points of the i-th sub-region, including the following operation steps:
[0023] using dual-band imaging data to determine an oil film thickness field of each edge pixel point of the current i-th sub-region;
[0024] constructing a contradiction matrix based on the difference between the oil film thickness field and the compensation gradient field;
[0025] when the norm of the contradiction matrix is greater than or equal to a norm threshold, updating the oil film thickness field to obtain a calibrated oil film thickness field;
[0026] extracting a target oil ring vorticity based on the calibrated oil film thickness field through thickness long gradient iterative feedback processing;
[0027] screening target boundary pixel points based on the compatibility of the target oil ring vorticity and the gradient direction of each edge pixel point, and the outlier analysis of the gradient amplitude of each edge pixel point.
[0028] Preferably, the target boundary pixel points are screened based on the compatibility of the target oil ring vorticity and the gradient direction of each edge pixel point, and the outlier analysis of the gradient amplitude of each edge pixel point, including the following operation steps:
[0029] calculating the compatibility of the target oil ring vorticity and the gradient direction of each edge pixel point;
[0030] extracting gradient amplitudes of each edge pixel point of the i-th sub-region; and calculating a gradient amplitude mean value and a gradient amplitude standard deviation of all edge pixel points of the current i-th sub-region according to the gradient amplitudes;
[0031] calculating a standardized outlier degree of each edge pixel point based on the gradient amplitudes, the gradient amplitude standard deviation, and the gradient amplitudes of each edge pixel point.
[0032] According to the compatibility and the standardized outlying degree, a plurality of target boundary pixel points are screened through a preset screening condition.
[0033] Preferably, according to the compatibility and the standardized outlying degree, a plurality of target boundary pixel points are screened through a preset screening condition, including the following steps:
[0034] When the compatibility of the target oil ring vorticity and gradient direction of the jth edge pixel point of the ith sub-region is greater than or equal to a compatibility threshold value and at the same time satisfies a standardized outlying degree greater than or equal to a standardized outlying degree threshold value, the jth edge pixel point is determined as a pseudo boundary pixel point;
[0035] The pseudo boundary pixel points are screened out to obtain target boundary pixel points.
[0036] Preferably, based on the calibrated oil film thickness field, a target oil ring vorticity is extracted through iterative feedback processing of thickness long gradient, specifically including the following operation steps:
[0037] An iteration parameter is initialized, the iteration parameter including a viscosity coefficient , a convergence threshold value, an iteration counter and an iteration maximum number threshold value, the iteration number of the iteration counter being initially 0 and an initialization variable including an initial vorticity field and an initial noise field;
[0038] The radial distance r and the azimuth angle of each edge pixel point in the ith sub-region to the geometric center of the ith sub-region are calculated; based on the radial distance, the azimuth angle and the calibrated oil film field, a thickness long gradient field is calculated;
[0039] Based on the thickness long gradient field and the initial noise field, an initial flow velocity field is calculated ; based on the initial flow velocity field, a vorticity field is calculated;
[0040] The iteration number of the iteration counter is added by 1 to obtain a current iteration number; based on the initial vorticity field and the current vorticity field, a vorticity change amount is calculated; based on the vorticity change amount of all edge pixel points of the ith sub-region, a final change amount is calculated;
[0041] According to the final change amount and the current iteration number, a judgment output is performed to obtain a target oil ring vorticity.
[0042] Preferably, the judging and outputting according to the final variation and the current iteration number to obtain the target oil ring vortex degree comprises the following steps: when the final variation is smaller than the convergence threshold, the vortex field of each edge pixel point is output as the target oil ring vortex degree; otherwise, it is further judged whether the current iteration number is greater than or equal to the maximum iteration threshold; if the current iteration number is greater than or equal to the maximum iteration threshold, the vortex field of each edge pixel point is output as the target oil ring vortex degree; if not, the current vortex field and the current initial flow field are returned to the operation of initializing the iteration parameters and re-iterating until the target oil ring vortex degree is output.
[0043] Correspondingly, the application further provides a lubricating oil deposit ring detection and evaluation processing system, comprising an image acquisition and preprocessing module, an edge gradient extraction module, a segmentation module, a pseudo boundary removal module and an output module.
[0044] The image acquisition and preprocessing module is configured to acquire an original image of a lubricating oil deposit ring test paper, and perform grayscale and Gaussian filter preprocessing to obtain a preprocessed lubricating oil deposit ring test paper image.
[0045] The edge gradient extraction module is configured to extract deposit ring edge features based on morphological gradient transformation on the preprocessed lubricating oil deposit ring test paper image to generate a gradient amplitude graph.
[0046] The segmentation module is configured to apply a watershed algorithm to the gradient amplitude graph to segment the deposit ring boundary region to obtain a plurality of deposit ring boundary region images.
[0047] The pseudo boundary removal module is configured to exclude pseudo curve boundaries caused by test paper textures to obtain an effective deposit ring image in combination with the annular diffusion characteristics of the deposit ring.
[0048] The output module is configured to extract the geometric center coordinates and the ring width of the effective deposit ring image and output a detection result.
[0049] Compared with the prior art, the embodiments of the application have at least the following technical advantages:
[0050] It can be known from the above lubricating oil sediment ring detection and evaluation processing method and system that, in specific application, after the reaction ring of the lubricating oil sample is generated by using the test paper, the original image of the lubricating oil sediment ring test paper is collected; further, the original image is preprocessed, the original image is dimensionally reduced to improve the subsequent processing efficiency, then the edge feature of the sediment ring is extracted based on the morphological gradient transformation of the preprocessed lubricating oil sediment ring test paper image, the gradient amplitude graph is generated, and the area with sharp brightness change in the image, that is, the potential sediment ring edge, is highlighted; the lubricating oil sediment ring detection and evaluation processing method of the embodiment aims to further apply the watershed algorithm to segmentation based on the generated gradient amplitude graph of the extracted sediment ring edge feature, so as to obtain the sediment ring boundary area image, and then complete the preliminary sediment ring area positioning and separation; at the same time, the annular diffusion feature of the sediment ring is used to distinguish the true sediment ring from the false edge of the sediment ring boundary area image, eliminate the interference signal generated by factors such as test paper texture, small stains and uneven illumination, and ensure that the object of subsequent measurement is the real sediment ring.
[0051] Finally, the result of the lubricating oil sediment detection is output according to the geometric coordinates and the ring width of the sediment ring, and the visual sediment ring information is converted into accurate numerical values (center position and ring width). Specifically, the ring width is usually directly related to the amount or nature of the sediment in the oil (the wider / obvious the ring is, the more sediment or certain components may be concentrated), and the center coordinates can also be used to analyze the uniformity of the sediment. According to the detection result, the sedimentation of the lubricating oil is confirmed, so that the quality of the lubricating oil is accurately determined. BRIEF DESCRIPTION OF DRAWINGS
[0052] Figure 1 It is a main flowchart of a lubricating oil sediment ring detection and evaluation processing method.
[0053] Figure 2 It is a simulation schematic diagram of the original image of the lubricating oil sediment ring test paper of a lubricating oil sediment ring detection and evaluation processing method.
[0054] Figure 3 It is a simulation schematic diagram of the gradient amplitude graph of a lubricating oil sediment ring detection and evaluation processing method.
[0055] Figure 4 It is a simulation schematic diagram of the sediment ring boundary area image obtained after excluding the false boundary of a lubricating oil sediment ring detection and evaluation processing method.
[0056] Figure 5 It is a simulation schematic diagram of the over-segmentation caused by the traditional watershed algorithm of a lubricating oil sediment ring detection and evaluation processing method.
[0057] Figure 6A simulation diagram for a test paper fold of a lubricating oil sediment ring detection evaluation processing method leading to an inability to distinguish between a true ring boundary and a fold false boundary;
[0058] Figure 7 A simulation diagram for a true boundary and a false boundary comparison of a lubricating oil sediment ring detection evaluation processing method;
[0059] Figure 8 A schematic diagram of the overall architecture of a lubricating oil sediment ring detection evaluation processing system.
[0060] Reference signs: image acquisition and preprocessing module 10, edge gradient extraction module 20, segmentation module 30, false boundary removal module 40, output module 50. DETAILED DESCRIPTION
[0061] The technical solutions of the present application will be described clearly and completely below in conjunction with the drawings. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative labor fall within the scope of protection of the present application.
[0062] The present application will be described in further detail below through specific embodiments and in conjunction with the drawings.
[0063] Embodiment one
[0064] As shown in the drawings, the present application provides a lubricating oil sediment ring detection evaluation processing method, which comprises the following operation steps: Figure 1 Step S10: Obtain the original image of the lubricating oil sediment ring test paper, and perform grayscale and Gaussian filter preprocessing to obtain the preprocessed lubricating oil sediment ring test paper image;
[0065] It should be noted that, before the above embodiments of the present application are implemented, the lubricating oil is first sampled, and the sample is dropped at the specified position of the test paper. After waiting for the specified time (usually ten to twenty minutes) of the test paper, the precipitate in the lubricating oil will form an obvious reaction ring on the test paper. At this time, the actual sediment ring is photographed by a high-resolution camera to obtain the original image of the lubricating oil sediment ring test paper, as shown in the drawings; further, the image information is simplified by using grayscale, and the noise and small texture are smoothed by using Gaussian filter, and the main structure is retained to provide basic input for subsequent gradient calculation.
[0066] Figure 2 Step S20: Extract the sediment ring edge feature based on the morphological gradient transform of the preprocessed lubricating oil sediment ring test paper image to generate a gradient amplitude graph;
[0067] Step S20: Extract the sediment ring edge feature based on the morphological gradient transform of the preprocessed lubricating oil sediment ring test paper image to generate a gradient amplitude graph;
[0068] It should be noted that the embodiment of the present application utilizes morphological gradient to respond to the gradual edge well, highlights the "ridge-shaped" boundary of the precipitation ring, and generates a gradient amplitude graph reflecting the edge intensity, as shown in Figure 3
[0069] Step S30: applying a watershed algorithm to the gradient amplitude graph to segment the precipitation ring boundary region to obtain a plurality of precipitation ring boundary region images;
[0070] Step S40: combining the precipitation ring boundary region image with the annular diffusion characteristics of the precipitation ring to exclude the pseudo-curve boundary caused by the test paper texture to obtain an effective precipitation ring image;
[0071] It should be noted that the embodiment of the present application utilizes the "annular diffusion characteristics" to verify the segmented boundary region image, specifically including checking the closure (or approximate closure) of the region, calculating the circularity / ellipticity of the region, analyzing the radial distribution pattern of the boundary gradient, etc. The regions (such as short straight lines, chaotic curves, and non-closed regions) that do not meet the typical annular diffusion characteristics are determined as pseudo-boundaries caused by the test paper texture and excluded, as shown in Figure 4
[0072] Step S50: extracting the geometric center coordinates and ring width of the effective precipitation ring image and outputting the detection result.
[0073] It should be noted that the embodiment of the present application calculates the geometric center (such as the centroid) and the ring width (such as the average distance difference of the boundary to the center, or the radial section analysis) on the confirmed effective precipitation ring image, and outputs the final detection result, providing a basis for the detection of lubricating oil quality.
[0074] The above-described embodiments of this application involve acquiring the original image of the lubricating oil precipitation ring test paper after generating a reaction ring on the lubricating oil sample using test paper. Further, the original image is preprocessed, including dimensionality reduction to improve subsequent processing efficiency. Then, the edge features of the precipitation ring are extracted from the preprocessed lubricating oil precipitation ring test paper image based on morphological gradient transformation, generating a gradient amplitude map to highlight areas with drastic brightness changes, i.e., potential precipitation ring edges. Further, the gradient amplitude map is segmented using a watershed algorithm to obtain the precipitation ring boundary region image, completing the initial precipitation ring region localization and separation. Finally, the ring diffusion characteristics of the precipitation ring are utilized to further refine the precipitation ring boundary region image. To distinguish between true sediment rings and false edges, the test eliminates interference signals caused by factors such as test strip texture, minor stains, and uneven lighting, ensuring that subsequent measurements target genuine sediment rings. Finally, the test outputs the lubricating oil sediment detection results based on the geometric coordinates and width of the sediment ring, converting visual sediment ring information into precise numerical values (center position, ring width). Specifically, the ring width is usually directly related to the amount or nature of sediment in the oil (a wider / more prominent ring may indicate more sediment or more concentrated components), while the center coordinates can be used to analyze the uniformity of sedimentation. Based on these test results, the sedimentation status of the lubricating oil is confirmed, thereby accurately determining the quality of the lubricating oil.
[0075] In the specific implementation process of the above embodiments of this application, due to the inherent defect of the watershed algorithm being highly sensitive to local minima of the gradient graph, oversegmentation occurs, such as... Figure 5 As shown, a complete precipitation ring region can be incorrectly segmented into a large number of small fragmented regions formed by false edges and noise, which seriously interferes with the subsequent identification of real precipitation rings and feature extraction, thus leading to over-segmentation and affecting the confirmation of the effective precipitation ring image in step S40.
[0076] Specifically, in step S30, the watershed algorithm is applied to the gradient magnitude map to segment the precipitation ring boundary region, resulting in multiple precipitation ring boundary region images, including the following steps:
[0077] Step S31: Perform adaptive threshold binarization on the gradient magnitude map to generate the initial labeled region;
[0078] It should be noted that, in the above embodiments of this application, the threshold is first automatically determined by an adaptive threshold, and the gradient magnitude map is initially divided into foreground (potential sedimentation ring region) and background, generating a preliminary prototype of the marked region that may contain debris and pseudo-targets.
[0079] Step S32: Construct a grayscale response map of the precipitation ring sub-region boundary through distance transformation for the initial marked region, and identify local grayscale jump points by analyzing the grayscale response map of the precipitation ring sub-region boundary;
[0080] Step S33: constructing connected domains based on the coordinates of the local gray level jump points, and performing merging processing on adjacent sub-regions based on the connected domains to obtain merged connected domains (to eliminate pseudo boundary fragments);
[0081] It should be noted that the steps S32-S33 of the above embodiment of the present application construct connected domains based on the local jump points with high confidence, and merge spatially adjacent connected domains, so as to merge fragmented marking regions belonging to the same sediment ring into one whole, eliminate pseudo-fragment regions caused by noise or initial segmentation, and generate a complete internal region marking for each real sediment ring.
[0082] Step S34: taking the merged connected domains as the marking input of the watershed algorithm, and outputting a sediment ring boundary region image (to realize high-precision boundary segmentation).
[0083] It should be noted that the above embodiment of the present application inputs the merged connected domains (internal marking) into the watershed algorithm, the algorithm takes the gradient amplitude map as the terrain, starts from the marking region to flood, and the final watershed line is the segmentation boundary. The high-quality marking is used to accurately control the segmentation process, and a "sediment ring boundary region image" with clear, complete and highly consistent boundary with the real sediment ring is output, which effectively avoids the over-segmentation problem of the traditional watershed.
[0084] Specifically, in step S32, the initial marking region is constructed into a sediment ring sub-region boundary gray level response map through distance transformation, and the local gray level jump points are obtained by identifying the sediment ring sub-region boundary gray level response map, including the following operation steps:
[0085] Step S321: establishing a distance transformation map based on the Euclidean distance from each foreground pixel point in the initial marking region to the nearest background pixel point;
[0086] Step S322: performing connectivity analysis on the initial marking region based on the distance transformation map to obtain a plurality of sub-regions;
[0087] It should be noted that the above embodiment of the present application decomposes the initial marking into smaller "sub-regions" that may represent a single sediment ring core region through the distance transformation map, laying a foundation for fine analysis;
[0088] Step S323: obtaining the boundary pixel points of each sub-region; and calculating a sub-region boundary gray level response value according to the boundary pixel points of the i-th sub-region, the boundary pixel points of the neighboring sub-regions of the i-th sub-region, and the ring integrity evaluation coefficient of the i-th sub-region;
[0089] The calculation method of the sub-region boundary gray level response value is as follows:
[0090] ;
[0091] wherein, denotes the sub-region boundary gray response value of the jth boundary pixel point of the ith sub-region;
[0092] denotes the gradient amplitude of the jth boundary pixel point in the ith sub-region;
[0093] denotes the gradient direction consistency evaluation value of the boundary pixel point of the ith sub-region;
[0094] denotes the gradient direction consistency evaluation value of the boundary pixel point in the gth neighborhood sub-region of the ith sub-region;
[0095] denotes the Euclidean distance between the jth boundary pixel point in the ith sub-region and the boundary center point of the gth neighborhood sub-region of the ith sub-region;
[0096] N denotes the number of neighborhood sub-regions of the ith sub-region;
[0097] denotes the annular integrity evaluation coefficient of the ith sub-region;
[0098] g represents the gth neighborhood sub-region;
[0099] w is a weight coefficient (controls the strength of the neighborhood direction consistency enhancement term);
[0100] is a distance decay coefficient (the smaller λ is, the faster the decay is, and the stronger the emphasis on the neighborhood in the near distance);
[0101] It should be noted that the above embodiments of the present application not only consider the gradient strength (Lᵢⱼ) of the current point, but also utilize the annular diffusion characteristics and spatial continuity of the sediment ring. The annular integrity evaluation coefficient Sᵢ is used as a weighting term to enhance the boundary points of the sub-region with complete shape. The distance decay and the direction consistency weight factor w are introduced to enhance the pixel points between the sub-regions that are spatially adjacent and have consistent boundary directions, because the real sediment ring boundary usually exhibits high direction consistency (tangent direction) in the local region, and the boundary directions of the adjacent sub-regions should be coordinated if they belong to the same ring. The pseudo-boundary generated by the test paper texture is usually isolated and directionally chaotic, or even if adjacent, the direction consistency is poor;
[0102] In the above embodiments of this application, since the precipitation ring is formed by diffusion from the center outward, and the boundary has the characteristics of continuous closure and radial distribution of gradient direction, the above method of calculating the gray-scale response value of the sub-region boundary uses a neighborhood direction consistency enhancement term to force the algorithm to focus on regions that conform to this pattern, suppressing isolated or randomly oriented pseudo-edges, which conforms to the physical diffusion characteristics of the precipitation ring; an adaptive anti-interference mechanism is introduced, using the gradient direction consistency evaluation value of the boundary pixel of the i-th sub-region. Gradient direction consistency evaluation value with the boundary pixel of the g-th neighboring sub-region of the i-th sub-region ratio Directional filtering is applied, enhancing the response value only when the direction of the neighboring boundary is consistent with the height of the current region, effectively filtering random texture noise. A distance attenuation coefficient λ is introduced, with the weights decaying exponentially with distance, ensuring the algorithm focuses on local consistency and avoids interference from distant regions. The ring integrity coefficient of the i-th sub-region is used for evaluation. Constraints are used to combine pixel-level response with region-level semantics, improving the algorithm's logical hierarchy. Neighborhood orientation consistency is utilized to enhance connectable broken boundaries, forming continuous closed contours. While the test paper fiber texture may generate high gradient values locally, its direction is random and lacks spatial consistency. The formula for calculating the grayscale response values of the aforementioned sub-region boundaries... When the value approaches 0, its weight is automatically reset to zero, significantly reducing the false boundary response; the calculated value is... The formation of steeper, continuous peaks on the actual sedimentation ring boundary enables the watershed algorithm (S34) to generate a complete, smooth, and high-precision boundary region image, laying the foundation for subsequent width measurement (S50).
[0103] Step S324: Construct the grayscale response map of the sedimentation ring sub-region boundary based on the grayscale response values of the sub-region boundary and the spatial coordinates of each edge pixel.
[0104] It should be noted that the above-described embodiments of this application map the calculated response intensity Bᵢⱼ, which integrates local and neighborhood information, back to the spatial location, forming a response map that can better distinguish between real ring boundaries and pseudo boundaries.
[0105] Step S325: The gray-scale response map of the precipitation ring sub-region boundary is processed by local maximum value detection to obtain multiple local gray-scale jump points.
[0106] It should be noted that the above embodiments of the present application find local maximum points on the response map, which represent the strongest and most likely real sediment ring boundary pixel positions after neighborhood and shape information enhancement. Subsequently, the subsequent operations S33-S34 are performed according to the local gray level jump points, the merged connected domains are constructed and merged, and then the merged connected domains are used to perform the watershed algorithm processing, and the "sediment ring boundary region image" with clear and complete boundary and high consistency with the real sediment ring is output, which effectively avoids the over-segmentation problem of the traditional watershed.
[0107] The real lubricating oil sediment ring is an approximately circular ring structure formed by oil droplet diffusion, which has high closure, continuity and central symmetry. The pseudo boundary generated by the test paper texture, scratch or noise is usually broken, twisted or irregular in shape. The test paper texture may generate isolated, high gradient amplitude but broken shape sub-regions (such as fiber edges). If the boundary points thereof are directly used as watershed markers, a large number of pseudo-segmentation boundaries will be generated. Therefore, the analysis and determination of the ring integrity evaluation involved in the process of calculating the sub-region boundary gray response value in step S323 is crucial.
[0108] Specifically, in step S323, the acquisition method of the ring integrity evaluation coefficient of the ith sub-region includes the following operation steps:
[0109] S3231: The gradient amplitude of each edge pixel point is subjected to physical field consistency test processing to screen out pseudo boundary pixel points, and a plurality of target boundary pixel points of the ith sub-region are obtained; and a target boundary pixel point set of the ith sub-region is established according to the target boundary pixel points;
[0110] It should be noted that the above embodiments of the present application are first used to perform physical field consistency test processing by using the gradient amplitudes of each edge pixel point to identify the false edge pixel points, specifically, the edge of the sediment ring should be smooth and continuous, and the sediment ring should be close to a circle, having a high closure, at the same time, the brightness gradient on both sides of the edge of the sediment ring has a consistent change, that is, the direction and amplitude of the gradient should present a certain regularity; based on this, by detecting and excluding discontinuous lines or abrupt edges, isolated edge pixel points, especially the pixel points inconsistent with the gradient amplitudes of the surrounding area and the boundaries inconsistent with the circular characteristics of the sediment ring, such as excessively curved or skewed boundaries; through the physical field consistency test, the remaining edge pixel points are the "target boundary pixel points" that meet the characteristics of the real sediment ring, which have a high gradient amplitude, indicating that they are in the edge region of the image, the boundary is continuous and smooth, meeting the physical characteristics of the sediment ring and being located in the real sediment ring region rather than the texture or noise of the test paper; finally, through the above processing, the target boundary pixel points of the i th sub-region can be extracted, and accurate boundary data is provided for subsequent image segmentation and morphological analysis.
[0111] S3232: constructing a radial density distribution matrix according to the target boundary pixel point set of the i th sub-region and the geometric center of the sub-region; and calculating a sediment ring diffusion index of the i th sub-region according to the radial density distribution matrix;
[0112] It should be noted that the above embodiments of the present application first construct a radial density distribution matrix according to the target boundary pixel points of the i th sub-region and the geometric center of the sub-region , is the level angle of the j th boundary pixel point p, is the geometric center of the i th sub-region, and then the sediment ring diffusion index is calculated through the radial density distribution matrix, that is:
[0113] ;
[0114] In the formula, is the sediment ring diffusion index of the i th sub-region;
[0115] is the second column of the radial density distribution matrix; is the first column of the radial density distribution matrix; is a standard deviation function; is a median function; is to count the level angle histogram (to detect the aggregation of the boundary point direction); is the index of the angle interval corresponding to the peak value of the histogram (reflecting the most dense angle direction); m is the number of target boundary pixel points;
[0116] In the above embodiment of the present application, the real precipitation ring is caused by the uniform radial diffusion of oil droplets, the distance variance of the boundary point to the center is small, and the angle distribution is uniform. Through the implementation of the technical scheme of the above embodiment of the present application, the non-uniform diffusion pseudo-ring (such as local adhesion or fracture) caused by the adsorption of the test paper fiber is excluded.
[0117] S3233: Extract the gradient direction of the target boundary pixel point of the i-th sub-region; construct a transverse continuity matrix according to the gradient direction; and calculate a precipitation ring boundary gradual change continuity coefficient according to the transverse continuity matrix;
[0118] It should be noted that, when the above embodiment of the present application is specifically executed, the boundary point gradient is calculated by using the target boundary pixel point of the i-th sub-region, and then the transverse continuity matrix is constructed by using the boundary point gradient, that is:
[0119] ;
[0120] Wherein, is the gradient direction difference, is the curvature of the j-th boundary pixel point;
[0121] is the curvature of the j+1-th boundary pixel point;
[0122] represents the curvature change trend of the j-th boundary pixel point to the j+1-th boundary pixel point;
[0123] represents the transverse continuity matrix;
[0124] Then, the precipitation ring boundary gradual change continuity coefficient is calculated according to the transverse continuity matrix, that is: ; is the first column in the transverse continuity matrix; is the third column in the transverse continuity matrix, is the number of non-zero elements in the third column in the transverse continuity matrix; is the number of target boundary pixel points;
[0125] In the embodiment of the present application, the precipitation ring boundary gradually diffuses due to the oil film, and the gradient direction changes gently, that is ≈0, therefore, the precipitation ring boundary gradual change continuity coefficient is calculated by the above technical scheme of the embodiment of the present application, and the step edge (gradient direction mutation) caused by the test paper scratch is suppressed.
[0126] S3234: Construct a ring-to-ring coupling matrix according to the neighborhood sub-region set, and calculate a precipitation ring inter-ring coupling coefficient based on the ring-to-ring coupling matrix;
[0127] It should be noted that the precipitation ring groups formed by the homologous oil droplets in the above embodiments of the present application satisfy concentricity (radius ratio close to 1), gradient homodirectionality (boundary gradient direction parallel) and boundary topological similarity, and therefore, the embodiments of the present application first acquire the neighboring sub-regions of the ith sub-region, and then construct the inter-ring coupling matrix according to the neighboring sub-regions, that is:
[0128]
[0129] wherein, f is the average gradient direction; is the temporary integrity of the neighboring sub-region g; is the central gradient direction consistency (the angle between the vector and the average gradient direction of the ith sub-region ); is the boundary topological similarity (the average gradient direction difference of the target boundary pixel point set of the two sub-regions, which measures the shape similarity of the two sub-regions); is the geometric center of the ith sub-region; is the geometric center of the gth neighboring sub-region of the ith sub-region; represents the diffusion size difference between the ith sub-region and the gth neighboring sub-region of the ith sub-region; represents the average diffusion size of the ith sub-region (i.e., the average Euclidean distance from each boundary point of the ith sub-region to the geometric center point of the ith sub-region, which represents the spatial scale of the lubricating oil diffusion);
[0130] represents the average diffusion size of the gth neighboring sub-region of the ith sub-region (i.e., the average Euclidean distance from each boundary point of the gth neighboring sub-region of the ith sub-region to the geometric center point of the neighboring sub-region);
[0131] Then, the inter-ring coupling coefficient is calculated according to the inter-ring coupling matrix, that is:
[0132]
[0133] wherein, N is the number of neighboring sub-regions of the ith sub-region; is the first element of the inter-ring coupling matrix, that is, the above-mentioned “ ”; is the second element of the inter-ring coupling matrix, that is, “ ”; is the third element of the inter-ring coupling matrix, that is, “ ”; g represents the gth neighboring sub-region, and N represents the number of neighboring sub-regions;
[0134] (*=1,2,3) quantization sub-region i and a single neighbor sub-region g in the coupling relationship of three dimensions of radius similarity ([g,1]), gradient direction consistency ([g,2]) and boundary shape similarity ([g,3]);
[0135] Through the calculation of the inter-ring coupling coefficient of the present application, the spatial coupling characteristics of the precipitated ring group are utilized to enhance the integrity score of the real ring.
[0136] S3235: The ring integrity evaluation coefficient of the i-th sub-region is obtained by comprehensive calculation according to the precipitated ring diffusion index, the precipitated ring boundary gradual change continuity coefficient and the precipitated ring inter-ring coupling coefficient;
[0137] The calculation method of the above-mentioned ring integrity evaluation coefficient is:
[0138] ;
[0139] Wherein, , and are weight coefficients, and ;
[0140] The calculation of the ring integrity evaluation coefficient of the embodiment of the present application fuses the diffusion uniformity , the boundary continuity and the inter-ring coupling three physical indexes through dynamic weighting, realizes the adaptive decision of the anti-interference scene, and makes the ring integrity evaluation coefficient act as a "neighborhood enhancement switch" in the boundary response calculation, activates the cross-sub-region boundary connection only when the physical confidence is high, and provides a physically credible seed point source for the watershed algorithm to build the discrimination boundary of the test paper texture and the real precipitated ring.
[0141] It should be noted that the calculation method of the embodiment of the present application is to accurately identify the target boundary pixel point of the i-th sub-region, and further analyze the calculation of the precipitated ring diffusion index and the precipitated ring boundary gradual change continuity coefficient and the precipitated ring inter-ring coupling coefficient of the sub-region, to comprehensively evaluate and calculate the ring integrity evaluation coefficient, to analyze the boundary of the test paper texture and the lubricating oil precipitated ring, to avoid the over-segmentation problem of the watershed algorithm caused by the small sub-region caused by the pseudo boundary of the test paper texture, scratch or noise which usually presents broken, twisted or irregular shape, to provide an accurate constraint basis for the calculation of the subsequent sub-region boundary gray response value, and to improve the robustness of the watershed algorithm segmentation.
[0142] In summary, in the analysis process of the annular integrity evaluation coefficient of the i-th sub-region, the accurate identification of the boundary pixel points on the sediment ring test paper is crucial, which directly or indirectly affects the calculation and analysis of the sub-region boundary gray response value, and further affects the subsequent lubricating oil quality detection result. However, in the specific implementation process of the above embodiments of the present application, it is found that, as shown in Figure 6 The test paper inevitably produces wrinkles in actual use, causing serious interference, that is, wrinkles hinder the diffusion of lubricating oil, forming local vortex, thickness mutation or fracture, destroying the continuity and roundness of the sediment ring, and the wrinkles cast shadows, reflect light or block, generating high gradient pseudo-boundary similar to the real sediment ring edge in the image, and further causing that when the sediment ring overlaps with the wrinkles, the traditional method cannot distinguish the real ring boundary from the pseudo-boundary of the wrinkles, thereby affecting the final detection result of the lubricating oil quality.
[0143] Specifically, in S3231, the gradient amplitude of each edge pixel point is subjected to a physical field consistency test process to screen out pseudo-boundary pixel points, and a plurality of target boundary pixel points of the i-th sub-region are obtained, including the following operation steps:
[0144] Step S32311: determining the oil film thickness field of each edge pixel point of the current i-th sub-region by using the dual-band imaging data; constructing a contradiction matrix based on the difference between the oil film thickness field and the compensation gradient field; when the norm of the contradiction matrix is greater than or equal to a norm threshold, updating the oil film thickness field to obtain a calibrated oil film thickness field;
[0145] It should be noted that the above embodiments of the present application use dual-band imaging technology to determine the oil film thickness of the sub-region, specifically by using the imaging data of two wavebands (ultraviolet and visible light), and then analyzing and calculating the oil film thickness field based on Beer-Lambert law, that is:
[0146] ; wherein, is the light intensity of the edge pixel point in the ultraviolet waveband; is the light intensity of the edge pixel point in the visible light waveband; is the absorption coefficient of the edge pixel point in the ultraviolet waveband; is the absorption coefficient of the edge pixel point in the visible light waveband; is the reference light intensity in the ultraviolet waveband under the no-lubricating oil state; is the reference light intensity in the visible light waveband under the no-lubricating oil state;
[0147] Further, the first spatial gradient vector of the oil film thickness field and the gradient vector of each pixel point of the current pre-processed lubricating oil deposition ring test paper image are compared in a manner of compatibility of the physical thickness and the gradient field, and difference processing is performed to establish a contradiction matrix, that is:
[0148] ; wherein, is the first spatial gradient vector of the oil film thickness field; is the spatial gradient vector of the current pre-processed lubricating oil deposition ring test paper image; is a scaling coefficient;
[0149] Further, when the norm of the contradiction matrix is greater than or equal to the norm threshold, the calibrated oil film thickness field is obtained by recalculating the edge pixel points using the contradiction matrix, that is:
[0150] ; wherein, is a decay coefficient; is the norm of the contradiction matrix; is the Euclidean norm of the contradiction matrix (measuring the local contradiction degree).
[0151] Step S32312: obtaining the target oil ring vorticity through thickness long gradient iterative feedback processing based on the calibrated oil film thickness field;
[0152] It should be noted that in the above embodiment of the present application, due to the test paper creases and other factors, a pseudo-vortex phenomenon of the lubricating oil deposition ring will be caused, that is, due to the test paper creases, the local fluid rotation formed in the formation process of the lubricating oil deposition ring.
[0153] Step S32313: calculating the compatibility of the target oil ring vorticity and the gradient direction for each edge pixel point;
[0154] Step S32314: extracting the gradient amplitude of each edge pixel point of the i-th sub-region; calculating the gradient amplitude mean and the gradient amplitude standard deviation of all edge pixel points of the current i-th sub-region according to the gradient amplitude; and calculating the standardization of the outlying degree of each edge pixel point based on the gradient amplitude, the gradient amplitude standard deviation and the gradient amplitude of each edge pixel point;
[0155] It should be noted that the above normalized outlier is obtained by subtracting the gradient amplitude of the jth edge pixel point of the ith sub-region from the gradient amplitude of the jth edge pixel point of the ith sub-region, then taking the absolute value, and then dividing the absolute value by the above gradient amplitude standard deviation, so as to obtain the normalized outlier of the jth edge pixel point of the ith sub-region, so as to quantify the gradient amplitude discrete degree of the jth edge pixel point of the ith sub-region.
[0156] Step S32315: When the compatibility of the target oil ring vorticity and the gradient direction of the jth edge pixel point of the ith sub-region is greater than or equal to the compatibility threshold and at the same time the normalized outlier is greater than or equal to the normalized outlier threshold, the jth edge pixel point is determined as a pseudo boundary pixel point; the pseudo boundary pixel point is screened out to obtain a target boundary pixel point.
[0157] It should be noted that the embodiment of the present application directly measures the real physical thickness (unit: μm) of the lubricating oil film through double-band imaging (ultraviolet + visible light), provides an objective physical reference field for subsequent analysis, directly calculates the oil film thickness by using the difference in light absorption characteristics of different wave bands, is not affected by the visual interference of the wrinkle of the test paper surface, eliminates the influence of light source attenuation by reference light intensity, ensures the reliability of the thickness field when the global light is uneven, and detects the compatibility of the physical thickness field and the image gradient field by constructing a contradiction matrix, automatically identifies abnormal areas caused by wrinkles, improves the analysis dimension from “image gray scale” to “physical thickness”, and distinguishes wrinkles (thickness mutation) and real sediment rings (thickness continuous change) from a physical point of view. Further, based on the calibrated thickness field, the micro vortex intensity (vorticity) of the lubricating oil in the wrinkle area is calculated through feedback optimization processing, the fluid anomaly caused by the wrinkle is accurately captured, the main physical process of oil film diffusion is focused, the wrinkle interference is converted into a quantifiable fluid mechanics parameter (vorticity), and the limitation of traditional image processing which only depends on morphological features is broken. Further, by combining the physical thickness field and the vorticity field, each boundary pixel point is subjected to double physical verification, as shown in the figure, that is, the real boundary: low vorticity + continuous change of gradient direction; wrinkle pseudo boundary: high vorticity + gradient direction mutation → high conflict value; by detecting the gradient amplitude outlier of the edge pixel point, the abnormal gradient response caused by the wrinkle is excluded, and the pseudo boundary (such as the wrinkle edge) is identified at the pixel level, avoiding the false deletion caused by the overall judgment of the traditional method. Figure 7
[0158] Specifically, in step S32312, the target oil ring vorticity is extracted through thickness long gradient iterative feedback processing based on the calibrated oil film thickness field, and the specific operation steps include the following steps:
[0159] Step S323121: initialize the iteration parameters, and the iteration parameters include the viscosity coefficient , a convergence threshold, an iteration counter and an iteration maximum number threshold, the iteration number of the iteration counter is initially 0, and an initialization variable, the initialization variable includes an initial vorticity field and an initial noise field;
[0160] Step S323122: calculating the radial distance r and the azimuth angle of each edge pixel point in the i-th sub-region to the geometric center of the i-th sub-region ; calculating a thickness long gradient field based on the radial distance, the azimuth angle and the calibrated oil film field;
[0161] It should be noted that the above embodiment of the present application establishes a radial coordinate system to accurately capture the change of the oil film thickness along the diffusion direction, and the thickness gradient of the real sediment ring is continuously radial, while the gradient direction of the wrinkle area is chaotic, which provides a physical basis for subsequent vorticity calculation;
[0162] The calculation method of the above thickness long gradient field is as follows:
[0163] ;
[0164] Wherein, is a radial unit vector, = (cos , sin ) ;
[0165] Step S323123: calculating an initial flow velocity field based on the thickness long gradient field and the initial noise field ; calculating a vorticity field based on the initial flow velocity field;
[0166] It should be noted that in the above embodiment of the present application, the flow velocity components in x direction and y direction are calculated by using the calibrated oil film thickness field for each edge pixel point, and then the initial flow velocity field is constructed by using the flow velocity components in x direction and y direction;
[0167] The expression form of the above flow velocity component is:
[0168] The flow velocity component in x direction is:
[0169] ;
[0170] The flow velocity component in y direction is:
[0171] ;
[0172] Further, the vorticity field of the current edge pixel point is obtained by subtracting the derivative of the flow velocity component in y direction from the derivative of the flow velocity component in x direction;
[0173] Step S323124: increment the iteration number of the iteration counter by 1 to obtain a current iteration number; calculate a vorticity change amount based on the initial vorticity field and the current vorticity field; calculate a final change amount based on the vorticity change amounts of all edge pixel points of the i-th sub-region;
[0174] It should be noted that the calculation method of the vorticity change amount is to obtain the absolute value by subtracting the initial vorticity field from the current vorticity field; and the final change amount is obtained by taking the square root of the sum of the vorticity change amounts of each edge pixel point in the i-th sub-region, reflecting the overall amplitude of the vorticity change of the whole image;
[0175] Step S323125: determine whether the final change amount is less than a convergence threshold; if the final change amount is less than the convergence threshold, output the current vorticity field of each edge pixel point as the target oil ring vorticity; if not, further determine whether the current iteration number is greater than or equal to a maximum iteration number threshold; if the current iteration number is greater than or equal to the maximum iteration number threshold, output the current vorticity field of each edge pixel point as the target oil ring vorticity; if not, return the current vorticity field and the current initial flow velocity field to the operation of initializing the iteration parameters (i.e., replace the current vorticity field and the current initial flow velocity field with the initialized variables in the initialized iteration parameters) and reiterate until the target oil ring vorticity is obtained.
[0176] It should be noted that the embodiments of the present application provide a calculation framework for physical simulation by initializing iteration parameters, wherein the zero-value initial vorticity field and the random noise field simulate the initial fluid state without disturbance, ensure that the vorticity calculation starts from the standard state, avoid cumulative errors, and provide a reference frame for subsequent identification of wrinkle disturbance; then, a radial coordinate system is established, the image is converted into a polar coordinate system with the sediment ring as the center through the distance r and the azimuth angle θ, and the key input for flow velocity calculation is provided for the analysis of the target oil ring vorticity, wherein the real sediment ring is attenuated, the wrinkle area is abnormally mutated, and the gradient abnormal area marks the potential wrinkle disturbance position; further, vorticity field calculation is performed, the flow of lubricating oil is simulated by modeling fluid motion, the flow rotation strength is calculated by using vorticity physical quantity, and the core detection index, i.e., the real sediment ring, is generated; further, convergence detection is performed, the single-point vorticity evolution is quantified, and the stability of the whole field is monitored to determine whether the physical field reaches a stable vorticity field, and to ensure that the final vorticity value can accurately distinguish the true / pseudo boundary; during this period, the whole field information is integrated by using the Frobenius norm to avoid local shock disturbance judgment; finally, the target oil ring vorticity is determined by using the iteration judgment condition, and data basis is provided for the subsequent judgment and selection of target boundary pixel points.
[0177] Embodiment Two
[0178] As Figure 8As shown, the application also proposes a lubricating oil sediment ring detection evaluation processing system, comprising an image acquisition and preprocessing module 10, an edge gradient extraction module 20, a segmentation module 30, a pseudo-boundary removal module 40 and an output module 50.
[0179] The image acquisition and preprocessing module 10 is used to acquire the original image of the lubricating oil sediment ring test paper and perform grayscale and Gaussian filter preprocessing to obtain the preprocessed lubricating oil sediment ring test paper image.
[0180] The edge gradient extraction module 20 is used to extract the sediment ring edge features based on morphological gradient transformation on the preprocessed lubricating oil sediment ring test paper image to generate a gradient amplitude graph.
[0181] The segmentation module 30 is used to apply a watershed algorithm to the gradient amplitude graph to segment the sediment ring boundary region to obtain a plurality of sediment ring boundary region images.
[0182] The pseudo-boundary removal module 40 is used to exclude the pseudo-curve boundary caused by the test paper texture in combination with the annular diffusion characteristics of the sediment ring to obtain an effective sediment ring image.
[0183] The output module 50 is used to extract the geometric center coordinates and ring width of the effective sediment ring image and output the detection result.
[0184] In summary, the lubricating oil sediment ring detection evaluation processing method and system proposed in the application example, after the test paper reacts with the lubricating oil sample to generate a reaction ring, the original image of the lubricating oil sediment ring test paper is collected, the original image is further preprocessed and dimensionality reduced to improve the subsequent processing efficiency, then the sediment ring edge features are extracted based on morphological gradient transformation on the preprocessed lubricating oil sediment ring test paper image to generate a gradient amplitude graph, highlighting the area with sharp brightness changes in the image, i.e. the potential sediment ring edge; further, the watershed algorithm is applied to the gradient amplitude graph for segmentation to obtain the sediment ring boundary region image, completing the preliminary sediment ring region positioning and separation; further, the annular diffusion characteristics of the sediment ring are used to distinguish the true sediment ring from the pseudo-edge in the sediment ring boundary region image, eliminating the interference signals caused by the test paper texture, small stains, uneven illumination and other factors to affect the final result, ensuring that the object for subsequent measurement is the true sediment ring; finally, the geometric coordinates and ring width of the sediment ring are used to output the lubricating oil sediment detection result, converting the visual sediment ring information into accurate numerical values (center position, ring width), specifically, the ring width is usually directly related to the amount or properties of the sediment in the oil (the wider / more obvious the ring, the more sediment or more concentrated certain components it may represent), and the center coordinates can also be used to analyze the uniformity of the sediment, according to the detection result, the sedimentation of the lubricating oil is confirmed to accurately determine the quality of the lubricating oil.
[0185] When the watershed algorithm is specifically performed to segment to obtain the precipitate ring boundary region image, a distance transformation is used to construct a precipitate ring sub-region boundary gray response map, and a local gray jump point is identified, a connected domain is identified according to the local gray jump point, so as to be used as an input of the watershed algorithm, and a "precipitate ring boundary region image" with clear and complete boundaries and high consistency with the real precipitate ring is output, so that the over-segmentation problem of the traditional watershed is effectively avoided.
[0186] In the further operation process, the gradient intensity (Lᵢⱼ) of each edge pixel point is comprehensively considered, and the annular diffusion characteristics and spatial continuity of the precipitate ring are used to calculate the sub-region boundary gray response value, so that a "precipitate ring boundary region image" with clear and complete boundaries and high consistency with the real precipitate ring is output, and the over-segmentation problem of the traditional watershed is effectively avoided.
[0187] Further, for the problem of unclear boundary caused by test paper texture, the gradient amplitude of each edge pixel point is used for physical field consistency test processing to identify the pseudo edge pixel points, and the robustness of the watershed algorithm segmentation is improved.
[0188] Further, for the problem of unclear boundary caused by test paper texture, the gradient amplitude of each edge pixel point is used for physical field consistency test processing to identify the pseudo edge pixel points, and the robustness of the watershed algorithm segmentation is improved.
[0189] Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the present application, and not to limit them; a person skilled in the art can modify the technical solutions described in the above embodiments, or make equivalent replacement for part or all of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the scope of the technical solutions of the embodiments of the present application.
Claims
1. A method of evaluating a lubricating oil sediment ring detection process, characterized by, The method comprises the following steps: An original image of the lubricating oil sediment ring test paper is acquired, and grayscale processing and Gaussian filter pretreatment are performed to obtain a pretreated lubricating oil sediment ring test paper image; Edge features of the pretreated lubricating oil sediment ring test paper image are extracted based on a morphological gradient transform to generate a gradient amplitude graph; An initial marking area is obtained after the gradient amplitude graph is subjected to binary processing, and a sub-region boundary gray response graph of the sediment ring is constructed by distance transform based on the initial marking area, and local gray jump points are obtained by identifying the sub-region boundary gray response graph; coordinates of specific gray jump points are subjected to connected analysis processing to serve as a marking input of a watershed algorithm, and a boundary region image of the sediment ring is output; The boundary region image of the sediment ring is combined with a ring diffusion feature of the sediment ring to exclude false curve boundaries caused by the texture of the test paper, and an effective sediment ring image is obtained; the ring diffusion feature is used for verifying the boundary region image of the sediment ring, and specifically includes checking the closure of the region, calculating the circularity / ellipticity of the region, and analyzing the radial distribution mode of the boundary gradient; Geometric center coordinates and ring width of the effective sediment ring image are extracted, and a detection result is output.
2. The method of claim 1, wherein the method further comprises: The initial marking area is subjected to distance transform to construct a sub-region boundary gray response graph of the sediment ring, and local gray jump points are obtained by identifying the sub-region boundary gray response graph, including the following steps: A distance transform graph is established based on the Euclidean distance from each foreground pixel point in the initial marking area to the nearest background pixel point; Connected component analysis is performed on the initial marking area based on the distance transform graph to obtain a plurality of sub-regions; Boundary pixel points of each sub-region are acquired; sub-region boundary gray response values are calculated based on the boundary pixel points of the i-th sub-region, the boundary pixel points of the neighboring sub-regions of the i-th sub-region, and the ring integrity evaluation coefficient of the i-th sub-region; A sub-region boundary gray response graph of the sediment ring is constructed based on the sub-region boundary gray response values and the spatial position coordinates of each edge pixel point; A plurality of local gray jump points are obtained by local maximum value detection processing on the sub-region boundary gray response graph of the sediment ring.
3. The method of claim 2, wherein the method further comprises: The ring integrity evaluation coefficient of the i-th sub-region is obtained in the following manner: Physical field consistency test processing is performed on the gradient amplitudes of the edge pixel points to screen out false boundary pixel points, and a plurality of target boundary pixel points of the i-th sub-region are obtained; a target boundary pixel point set of the i-th sub-region is established based on the target boundary pixel points; A radial density distribution matrix is constructed based on the target boundary pixel point set of the i-th sub-region and the geometric center of the sub-region; and a sediment ring diffusion index is calculated based on the radial density distribution matrix; Gradient directions of the target boundary pixel points of the i-th sub-region are extracted; a transverse continuity matrix is constructed based on the gradient directions; and a sediment ring boundary gradual change continuity coefficient is calculated based on the transverse continuity matrix; An inter-ring coupling matrix is constructed based on the neighboring sub-region set, and a sediment ring inter-ring coupling coefficient is calculated based on the inter-ring coupling matrix. An annular integrity evaluation coefficient of the i-th sub-region is obtained by comprehensive calculation according to the precipitation ring diffusion index, the precipitation ring boundary gradual change continuity coefficient and the precipitation ring inter-ring coupling coefficient.
4. The method of claim 3, wherein the method further comprises: The gradient amplitude of each edge pixel point is subjected to physical field consistency test processing to screen out false boundary pixel points, and a plurality of target boundary pixel points of the i-th sub-region are obtained, including the following operation steps: An oil film thickness field of each edge pixel point of the current i-th sub-region is determined by using dual-band imaging data; A contradiction matrix is constructed based on the difference between the oil film thickness field and the compensation gradient field; When the norm of the contradiction matrix is greater than or equal to the norm threshold, the oil film thickness field is updated to obtain a calibrated oil film thickness field; A target oil ring vorticity is extracted by iterative feedback processing based on the calibrated oil film thickness field and the thickness long gradient; Target boundary pixel points are obtained based on the compatibility of the target oil ring vorticity and the gradient direction of each edge pixel point and the outlier analysis of the gradient amplitude of each edge pixel point.
5. The method of claim 4, wherein the method further comprises: determining a number of the lubricating oil deposits on the engine; and determining a number of the lubricating oil deposits on the transmission. Target boundary pixel points are obtained based on the compatibility of the target oil ring vorticity and the gradient direction of each edge pixel point and the outlier analysis of the gradient amplitude of each edge pixel point, including the following operation steps: The compatibility of the target oil ring vorticity and the gradient direction of each edge pixel point is calculated; The gradient amplitude of each edge pixel point of the i-th sub-region is extracted; The mean value and the standard deviation of the gradient amplitude of all edge pixel points of the current i-th sub-region are obtained by calculation according to the gradient amplitude; The standardization of the outlying degree of each edge pixel point is obtained based on the gradient amplitude, the gradient amplitude standard deviation and the gradient amplitude of each edge pixel point; A plurality of target boundary pixel points are obtained by a preset screening condition according to the compatibility and the standardization of the outlying degree.
6. The method of claim 5, wherein the method further comprises: A plurality of target boundary pixel points are obtained by a preset screening condition according to the compatibility and the standardization of the outlying degree, including the following steps: When the compatibility of the target oil ring vorticity and the gradient direction of the j-th edge pixel point of the i-th sub-region is greater than or equal to the compatibility threshold and at the same time the standardization of the outlying degree is greater than or equal to the standardization of the outlying degree threshold, the j-th edge pixel point is determined as a false boundary pixel point; The false boundary pixel points are screened out to obtain target boundary pixel points.
7. The method of claim 6, wherein the method further comprises: determining a number of the lubricating oil deposits on the engine; and determining a number of the lubricating oil deposits on the transmission. A target oil ring vorticity is extracted by iterative feedback processing based on the calibrated oil film thickness field and the thickness long gradient, specifically including the following operation steps: Initialize the iteration parameters, which include the viscosity coefficient. The system includes a convergence threshold, an iteration counter, and a maximum iteration count threshold, wherein the iteration count of the iteration counter is initially set to 0, and initialization variables, including an initial vortex field and an initial noise field. calculating a radial distance r and an azimuth angle to the geometric center of the i-th sub-region for each edge pixel point in the i-th sub-region ; calculating a thickness long gradient field based on the radial distance, the azimuth angle and the calibrated oil film field; calculating an initial flow velocity field based on the long gradient field and the initial noise field ; A vorticity field is obtained based on the initial flow velocity field; The iteration number of the iteration counter is increased by 1 to obtain the current iteration number; A vorticity change amount is obtained based on the initial vorticity field and the current vorticity field; A final change amount is obtained based on the vorticity change amount of all edge pixel points of the i-th sub-region; A target oil ring vorticity is output by judging the final change amount and the current iteration number.
8. The method of claim 7, wherein the method further comprises: determining a number of the lubricating oil deposits on the surface of the engine; and determining a number of the lubricating oil deposits on the surface of the engine. The judgment output according to the final change amount and the current iteration number obtains a target oil ring vortex, and includes the following operation steps: when the final change amount is smaller than a convergence threshold value, the vortex field of each edge pixel point is output as the target oil ring vortex; otherwise, it is further judged whether the current iteration number is greater than or equal to an iteration maximum number threshold value; if the current iteration number is greater than or equal to the iteration maximum number threshold value, the vortex field of each edge pixel point is output as the target oil ring vortex; if not, the current vortex field and the current initial flow field are returned to the operation of initializing the iteration parameters and re-iterating until the target oil ring vortex is output.
9. A lubricating oil sediment ring detection evaluation processing system characterized by comprising: The method comprises an image acquisition and preprocessing module, an edge gradient extraction module, a segmentation module, a pseudo boundary removal module and an output module. The image acquisition and preprocessing module is configured to acquire an original image of the lubricating oil sediment ring test paper, and perform grayscale and Gaussian filter preprocessing to obtain a preprocessed lubricating oil sediment ring test paper image. The edge gradient extraction module is configured to extract a sediment ring edge feature based on a morphological gradient transform on the preprocessed lubricating oil sediment ring test paper image to generate a gradient amplitude graph. The segmentation module is configured to apply a watershed algorithm to the gradient amplitude graph to segment a sediment ring boundary region to obtain a plurality of sediment ring boundary region images. The pseudo boundary removal module is configured to exclude a pseudo curve boundary caused by a test paper texture from the sediment ring boundary region image in combination with a ring diffusion feature of the sediment ring to obtain an effective sediment ring image. The ring diffusion feature is used to verify the sediment ring boundary region image, and specifically includes checking the closedness of the region, calculating the circularity / ellipticity of the region, and analyzing the radial distribution pattern of the boundary gradient. The output module is configured to extract a geometric center coordinate and a ring width of the effective sediment ring image and output a detection result.
Citation Information
Patent Citations
Measuring method of oil drop size
CN104089857A
Multi-source information-fused quantitative determination method for detergency and dispersancy of automobile engine oil
CN104865256A