CN115965624B - Method for detecting wear-resistant hydraulic oil pollution particles - Google Patents

Method for detecting wear-resistant hydraulic oil pollution particles Download PDF

Info

Publication number
CN115965624B
CN115965624B CN202310252093.6A CN202310252093A CN115965624B CN 115965624 B CN115965624 B CN 115965624B CN 202310252093 A CN202310252093 A CN 202310252093A CN 115965624 B CN115965624 B CN 115965624B
Authority
CN
China
Prior art keywords
pixel
flow direction
direction point
block
image
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202310252093.6A
Other languages
Chinese (zh)
Other versions
CN115965624A (en
Inventor
季营垒
苏玉州
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shandong Yuchi New Material Technology Co ltd
Original Assignee
Shandong Yuchi New Material Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shandong Yuchi New Material Technology Co ltd filed Critical Shandong Yuchi New Material Technology Co ltd
Priority to CN202310252093.6A priority Critical patent/CN115965624B/en
Publication of CN115965624A publication Critical patent/CN115965624A/en
Application granted granted Critical
Publication of CN115965624B publication Critical patent/CN115965624B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02ATECHNOLOGIES FOR ADAPTATION TO CLIMATE CHANGE
    • Y02A20/00Water conservation; Efficient water supply; Efficient water use
    • Y02A20/20Controlling water pollution; Waste water treatment
    • Y02A20/204Keeping clear the surface of open water from oil spills

Landscapes

  • Image Analysis (AREA)

Abstract

The invention relates to the technical field of image processing, in particular to a detection method for wear-resistant hydraulic oil pollution particles. The method comprises the following steps: the gradient amplitude of pixel points in each pixel block and the contrast of each pixel block in the ferrographic image of hydraulic oil are subjected to obtaining texture similarity indexes of each pixel block and the adjacent pixel blocks, and then the pixel blocks are combined to obtain each image block; according to the gradient direction of the pixel points in the window corresponding to the pixel points, obtaining the flow direction point pairs in the window corresponding to the pixel points; determining the selection necessity of each flow direction point pair according to the number of the flow direction point pairs in the window corresponding to each flow direction point pair and the edge extension line corresponding to each flow direction point pair, and further obtaining each target area; and obtaining an enhanced image according to texture similarity indexes of each target area and the adjacent target areas and original gray enhancement parameters of each target area, and further judging whether pollution particles exist in the hydraulic oil. The invention improves the detection precision of the hydraulic oil pollution particles.

Description

Method for detecting wear-resistant hydraulic oil pollution particles
Technical Field
The invention relates to the technical field of image processing, in particular to a detection method for wear-resistant hydraulic oil pollution particles.
Background
In the mechanical movement of the hydraulic device, the pollution particles in the hydraulic oil often cause early abrasion of the joint surface of the friction pair of the hydraulic element, so that the moving part is damaged, or the valve port and the corrosion element are blocked, and the hydraulic device cannot work normally, therefore, the hydraulic oil needs to be detected to judge whether the pollution particles exist in the hydraulic oil. The common image processing-based method is used for judging various particles in the reinforced hydraulic oil iron spectrum image to further determine whether pollution particles exist in the hydraulic oil, but when the collected image is reinforced, because magnetic particles and non-magnetic particles exist in the hydraulic oil pollution particles, the non-magnetic particles are not affected by the magnetic field of the iron spectrometer and can overlap with the magnetic particles, so that the whole gray enhancement effect of the region is poor, the gray enhancement is required to be optimized, the existing multistage linear gray enhancement has poor effect on overlapping edge enhancement with similar gray values, and the detection precision of the hydraulic oil pollution particles is lower.
Disclosure of Invention
In order to solve the problem of lower detection precision in the detection of hydraulic oil pollution particles in the existing method, the invention aims to provide a detection method of antiwear hydraulic oil pollution particles, which adopts the following specific technical scheme:
the invention provides a method for detecting wear-resistant hydraulic oil pollution particles, which comprises the following steps:
acquiring a ferrographic image of hydraulic oil to be detected;
dividing the ferrograph image to obtain each pixel block, and obtaining texture similarity indexes of each pixel block and the adjacent pixel blocks according to gradient amplitude values of pixel points in each pixel block and contrast ratios corresponding to each pixel block; merging pixel blocks based on the texture similarity index to obtain each image block; constructing windows corresponding to the pixel points by taking the pixel points in each image block as the center; according to the gradient direction of the pixel points in the window corresponding to the pixel points, obtaining the flow direction point pairs in the window corresponding to the pixel points;
obtaining edge extension lines corresponding to the flow direction point pairs based on the gradient directions of the pixel points in the flow direction point pairs; determining the selection necessity of each flow direction point pair according to the number of the flow direction point pairs in the window corresponding to each flow direction point pair and the edge extension line corresponding to each flow direction point pair; obtaining each target area based on the selection necessity and the edge pixel points of each image block;
acquiring original gray enhancement parameters of each target area, determining the target gray enhancement parameters of each target area according to texture similarity indexes of each target area and the target areas adjacent to the target areas and the original gray enhancement parameters of each target area, and acquiring an enhanced image based on the target gray enhancement parameters; and judging whether pollution particles exist in the hydraulic oil to be detected or not based on the enhanced image.
Preferably, the merging processing of the pixel blocks based on the texture similarity index to obtain each image block includes:
repeating a merging process for each pixel block, the merging process including: judging whether the texture similarity index of each pixel block and each pixel block adjacent to the pixel block is larger than a texture similarity index threshold, if so, merging the corresponding two pixel blocks, judging whether the texture similarity index of the merged pixel block and each pixel block adjacent to the pixel block is larger than the texture similarity index threshold, if so, merging the corresponding pixel blocks, if not, retaining the original pixel blocks, and so on, and marking each merging area finally obtained as an image block.
Preferably, the obtaining each flow direction point pair in the window corresponding to each pixel point according to the gradient direction of the pixel point in the window corresponding to each pixel point includes:
for the ith pixel point in any image block: judging whether gradient directions of two adjacent pixel points are opposite in a window corresponding to the ith pixel point, and if so, taking the corresponding two adjacent pixel points as a flow direction point pair.
Preferably, the determining the selection necessity of each flow direction point pair according to the number of flow direction point pairs in the window corresponding to each flow direction point pair and the edge extension line corresponding to each flow direction point pair includes:
for the j-th stream direction point pair in any image block:
dividing an image block in which the jth flow direction point pair is positioned into two sub-areas based on an edge extension line corresponding to the jth flow direction point pair, and marking texture similarity indexes of the two sub-areas divided by the jth flow direction point pair as first similarity indexes; counting the number of flow direction point pairs in a window corresponding to the j-th flow direction point pair; taking a natural constant as a base, and taking the value of an exponential function taking the first similarity index as an index as a first characteristic index; taking the reciprocal of the first characteristic index as the texture difference degree; and calculating the product of the number of the flow direction point pairs in the window corresponding to the j-th flow direction point pair and the texture difference degree, carrying out normalization processing, and taking the normalization result as the selection necessity of the j-th flow direction point pair.
Preferably, the obtaining the texture similarity index of each pixel block and the adjacent pixel blocks according to the gradient amplitude of the pixel point in each pixel block and the contrast corresponding to each pixel block includes:
calculating texture similarity indexes of the q-th pixel block and the p-th pixel block adjacent to the q-th pixel block by adopting the following formula:
Figure SMS_1
wherein ,
Figure SMS_5
for the texture similarity index of the q-th pixel block and the p-th pixel block adjacent thereto,
Figure SMS_9
for the number of pixels in the q-th pixel block,
Figure SMS_4
for the number of pixel points in the p-th pixel block adjacent to the q-th pixel block,
Figure SMS_8
for the gradient magnitude of the ith pixel point in the qth pixel block,
Figure SMS_12
for the gradient magnitude of the (i+1) th pixel point in the (q) th pixel block,
Figure SMS_13
for the gradient magnitude of the ith pixel point in the p-th pixel block,
Figure SMS_2
is the gradient amplitude of the (i+1) th pixel point in the p-th pixel block,
Figure SMS_6
as a function of the normalization,
Figure SMS_11
for the contrast of the q-th pixel block,
Figure SMS_14
for the contrast of the p-th pixel block,
Figure SMS_3
is a natural constant which is used for the production of the high-temperature-resistant ceramic material,
Figure SMS_7
in order to take the absolute value of the value,
Figure SMS_10
the parameters are preset.
Preferably, the obtaining the edge extension line corresponding to each flow direction point pair based on the gradient direction of each pixel point in each flow direction point pair includes:
and respectively passing through the centers of the flow direction point pairs, making a straight line which is perpendicular to the gradient directions of the two pixel points in the flow direction point pairs, and marking the straight line as an edge extension line corresponding to the flow direction point pairs.
Preferably, the obtaining each target area based on the selection necessity and the edge pixel point of each image block includes:
judging whether the selection necessity of each flow direction point pair is larger than or equal to a necessity threshold value, and if so, taking the center of the corresponding flow direction point pair as an edge pixel point of the target area; the target region is obtained based on the edge pixel points of the target region.
Preferably, the determining the target gray enhancement parameter of each target region according to the texture similarity index of each target region and the target region adjacent to each target region and the original gray enhancement parameter of each target region includes:
calculating the average value of the texture similarity indexes of each target area and all the adjacent target areas, marking the average texture similarity indexes as average texture similarity indexes, carrying out positive correlation mapping on the average texture similarity indexes, and weighting the original gray enhancement parameters of each target area based on the mapping result to obtain the target gray enhancement parameters of each target area.
Preferably, the determining whether the to-be-detected hydraulic oil has the pollution particles based on the enhanced image includes:
inputting the enhanced image into a pre-trained neural network to obtain categories corresponding to each target area, wherein the categories comprise pollution particles and non-pollution particles; and determining whether pollution particles exist in the hydraulic oil to be detected based on the category corresponding to each target area.
The invention has at least the following beneficial effects:
1. according to the method, characteristics of magnetic particles and non-magnetic particles in hydraulic oil under the action of a magnetic field of a ferrograph are different, the non-magnetic particles are not affected by the magnetic field of the ferrograph and can be overlapped with the magnetic particles, so that the whole gray scale enhancement effect of an area is poor, the existing multi-section linear graying is poor in the overlapping edge enhancement effect of gray scale values, according to gradient amplitudes and corresponding contrasts of pixel points in iron spectrum images of hydraulic oil to be detected, the texture similarity indexes of the pixel points in the pixel points to be detected are obtained, the texture similarity indexes are larger, the higher the texture similarity degree of the corresponding two pixel blocks is, the higher the texture similarity indexes are, the corresponding two pixel blocks are subjected to merging treatment, therefore, the image blocks are obtained based on the texture similarity indexes, the edge of the image blocks is corrected, the target area is obtained, the acquisition result of the target area is more accurate, the detection precision of the subsequent hydraulic oil pollution particles can be effectively ensured, the characteristics of the pixel points in each target area are similar, the target enhancement parameters of the pixel points in the iron spectrum images to be detected, the image to be detected are obtained, and the image pollution of the image to be detected is better, namely, compared with the traditional image pollution-level can be detected, and the image pollution-caused by the poor linear image quality is detected, and the image pollution-caused by the fact that the image is subjected to the poor-stage linear image pollution-stage is detected.
2. When the method is used for analyzing the iron spectrogram image of the hydraulic oil to be detected, the image is firstly divided, then the division result is corrected, and the accurate identification of the particle area can be ensured on the basis of reducing the calculated amount of calculating pixel by pixel.
Drawings
In order to more clearly illustrate the embodiments of the invention or the technical solutions and advantages of the prior art, the following description will briefly explain the drawings used in the embodiments or the description of the prior art, and it is obvious that the drawings in the following description are only some embodiments of the invention, and other drawings can be obtained according to the drawings without inventive effort for a person skilled in the art.
Fig. 1 is a flow chart of a method for detecting wear-resistant hydraulic oil pollution particles.
Detailed Description
In order to further describe the technical means and effects adopted by the invention to achieve the preset aim, the following describes in detail a method for detecting wear-resistant hydraulic oil pollution particles according to the invention with reference to the attached drawings and the preferred embodiment.
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs.
The following specifically describes a specific scheme of the method for detecting the wear-resistant hydraulic oil pollution particles provided by the invention with reference to the accompanying drawings.
An embodiment of a method for detecting pollution particles of antiwear hydraulic oil comprises the following steps:
the embodiment provides a method for detecting wear-resistant hydraulic oil pollution particles, as shown in fig. 1, the method for detecting wear-resistant hydraulic oil pollution particles of the embodiment comprises the following steps:
and S1, acquiring a ferrographic image of hydraulic oil to be detected.
The specific scene aimed at by this embodiment is: collecting a ferrographic image of hydraulic oil to be detected, analyzing the ferrographic image, when the ferrographic image of the hydraulic oil to be detected is detected, overlapping phenomena possibly exist among different particles, so that edge detection cannot accurately divide the positions of the particles, dividing the collected ferrographic image to obtain a plurality of pixel blocks, calculating texture similarity indexes of two adjacent pixel blocks, judging whether the adjacent image blocks need to be combined based on the texture similarity indexes, further obtaining a plurality of image blocks, correcting the edge of each image block, obtaining accurate target areas, performing different-degree enhancement on different target areas in the image based on the texture similarity indexes of each target area and the adjacent target areas, and detecting the anti-hydraulic oil pollution particles based on the enhanced image.
Since the mechanical components are mostly metal components, and the metal particles are mostly magnetic, the ferromagnetic wires can be aligned in the magnetic field of the ferrograph, instead of the magnetic particles, for example: aluminum, ceramic, external sand and the like are not affected by a magnetic field, are deposited in hydraulic oil, and can overlap with magnetic particles in the hydraulic oil, so that the accuracy of particle division is affected.
According to the embodiment, firstly, ferrographic images of antiwear hydraulic oil to be detected are collected through a ferrograph and a camera, then gray processing is carried out on the collected images, and the images after gray processing are recorded as ferrographic images of the hydraulic oil to be detected and are used for detecting pollution particles of the hydraulic oil subsequently. The graying process is the prior art, and will not be described in detail here.
Step S2, dividing the ferrograph image to obtain each pixel block, and obtaining texture similarity indexes of each pixel block and the adjacent pixel blocks according to gradient amplitude values of pixel points in each pixel block and contrast corresponding to each pixel block; merging pixel blocks based on the texture similarity index to obtain each image block; constructing windows corresponding to the pixel points by taking the pixel points in each image block as the center; and obtaining each flow direction point pair in the window corresponding to each pixel point according to the gradient direction of the pixel point in the window corresponding to each pixel point.
Because the partial region of the iron spectrum image of the hydraulic oil to be detected may have the phenomenon of adhesion, if the pixel block is directly performed based on the gray level of the pixel point in the iron spectrum image of the hydraulic oil to be detected, the adhesion edge resolution is not obvious, and the similar gray level cannot form a larger gray level difference when the multistage linearity is enhanced. According to the embodiment, the ferrograph image of the hydraulic oil to be detected is divided to obtain a plurality of pixel blocks, the gray scale relation and the shape of different particles in the ferrograph image of the hydraulic oil to be detected are judged, the pixel blocks are combined according to different attribution evaluation values, and the accurate edges of the combined pixel blocks are judged, so that gray scale enhancement of different degrees is carried out on particle areas with different gray scale characteristics.
The generation principle of the non-magnetic particles is different from that of the magnetic particles, so that the textures of the region where the non-magnetic particles are located are different from those of the region where the magnetic particles are located, the magnetic particles are distributed near the ferromagnetic line due to the effect of the magnetic field of the ferrograph and are closer to the focusing position of the camera, so that clear and sharp internal textures are displayed, the non-magnetic particles are deposited below, the texture characteristics of the images shot by the camera are difficult to display, and the images are in a blurred particle region. Compared with the traditional method of dividing the image according to gray level, the method of dividing the image blocks of the ferrograph in the embodiment calculates the ferrograph image blocks by measuring and judging the texture difference evaluation among the blocks, wherein the measurement and judgment blocks are clear in pixel point textures, the measurement and judgment blocks are included in the pixel point blocks, a great amount of redundancy exists in calculation of pixel points by pixel point, and meanwhile the dividing precision of the abrasion-resistant hydraulic oil pollution particle area is guaranteed.
Specifically, in this embodiment, firstly, a ferrographic image of hydraulic oil to be detected is divided into k pixel blocks with equal areas, in this embodiment, the value of k is 16, and in a specific application, an implementer can set the value of k according to the size of the ferrographic image; according to the embodiment, on the basis of ensuring accurate identification of the particle area, the calculated amount of calculating pixel points by pixel point is reduced, the texture similarity between the pixel blocks is evaluated, and accurate division of the pixel blocks is facilitated.
After the image is segmented, the clearer and more visible textures in each pixel block are, which means that the greater the possibility that the pixel blocks are magnetic particle areas is, the greater the difference of textures among the pixel blocks is, and the more dissimilar the textures are; if the adjacent two pixel blocks are more similar, it is indicated that the corresponding two pixel blocks are more suitable for the merging process, so the embodiment will analyze the similarity degree of each two adjacent pixel blocks to determine whether to perform the merging process. Firstly, acquiring gradient amplitude values and gradient directions of pixel points in a ferrograph image of hydraulic oil to be detected by adopting a Sobel operator; considering that the gray level difference between the whole current pixel block and other pixel blocks cannot be judged by reflecting the characteristics among the pixel points only through the gradient amplitude difference, the contrast of the pixel blocks needs to be synthesized for judgment, the gray level difference among different pixel blocks is reflected by using the contrast, and the integral characteristics of the pixel blocks are reflected, so that the contrast of each pixel block in a ferrographic image of hydraulic oil to be detected is calculated, and the gradient amplitude, the gradient direction and the contrast obtaining method are all in the prior art and are not repeated herein; calculating texture similarity indexes of every two adjacent pixel blocks based on gradient amplitude values of pixel points in every two adjacent pixel blocks and contrast of each pixel block; for the q-th pixel block and the p-th pixel block adjacent to the q-th pixel block, the calculation formulas of the texture similarity indexes of the two pixel blocks are as follows:
Figure SMS_15
wherein ,
Figure SMS_19
for the texture similarity index of the q-th pixel block and the p-th pixel block adjacent thereto,
Figure SMS_23
for the number of pixels in the q-th pixel block,
Figure SMS_18
for the number of pixel points in the p-th pixel block adjacent to the q-th pixel block,
Figure SMS_20
for the gradient magnitude of the ith pixel point in the qth pixel block,
Figure SMS_25
for the gradient magnitude of the (i+1) th pixel point in the (q) th pixel block,
Figure SMS_27
for the gradient magnitude of the ith pixel point in the p-th pixel block,
Figure SMS_16
is the gradient amplitude of the (i+1) th pixel point in the p-th pixel block,
Figure SMS_22
as a function of the normalization,
Figure SMS_26
for the contrast of the q-th pixel block,
Figure SMS_28
for the contrast of the p-th pixel block,
Figure SMS_17
is a natural constant which is used for the production of the high-temperature-resistant ceramic material,
Figure SMS_21
in order to take the absolute value of the value,
Figure SMS_24
the parameters are preset.
Figure SMS_29
Carrying out positive correlation mapping on the average difference of gradient amplitude values of adjacent pixel points in the q-th pixel block through an exponential function of a natural constant;
Figure SMS_30
for the average difference of gradient amplitude values of adjacent pixel points in the p-th pixel block, carrying out positive correlation mapping on the average difference through an exponential function of a natural constant,
Figure SMS_31
average difference of gradient amplitude values of adjacent pixel points in the q-th pixel block and adjacent image in the p-th pixel blockThe degree of similarity of the average differences in gradient magnitudes of the pixels,
Figure SMS_32
a degree of similarity in contrast for the q-th pixel block and the p-th pixel block; the preset adjustment parameter is introduced to prevent the denominator from being 0, and in this embodiment, the preset adjustment parameter
Figure SMS_33
The value of (2) is 0.01, and in a specific application, the practitioner can set the value according to the specific situation. When the difference of the gradient amplitude values of the pixel points in the two pixel blocks is larger and the contrast difference of the two pixel blocks is larger, the difference of the definition degree of the texture edge of the pixel points between the two pixel blocks is larger, the texture similarity of the two pixel blocks is lower, and the normalization processing is carried out through the existing sigmoid function, so that the value of the calculation result is positioned at [0,1 ]]And the pixel blocks are convenient to be combined according to the texture similarity index. When the average difference of the gradient magnitudes of the adjacent pixel points in the q-th pixel block is more similar to the average difference of the gradient magnitudes of the adjacent pixel points in the p-th pixel block, the smaller the difference of the contrast of the q-th pixel block and the contrast of the p-th pixel block is, the higher the texture similarity degree between the q-th pixel block and the p-th pixel block is, namely the texture similarity index between the q-th pixel block and the p-th pixel block is larger.
And traversing each pixel block in the ferrograph image of the hydraulic oil to be detected to obtain texture similarity indexes of each pixel block and adjacent pixel blocks in the ferrograph image of the hydraulic oil to be detected.
The larger the texture similarity index, the more similar the textures corresponding to two pixel blocks are, and since the pixel blocks are divided based on a fixed size, the region of the same class may be divided into a plurality of pixel blocks, so that it is required to determine whether the two adjacent pixel blocks need to be combined based on the texture similarity index. Specifically, a texture similarity index threshold value is set
Figure SMS_34
In the present embodiment
Figure SMS_35
8, in a specific application, the implementer may set up according to the specific situation. Determining texture similarity index of the qth pixel block and the p pixel block adjacent thereto
Figure SMS_36
Whether or not it is greater than
Figure SMS_37
If the texture similarity index is larger than the texture similarity index, combining the q-th pixel block with the p-th pixel block adjacent to the q-th pixel block to obtain a combined pixel block, and similarly, calculating the texture similarity index of the combined pixel block and the pixel block adjacent to the combined pixel block by adopting the method, wherein the texture similarity index based on the combined pixel block and the pixel block adjacent to the combined pixel block is similar to that of the combined pixel block
Figure SMS_38
Judging whether to continue to merge until the texture similarity indexes of the merged pixel block and all adjacent pixel blocks are smaller than or equal to
Figure SMS_39
The method comprises the steps of carrying out a first treatment on the surface of the If the texture of the q-th pixel block is smaller than or equal to the texture of the p-th pixel block, the texture similarity degree of the q-th pixel block and the adjacent p-th pixel block is lower, and the q-th pixel block and the p-th pixel block are not subjected to merging processing. And (3) processing other pixel blocks in the iron spectrum image of the hydraulic oil to be detected by adopting the method, traversing the iron spectrum image of the hydraulic oil to be detected along the sequence of the image from the origin of the image coordinate system to the front and the rear, and marking each pixel block which is finally combined in the iron spectrum image of the hydraulic oil to be detected as an image block, namely dividing the iron spectrum image of the hydraulic oil to be detected into a plurality of image blocks.
Most of hydraulic oil mechanical components are magnetic steel and iron parts, harmful particles mainly comprise abrasion particles generated by metal fatigue of machine parts and a small amount of non-magnetic external invasion sand particles, and oxidation pollution of the hydraulic oil is generated to cause uneven-color oil pollution except the particles. Thus, different degrees of enhancement are required for different image blocks.
In this embodiment, the synthesis of the pixel blocks is performed according to the texture similarity index of the adjacent pixel blocks, so as to obtain a plurality of image blocks. Considering that the edge of the image block obtained by synthesizing the pixel blocks is formed by folding lines, the edge of the same image block possibly contains a part of pixel points on other types of particles, so that the edge of the image block needs to be corrected to obtain an accurate dividing result, and the particle detection result after image enhancement is more accurate.
Because the particle edges have gray level differences, the particle edges can be detected, but the gradient directions of the pixel points in the region where the particles are located are disordered due to the fact that the particle materials are different, the edges cannot be obtained directly through the existing edge detection, and the edge pixel points are required to be selected in a targeted mode by combining the gradient directions of the pixel points. The multi-section gray level linear enhancement endows different gray levels with different gray level linear enhancement coefficients, so that the different gray level sections can be conveniently stretched and compressed, the image quality is improved, the image details are highlighted, and the specific types and the generation reasons of particles in a ferrographic image can be conveniently judged.
The embodiment has obtained the gradient direction of each pixel point in the ferrographic image of the hydraulic oil to be detected, and then the embodiment analyzes the gradient direction based on the pixel points and corrects the edge line of the divided image block.
For the ith pixel point in any image block: taking the ith pixel point as a window center, constructing a window with a preset size, and taking the window as a window corresponding to the ith pixel point; in this embodiment, the preset size is 5*5, and in a specific application, an implementer can set according to a specific situation; judging whether gradient directions of two adjacent pixel points are opposite or not in a window corresponding to the ith pixel point, wherein an included angle formed by the gradient directions of the two adjacent pixel points is 180 degrees, if so, indicating that a gray level edge exists between the two corresponding pixel points, taking the two corresponding adjacent pixel points as a flow direction point pair, and counting the number of the flow direction point pairs in the window corresponding to the ith pixel point. By adopting the method, the flow direction point pairs and the number of the flow direction point pairs in the window corresponding to each pixel point in each image block can be obtained.
Step S3, obtaining edge extension lines corresponding to the flow direction point pairs based on the gradient directions of the pixel points in the flow direction point pairs; determining the selection necessity of each flow direction point pair according to the number of the flow direction point pairs in the window corresponding to each flow direction point pair and the edge extension line corresponding to each flow direction point pair; and obtaining each target area based on the selection necessity and the edge pixel points of each image block.
Since multiple pairs of flow direction point pairs may exist in the window corresponding to the same pixel point, and the phenomenon of uncertain edge direction is caused, the edge of the region needs to be constructed by combining the flow direction point pairs and the inner and outer texture similarity indexes of the divided edge, and the influence of the false edge in the region is eliminated.
For any image block:
for any one of the flow direction point pairs in the image block, because the included angle formed by the gradient directions of the two pixel points in the flow direction point pair is 180 degrees, a straight line which is perpendicular to the gradient directions of the two pixel points in the flow direction point pair is made through the center of the flow direction point pair, the straight line is recorded as an edge extension line corresponding to the flow direction point pair, the edge extension line corresponding to the flow direction point pair divides the image block into two areas, the two areas are respectively recorded as two sub-areas, the more dissimilar textures of the two sub-areas are, and the more accurate the edge division is indicated. The more dissimilar textures of the two sub-areas are obtained after the flow direction point pairs are divided, which shows that the difference between the two side areas is increased after the current flow direction point pairs are divided, and the higher the possibility that the divided edges of the current flow direction point pairs are real particle edges. The texture similarity index of the subarea obtained after division only carries out similarity evaluation on the surrounding area of the flow direction points, which is equivalent to evaluating part of characteristics, and the noise edges in certain particles are more, so that the judgment result of the texture similarity is influenced, and therefore, the embodiment comprehensively evaluates the number of other flow direction point pairs in the coverage area of the flow direction points, and reduces the judgment abnormality generated by the noise edges in the area. Specifically, in this embodiment, the necessity of selecting each flow direction point pair is determined according to the number of flow direction point pairs in the window corresponding to each flow direction point pair and the texture similarity index of two sub-areas divided by the edge extension line corresponding to each flow direction point pair; for the jth flow direction point pair in the image block, marking texture similarity indexes of two sub-areas divided by the jth flow direction point pair as first similarity indexes, counting the number of flow direction point pairs in a window corresponding to the jth flow direction point pair, taking a natural constant as a base number, taking the value of an exponential function of which the first similarity index is an index as a first characteristic index, taking the reciprocal of the first characteristic index as a texture difference degree, calculating the product of the number of flow direction point pairs in the window corresponding to the jth flow direction point pair and the texture difference degree, carrying out normalization processing, and taking the normalization result as the selection necessity of the jth flow direction point pair; the specific calculation formula of the selection necessity of the jth flow direction point pair in the window corresponding to the ith pixel point in the image block is as follows:
Figure SMS_40
wherein ,
Figure SMS_41
for the necessity of selecting the j-th stream direction point pair in the window corresponding to the i-th pixel point in the image block,
Figure SMS_42
for the number of pairs of flow direction points in the window corresponding to the ith pixel point in the image block,
Figure SMS_43
for the texture similarity index of the two sub-areas divided by the jth flow direction point pair in the window corresponding to the ith pixel point in the image block,
Figure SMS_44
as a function of the normalization,
Figure SMS_45
is a natural constant.
Figure SMS_46
Characterizing two sub-regions divided by the j-th flow direction point pairTexture similarity index, the texture similarity index is mapped in a positive correlation way through an exponential function with a natural constant as a base,
Figure SMS_47
for characterizing the degree of texture similarity of the two sub-regions divided by the j-th flow direction point pair,
Figure SMS_48
the texture difference degree is used for representing the texture difference degree of two sub-areas divided by the jth flow direction point pair; in this embodiment, the normalization process is performed using a sigmoid function, and the value of the selection necessity is set to be 0,1]In, facilitate subsequent edge extraction based on selection necessity. When the number of the flow direction point pairs in the window corresponding to the ith pixel point in the image block is larger and the texture similarity index of the two sub-areas divided by the jth flow direction point pair in the window corresponding to the ith pixel point in the image block is smaller, the jth flow direction point pair is more suitable for dividing the area, namely the selection necessity of the jth flow direction point pair is larger; when the number of flow direction point pairs in a window corresponding to the ith pixel point in the image block is smaller and the texture similarity index of two sub-areas divided by the jth flow direction point pair in the window corresponding to the ith pixel point in the image block is larger, the jth flow direction point pair is not suitable for dividing the area, namely the selection necessity of the jth flow direction point pair is smaller.
By adopting the method, the selection necessity of each flow direction point pair in each image block can be obtained, and the necessity threshold value is set
Figure SMS_49
In the present embodiment
Figure SMS_50
The value of (2) is 0.9, and in specific applications, the practitioner can set the value according to specific situations; respectively judging whether the selection necessity of each flow direction point pair is more than or equal to
Figure SMS_51
If the flow direction point pair is larger than or equal to the target area, the corresponding flow direction point pair is indicated to be suitable for acquiring the edge image of the target areaThe pixel points take the centers of the corresponding flow direction point pairs as edge pixel points of the target area; if the current pixel point is smaller than the target region, the corresponding current pixel point pair is not suitable for acquiring the edge pixel point of the target region. So far, the method is adopted to obtain edge pixel points of all target areas in the ferrographic image of the hydraulic oil to be detected, the ferrographic image of the hydraulic oil to be detected is detected through the existing connected domain detection algorithm based on the edge pixel points of all the target areas in the ferrographic image of the hydraulic oil to be detected, and the target areas in the ferrographic image of the hydraulic oil to be detected are obtained, namely the ferrographic image of the hydraulic oil to be detected is divided into a plurality of target areas.
S4, acquiring original gray enhancement parameters of each target area, determining target gray enhancement parameters of each target area according to texture similarity indexes of each target area and target areas adjacent to each target area and the original gray enhancement parameters of each target area, and acquiring an enhanced image based on the target gray enhancement parameters; and judging whether pollution particles exist in the hydraulic oil to be detected or not based on the enhanced image.
Each target area in the ferrograph image of the hydraulic oil to be detected has an adjacent target area, and gray enhancement linear parameters are calculated through texture similarity indexes between the two adjacent target areas, so that the ferrograph image of the hydraulic oil to be detected is enhanced. The method for calculating the texture similarity index between two adjacent target areas is the same as the method for calculating the texture similarity index of two adjacent pixel blocks in step S2, and will not be repeated here. The smaller the texture similarity index between two adjacent target areas, the larger the gray scale difference between the corresponding two target areas, the smaller the gray scale enhancement degree needed by the corresponding target areas.
For the a-th target region:
acquiring original gray enhancement parameters of the target area, calculating the average value of the texture similarity indexes of the target area and all the adjacent target areas according to the texture similarity indexes of the target area and each adjacent target area, marking the average value as an average texture similarity index, and performing positive correlation mapping on the average texture similarity indexWeighting the original gray enhancement parameters of the target area based on the mapping result to obtain target gray enhancement parameters of the target area, and enhancing the target area based on the target gray enhancement parameters of the target area; the method for obtaining the original gray enhancement parameters is the prior art, and is not repeated here; the specific expression of the target gray enhancement parameter of the target region is as follows:
Figure SMS_52
, wherein ,
Figure SMS_53
for the target gray scale enhancement parameter for the target region,
Figure SMS_54
for the original gray scale enhancement parameters of the target region,
Figure SMS_55
the average value of the texture similarity indexes of the target area and all the adjacent target areas, namely the average texture similarity indexes.
By adopting the method, the target gray scale enhancement parameters of each target area in the iron spectrum image of the hydraulic oil to be detected can be obtained, the corresponding target area is enhanced based on the target gray scale enhancement parameters of each target area, namely, the enhanced image is obtained and is used for detecting the abrasion-resistant hydraulic oil pollution particles subsequently. Compared with the traditional method of carrying out multi-section gray scale linear enhancement on an image according to a fixed gray scale range, the method of carrying out multi-section gray scale linear enhancement on the image according to the fixed gray scale range carries out division on the target area through texture similarity indexes of the target areas, calculates target gray scale enhancement parameters of each target area according to gray scale differences among the target areas, carries out enhancement processing on the whole target area while reducing the problem that calculation amount is large when pixel points are calculated one by one, avoids that different gray scales owned by different particles in a ferrograph image cannot reach better characteristics of an ROI area in the fixed gray scale range, and enables different particles in the image to be subjected to targeted enhancement processing.
In the embodiment, the neural network is used for detecting the enhanced image and judging whether pollution particles exist in hydraulic oil to be detected, the enhanced image is input into the pre-trained neural network by adopting an Encoder-Decoder structure, and the categories corresponding to each target area in the enhanced image are output, wherein the categories comprise pollution particles and non-pollution particles; the training process of the neural network is a well-known technique, and will not be described in detail here; by adopting the method provided by the embodiment, whether the pollution particles exist in the hydraulic oil to be detected or not is accurately detected, and in the specific application, an operator can evaluate the pollution of the hydraulic oil to be detected according to the output result of the neural network.
According to the method, characteristics of magnetic particles and non-magnetic particles in hydraulic oil under the action of a magnetic field of a ferrograph are considered to be different, the non-magnetic particles are not affected by the magnetic field of the ferrograph and can be overlapped with the magnetic particles, so that the whole gray scale enhancement effect of an area is poor, the existing multi-section linear graying is poor in the overlapping edge enhancement effect of the gray scale values, according to gradient amplitude values and corresponding contrast ratios of pixel points in pixel blocks in a ferrograph image of the hydraulic oil to be detected, the pixel blocks and texture similarity indexes of adjacent pixel blocks are obtained, the texture similarity indexes are larger, the higher the texture similarity degree of the corresponding two pixel blocks is, the corresponding two pixel blocks are subjected to merging processing, therefore, the image blocks are obtained by carrying out merging processing on the pixel blocks based on the texture similarity indexes, the edges of the image blocks are corrected to obtain target areas, the characteristic similarity of the pixel points in each target area is determined, the target gray scale enhancement parameters of different target areas are obtained, and then whether the particles exist in the hydraulic oil to be detected or not is judged, namely, compared with the conventional hydraulic oil to be detected, the problem that the conventional hydraulic oil is subjected to the linear graying is solved, the image is solved, and the defect that the particles can be better can be subjected to the linear filtering effect is overcome according to the characteristic classification of the image classification. In the embodiment, when the iron spectrogram image of the hydraulic oil to be detected is analyzed, the image is firstly divided, then the division result is corrected, and the accurate identification of the particle area can be ensured on the basis of reducing the calculation amount of calculating pixel by pixel.

Claims (5)

1. The method for detecting the wear-resistant hydraulic oil pollution particles is characterized by comprising the following steps of:
acquiring a ferrographic image of hydraulic oil to be detected;
dividing the ferrograph image to obtain each pixel block, and obtaining texture similarity indexes of each pixel block and the adjacent pixel blocks according to gradient amplitude values of pixel points in each pixel block and contrast ratios corresponding to each pixel block; merging pixel blocks based on the texture similarity index to obtain each image block; constructing windows corresponding to the pixel points by taking the pixel points in each image block as the center; according to the gradient direction of the pixel points in the window corresponding to the pixel points, obtaining the flow direction point pairs in the window corresponding to the pixel points;
obtaining edge extension lines corresponding to the flow direction point pairs based on the gradient directions of the pixel points in the flow direction point pairs; determining the selection necessity of each flow direction point pair according to the number of the flow direction point pairs in the window corresponding to each flow direction point pair and the edge extension line corresponding to each flow direction point pair; obtaining each target area based on the selection necessity and the edge pixel points of each image block;
acquiring original gray enhancement parameters of each target area, determining the target gray enhancement parameters of each target area according to texture similarity indexes of each target area and the target areas adjacent to the target areas and the original gray enhancement parameters of each target area, and acquiring an enhanced image based on the target gray enhancement parameters; judging whether pollution particles exist in the hydraulic oil to be detected or not based on the enhanced image;
obtaining each flow direction point pair in the window corresponding to each pixel point according to the gradient direction of the pixel point in the window corresponding to each pixel point, including:
for the ith pixel point in any image block: judging whether gradient directions of two adjacent pixel points are opposite in a window corresponding to the ith pixel point, and taking the corresponding two adjacent pixel points as a flow direction point pair if the gradient directions are opposite in the window corresponding to the ith pixel point;
the obtaining the edge extension line corresponding to each flow direction point pair based on the gradient direction of each pixel point in each flow direction point pair comprises the following steps:
respectively passing through the centers of the flow direction point pairs, making a straight line which is perpendicular to the gradient directions of two pixel points in the flow direction point pairs, and marking the straight line as an edge extension line corresponding to the flow direction point pairs;
the determining the selection necessity of each flow direction point pair according to the number of the flow direction point pairs in the window corresponding to each flow direction point pair and the edge extension line corresponding to each flow direction point pair comprises the following steps:
for the j-th stream direction point pair in any image block:
dividing an image block in which the jth flow direction point pair is positioned into two sub-areas based on an edge extension line corresponding to the jth flow direction point pair, and marking texture similarity indexes of the two sub-areas divided by the jth flow direction point pair as first similarity indexes; counting the number of flow direction point pairs in a window corresponding to the j-th flow direction point pair; taking a natural constant as a base, and taking the value of an exponential function taking the first similarity index as an index as a first characteristic index; taking the reciprocal of the first characteristic index as the texture difference degree; calculating the product of the number of the flow direction point pairs in the window corresponding to the j-th flow direction point pair and the texture difference degree, carrying out normalization processing, and taking the normalization result as the selection necessity of the j-th flow direction point pair;
the obtaining each target area based on the selection necessity and the edge pixel point of each image block includes:
judging whether the selection necessity of each flow direction point pair is larger than or equal to a necessity threshold value, and if so, taking the center of the corresponding flow direction point pair as an edge pixel point of the target area; the target region is obtained based on the edge pixel points of the target region.
2. The method for detecting particles polluted by antiwear hydraulic oil according to claim 1, wherein said merging pixel blocks based on said texture similarity index to obtain each image block comprises:
repeating a merging process for each pixel block, the merging process including: judging whether the texture similarity index of each pixel block and each pixel block adjacent to the pixel block is larger than a texture similarity index threshold, if so, merging the corresponding two pixel blocks, judging whether the texture similarity index of the merged pixel block and each pixel block adjacent to the pixel block is larger than the texture similarity index threshold, if so, merging the corresponding pixel blocks, if not, retaining the original pixel blocks, and so on, and marking each merging area finally obtained as an image block.
3. The method for detecting the wear-resistant hydraulic oil pollution particles according to claim 1, wherein the obtaining the texture similarity index of each pixel block and the adjacent pixel blocks according to the gradient amplitude of the pixel points in each pixel block and the contrast corresponding to each pixel block comprises the following steps:
calculating texture similarity indexes of the q-th pixel block and the p-th pixel block adjacent to the q-th pixel block by adopting the following formula:
Figure QLYQS_1
wherein ,
Figure QLYQS_4
for the texture similarity index of the q-th pixel block and the p-th pixel block adjacent thereto, a>
Figure QLYQS_8
For the number of pixels in the q-th pixel block, and (2)>
Figure QLYQS_11
Adjacent to the q-th pixel blockThe number of pixel points in the p-th pixel block, is #>
Figure QLYQS_3
For the gradient amplitude of the ith pixel point in the qth pixel block,/for the pixel point>
Figure QLYQS_9
For the gradient amplitude of the (i+1) th pixel point in the (q) th pixel block,/and (d)>
Figure QLYQS_12
For the gradient amplitude of the ith pixel point in the p-th pixel block,/th pixel point>
Figure QLYQS_14
For the gradient amplitude of the (i+1) th pixel point in the (p) th pixel block,/and (n)>
Figure QLYQS_2
For normalization function->
Figure QLYQS_6
Contrast for the q-th pixel block, +.>
Figure QLYQS_10
Contrast for the p-th pixel block, +.>
Figure QLYQS_13
Is natural constant (18)>
Figure QLYQS_5
To take absolute value, +.>
Figure QLYQS_7
The parameters are preset.
4. The method for detecting particles polluted by antiwear hydraulic oil according to claim 1, wherein said determining the target gradation enhancement parameters of each target area based on the texture similarity index of each target area and the target area adjacent thereto, the original gradation enhancement parameters of each target area, comprises:
calculating the average value of the texture similarity indexes of each target area and all the adjacent target areas, marking the average texture similarity indexes as average texture similarity indexes, carrying out positive correlation mapping on the average texture similarity indexes, and weighting the original gray enhancement parameters of each target area based on the mapping result to obtain the target gray enhancement parameters of each target area.
5. The method for detecting the contamination particles of the antiwear hydraulic oil according to claim 1, wherein the determining whether the contamination particles exist in the hydraulic oil to be detected based on the enhanced image includes:
inputting the enhanced image into a pre-trained neural network to obtain categories corresponding to each target area, wherein the categories comprise pollution particles and non-pollution particles; and determining whether pollution particles exist in the hydraulic oil to be detected based on the category corresponding to each target area.
CN202310252093.6A 2023-03-16 2023-03-16 Method for detecting wear-resistant hydraulic oil pollution particles Active CN115965624B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310252093.6A CN115965624B (en) 2023-03-16 2023-03-16 Method for detecting wear-resistant hydraulic oil pollution particles

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310252093.6A CN115965624B (en) 2023-03-16 2023-03-16 Method for detecting wear-resistant hydraulic oil pollution particles

Publications (2)

Publication Number Publication Date
CN115965624A CN115965624A (en) 2023-04-14
CN115965624B true CN115965624B (en) 2023-05-30

Family

ID=85905178

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310252093.6A Active CN115965624B (en) 2023-03-16 2023-03-16 Method for detecting wear-resistant hydraulic oil pollution particles

Country Status (1)

Country Link
CN (1) CN115965624B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116542883B (en) * 2023-07-07 2023-09-05 四川大学华西医院 Magnetic control capsule gastroscope image focus mucosa enhancement system
CN116645368B (en) * 2023-07-27 2023-10-03 青岛伟东包装有限公司 Online visual detection method for edge curl of casting film
CN116823811B (en) * 2023-08-25 2023-12-01 汶上县誉诚制衣有限公司 Functional jacket surface quality detection method
CN117455913B (en) * 2023-12-25 2024-03-08 卡松科技股份有限公司 Intelligent detection method for pollution of hydraulic oil based on image features

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115115638A (en) * 2022-08-30 2022-09-27 南通翡利达液压科技有限公司 Oil leakage detection and judgment method for hydraulic system

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110223299B (en) * 2019-06-12 2021-06-18 重庆邮电大学 Abrasive particle segmentation method based on deposition process
CN112667717B (en) * 2020-12-23 2023-04-07 贵州电网有限责任公司电力科学研究院 Transformer substation inspection information processing method and device, computer equipment and storage medium
CN115409881A (en) * 2021-05-11 2022-11-29 北京字跳网络技术有限公司 Image processing method, device and equipment
CN114943739B (en) * 2022-07-26 2022-10-21 山东三微新材料有限公司 Aluminum pipe quality detection method
CN115063409B (en) * 2022-07-28 2022-11-11 南通恒强轧辊有限公司 Method and system for detecting surface material of mechanical cutter
CN115358947A (en) * 2022-08-22 2022-11-18 西安交通大学 Ferrographic abrasive particle image denoising method, device and equipment and readable storage medium
CN115546127A (en) * 2022-09-21 2022-12-30 厦门大学 Engine lubricating oil abrasive particle image analysis method and device, medium and equipment

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115115638A (en) * 2022-08-30 2022-09-27 南通翡利达液压科技有限公司 Oil leakage detection and judgment method for hydraulic system

Also Published As

Publication number Publication date
CN115965624A (en) 2023-04-14

Similar Documents

Publication Publication Date Title
CN115965624B (en) Method for detecting wear-resistant hydraulic oil pollution particles
CN114842017B (en) HDMI cable surface quality detection method and system
CN114943739B (en) Aluminum pipe quality detection method
CN109490316A (en) A kind of surface defects detection algorithm based on machine vision
CN113155839A (en) Steel plate outer surface defect online detection method based on machine vision
CN114549441A (en) Sucker defect detection method based on image processing
Zhang et al. Research on the size of mechanical parts based on image recognition
CN115018785A (en) Hoisting steel wire rope tension detection method based on visual vibration frequency identification
CN105184792A (en) Circular saw web wear extent online measuring method
CN116110006B (en) Scenic spot tourist abnormal behavior identification method for intelligent tourism system
Li et al. Vehicle seat detection based on improved RANSAC-SURF algorithm
CN114638822B (en) Method and system for detecting surface quality of automobile cover plate by using optical means
CN110084786A (en) Automatic defect identification method for digital X-ray image with gradually-changed background
CN111508022B (en) Line laser stripe positioning method based on random sampling consistency
Panin et al. Algorithm of fatigue crack detection and determination of its tip position in optical images
CN113240721A (en) Navigation vanishing point detection method applied to complex scene of roadway
CN107016692B (en) A kind of Moving Shadow Detection Approach based on computer vision
CN111831872A (en) Magnetic flux leakage data self-adaptive gray scale visualization method with enhanced small defect characteristics
CN113358058B (en) Computer vision detection method for weld contour features based on discrete sequence points
Semenishchev et al. Increasing the accuracy of object boundaries detection and the quality of machine-vision system data in terms of machine processing by a collaborative complex
CN115908429B (en) Method and system for detecting grinding precision of foot soaking powder
CN117214284B (en) Oil product detection method based on electromagnetic induction technology
Wang et al. Precision circular target location in vision coordinate measurement system
Amorim et al. Evaluation of Edge Detection Filters Applied to Corroded Steel Sheets
Singh et al. Computational Metrology for Measuring Industrial Component Dimensions.

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
PE01 Entry into force of the registration of the contract for pledge of patent right

Denomination of invention: A method for detecting particles of anti-wear hydraulic oil contamination

Effective date of registration: 20231215

Granted publication date: 20230530

Pledgee: China Postal Savings Bank Co.,Ltd. Jining Rencheng District sub branch

Pledgor: Shandong Yuchi New Material Technology Co.,Ltd.

Registration number: Y2023980071880

PE01 Entry into force of the registration of the contract for pledge of patent right