A method for batch quality inspection of finished products used in the production of purification filters
By performing threshold iterative processing on the grayscale diagram of the air filter, analyzing the dynamic changes in the edge of the filter, calculating defect characteristics and abnormal factors, the problem of traditional detection methods being difficult to accurately detect filter defects is solved, and higher detection accuracy and reliability are achieved.
Patent Information
- Application Number
- CN202510146398.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-10
- Publication Date
- 2025-06-03
- Estimated Expiration
- 2045-02-10
AI Technical Summary
Traditional air filter quality detection methods are difficult to accurately detect defective areas in the filter, especially due to occlusion problems caused by dense folds in the filter.
By obtaining the grayscale map of the filter, several edge maps of the filter are obtained by using the threshold iteration method, and the dynamic changes of the edges are analyzed, which are divided into anchored edges and new edges, and the defect characteristics of the new edges and abnormal factors of the edges are calculated, so as to detect the defect possibility of each pixel point.
It improves the accuracy of quality inspection of finished air filters, can effectively identify defect areas in the filters, and enhances the reliability of inspection.
Smart Images

Figure CN119600030B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of image analysis, and particularly relates to a method for batch quality inspection of finished products for the production of purification filter screens. Background Art
[0002] To ensure the quality of the produced air filter screens, it is necessary to conduct quality inspections on the finished filter screens. However, due to the presence of dense folds in the air filter screens, when analyzing the filter screen images through machine vision for quality inspection, the folds at different positions in the filter screen will have different angles with the camera, resulting in the folds at positions far from the camera being blocked. Different positions of the folds will have different manifestations in the grayscale image of the filter screen, making it difficult to accurately detect the defective areas in the filter screen. Summary of the Invention
[0003] The present invention provides a method for batch quality inspection of finished products for the production of purification filter screens to solve the existing problem that traditional detection methods are difficult to accurately detect the defects in the filter screens.
[0004] The method for batch quality inspection of finished products for the production of purification filter screens of the present invention adopts the following technical solutions:
[0005] Including the following steps:
[0006] Obtain the grayscale image of the filter screen;
[0007] Based on the grayscale image of the filter screen, obtain a number of filter screen edge maps through threshold iteration; obtain the diffusion center line in each filter screen edge map; according to the distribution of edge pixel points in adjacent filter screen edge maps, divide the edges in each filter screen edge map into anchored edges and new edges, and the new edges include independent edges and spreading edges; according to the distance between the new edges and the diffusion center line, and the similarity between the spreading edges and the anchored edges, obtain the defect characteristics of the new edges.
[0008] According to the similarity between different edges in each filter screen edge map, obtain the abnormality degree of each edge in each filter screen edge map; according to the abnormality degree of the edges in each filter screen edge map in different filter screen edge maps, obtain the abnormality weight of each edge in each filter screen edge map, and combine the abnormality degree of each edge in each filter screen edge map to obtain the abnormality factor of each edge in each filter screen edge map.
[0009] According to the abnormality factor of each edge in each filter screen edge map and the defect characteristics of the new edges, obtain the possibility that each pixel point is a defective pixel point; according to the possibility that each pixel point is a defective pixel point, detect the quality of the finished filter screen.
[0010] Preferably, the method for obtaining a number of filter screen edge maps through threshold iteration based on the grayscale image of the filter screen includes the following specific method:
[0011] Preset an initial threshold , a termination threshold and a threshold iteration step size ; Set the threshold in the edge detection operator to Perform edge detection on the grayscale filter image to obtain the first filter edge image;
[0012] Set the threshold in the edge detection operator to Perform edge detection on the grayscale filter image to obtain the second filter edge image;
[0013] Set the threshold in the edge detection operator to Perform edge detection on the grayscale filter image to obtain the third filter edge image;
[0014] And so on, until the threshold in the edge detection operator is set to Perform edge detection on the grayscale filter image to obtain the th filter edge image, where .
[0015] Preferably, obtain the diffusion midline in each filter edge image; According to the distribution of edge pixel points in adjacent filter edge images, divide the edges in each filter edge image into anchored edges and newly added edges, and the specific methods included are:
[0016] Obtain the closest position to the camera in any filter edge image, and draw a straight line parallel to the folds along this position as the diffusion midline of this filter edge image; For the th filter edge image, use the edge pixel points in the th filter edge image to perform masking processing on the edge pixel points in the th filter edge image, and mark the edge pixel points that exist in the th filter edge image but do not exist in the th filter edge image as the newly added edge pixel points in the th filter edge image; Mark the edge pixel points that exist in both the th filter edge image and the th filter edge image as the anchored edge pixel points in the th filter edge image; And group the adjacent newly added edge pixel points in the th filter edge image into the same newly added edge, and group the adjacent anchored edge pixel points into the same anchored edge;
[0017] Mark the newly added edge adjacent to the anchored edge in the th filter edge image as the spreading edge of the anchored edge; Mark the newly added edge not adjacent to the anchored edge as an independent edge.
[0018] Preferably, obtaining the defect feature of the new edge according to the distance between the new edge and the diffusion center line, and the similarity between the spreading edge and the anchored edge includes the following specific method:
[0019] For the th independent edge in the th filter screen edge map, according to the distances between all independent edges in the th filter screen edge map and the diffusion center line of the th filter screen edge map, obtain the defect feature of the th independent edge in the th filter screen edge map. The specific calculation formula is:
[0020] ,
[0021] In the formula, represents the defect feature of the th independent edge in the th filter screen edge map; represents the number of independent edges in the th filter screen edge map; represents the distance between the th independent edge in the th filter screen edge map and the diffusion center line of the th filter screen edge map; represents the distance between the th independent edge in the th filter screen edge map and the diffusion center line of the th filter screen edge map; represents the absolute value function; represents the linear normalization function;
[0022] For the th spreading edge in the th filter screen edge map, classify the th spreading edge and the anchored edge adjacent to the th spreading edge into the same local edge, denoted as the th local edge; obtain the Pearson correlation coefficient between the th local edge and the th spreading edge, and combine the distances between all spreading edges in the th filter screen edge map and the diffusion center line of the th filter screen edge map to obtain the defect feature of the th spreading edge in the th filter screen edge map. The specific calculation formula is:
[0023] ,
[0024] In the formula, represents the defect feature of the th spreading edge in the th filter screen edge map; represents the number of spreading edges in the th filter screen edge map; represents the distance between the th spreading edge and the diffusion midline of the th filter screen edge map in the th filter screen edge map; represents the distance between the th spreading edge and the diffusion midline of the th filter screen edge map in the th filter screen edge map; represents the Pearson correlation coefficient between the th local edge and the th spreading edge; represents the linear normalization function.
[0025] Preferably, obtaining the abnormality degree of each edge in each filter screen edge map according to the similarity between different edges in each filter screen edge map includes the following specific method:
[0026] For the th edge and the th edge in the th filter screen edge map; taking the first pixel point in the th edge as the coordinate origin, taking the horizontal right direction in the filter screen edge map as the x-axis direction, and taking the vertical upward direction in the filter screen edge map as the y-axis direction, construct the morphological space of the th edge, and similarly construct the morphological space of the th edge;
[0027] According to the coordinates of the th edge and the th edge in their respective morphological spaces, obtain the DTW distance between the th edge and the th edge;
[0028] For the th edge in the th filter screen edge map, obtain the DTW distances between the th edge in the th filter screen edge map and all other edges in the th filter screen edge map; combining each edge in the th filter screen edge map with the The distance between the diffusion midlines of the edge diagrams of the abnormal degree of the
[0029] Preferably, the obtaining of the abnormal degree of the edge in the
[0030]
[0031] In the formula, represents the abnormal degree of the edge in the edge diagram of the abnormal degree of the edge in the edge diagram of the abnormal degree of the edge in the edge diagram of the abnormal degree of the edge in the edge diagram of the abnormal degree of the edge in the edge diagram of the represents the absolute value function; represents the linear normalization function.
[0032] Preferably, the obtaining of the abnormal weight of each edge in each filter edge diagram according to the abnormal degree of the edges in different filter edge diagrams includes the following specific method:
[0033] Preset a threshold range ; for the th filter edge diagram, the filter edge diagrams with a difference less than from the th filter edge diagram in terms of the threshold are used as the threshold adjacent edge diagrams of the
[0034] For the The th edge in the edge map of the th filter screen; record the coordinates of the th edge in the edge map of the th filter screen as the reference coordinates; the area composed of the edge pixel points located under the reference coordinates in the threshold adjacent edge map of the th edge map of the filter screen is recorded as the corresponding area of the th edge in the th edge map of the filter screen; according to the abnormality degree between the corresponding areas, obtain the abnormality weight of the th edge in the
[0035] ,
[0036] In the formula, represents the abnormality weight of the th edge in the th edge map of the filter screen; represents the abnormality degree of the th corresponding area of the th edge in the th edge map of the filter screen; represents the average value of the abnormality degrees of all corresponding areas of the th edge in the th edge map of the filter screen; represents the number of corresponding areas of the th edge in the th edge map of the filter screen; represents the linear normalization function.
[0037] Preferably, the specific method for obtaining the abnormality factor of each edge in each edge map of the filter screen includes:
[0038] For the th edge in the th edge map of the filter screen, according to the abnormality degree of the th edge in the th edge map of the filter screen, combined with the abnormality weight of the th edge in the th edge map of the filter screen, obtain the abnormality factor of the th edge in the th edge map of the filter screen, and its specific calculation formula is:
[0039] ,
[0040] In the formula, represents the th edge in the Abnormal factor of an edge; Indicates the Degree of abnormality of the th edge in the Indicates the Abnormal weight of the th edge in the
[0041] Preferably, obtaining the possibility that each pixel point is a defective pixel point according to the abnormal factor of each edge in each filter edge map and the defect characteristics of the newly added edge includes the following specific method:
[0042] For the th newly added edge in the th filter edge map, use the defect characteristics of the th newly added edge as the defect characteristics of each pixel point in the th newly added edge. Denote the coordinates of each pixel point in the th newly added edge as the target coordinates, and use the pixel points located under the target coordinates in all other filter edge maps as the corresponding pixel points of each target pixel point. Let the defect characteristics of the corresponding pixel points of the target pixel points be equal to the defect characteristics of the target pixel points;
[0043] For the th edge in the th filter edge map, use the abnormal factor of the th edge in the th filter edge map as the abnormal factor of each pixel point in the th edge;
[0044] Obtain the possibility that each pixel point is a defective pixel point according to the abnormal factor of each pixel point and the defect characteristics of each pixel point in all filter edge maps. The specific calculation formula is:
[0045] ,
[0046] In the formula, Indicates the possibility that the th pixel point is a defective pixel point; Indicates the number of filter edge maps; Indicates the th abnormal factor of the th pixel point in the th filter edge map; Indicates the th defect characteristic of the th pixel point in the
[0047] Preferably, detecting the quality of the finished filter screen according to the possibility that each pixel is a defective pixel includes the following specific method:
[0048] Preset a possibility threshold ; for any pixel, if the possibility that the pixel is a defective pixel is less than , then the pixel is a normal pixel; if the possibility that the pixel is a defective pixel is greater than or equal to , then the pixel is a defective pixel;
[0049] Preset a quality threshold ; for any filter screen, if the ratio of normal pixels to all pixels in the filter screen is less than or equal to , then the quality of the filter screen is unqualified; if the ratio of normal pixels to all pixels in the filter screen is greater than , then the quality of the filter screen is qualified.
[0050] The beneficial effects of the technical solution of the present invention are as follows: based on the grayscale image of the filter screen, several filter screen edge images are obtained through threshold iteration; by the dynamic change of the edges identified at different thresholds, the defect characteristics of the newly added edges are obtained. Since the farther the distance between the folds in the filter screen and the industrial camera, the more part of the transition information between the folds is lost due to occlusion, resulting in the less obvious gray-scale change between the fold and its adjacent fold; on the contrary, the closer the distance between the folds in the filter screen and the industrial camera, the more obvious the gray-scale change between the fold and its adjacent fold; therefore, normally, the edges in the grayscale image of the filter screen will spread away from the industrial camera as the threshold decreases, and when the folds in the filter screen are damaged, it will interfere with the spread, so as to obtain the defect characteristics at each position in the filter screen;
[0051] According to the similarity between different edges in each filter screen edge image and the change of edges in adjacent filter screen edge images, the abnormal factor of each edge in each filter screen edge image is obtained. Since the distance between the folds in the filter screen is uniform, the distribution of the edges of the folds in the filter screen edge image has a certain regularity, and when the folds on the surface of the filter screen are defective, the regularity of the folds on the surface of the filter screen will be damaged; and because the defective area where the folds are damaged is stable within a certain threshold range, the abnormal factor of the edge can be obtained according to the stability of the edge abnormal degree in different filter screen edge images; according to the abnormal factor of each edge in each filter screen edge image and the defect characteristics of the newly added edges, the possibility that each pixel is a defective pixel is obtained, so as to detect the quality of the finished filter screen, and finally improve the accuracy of detecting the quality of the finished filter screen. Description of the Drawings
[0052] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the accompanying drawings required for the description of the embodiments or the prior art. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can be obtained based on these drawings.
[0053] Figure 1 It is a flowchart of the steps of a method for batch quality inspection of finished products for the production of purification filters according to the present invention;
[0054] Figure 2 It is a legend diagram of the filter screen grayscale;
[0055] Figure 3 For the th edge and the th edge, it is a morphological space schematic diagram. Detailed implementation manners
[0056] To further elaborate on the technical means and effects adopted by the present invention to achieve the predetermined invention purpose, the following, in combination with the accompanying drawings and preferred embodiments, details the specific implementation manners, structures, features, and effects of a method for batch quality inspection of finished products for the production of purification filters according to the present invention. In the following description, different "one embodiment" or "another embodiment" do not necessarily refer to the same embodiment. In addition, the specific features, structures, or characteristics in one or more embodiments can be combined in any suitable form.
[0057] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those of ordinary skill in the technical field to which the present invention belongs.
[0058] The following specifically describes the specific solution of a method for batch quality inspection of finished products for the production of purification filters provided by the present invention in combination with the accompanying drawings.
[0059] Please refer to Figure 1 , which shows a flowchart of the steps of a method for batch quality inspection of finished products for the production of purification filters provided by an embodiment of the present invention. The method includes the following steps:
[0060] Step S001: Obtain the filter screen grayscale image.
[0061] It should be noted that the function of the air filter is to improve the air quality, protect the safe operation of the equipment, extend the service life of the equipment, and reduce the harm of harmful substances to human health and the environment by filtering pollutants such as particulate matter, dust, and pollen in the air. To ensure the quality of the produced air filters, this embodiment proposes a method for batch quality inspection of finished products for purifying filter production, which detects defects in the air filter through computer vision. Therefore, it is first necessary to collect the surface images of the air filter.
[0062] Specifically, the surface image of the filter is collected by an industrial camera, and the surface image of the filter is grayscale processed to obtain a grayscale image of the filter, as Figure 2 shown, Figure 2 which is a legend of the grayscale image of the filter.
[0063] Step S002: Based on the grayscale image of the filter, obtain a number of filter edge images through threshold iteration; obtain the diffusion center line in each filter edge image; according to the distribution of edge pixel points in adjacent filter edge images, divide the edges in each filter edge image into anchored edges and new edges, and the new edges include independent edges and spreading edges; according to the distance between the new edges and the diffusion center line, and the similarity between the spreading edges and the anchored edges, obtain the defect characteristics of the new edges.
[0064] It should be noted that since there are dense folds in the air filter, when collecting the grayscale image of the filter by an industrial camera, due to the difference in the angle between the folds at different positions in the filter and the camera, the folds at positions far from the camera will be blocked, resulting in different performances of the folds at different positions in the grayscale image of the filter, making it difficult to accurately detect the defective areas in the filter. Therefore, this embodiment proposes a method for batch quality inspection of finished products for purifying filter production, specifically detecting the edges in the grayscale image of the filter through iterative thresholding, analyzing the edge changes detected in the grayscale image of the filter at different thresholds, and detecting the defective areas in the filter.
[0065] It should be further noted that the farther the distance between the folds in the filter and the industrial camera, the more part of the transition information between the folds is lost due to being blocked, resulting in less obvious gray-scale changes between the fold and its adjacent folds; conversely, the closer the distance between the folds in the filter and the industrial camera, the more obvious the gray-scale changes between the fold and its adjacent folds; therefore, normally, the edges in the grayscale image of the filter will spread in the direction away from the industrial camera as the threshold decreases, and when the folds in the filter are damaged, it will interfere with the spread, so as to obtain the defect characteristics at each position in the filter.
[0066] Preferably, in a specific embodiment of the present invention, an initial threshold and a termination threshold and a threshold iteration step size , 、 and The specific values of can be set by yourself according to the actual situation. There is no strict requirement in this embodiment. In this embodiment, 、 、 are used for narration; set the threshold in the sobel operator to Perform edge detection on the grayscale image of the filter screen to obtain the first filter screen edge image;
[0067] Set the threshold in the sobel operator to Perform edge detection on the grayscale image of the filter screen to obtain the second filter screen edge image; set the threshold in the edge detection operator to Perform edge detection on the grayscale image of the filter screen to obtain the third filter screen edge image; set the threshold in the edge detection operator to Perform edge detection on the grayscale image of the filter screen to obtain the fourth filter screen edge image; and so on, until the threshold in the sobel operator is set to Perform edge detection on the grayscale image of the filter screen to obtain the th filter screen edge image, the .
[0068] It should be noted that since the farther the distance between the folds in the filter screen and the industrial camera, the less obvious the gray-scale change between the fold and its adjacent fold, a small threshold is required to identify it; while the folds near the industrial camera do not lose the transitional information between the folds. Therefore, while the folds far from the industrial camera are identified, the transitional parts between the folds close to the industrial camera will also be identified, thus interfering with the feature that the edge in the grayscale image of the filter screen will spread away from the industrial camera as the threshold decreases. Therefore, it is necessary to analyze them separately.
[0069] Preferably, in a specific embodiment of the present invention, obtain the nearest position to the camera in any filter screen edge image, and draw a straight line parallel to the fold along this position as the diffusion center line of this filter screen edge image; for the th filter screen edge image ( ), use the edge pixel points in the th filter screen edge image to perform masking processing on the edge pixel points in the th filter screen edge image, and mark the edge pixel points that exist in the th filter screen edge image but do not exist in the th filter screen edge image as the newly added edge pixel points in the th filter screen edge image; combine the th filter screen edge image with the The edge pixels existing in the edge diagrams of all filter meshes are denoted as the anchored edge pixels in the edge diagrams of the
[0070] filter meshes; and the newly added adjacent edge pixels in the edge diagrams of the
[0071] filter meshes are grouped into the same newly added edge, and the adjacent anchored edge pixels are grouped into the same anchored edge.
[0072] Furthermore, the newly added edges adjacent to the anchored edge in the
[0073] edge diagrams of the filter meshes are denoted as the spreading edges of the anchored edge; the newly added edges not adjacent to the anchored edge are denoted as independent edges; where adjacent means that there are octal neighborhood adjacent pixels between two edges.
[0074]
[0075] It should be noted that the independent edge represents the area with the most obvious gray level change between the folds in the filter gray scale diagram. Since the edges in the filter gray scale diagram will spread away from the industrial camera as the threshold decreases, and since the spacing between the folds in the filter is uniform, therefore, as the threshold decreases, the independent edges in the filter edge diagram will spread away from the industrial camera uniformly. That is, under normal circumstances, the distance between each independent edge in the filter edge diagram and the diffusion center line is similar. And when the distance between a certain independent edge and the diffusion center line is more different from the distances between other independent edges and the diffusion center line, it indicates that the fold corresponding to this independent edge is more likely to be damaged and have defects. Therefore, the defect characteristics of the independent edge can be obtained accordingly.
[0075] It should be further noted that the spreading edge represents the gray level transition area between the folds, that is, the spreading edge should correspond to the same area between the folds as its adjacent anchored edge in the filter. Therefore, the spreading edge should be similar to its adjacent anchored edge. Therefore, when calculating the defect characteristics of the spreading edge, a calculation weight should be given according to the similarity degree between the spreading edge and its adjacent anchored edge. Preferably, in a specific embodiment of the present invention, for the th independent edge in the Represents the number of independent edges in the edge map of the th filter screen; Represents the th filter screen edge map th independent edge and the distance between the diffusion midline of the th filter screen edge map; Represents the th filter screen edge map th independent edge and the distance between the diffusion midline of the th filter screen edge map; Represents the absolute value function; Represents the linear normalization function, and the normalization range is for all independent edges in all filter screen edge maps ,
[0076] For the th filter screen edge map th spreading edge, group the th spreading edge and the adjacent anchor edge of the th spreading edge into the same local edge, denoted as the th local edge; Obtain the Pearson correlation coefficient between the th local edge and the th spreading edge. Since the Pearson correlation coefficient is a well-known prior art, it will not be elaborated in this embodiment; Combine the distances between all spreading edges in the th filter screen edge map and the diffusion midline of the th filter screen edge map to obtain the defect feature of the th filter screen edge map th spreading edge. Its specific calculation formula is:
[0077] ,
[0078] In the formula, represents the defect feature of the th filter screen edge map th spreading edge; represents the number of spreading edges in the th filter screen edge map; represents the th filter screen edge map th spreading edge and the distance between the diffusion midline of the th filter screen edge map; represents the th filter screen edge map th spreading edge and the distance between the diffusion midline of the th filter screen edge map; Indicates the Pearson correlation coefficient between the th local edge and the th spreading edge; .
[0079] It should be noted that for independent edges, when the distance difference between a certain independent edge region and other independent edges on the diffusion center line is larger, it indicates that the fold corresponding to the independent edge is more likely to be damaged. Therefore, the larger the value of
[0080] , the more likely the fold corresponding to the independent edge is to be damaged, and the greater its defect feature; for the spreading edge, different from the independent edge, the spreading edge corresponds to the gray-scale transition part between the folds. Therefore, the shape of the spreading edge should be similar to its local edge. The less similar the spreading edge is to its local edge, the more likely the corresponding fold is to be damaged. Therefore, a negatively correlated calculation weight needs to be assigned according to the similarity between the shape of the spreading edge and its local edge to obtain the defect feature of the spreading edge.
[0081] Thus, the defect feature of the newly added edge is obtained.
[0081] Step S003: According to the similarity between different edges in each filter edge map, obtain the abnormality degree of each edge in each filter edge map; according to the abnormality degree of the edges in each filter edge map in different filter edge maps, obtain the abnormality weight of each edge in each filter edge map, and combine the abnormality degree of each edge in each filter edge map to obtain the abnormality factor of each edge in each filter edge map.
[0082] It should be noted that since the spacing between the folds in the filter is uniform, the distribution of the edges of the folds in the filter edge image has a certain regularity. When there are defects in the folds on the filter surface, the regularity of the folds on the filter surface will be destroyed; therefore, when the difference between the edge in the filter edge map and other edges is larger, the fold corresponding to the edge is more likely to be damaged and defective, and thus the abnormality degree of the edge is obtained; and since the defect area where the fold is damaged is stable within a certain threshold range, the abnormality weight of the edge can be obtained according to the stability of the edge abnormality degree in different filter edge maps, and further combined with the abnormality degree of the edge to obtain the edge abnormality factor.
[0083] Preferably, in a specific embodiment of the present invention; for the th edge and the th edge in the th filter edge map; the Take the first pixel point of one of the edges as the coordinate origin, with the horizontal right direction in the filter screen edge map as the x-axis direction and the vertical upward direction in the filter screen edge map as the y-axis direction to construct the morphological space of the th edge. Similarly, construct the morphological space of the th edge. As shown in Figure 3 , Figure 3 is the schematic diagram of the morphological space of the th edge and the th edge;
[0084] According to the coordinates of the th edge and the th edge in their respective morphological spaces, obtain the DTW distance between the th edge and the th edge. Since the DTW distance is a well-known existing technology, it will not be elaborated in this embodiment;
[0085] For the th edge in the th filter screen edge map, obtain the DTW distances between the th edge in the th filter screen edge map and all other edges in the th filter screen edge map; Combine the distances between each edge in the th filter screen edge map and the diffusion center line of the th filter screen edge map to obtain the abnormality degree of the th edge in the th filter screen edge map. Its specific calculation formula is:
[0086] ,
[0087] In the formula, represents the abnormality degree of the th edge in the th filter screen edge map; represents the number of edges in the th filter screen edge map; represents the DTW distance between the th edge and the th edge in the th filter screen edge map; represents the distance between the th edge and the diffusion center line of the th filter screen edge map in the th filter screen edge map; represents the distance between the th edge and the th edge in the The distance between the diffusion center lines of the edge diagrams of the the distance between the th edge in the edge diagram of the th filter screen and the diffusion center line of the edge diagram of the Denote the absolute value function; Denote the linear normalization function, and its normalization range is the of all edges in the edge diagram of the .
[0088] It should be noted that, since the spacing between the folds in the filter screen is uniform, the distribution of the edges of the folds in the edge image of the filter screen has a certain regularity. The closer the distances between two edges and the diffusion center line in the edge diagram of the filter screen are, the more similar the two edges should be. Therefore the the larger the value of, the more likely the fold corresponding to the th edge in the edge diagram of the th filter screen is damaged, that is, the th edge in the edge diagram of the th filter screen has a greater degree of abnormality.
[0089] It should be further noted that, since the performance of the defective area where the fold is damaged is stable within a certain threshold range, the abnormal weight of the th edge in the edge diagram of the th filter screen can be obtained according to the stability of the edge abnormality degree in different edge diagrams of the filter screen.
[0090] Preferably, in a specific embodiment of the present invention, a threshold range is preset, and the specific value of can be set according to the actual situation by itself. This embodiment does not make a rigid requirement. In this embodiment, it is described with ; for the th edge diagram of the filter screen, the edge diagram of the filter screen whose difference (absolute value of the difference) from the th edge diagram of the filter screen in terms of the threshold is less than is used as the threshold adjacent edge diagram of the th edge diagram of the filter screen;
[0091] Furthermore, for the th edge in the edge diagram of the th filter screen, record the coordinates of the th edge in the edge diagram of the th filter screen as the reference coordinates; record the area composed of the edge pixel points located under the reference coordinates in the threshold adjacent edge diagram of the th filter screen as the The corresponding area of the th edge in the edge diagram of the th filter screen; according to the abnormality degree between the corresponding areas, obtain the th abnormality weight of the
[0092] ,
[0093] In the formula, represents the th abnormality weight of the th edge in the edge diagram of the represents the th abnormality degree of the th corresponding area of the th edge in the edge diagram of the represents the th average value of the abnormality degrees of all corresponding areas of the th edge in the edge diagram of the represents the th number of corresponding areas of the th edge in the edge diagram of the represents the linear normalization function, and its normalization range is the th all edges in the edge diagram of the .
[0094] It should be noted that represents the th instability of the abnormality degree of the th corresponding area of the th edge in the edge diagram of the th filter screen; since the defective area where the fold is damaged is stable within a certain threshold range, so if the th abnormality degree of the th corresponding area of the th edge in the edge diagram of the th filter screen is more unstable, then the th edge in the edge diagram of the
[0095] In a specific embodiment of the present invention, for the th edge in the edge diagram of the th filter screen, according to the th abnormality degree of the th edge in the edge diagram of the th filter screen, combined with the The abnormal weight of an edge, and obtain the abnormal factor of the th edge in the
[0096] ,
[0097] In the formula, represents the abnormal factor of the th edge in the th edge map of the filter screen; represents the abnormal degree of the th edge in the th edge map of the filter screen; represents the abnormal weight of the th edge in the th edge map of the filter screen.
[0098] It should be noted that since both the abnormal factor and the abnormal degree of the edge are such that the larger they are, the more likely the edge is to be damaged; therefore, the larger the value of the abnormal factor of the edge, the more likely the edge is to be damaged; and since the destruction of the folds in the filter screen will cause the destruction of its gray-scale transition and thus generate edges, that is, defects will generate edges, so for the pixel points in the filter screen edge map that are not edge pixel points, the abnormal factor of the pixel points is zero.
[0099] Thus, the abnormal factor of the edge in the filter screen edge map is obtained.
[0100] Step S004: According to the abnormal factor of each edge in each filter screen edge map and the defect characteristics of the newly added edges, obtain the possibility that each pixel point is a defective pixel point; according to the possibility that each pixel point is a defective pixel point, detect the quality of the finished filter screen.
[0101] It should be noted that by obtaining the defect characteristics of the newly added edges and the abnormal factor of the edges through step S002 and step S003 respectively; the defect characteristics and abnormal factor of each pixel point can be obtained through the defect characteristics of the newly added edges and the abnormal factor of the edges, and further the possibility that each pixel point is a defective pixel point can be obtained, so as to detect the quality of the filter screen.
[0102] Preferably, in a specific embodiment of the present invention, for the th newly added edge in the th filter screen edge map, take the defect characteristics of the th newly added edge as the defect characteristics of each pixel point in the th newly added edge, and take the The coordinates of each pixel in a newly added edge are recorded as the target coordinates, and the pixels in all other filter edge maps located under the target coordinates are used as the corresponding pixels of each target pixel. Let the defect feature of the corresponding pixel of the target pixel be equal to the defect feature of the target pixel;
[0103] For example: In the th filter edge map, if the defect feature of the th newly added edge is 0.7, then the defect features of all pixels within the th newly added edge in the th filter edge map are all 0.7, and the coordinates of all pixels within the th newly added edge in the
[0104] th filter edge map are all the target coordinates; the defect features of the pixels in all other filter edge maps located under the target coordinates are all 0.7. It should be noted that since the destruction of the folds in the filter will cause the destruction of its gray-scale transition and thus generate edges, that is, defects will generate edges, so for the pixels in all filter edge maps that are not located under the target coordinates, the defect features of these pixels are zero.
[0105] Furthermore, for the th edge in the th filter edge map, take the anomaly factor of the th edge in the th filter edge map as the anomaly factor of each pixel within the th edge;
[0106] For example: If the anomaly factor of the th edge in the th filter edge map is 0.6, then the anomaly factor of each pixel within the th edge in the
[0107] th filter edge map is 0.6. According to the anomaly factor of each pixel and the defect feature of each pixel in all filter edge maps, obtain the possibility that each pixel is a defective pixel. The specific calculation formula is:
[0108] ,
[0109] In the formula, represents the possibility that the th pixel is a defective pixel; represents the number of filter edge maps; represents the anomaly factor of the th pixel in the th filter edge map; represents the defect feature of the th pixel in the edge map of the th filter screen; represents the linear normalization function, and its normalization range is for all pixels
[0110] It should be noted that the larger the abnormal factor and defect feature of a pixel, the more likely it is that the pixel is located at the damaged fold; that is, the defective pixels can be obtained according to the possibility of a pixel being a defective pixel, and the quality of the filter screen can be detected based on this; since there are no new edges in the first edge map of the filter screen, starting from the second edge map of the filter screen, calculate the possibility of each pixel at each position being a defective pixel.
[0111] Specifically, preset a possibility threshold , and its specific value can be set according to the actual situation, and there is no hard requirement in this embodiment. In this embodiment, it is described with =0.8; for any pixel, if the possibility of the pixel being a defective pixel is less than , then the pixel is a normal pixel; if the possibility of the pixel being a defective pixel is greater than or equal to , then the pixel is a defective pixel;
[0112] Furthermore, preset a quality threshold , and its specific value can be set according to the actual situation, and there is no hard requirement in this embodiment. In this embodiment, it is described with ; for any filter screen, if the ratio of normal pixels to all pixels in the filter screen is less than or equal to , then the quality of the filter screen is unqualified; if the ratio of normal pixels to all pixels in the filter screen is greater than , then the quality of the filter screen is qualified.
[0113] So far, this embodiment is completed.
[0114] The above is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent replacements, improvements, etc. made within the principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A finished product batch quality inspection method for purification filter production, characterized in that: The method comprises the following steps: Get the filter grayscale image; Based on the filter grayscale image, several filter edge images are obtained through threshold iteration; the diffusion center line in each filter edge image is obtained; according to the distribution of edge pixels in adjacent filter edge images, the edges in each filter edge image are divided into anchor edges and newly added edges, wherein the newly added edges include independent edges and spreading edges; according to the distance between the newly added edge and the diffusion center line, and the similarity between the spreading edge and the anchor edge, the defect characteristics of the newly added edge are obtained; According to the similarity between different edges in each filter edge map, the abnormality degree of each edge in each filter edge map is obtained; according to the abnormality degree of the edge of each filter edge map in different filter edge maps, the abnormality weight of each edge in each filter edge map is obtained, and combined with the abnormality degree of each edge in each filter edge map, the abnormality factor of each edge in each filter edge map is obtained; According to the abnormal factors of each edge in each filter edge map and the defect characteristics of the newly added edges, the possibility of each pixel being a defective pixel is obtained; according to the possibility of each pixel being a defective pixel, the quality of the filter product is detected; The method of obtaining the diffusion center line in each filter edge map and dividing the edge in each filter edge map into anchor edges and newly added edges according to the distribution of edge pixels in adjacent filter edge maps includes: Get the closest position to the camera in any filter edge image, and draw a straight line parallel to the folds along the position as the diffusion center line of the filter edge image; The filter edge map is used The edge pixels in the filter edge map are Mask the edge pixels in the filter edge map. The filter edge graph exists in The edge pixel that does not exist in the filter edge map is recorded as Add new edge pixels in the filter edge map; The filter edge image and the The edge pixels that exist in all filter edge images are recorded as The anchor edge pixel points in the filter edge map; The adjacent newly added edge pixels in the filter edge map are classified as the same newly added edge, and the adjacent anchor edge pixels are classified as the same anchor edge; The first The newly added edges adjacent to the anchor edge in the filter edge graph are recorded as the spreading edges of the anchor edge; the newly added edges not adjacent to the anchor edge are recorded as independent edges; The method of obtaining the defect feature of the newly added edge according to the distance between the newly added edge and the diffusion center line and the similarity between the spreading edge and the anchoring edge includes: For The edge of the filter independent edge, according to All independent edges in the filter edge graph are The distance between the diffusion midlines of the filter edge graph is obtained. The edge of the filter The specific calculation formula for the defect characteristics of an independent edge is: In the formula, Indicates The edge of the filter Defect characteristics of independent edges; Indicates The number of independent edges in the edge graph of the filter; Indicates The edge of the filter An independent edge and The distance between the diffusion center lines of the filter edge map; Indicates The edge of the filter An independent edge and The distance between the diffusion center lines of the filter edge map; It represents the absolute value function; represents the linear normalization function; For The edge of the filter The spreading edge The spreading edge and The anchor edges adjacent to the spreading edges are classified as the same local edge, denoted as local edges; get the The local edge and The Pearson correlation coefficient between the spreading edges, combined with the All the spreading edges in the filter edge map are The distance between the diffusion midlines of the filter edge graph is obtained. The edge of the filter The defect characteristics of a spreading edge, the specific calculation formula is: In the formula, Indicates The edge of the filter Defect characteristics of a spreading edge; Indicates The number of spreading edges in the filter edge graph; Indicates The edge of the filter The spreading edge and The distance between the diffusion center lines of the filter edge map; Indicates The edge of the filter The spreading edge and The distance between the diffusion center lines of the filter edge map; Indicates The local edge and Pearson correlation coefficient between the spreading edges; represents the linear normalization function; The specific method of obtaining the abnormality degree of each edge in each filter edge map according to the similarity between different edges in each filter edge map is as follows: For The edge of the filter The edge and edge; The first pixel point in the edge is taken as the coordinate origin, the horizontal right direction in the filter edge image is taken as the x-axis direction, and the vertical upward direction in the filter edge image is taken as the y-axis direction. The morphological space of the edge is constructed in the same way. The morphological space of the edges; According to The edge and The coordinates of the edges in their respective morphological spaces are obtained. The edge and DTW distance between edges; For The edge of the filter edge, get the The edge of the filter The edge and The DTW distance between all other edges in the filter edge graph; combined with Each edge in the filter edge graph is The distance between the diffusion midlines of the filter edge graph is obtained. The edge of the filter The degree of abnormality of each edge; The acquisition The edge of the filter The specific calculation formula for the abnormal degree of each edge is as follows: In the formula, Indicates The edge of the filter The degree of abnormality of each edge; Indicates The number of edges in the filter edge graph; Indicates The edge of the filter The edge and DTW distance between edges; Indicates The edge of the filter The edge and The distance between the diffusion center lines of the filter edge map; Indicates The edge of the filter The edge and The distance between the diffusion center lines of the filter edge map; Indicates The edge of the filter The edge and The distance between the diffusion center lines of the filter edge map; It represents the absolute value function; represents the linear normalization function; The specific method of obtaining the abnormal weight of each edge in each filter edge map according to the abnormal degree of the edge of each filter edge map in different filter edge maps includes: Preset a threshold range For the The filter edge map will be The difference in threshold between the filter edge maps is less than The filter edge map is used as the A threshold neighboring edge map of a filter edge map; For The edge of the filter edge, The edge of the filter The coordinates of the first edge are marked as reference coordinates; The area composed of edge pixels located at the reference coordinates in the threshold neighboring edge map of the filter edge map is recorded as The edge of the filter The corresponding area of the edge; according to the abnormality degree between the corresponding areas, obtain the The edge of the filter The specific calculation formula for the abnormal weight of an edge is: In the formula, Indicates The edge of the filter The outlier weight of the edge; Indicates The edge of the filter The edge of The degree of abnormality of the corresponding area; Indicates The edge of the filter The average abnormality of all corresponding areas of the edge; Indicates The edge of the filter The number of corresponding regions of each edge; represents the linear normalization function.
2. A finished product batch quality inspection method for purification filter production according to claim 1, characterized in that: The specific method of obtaining a plurality of filter edge images based on the filter grayscale image by threshold iteration is as follows: Preset an initial threshold , termination threshold and the threshold iteration step size ; Set the threshold in the edge detection operator to Perform edge detection on the filter grayscale image to obtain the first filter edge image; Set the threshold in the edge detection operator to Perform edge detection on the filter grayscale image to obtain a second filter edge image; Set the threshold in the edge detection operator to Perform edge detection on the filter grayscale image to obtain the third filter edge image; And so on, until the threshold in the edge detection operator is set to Perform edge detection on the filter grayscale image and obtain the A filter edge map, where .
3. A finished product batch quality inspection method for purification filter production according to claim 1, characterized in that: The specific method of obtaining the abnormal factor of each edge in each filter edge map includes: For The edge of the filter edge, according to The edge of the filter The abnormality of the edge, combined with the The edge of the filter The anomaly weight of the edge is obtained The edge of the filter The specific calculation formula of the abnormal factor of an edge is: In the formula, Indicates The edge of the filter The outlier factor of the edge; Indicates The edge of the filter The degree of abnormality of each edge; Indicates The edge of the filter The outlier weight of the edge.
4. A finished product batch quality inspection method for purification filter production according to claim 1, characterized in that: The method of obtaining the possibility that each pixel is a defective pixel according to the abnormal factor of each edge in each filter edge map and the defect feature of the newly added edge includes: For The edge of the filter Add an edge to the The defect feature of the newly added edge is used as the The defect features of each pixel in the newly added edge are The coordinates of each pixel in the newly added edge are marked as the target coordinates, and the pixels in all other filter edge images located under the target coordinates are taken as the corresponding pixels of the target pixel, and the defect features of the corresponding pixels of the target pixel are set to be equal to the defect features of the target pixel; For The edge of the filter edge, The edge of the filter The anomaly factor of the edge is used as the The abnormal factor of each pixel within the edge; According to the abnormal factors of each pixel in all filter edge images and the defect characteristics of each pixel, the possibility of each pixel being a defective pixel is obtained. The specific calculation formula is: In the formula, Indicates The possibility that a pixel is a defective pixel; Indicates the number of filter edge graphs; Indicates The filter edge is shown in Figure The abnormal factor of each pixel; Indicates The filter edge in the figure Defect characteristics of pixels; represents the linear normalization function.
5. A finished product batch quality inspection method for purification filter production according to claim 1, characterized in that: The method of detecting the quality of the finished filter according to the possibility that each pixel is a defective pixel includes: Preset a probability threshold For any pixel, if the probability that the pixel is a defective pixel is less than , then the pixel is a normal pixel; if the probability that the pixel is a defective pixel is greater than or equal to , then the pixel is a defective pixel; Preset a quality threshold ; For any filter, if the ratio of normal pixels to all pixels in the filter is less than or equal to If the ratio of normal pixels to all pixels in the filter is greater than When , the filter quality is qualified.
Citation Information
Patent Citations
Natural leather defect visual detection system for basketball
CN116152242A
Artificial Intelligence-Based Defect Detection Method for Rotary Furnace Inner Wall
CN116805317A