CN117173187B - Intelligent valve fault detection system - Google Patents

Intelligent valve fault detection system Download PDF

Info

Publication number
CN117173187B
CN117173187B CN202311453389.0A CN202311453389A CN117173187B CN 117173187 B CN117173187 B CN 117173187B CN 202311453389 A CN202311453389 A CN 202311453389A CN 117173187 B CN117173187 B CN 117173187B
Authority
CN
China
Prior art keywords
pixel point
difference
gray level
gray
value
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
CN202311453389.0A
Other languages
Chinese (zh)
Other versions
CN117173187A (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.)
Nantong Yinhe Water Pump Co ltd
Original Assignee
Nantong Yinhe Water Pump 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 Nantong Yinhe Water Pump Co ltd filed Critical Nantong Yinhe Water Pump Co ltd
Priority to CN202311453389.0A priority Critical patent/CN117173187B/en
Publication of CN117173187A publication Critical patent/CN117173187A/en
Application granted granted Critical
Publication of CN117173187B publication Critical patent/CN117173187B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Image Analysis (AREA)

Abstract

The invention relates to the technical field of valve fault detection, in particular to an intelligent valve fault detection system, which comprises a memory and a processor, wherein the processor executes a computer program stored in the memory so as to realize the following steps: acquiring a gray level image of the valve surface; obtaining the abnormal degree of the pixel point according to the gray value of the pixel point in the valve surface gray image and the gray difference of the pixel point, and further obtaining the suspected abnormal pixel point and the noise degree of the suspected abnormal pixel point; and obtaining the weight of the suspected abnormal pixel point according to the abnormal degree and the noise degree of the suspected abnormal pixel point, adjusting a Sobel operator by using the weight, performing edge detection on the gray level image of the valve surface by using the adjusted Sobel operator to obtain an edge detection result, and obtaining a valve fault detection result according to the edge detection result. The invention can obtain more accurate valve fault detection results.

Description

Intelligent valve fault detection system
Technical Field
The invention relates to the technical field of valve fault detection, in particular to an intelligent valve fault detection system.
Background
A valve is a mechanical device for controlling the flow of a fluid, and is commonly used in the fields of industry, construction, ships, etc. The surface defect of the valve easily affects the service life and performance of the valve, so that the detection of the valve by identifying the defect area on the surface of the valve is important, and the valve equipment failure can be prevented, the service life of the valve can be prolonged, the safety can be improved, the maintenance cost can be reduced, and the like. The effect and accuracy of fault detection can be improved by identifying defective portions of the valve surface through machine vision.
The traditional method is to obtain valve edge information through edge detection, and perform fault detection on the valve based on edge information characteristics of valve surface images. However, noise exists in the acquired image due to objective factors such as environment, noise has a large influence on the extraction of edge information in the image, and the edge detection result is inaccurate, so that the valve fault detection result is inaccurate.
Disclosure of Invention
In order to solve the technical problem that the valve fault detection result is inaccurate, the invention aims to provide an intelligent valve fault detection system, which adopts the following technical scheme:
the invention provides an intelligent detection system for valve faults, which comprises a memory and a processor, wherein the processor executes a computer program stored in the memory so as to realize the following steps:
acquiring a gray level image of the valve surface;
obtaining the abnormal degree of the pixel point in the valve surface gray level image according to the gray level value of the pixel point in the valve surface gray level image and the gray level difference of the pixel point; screening the pixel points according to the abnormality degree to obtain suspected abnormal pixel points;
obtaining the noise degree of the suspected abnormal pixel points according to the gray level distribution condition of the image after the suspected abnormal pixel points are deleted and the missing distribution condition of the suspected abnormal pixel points in the images with different sizes corresponding to the gray level image on the valve surface;
and obtaining the weight of the suspected abnormal pixel point according to the abnormal degree and the noise degree of the suspected abnormal pixel point, adjusting a Sobel operator by using the weight, performing edge detection on the gray level image of the valve surface by using the adjusted Sobel operator to obtain an edge detection result, and obtaining a valve fault detection result according to the edge detection result.
Preferably, the obtaining the degree of abnormality of the pixel point in the valve surface gray level image according to the gray level value of the pixel point in the valve surface gray level image and the gray level difference of the pixel point specifically includes:
marking any pixel point in the valve surface gray level image as a target pixel point, obtaining a first coefficient according to the difference between the gray level value of the target pixel point and the gray level average value of the valve surface gray level image, and obtaining a second coefficient according to the difference between the gray level value of the target pixel point and the gray level value of the pixel point in the neighborhood of the target pixel point; and obtaining the abnormal degree of the target pixel point according to the first coefficient and the second coefficient, wherein the first coefficient and the second coefficient are in positive correlation with the abnormal degree.
Preferably, the first coefficient is specifically obtained according to the difference between the gray value of the target pixel point and the gray average value of the gray image of the valve surface:
and acquiring the average value of the gray values of all the pixel points in the gray image on the surface of the valve, calculating the absolute value of the difference between the gray value of the target pixel point and the average value of the gray values, and taking the ratio between the absolute value of the difference and the maximum gray value as the first coefficient of the target pixel point.
Preferably, the obtaining the second coefficient according to the difference between the gray value of the target pixel point and the gray value of the pixel point in the adjacent domain specifically includes:
acquiring the average value of the absolute value of the difference value of the gray value between the target pixel point and each pixel point in the neighborhood of the target pixel point, marking the average value of the difference value of the target pixel point, and marking the maximum value of the absolute value of the difference value of the gray value between the target pixel point and the pixel point in the neighborhood of the target pixel point as the maximum gray difference of the target pixel point; taking the average value of the difference average values of all pixel points in the gray level image of the valve surface as the characteristic difference; obtaining an absolute value of a difference between the maximum gray level difference and the characteristic difference;
and taking the product of the absolute value of the difference between the difference mean value and the characteristic difference of the target pixel point and the adjusting coefficient as a second coefficient of the target pixel point.
Preferably, the obtaining the noise level of the suspected abnormal pixel point according to the gray level distribution of the image after the suspected abnormal pixel point is missing and the missing distribution of the suspected abnormal pixel point in the images with different sizes corresponding to the gray level image on the valve surface specifically includes:
for any suspected abnormal pixel point in the valve surface gray level image, acquiring gray level values of all pixel points in a row where the suspected abnormal pixel point is located, forming a first gray level sequence, and acquiring gray level values of all pixel points in an adjacent row where the suspected abnormal pixel point is located, forming a second gray level sequence; deleting the gray value of the suspected abnormal pixel point in the first gray sequence to obtain a gray deletion sequence;
obtaining a difference distance between a first gray level sequence and a second gray level sequence to obtain a first difference, obtaining a difference distance between a gray level missing sequence and the second gray level sequence to obtain a second difference, and obtaining a noise characteristic coefficient of a suspected abnormal pixel point in a gray level image of the valve surface according to the difference condition between the first difference and the second difference;
obtaining a third coefficient according to noise characteristic coefficients of the suspected abnormal pixel points in images with different sizes corresponding to the valve surface gray level image; and taking the product of the noise characteristic coefficient and the third coefficient of the suspected abnormal pixel point in the valve surface gray level image as the noise degree of the suspected abnormal pixel point.
Preferably, the noise characteristic coefficient of the suspected abnormal pixel point in the valve surface gray image obtained according to the difference condition between the first difference and the second difference is specifically:
if the first difference is smaller than the second difference, the value of the noise characteristic coefficient of the suspected abnormal pixel point in the valve surface gray image is a first preset value;
if the first difference is greater than or equal to the second difference, taking the difference between the first difference and the second difference as a noise characteristic coefficient of the suspected abnormal pixel point in the gray level image of the valve surface, wherein the value of the noise characteristic coefficient is greater than a first preset value.
Preferably, the obtaining the third coefficient according to the noise characteristic coefficient of the suspected abnormal pixel point in the images with different sizes corresponding to the gray level image on the valve surface specifically includes:
acquiring an image pyramid of the valve surface gray level image, and carrying out interpolation processing on each layer of image in the image pyramid to acquire a characteristic image with the same size as the valve surface gray level image;
and for any suspected abnormal pixel point, respectively acquiring the noise characteristic coefficient of the suspected abnormal pixel point in each characteristic image, calculating the absolute value of the difference between the noise characteristic coefficients of the suspected abnormal pixel point in the characteristic images corresponding to every two adjacent layers of images in the image pyramid to obtain a mutation index, and taking the maximum value of all mutation indexes as a third coefficient.
Preferably, the weight obtaining the suspected abnormal pixel point according to the abnormal degree and the noise degree of the suspected abnormal pixel point is specifically:
and for any suspected abnormal pixel point, obtaining the product of the abnormal degree and the noise degree of the suspected abnormal pixel point, and taking the negative correlation normalized value of the product as the weight of the suspected abnormal pixel.
Preferably, the step of screening the pixel points according to the abnormality degree to obtain suspected abnormal pixel points specifically includes:
and marking the pixel points corresponding to the abnormality degree larger than the preset abnormality threshold as suspected abnormal pixel points.
Preferably, the obtaining the valve fault detection result according to the edge detection result specifically includes:
and marking an area formed by a closed edge in the gray level image of the valve surface as an area to be analyzed, calculating the average value of gray values of pixel points in each area to be analyzed to obtain a first average value of the area to be analyzed, marking the average value of gray values of all the pixel points in the gray level image of the valve surface as a second average value, marking the area to be analyzed corresponding to the first average value being larger than the second average value as a defect area, and when the total area of the defect area is larger than a preset area threshold value, determining that a fault exists as a valve fault detection result.
The embodiment of the invention has at least the following beneficial effects:
according to the method, the gray level image of the valve surface is firstly obtained, gray level values of pixel points in the gray level image of the valve surface and gray level differences of the pixel points are analyzed, gray level characteristics of noise points in the gray level image of the valve surface are considered, the abnormal degree of the pixel points is obtained, the abnormal degree is utilized to represent the possibility of abnormality of the pixel points, and then the pixel points are screened based on the size of the possibility of the pixel points, so that suspected abnormal pixel points are obtained, namely the pixel points are initially screened by utilizing the abnormal degree. Then, further analysis is carried out on the possibility that the suspected abnormal pixel point is a noise point by analyzing the gray level distribution condition of the image after the suspected abnormal pixel point is missing and the missing distribution condition of the suspected abnormal pixel point in images with different sizes corresponding to the gray level image on the surface of the valve, and the influence on the gray level distribution condition in the image after the suspected abnormal pixel point is missing is considered, so that the possibility that the pixel point is the noise point can be accurately represented. Finally, the characteristic indexes of the two aspects of the suspected abnormal pixel points are combined to obtain corresponding weights, and the Sobel operator can be adjusted in a self-adaptive mode by utilizing the weights, so that the edge detection result can be accurate by utilizing the adjusted Sobel operator to carry out edge detection on the gray level image on the valve surface, and further the accurate valve fault detection result can be obtained.
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 performed by a valve failure intelligent detection system according to an embodiment of the present invention.
Detailed Description
In order to further describe the technical means and effects adopted by the invention to achieve the preset aim, the following detailed description refers to specific implementation, structure, characteristics and effects of a valve fault intelligent detection system according to the invention with reference to the accompanying drawings and preferred embodiments. In the following description, different "one embodiment" or "another embodiment" means that the embodiments are not necessarily the same. Furthermore, the particular features, structures, or characteristics of one or more embodiments may be combined in any suitable manner.
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 intelligent valve fault detection system provided by the invention with reference to the accompanying drawings.
The main purpose of the invention is as follows: the gray value difference conditions of pixel points in the gray images on the surfaces of the valves are respectively analyzed, gray distribution conditions of the pixel points which possibly have abnormality after the pixel points are missing in the images under different scales are judged, the possibility that the pixel points which possibly have abnormality are noise points is further obtained, the degree of abnormality of the pixel points and the possibility that the pixel points are noise points are utilized to obtain weights, and then the Sobel operator is adjusted to obtain the adjusted Sobel operator, so that a more accurate gradient method can be obtained, more accurate sub-pixel coordinates can be extracted according to gradient directions, more accurate edge information can be finally obtained, and fault detection is carried out by utilizing the edge information.
The invention provides an intelligent detection system for valve faults, which is used for realizing the steps shown in figure 1, and comprises the following specific steps:
step one, acquiring a gray level image of the valve surface.
The valve surface image is acquired through the camera, and the valve surface image is subjected to graying treatment to obtain a gray image, and the gray image comprises a background part, so that in the embodiment, the background part in the gray image is removed by adopting a semantic segmentation method to obtain the valve surface gray image.
The semantic segmentation network adopts a DNN network, and the related content of the semantic segmentation network comprises: the data set is a gray image corresponding to the surfaces of the valves; the labels are of two types, namely a valve surface part and a background part, the labeling process is pixel-level classification, all pixel points in the gray image are required to be marked with corresponding labels, the pixel points belonging to the valve surface part are marked with 1, and the pixel points belonging to the background part are marked with 0; the loss function used by the network is a cross entropy loss function.
And processing the acquired gray level image corresponding to the valve surface by using a semantic segmentation network model which is trained, so as to obtain the gray level image of the valve surface.
Step two, obtaining the abnormal degree of the pixel point in the valve surface gray level image according to the gray level value of the pixel point in the valve surface gray level image and the gray level difference of the pixel point; and screening the pixel points according to the abnormality degree to obtain suspected abnormal pixel points.
The normal texture information exists on the valve surface, and a defect part may exist, and because a certain noise point exists in the collected valve surface gray level image due to objective factors such as environment and the like, the accuracy of extracting gradient information in the valve surface gray level image may be affected, so that the gray level of a pixel point in the valve surface gray level image and the gray level difference of the pixel point need to be analyzed.
The valve surface without faults is smooth, the gray level distribution in the gray level image of the corresponding valve surface is uniform, the gray level value of the pixel points with defects is large, the distribution is concentrated, the distribution of the noise points is discrete, and therefore the abnormal condition of the pixel points can be analyzed by combining the self gray level distribution condition of the pixel points and the gray level value of the pixel points.
Based on the first coefficient, marking any pixel point in the valve surface gray level image as a target pixel point, obtaining a first coefficient according to the difference between the gray level value of the target pixel point and the gray level average value of the valve surface gray level image, and obtaining a second coefficient according to the difference between the gray level value of the target pixel point and the gray level value of the pixel point in the neighborhood of the target pixel point; and obtaining the abnormal degree of the target pixel point according to the first coefficient and the second coefficient, wherein the first coefficient and the second coefficient are in positive correlation with the abnormal degree.
The method comprises the steps of obtaining the average value of gray values of all pixel points in a gray image of the valve surface, calculating the absolute value of the difference between the gray value of a target pixel point and the average value of the gray values, and taking the ratio of the absolute value of the difference to the maximum gray value as a first coefficient of the target pixel point. Acquiring the average value of the absolute value of the difference value of the gray value between the target pixel point and each pixel point in the neighborhood of the target pixel point, marking the average value of the difference value of the target pixel point, and marking the maximum value of the absolute value of the difference value of the gray value between the target pixel point and the pixel point in the neighborhood of the target pixel point as the maximum gray difference of the target pixel point; taking the average value of the difference average values of all pixel points in the gray level image of the valve surface as the characteristic difference; obtaining an absolute value of a difference between the maximum gray level difference and the characteristic difference; and taking the product of the absolute value of the difference between the difference mean value and the characteristic difference of the target pixel point and the adjusting coefficient as a second coefficient of the target pixel point.
In this embodiment, taking the ith pixel point in the valve surface gray scale image as the target pixel point, the calculation formula of the second coefficient of the target pixel point may be expressed as:
wherein,second coefficient representing the ith pixel,/->Representing the maximum gray scale difference of the ith pixel point,/->Characteristic differences of gray images representing valve surfaces, +.>Gray value representing the i-th pixel, is->Gray value representing the z-th pixel in the neighborhood of the i-th pixel,/and gray value representing the z-th pixel in the neighborhood of the i-th pixel>Representing the total number of pixels contained within the neighborhood of the ith pixel.
The difference of gray values between the ith pixel point and the pixels in the neighborhood of the ith pixel point is represented, and the larger the difference of gray values is, the larger the gray value is, which indicates that the gray difference between the ith pixel point and the pixels in the neighborhood of the ith pixel point is larger, and the ++is>The difference mean value of the ith pixel point is represented, and the balance condition of gray scale difference between the pixel point and the pixel points in the neighborhood of the ith pixel point is reflected.
Feature differencesThe balance condition of gray level differences between all pixel points in the gray level image of the valve surface and the pixel points in the corresponding neighborhood is represented, the gray level difference distribution condition of the pixel points is reflected on the whole, and the gray level difference distribution condition is represented by +>The larger the difference value of the difference mean value of the target pixel point and the characteristic difference is, the description of the gray level change around the target pixel point and the whole gray level image of the valve surface isThe larger the difference is, the more uneven the gray distribution around the target pixel point is, and the larger the corresponding value of the second coefficient is.
For the adjustment coefficient, the larger the value is, the larger the difference between the maximum gray level change condition around the target pixel point and the whole image is, the adjustment coefficient is used for adjusting the difference condition between the difference mean value and the characteristic difference of the target pixel point, the larger the difference between the maximum gray level difference and the characteristic difference in the neighborhood range of the target pixel point is, and the more uneven the surrounding gray level distribution condition of the corresponding target pixel point is. The second coefficient represents the gray level distribution uniformity around the target pixel point, and the larger the value of the second coefficient is, the more uneven the gray level distribution around the pixel point is.
By analyzing the gray level difference of the pixel points, the gray level distribution uniformity degree around the pixel points is obtained, and further, the abnormal condition of the pixel points needs to be further analyzed by combining the gray level values of the pixel points, and then the calculation formula of the abnormal degree of the target pixel points can be expressed as follows:
wherein,the degree of abnormality of the ith pixel point is represented, namely the degree of abnormality of the target pixel point; />Gray value representing the i-th pixel, is->The average value of gray values of all pixel points in the gray image of the valve surface is represented, the maximum gray value is 255,a second coefficient representing the i-th pixel,epsilon is a super parameter, the value in this embodiment is 0.01, exp () represents an exponential function based on a natural constant e, in order to prevent the denominator from being 0, < + >>Representing that the second coefficient is subjected to positive correlation normalization processing, and an implementer can also set according to a specific implementation scene.
The first coefficient reflects the difference between the gray value of the pixel point and the whole gray average value of the gray image of the valve surface, and the gray average value of the whole image can represent the more normal condition because of the more normal pixel points in the gray image of the valve surface. When the value of the first coefficient is larger, the larger the deviation degree between the gray value of the pixel point and the whole image is, the larger the possibility of abnormality of the pixel point is, and the larger the corresponding abnormality degree value is. The larger the value of the second coefficient is, the more uneven the gray distribution around the pixel point is, the greater the possibility that the pixel point has abnormality is, and the greater the value of the corresponding abnormality degree is.
The degree of abnormality of the pixel points represents the possibility of abnormality of the pixel points, and the larger the value of the degree of abnormality is, the larger the possibility of abnormality of the corresponding pixel points is, the smaller the value of the degree of abnormality is, and the smaller the possibility of abnormality of the corresponding pixel points is. Based on the above, the pixel points can be screened according to the degree of abnormality to obtain suspected abnormal pixel points.
Specifically, a pixel point corresponding to an abnormality degree greater than a preset abnormality threshold is recorded as a suspected abnormality pixel point. In this embodiment, the value of the anomaly threshold is 0.75, and the implementer can set according to the specific implementation scenario. When the degree of abnormality of the pixel point is greater than 0.75, it is indicated that the pixel point has a high possibility of abnormality, so that the pixel point is further analyzed as a suspected abnormal pixel point. When the degree of abnormality of the pixel points is less than or equal to 0.75, it is indicated that the pixel points are less likely to have abnormality, and such pixel points are regarded as normal pixel points.
And thirdly, obtaining the noise degree of the suspected abnormal pixel point according to the image gray level distribution condition of the suspected abnormal pixel point after the suspected abnormal pixel point is deleted and the missing distribution condition of the suspected abnormal pixel point in images with different sizes corresponding to the valve surface gray level image.
After the suspected abnormal pixel points are screened out, the probability that the pixel points are noise points is further obtained for the distribution regularity of the suspected abnormal pixel points and the disappearance condition of the pixel points under images with different scales. The position distribution of noise points is random and irregular, and the distribution of normal texture pixel points in the gray level image of the valve surface is regular. However, the distribution condition of noise points and texture pixel points in a local range cannot be accurately judged, and when the filter is used for denoising, normal texture information can be removed, so that detail textures of an image are lost.
Based on this, the probability that the pixel point is a noise point can be determined according to the vanishing condition of the pixel point in the image, and the probability that the pixel point with the worse vanishing condition is the noise point is higher.
Specifically, for any one suspected abnormal pixel point in the gray level image of the valve surface, gray level values of all pixel points in a row where the suspected abnormal pixel point is located are obtained to form a first gray level sequence, and gray level values of all pixel points in an adjacent row where the suspected abnormal pixel point is located are obtained to form a second gray level sequence. For example, for the nth suspected abnormal pixel point, the x row of the nth suspected abnormal pixel point in the valve surface gray image is obtained, then the x+1th row is adjacent to the x row, gray values of all pixel points in the x row form a first gray sequence, and gray values of all pixel points in the x+1th row form a second gray sequence.
Deleting the gray value of the suspected abnormal pixel point in the first gray sequence to obtain a gray deletion sequence; obtaining a difference distance between the first gray level sequence and the second gray level sequence to obtain a first difference, obtaining a difference distance between the gray level missing sequence and the second gray level sequence to obtain a second difference, and obtaining a noise characteristic coefficient of the suspected abnormal pixel point in the gray level image of the valve surface according to the difference condition between the first difference and the second difference.
In this embodiment, the DTW distance between the first gray scale sequence and the second gray scale sequence is taken as the difference distance, and the first difference is obtained. And taking the DTW distance between the gray level missing sequence and the second gray level sequence as a difference distance to obtain a second difference. The first difference reflects the similarity of pixel distribution around the suspected abnormal pixel points in the valve surface gray level image before the suspected abnormal pixel points are not deleted, and the second difference reflects the similarity of pixel distribution in the valve surface gray level image after the suspected abnormal pixel points are deleted.
If the first difference is smaller than the second difference, the difference of gray distribution of adjacent lines in the gray image of the valve surface becomes smaller after the suspected abnormal pixel point is missing, namely the missing of the suspected abnormal pixel point makes the gray distribution in the gray image of the valve surface more uniform, and further the probability that the suspected abnormal pixel point is a noise point is smaller, the value of the noise characteristic coefficient of the suspected abnormal pixel point in the gray image of the valve surface is a first preset value. In this embodiment, the value of the first preset value is 0.01, that is, the value of the first preset value should be set to be a very small positive number, and the practitioner can set according to the specific implementation scenario.
If the first difference is greater than or equal to the second difference, the difference of the gray distribution of the adjacent lines in the gray image of the valve surface becomes larger after the suspected abnormal pixel point is missing, namely the gray distribution in the gray image of the valve surface is larger due to the fact that the suspected abnormal pixel point is missing, and further the probability that the suspected abnormal pixel point is a noise point is larger. And taking the difference between the first difference and the second difference as a noise characteristic coefficient of the suspected abnormal pixel point in the valve surface gray level image, wherein the value of the noise characteristic coefficient is larger than a first preset value. The noise characteristic coefficient represents the influence degree of the missing condition of the suspected abnormal pixel points on the gray distribution condition in the gray image of the valve surface. The smaller the value, the smaller the influence degree, the larger the value, and the larger the influence degree.
Furthermore, the influence accuracy of the missing condition of the suspected abnormal pixel points in the gray level image on the surface of the valve on the gray level distribution in the image is not high, so that the accuracy of judging the noise points is improved by comprehensively analyzing the images under different scales in the embodiment of the invention.
And obtaining a third coefficient according to noise characteristic coefficients of the suspected abnormal pixel points in images with different sizes corresponding to the valve surface gray level image, and specifically, obtaining an image pyramid of the valve surface gray level image. The method for obtaining the image pyramid is a well-known technique, and will not be described herein too much.
In this embodiment, the valve surface gray level image is taken as the bottom layer image, downsampling is performed to obtain an image pyramid, the resolution of each layer of image in the image pyramid is different, and the image pyramid is different in image scale, so that in order to analyze noise characteristic coefficients of suspected abnormal pixel points in images with different scales later, each layer of image in the image pyramid needs to be subjected to scale transformation, so that the size of each layer of image is the same as that of the valve surface gray level image. The interpolation processing is performed on each layer of image in the image pyramid to obtain a characteristic image with the same size as the gray level image of the valve surface, and the interpolation processing is a known technique, which is not described herein too much.
For any one suspected abnormal pixel point, respectively acquiring a noise characteristic coefficient of the suspected abnormal pixel point in each characteristic image, specifically, for any one characteristic image, acquiring a pixel point of the suspected abnormal pixel point at a corresponding position on the characteristic image as a matched pixel point, and acquiring the noise characteristic coefficient of the matched pixel point on the characteristic image according to an acquiring method of the noise characteristic coefficient of the suspected abnormal pixel point, so that the noise characteristic coefficient of the matched pixel point on the characteristic image can be also called as the noise characteristic coefficient of the corresponding suspected abnormal pixel point on the characteristic image.
And calculating the absolute value of the difference between noise characteristic coefficients of the suspected abnormal pixel points in the characteristic images corresponding to every two adjacent layers of images in the image pyramid to obtain mutation indexes, and taking the maximum value of all mutation indexes as a third coefficient. For example, in the image pyramid, calculating a mutation index of the absolute value of the difference between noise characteristic coefficients of the suspected abnormal pixel points on the characteristic image corresponding to the t layer image and the characteristic image corresponding to the t+1 layer image, wherein the mutation index reflects the influence degree change condition of the suspected abnormal pixel point missing condition on the image gray distribution in two adjacent layers of images in the image pyramid, and the larger the value of the mutation index is, the larger the influence degree change is, so that the maximum value of all the mutation indexes is used as a third coefficient, and the mutation influence degree of the suspected abnormal pixel point missing condition on the image gray distribution is represented by using the third coefficient.
And finally, combining the influence degree of the suspected abnormal pixel points in the original valve surface gray level image and the mutation influence degree obtained based on the images under different scales to obtain the possibility that the suspected abnormal pixel points are noise. And taking the product of the noise characteristic coefficient and the third coefficient of the suspected abnormal pixel point in the valve surface gray level image as the noise degree of the suspected abnormal pixel point.
The larger the value of the noise characteristic coefficient of the suspected abnormal pixel point in the valve surface gray image is, the larger the influence degree of the suspected abnormal pixel point on the gray distribution condition of the valve surface gray image after the suspected abnormal pixel point is missing is, the larger the value of the third coefficient is, the larger the mutation influence degree of the suspected abnormal pixel point in different scale images is, the larger the corresponding noise degree is, and the suspected abnormal pixel point is more likely to be a noise point.
And step four, obtaining the weight of the suspected abnormal pixel point according to the abnormal degree and the noise degree of the suspected abnormal pixel point, adjusting a Sobel operator by using the weight, carrying out edge detection on the gray level image of the valve surface by using the adjusted Sobel operator to obtain an edge detection result, and obtaining a valve fault detection result according to the edge detection result.
Because noise points exist in the window for acquiring the gradient information of the pixel points, the gradient information calculation of the whole window is inaccurate, and the result of edge detection on the gray level image of the valve surface is inaccurate, so that the weight of the pixel points in the window when the gradient information calculation is performed can be adjusted based on the possibility that the pixel points in the gray level image of the valve surface are noise points.
Obtaining weights of the suspected abnormal pixels according to the abnormal degrees and the noise degrees of the suspected abnormal pixels, specifically, for any one suspected abnormal pixel, obtaining a product of the abnormal degrees and the noise degrees of the suspected abnormal pixels, taking a negative correlation normalized value of the product as the weight of the suspected abnormal pixel, wherein a calculation formula of the weights of the suspected abnormal pixels can be expressed as follows:
wherein,weight value representing kth suspected abnormal pixel point,/->Indicating the degree of abnormality of the kth suspected abnormal pixel,/->Representing the noise level of the kth suspected abnormal pixel, norm () represents the normalization function, and in this embodiment, maximum minimum normalization is employed.
The greater the value of the abnormality degree of the suspected abnormal pixel point, the greater the value of the noise degree, which indicates that the greater the possibility that the suspected abnormal pixel point is a noise point, the smaller the corresponding weight value. And further, the weight of each suspected abnormal pixel point is obtained, the Sobel operator is adjusted by using the weight, namely, when the gradient information of each pixel point in the valve surface gray level image is obtained by using the Sobel operator, each pixel point corresponds to one weight, the convolution factors in the Sobel operator are weighted by using the weight, the adjusted Sobel convolution factors are obtained, and then the edge information of each pixel point in the valve surface gray level image is obtained by using the adjusted Sobel operator.
In the above step, only the suspicious abnormal pixel points are analyzed to obtain the weight corresponding to each suspicious abnormal pixel point, and the normal pixel points in the gray level image on the valve surface do not need to be subjected to redundant processing, so in the embodiment, the value of the weight corresponding to the normal pixel points is set to be 1.
The adjusted Sobel operator can be used for obtaining accurate edge information of each pixel point in the valve surface gray level image, and then the edge in the valve surface gray level image is obtained by using an edge detection algorithm based on the edge information of the pixel points, so that an edge detection result of the valve surface gray level image is obtained. In this embodiment, a canny edge detection algorithm is adopted to obtain an edge detection result corresponding to the gray level image of the valve surface according to the edge information of the pixel point.
And finally, obtaining a more accurate valve surface fault detection result according to the edge detection result. Specifically, based on the rough edge obtained by the canny edge detection algorithm, further accurate edge information is obtained by utilizing a sub-pixel contour extraction algorithm, the sub-pixel contour extraction algorithm is a known technology, and is not described too much, then an area formed by a closed edge in the gray level image of the valve surface is recorded as an area to be analyzed, the average value of gray values of pixel points in each area to be analyzed is calculated to obtain a first average value of the area to be analyzed, and the average value of gray values of all pixel points in the gray level image of the valve surface is recorded as a second average value. And marking the region to be analyzed corresponding to the first average value being larger than the second average value as a defect region, and when the total area of the defect region is larger than a preset area threshold value, detecting the valve fault as a fault. And when the defect area does not exist or the total area of the defect area is smaller than or equal to a preset area threshold value, the fault detection result of the valve is normal operation. The value of the area threshold is 30% of the total area of the gray level image of the valve surface, and the implementer can set according to the specific implementation scene.
In summary, since the traditional edge extraction algorithm is easily affected by noise, and the sub-pixel coordinate positioning is inaccurate, the gray value of the pixel point in the valve surface gray image and the gray difference of the pixel point are analyzed, the gray characteristics of the noise point in the valve surface gray image are considered, the possibility that the pixel point is abnormal is represented by using the abnormality degree, and then the pixel point is screened based on the possibility that the pixel point is present, namely, the pixel point is primarily screened by using the abnormality degree. And then, further analyzing the possibility that the suspected abnormal pixel points are noise points, and considering the influence on the gray distribution condition in the image after the suspected abnormal pixel points are missing. Finally, combining the characteristic indexes of the suspected abnormal pixel points to obtain corresponding weight values, and adjusting the Sobel operator in a self-adaptive manner by using the weight values, so that the edge detection result can be accurate by using the adjusted Sobel operator to carry out edge detection on the gray level image of the valve surface. The accuracy of valve defect identification is improved, the accuracy of valve equipment fault detection can be reduced, so that the follow-up related work can analyze fault reasons of the valve and can repair or replace the valve in time in a targeted manner, the safety is improved, and the maintenance cost is reduced.
The above embodiments are only for illustrating the technical solution of the present application, and are not limiting; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the scope of the embodiments of the present application, and are intended to be included within the scope of the present application.

Claims (10)

1. An intelligent valve fault detection system comprising a memory and a processor, wherein the processor executes a computer program stored in the memory to implement the steps of:
acquiring a gray level image of the valve surface;
obtaining the abnormal degree of the pixel point in the valve surface gray level image according to the gray level value of the pixel point in the valve surface gray level image and the gray level difference of the pixel point; screening the pixel points according to the abnormality degree to obtain suspected abnormal pixel points;
obtaining the noise degree of the suspected abnormal pixel points according to the gray level distribution condition of the image after the suspected abnormal pixel points are deleted and the missing distribution condition of the suspected abnormal pixel points in the images with different sizes corresponding to the gray level image on the valve surface;
and obtaining the weight of the suspected abnormal pixel point according to the abnormal degree and the noise degree of the suspected abnormal pixel point, adjusting a Sobel operator by using the weight, performing edge detection on the gray level image of the valve surface by using the adjusted Sobel operator to obtain an edge detection result, and obtaining a valve fault detection result according to the edge detection result.
2. The intelligent detection system for valve failure according to claim 1, wherein the obtaining the degree of abnormality of the pixel point in the gray level image of the valve surface according to the gray level value of the pixel point in the gray level image of the valve surface and the gray level difference of the pixel point specifically comprises:
marking any pixel point in the valve surface gray level image as a target pixel point, obtaining a first coefficient according to the difference between the gray level value of the target pixel point and the gray level average value of the valve surface gray level image, and obtaining a second coefficient according to the difference between the gray level value of the target pixel point and the gray level value of the pixel point in the neighborhood of the target pixel point; and obtaining the abnormal degree of the target pixel point according to the first coefficient and the second coefficient, wherein the first coefficient and the second coefficient are in positive correlation with the abnormal degree.
3. The intelligent valve fault detection system according to claim 2, wherein the first coefficient is specifically obtained according to a difference between a gray value of the target pixel point and a gray average value of the gray image of the valve surface:
and acquiring the average value of the gray values of all the pixel points in the gray image on the surface of the valve, calculating the absolute value of the difference between the gray value of the target pixel point and the average value of the gray values, and taking the ratio between the absolute value of the difference and the maximum gray value as the first coefficient of the target pixel point.
4. The intelligent detection system for valve failure according to claim 2, wherein the second coefficient is specifically obtained according to a difference between a gray value of the target pixel and a gray value of a pixel in a neighborhood of the target pixel:
acquiring the average value of the absolute value of the difference value of the gray value between the target pixel point and each pixel point in the neighborhood of the target pixel point, marking the average value of the difference value of the target pixel point, and marking the maximum value of the absolute value of the difference value of the gray value between the target pixel point and the pixel point in the neighborhood of the target pixel point as the maximum gray difference of the target pixel point; taking the average value of the difference average values of all pixel points in the gray level image of the valve surface as the characteristic difference; obtaining an absolute value of a difference between the maximum gray level difference and the characteristic difference;
and taking the product of the absolute value of the difference between the difference mean value and the characteristic difference of the target pixel point and the adjusting coefficient as a second coefficient of the target pixel point.
5. The intelligent detection system for valve failure according to claim 1, wherein the obtaining the noise level of the suspected abnormal pixel according to the gray level distribution of the image after the suspected abnormal pixel is missing and the missing distribution of the suspected abnormal pixel in the images with different sizes corresponding to the gray level image on the valve surface specifically comprises:
for any suspected abnormal pixel point in the valve surface gray level image, acquiring gray level values of all pixel points in a row where the suspected abnormal pixel point is located, forming a first gray level sequence, and acquiring gray level values of all pixel points in an adjacent row where the suspected abnormal pixel point is located, forming a second gray level sequence; deleting the gray value of the suspected abnormal pixel point in the first gray sequence to obtain a gray deletion sequence;
obtaining a difference distance between a first gray level sequence and a second gray level sequence to obtain a first difference, obtaining a difference distance between a gray level missing sequence and the second gray level sequence to obtain a second difference, and obtaining a noise characteristic coefficient of a suspected abnormal pixel point in a gray level image of the valve surface according to the difference condition between the first difference and the second difference;
obtaining a third coefficient according to noise characteristic coefficients of the suspected abnormal pixel points in images with different sizes corresponding to the valve surface gray level image; and taking the product of the noise characteristic coefficient and the third coefficient of the suspected abnormal pixel point in the valve surface gray level image as the noise degree of the suspected abnormal pixel point.
6. The intelligent detection system for valve failure according to claim 5, wherein the noise characteristic coefficient of the suspected abnormal pixel point in the gray image of the valve surface obtained according to the difference condition between the first difference and the second difference is specifically:
if the first difference is smaller than the second difference, the value of the noise characteristic coefficient of the suspected abnormal pixel point in the valve surface gray image is a first preset value;
if the first difference is greater than or equal to the second difference, taking the difference between the first difference and the second difference as a noise characteristic coefficient of the suspected abnormal pixel point in the gray level image of the valve surface, wherein the value of the noise characteristic coefficient is greater than a first preset value.
7. The intelligent valve fault detection system according to claim 5, wherein the third coefficient is specifically obtained according to noise characteristic coefficients of suspected abnormal pixels in images with different sizes corresponding to the gray level image of the valve surface:
acquiring an image pyramid of the valve surface gray level image, and carrying out interpolation processing on each layer of image in the image pyramid to acquire a characteristic image with the same size as the valve surface gray level image;
and for any suspected abnormal pixel point, respectively acquiring the noise characteristic coefficient of the suspected abnormal pixel point in each characteristic image, calculating the absolute value of the difference between the noise characteristic coefficients of the suspected abnormal pixel point in the characteristic images corresponding to every two adjacent layers of images in the image pyramid to obtain a mutation index, and taking the maximum value of all mutation indexes as a third coefficient.
8. The intelligent detection system for valve failure according to claim 1, wherein the weight for obtaining the suspected abnormal pixel according to the abnormality degree and the noise degree of the suspected abnormal pixel is specifically:
and for any suspected abnormal pixel point, obtaining the product of the abnormal degree and the noise degree of the suspected abnormal pixel point, and taking the negative correlation normalized value of the product as the weight of the suspected abnormal pixel.
9. The intelligent detection system for valve failure according to claim 1, wherein the screening of the pixel points according to the degree of abnormality to obtain the suspected abnormal pixel points specifically comprises:
and marking the pixel points corresponding to the abnormality degree larger than the preset abnormality threshold as suspected abnormal pixel points.
10. The intelligent valve failure detection system according to claim 1, wherein the obtaining the valve failure detection result according to the edge detection result specifically comprises:
and marking an area formed by a closed edge in the gray level image of the valve surface as an area to be analyzed, calculating the average value of gray values of pixel points in each area to be analyzed to obtain a first average value of the area to be analyzed, marking the average value of gray values of all the pixel points in the gray level image of the valve surface as a second average value, marking the area to be analyzed corresponding to the first average value being larger than the second average value as a defect area, and when the total area of the defect area is larger than a preset area threshold value, determining that a fault exists as a valve fault detection result.
CN202311453389.0A 2023-11-03 2023-11-03 Intelligent valve fault detection system Active CN117173187B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311453389.0A CN117173187B (en) 2023-11-03 2023-11-03 Intelligent valve fault detection system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311453389.0A CN117173187B (en) 2023-11-03 2023-11-03 Intelligent valve fault detection system

Publications (2)

Publication Number Publication Date
CN117173187A CN117173187A (en) 2023-12-05
CN117173187B true CN117173187B (en) 2024-03-05

Family

ID=88939920

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311453389.0A Active CN117173187B (en) 2023-11-03 2023-11-03 Intelligent valve fault detection system

Country Status (1)

Country Link
CN (1) CN117173187B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117437129B (en) * 2023-12-18 2024-03-08 山东心传矿山机电设备有限公司 Mining intelligent water pump impeller fault image detail enhancement method
CN117557573B (en) * 2024-01-12 2024-04-26 群亿光电(深圳)有限公司 OCA film bubble detection method based on computer vision
CN117911792B (en) * 2024-03-15 2024-06-04 垣矽技术(青岛)有限公司 Pin detecting system for voltage reference source chip production

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113284158A (en) * 2021-06-08 2021-08-20 中国科学院软件研究所 Image edge extraction method and system based on structural constraint clustering
CN115082482A (en) * 2022-08-23 2022-09-20 山东优奭趸泵业科技有限公司 Metal surface defect detection method
CN115330795A (en) * 2022-10-13 2022-11-11 南通迅鹰纺织品有限公司 Cloth burr defect detection method
CN116309510A (en) * 2023-03-29 2023-06-23 清华大学 Numerical control machining surface defect positioning method and device
CN116703931A (en) * 2023-08-09 2023-09-05 山东津庭名企建材有限公司 Surface silver vein detection method for building high polymer material

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113284158A (en) * 2021-06-08 2021-08-20 中国科学院软件研究所 Image edge extraction method and system based on structural constraint clustering
CN115082482A (en) * 2022-08-23 2022-09-20 山东优奭趸泵业科技有限公司 Metal surface defect detection method
CN115330795A (en) * 2022-10-13 2022-11-11 南通迅鹰纺织品有限公司 Cloth burr defect detection method
CN116309510A (en) * 2023-03-29 2023-06-23 清华大学 Numerical control machining surface defect positioning method and device
CN116703931A (en) * 2023-08-09 2023-09-05 山东津庭名企建材有限公司 Surface silver vein detection method for building high polymer material

Also Published As

Publication number Publication date
CN117173187A (en) 2023-12-05

Similar Documents

Publication Publication Date Title
CN117173187B (en) Intelligent valve fault detection system
CN113689428B (en) Mechanical part stress corrosion detection method and system based on image processing
CN114937055B (en) Image self-adaptive segmentation method and system based on artificial intelligence
CN111383209B (en) Unsupervised flaw detection method based on full convolution self-encoder network
CN110148130B (en) Method and device for detecting part defects
US11847775B2 (en) Automated machine vision-based defect detection
CN116758491B (en) Printing monitoring image analysis method and system applied to 3D printing
CN116485779B (en) Adaptive wafer defect detection method and device, electronic equipment and storage medium
CN115471503B (en) Equipment abnormity detection method for numerical control ingot splitting machine
CN116228780B (en) Silicon wafer defect detection method and system based on computer vision
CN116152242B (en) Visual detection system of natural leather defect for basketball
CN116883408B (en) Integrating instrument shell defect detection method based on artificial intelligence
CN116012291A (en) Industrial part image defect detection method and system, electronic equipment and storage medium
CN117237747B (en) Hardware defect classification and identification method based on artificial intelligence
CN112396580B (en) Method for detecting defects of round part
CN115797314A (en) Part surface defect detection method, system, equipment and storage medium
CN110751623A (en) Joint feature-based defect detection method, device, equipment and storage medium
Elanangai et al. Automated system for defect identification and character recognition using IR images of SS-plates
CN117078679B (en) Automatic assembly line production detection method for cooling fan based on machine vision
CN118037722B (en) Copper pipe production defect detection method and system
CN117218130B (en) Image dimension reduction acquisition method and system for positioning iron element segregation defect
CN116894841B (en) Visual detection method for quality of alloy shell of gearbox
CN116168020B (en) Leather defect detection method
Dai et al. Anomaly detection and segmentation based on defect repaired image resynthesis
CN116563281A (en) Hardware quality detection method and device, computer equipment and 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