CN112017109B - Online ferrographic video image bubble elimination method - Google Patents
Online ferrographic video image bubble elimination method Download PDFInfo
- Publication number
- CN112017109B CN112017109B CN202010855508.5A CN202010855508A CN112017109B CN 112017109 B CN112017109 B CN 112017109B CN 202010855508 A CN202010855508 A CN 202010855508A CN 112017109 B CN112017109 B CN 112017109B
- Authority
- CN
- China
- Prior art keywords
- image
- online
- ferrographic
- video
- pixel
- 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
Links
- 238000000034 method Methods 0.000 title claims abstract description 73
- 238000003379 elimination reaction Methods 0.000 title claims abstract description 12
- 230000008030 elimination Effects 0.000 title claims abstract description 11
- 238000012545 processing Methods 0.000 claims abstract description 21
- 238000001514 detection method Methods 0.000 claims abstract description 7
- 238000001914 filtration Methods 0.000 claims abstract description 6
- 230000011218 segmentation Effects 0.000 claims description 15
- 239000011159 matrix material Substances 0.000 claims description 9
- 238000006243 chemical reaction Methods 0.000 claims description 6
- 238000003672 processing method Methods 0.000 claims description 2
- 230000009466 transformation Effects 0.000 claims 1
- 239000002245 particle Substances 0.000 abstract description 10
- 238000003745 diagnosis Methods 0.000 abstract description 6
- 239000007788 liquid Substances 0.000 abstract description 5
- 239000003921 oil Substances 0.000 description 12
- 239000012530 fluid Substances 0.000 description 4
- 238000005516 engineering process Methods 0.000 description 3
- 239000006061 abrasive grain Substances 0.000 description 2
- 230000000694 effects Effects 0.000 description 2
- 238000000605 extraction Methods 0.000 description 2
- 238000009499 grossing Methods 0.000 description 2
- 238000012935 Averaging Methods 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000004364 calculation method Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 230000018109 developmental process Effects 0.000 description 1
- 239000006185 dispersion Substances 0.000 description 1
- 230000005294 ferromagnetic effect Effects 0.000 description 1
- 239000010687 lubricating oil Substances 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000002040 relaxant effect Effects 0.000 description 1
- 238000010187 selection method Methods 0.000 description 1
- 230000000007 visual effect Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T3/00—Geometric image transformations in the plane of the image
- G06T3/04—Context-preserving transformations, e.g. by using an importance map
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T5/00—Image enhancement or restoration
- G06T5/77—Retouching; Inpainting; Scratch removal
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/10—Segmentation; Edge detection
- G06T7/136—Segmentation; Edge detection involving thresholding
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/10—Segmentation; Edge detection
- G06T7/187—Segmentation; Edge detection involving region growing; involving region merging; involving connected component labelling
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/10—Image acquisition modality
- G06T2207/10016—Video; Image sequence
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/20—Special algorithmic details
- G06T2207/20024—Filtering details
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Image Processing (AREA)
- Image Analysis (AREA)
Abstract
The invention belongs to the field of fault diagnosis of mechanical equipment, and particularly relates to an online ferrographic video image bubble elimination method, which comprises the following steps: taking an image of oil liquid which does not enter an online ferrograph as a background image, taking a video image of the oil liquid which enters the online ferrograph as an original online ferrograph video image, converting the original ferrograph image into a gray image, and then identifying bubbles in the gray image; removing tiny bubble noise by using improved Gaussian filtering, performing moving object detection on the processed video image by using a frame difference method, performing binarization on a difference value by using an Otsu method to obtain a pixel position of the bubble noise, and replacing a noise pixel in the video image subjected to Gaussian filtering by using the same pixel position of a background image; then carrying out Dajin binarization processing on the image with the bubbles eliminated; the method can adapt to online ferrographic video images with bubbles of different sizes, and solves the problem of bubble noise interference when the online ferrographic video images are subjected to abrasive particle identification.
Description
Technical Field
The invention belongs to the field of fault diagnosis of mechanical equipment, and particularly relates to an online ferrographic video image bubble elimination method.
Background
In recent years, with the development of scientific technology, fault diagnosis and detection of mechanical equipment become important in the field of machinery. In order to avoid the loss of products caused by production interruption due to the fault of mechanical equipment, the lubricating oil in the equipment is monitored, the running state of the mechanical equipment is known in time, and the method is a problem which is mainly solved in the field of fault diagnosis of the current mechanical equipment. The online ferrography technology is concerned as a method for detecting ferromagnetic abrasive particle information in oil. In the online ferrographic technology, the ferrographic video image obtained by the online ferrographic is processed to obtain information such as the shape, the number, the covering area and the like of abrasive particles, and bubbles generated by the creep of oil exist in the video image, so that the extraction of the abrasive particle information is blocked or hindered, and the bubbles in the online ferrographic video image are eliminated to provide convenience for subsequently obtaining the abrasive particle information.
In order to make the abrasive grain identification more accurate, thomas a D H identifies abrasive grains in an automatic gray threshold selection method, and enhances the identification effect by iteratively relaxing the marks. Kong Xianmei, etc. outline the application of computer image processing in ferrographic analysis in terms of background removal, abrasive grain segmentation, and edge detection of abrasive grains, respectively, and process isolated points and boundary burrs appearing on an image by linear filtering and low-pass filtering. Chen Guiming, etc., decompose the image signal into multiple scales by wavelet analysis, and remove the wavelet coefficients belonging to the noise to realize denoising. X Hu employs weighted mean filtering and adaptive median filtering to improve image quality and thus improve noise interference in images.
However, the above image processing methods only process fine noise in an image, and when the method is applied to video image processing, bubble noise in a video cannot be eliminated, so that a method capable of accurately eliminating bubble noise is urgently needed in the online ferrographic video image processing.
Disclosure of Invention
In order to solve the problems in the prior art, the invention provides an online ferrographic video image bubble elimination method, which comprises the following steps:
s1: acquiring an online ferrographic image of the oil which is not communicated and an online ferrographic video image of the oil which passes through; taking an online ferrographic image of the oil which does not pass through as a background image; taking an online ferrographic video image through which oil passes as an original online ferrographic video image;
s2: respectively converting the background image and the original online ferrographic video image into gray level video images to obtain a background gray level image and an online ferrographic video gray level image;
s3: processing the online ferrographic video gray level image by adopting an improved Gaussian filter to obtain a filtered online ferrographic gray level video image;
s4: detecting moving objects in the filtered online ferrographic gray level video image by adopting a frame difference method; carrying out Dajin binarization processing on the detected difference value to obtain the pixel position of the bubble in the image;
s5: selecting pixel points corresponding to bubble pixel positions in the original image in the background gray image to replace bubble pixel points in the filtered online ferrographic gray video image; and carrying out great amount of binarization processing on the replaced video image to obtain a final binarized ferrographic video image without bubbles.
Preferably, the process of obtaining the background gray-scale image and the online ferrographic video gray-scale image includes:
s21: decomposing an original online ferrographic video image into image data of each frame;
s22: and respectively converting the background image and the original online ferrographic video frame image into gray images by adopting YUV color space and RGB color space conversion formulas to obtain a background gray image and an online ferrographic video gray image.
Preferably, the RGB color space conversion formula is:
R′ ij =G′ ij =B′ ij =0.299R ij +0.587G ij +0.114B ij
preferably, the process of obtaining the pixel position of the bubble in the image comprises:
s41: carrying out moving object detection on the filtered online ferrographic gray level video image by adopting a frame difference method to obtain a frame difference method difference image;
s42: processing the frame difference method difference image by adopting an Otsu method to obtain a segmentation threshold T of the foreground and the background of the frame difference method difference image;
s43: the number of pixel points with the gray value smaller than the threshold value T in the frame difference method difference image is N 0 (ii) a The number of pixel points with the gray value larger than the threshold value T in the frame difference method difference image is N 1 ;
S43: according to N 0 Calculating the proportion omega of the pixel points of the foreground in the whole frame difference method difference image 0 And average gray level mu 0 ;
S44: according to N 1 Calculating the proportion omega of the number of pixels of the background to the number of pixels of the difference image of the whole frame difference method 1 And average gray level mu 1 ;
S45: calculating the average gray mu of the frame difference method difference image according to the average gray of the pixels of the foreground and the average gray of the pixels of the background;
s46: using a pass method to obtain omega 0 、μ 0 、ω 1 、μ 1 And processing the mu value to obtain the inter-class variance g and the maximum segmentation threshold value T 1 ;
S47: according to the maximum segmentation threshold T 1 And carrying out binarization operation on the interpolation image to obtain a bubble pixel point position (i, j).
Preferably, the formula for obtaining the inter-class variance g is as follows:
g=ω 0 ω 1 (μ 0 -μ 1 ) 2
preferably, the improved gaussian filter comprises: obtaining coordinates (i, j) of an inner center pixel point of a convolution window, calculating a region range S (i, j) of the convolution window around a center point and a variance D (i, j) in a pixel region of the center point of an image according to the obtained center point coordinates, obtaining a ratio function F (i, j) of the D (i, j) and a traditional Gaussian filter function F (i, j), and when F (i, j) =1, enabling parameter values of pixel points in a Gaussian kernel to be approximately equal to pixel matrix pixel value weights of the region S (i, j); and solving the Gaussian kernel parameter weights corresponding to the pixel points at different positions in each pixel matrix in the image according to the relationship between the standard deviation and the Gaussian kernel weight coefficient to complete Gaussian filtering.
preferably, the process of step S5 includes:
s51: replacing the pixel position (i, j) of the bubble in the online ferrographic video image by adopting a corresponding pixel point in the gray background image according to the pixel position of the bubble identified by the filtered online ferrographic gray video image to obtain a replaced online ferrographic video image;
s52: processing the replaced online ferrographic video image by adopting an Otsu binarization method to obtain a binarized image without bubbles;
s53: and reading each frame of the enhanced binarized image subjected to the S52 in batch, namely the online ferrographic video binarized image subjected to bubble elimination.
Has the advantages that:
the method has the characteristics of quickly and accurately eliminating the bubble noise in the online ferrographic video image, and has the following beneficial effects:
(1) The method is suitable for acquiring the abrasive particle information in the visual online ferrographic video image of the image, and realizes the elimination of bubbles in the online ferrographic video image by identifying and replacing bubble noise by using a moving object detection method
(2) The invention eliminates bubbles and carries out binarization processing, thereby providing convenience for acquiring subsequent abrasive particle information.
Drawings
FIG. 1 is an overall flow chart of the present invention.
Detailed Description
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings, and the described embodiments are only a part of the embodiments of the present invention, but not all of the embodiments. All other embodiments, which can be obtained by a person skilled in the art without inventive effort based on the embodiments of the present invention, are within the scope of the present invention.
An online ferrographic video image bubble elimination method, as shown in fig. 1, includes:
s1: acquiring an online ferrographic image of the oil which is not communicated and an online ferrographic video image of the oil which passes through; taking an online ferrographic image of the oil which does not pass through as a background image; and taking the online ferrographic video image through which the oil liquid passes as an original online ferrographic video image.
As no oil liquid passes through the online ferrographic image without oil liquid, the obtained image has no bubbles and has clear pixels. In the online ferrographic video image that has fluid to pass through, because there is fluid through online ferrographic for there is the bubble in the fluid, thereby the online ferrographic video image that obtains has the bubble, makes easy diagnostic error when carrying out failure diagnosis to mechanical equipment through online video image, is about to the bubble diagnosis for this equipment does not have fluid to pass through, and equipment is in the fault state, brings very big puzzlement for the staff.
S2: respectively converting the background image and the original online ferrographic video image into gray level video images to obtain a background gray level image and an online ferrographic video gray level image;
s21: decomposing an original online ferrographic video image into each frame of image data;
s22: and respectively converting the background image and the original online ferrographic video frame image into gray images by adopting YUV color space and RGB color space conversion formulas to obtain a background gray image and an online ferrographic video gray image.
Pixel value f of arbitrary point (i, j) in original image ij ={R ij ,G ij ,B ij }; carrying out graying processing on the image according to an RGB color space conversion formula to obtain a pixel value of f' ij ={R′ ij ,G′ ij ,B′ ij }。
The RGB color space conversion formula is as follows:
R′ ij =G′ ij =B′ ij =0.299R ij +0.587G ij +0.114B ij
wherein R' ij Represents a red channel value, G ', of the pixel after graying the image' ij Representing the green channel value, B 'of the pixel after graying the image' ij The gray scale image processing method comprises the steps of representing a blue channel value of a pixel point after graying the image, representing the position coordinates of the pixel point of the image by i and j, representing a red channel value by R, representing a green channel value by G, and representing a blue channel value by B.
S3: and performing improved Gaussian filtering processing on the online ferrographic video gray level image to obtain a filtered online ferrographic gray level video image.
The Gaussian filter is a linear smooth filter and is used for eliminating Gaussian noise, the online ferrographic video gray level image is weighted and averaged by adopting the Gaussian filter, and the value of each pixel point in the image is obtained by weighting and averaging the value of each pixel point and other pixel values in the neighborhood. The specific operation process is as follows: scanning each pixel in the online ferrographic gray scale image by using a template (or called convolution or mask), replacing the value of a central pixel point of the template by using the weighted average gray scale value of the pixels in the neighborhood determined by the template, and finally completing the Gaussian filtering of the image to obtain the filtered online ferrographic gray scale video image.
The improved gaussian filter is: setting the coordinates of a central pixel point in a convolution window as (i, j), s (i, j) represents the area range of the convolution window around the central pixel point, the central weight of a template is the weighted average value of the central pixel value and other pixel values in the field, the variance in a certain pixel area of an image can be represented as D (i, j), and then the relation between the variance and the traditional Gaussian filter function F (i, j) is described as follows by a ratio function F (i, j):
wherein D (i, j) represents the variance in the pixel region of the central point of the image, f (i, j) represents the traditional Gaussian filter function, D represents the variance, sigma represents the standard deviation, and n represents the scale of the Gaussian kernel convolution template.
Wherein x is the pixel value of a certain point in the s (i, j) region, i and j respectively represent the coordinates of the pixel points,the average value of the weight values of the pixel points in the s (i, j) region is obtained.
F (i, j) =1, that is, the parameter value of the pixel in the gaussian kernel is approximately equal to the pixel matrix pixel value weight in the s (i, j) region. According to the relation between the standard deviation and the Gaussian kernel weight coefficient, the Gaussian kernel parameter weights corresponding to pixel points at different positions in each pixel matrix in the image can be accurately obtained, and therefore smooth denoising of the online ferrographic video image is achieved. The relation between the standard deviation and the Gaussian kernel weight coefficient is a direct proportion relation, and the variance and the Gaussian kernel weight function are in a direct proportion relation because the weight of the Gaussian kernel coefficient is closely related with the dispersion degree of the area pixel points, and the farther the distance from the center point of a certain area is, the larger the weight is.
In the Gaussian filter, the selection of the standard deviation determines the smoothing effect of the image, and compared with the traditional Gaussian filter which selects a fixed standard deviation, the standard deviation value of the improved Gaussian filter is updated along with each convolution iteration, so that the smoothing degree is better.
S4: detecting moving objects in the filtered online ferrographic gray level video image by adopting a frame difference method; and carrying out Dajin binarization processing on the detected difference value to obtain the pixel position of the bubble in the image.
After the Dajin binarization processing is carried out, a binary image with only black (0) and white (1) is obtained, and the binary image is used as a matrix; the matrix is subjected to condition query, and the position of a pixel point with the value of 0 can be determined, namely the pixel point is represented as black in a binary image; the position of the pixel point is the position of the bubble in the filtered online ferrographic gray level video image. The content of the conditional query is to determine whether an element in the matrix is 0.
S41: carrying out moving object detection on the filtered online ferrographic gray level video image by adopting a frame difference method to obtain a frame difference method difference image;
s42: calculating a threshold value of the frame difference image by using the Otsu method; and recording the segmentation threshold values of the foreground and the background of the frame difference image as T.
S43: the number of pixel points with the gray value smaller than the threshold value T in the frame difference method difference image is N 0 (ii) a The number of pixel points with the gray value larger than the threshold value T in the frame difference method difference image is N 1 。
Preferably, a three-frame difference algorithm or a ViBe algorithm is adopted to detect the moving object.
S43: according to N 0 Calculating the pixel point proportion omega of the pixel point number of the foreground in the difference image of the whole frame difference method 0 And average gray level mu 0 。
The proportion omega of the pixel points of the calculated foreground to the pixel points of the whole frame difference method difference image 0 The formula of (1) is:
wherein N is 0 And representing the number of pixel points with the gray value smaller than a threshold value T in the frame difference method difference image, wherein M multiplied by N represents the size of the image, M represents a horizontal pixel value, and N represents a vertical pixel value.
The size of the image, mxn, is:
N 0 +N 1 =M×N
s44: according to N 1 Calculating the proportion omega of the number of pixels of the background to the number of pixels of the difference image of the whole frame difference method 1 And average gray level mu 1 。
The pixel point number of the calculation background accounts for the pixel point proportion omega of the difference image of the whole frame difference method 1 The formula of (1) is:
wherein, N 1 And the number of pixel points with the gray value larger than the threshold value T in the frame difference method difference image is represented.
The sum of the proportion of the pixel points of the foreground in the whole frame difference method difference image and the proportion of the pixel points of the background in the whole frame difference method difference image is 1, namely:
ω 0 +ω 1 =1
s45: and calculating the average gray level mu of the frame difference method difference image according to the average gray level of the pixel points of the foreground and the average gray level of the pixel points of the background.
The formula for calculating the average gray level mu of the frame difference image is as follows:
μ=ω 0 *μ 0 +ω 1 *μ 1
s46: using a method to obtain omega 0 、μ 0 、ω 1 、μ 1 And processing the mu value to obtain the inter-class variance g and the maximum segmentation threshold value T 1 。
Because the value range of the segmentation threshold T is (0, 255), the inter-class variance g corresponding to the threshold can be obtained every time one segmentation threshold T is taken; namely, each inter-class variance g corresponds to a segmentation threshold T; when the inter-class variance g takes the maximum value, the T corresponding to the g is the maximum segmentation threshold T 1 . The image can be subjected to pixel segmentation more accurately by solving the maximum segmentation threshold, and the position coordinates of the bubbles can be determined more accurately, so that the finally obtained result is better.
The formula for obtaining the inter-class variance g is as follows:
g=ω 0 (μ 0 -μ) 2 +ω 1 (μ 1 -μ) 2
g=ω 0 ω 1 (μ 0 -μ 1 ) 2
s47: according to the maximum segmentation threshold T 1 And carrying out binarization operation on the interpolation image to obtain a bubble pixel point position (i, j).
S5: selecting pixel points corresponding to bubble pixel positions in the original image in the background gray image to replace bubble pixel points in the filtered online ferrography gray video image; and carrying out great amount of binarization processing on the replaced video image to obtain a final binarized ferrographic video image without bubbles.
S51: and (4) replacing the pixel position (i, j) of the bubble in the online ferrographic video image by adopting the gray background image obtained in the step (22) according to the pixel position of the bubble identified and selected in the step (S47) to obtain the replaced online ferrographic video image.
S52: and processing the replaced online ferrographic video image by adopting an Otsu binarization method to obtain a binarized image without bubbles.
S53: and reading each frame of the enhanced binarized image subjected to the S52 in batch, namely the online ferrographic video binarized image subjected to bubble elimination.
Preferably, the online ferrographic video binary image obtained in step S5 after the bubbles are removed is detected, and whether the bubbles in the video image are completely removed is determined; if no bubble exists in the detected image, the image is output, and if the detected image has a bubble, the step returns to the step S4, the pixel position of the bubble is redetermined, and the bubble elimination process is carried out.
The method for detecting the online ferrographic video binarization image is a threshold value method, and the process comprises the following steps: acquiring an online ferrographic video image with bubbles, and converting the image into a gray scale image; acquiring a pixel interval of a bubble position in the image; taking the pixel interval as a detection condition; acquiring each position pixel point of the online ferrographic video binary image after the bubbles are eliminated in the step S5, comparing each pixel point with a pixel interval, if the pixel value of the pixel point of the online ferrographic video binary image after the bubbles are eliminated falls in the pixel interval, the online ferrographic video binary image after the bubbles are eliminated has bubbles, and returning to the step S4; and if the pixel values of all the pixel points of the online ferrographic video binary image without the bubbles are not in the pixel interval, outputting the image if the online ferrographic video binary image without the bubbles is free of bubbles.
Preferably, the pixel interval may be a union of bubble pixel intervals of a plurality of online ferrographic video image images with bubbles.
In order to facilitate the later extraction of the abrasive particle information of the online ferrographic video binary image, the binary image without bubbles is processed by adopting an abrasive particle identification method, and the online ferrographic video binary image with the abrasive particle information is obtained.
The above-mentioned embodiments, which further illustrate the objects, technical solutions and advantages of the present invention, should be understood that the above-mentioned embodiments are only preferred embodiments of the present invention, and should not be construed as limiting the present invention, and any modifications, equivalents, improvements, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims (4)
1. An online ferrographic video image bubble elimination method is characterized by comprising the following steps:
s1: acquiring an online ferrographic image of oil which is not communicated and an online ferrographic video image of oil which passes through; taking an online ferrographic image of the oil which does not pass through as a background image; taking an online ferrographic video image through which oil passes as an original online ferrographic video image;
s2: respectively converting the background image and the original online ferrographic video image into gray level video images to obtain a background gray level image and an online ferrographic video gray level image;
s3: processing the online ferrographic video gray level image by adopting an improved Gaussian filter to obtain a filtered online ferrographic gray level video image; the improved gaussian filter comprises: acquiring coordinates (i, j) of inner center pixel points of a convolution window, calculating a region range S (i, j) of the convolution window around a center point and a variance D (i, j) in a pixel region of the center point of an image according to the acquired center point coordinates, and acquiring a ratio function F (i, j) of the D (i, j) and a traditional Gaussian filter function F (i, j), wherein when F (i, j) =1, a parameter value of a pixel point in a Gaussian kernel is approximately equal to the pixel value weight of a pixel matrix of an S (i, j) region; according to the proportional relation between the standard deviation and the Gaussian kernel weight coefficient, solving Gaussian kernel parameter weights corresponding to pixel points at different positions in each pixel matrix in the image to complete Gaussian filtering; wherein, the expression of the ratio function F (i, j) is:
d (i, j) represents the variance in the pixel region of the central point of the image, f (i, j) represents a traditional Gaussian filter function, D represents the variance, sigma represents the standard deviation, and n represents the scale of a Gaussian kernel convolution template;
s4: detecting moving objects in the filtered online ferrographic gray level video image by adopting a frame difference method; carrying out Dajin binarization processing on the detected difference value to obtain the pixel position of the bubble in the image; the method specifically comprises the following steps:
s41: carrying out moving object detection on the filtered online ferrographic gray level video image by adopting a frame difference method to obtain a frame difference method difference image;
s42: processing the frame difference method difference image by adopting an Otsu method to obtain a segmentation threshold T of the foreground and the background of the frame difference method difference image;
s43: the number of pixel points with the gray value smaller than the threshold value T in the frame difference method difference image is N 0 (ii) a The number of pixel points with the gray value larger than the threshold value T in the frame difference method difference image is N 1 ;
S43: according to N 0 Calculating the pixel point proportion omega of the pixel point number of the foreground in the difference image of the whole frame difference method 0 And average gray level mu 0 ;
S44: according to N 1 Calculating the proportion omega of the number of pixels of the background to the number of pixels of the difference image of the whole frame difference method 1 And average gray level mu 1 ;
S45: calculating the average gray mu of the frame difference method difference image according to the average gray of the pixels of the foreground and the average gray of the pixels of the background;
s46: using a traversal method to obtain omega 0 、μ 0 、ω 1 、μ 1 And processing the mu value to obtain the inter-class variance g and the maximum segmentation threshold value T 1 (ii) a Wherein, the formula for obtaining the inter-class variance g is as follows:
g=ω 0 ω 1 (μ 0 -μ 1 ) 2
wherein, ω is 0 The ratio of the number of pixels representing foreground to the number of pixels in the difference image of the whole frame difference method, omega 1 The number of pixels representing the background accounts for the proportion of pixels of the difference image of the whole frame difference method, mu 0 Mean gray scale, μ, representing foreground 1 An average gray level representing a background;
s47: according to the maximum segmentation threshold T 1 Carrying out binarization operation on the interpolation image to obtain a bubble pixel point position (i, j);
s5: selecting pixel points corresponding to bubble pixel positions in the original image in the background gray image to replace bubble pixel points in the filtered online ferrographic gray video image; and carrying out great amount of binarization processing on the replaced video image to obtain a binarized ferrographic video image without bubbles.
2. The method for eliminating the bubbles in the online ferrographic video image according to claim 1, wherein the process of obtaining the background gray-scale image and the online ferrographic video gray-scale image comprises:
s21: decomposing an original online ferrographic video image into each frame of image data;
s22: and respectively converting the background image and the original online ferrographic video frame image into gray images by adopting YUV color space and RGB color space conversion formulas to obtain a background gray image and an online ferrographic video gray image.
3. The method according to claim 2, wherein the RGB color space transformation formula is:
R i ′ j =G i ′ j =B i ′ j =0.299R ij +0.587G ij +0.114B ij
wherein R is i ′ j Representing the red channel value, G, of the pixel after graying the image i ′ j Representing the green channel value, B, of the pixel point after graying the image i ′ j The gray scale image processing method comprises the steps of representing a blue channel value of a pixel point after graying the image, representing the position coordinates of the pixel point of the image by i and j, representing a red channel value by R, representing a green channel value by G, and representing a blue channel value by B.
4. The method for eliminating bubbles in online ferrographic video images as claimed in claim 1, wherein the process of step S5 comprises:
s51: replacing the pixel position (i, j) of the bubble in the online ferrographic video image by adopting a corresponding pixel point in the gray background image according to the pixel position of the bubble identified by the filtered online ferrographic gray video image to obtain a replaced online ferrographic video image;
s52: processing the replaced online ferrographic video image by adopting an Otsu binarization method to obtain a binarized image without bubbles;
s53: and reading each frame of the enhanced binarized image subjected to the S52 in batch, namely the online ferrographic video binarized image subjected to bubble elimination.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010855508.5A CN112017109B (en) | 2020-08-24 | 2020-08-24 | Online ferrographic video image bubble elimination method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010855508.5A CN112017109B (en) | 2020-08-24 | 2020-08-24 | Online ferrographic video image bubble elimination method |
Publications (2)
Publication Number | Publication Date |
---|---|
CN112017109A CN112017109A (en) | 2020-12-01 |
CN112017109B true CN112017109B (en) | 2023-03-21 |
Family
ID=73505605
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010855508.5A Active CN112017109B (en) | 2020-08-24 | 2020-08-24 | Online ferrographic video image bubble elimination method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112017109B (en) |
Families Citing this family (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115290697B (en) * | 2022-09-26 | 2022-12-27 | 南通众盈材料科技有限公司 | Polyurethane production abnormity identification method |
CN116660107B (en) * | 2023-04-27 | 2024-04-19 | 北京格谱检测科技有限公司 | Online wear detection anti-bubble interference method and device |
CN116703958B (en) * | 2023-08-03 | 2023-11-17 | 山东仕达思医疗科技有限公司 | Edge contour detection method, system, equipment and storage medium for microscopic image |
Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108389216A (en) * | 2018-02-06 | 2018-08-10 | 西安交通大学 | Local auto-adaptive threshold segmentation method towards on-line ferrograph image wear Particles Recognition |
Family Cites Families (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6156208A (en) * | 1998-05-20 | 2000-12-05 | Institute Guilfoyle | Ferrographic method |
CN104217416B (en) * | 2013-05-31 | 2017-09-15 | 富士通株式会社 | Gray level image processing method and its device |
CN103983543B (en) * | 2014-05-15 | 2017-01-04 | 西安交通大学 | A kind of online image visual ferrum spectrum imaging system |
CN109145689A (en) * | 2017-06-28 | 2019-01-04 | 南京理工大学 | A kind of robot fire detection method |
CN107507221A (en) * | 2017-07-28 | 2017-12-22 | 天津大学 | With reference to frame difference method and the moving object detection and tracking method of mixed Gauss model |
CN109166083B (en) * | 2018-09-03 | 2021-12-24 | 哈尔滨工业大学 | Method for removing bubble noise of underwater image |
CN109612892B (en) * | 2018-12-21 | 2021-07-06 | 内蒙古农业大学 | Online image visual ferrographic abrasive particle concentration anti-saturation quantitative characterization method and device |
-
2020
- 2020-08-24 CN CN202010855508.5A patent/CN112017109B/en active Active
Patent Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108389216A (en) * | 2018-02-06 | 2018-08-10 | 西安交通大学 | Local auto-adaptive threshold segmentation method towards on-line ferrograph image wear Particles Recognition |
Also Published As
Publication number | Publication date |
---|---|
CN112017109A (en) | 2020-12-01 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN112017109B (en) | Online ferrographic video image bubble elimination method | |
CN109507192B (en) | Magnetic core surface defect detection method based on machine vision | |
CN109870461B (en) | Electronic components quality detection system | |
CN106780486B (en) | Steel plate surface defect image extraction method | |
CN111260616A (en) | Insulator crack detection method based on Canny operator two-dimensional threshold segmentation optimization | |
CN111027546B (en) | Character segmentation method, device and computer readable storage medium | |
WO2021109697A1 (en) | Character segmentation method and apparatus, and computer-readable storage medium | |
CN109993797B (en) | Door and window position detection method and device | |
CN115063430B (en) | Electric pipeline crack detection method based on image processing | |
CN109060842B (en) | Citrus surface defect detection method based on surface fitting correction | |
CN115984284A (en) | X-ray hull weld image detection method for ship maintenance | |
CN109241867B (en) | Method and device for recognizing digital rock core image by adopting artificial intelligence algorithm | |
CN111652213A (en) | Ship water gauge reading identification method based on deep learning | |
CN110648330B (en) | Defect detection method for camera glass | |
CN116883408B (en) | Integrating instrument shell defect detection method based on artificial intelligence | |
CN114332081B (en) | Textile surface abnormity determination method based on image processing | |
CN115546232A (en) | Liver ultrasonic image working area extraction method and system and electronic equipment | |
CN112053302A (en) | Denoising method and device for hyperspectral image and storage medium | |
CN115272350A (en) | Method for detecting production quality of computer PCB mainboard | |
CN113436218B (en) | SAR image edge detection method based on Gaussian filtering and mean filtering | |
CN115424107A (en) | Underwater pier apparent disease detection method based on image fusion and deep learning | |
CN115131355A (en) | Intelligent method for detecting abnormality of waterproof cloth by using data of electronic equipment | |
CN110827272B (en) | Tire X-ray image defect detection method based on image processing | |
CN114693543A (en) | Image noise reduction method and device, image processing chip and image acquisition equipment | |
JP4247993B2 (en) | Image inspection apparatus, image inspection method, control program, and readable storage medium |
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 |