CN115830022A - Filter screen defect detection method based on machine vision - Google Patents
Filter screen defect detection method based on machine vision Download PDFInfo
- Publication number
- CN115830022A CN115830022A CN202310113988.1A CN202310113988A CN115830022A CN 115830022 A CN115830022 A CN 115830022A CN 202310113988 A CN202310113988 A CN 202310113988A CN 115830022 A CN115830022 A CN 115830022A
- Authority
- CN
- China
- Prior art keywords
- domain
- filter hole
- filter
- area
- pixel point
- 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.)
- Granted
Links
- 230000007547 defect Effects 0.000 title claims abstract description 32
- 238000001514 detection method Methods 0.000 title claims abstract description 16
- 238000000034 method Methods 0.000 claims abstract description 44
- 239000011148 porous material Substances 0.000 claims abstract description 40
- 238000004891 communication Methods 0.000 claims abstract description 39
- 238000012937 correction Methods 0.000 claims description 15
- 230000011218 segmentation Effects 0.000 abstract description 11
- 238000012545 processing Methods 0.000 abstract description 4
- 238000001914 filtration Methods 0.000 description 36
- 239000004695 Polyether sulfone Substances 0.000 description 17
- 229920006393 polyether sulfone Polymers 0.000 description 17
- 238000004364 calculation method Methods 0.000 description 9
- 230000000877 morphologic effect Effects 0.000 description 9
- 239000011159 matrix material Substances 0.000 description 8
- 125000006850 spacer group Chemical group 0.000 description 7
- 238000004519 manufacturing process Methods 0.000 description 3
- 239000002344 surface layer Substances 0.000 description 3
- 230000000694 effects Effects 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000003631 expected effect Effects 0.000 description 1
- 238000003384 imaging method Methods 0.000 description 1
- 239000012535 impurity Substances 0.000 description 1
- 238000012804 iterative process Methods 0.000 description 1
- 239000010410 layer Substances 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000010606 normalization Methods 0.000 description 1
- 230000000750 progressive effect Effects 0.000 description 1
Images
Classifications
-
- Y—GENERAL 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
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02P—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
- Y02P90/00—Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
- Y02P90/30—Computing systems specially adapted for manufacturing
Landscapes
- Image Processing (AREA)
Abstract
The invention relates to the technical field of data processing, in particular to a method for detecting defects of a filter screen of a filter based on machine vision, which comprises the steps of obtaining a gray level image corresponding to a surface image of the filter screen, and performing clustering iteration for at least two times on pixel points in the gray level image; in each clustering iteration, acquiring corresponding filter hole communication domains under filter hole clusters, respectively acquiring adjacent filter hole communication domains of each filter hole communication domain, and calculating superposition influence factors corresponding to corresponding interval regions according to gray scale information of the interval regions between the filter hole communication domains and the corresponding adjacent filter hole communication domains; correcting the membership degree of each pixel point in the interval area according to the superposition influence factors to obtain a new membership degree so as to divide the gray level image into a background area and a filter hole area; and detecting the defects of the filter screen according to the pore size of each filter pore 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
Technical Field
The invention relates to the technical field of data processing, in particular to a method for detecting defects of a filter screen of a filter based on machine vision.
Background
In the production process of white spirit, impurities can be separated out from fusel in the white spirit, so that the filtration is needed in the final step of the production, and the produced white spirit meets the standard. The filter of the production line uses a polyethersulfone filter screen to filter the white spirit. The polyether sulfone filter screen has long service time and the smallest filter hole can be reachedAnd in the using process, the aperture of the surface filter hole of the polyether sulfone filter screen needs to be detected by using a scanning electron microscope at intervals.
The detection of the aperture of the surface filter hole of the polyethersulfone filter screen requires that a surface image of the polyethersulfone filter screen is collected firstly, then the surface image is segmented to segment the filter hole area, and finally the segmented filter hole area is identified according to the aperture size of the filter hole. Because a scanning electron microscope can generate a lot of noises when imaging the polyethersulfone filter screen, and the detailed texture information of the filter holes needs to be extracted, the surface filter holes are obtained by segmenting the surface image of the polyethersulfone filter screen by using an FCM clustering method (FRFCM) based on morphological reconstruction and membership filtering.
However, the surface layer filtering holes of the polyethersulfone filter screen may have lower layer filtering holes, and in the process of detecting the aperture, if the surface layer filtering holes cannot be completely extracted, the misjudgment of the aperture size is caused, and the traditional FRFCM clustering method clusters the gray levels, so that the overlapping situation of the filtering holes cannot be accurately segmented, and the membership filtering in the traditional FRFCM clustering cannot help to correctly segment the filtering holes.
Disclosure of Invention
In order to solve the problem that the traditional FRFCM clustering method cannot accurately divide the filter hole area under the condition of overlapping the filter holes, the invention aims to provide a machine vision-based filter screen defect detection method for a filter, and the adopted technical scheme is as follows:
one embodiment of the invention provides a machine vision-based defect detection method for a filter screen of a filter,
collecting surface images of the filter screen to obtain corresponding gray level images, and performing clustering iteration on pixel points for at least two times according to the distance between the pixel points in the gray level images to obtain filter hole clusters under each clustering iteration;
in each clustering iteration, acquiring corresponding filter hole communication domains under filter hole clusters, respectively acquiring adjacent filter hole communication domains of each filter hole communication domain according to the distance between the centroids of the filter hole communication domains, and calculating the superposition influence factor corresponding to the corresponding interval region according to the gray information of the interval region between the filter hole communication domain and the corresponding adjacent filter hole communication domain; correcting the membership degree of each pixel point in the interval area according to the superposition influence factors to obtain a new membership degree, and dividing the gray level image into a background area and a filter hole area based on the new membership degree;
and detecting the defects of the filter screen according to the pore size of each filter pore area.
Further, the method for acquiring the superposition influence factor includes:
taking any filter hole communicating domain as a target communicating domain, taking any adjacent filter hole communicating domain of the target communicating domain as a first communicating domain, connecting the centroid of the target communicating domain with each edge point on the edge of the first communicating domain to obtain at least two straight lines, obtaining an included angle between any two straight lines, forming two straight lines corresponding to the maximum included angle, the centroid of the target communicating domain and the first communicating domain into a new communicating domain, and taking the region except the first communicating domain in the new communicating domain as an interval 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 area as a first value, calculating an average gray value between the target connected domain and the first connected domain as a second value, acquiring a difference value between the first value and the second value, and using a value obtained by normalizing the difference value as a weight value of the interval area;
calculating information entropy according to the membership degree of each pixel point in the interval area;
and taking the reciprocal of the product of the Euclidean distance, the weight value and the information entropy as a superposition influence factor of an interval region between the target connected domain and the first connected domain.
Further, the method for acquiring the new membership degree includes:
respectively obtaining superposition influence factors of an interval area 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 obtaining an addition result of all the first results;
taking a first result corresponding to an interval region between the target connected domain and the first connected domain as a numerator, and taking an addition result as a denominator to obtain a corresponding ratio; the addition result of the constant 1 and the ratio is used as a correction coefficient;
and regarding any pixel point in a spacing area between the target communication domain and the first communication domain, taking the product of the correction coefficient and the membership degree of the pixel point as the new membership degree of the corresponding pixel point.
Further, the method for segmenting the gray-scale image into the background area and the filter hole area based on the new membership degree comprises the following steps:
for any pixel point in the gray level image, when the pixel point belongs to pixel points in at least two interval areas, acquiring a new membership degree of the pixel point in each interval area, wherein the pixel point belongs to the same cluster, and taking the maximum new membership degree as a final new membership degree of the pixel point belonging to a corresponding cluster; and segmenting the gray level image into a background area and a filter hole area based on the final new membership degree.
Further, the method for respectively obtaining the adjacent filter pore communication domains of each filter pore communication domain according to the distance between the centroids of the filter pore communication domains comprises the following steps:
and for any filter hole communicating domain, calculating the centroid distance between the filter hole communicating domain and other filter hole communicating domains, and selecting the other filter hole communicating domain corresponding to the minimum centroid distance as the adjacent filter hole communicating domain of the filter hole communicating domain.
Further, the method for detecting the defects of the filter screen according to the pore size of each filter pore area comprises the following steps:
and obtaining the minimum circumscribed circle of each filter hole area, obtaining the diameter of the minimum circumscribed circle, taking the diameter as the aperture of the corresponding filter hole area, and determining that the filter screen has defects when the aperture is not in the set aperture range.
Further, the method for performing clustering iteration on pixel points at least twice according to the distance between the pixel points in the gray level image to obtain a filter hole cluster class under each clustering iteration includes:
performing clustering iteration on pixel points in the gray level image at least twice by using an objective function of the traditional FCM clustering to obtain a filter hole cluster class under each clustering iteration, wherein the objective functionComprises the following steps:
wherein ,expressing the total number of pixel points in the gray level image;is an index of a cluster class, representsA cluster class;representing the clustering algorithm to divide the gray scale image into a number of clusters for clusteringClass i, alsoThe maximum value of the values;for the ith pixel point belonging to the ithMembership of individual clusters;is membership fuzzy weighted index;is shown asCluster center points of individual clusters;is a norm;is the ith pixel point.
The invention has the following beneficial effects:
the method comprises the steps of obtaining a gray level image corresponding to a surface image of a filter screen, wherein the background and filter holes cannot be completely and accurately segmented under the condition that the filter holes are overlapped due to gray level clustering in the traditional FRFCM clustering, so that at least two times of clustering iteration is carried out on pixel points according to the distance between the pixel points in the gray level image to obtain filter hole clusters under each time of clustering iteration, the problem that the pixel points in the background area and the filter hole overlapping area cannot be accurately and completely segmented is solved, in each time of clustering iteration, the corresponding filter hole communicating areas under the filter hole clusters are obtained, the mistaken segmentation condition caused by filter hole overlapping possibly exists in the background area during each iteration process is considered, the adjacent filter hole communicating areas of each filter hole communicating area are respectively obtained according to the distance between the centroids of the filter hole communicating areas, and the overlapping influence factors corresponding to the corresponding interval areas are calculated according to the gray level information of the interval areas between the filter hole communicating areas and the corresponding adjacent filter hole communicating areas, so that the calculation of the overlapping influence factors is more in line with actual information; in the traditional FRFCM clustering, median filtering is used for correcting a membership matrix, because the median filtering does not contain any semantic information in an image, the median filtering cannot correctly correct the influence area of superposed filter holes, the membership of each pixel point in an interval area is corrected according to superposed influence factors to obtain new membership, and self-adaptive membership filtering of each pixel point is formed through the superposed influence factors, so that the membership matrix in each clustering iteration is corrected to remove the influence of superposed filter holes, the integrity and the accuracy of dividing a gray level image into a background area and a filter hole area based on the new membership are improved, and the result of detecting the defects of a 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 present invention or the technical solutions and advantages of the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and other drawings can be obtained by those skilled in the art without creative efforts.
FIG. 1 is a schematic illustration of a single filter pore after grey scale morphological reconstruction;
FIG. 2 is a schematic representation of the results of segmenting the filter pores of FIG. 1 using FRFCM clustering;
FIG. 3 is a flow chart illustrating the steps of a method for detecting defects in a filter screen of a filter based on machine vision according to an embodiment of the present invention.
Detailed Description
In order to further illustrate the technical means and effects of the present invention adopted to achieve the predetermined objects, the following detailed description of the method for detecting defects of a filter screen of a filter based on machine vision, the specific implementation, structure, features and effects thereof according to the present invention, with reference to the accompanying drawings and preferred embodiments, is provided. In the following description, different "one embodiment" or "another embodiment" refers to not necessarily the same embodiment. Furthermore, the particular features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.
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 scenes aimed by the invention are as follows: in the process of using a fuzzy C-means clustering method (FRFCM) based on morphological reconstruction and membership filtering to perform filter hole segmentation, the FRFCM consists of three parts: gray level morphological reconstruction + FCM of gray level + traditional membership filtering (median filtering or mean filtering, which plays a corrective role). Since FRFCM clusters the gray levels and corrects the membership matrix by basic filtering, semantic information in the image is not considered, and thus, under the condition of filtering hole superposition, a segmentation error occurs by using FRFCM clustering, and the filtering holes cannot be accurately segmented, as shown in fig. 1 and 2, fig. 1 is a single filtering hole after gray level morphological reconstruction, and fig. 2 is a result of segmenting the filtering hole of fig. 1 by using FRFCM clustering.
The specific scheme of the filter screen defect detection method based on machine vision provided by the invention is specifically described below with reference to the accompanying drawings.
Referring to FIG. 3, a flow chart of the steps of a method for detecting defects in a filter screen of a filter based on machine vision according to an embodiment of the present invention is shown, the method comprising:
and S001, acquiring a surface image of the filter screen to obtain a corresponding gray level image, and performing 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 clusters under each clustering iteration.
In particular, the minimum filtration pore of the polyethersulfone filter screen can be reachedTherefore, it is necessary to acquire an image of the surface thereof using an electron microscope. And (3) the polyethersulfone filter screen is imaged by a Scanning Electron Microscope (SEM) to obtain a surface image, and the surface image is subjected to morphological reconstruction by utilizing the traditional gray morphological opening operation reconstruction to obtain a gray image after gray morphological reconstruction.
It should be noted that noise in the image can be removed in the gray scale morphology opening operation reconstruction, and the edge of the filter hole is enhanced, and the conventional gray scale morphology opening operation reconstruction is a part of the prior art in the conventional FRFCM clustering, and is not described in detail in this 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 classified into the same cluster class. In order to solve the problem of incomplete segmentation caused by filtering hole superposition, pixels with the same gray value need to be divided into different clusters because of the positions of the pixels and the information of adjacent pixels, that is, gray level clusters in the traditional FRFCM cluster need to be converted into pixel clusters.
Wherein, the objective function of gray level clustering in the traditional FRFCM clusteringComprises the following steps:
wherein ,for the index of the grey level in the image, the first in the imageA gray level;representing a common in the image for the number of grey levels in the imageA gray scale level ofThe maximum value of the value;for indexing of cluster classes, denoteA cluster class;representing the clustering algorithm to divide the image into a number of clusters for clusteringClass i and isThe maximum value of the value;is as followsThe number of pixels contained in each gray level;is as followsThe gray scale belongs toMembership of individual clusters;is membership fuzzy weighted index;for images after morphological reconstructionA gray level;is shown asCluster center points of individual clusters;is a norm.
It should be noted that, in the conventional FRFCM clustering, the target function is to cluster the gray levels of the reconstructed images through gray morphology, that is, to divide the gray levels of the reconstructed images into two categories, that is, the gray value difference distance between the gray level and the gray level in the center of the cluster is measured through the membership and the number of pixels included in the gray level, and the target function is to minimize the gray value difference distance.
For a polyether sulfone filter screen in a white spirit filter, the gray levels in surface layer filter holes are negatively affected by superposition, one type of filter holes are divided based on the clustering of the gray levels, some pixel points with the same gray value belong to a background region, and the pixel points belong to the background region and are divided into the background type, so that the clustering of the gray levels cannot achieve the expected effect, and the clustering of the gray levels needs to be converted into the clustering of the pixel points, specifically: objective function for gray level clustering in conventional FRFCM clusteringTarget function for replacing traditional FCM clusteringThe traditional FRFCM clustering membership degree calculation method is also based on the traditional FCM clustering objective function and adopts a Lagrange multiplier method to calculate the membership degreeAnd cluster center pointRespectively derived as an objective functionAnd taking the membership degree of the local minimum value and the value requirement of the cluster center point.
wherein ,representing the total number of pixel points in the image;is an index of a cluster class, representsA cluster class;representing the clustering algorithm to divide the image into a number of clusters for clusteringClass i and isThe maximum value of the value;for the ith pixel point belonging to the ithMembership of individual clusters;is membership fuzzy weighted index;is shown asCluster center points of individual clusters;is a norm;is the ith pixel point.
It is to be noted thatObjective function for gray level clustering in unified FRFCM clusteringTarget function replaced by traditional FCM clusteringCompared with the gray level clustering segmentation, the clustering segmentation of the pixel points can divide the pixel points with the same gray level value into different cluster types, so that the aperture segmentation of the polyether sulfone filter screen in white spirit filtration is more delicate, and the problem that the pixel points in the background area and the filter hole superposition area cannot be accurately and completely segmented when the gray levels of the pixel points are the same is solved.
Wherein the objective function of the traditional FCM clustering is utilizedWhen clustering iteration is carried out, the calculation formula of the membership degree is as follows:
wherein ,for the ith pixel point to belong to the thMembership of individual clusters;is membership fuzzy weighted index;is shown asCluster center points of individual clusters;is a norm;is the ith pixel point;The number of cluster types for clustering;is as followsCluster center points of individual cluster classes.
The method aims to divide the surface image of the polyether sulfone filter screen into a background area and a filter hole area through clustering, so that an objective function of the traditional FCM clustering is setThe constraint of (2): number of clustersSetting as 2, namely dividing into filter hole cluster and background cluster, fuzzy weighting index of membership degree in clustering processThe iteration stop condition is that the difference of the membership degree matrix between two adjacent iteration processes is less than a threshold value. So using the objective function of the traditional FCM clusteringAnd performing clustering iteration for at least two times on the pixel points in the gray level image to obtain a filter hole cluster class under each clustering iteration.
Step S002, in each clustering iteration, acquiring corresponding filter hole communication domains under the filter hole clusters, respectively acquiring adjacent filter hole communication domains of each filter hole communication domain according to the distance between the centroids of the filter hole communication domains, and calculating the superposition influence factor corresponding to the corresponding interval domain according to the gray scale information of the interval domain between the filter hole communication domains and the corresponding adjacent filter hole communication domains; and correcting the membership degree of each pixel point in the interval area according to the superposition influence factors to obtain a new membership degree, and dividing the gray level image into a background area and a filter hole area based on the new membership degree.
Specifically, in the iterative process of clustering, each iteration has a membership matrix corresponding to all the pixel points, and cluster classification is performed through the maximum membership of each pixel point, namely, the deblurring process. After cluster classification is obtained, connected domain processing is carried out on the filter hole clusters, and then membership degree information and gray information of pixel points in interval domains of each connected domain and surrounding connected domains are analyzed, and the method specifically comprises the following steps: and acquiring each filter hole communication domain under the filter hole cluster, calculating the centroid distance between each filter hole communication domain and other filter hole communication domains for any filter hole communication domain, and selecting other filter hole communication domains corresponding to the minimum centroid distance as adjacent filter hole communication domains of the filter hole communication domains.
As an example, the followingEach filter hole is communicated with the areaFor example, according to the filter hole communication domainThe center of mass of (1) is obtained and the connected domain of the filter holes is obtainedThe centroid of the other filter hole communicating domain closest to the centroid takes the other filter hole communicating domain corresponding to the centroid as the filter hole communicating domainTo obtain a set of connected areas of adjacent filter holesInscribing the first in the collection of connected domains of adjacent filter poresThe adjacent filter holes are communicated with the area。
Through the interval region between the filter hole communicating region and the adjacent filter hole communicating region, namely the interval background region, whether the interval region is the wrong division condition caused by the superposition of the filter holes is analyzed, and the method specifically comprises the following steps:
taking any one filter hole communicated domain as a target communicated domain, taking any one adjacent filter hole communicated domain of the target communicated domain as a first communicated domain, connecting the centroid of the target communicated domain with each edge point on the edge of the first communicated domain to obtain at least two straight lines, obtaining an included angle between any two straight lines, forming a new communicated domain by the two straight lines corresponding to the maximum included angle, the centroid of the target communicated domain and the first communicated domain, and taking the region except the first communicated domain in the new communicated domain as an interval region between the target communicated domain and the first communicated 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 area as a first value, calculating an average gray value between the target connected domain and the first connected domain as a second value, acquiring a difference value between the first value and the second value, and using a value obtained by normalizing the difference value as a weight value of the interval area; calculating information entropy according to the membership degree of each pixel point in the interval area; and taking the reciprocal of the product of the Euclidean distance, the weight value and the information entropy as a superposition influence factor of an interval region between the target connected domain and the first connected domain.
As an example, the domains are connected by filter holesAnd its adjacent filter hole communicating regionFor example, the filter holes are connected with the domainCentroid and adjacent filter pore connected domainEach edge point on the edge of (1) is connected to obtain at least two straight lines, and the included angle between any two straight lines is calculated to obtainTaking two straight lines with the largest included angle as target straight lines, and connecting the target straight lines with filter holesCentroid and adjacent filter pore connected domainForming a new connected domain, and removing the connected domain of the adjacent filter pores in the new connected domainThe rest area of the filter is used as a filter hole communicating areaAnd adjacent filter hole communicating regionIn the interval region betweenSpacer regionNamely a background area corresponding to the non-filter hole communication domain; according to the spacing regionCalculating interval area by gray value and membership of each pixel pointBy the superposition factor ofThen the influence factors are superposedThe calculation formula of (2) is as follows:
wherein ,for connecting the filter poresCentroid and adjacent filter pore connected domain ofThe euclidean distance between centroids of (a);is a normalization function;is a spacer regionAverage gray value of (2) and, filter pore connected domainAnd adjacent filter hole communicating regionThe difference between the average gray values;is a spacer regionTo middleThe membership degree difference of each pixel point to two clusters needs to be explained, each pixel point has one membership degree to each cluster, and the background clusters and the filter hole clusters are adopted in the scheme, so that two membership degrees exist in one pixel point, and the membership degree difference of the corresponding pixel point is obtained according to the membership degree of each pixel point belonging to each cluster;according to the interval regionMembership degree difference meter for each pixel pointAnd calculating the information entropy of the membership degree difference.
It should be noted that, for adjacent filter hole connected domains, if the difference between the overall gray-scale value of the interval region and the average gray-scale value of the filter hole connected domains isThe smaller the difference between the membership degrees of the pixel points in the interval area to the two clusters is, the more stable the difference is, namelyThe larger the size of the filter hole, the more likely the interval area is influenced by the superposition of the filter holes, and the superposition influence factor of the interval area isThe higher the bit rate; at this time, it is also considered that if an isolated filter hole connected domain occurs, the overlapping influence factor of the spacing region between the isolated filter hole connected domain and the nearest single adjacent filter hole connected domain becomes high, so the euclidean distance between the filter hole connected domains needs to be measured as a part of the overlapping influence factor, that is, the euclidean distanceThe larger the overlap factor of the corresponding spacing regionThe larger.
Using superimposed influencing factorsThe calculation formula of (2) obtains the superposition influence factor of the interval region between each filter hole connected domain and each adjacent filter hole connected domain, and the calculation of the superposition influence factor is carried out through the Euclidean distance between the filter hole connected domains, the gray scale distance and the membership degree information, so that the calculation of the superposition influence factor is more in line with the actual information.
And for each background pixel point in the clustering iteration process, acquiring the superposition influence factor of the background pixel point according to the interval region where the background pixel point is located, and correcting the 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 correctly correct the influence area of the superposed filter holes, and therefore self-adaptive membership filtering of each pixel point needs to be formed by superposing influence factors, so that correction for removing the influence of superposed filter holes is carried out on a membership matrix in each clustering iteration, which specifically comprises the following steps: 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 obtaining superposition influence factors of an interval region 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 of the corresponding superposition influence factor, and obtaining the addition result of all the first results; taking a first result corresponding to an interval region between the target connected domain and the first connected domain as a numerator, and taking an addition result as a denominator to obtain a corresponding ratio; the addition result of the constant 1 and the ratio is used as a correction coefficient; and regarding any pixel point in the interval area between the target connected domain and the first connected domain, taking the product of the correction coefficient and the membership degree of the pixel point as the new membership degree of the corresponding pixel point.
As an example, the domains are connected by filter holesCommunicating with its adjacent filter poresIn the interval region betweenTaking the ith pixel point as an example, the calculation formula of the new membership degree of the pixel point is as follows:
wherein ,is a roomSeparation zoneThe ith pixel point in (1) belongs to theNew membership of individual clusters;is a spacer regionThe ith pixel point in (1) belongs to theThe membership degree of each cluster class, namely the membership degree before correction;is a natural constant;is a spacer regionThe superposition influence factor of (2);for connecting the filter poresAnd the adjacent filter hole communicating areaIn the interval region betweenThe superposition influence factor of (2);for connecting the filter poresThe number of adjacent filter openings communicating with the domain.
It is noted thatIn the filter hole cluster class IEach filter hole is communicated with the areaWhich is provided withAdjacent filter hole connected regionThere will be a superimposed influence factor for each spacer region adjacent to the connected region of the filter holeThe superimposed influence factors of the interval areas are normalized, namely, how to distribute the interval areas in the group to increase the membership degree of the filter hole cluster. If the superposition influence factor of one interval area is maximum compared with a group of interval areas, the membership degree of the pixel points in the interval area to the filter hole clusters is correspondingly increased, namelyThe larger the value of (A), the correction coefficientThe larger the value 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 utilizing the superposition influence factor of the interval region between the adjacent filter hole connected domains to correct the membership degree of each pixel point in the interval region is as follows: according to the scheme, semantic information of cluster segmentation in an image in the current clustering iteration process is integrated, the semantic information comprises Euclidean distance between filter hole communicating domains, gray scale distance between an interval region and the filter hole communicating domains and membership difference information of the interval region, different correction can be performed on membership of each pixel point in the interval region through superposition influence factors obtained through the semantic information, for traditional membership filtering in the traditional FRFCM clustering, such as median filtering, mean filtering and the like, the essence is that the membership of a central pixel point is corrected through the membership of 8 neighborhood pixel points of the pixel point, the correction is numerical correction and uniform mean solving, the correction method is effective under the condition that Gaussian noise exists in the image, but when the correction of the membership of the pixel point through pixel point distribution characteristics in the image is required, the correction method in the scheme is required, and is a new membership acquisition method for correcting a membership matrix, so that incorrect segmentation caused by filter hole superposition in the clustering process can be corrected.
And acquiring the new membership degree of each pixel point in the interval area between each filter hole communicating domain and each adjacent filter hole communicating domain by using a calculation formula of the new membership degree. Considering the condition that the interval regions have intersection, at least two pixel points in the intersection belong to the secondThe new membership of each cluster, therefore, the final new membership of each pixel point in the intersection needs to be confirmed: for any pixel point in the gray level 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 in each interval area belonging to the same cluster, and taking the maximum new membership degree as the final new membership degree of the pixel point belonging to the corresponding cluster.
As an example, when the filter pores communicate with the domainFor connecting the filter poresAdjacent to the filter hole communication area, and the filter hole communication areaAlso a filter pore communicating regionIs adjacent toWhen the filter holes are close to the connected domain, the filter holes are connected with the domainCommunicating with its adjacent filter poresA spacer region therebetween, and a filter pore communicating regionCommunicating with its adjacent filter poresThe interval areas between the two adjacent pixels have intersection, and any one pixel point in the intersection has two pixels belonging to the second pixelSelecting the maximum new membership degree as the second membership degree of the corresponding pixel pointFinal new membership of each cluster; when the filter pores are communicatedCommunicating with its adjacent filter poresA spacer region therebetween, and a filter pore communicating regionCommunicating with its adjacent filter poresWhen the interval areas between the two areas do not have intersection, each pixel point in the interval areas belongs to the firstThe new membership degree of each cluster as the corresponding pixel point belonging to the firstFinal new membership of individual cluster classes.
Since the interval region is the region other than the filter hole connected region, that is, the background region, it is obtained that each pixel point except the filter hole cluster belongs to the first pixel point based on the final new membership obtaining methodAnd the final membership degree of each cluster is obtained by a final membership degree obtaining method, so that the membership degree of each pixel in the gray level image is corrected when the traditional FCM clustering method is used for clustering iteration on the pixels in the gray level image, and further, the objective function clustered by the traditional FCM under the condition of iteration stop is obtained based on the final new membership degreeAnd (4) completely dividing the gray level image into a background area and a filter hole area according to the clustering and dividing result.
And S003, detecting the defects of the filter screen according to the pore size of each filter pore area.
Specifically, in step S002, the polyethersulfone filter screen is divided into a background area and a complete filtration pore area, and defect detection is performed on each filtration pore area, specifically: and obtaining the minimum circumscribed circle of each filtering hole area, obtaining the diameter of the minimum circumscribed circle, taking the diameter as the aperture of the corresponding filtering hole area, and according to the requirement of white spirit generation on the filtering holes, determining that the polyethersulfone filter screen has defects when the aperture does not meet the requirement, otherwise, determining that the polyethersulfone filter screen has no defects, thereby completing the defect detection of the polyethersulfone filter screen.
As an example, the present solution sets the aperture range toWhen the aperture is not within the set aperture range, the filter screen is determined to have defects.
It should be noted that: the precedence order of the above embodiments of the present invention is only for description, and does not represent the merits 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 may also be possible or may be advantageous.
The embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like that are within the spirit of the present invention are intended to be included therein.
Claims (7)
1. The machine vision-based filter screen defect detection method is characterized by comprising the following steps of:
acquiring a surface image of the filter screen to obtain a corresponding gray image, and performing clustering iteration on 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 each clustering iteration, acquiring corresponding filter hole communication domains under filter hole clusters, respectively acquiring adjacent filter hole communication domains of each filter hole communication domain according to the distance between the centroids of the filter hole communication domains, and calculating the superposition influence factor of the corresponding interval region according to the gray information of the interval region between the filter hole communication domain and the corresponding adjacent filter hole communication domain; correcting the membership degree of each pixel point in the interval area according to the superposition influence factors to obtain a new membership degree, and dividing the gray level image into a background area and a filter hole area based on the new membership degree;
and detecting the defects of the filter screen according to the pore size of each filter pore area.
2. The machine vision-based defect detection method for the filter screen of the filter machine as claimed in claim 1, wherein the method for obtaining the superposition influence factor comprises:
taking any one filter hole communicated domain as a target communicated domain, taking any one adjacent filter hole communicated domain of the target communicated domain as a first communicated domain, connecting the centroid of the target communicated domain with each edge point on the edge of the first communicated domain to obtain at least two straight lines, obtaining an included angle between any two straight lines, forming a new communicated domain by the two straight lines corresponding to the maximum included angle, the centroid of the target communicated domain and the first communicated domain, and taking the region except the first communicated domain in the new communicated domain as an interval region between the target communicated domain and the first communicated 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 area as a first value, calculating an average gray value between the target connected domain and the first connected domain as a second value, acquiring a difference value between the first value and the second value, and using a value obtained by normalizing the difference value as a weight value of the interval area;
calculating information entropy according to the membership degree of each pixel point in the interval area;
and taking the reciprocal of the product of the Euclidean distance, the weight value and the information entropy as a superposition influence factor of an interval region between the target connected domain and the first connected domain.
3. The machine vision-based defect detection method for filter screens of filters according to claim 2, wherein the new membership obtaining method comprises:
respectively obtaining superposition influence factors of an interval 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 factors, and obtaining an addition result of all the first results;
taking a first result corresponding to an interval area between the target connected domain and the first connected domain as a numerator, and taking an addition result as a denominator to obtain a corresponding ratio; the addition result of the constant 1 and the ratio is used as a correction coefficient;
and regarding any pixel point in the interval area between the target connected domain and the first connected domain, taking the product of the correction coefficient and the membership degree of the pixel point as the new membership degree of the corresponding pixel point.
4. The machine-vision-based filter screen defect detection method of claim 1, wherein the method for segmenting a gray scale image into a background region and a filter hole region based on new membership comprises:
for any pixel point in the gray level image, when the pixel point belongs to pixel points in at least two interval areas, acquiring a new membership degree of the pixel point in each interval area, wherein the pixel point belongs to the same cluster, and taking the maximum new membership degree as a final new membership degree of the pixel point belonging to a corresponding cluster; and segmenting the gray level image into a background area and a filter hole area based on the final new membership degree.
5. The machine vision-based defect detection method for a filter screen of a filter according to claim 1, wherein the method for respectively obtaining the adjacent connected filter hole domains of each connected filter hole domain according to the distance between the centroids of the connected filter hole domains comprises the following steps:
and for any filter hole communicating domain, calculating the centroid distance between the filter hole communicating domain and other filter hole communicating domains, and selecting the other filter hole communicating domain corresponding to the minimum centroid distance as the adjacent filter hole communicating domain of the filter hole communicating domain.
6. The machine vision-based defect detection method for filter screens of filters according to claim 1, wherein the method for detecting defects of the filter screens according to the pore size of each filter pore area comprises the following steps:
and obtaining the minimum circumcircle of each filter hole area, obtaining the diameter of the minimum circumcircle, 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.
7. The machine vision-based defect detection method for the filter screen of the filter as claimed in 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 image to obtain the filter hole cluster class under each clustering iteration comprises:
using conventional FCMPerforming clustering iteration on pixel points in the gray level image at least twice by using a clustering objective function to obtain a filter hole cluster class under each clustering iteration, wherein the objective functionComprises the following steps:
wherein ,expressing the total number of pixel points in the gray level image;is an index of a cluster class, representsA cluster class;representing the clustering algorithm to divide the gray scale image into a number of clusters for clusteringClass i and isThe maximum value of the value;for the ith pixel point belonging to the ithMembership of individual clusters;is membership fuzzy weighted index;is shown asCluster center points of individual clusters;is a norm;is the ith pixel point.
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 true CN115830022A (en) | 2023-03-21 |
CN115830022B 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) |
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116128880A (en) * | 2023-04-18 | 2023-05-16 | 东莞市京品精密模具有限公司 | Identification method for surface cracking of tab mold |
CN116542982A (en) * | 2023-07-07 | 2023-08-04 | 山东中泳电子股份有限公司 | Departure judgment device defect detection method and device based on machine vision |
CN116721108A (en) * | 2023-08-11 | 2023-09-08 | 山东奥晶生物科技有限公司 | Stevioside product impurity detection method based on machine vision |
CN116740061A (en) * | 2023-08-14 | 2023-09-12 | 山东淼珠生物科技有限公司 | Visual detection method for production quality of explosive beads |
CN116912256A (en) * | 2023-09-14 | 2023-10-20 | 山东大昌纸制品有限公司 | Corrugated paper rib defect degree assessment method based on image processing |
CN117078688A (en) * | 2023-10-17 | 2023-11-17 | 江苏普隆磁电有限公司 | Surface defect identification method for strong-magnetic neodymium-iron-boron magnet |
Citations (4)
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 |
-
2023
- 2023-02-15 CN CN202310113988.1A patent/CN115830022B/en active Active
Patent Citations (4)
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 |
Non-Patent Citations (3)
Title |
---|
MACIEJ K WOZNIAK等: "Automatic Generation of Individual Fuzzy Cognitive Maps from Longitudinal Data" * |
张敏;徐栋;: "局部一致性的信息熵Relief特征加权算法" * |
池桂英等: "基于分层的直觉模糊C均值聚类图像分割算法" * |
Cited By (12)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116128880A (en) * | 2023-04-18 | 2023-05-16 | 东莞市京品精密模具有限公司 | Identification method for surface cracking of tab mold |
CN116128880B (en) * | 2023-04-18 | 2023-06-16 | 东莞市京品精密模具有限公司 | Identification method for surface cracking of tab mold |
CN116542982A (en) * | 2023-07-07 | 2023-08-04 | 山东中泳电子股份有限公司 | Departure judgment device defect detection method and device based on machine vision |
CN116542982B (en) * | 2023-07-07 | 2023-09-29 | 山东中泳电子股份有限公司 | Departure judgment device defect detection method and device based on machine vision |
CN116721108A (en) * | 2023-08-11 | 2023-09-08 | 山东奥晶生物科技有限公司 | Stevioside product impurity detection method based on machine vision |
CN116721108B (en) * | 2023-08-11 | 2023-11-03 | 山东奥晶生物科技有限公司 | Stevioside product impurity detection method based on machine vision |
CN116740061A (en) * | 2023-08-14 | 2023-09-12 | 山东淼珠生物科技有限公司 | Visual detection method for production quality of explosive beads |
CN116740061B (en) * | 2023-08-14 | 2023-11-21 | 山东淼珠生物科技有限公司 | Visual detection method for production quality of explosive beads |
CN116912256A (en) * | 2023-09-14 | 2023-10-20 | 山东大昌纸制品有限公司 | Corrugated paper rib defect degree assessment method based on image processing |
CN116912256B (en) * | 2023-09-14 | 2023-11-28 | 山东大昌纸制品有限公司 | Corrugated paper rib defect degree assessment method based on image processing |
CN117078688A (en) * | 2023-10-17 | 2023-11-17 | 江苏普隆磁电有限公司 | Surface defect identification method for strong-magnetic neodymium-iron-boron magnet |
CN117078688B (en) * | 2023-10-17 | 2024-01-02 | 江苏普隆磁电有限公司 | Surface defect identification method for strong-magnetic neodymium-iron-boron magnet |
Also Published As
Publication number | Publication date |
---|---|
CN115830022B (en) | 2023-04-28 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN115830022A (en) | Filter screen defect detection method based on machine vision | |
CN115018828B (en) | Defect detection method for electronic component | |
CN115330767B (en) | Method for identifying production abnormity of corrosion foil | |
CN116735612B (en) | Welding defect detection method for precise electronic components | |
CN115187602A (en) | Injection molding part defect detection method and system based on image processing | |
CN114926436A (en) | Defect detection method for periodic pattern fabric | |
CN117197140B (en) | Irregular metal buckle forming detection method based on machine vision | |
CN115311262A (en) | Printed circuit board defect identification method | |
CN116416268B (en) | Method and device for detecting edge position of lithium battery pole piece based on recursion dichotomy | |
CN116703251B (en) | Rubber ring production quality detection method based on artificial intelligence | |
CN117994154B (en) | Intelligent image denoising method based on sensor | |
CN116416252B (en) | Method for detecting sedimentation image of wastewater in boehmite production process | |
CN117934467A (en) | Titanium metal welding quality detection method and system based on image processing | |
CN112288760A (en) | Adherent cell image screening method and system and cell image analysis method | |
CN113673396B (en) | Spore germination rate calculation method, device and storage medium | |
CN112396580A (en) | Circular part defect detection method | |
CN113902667B (en) | Thread turning identification method and system for machine vision | |
CN117314899B (en) | Carbon fiber plate quality detection method based on image characteristics | |
CN113034403A (en) | Working method for denoising medical image data through Gaussian filtering | |
CN114998632B (en) | RVIN detection and removal method based on pixel clustering | |
CN118470004B (en) | Method, equipment and medium for detecting concentrated dirt defect of LED semiconductor chip | |
CN116894841B (en) | Visual detection method for quality of alloy shell of gearbox | |
CN118470654B (en) | Distributor quality detection method based on image processing | |
CN118096766B (en) | Surface defect detection method for quickly disassembling and assembling portable sucker | |
CN117237389B (en) | CT image segmentation method for middle ear cholesteatoma |
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 |