Filter screen quality detection method based on aperture consistency analysis
By introducing dual optimization factors of gradient spatial analysis and spatial texture information into the active contour model, the problem of local gradient anomalies in filter hole size consistency analysis is solved, and high-precision and stable detection of filter hole size edges are achieved.
Patent Information
- Application Number
- CN202510422911.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-07
- Publication Date
- 2025-07-11
- Estimated Expiration
- 2045-04-07
AI Technical Summary
The existing active profile model cannot effectively deal with the problem of local gradient abnormality in image data caused by abnormal microstructure of the filter surface in the filter screen, resulting in reduced accuracy and reliability of aperture detection and increased misjudgment rate.
By introducing dual optimization factors based on gradient spatial analysis and spatial texture information, the first optimization factor recognizes and suppresses local gradient anomalies, and the second optimization factor accurately quantifies the local contour curvature fractal dimensions and gradient field spatial texture complexity, improving the boundary extraction accuracy of the active contour model.
It significantly improves the accuracy and stability of filter quality detection, ensures that the active profile curve is stable close to the edge of the real aperture, and improves the accuracy of aperture geometric parameter detection and the reliability of consistency analysis.
Smart Images

Figure CN120298371A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of image detection, and particularly to a method for detecting the quality of a filter screen based on aperture consistency analysis. Background Art
[0002] As a core filtering component in the processes of industrial manufacturing, medical equipment, and high-end electronic product production, the consistency of aperture size is one of the important indicators determining its performance, quality stability, and service life. In recent years, with the continuous development of industrial technologies and production processes, higher requirements have been put forward for the aperture consistency of filter screens. Especially in high-precision industrial scenarios, such as high-precision nickel alloy filter screens in the microelectronic chip manufacturing process and high-performance filter membranes used for filtering drugs or biological products in the medical industry, the filter screen apertures are required to reach strict micron or even sub-micron level uniformity to meet the needs of precision filtering. Therefore, the research and development of filter screen quality detection technology have gradually become a hot spot and a difficult point in the industrial field. Currently, the methods for detecting the quality of filter screens are usually based on digital image processing and analysis technologies. The aperture image of the filter screen is captured by a high-resolution CCD industrial camera, and then image analysis algorithms are used to accurately calculate the geometric features of the apertures in the filter screen, such as aperture area, roundness, diameter variation coefficient, etc., to evaluate the overall quality and consistency of the filter screen. Among them, the image edge extraction algorithm represented by the Active Contour Model (ACM) has significant technical advantages and broad application prospects in the field of high-precision filter screen aperture extraction because it can achieve high-precision extraction of the boundary contour through iteration in a complex image background. The active contour model realizes the iterative convergence of the edge curve to the real aperture boundary by constructing an energy function containing internal energy (smooth constraint term) and external energy (image gradient constraint term), so as to accurately obtain the aperture contour features. This method overcomes the defects of traditional threshold segmentation and simple edge detection technologies, such as insufficient sensitivity to image gray level changes and weak anti-interference ability, and significantly improves the accuracy of filter screen aperture extraction and consistency analysis. In addition, industrial practice shows that the active contour model can effectively process the uniform gradient edge information presented by most normal filter screen images, making the calculation results of aperture geometric parameters more in line with the actual situation, and further enhancing the practical value of this method in the high-end industrial field.
[0003] Although the active contour model has shown significant advantages in the quality inspection and consistency analysis of filter screen pore sizes, with the development of filter screen manufacturing processes towards higher precision and stability, this method has gradually revealed serious technical defects in practical industrial applications. In particular, it is unable to effectively address the problem of local gradient anomalies in image data caused by abnormal microscopic structures on the filter screen surface. This defect is particularly prominent during the inspection of high-precision metal filter screens (such as nickel alloy filter screens). In high-precision industrial scenarios, due to the complexity of filter screen production processes (such as chemical etching, laser processing, or electroplating processes), microscale grain structure differences or extremely fine impurity particles often appear on the material surface. During the digital image capture process, these microscopic structures often form high-brightness reflection points or reflection regions due to the local reflection characteristics of the material surface. Although these abnormal regions are extremely small in scale, perhaps only a few pixels in size, they exhibit extremely high local gradient amplitudes and strong local gradient randomness in the image gradient feature space. There are significant differences between these abnormal data features and normal pore edge data, specifically manifested in the following aspects: First, the local gradient amplitude in the abnormal region is significantly higher than that in the surrounding normal pore edge region, forming an obvious gradient amplitude anomaly; Second, the gradient directions within the abnormal region show a highly random distribution, and the gradient direction entropy is much higher than that of the normal pore edge gradient direction entropy, resulting in an obvious direction randomness anomaly; Third, from the perspective of spatial distribution characteristics, the gradient information in these abnormal regions is highly isolated, and the spatial gradient correlation is extremely low, showing a huge difference from the spatial continuity and consistency of the normal pore edge gradient characteristics. Due to these special data anomaly characteristics, the active contour model is often misled by the local high gradient values in these abnormal regions during the process of pore edge extraction, resulting in incorrect edge evolution trends, causing obvious local bulges or depressions in the active contour curve near the abnormal region, and ultimately leading to the inability to accurately converge to the true edge of the pore, resulting in significant errors in key geometric parameters such as pore area, diameter, and roundness. This situation not only reduces the accuracy and reliability of filter screen pore size detection but also significantly increases the misjudgment rate of filter screens during the actual production process, leading to low efficiency in product quality control. Therefore, how to deeply analyze the specific anomaly characteristics and generation mechanisms of filter screen image data, propose a more refined and accurate local abnormal region recognition method, and improve the boundary extraction accuracy of the active contour model based on this has become an urgent problem to be solved. Summary of the Invention
[0004] In view of this, the present invention aims to propose a filter screen quality inspection method based on pore size consistency analysis to solve the accuracy of filter screen pore size consistency analysis through the active contour model.
[0005] To achieve the above object, the technical solution of the present invention is realized as follows:
[0006] A filter screen quality inspection method based on pore size consistency analysis, the method comprising the following steps:
[0007] Step S1: Collect the filter screen image;
[0008] Step S2: Optimize the active contour model based on the local feature analysis of the filter screen image;
[0009] Step S2.1: Obtain the first optimization factor through gradient space analysis;
[0010] Step S2.2: Obtain the second optimization factor through spatial texture information analysis;
[0011] Step S2.3: Optimize the active contour model for aperture detection using the first optimization factor and the second optimization factor;
[0012] Step S3: Detect the aperture of the filter screen using the optimized active contour model and evaluate the quality of the filter screen.
[0013] Furthermore, the specific steps for obtaining the first optimization factor in Step S2.1 through gradient space analysis include:
[0014] Obtain the filter screen image data. Through the gradient magnitude evaluation and analysis of the pixel neighborhood window, obtain the spatial gradient disorder degree of the pixel; through the gradient direction discretization analysis of the pixel neighborhood window, obtain the local gradient disorder degree of the pixel; through the correlation analysis of the local spatial gradient of the pixel, obtain the local autocorrelation coefficient of the spatial gradient of the pixel; through the fusion analysis of the spatial gradient disorder degree, local gradient disorder degree and local autocorrelation coefficient of the spatial gradient of the pixel, obtain the first optimization factor of the pixel in the filter screen image.
[0015] Furthermore, the specific steps for obtaining the spatial gradient disorder degree of the pixel through the gradient magnitude evaluation and analysis of the pixel neighborhood window, obtaining the local gradient disorder degree of the pixel through the gradient direction discretization analysis of the pixel neighborhood window, and obtaining the local autocorrelation coefficient of the spatial gradient of the pixel through the correlation analysis of the local spatial gradient of the pixel include:
[0016] Obtain the neighborhood window of the pixel in the set filter screen image data. Evaluate the spatial gradient disorder degree of the pixel through the probability distribution of the gradient magnitude in the neighborhood window of the pixel. The evaluation formula for the spatial gradient disorder degree of the pixel is:
[0017] ;
[0018] where represents the spatial gradient disorder degree of the pixel with coordinates in the filter screen image data; represents the linear normalization function; Indicates the probability that the gradient magnitude of the pixel points in the neighborhood window falls into the th interval, ; Indicates the number of gradient magnitudes of the pixel points in the th interval; Indicates the side length of the neighborhood window of the pixel point; Indicates a very small positive number;
[0019] Discretize the gradient directions of the pixel points in the neighborhood window of the pixel point, and evaluate the local gradient disorder degree through the gradient direction distribution after discretization. The local gradient disorder degree evaluation formula of the pixel point is:
[0020] ;
[0021] Among them, Indicates the local gradient disorder degree of the pixel point with coordinates in the filter screen image data; Indicates the linear normalization function; Indicates the Q direction intervals of gradient direction discretization; Indicates the gradient direction co-occurrence matrix of the neighborhood window of the pixel point with coordinates in the filter screen image data, ; Indicates the number of times that the direction interval and the direction interval appear adjacent to each other in the neighborhood; Indicates a very small positive number;
[0022] The calculation formula of the spatial gradient local autocorrelation coefficient of the pixel point is:
[0023] ;
[0024] Among them, Indicates the spatial gradient local autocorrelation coefficient of the pixel point with coordinates in the filter screen image data; Indicates the side length of the neighborhood window of the pixel point; Indicates the sum of the elements of the weight matrix; Indicates the set of all pixel points in the neighborhood window centered on the pixel point with coordinates ; Indicates the element of the spatial adjacency weight matrix, the adjacent pixel takes the value , otherwise it is ; Indicates the average value of the gradient magnitudes within the local window.
[0025] Further, by fusing and analyzing the spatial gradient disorder degree, local gradient disorder degree, and spatial gradient local autocorrelation coefficient of pixel points, the first optimization factor of pixel points in the filter screen image is obtained, which specifically includes:
[0026] The calculation formula for the first optimization factor of pixel points in the filter screen image is:
[0027] ;
[0028] Wherein, represents the first optimization factor of the pixel point with coordinates in the filter screen image data; represents the spatial gradient disorder degree of the pixel point with coordinates in the filter screen image data; represents the local gradient disorder degree of the pixel point with coordinates in the filter screen image data; represents the spatial gradient local autocorrelation coefficient of the pixel point with coordinates in the filter screen image data; represents the constant .
[0029] Further, in step S2.2, the second optimization factor is obtained through spatial texture information analysis, which specifically includes:
[0030] Obtain the contour curve in the original active contour model. By analyzing the number of boxes of the contour curve, the local contour curvature fractal dimension at any position in the contour curve is obtained; by performing texture analysis on the local part of the contour curve, the spatial texture complexity of the gradient field at any position in the contour curve is obtained; by performing consistency analysis on the local gradient field direction of the contour curve, the spatial consistency degree of the gradient field direction at any position in the contour curve is obtained; by fusing and analyzing the local contour curvature fractal dimension, spatial texture complexity of the gradient field, and spatial consistency degree of the gradient field direction at any position in the contour curve, the second optimization factor at any position in the contour curve of the active contour model is obtained.
[0031] Further, by analyzing the number of boxes of the contour curve, the local contour curvature fractal dimension at any position in the contour curve is obtained; by performing texture analysis on the local part of the contour curve, the spatial texture complexity of the gradient field at any position in the contour curve is obtained; by performing consistency analysis on the local gradient field direction of the contour curve, the spatial consistency degree of the gradient field direction at any position in the contour curve is obtained, which specifically includes:
[0032] The calculation formula for the local contour curvature fractal dimension at any position in the contour curve is:
[0033] ;
[0034] Among them, represents the local contour curvature fractal dimension at the position of the contour curve ; represents the side length of the small square used to cover the local contour curve represents when using small squares with side length to cover the local contour curve segment to be analyzed, the minimum number of boxes required represents the linear normalization function
[0035] The calculation formula for the complexity of the gradient field spatial texture at any position in the contour curve is:
[0036] ;
[0037] Among them, represents the complexity of the gradient field spatial texture at the position of the contour curve ; represents the linear normalization function represents the element value at position in the gray-level co-occurrence matrix represents the number of gray levels of the gray-level co-occurrence matrix
[0038] The calculation formula for the degree of consistency of the gradient field direction space at any position in the contour curve is:
[0039] ;
[0040] Among them, represents the degree of consistency of the gradient field direction space at the position of the contour curve ; represents the total number of pixels in the local neighborhood represents the th pixel gradient direction unit vector in the local neighborhood ; represents the angle of the th pixel gradient direction represents a very small positive number
[0041] Furthermore, by fusing and analyzing the local contour curvature fractal dimension, the complexity of the gradient field spatial texture, and the degree of consistency of the gradient field direction space at any position in the contour curve, the second optimization factor at any position in the contour curve of the active contour model is obtained, specifically including:
[0042] The calculation formula for the second optimization factor at any position in the contour curve of the active contour model is:
[0043] ;
[0044] Among them, represents the second optimization factor at the position of the contour curve ; represents the local contour curvature fractal dimension at the position of the contour curve ; represents the complexity of the gradient field spatial texture at the position of the contour curve ; represents the degree of consistency of the gradient field direction space at the position of the contour curve ; represents a constant .
[0045] Furthermore, in step S2.3, the active contour model for aperture detection is optimized by the first optimization factor and the second optimization factor, specifically including:
[0046] The formula for the energy function of the active contour model optimized by the first optimization factor and the second optimization factor for aperture detection is:
[0047] ;
[0048] Among them, represents the energy function of the active contour model optimized by the first optimization factor and the second optimization factor; represents the second optimization factor at the position of the contour curve ; represents the smoothing term (internal force) of the original active contour model, , represents the weight parameter of the elastic constraint strength of the curve in the internal force term of the active contour model; represents the weight parameter of the rigid constraint strength of the curve in the internal force term of the active contour model; represents the coordinate at the position on the active contour curve; represents the first optimization factor of the pixel at the position of the contour curve ; represents the external force term of the original active contour model, , represents the gradient amplitude of the image at the curve position .
[0049] Furthermore, in step S3, the optimized active contour model is used for filter aperture detection and filter quality evaluation, specifically including the following steps:
[0050] Step 1: Initialize the active contour model. In the filter screen image to be analyzed, perform image binarization through the Otsu threshold method and place an initialized contour curve in each aperture region.
[0051] Step 2: Perform iterative update through the optimized energy function, that is, minimize the energy function by the gradient descent method in each iteration.
[0052] Step 3: Set the convergence threshold of the energy function in the iterative process and obtain all the aperture edge contour curves in the filter screen where the iteration converges.
[0053] Step 4: Obtain the aperture area, aperture equivalent diameter, aperture perimeter, and aperture roundness through the aperture edge contour curve.
[0054] Step 5: Obtain the coefficient of variation of aperture area through the standard deviation of all aperture areas in the filter screen; obtain the evaluation of aperture roundness consistency through the standard deviation of all aperture roundness in the filter screen.
[0055] Step 6: Perform quality evaluation through the coefficient of variation of aperture area, the evaluation of aperture roundness consistency, and the aperture roundness to obtain the filter screen quality score.
[0056] Step 7: Set the filter screen quality score threshold, and evaluate the filter screen with a filter screen quality score greater than or equal to the filter screen quality score threshold as qualified in quality, otherwise evaluate it as unqualified in quality.
[0057] Compared with the prior art, the present invention has the following advantages:
[0058] The filter screen quality detection method based on aperture consistency analysis described in the present invention significantly improves the accuracy and stability of filter screen quality detection through two optimization factors. The first optimization factor By comprehensively considering the degree of spatial gradient chaos, the degree of local gradient chaos, and the gradient spatial autocorrelation characteristics, it effectively avoids the problem that the active contour model is misled by significantly abnormal regions in the initial stage, ensuring that the active contour curve stably approaches the true aperture edge in the initial stage; the second optimization factor Precisely quantifies the local contour curvature fractal dimension, the complexity of the gradient field spatial texture, and the gradient direction consistency, and successfully solves the problem of micro-scale local abnormal deformation in the later evolution stage of the active contour model. The synergistic effect of the two-step optimization factors enables the active contour model to stably, efficiently, and accurately extract the filter screen aperture boundary, improving the accuracy of aperture geometric parameter detection and the reliability of consistency analysis. BRIEF DESCRIPTION OF THE DRAWINGS
[0059] The drawings constituting a part of the present invention are used to provide a further understanding of the present invention. The schematic embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation to the present invention. In the drawings:
[0060] Figure 1 This is the flowchart of the filter screen quality detection method based on aperture consistency analysis according to the embodiments of the present invention. Detailed implementation manners
[0061] It should be noted that, without conflict, the embodiments in the present invention and the features in the embodiments may be combined with each other.
[0062] In the description of the present invention, it should be noted that the orientation or positional relationship indicated by the terms "upper", "lower", "inner", "back", etc. is based on the orientation or positional relationship shown in the drawings, and is only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and thus should not be construed as a limitation to the present invention. In addition, the terms "first" and "second" are only used for descriptive purposes and cannot be construed as indicating or implying relative importance.
[0063] The present invention will be described in detail below with reference to the drawings and in conjunction with the embodiments.
[0064] See Figure 1 , which is the flowchart of the filter screen quality detection method based on aperture consistency analysis provided by Embodiment 1 of the present invention. As Figure 1 shown, the filter screen quality detection method based on aperture consistency analysis may include:
[0065] S1, Filter screen image acquisition.
[0066] In the quality detection link of filter screen production, an industrial high-resolution CCD industrial camera is used as the filter screen image acquisition device to ensure that the image has a sufficiently high spatial resolution and clarity. Specifically, the effective resolution of the CCD industrial camera is not less than 8 million, so as to ensure that the fine features at the edge of a single filter screen aperture can be clearly expressed and recognized in the image.
[0067] After the image acquisition is completed by the CCD industrial camera, the acquired surface image of the filter screen is transmitted and stored in real time through an industrial image acquisition card to a dedicated image processing computer for the subsequent filter screen quality detection process based on aperture consistency analysis.
[0068] S2, Optimize the active contour model based on the multi-local feature analysis of the filter screen image.
[0069] In the process of extracting the aperture edge of the filter through the active contour model to analyze the aperture consistency of the filter, due to the influence of complex microscopic phenomena such as micro-scale impurity particles, local grain structure or surface reflection in the filter production process, although these phenomena are extremely small in size, they will show extremely significant abnormal characteristics in the image gradient space, which will directly lead to local misrecognition of the active contour model during edge extraction, that is, the active contour curve is misled by these local gradient abnormal areas, resulting in local convexity or concaveness of the aperture edge, thereby reducing the accuracy of the filter aperture consistency analysis.
[0070] In view of the problems existing in this actual scene, because the gradient characteristics of the abnormal area have significantly different statistical and spatial distribution characteristics from the normal edge area of the aperture, the normal edge area of the aperture has the same gradient direction and strong spatial continuity, which will show a good gradient field spatial structure; while the abnormal area is characterized by violent fluctuations in the local gradient amplitude, highly random directions, and obviously isolated and irregular spatial distribution. Therefore, the present invention obtains the first optimization factor through spatial analysis of pixel points, identifies the above-mentioned abnormal situations, and thus suppresses the interference of these abnormal areas on the active contour model.
[0071] In the process of identifying the problems in the above-mentioned actual scenes through the first optimization factor, although it can initially suppress the obvious gradient anomaly areas in the filter aperture edge area, the active contour model still faces more subtle local morphological anomaly problems in the further evolution and precise convergence process. These problems are manifested as the active contour curve close to the real edge in the later iteration, and the local convexity or concavity with a small but large impact appears, which leads to the extraction accuracy of the aperture farther than that cannot reach the ideal level, affecting the reliability and stability of the subsequent consistency analysis results. The actual scene problem of this situation is that the gradient field around the active contour curve has a more complex spatial structure and subtle directional changes. This complexity is reflected in the obvious enhancement of the local heterogeneity of the gradient field texture, resulting in the uneven gradient attraction felt by the active contour curve in the local range, resulting in subtle morphological deformation. In addition, the geometric morphological characteristics of the curve itself when it is close to the edge also show certain irregularities, especially the complexity of the curvature distribution of the curve in the local area is significantly increased. This geometric irregularity interferes with the smooth evolution trend of the active contour curve and cannot stably maintain the continuity and smoothness of the shape. At the same time, the inconsistency of local gradient direction further aggravates the difficulty of judging the true direction of the edge of the curve at a microscopic scale.
[0072] Therefore, it is necessary to further evaluate the second optimization factor based on the first optimization factor through the geometric characteristics of the curve itself and the spatial texture characteristics of the gradient field, so as to perform local and fine regulation of the active contour curve, thereby correcting and improving the microevolution process of the curve in the active contour model.
[0073] S2.1. Obtain the first optimization factor through gradient space analysis.
[0074] The Active Contour Model (ACM) is widely used in the high-precision recognition of the edge of the filter screen aperture. By defining an energy function and continuously adjusting the position of the contour curve during the iteration process, this model aims to gradually approach the true boundary of the target. Theoretically, the active contour model expects the edge region of the aperture to have stable image gradient field characteristics, that is, the gradient amplitude at the aperture edge should be large and the spatial distribution should be continuous, and the gradient direction should maintain strong consistency within a local range, enabling the active contour to stably evolve along the gradient direction and finally converge to the true boundary.
[0075] However, in the actual analysis process of filter screen image data, there is an obvious gap between the actual situation and the theoretical expectation. Specifically, in the filter screen image, there are often abnormal factors such as micro-scale impurity particles, differences in the grain structure of the material surface, and local reflection bright spots. Although the size of these regions is very small, they have obvious gradient anomaly characteristics: the gradient amplitude fluctuates randomly and violently within a local area, the direction is highly random, and the spatial distribution is highly isolated. This local abnormal gradient region appears as an abnormally high value of local energy or a randomly distributed external force field during the iteration process of the active contour model. This energy anomaly and the randomness of the external force field directly lead to the incorrect convergence of the active contour curve to these local abnormal regions during the evolution process, resulting in local protrusions or depressions, which seriously reduces the initial evolution stability and edge extraction accuracy of the active contour model.
[0076] The reason is that the original design of the active contour model only uses the simple gradient amplitude as the external force guiding index, ignoring the characteristics of randomness and spatial structure complexity of the gradient field within a local range in the actual scenario. Therefore, in the actual complex scenario, the traditional ACM method shows obvious deficiencies when facing complex micro-scale abnormal regions, unable to effectively distinguish the true edge from the local abnormal regions, and thus unable to accurately control the initial evolution direction of the contour.
[0077] In view of the above analysis, to achieve the precise and stable evolution of the active contour model in actual complex filter screen image data, it is necessary to optimize the external force guiding method of the model. The core logic of this optimization lies in: using the spatial random feature information of the gradient field in the actual image data to reconstruct a more accurate external force weight control strategy to ensure that the active contour model can effectively identify and avoid the misguidance of local gradient abnormal regions.
[0078] Specifically, in the initial stage of the active contour model iteration (i.e., the stage when the curve just starts to approach the aperture edge), it is the stage where the local abnormal gradient has the most significant impact on the model. If the misleading effect of the abnormal region on the model evolution can be effectively identified and reduced at this stage, the edge convergence accuracy of the active contour will be greatly improved. Therefore, we need to introduce a new feature index that can reflect the randomness of local gradients, the randomness of directions, and the spatial isolation, so as to accurately judge and control the sensitivity of the active contour to these regions in the initial stage of evolution.
[0079] Calculation formula for the first optimization factor of a pixel point:
[0080]
[0081] Explanation of formula symbols:
[0082] represents the degree of chaos of the spatial gradient of the pixel point, ; where represents the probability that the gradient amplitude of the pixel point in the neighborhood window falls into the th interval, represents a very small positive number, which is set to in this embodiment. Taking as the center, a neighborhood window is selected. In this embodiment, the size of the neighborhood window is selected as , and there is no requirement, which can be adjusted according to the actual scenario. The probability distribution of the gradient amplitude in the statistical window is set. The gradient amplitude range is discretized into levels, then the probability that the gradient amplitude falls into the rd level is .
[0083] represents the degree of local gradient chaos of the pixel point, ; where , represents the direction intervals of the discretized gradient direction, represents the direction interval and the direction interval adjacent occurrences in the neighborhood, represents a very small positive number, which is set to in this embodiment. The gradient direction is discretized into direction intervals to establish a gradient direction co-occurrence matrix , and the spatial distance is set to pixels. The joint occurrence frequency of pixel pairs in the local window is statistically analyzed, and the degree of local gradient rotation of the pixel point is evaluated through the joint occurrence frequency of pixel pairs in the local window.
[0084] represents the spatial gradient local autocorrelation coefficient of pixel points, (used to measure the spatial correlation degree of gradient amplitudes within a local area), , where represents the set of all pixel points within the local window centered at ; represents the element of the spatial adjacency weight matrix, and the value of adjacent pixels is , otherwise it is ; represents the average value of gradient amplitudes within the local window; represents the sum of elements of the weight matrix, .
[0085] It should be noted that when the randomness of the gradient amplitude is high ( large), the randomness of the gradient direction is high ( large), and the spatial distribution isolation is high ( small), the value of the preliminary optimization factor significantly increases, accurately reflecting that the possibility of this area being an abnormal area is extremely high.
[0086] During the specific application process of the active contour model, in the initial stage of contour evolution (i.e., when the initial number of iterations is small), the above-mentioned constructed optimization factor is used to evaluate the abnormality degree of each local area in the image in real time. When has a high value, it indicates that there are obvious abnormal features at this position. At this time, the external force energy weight in the active contour model will automatically decrease, or even directly shield the external force guidance of this area, thus effectively avoiding the incorrect evolution of the active contour curve towards these abnormal areas.
[0087] By directly introducing this optimization factor in the initial stage of the active contour model, we have clearly achieved the efficient recognition and preliminary suppression of gradient abnormal areas in the actual complex image scene by the model. This method effectively makes up for the deficiency of the traditional active contour model that only considers the magnitude of the gradient amplitude and ignores the spatial structure features, ensuring that the active contour model evolves stably towards the true edge position correctly in the initial stage, and significantly improving the overall accuracy and stability of the filter aperture consistency analysis.
[0088] In summary, the complete construction process of the optimization factor not only deeply analyzes the problems in the actual scene, clearly points out the deficiencies of the traditional ACM model, but more importantly, by effectively introducing the gradient entropy feature, it proposes clear optimization logic and method steps, significantly improving the performance and practicality of the active contour model from both theoretical and practical application levels.
[0089] S2.2. Obtain the second optimization factor through the analysis of spatial texture information.
[0090] Based on the collected high-precision filter screen images, by introducing the preliminary optimization factor the risk that the active contour model (ACM) is misled by significantly abnormal gradient regions during the initial iteration process has been effectively reduced. However, in actual scenarios, we further observe that even after the initial suppression by the factor, during the later evolution process of the active contour model approaching the true edge of the filter screen aperture, there may still be subtle but critical local contour abnormalities. This phenomenon is specifically manifested as slight local bulges or depressions when the active contour curve approaches the true boundary, and it cannot accurately fit the true boundary of the aperture, seriously affecting the final extraction accuracy and stability of the aperture edge.
[0091] By further in-depth analysis of the evolution data of the filter screen image and the active contour curve, the fundamental reason for the above phenomenon is the complexity of the gradient field around the active contour curve in terms of spatial structure and direction, as well as the irregularity or complexity that gradually appears in the geometric shape of the active contour curve itself during the later evolution. This local complexity leads to small local morphological changes in the active contour during the later evolution. Although these small changes are not large in scale, they are sufficient to affect the accurate fitting of the overall aperture edge, thereby affecting the reliability and accuracy of the aperture consistency analysis. Therefore, to ensure that the active contour model can still maintain high precision and stability during the later evolution stage, it is necessary to further introduce an optimization factor that can finely depict the local geometric shape of the active contour, the spatial structure and direction information of the local gradient field, so as to achieve refined control and correction of the later evolution of the active contour model.
[0092] For the pixel point position where the contour curve is at the formula for the second optimization factor is:
[0093]
[0094] Explanation of formula symbols:
[0095] represents the fractal dimension of the local contour curvature, , where represents the minimum number of boxes required when covering the local contour curve segment to be analyzed with small squares of side length ; represents the side length of the small square used to cover the local contour curve, that is, the analysis scale;
[0096] represents the complexity of the spatial texture of the gradient field, , where represents the position in the gray-level co-occurrence matrix The element value; is the gray level of the co-occurrence matrix;
[0097] Represents the degree of consistency in the gradient field direction space, , where represents the unit vector of the gradient direction of the th pixel in the local neighborhood ; represents the angle of the gradient direction of the th pixel; represents the total number of pixels in the local neighborhood; represents a very small positive number.
[0098] It should be noted that the numerator part of the second optimization factor is composed of the curvature fractal dimension and the gradient field texture complexity. Through the exponential weighting form, it strengthens the sensitivity of the active contour curve geometric complexity and the local gradient field spatial heterogeneity to the identification of abnormal regions; the denominator part is composed of the degree of consistency in the gradient field direction space. The lower the degree of direction consistency (the stronger the randomness), the smaller the denominator value, thereby further amplifying the value of the overall optimization factor and enhancing the ability to identify local abnormal regions.
[0099] S2.3. Optimize the active contour model for aperture detection through the first optimization factor and the second optimization factor.
[0100] In the traditional active contour model, the contour curve evolves gradually towards the image edge by defining the total energy function (the sum of internal and external force energies), and finally realizes the accurate extraction of the contour. The traditional external force usually directly depends on the simple statistics of the image gradient magnitude or the spatial gradient field, ignoring the gradient randomness and local structure characteristics in the actual scene, resulting in the curve being easily affected by local abnormal gradient points and generating local protrusions or depressions.
[0101] To address this deficiency, based on the two clearly constructed optimization factors above, we designed a phased progressive active contour model optimization method:
[0102] Initial stage: When the active contour curve is just approaching the aperture edge, it is easily misled by obvious abnormal gradient regions. Therefore, in this stage, the preliminary optimization factor is adopted to evaluate the abnormality degree of each position in the image in real time. When the factor is high, reduce or shield the weight of this region in the external force term of the active contour, so as to avoid the active contour curve being attracted by obvious abnormal regions in the initial stage and ensure that the curve stably approaches the true aperture boundary.
[0103] Late stage: When the active contour curve has approached the true edge region, the curve is more sensitive to local micro-scale changes. Minor gradient field irregularities or the geometric complexity of the curve itself may lead to abnormal local deformation. Therefore, in the late stage of the active contour curve evolution, we introduce a refinement and optimization factor , to finely adjust the energy weights in the local area. When is relatively high, enhance the energy of the curve smoothing term (internal force) to correct the abnormal trend of local micro-scale, thereby ensuring that the active contour curve stably and accurately fits the aperture edge.
[0104] The optimized energy function is:
[0105]
[0106] Explanation of formula symbols:
[0107] represents the coordinate at position on the active contour curve;
[0108] represents the smoothing term (internal force) of the original active contour model, ;
[0109] represents the weight parameter for the elastic constraint strength of the curve in the internal force term of the active contour model. This parameter is used to control the degree of constraint on the local length of the contour curve during the evolution process. The larger the value of
[0110] , the more evenly the active contour curve tends to stretch or contract during the iterative evolution process, which is manifested as an enhanced elastic constraint on the overall length of the curve, preventing large stretching or twisting changes in the local curve; represents the weight parameter for the rigid constraint strength of the curve in the internal force term of the active contour model. This parameter is used to control the smoothness constraint on the bending degree of the contour curve during the evolution process.
[0111] The value range of is between ; in this embodiment, it is set as The value range of is between .
[0112] represents the external force term of the original active contour model, , where represents the gradient magnitude of the image at the curve position .
[0113] represents the first optimization factor of the pixel at the position in the image. When there is an obvious abnormal area at the position in the image, the value of increases, then
[0114] is reduced to a smaller value to weaken the external force term and prevent the curve from being misdirected to the abnormal area; represents the second optimization factor of the position in the image. When the geometric complexity and local gradient field anomaly are strong at the position of the curve,
[0115] The optimized energy function realizes the accurate solution of the actual scene problem in the following way:
[0116] In the initial evolution stage, the optimization factor is used to adjust the external force term in real time to ensure that the active contour curve is not affected by the obvious abnormal area prematurely, effectively ensuring the stability of the initial curve evolution and quickly approaching the real aperture edge area.
[0117] In the later evolution stage, when the active contour curve approaches the real aperture edge, the optimization factor is used to finely adjust the local smoothing energy of the curve, correct the abnormal changes that may occur in the micro-scale range of the active contour curve, and ensure that the contour curve finally fits the real boundary of the aperture smoothly and stably.
[0118] This two-step optimization strategy in stages and targeted fundamentally makes up for the problem that the traditional active contour model ignores the structural characteristics of the gradient field and the geometric complexity of the curve, enabling the active contour model to accurately and stably extract the edge of the filter screen aperture, and greatly improving the consistency analysis accuracy of the filter screen quality detection.
[0119] S3. Detect the filter screen aperture through the optimized active contour model and evaluate the filter screen quality.
[0120] After obtaining the energy function of the optimized active contour model, the filter screen aperture image can be extracted through the optimized energy function and the filter screen quality detection based on the aperture consistency analysis can be carried out.
[0121] Step 1. Initialize the active contour model. In the filter screen image to be analyzed, perform image binarization using Otsu's method and place an initialized contour curve in each aperture area.
[0122] Step 2. Perform iterative update through the optimized energy function, that is, minimize the energy function in each iteration. The iterative process of the energy function by the gradient descent method is a well-known existing technology, so it will not be elaborated here.
[0123] Step 3. Set the convergence threshold of the energy function in the iterative process as , and obtain all the aperture edge contour curves in the filter screen where the iteration converges.
[0124] Step 4. Obtain the aperture area, aperture equivalent diameter, aperture perimeter, and aperture roundness through the aperture edge contour curve (calculate the area of each aperture using the contour integral formula, define the aperture equivalent diameter as the diameter of a circle with the same area as the aperture area, and obtain the aperture perimeter using the integral formula).
[0125] Step 5. Obtain the coefficient of variation of the aperture area through the standard deviation of the aperture areas of all apertures in the filter screen , where represents the standard deviation of the aperture areas of all apertures in the filter screen, represents the average value of the aperture areas of all apertures in the filter screen; , where represents the standard deviation of the aperture roundness of all apertures in the filter screen, represents the average value of the aperture roundness of all apertures in the filter screen.
[0126] Step 6. Define the filter screen quality score as , where respectively represent the area consistency weight, roundness consistency weight, and average roundness weight, and the sum of the three is , which can be adjusted according to the actual scenario without limitation.
[0127] Step 7. Complete the filter screen quality detection through the filter screen quality score, set the filter screen quality score threshold , and evaluate the filter screen with a filter screen quality score greater than or equal to the filter screen quality score threshold as qualified in quality, otherwise evaluate it as unqualified in quality.
[0128] 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 spirit and principle of the present invention shall be included within the protection scope of the present invention.
Claims
1. A method for detecting the quality of a filter screen based on aperture consistency analysis, characterized in that, The method includes the following steps: Step S1: Collect the filter screen image; Step S2: Optimize the active contour model based on the local feature analysis of the filter screen image; Step S2.1: Obtain the first optimization factor through gradient space analysis; Step S2.2: Obtain the second optimization factor through spatial texture information analysis; Step S2.3: Optimize the active contour model for aperture detection by using the first optimization factor and the second optimization factor; Step S3: Detect the aperture of the filter screen through the optimized active contour model and evaluate the quality of the filter screen.
2. The method for detecting the quality of a filter screen based on aperture consistency analysis according to claim 1, wherein The step S2.1 obtains the first optimization factor through gradient space analysis, and the specific steps include: Obtain the filter screen image data. Through the gradient amplitude evaluation analysis of the pixel neighborhood window, obtain the spatial gradient disorder degree of the pixel; through the gradient direction discretization analysis of the pixel neighborhood window, obtain the local gradient disorder degree of the pixel; through the correlation analysis of the local spatial gradient of the pixel, obtain the local autocorrelation coefficient of the pixel spatial gradient; through the fusion analysis of the spatial gradient disorder degree, local gradient disorder degree and local autocorrelation coefficient of the pixel spatial gradient of the pixel, obtain the first optimization factor of the pixel in the filter screen image.
3. The method for detecting the quality of a filter screen based on aperture consistency analysis according to claim 2, wherein The obtaining of the spatial gradient disorder degree of the pixel through the gradient amplitude evaluation analysis of the pixel neighborhood window, the obtaining of the local gradient disorder degree of the pixel through the gradient direction discretization analysis of the pixel neighborhood window, and the obtaining of the local autocorrelation coefficient of the pixel spatial gradient through the correlation analysis of the local spatial gradient of the pixel specifically include: Obtain the neighborhood window of the pixel in the set filter screen image data, and evaluate the spatial gradient disorder degree of the pixel through the probability distribution of the gradient amplitude in the neighborhood window of the pixel. The evaluation formula for the spatial gradient disorder degree of the pixel is: ; in, Indicates that the coordinates in the filter image data are The degree of spatial gradient chaos of the pixel points; represents the linear normalization function; Indicates that the gradient amplitude of the pixel point in the neighborhood window falls into the The probability of an interval, ; Indicates the gradient amplitude of the pixel point The number of intervals; Represents the side length of the neighborhood window of the pixel; Represents a very small positive number; Discretize the gradient direction of the pixels in the neighborhood window of the pixel, and evaluate the local gradient disorder degree through the gradient direction distribution after discretization processing. The evaluation formula for the local gradient disorder degree of the pixel is: ; in, Indicates that the coordinates in the filter image data are The degree of local gradient chaos of the pixel points; represents the linear normalization function; Represents the Q direction intervals of the discretization of the gradient direction; Indicates that the coordinates in the filter image data are The gradient direction co-occurrence matrix of the neighborhood window of the pixel point, ; Indicates the direction interval and direction interval The number of adjacent occurrences in the neighborhood; Represents a very small positive number; The calculation formula for the local autocorrelation coefficient of the pixel spatial gradient is: ; Among them, represents the spatial gradient local autocorrelation coefficient of the pixel point with coordinates in the filter image data; represents the side length of the neighborhood window of the pixel point; represents the sum of the elements of the weight matrix; represents the set of all pixel points within the neighborhood window centered on the pixel point with coordinates represents the element of the spatial adjacency weight matrix, and the adjacent pixel takes the value , otherwise it is ; represents the average value of the gradient amplitude within the local window.
4. The method for detecting the quality of a filter screen based on aperture consistency analysis according to claim 3, wherein The obtaining of the first optimization factor of the pixel in the filter screen image through the fusion analysis of the spatial gradient disorder degree, local gradient disorder degree and local autocorrelation coefficient of the pixel spatial gradient specifically includes: The calculation formula for the first optimization factor of the pixel in the filter screen image is: ; Among them, represents the first optimization factor of the pixel point with coordinates in the filter screen image data; represents the degree of spatial gradient disorder of the pixel point with coordinates in the filter screen image data; represents the degree of local gradient disorder of the pixel point with coordinates in the filter screen image data; represents the spatial gradient local autocorrelation coefficient of the pixel point with coordinates in the filter screen image data; represents a constant .
5. The method for detecting the quality of a filter screen based on aperture consistency analysis according to claim 1, wherein The step S2.2 obtains the second optimization factor through spatial texture information analysis, and specifically includes: Obtain the contour curve in the original active contour model. Through the box-counting analysis of the contour curve, obtain the local contour curvature fractal dimension at any position in the contour curve; through the texture analysis of the local part of the contour curve, obtain the spatial texture complexity of the gradient field at any position in the contour curve; through the consistency analysis of the local gradient field direction of the contour curve, obtain the spatial consistency degree of the gradient field direction at any position in the contour curve; through the fusion analysis of the local contour curvature fractal dimension, the spatial texture complexity of the gradient field, and the spatial consistency degree of the gradient field direction at any position in the contour curve, obtain the second optimization factor at any position in the contour curve of the active contour model.
6. The method for detecting the quality of a filter screen based on aperture consistency analysis according to claim 1, wherein The process of obtaining the local contour curvature fractal dimension at any position in the contour curve through the box-counting analysis of the contour curve, obtaining the spatial texture complexity of the gradient field at any position in the contour curve through the texture analysis of the local part of the contour curve, and obtaining the spatial consistency degree of the gradient field direction at any position in the contour curve through the consistency analysis of the local gradient field direction of the contour curve specifically includes: The calculation formula for the local contour curvature fractal dimension at any position in the contour curve is: ; Among them, represents the local contour curvature fractal dimension of the contour curve position; represents the side length of the small square used to cover the local contour curve; represents when using small squares with side length to cover the local contour curve segment to be analyzed, the minimum number of boxes required; represents the linear normalization function; The calculation formula for the spatial texture complexity of the gradient field at any position in the contour curve is: ; Among them, represents the complexity of the spatial texture of the gradient field at the contour curve position; represents the linear normalization function; represents the element value at position in the gray-level co-occurrence matrix; represents the number of gray levels of the gray-level co-occurrence matrix. The calculation formula for the spatial consistency degree of the gradient field direction at any position in the contour curve is: ; in, Represents the contour curve The degree of spatial consistency of the gradient field direction at the location; Represents the total number of pixels in the local neighborhood; Indicates the local neighborhood The unit vector of the pixel gradient direction, ; Indicates The angle of the pixel gradient direction; Represents a very small positive number.
7. The method for detecting the quality of a filter screen based on aperture consistency analysis according to claim 1, wherein The process of obtaining the second optimization factor at any position in the contour curve of the active contour model through the fusion analysis of the local contour curvature fractal dimension, the spatial texture complexity of the gradient field, and the spatial consistency degree of the gradient field direction at any position in the contour curve specifically includes: The calculation formula for the second optimization factor at any position in the contour curve of the active contour model is: ; Among them, represents the second optimization factor of the contour curve position; represents the local contour curvature fractal dimension of the contour curve position; represents the complexity of the gradient field spatial texture of the contour curve position; represents the degree of consistency of the gradient field direction space of the contour curve position; represents a constant .
8. The method for detecting the quality of a filter screen based on aperture consistency analysis according to claim 1, wherein The step S2.3 optimizes the active contour model for aperture detection through the first optimization factor and the second optimization factor, specifically including: The formula for the energy function of the active contour model after optimizing the active contour model for aperture detection through the first optimization factor and the second optimization factor is: ; Among them, represents the energy function of the active contour model optimized by the first optimization factor and the second optimization factor; represents the contour curve The second optimization factor at the position; represents the smoothing term (internal force) of the original active contour model, , represents the weight parameter of the elastic constraint strength of the curve in the internal force term of the active contour model; represents the weight parameter of the rigid constraint strength of the curve in the internal force term of the active contour model; represents the position on the active contour curve The coordinates at the place; represents the contour curve The first optimization factor of the pixel at the position; represents the external force term of the original active contour model, , represents the gradient magnitude of the image at the curve position At the place.
9. The method for detecting the quality of a filter screen based on aperture consistency analysis according to claim 1, characterized in that The step S3 performs the filter aperture detection and the filter quality assessment through the optimized active contour model, specifically including the following steps: Step 1: Initialize the active contour model. In the filter image to be analyzed, perform image binarization through the Otsu threshold method and place an initialized contour curve in each aperture area. Step 2: Perform iterative update through the optimized energy function, that is, minimize the energy function through the gradient descent method in each iteration. Step 3: Set the convergence threshold of the energy function in the iterative process and obtain all the aperture edge contour curves in the filter where the iteration converges. Step 4: Obtain the aperture area, the equivalent diameter of the aperture, the perimeter of the aperture, and the roundness of the aperture through the aperture edge contour curve. Step 5: Obtain the coefficient of variation of the aperture area through the standard deviation of all the aperture areas in the filter; obtain the consistency assessment of the roundness of the aperture through the standard deviation of all the roundnesses of the apertures in the filter. Step 6: Conduct quality assessment through the coefficient of variation of pore size area, evaluation of pore roundness consistency, and pore roundness to obtain the filter screen quality score; Step 7: Set the filter screen quality score threshold, and evaluate the filter screen with a quality score greater than or equal to the filter screen quality score threshold as qualified in quality, otherwise evaluate it as unqualified in quality.
Citation Information
Patent Citations
Change detection method based on geometric active contour model and sparse self-encoding
CN111161229A
Transformer substation safe operation monitoring method and system based on OpenCV
CN118485973A
Goat milk filtering efficiency detection method and system based on machine vision
CN119313672A
Steel wire rope diameter measuring method and system based on machine vision, medium and terminal
CN119540326A
Method for determining cellular Nuclear-to-Cytoplasmic Ratio
US20210182528A1
Cited By
Product quality detection method based on deep learning and machine vision
CN121724983A
A product quality detection method based on deep learning and machine vision
CN121724983B