CN115830022B - Filter screen defect detection method based on machine vision - Google Patents

Filter screen defect detection method based on machine vision Download PDF

Info

Publication number
CN115830022B
CN115830022B CN202310113988.1A CN202310113988A CN115830022B CN 115830022 B CN115830022 B CN 115830022B CN 202310113988 A CN202310113988 A CN 202310113988A CN 115830022 B CN115830022 B CN 115830022B
Authority
CN
China
Prior art keywords
filter hole
domain
communicating
filter
gray
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
CN202310113988.1A
Other languages
Chinese (zh)
Other versions
CN115830022A (en
Inventor
马广圣
马广含
宋词
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shandong Liangshan Distillery Co ltd
Original Assignee
Shandong Liangshan Distillery Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shandong Liangshan Distillery Co ltd filed Critical Shandong Liangshan Distillery Co ltd
Priority to CN202310113988.1A priority Critical patent/CN115830022B/en
Publication of CN115830022A publication Critical patent/CN115830022A/en
Application granted granted Critical
Publication of CN115830022B publication Critical patent/CN115830022B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/30Computing systems specially adapted for manufacturing

Abstract

The invention relates to the technical field of data processing, in particular to a filter screen defect detection method based on machine vision, which comprises the steps of obtaining a gray image corresponding to a surface image of a filter screen, and carrying out clustering iteration on pixel points in the gray image at least twice; in each clustering iteration, obtaining corresponding filter hole communicating domains under filter hole clusters, respectively obtaining adjacent filter hole communicating domains of each filter hole communicating domain, and calculating superposition influence factors corresponding to corresponding interval regions according to gray information of interval regions between the filter hole communicating domains and the corresponding adjacent filter hole communicating domains; correcting the membership degree of each pixel point in the interval region according to the superposition influence factors to obtain a new membership degree so as to divide the gray level image into a background region and a filter hole region; and detecting defects of the filter screen according to the aperture size of each filter hole area. The invention improves the integrity and accuracy of the segmentation of the background area and the filter hole area, so that the defect detection result of the filter screen is more accurate.

Description

Filter screen defect detection method based on machine vision
Technical Field
The invention relates to the technical field of data processing, in particular to a filter screen defect detection method of a filter based on machine vision.
Background
In the process of producing white spirit, because impurity is separated out from the miscellaneous alcohol in the white spirit, the filtering is needed in the final step of production, so that the produced white spirit meets the standard. The filter of the production line is used for filtering white spirit by a polyethersulfone filter screen. The polyethersulfone filter screen has long service life and minimum reachable filter holes
Figure SMS_1
In the using process, the aperture of the surface layer filter hole of the polyethersulfone filter screen needs to be detected by using a scanning electron microscope at intervals.
The detection of the pore diameter of the surface layer filter pore of the polyethersulfone filter screen requires that the surface image of the polyethersulfone filter screen is firstly acquired, then the surface image is segmented to segment the filter pore region, and finally the segmented filter pore region is identified to correspond to the pore diameter of the filter pore. Because the scanning electron microscope can generate a lot of noise on the imaging of the polyethersulfone filter screen and the detailed texture information of the filter holes needs to be extracted, the prior FCM clustering method (FRFCM) based on morphological reconstruction and membership filtering is generally used for dividing the surface image of the polyethersulfone filter screen to obtain the surface layer filter holes.
However, the surface layer filter holes of the polyethersulfone filter screen can possibly appear in the lower layer filter holes, and in the process of detecting the aperture, if the surface layer filter holes cannot be completely extracted, the error judgment of the aperture size can be caused, and the traditional FRFCM clustering method clusters the gray level, so that the filter holes cannot be accurately segmented under the condition of overlapping the filter holes, and the accurate segmentation of the filter holes cannot be assisted by membership filtering in the traditional FRFCM clustering.
Disclosure of Invention
In order to solve the problem that the traditional FRFCM clustering method cannot accurately segment the filter hole area under the condition of filter hole superposition, the invention aims to provide a filter screen defect detection method of a filter based on machine vision, and the adopted technical scheme is as follows:
the embodiment of the invention provides a filter screen defect detection method based on machine vision,
collecting surface images of a filter screen to obtain corresponding gray images, and carrying out clustering iteration on pixel points at least twice according to the distance between the pixel points in the gray images to obtain filter hole clusters under each clustering iteration;
in each clustering iteration, obtaining corresponding filter hole communicating domains under the filter hole clusters, respectively obtaining adjacent filter hole communicating domains of each filter hole communicating domain according to the distance between the centroids of the filter hole communicating domains, and calculating superposition influence factors corresponding to the corresponding interval regions according to the gray information of the interval regions between the filter hole communicating domains and the corresponding adjacent filter hole communicating domains; correcting the membership degree of each pixel point in the interval region according to the superposition influence factors to obtain a new membership degree, and dividing the gray image into a background region and a filter hole region based on the new membership degree;
and detecting defects of the filter screen according to the aperture size of each filter hole area.
Further, the method for acquiring the superposition influence factor includes:
any one filter hole communicating domain is taken as a target communicating domain, any one adjacent filter hole communicating domain of the target communicating domain is taken as a first communicating domain, the mass center of the target communicating domain is connected with each edge point on the edge of the first communicating domain, at least two straight lines are obtained, an included angle between any two straight lines is obtained, two straight lines corresponding to the maximum included angle, the mass center of the target communicating domain and the first communicating domain form a new communicating domain, and a region except the first communicating domain in the new communicating domain is taken as a spacing region between the target communicating domain and the first communicating domain;
calculating the Euclidean distance between the centroid of the target connected domain and the centroid of the first connected domain;
calculating an average gray value of the interval region as a first value, calculating an average gray value between the target connected region and the first connected region as a second value, obtaining a difference value between the first value and the second value, and taking the value normalized by the difference value as a weight value of the interval region;
calculating information entropy according to the membership degree of each pixel point in the interval region;
and taking the reciprocal of the product among the Euclidean distance, the weight value and the information entropy as a superposition influence factor of the interval region between the target connected domain and the first connected domain.
Further, the method for obtaining the new membership degree comprises the following steps:
respectively acquiring superposition influence factors of a spacing region between a target connected domain and each adjacent filter hole connected domain, respectively taking each superposition influence factor corresponding to the target connected domain as an index of a natural constant, taking the obtained result as a first result corresponding to the superposition influence factor, and acquiring an addition result of all the first results;
taking a first result corresponding to the interval region between the target communication domain and the first communication domain as a molecule, and taking the addition result as a denominator to obtain a corresponding ratio; taking the addition result of the constant 1 and the ratio as a correction coefficient;
and for any pixel point in the interval region between the target connected domain and the first connected domain, taking the product of the correction coefficient and the membership of the pixel point as the new membership of the corresponding pixel point.
Further, the method for dividing the gray image into a background area and a filter hole area based on the new membership degree comprises the following steps:
for any pixel point in the gray image, when the pixel point belongs to the pixel points in at least two interval areas, acquiring the new membership degree of the pixel point belonging to the same cluster in each interval area, and taking the largest new membership degree as the final new membership degree of the pixel point belonging to the corresponding cluster; and dividing the gray image into a background area and a filter hole area based on the final new membership.
Further, the method for respectively obtaining the adjacent filter hole communicating domains of each filter hole communicating domain according to the distance between the centroids of the filter hole communicating domains comprises the following steps:
for any one of the filter hole communicating domains, calculating the centroid distance between the filter hole communicating domain and other filter hole communicating domains, and selecting other filter hole communicating domains corresponding to the smallest centroid distance as the adjacent filter hole communicating domain of the filter hole communicating domain.
Further, the method for detecting the defect of the filter screen according to the pore size of each filter pore area comprises the following steps:
obtaining the minimum circumscribing circle of each filter hole area, obtaining the diameter of the minimum circumscribing circle, taking the diameter as the aperture of the corresponding filter hole area, and confirming that the filter screen has defects when the aperture is not in the set aperture range.
Further, the method for obtaining the filter hole cluster class under each clustering iteration comprises the steps of:
performing clustering iteration on pixel points in a gray image at least twice by using an objective function of conventional FCM clustering to obtain filter hole cluster class under each clustering iteration, wherein the objective function
Figure SMS_2
The method comprises the following steps:
Figure SMS_3
wherein ,
Figure SMS_7
representing the total number of pixels in the gray scale image; />
Figure SMS_9
Index for cluster, represent +.>
Figure SMS_14
Cluster class; />
Figure SMS_6
For the number of clusters, the clustering algorithm is expressed to divide the gray image into +.>
Figure SMS_10
Class, also->
Figure SMS_13
The maximum value of the values is taken; />
Figure SMS_16
For the ith pixel belonging to +.>
Figure SMS_4
Membership of the individual cluster class; />
Figure SMS_8
Fuzzy weighting index for membership; />
Figure SMS_12
Indicate->
Figure SMS_15
Cluster center points of the clusters; />
Figure SMS_5
Is the norm;/>
Figure SMS_11
Is the i-th pixel point.
The invention has the following beneficial effects:
according to the invention, a gray level image corresponding to a surface image of a filter screen is obtained, because gray level clustering in the traditional FRFCM clustering can not completely divide a background and filter holes accurately under the condition of overlapping filter holes, the invention carries out clustering iteration on pixel points at least twice according to the distance between the pixel points in the gray level image to obtain filter hole cluster types under each clustering iteration, the problem that when the gray level of the pixel points in a background area is the same as that of the pixel points in a filter hole overlapping area, the accurate and complete division can not be carried out is solved, in each clustering iteration, the corresponding filter hole communicating domain under the filter hole cluster types is obtained, the situation that the background area possibly has wrong division caused by filter hole overlapping is considered, the adjacent filter hole communicating domain of each filter hole communicating domain is respectively obtained according to the distance between the centroids of the filter hole communicating domains, and the corresponding overlapping influence factors of the corresponding interval areas are calculated according to gray level information of the interval areas between the filter hole communicating domains, so that the calculation of the overlapping influence factors accords with actual information better; in the traditional FRFCM clustering, the membership matrix is corrected by using median filtering, and because the median filtering does not contain any semantic information in an image, the median filtering cannot correct the influence area of overlapping of filter holes, so the membership of each pixel point in the interval area is corrected according to the overlapping influence factors to obtain new membership, the adaptive membership filtering of each pixel point is formed through the overlapping influence factors, the membership matrix in each clustering iteration is corrected for removing the influence of overlapping of the filter holes, the integrity and the accuracy of dividing the gray level image into a background area and the filter hole area based on the new membership are improved, and the defect detection result of the filter screen according to the aperture size of each filter hole area is more accurate.
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 schematic diagram of a single filter after grey scale morphological reconstruction;
FIG. 2 is a schematic diagram of the result of dividing the filter holes of FIG. 1 by FRFCM clustering;
fig. 3 is a flowchart of a method for detecting defects of a filter screen of a machine vision-based filter 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 is given below of a filter screen defect detection method based on machine vision according to the invention, which is specific to the implementation, structure, characteristics and effects of the filter screen defect detection method. 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 specific scene aimed by the invention is as follows: in the process of using a fuzzy C-means clustering method (FRFCM) based on morphological reconstruction and membership filtering for filter hole segmentation, the FRFCM consists of three parts: gray morphological reconstruction+fcm of gray level+conventional membership filtering (median filtering or mean filtering, playing a corrective role). Because the FRFCM clusters the gray level and corrects the membership matrix through basic filtering, semantic information in the image is not considered, so that under the condition of overlapping the filter holes, the filter holes cannot be accurately segmented by using the FRFCM clustering, as shown in fig. 1 and 2, fig. 1 is a single filter hole after gray morphology reconstruction, and fig. 2 is a result of segmentation of the filter holes of fig. 1 by using the FRFCM clustering.
The following specifically describes a specific scheme of the filter screen defect detection method of the filter based on machine vision.
Referring to fig. 3, a flowchart of a method for detecting defects of a filter screen of a machine vision-based filter according to an embodiment of the invention is shown, where the method includes:
and S001, collecting a surface image of the filter screen to obtain a corresponding gray image, and carrying out clustering iteration on the pixel points at least twice according to the distance between the pixel points in the gray image to obtain filter hole clusters under each clustering iteration.
In particular, because the minimum of the filter holes of the polyethersulfone filter screen can be reached
Figure SMS_17
It is necessary to acquire its surface image using an electron microscope. And (3) carrying out scanning electron microscope imaging (SEM) on the polyether sulfone filter screen to obtain a surface image, carrying out morphological reconstruction on the surface image by using traditional gray morphology open operation reconstruction, and obtaining a gray image after gray morphology reconstruction.
It should be noted that, noise points in the image can be removed in the reconstruction of gray morphology open operation, and the edge of the filter hole is enhanced, and the reconstruction of traditional gray morphology open operation is part of the prior art in the traditional FRFCM cluster, which is not repeated in the scheme.
The conventional FRFCM clustering is to perform gray level clustering on an image, that is, pixels with the same gray value in the image can only be divided into the same cluster. In order to solve the problem of incomplete segmentation caused by the superposition of filter holes, the pixels with the same gray values need to be divided into different clusters by the positions of the pixels and the information of adjacent pixels, that is to say, gray level clusters in the traditional FRFCM clusters need to be converted into pixel clusters.
Wherein, the objective function of gray level clustering in the traditional FRFCM clustering
Figure SMS_18
The method comprises the following steps:
Figure SMS_19
wherein ,
Figure SMS_25
index for gray level in image, express +.>
Figure SMS_24
Gray levels; />
Figure SMS_37
For the number of grey levels in the image, a total +.>
Figure SMS_22
Grey level, also->
Figure SMS_34
The maximum value of the values is taken; />
Figure SMS_23
Index for cluster, represent +.>
Figure SMS_33
Cluster class; />
Figure SMS_30
For the number of clusters, the clustering algorithm is shown to divide the image into +.>
Figure SMS_40
Class, also->
Figure SMS_20
The maximum value of the values is taken; />
Figure SMS_32
Is->
Figure SMS_28
The number of pixels contained in the gray level; />
Figure SMS_35
Is->
Figure SMS_26
The gray level belongs to->
Figure SMS_39
Membership of the individual cluster class; />
Figure SMS_29
Fuzzy weighting index for membership; />
Figure SMS_38
Is the +.o of the image after morphological reconstruction>
Figure SMS_27
Gray levels; />
Figure SMS_36
Indicate->
Figure SMS_21
Cluster center points of the clusters; />
Figure SMS_31
Is a norm.
It should be noted that, the objective function of the conventional FRFCM clustering is to cluster the gray levels of the image after the reconstruction of the gray morphology, that is, the gray levels of the reconstructed image are divided into two classes, that is, the gray value difference distance between the gray level and the gray level of the clustering center is measured by the membership degree and the number of pixels included in the gray level, and the objective function is to minimize the gray value difference distance.
For the polyether sulfone filter screen in the white spirit filter, the gray level in the surface layer filter holes is the negative influence caused by superposition, the filter Kong Yilei divided by the gray level-based clustering has pixels with the same gray value belonging to the background area, and the pixels belong to the background area and should be divided into the backgroundFor this reason, the desired effect cannot be achieved by the gray level clusters, and therefore the gray level clusters need to be converted into the pixel point clusters, specifically: objective function of gray level clustering in conventional FRFCM clustering
Figure SMS_41
An objective function replaced by the traditional FCM cluster +.>
Figure SMS_42
The traditional FRFCM clustering membership calculation method is also based on the objective function of the traditional FCM clustering, and membership is calculated according to the Lagrangian multiplier method
Figure SMS_43
And cluster center point->
Figure SMS_44
Derived separately as an objective function +.>
Figure SMS_45
Membership degree when taking local minimum value and value requirement of cluster center point.
Wherein, objective function of traditional FCM cluster
Figure SMS_46
The method comprises the following steps:
Figure SMS_47
wherein ,
Figure SMS_49
representing the total number of pixels in the image; />
Figure SMS_53
Index for cluster, represent +.>
Figure SMS_57
Cluster class; />
Figure SMS_50
For the number of clusters, the clustering algorithm is shown to divide the image into +.>
Figure SMS_55
Class, also->
Figure SMS_58
The maximum value of the values is taken; />
Figure SMS_60
For the ith pixel belonging to +.>
Figure SMS_48
Membership of the individual cluster class; />
Figure SMS_52
Fuzzy weighting index for membership; />
Figure SMS_56
Indicate->
Figure SMS_59
Cluster center points of the clusters; />
Figure SMS_51
Is a norm; />
Figure SMS_54
Is the i-th pixel point.
It should be noted that, the objective function of gray level clustering in the conventional FRFCM clustering
Figure SMS_61
An objective function replaced by the traditional FCM cluster +.>
Figure SMS_62
Compared with the clustering segmentation of gray levels, the clustering segmentation of the pixel points can divide the pixel points with the same gray value into different clusters, so that the aperture segmentation of the polyether sulfone filter screen in the white wine filtration is finer, and the problem that the pixel points in the background area cannot be accurately and completely segmented when the gray levels of the pixel points in the overlapping area of the filter holes are the same is solved.
Wherein, the objective function of the traditional FCM cluster is utilized
Figure SMS_63
When clustering iteration is carried out, the calculation formula of the membership degree is as follows:
Figure SMS_64
wherein ,
Figure SMS_66
for the ith pixel belonging to +.>
Figure SMS_69
Membership of the individual cluster class; />
Figure SMS_72
Fuzzy weighting index for membership; />
Figure SMS_67
Indicate->
Figure SMS_70
Cluster center points of the clusters; />
Figure SMS_73
Is a norm; />
Figure SMS_74
Is the ith pixel point; />
Figure SMS_65
The number of clusters is clustered; />
Figure SMS_68
Is->
Figure SMS_71
Cluster center points of the cluster classes.
The aim of the scheme is to divide the surface image of the polyethersulfone filter screen into a background area and a filter hole area by clustering, so that the traditional FCM aggregation is arrangedObjective function of class
Figure SMS_75
Is a constraint on (c): the cluster number is->
Figure SMS_76
Setting to 2, namely dividing into a filter hole cluster type and a background cluster type, wherein membership fuzzy weighting index in the clustering process is +.>
Figure SMS_77
The iteration stop condition is that the membership matrix difference between two adjacent iteration processes is smaller than a threshold value +.>
Figure SMS_78
. Therefore, the objective function of the traditional FCM cluster is used +.>
Figure SMS_79
And carrying out clustering iteration on the pixel points in the gray level image at least twice to obtain filter hole clusters under each clustering iteration.
Step S002, in each clustering iteration, obtaining corresponding filter hole communicating domains under the filter hole clusters, respectively obtaining adjacent filter hole communicating domains of each filter hole communicating domain according to the distance between the centroids of the filter hole communicating domains, and calculating superposition influence factors corresponding to the corresponding interval regions according to the gray information of the interval regions between the filter hole communicating domains and the corresponding adjacent filter hole communicating domains; correcting the membership degree of each pixel point in the interval region according to the superposition influence factors to obtain new membership degree, and dividing the gray image into a background region and a filter hole region based on the new membership degree.
Specifically, in the iterative process of clustering, each iteration has a membership matrix corresponding to all pixel points, and cluster classification is performed through the maximum membership of each pixel point, namely a deblurring process. After cluster classification is obtained, connected domain processing is carried out on the filter hole clusters, and further membership degree information and gray level information of pixel points in an interval region between each connected domain and surrounding connected domains are analyzed, specifically: and acquiring each filter hole communicating domain under the filter hole clusters, calculating the centroid distance between the filter hole communicating domain and other filter hole communicating domains for any one filter hole communicating domain, and selecting other filter hole communicating domains corresponding to the smallest centroid distance as the adjacent filter hole communicating domain of the filter hole communicating domain.
As an example, take the first
Figure SMS_81
The communicating domain of each filter hole>
Figure SMS_84
For example, according to the filtration pore connected domain +.>
Figure SMS_85
The centroid of (2) is used for acquiring the communicating domain with the filter hole->
Figure SMS_82
The centroid of other filter hole communicating domains with closest centroid distances are taken as filter hole communicating domains +.>
Figure SMS_83
Is further provided with a set of adjacent filter pore communicating domains +.>
Figure SMS_86
Marking the first part in the communicating domain set of the adjacent filter holes>
Figure SMS_87
The communicating domain of the adjacent filter holes is->
Figure SMS_80
And analyzing whether the interval area is a misclassification condition caused by filter hole superposition or not through the interval area between the filter hole communication area and the adjacent filter hole communication area, namely the background area at intervals, wherein the method comprises the following steps of:
any one filter hole communicating domain is taken as a target communicating domain, any one adjacent filter hole communicating domain of the target communicating domain is taken as a first communicating domain, the mass center of the target communicating domain is connected with each edge point on the edge of the first communicating domain, at least two straight lines are obtained, an included angle between any two straight lines is obtained, two straight lines corresponding to the maximum included angle, the mass center of the target communicating domain and the first communicating domain form a new communicating domain, and a region except the first communicating domain in the new communicating domain is taken as a spacing region between the target communicating domain and the first communicating domain; calculating the Euclidean distance between the centroid of the target connected domain and the centroid of the first connected domain; calculating an average gray value of the interval region as a first value, calculating an average gray value between the target connected region and the first connected region as a second value, obtaining a difference value between the first value and the second value, and taking the value normalized by the difference value as a weight value of the interval region; calculating information entropy according to the membership degree of each pixel point in the interval region; and taking the reciprocal of the product among the Euclidean distance, the weight value and the information entropy as a superposition influence factor of the interval region between the target connected domain and the first connected domain.
As an example, the communicating domain is communicated with the filter holes
Figure SMS_89
And its adjacent filtration pore communicating domain->
Figure SMS_93
For example, the filtration pore connected domain +.>
Figure SMS_98
Is connected with the adjacent filtration pore>
Figure SMS_91
Each edge point on the edge of (a) is connected to obtain at least two straight lines, the included angle between any two straight lines is calculated, the two straight lines with the largest included angle are obtained as target straight lines, and the target straight lines and the filter hole communicating domain are obtained
Figure SMS_95
Centroid of (2) and adjacent filter communicating domain +.>
Figure SMS_99
Forming a new communicating domain, removing the communicating domain adjacent to the filtering holes from the new communicating domain>
Figure SMS_102
Is used as the filtration pore communication domain +.>
Figure SMS_88
And adjacent to the filtration pore communicating domain->
Figure SMS_92
The interval area between->
Figure SMS_96
Spacer region->
Figure SMS_100
Namely a background area corresponding to the non-filtration pore connected domain; according to the interval region->
Figure SMS_90
Gray value and membership degree of each pixel point in the image are calculated to be interval area +.>
Figure SMS_94
Superimposed influencing factors->
Figure SMS_97
Then superimpose the influencing factors->
Figure SMS_101
The calculation formula of (2) is as follows:
Figure SMS_103
wherein ,
Figure SMS_106
is a communicating domain of the filter hole->
Figure SMS_111
Centroid and adjacent filter communicating domain +.>
Figure SMS_114
Euclidean distance between centroids of (C);
Figure SMS_105
is a normalization function; />
Figure SMS_108
Is a spacer region->
Figure SMS_112
Is equal to the average gray value of (4) the filter communicating domain->
Figure SMS_115
And adjacent to the filtration pore communicating domain->
Figure SMS_104
The difference in average gray values between; />
Figure SMS_109
Is a spacer region->
Figure SMS_113
Middle->
Figure SMS_116
The membership degree difference value of each pixel point for two clusters needs to be described, wherein each pixel point has one membership degree for each cluster, in the scheme, a background cluster and a filtering hole cluster, so that two membership degrees exist for one pixel point, and the membership degree difference value of the corresponding pixel point is obtained according to the membership degree of each pixel point belonging to each cluster; />
Figure SMS_107
Representing>
Figure SMS_110
The information entropy of the membership difference calculated by the membership difference of each pixel point.
It should be noted that, for adjacent filter communicating regions, if the difference between the overall gray value of the interval region and the average gray value of the filter communicating region
Figure SMS_117
The smaller and the pixel points in the spacing area are for two cluster classesThe more stable the difference of membership of (i) is, i.e +.>
Figure SMS_118
The larger this interval region is, the more likely it is to be affected by the superposition of the filter holes, then its superposition influence factor +.>
Figure SMS_119
The higher the same; at this time, it is also considered that if isolated filter communicating domains occur, the superposition influence factor of the interval region between the isolated filter communicating domain and the nearest single adjacent filter communicating domain becomes high, so that the Euclidean distance between the filter communicating domains needs to be measured as a part of the superposition influence factor, that is, euclidean distance->
Figure SMS_120
The larger the superposition influence factor of the corresponding spacing region +.>
Figure SMS_121
The larger.
Using superimposed influencing factors
Figure SMS_122
And (3) acquiring superposition influence factors of the interval area between each filter hole communicating domain and each adjacent filter hole communicating domain, and calculating the superposition influence factors by using the Euclidean distance between the filter hole communicating domains and the gray scale distance and the membership information, so that the calculation of the superposition influence factors is more in accordance with actual information.
And for background pixel points in each clustering iteration process, acquiring superposition influence factors according to the interval region where the background pixel points are located, and correcting a membership matrix by using median filtering in the traditional FRFCM clustering. Because the median filtering does not contain any semantic information in the image, the median filtering cannot correct the influence area of the filter hole superposition, so that the adaptive membership filtering of each pixel point is required to be formed through superposition of influence factors, and the membership matrix in each clustering iteration is corrected to remove the influence of the filter hole superposition, specifically: taking any one filter hole communicating domain as a target communicating domain, taking any one adjacent filter hole communicating domain of the target communicating domain as a first communicating domain, respectively acquiring superposition influence factors of interval regions between the target communicating domain and each adjacent filter hole communicating domain, respectively taking each superposition influence factor corresponding to the target communicating domain as an index of a natural constant, taking the obtained result as a first result corresponding to the superposition influence factors, and acquiring an addition result of all the first results; taking a first result corresponding to the interval region between the target communication domain and the first communication domain as a molecule, and taking the addition result as a denominator to obtain a corresponding ratio; taking the addition result of the constant 1 and the ratio as a correction coefficient; and for any pixel point in the interval region between the target connected domain and the first connected domain, taking the product of the correction coefficient and the membership of the pixel point as the new membership of the corresponding pixel point.
As an example, the communicating domain is communicated with the filter holes
Figure SMS_123
Communicating with the adjacent filtering holes>
Figure SMS_124
The interval area between->
Figure SMS_125
Taking the ith pixel point as an example, the calculation formula of the new membership degree of the pixel point is as follows:
Figure SMS_126
wherein ,
Figure SMS_129
is a spacer region->
Figure SMS_132
The ith pixel point of (2) belonging to +.>
Figure SMS_136
New membership of the cluster class; />
Figure SMS_130
Is a spacer region->
Figure SMS_133
The ith pixel point of (2) belonging to +.>
Figure SMS_138
The membership degree of each cluster, namely the membership degree before correction; />
Figure SMS_140
Is a natural constant;
Figure SMS_127
is a spacer region->
Figure SMS_131
Is added to the superimposed influencing factors; />
Figure SMS_135
Is a communicating domain of the filter hole->
Figure SMS_139
And adjacent to the filtration pore communicating domain->
Figure SMS_128
The interval area between->
Figure SMS_134
Is added to the superimposed influencing factors; />
Figure SMS_137
Is a communicating domain of the filter hole->
Figure SMS_141
Is provided.
In the case of the first group of filter clusters
Figure SMS_142
The communicating domain of each filter hole>
Figure SMS_143
It has/>
Figure SMS_144
The adjacent communicating domain of the filter hole is +.>
Figure SMS_145
For each interval region adjacent to the communicating domain of the filter hole, there will be a superimposed influencing factor, will +.>
Figure SMS_146
The superposition influence factor of each interval region is normalized, namely, how the interval regions are distributed in the group of interval regions is measured to increase the membership degree of the filter hole cluster. If the superposition influence factor of a compartment is maximal compared to a group of compartments, the pixel in this compartment should be given a corresponding proportional increase in the membership of the filter cluster class, i.e.)>
Figure SMS_147
The larger the value of (2), the correction factor +.>
Figure SMS_148
The larger the value of the pixel point is, the larger the corresponding new membership degree is, so that the pixel point is more likely to be divided into filter hole clusters, and the problem of wrong segmentation caused by filter hole superposition is avoided. />
The advantage of correcting the membership degree of each pixel point in the interval region by using the superposition influence factor of the interval region between the adjacent filter hole connected regions is that: according to the scheme, semantic information of cluster segmentation in an image in a current clustering iterative process is integrated, the semantic information comprises Euclidean distance between filter hole connected domains, gray scale distance between a spacing region and the filter hole connected domains and membership difference information of the spacing region, different corrections can be carried out on membership of each pixel point in the spacing region through superposition influence factors obtained by the semantic information, and for traditional membership filtering in traditional FRFCM clustering, such as median filtering, mean filtering and the like, the essence is that membership of a central pixel point is corrected through membership of 8 neighborhood pixel points of the pixel points, the correction is that the mean value is uniformly calculated, the correction method is effective when Gaussian noise exists in the image, but when the membership correction of the pixel points in the image is required to be carried out through the pixel point distribution characteristics in the image, the correction method in the scheme is required, namely, a new membership acquisition method is required to correct a membership matrix, and error filtering and error caused by segmentation in the clustering process can be corrected.
And acquiring the new membership degree of each pixel point in the interval region between each filter hole communicating region and each adjacent filter hole communicating region by using a calculation formula of the new membership degree. Wherein, in the case that the interval region has an intersection, at least two pixel points in the intersection belong to the first
Figure SMS_149
The new membership of each cluster class, therefore, requires confirmation of the final new membership for each pixel in the intersection: for any pixel point in the gray image, when the pixel point belongs to the pixel points in at least two interval areas, acquiring the new membership degree of the pixel point belonging to the same cluster in each interval area, and taking the largest new membership degree as the final new membership degree of the pixel point belonging to the corresponding cluster.
As an example, when the filter pore is connected to the domain
Figure SMS_153
Is a communicating domain of the filter hole->
Figure SMS_151
Is adjacent to the filtration pore communicating region and the filtration pore communicating region
Figure SMS_160
Is also a communicating domain of the filter hole->
Figure SMS_154
When the adjacent filter hole communicating domain is +.>
Figure SMS_161
Communicating with the adjacent filtering holes>
Figure SMS_156
A spacing region therebetween, and a filter communicating region->
Figure SMS_164
Communicating with the adjacent filtering holes>
Figure SMS_155
The interval area between them has intersection, and any one pixel point in the intersection has two pixels belonging to +.>
Figure SMS_162
The new membership degree of each cluster class is selected as the maximum new membership degree, and the corresponding pixel point belongs to the +.>
Figure SMS_150
Final new membership of the cluster class; when the filtration pore is communicated with the domain->
Figure SMS_159
Communicating with the adjacent filtering holes>
Figure SMS_158
A spacing region therebetween, and a filter communicating region->
Figure SMS_163
Communicating with the adjacent filtering holes>
Figure SMS_157
When there is no intersection of the interval regions, each pixel point in the interval region is belonged to +.>
Figure SMS_165
The new membership of the cluster class belongs to the +.>
Figure SMS_152
Final new membership of each cluster class.
Because the interval region is other regions except the filter hole connected region, namely the background region, the method for acquiring the filter hole clusters is based on the final new membership acquisition methodEach pixel point of (1) belonging to the first
Figure SMS_166
The final membership of each cluster is corrected by using a traditional FCM clustering method when clustering iteration is carried out on pixel points in a gray level image through a final membership acquisition method, and then based on the final new membership, the objective function of using traditional FCM clustering under the iteration stopping condition is acquired>
Figure SMS_167
And (3) completely dividing the gray image into a background area and a filter hole area.
And step S003, detecting defects of the filter screen according to the aperture size of each filter hole area.
Specifically, step S002 divides the polyethersulfone filter screen into a background area and a complete filter hole area, and detects defects in each filter hole area, specifically: obtaining the minimum circumscribing circle of each filter hole area, obtaining the diameter of the minimum circumscribing circle, taking the diameter as the aperture of the corresponding filter hole area, generating requirements for the filter holes according to white wine, and confirming that the polyether sulfone filter screen has defects when the aperture does not meet the requirements, otherwise, the polyether sulfone filter screen has no defects, so as to finish the defect detection of the polyether sulfone filter screen.
As an example, the present solution sets the aperture range to
Figure SMS_168
When the pore diameter is not within the set pore diameter range, the defect of the filter screen is confirmed.
It should be noted that: the sequence of the embodiments of the present invention is only for description, and does not represent the advantages and disadvantages of the embodiments. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
In this specification, each embodiment is described in a progressive manner, and identical and similar parts of each embodiment are all referred to each other, and each embodiment mainly describes differences from other embodiments.
The foregoing description of the preferred embodiments of the present invention is not intended to be limiting, but rather, any modifications, equivalents, improvements, etc. that fall within the principles of the present invention are intended to be included within the scope of the present invention.

Claims (5)

1. The filter screen defect detection method based on machine vision is characterized by comprising the following steps of:
collecting surface images of a filter screen to obtain corresponding gray images, and carrying out clustering iteration on pixel points at least twice according to the distance between the pixel points in the gray images to obtain filter hole clusters under each clustering iteration;
in each clustering iteration, obtaining corresponding filter hole communicating domains under the filter hole clusters, respectively obtaining adjacent filter hole communicating domains of each filter hole communicating domain according to the distance between the centroids of the filter hole communicating domains, and calculating superposition influence factors of the corresponding interval regions according to the gray information of the interval regions between the filter hole communicating domains and the corresponding adjacent filter hole communicating domains; correcting the membership degree of each pixel point in the interval region according to the superposition influence factors to obtain a new membership degree, and dividing the gray image into a background region and a filter hole region based on the new membership degree;
performing defect detection on the filter screen according to the aperture size of each filter hole area;
the method for acquiring the superposition influence factors comprises the following steps:
any one filter hole communicating domain is taken as a target communicating domain, any one adjacent filter hole communicating domain of the target communicating domain is taken as a first communicating domain, the mass center of the target communicating domain is connected with each edge point on the edge of the first communicating domain, at least two straight lines are obtained, an included angle between any two straight lines is obtained, two straight lines corresponding to the maximum included angle, the mass center of the target communicating domain and the first communicating domain form a new communicating domain, and a region except the first communicating domain in the new communicating domain is taken as a spacing region between the target communicating domain and the first communicating domain;
calculating the Euclidean distance between the centroid of the target connected domain and the centroid of the first connected domain;
calculating an average gray value of the interval region as a first value, calculating an average gray value between the target connected region and the first connected region as a second value, obtaining a difference value between the first value and the second value, and taking the value normalized by the difference value as a weight value of the interval region;
calculating information entropy according to the membership degree of each pixel point in the interval region;
taking the reciprocal of the product among Euclidean distance, weight value and information entropy as the superposition influence factor of the interval area between the target connected domain and the first connected domain;
the method for acquiring the new membership degree comprises the following steps:
respectively acquiring superposition influence factors of a spacing region between a target connected domain and each adjacent filter hole connected domain, respectively taking each superposition influence factor corresponding to the target connected domain as an index of a natural constant, taking the obtained result as a first result corresponding to the superposition influence factor, and acquiring an addition result of all the first results;
taking a first result corresponding to the interval region between the target communication domain and the first communication domain as a molecule, and taking the addition result as a denominator to obtain a corresponding ratio; taking the addition result of the constant 1 and the ratio as a correction coefficient;
and for any pixel point in the interval region between the target connected domain and the first connected domain, taking the product of the correction coefficient and the membership of the pixel point as the new membership of the corresponding pixel point.
2. The machine vision-based filter screen defect detection method of claim 1, wherein the method for dividing the gray image into the background area and the filter hole area based on the new membership comprises the following steps:
for any pixel point in the gray image, when the pixel point belongs to the pixel points in at least two interval areas, acquiring the new membership degree of the pixel point belonging to the same cluster in each interval area, and taking the largest new membership degree as the final new membership degree of the pixel point belonging to the corresponding cluster; and dividing the gray image into a background area and a filter hole area based on the final new membership.
3. The machine vision-based filter screen defect detection method of claim 1, wherein the method for respectively obtaining adjacent filter hole communicating domains of each filter hole communicating domain according to the distance between centroids of the filter hole communicating domains comprises the following steps:
for any one of the filter hole communicating domains, calculating the centroid distance between the filter hole communicating domain and other filter hole communicating domains, and selecting other filter hole communicating domains corresponding to the smallest centroid distance as the adjacent filter hole communicating domain of the filter hole communicating domain.
4. The machine vision based filter screen defect detection method as set forth in claim 1, wherein the method for performing defect detection of the filter screen according to the pore size of each filter pore area comprises:
obtaining the minimum circumscribing circle of each filter hole area, obtaining the diameter of the minimum circumscribing circle, taking the diameter as the aperture of the corresponding filter hole area, and confirming that the filter screen has defects when the aperture is not in the set aperture range.
5. The machine vision-based filter screen defect detection method of claim 1, wherein the method for performing at least two clustering iterations on pixel points according to the distance between the pixel points in the gray level image to obtain filter hole clusters under each clustering iteration comprises the following steps:
performing clustering iteration on pixel points in a gray image at least twice by using an objective function of conventional FCM clustering to obtain filter hole cluster class under each clustering iteration, wherein the objective function
Figure QLYQS_1
The method comprises the following steps:
Figure QLYQS_2
wherein ,
Figure QLYQS_5
representing the total number of pixels in the gray scale image; />
Figure QLYQS_8
Index for cluster, represent +.>
Figure QLYQS_12
Cluster class; />
Figure QLYQS_4
For the number of clusters, the clustering algorithm is expressed to divide the gray image into +.>
Figure QLYQS_9
Class, also->
Figure QLYQS_13
The maximum value of the values is taken; />
Figure QLYQS_15
For the ith pixel belonging to +.>
Figure QLYQS_3
Membership of the individual cluster class; />
Figure QLYQS_7
Fuzzy weighting index for membership; />
Figure QLYQS_11
Indicate->
Figure QLYQS_14
Cluster center points of the clusters; />
Figure QLYQS_6
Is a norm; />
Figure QLYQS_10
Is the i-th pixel point. />
CN202310113988.1A 2023-02-15 2023-02-15 Filter screen defect detection method based on machine vision Active CN115830022B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310113988.1A CN115830022B (en) 2023-02-15 2023-02-15 Filter screen defect detection method based on machine vision

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310113988.1A CN115830022B (en) 2023-02-15 2023-02-15 Filter screen defect detection method based on machine vision

Publications (2)

Publication Number Publication Date
CN115830022A CN115830022A (en) 2023-03-21
CN115830022B true CN115830022B (en) 2023-04-28

Family

ID=85521414

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310113988.1A Active CN115830022B (en) 2023-02-15 2023-02-15 Filter screen defect detection method based on machine vision

Country Status (1)

Country Link
CN (1) CN115830022B (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116128880B (en) * 2023-04-18 2023-06-16 东莞市京品精密模具有限公司 Identification method for surface cracking of tab mold
CN116542982B (en) * 2023-07-07 2023-09-29 山东中泳电子股份有限公司 Departure judgment device defect detection method and device based on machine vision
CN116721108B (en) * 2023-08-11 2023-11-03 山东奥晶生物科技有限公司 Stevioside product impurity detection method based on machine vision
CN116740061B (en) * 2023-08-14 2023-11-21 山东淼珠生物科技有限公司 Visual detection method for production quality of explosive beads
CN116912256B (en) * 2023-09-14 2023-11-28 山东大昌纸制品有限公司 Corrugated paper rib defect degree assessment method based on image processing
CN117078688B (en) * 2023-10-17 2024-01-02 江苏普隆磁电有限公司 Surface defect identification method for strong-magnetic neodymium-iron-boron magnet

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109389608A (en) * 2018-10-19 2019-02-26 山东大学 There is the fuzzy clustering image partition method of noise immunity using plane as cluster centre
WO2021007744A1 (en) * 2019-07-15 2021-01-21 广东工业大学 Kernel fuzzy c-means fast clustering algorithm with integrated spatial constraints
CN113538429A (en) * 2021-09-16 2021-10-22 海门市创睿机械有限公司 Mechanical part surface defect detection method based on image processing
CN113723449A (en) * 2021-07-16 2021-11-30 西安邮电大学 Preference information-based agent-driven multi-objective evolutionary fuzzy clustering method

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109389608A (en) * 2018-10-19 2019-02-26 山东大学 There is the fuzzy clustering image partition method of noise immunity using plane as cluster centre
WO2021007744A1 (en) * 2019-07-15 2021-01-21 广东工业大学 Kernel fuzzy c-means fast clustering algorithm with integrated spatial constraints
CN113723449A (en) * 2021-07-16 2021-11-30 西安邮电大学 Preference information-based agent-driven multi-objective evolutionary fuzzy clustering method
CN113538429A (en) * 2021-09-16 2021-10-22 海门市创睿机械有限公司 Mechanical part surface defect detection method based on image processing

Also Published As

Publication number Publication date
CN115830022A (en) 2023-03-21

Similar Documents

Publication Publication Date Title
CN115830022B (en) Filter screen defect detection method based on machine vision
CN112424828B (en) Nuclear fuzzy C-means quick clustering algorithm integrating space constraint
CN115018828B (en) Defect detection method for electronic component
CN108053417B (en) lung segmentation device of 3D U-Net network based on mixed rough segmentation characteristics
CN103996209B (en) Infrared vessel object segmentation method based on salient region detection
CN106340016B (en) A kind of DNA quantitative analysis method based on microcytoscope image
CN109087296B (en) Method for extracting human body region in CT image
CN111598918B (en) Video image stabilizing motion estimation method based on reference frame optimization and foreground and background separation
CN115187602A (en) Injection molding part defect detection method and system based on image processing
CN115311262A (en) Printed circuit board defect identification method
CN111583279A (en) Super-pixel image segmentation method based on PCBA
CN117197140B (en) Irregular metal buckle forming detection method based on machine vision
CN116990323B (en) High-precision printing plate visual detection system
WO2024021461A1 (en) Defect detection method and apparatus, device, and storage medium
CN109325955B (en) Retina layering method based on OCT image
CN116523898A (en) Tobacco phenotype character extraction method based on three-dimensional point cloud
CN116993724A (en) Visual detection method for coal mine industrial gear oil based on image filtering
CN113781413B (en) Electrolytic capacitor positioning method based on Hough gradient method
CN109272522B (en) A kind of image thinning dividing method based on local feature
CN112288760B (en) Adherent cell image screening method and system and cell image analysis method
WO2020164042A1 (en) Region merging image segmentation algorithm based on boundary extraction
CN111429461B (en) Novel segmentation method for overlapped and exfoliated epithelial cells
CN115994870A (en) Image processing method for enhancing denoising
CN113763407A (en) Ultrasonic image nodule edge analysis method
CN117314899B (en) Carbon fiber plate quality detection method based on image characteristics

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