Filter screen quality detection method based on aperture consistency analysis

By optimizing the active contour model through gradient space analysis and spatial texture information, and obtaining the first and second optimization factors, the problem of local gradient anomalies in filter mesh aperture detection is solved, and high-precision and stable detection of filter mesh aperture edges is achieved.

CN120298371BActive Publication Date: 2025-12-09YANBIAN UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510422911.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-04-07
Publication Date
2025-12-09
Estimated Expiration
2045-04-07

AI Technical Summary

Technical Problem

Existing active contour models cannot effectively address the problem of local gradient anomalies in image data caused by microstructural anomalies on the filter surface in filter aperture consistency analysis, resulting in reduced accuracy and reliability of aperture detection and increased false positive rate.

Method used

By introducing an aperture consistency analysis-based method, the active contour model is optimized using gradient space analysis and spatial texture information. First and second optimization factors are obtained and used for optimization in the initial and later stages, respectively, to suppress local gradient anomalies and local geometric complexity, thereby improving boundary extraction accuracy.

Benefits of technology

It significantly improves the accuracy and stability of filter quality detection, ensuring that the active profile model stably approaches the edge of the actual pore size in the early stage and accurately fits the pore size boundary in the later stage, thereby improving the accuracy of pore size geometric parameter detection and the reliability of consistency analysis.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120298371B_ABST
    Figure CN120298371B_ABST
Patent Text Reader

Abstract

The application relates to the field of image detection, in particular to a filter screen quality detection method based on aperture consistency analysis, which comprises the following steps: S1, collecting a filter screen image; S2, optimizing an active contour model based on local feature analysis of the filter screen image; S2.1, obtaining a first optimization factor through gradient space analysis; S2.2, obtaining a second optimization factor through spatial texture information analysis; S2.3, optimizing the active contour model for aperture detection through the first optimization factor and the second optimization factor; and S3, performing filter screen aperture detection and filter screen quality evaluation through the optimized active contour model.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of image detection, and in particular to a filter screen quality detection method based on aperture consistency analysis. BACKGROUND

[0002] As a core filter component in the production process of industrial manufacturing, medical equipment and high-end electronic products, the consistency of the aperture size of the filter screen is one of the important indicators that determine its performance, quality stability and service life. In recent years, with the continuous development of industrial technology and production process, higher requirements have been put forward for the aperture consistency of the filter screen, especially in high-precision industrial scenarios such as high-precision nickel alloy filter screens in the process of manufacturing microelectronic chips and high-performance filter membranes used for filtering drugs or biological products in the medical industry. The aperture of the filter screen needs to reach strict micron or even sub-micron uniformity to meet the needs of precision filtration. Therefore, the research and development of filter screen quality detection technology has gradually become a hotspot and difficulty in the industrial field. The current filter screen quality detection method is usually based on digital image processing and analysis technology. The aperture image of the filter screen is shot by a high-resolution CCD industrial camera, and then the image analysis algorithm is used to accurately calculate the geometric characteristics of the aperture in the filter screen, such as aperture area, roundness, diameter coefficient of variation and other indicators, 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 a significant technical advantage and wide application prospect in the field of high-precision filter screen aperture extraction, because it can realize high-precision extraction of boundary contour through iteration in 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 (smoothness constraint term) and external energy (image gradient constraint term), so as to accurately obtain the aperture contour characteristics. This method overcomes the defects of traditional threshold segmentation and simple edge detection technology, such as insufficient sensitivity to image gray scale changes and weak anti-interference ability, significantly improving 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 aperture geometric parameter calculation results more consistent with the actual situation, and further enhancing the practical value of the method in the industrial high-end field.

[0003] Although the active contour model has shown significant advantages in filter aperture quality detection and consistency analysis, with the development of filter manufacturing process towards higher precision and high stability, this method gradually exposes serious technical defects in actual industrial application, especially it cannot effectively deal with the problem of local gradient anomaly of image data caused by abnormal microstructure of filter surface. This defect is particularly prominent in the detection process of high-precision metal filter (such as nickel alloy filter). In the high-precision industrial scene, due to the complexity of filter production process (such as chemical etching, laser processing or electroplating process), micro-scale grain structure differences or extremely fine impurity particles often appear on the surface of the material. These microstructures often form high-brightness reflection points or reflection areas due to the local reflection characteristics of the material surface during digital image shooting. Although these abnormal areas are extremely small, they may only have a few pixel sizes, but they show extremely high local gradient amplitude and extremely strong local gradient randomness in the image gradient feature space. There are significant differences between these abnormal data features and normal aperture edge data, which can be summarized as follows: first, the local gradient amplitude of the abnormal area is significantly higher than that of the surrounding normal aperture edge area, forming a significant gradient amplitude anomaly; second, the gradient direction in the abnormal area shows a highly random distribution, and the gradient direction entropy is much higher than that of the normal aperture edge gradient direction entropy, causing a significant direction randomness anomaly; third, from the spatial distribution characteristics, the gradient information of these abnormal areas is highly isolated, with extremely low spatial gradient correlation, and the difference in spatial continuity and consistency with the normal aperture edge gradient feature is huge. Due to this special data anomaly feature, the active contour model is often misled by the local high gradient value of these abnormal areas during aperture edge extraction, resulting in an incorrect edge evolution trend, causing the active contour curve to appear obvious local bulge or depression near the abnormal area, and finally leading to the inability to accurately converge to the real edge of the aperture, causing significant errors in key geometric parameters such as aperture area, diameter and roundness. This not only reduces the accuracy and reliability of filter aperture detection, but also significantly increases the filter misjudgment rate in actual production process, resulting in low product quality control efficiency. Therefore, how to analyze the specific abnormal characteristics and generation mechanism of filter image data, propose a more refined and accurate local abnormal area recognition method, and improve the boundary extraction accuracy of the active contour model, has become a problem to be solved. SUMMARY

[0004] Therefore, the present application aims to provide a filter quality detection method based on aperture consistency analysis to solve the precision problem of filter aperture consistency analysis by the active contour model.

[0005] To achieve the above object, the technical scheme of the present application is as follows:

[0006] The filter quality detection method based on aperture consistency analysis comprises the following steps:

[0007] Step S1: Collecting filter screen image;

[0008] Step S2: Optimizing active contour model based on local feature analysis of filter screen image;

[0009] Step S2.1: Obtaining first optimization factor through gradient space analysis;

[0010] Step S2.2: Obtaining second optimization factor through spatial texture information analysis;

[0011] Step S2.3: Optimizing active contour model for aperture detection through first optimization factor and second optimization factor;

[0012] Step S3: Performing filter screen aperture detection and filter screen quality evaluation through optimized active contour model.

[0013] Further, the step S2.1 obtains the first optimization factor through gradient space analysis, and the specific steps include:

[0014] Obtaining filter screen image data, evaluating and analyzing the gradient amplitude of the neighborhood window of the pixel point to obtain the spatial gradient confusion degree of the pixel point, discretizing and analyzing the gradient direction of the neighborhood window of the pixel point to obtain the local gradient confusion degree of the pixel point, performing correlation analysis on the local spatial gradient of the pixel point to obtain the spatial gradient local autocorrelation coefficient of the pixel point, and performing fusion analysis on the spatial gradient confusion degree, the local gradient confusion degree and the spatial gradient local autocorrelation coefficient of the pixel point to obtain the first optimization factor of the pixel point in the filter screen image.

[0015] Further, the step of evaluating and analyzing the gradient amplitude of the neighborhood window of the pixel point to obtain the spatial gradient confusion degree of the pixel point, discretizing and analyzing the gradient direction of the neighborhood window of the pixel point to obtain the local gradient confusion degree of the pixel point, and performing correlation analysis on the local spatial gradient of the pixel point to obtain the spatial gradient local autocorrelation coefficient of the pixel point includes:

[0016] Obtaining the neighborhood window of the pixel point in the set filter screen image data, evaluating the spatial gradient confusion degree of the pixel point through the probability distribution of the gradient amplitude in the neighborhood window of the pixel point, and the spatial gradient confusion degree evaluation formula of the pixel point is:

[0017] ;

[0018] wherein, represents the spatial gradient confusion degree of the pixel point with coordinates in the filter screen image data; represents a linear normalization function; This indicates that the gradient magnitude of a pixel in the neighborhood window falls within the first... The probability of each interval. ; This indicates the gradient magnitude of a pixel at the th... The number of intervals; This represents the side length of the neighborhood window of a pixel. Represents a very small positive number;

[0019] The gradient directions of pixels within the neighborhood window of a pixel are discretized. The degree of local gradient disorder is evaluated based on the discretized gradient direction distribution. The formula for evaluating the degree of local gradient disorder of a pixel is as follows:

[0020] ;

[0021] in, This indicates that the coordinates in the screen image data are... The degree of local gradient disorder at each pixel; Represents a linear normalization function; This represents the Q directional intervals of the gradient direction discretization; This indicates that the coordinates in the screen image data are... The gradient direction co-occurrence matrix of the neighborhood window of a pixel. ; Indicates direction interval and direction interval The number of times they appear adjacently in the neighborhood; Represents a very small positive number;

[0022] The formula for calculating the local autocorrelation coefficient of the spatial gradient of the pixel is:

[0023] ;

[0024] in, This indicates that the coordinates in the screen image data are... The local autocorrelation coefficient of the spatial gradient of a pixel; This represents the side length of the neighborhood window of a pixel. This represents the sum of the elements of the weight matrix; Represented by coordinates The set of all pixels within a neighborhood window centered on the pixel; This represents the elements of the spatial adjacency weight matrix, where the values ​​of adjacent pixels are... Otherwise ; This represents the average gradient magnitude within a local window.

[0025] Further, the first optimization factor of the pixel point in the filter screen image is obtained by fusing and analyzing the spatial gradient confusion degree, the local gradient confusion degree and the spatial gradient local autocorrelation coefficient of the pixel point, and specifically includes:

[0026] The calculation formula of the first optimization factor of the pixel point 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 confusion degree of the pixel point with coordinates in the filter screen image data; represents the local gradient confusion 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 a constant .

[0029] Further, the second optimization factor is obtained by spatial texture information analysis in the step S2.2, and specifically includes:

[0030] The contour curve in the original active contour model is obtained, the local contour curvature fractal dimension of any position in the contour curve is obtained by box number analysis on the contour curve, the gradient field spatial texture complexity of any position in the contour curve is obtained by texture analysis on the local of the contour curve, the gradient field direction spatial consistency degree of any position in the contour curve is obtained by consistency analysis on the local gradient field direction of the contour curve, and the second optimization factor of any position in the contour curve in the active contour model is obtained by fusing and analyzing the local contour curvature fractal dimension, the gradient field spatial texture complexity and the gradient field direction spatial consistency degree of any position in the contour curve.

[0031] Further, the local contour curvature fractal dimension of any position in the contour curve is obtained by box number analysis on the contour curve, the gradient field spatial texture complexity of any position in the contour curve is obtained by texture analysis on the local of the contour curve, and the gradient field direction spatial consistency degree of any position in the contour curve is obtained by consistency analysis on the local gradient field direction of the contour curve, and specifically includes:

[0032] The calculation formula of the local contour curvature fractal dimension of any position in the contour curve is:

[0033] ;

[0034] wherein, denotes the local contour curvature fractal dimension of the position ; denotes the side length of the small square used to cover the local contour curve denotes the minimum number of boxes required when covering the local contour curve segment to be analyzed using small squares with side length ; denotes the linear normalization function

[0035] The calculation formula of the gradient field spatial texture complexity of any position in the contour curve is:

[0036] ;

[0037] wherein, denotes the gradient field spatial texture complexity of the position in the contour curve ; denotes the element value of the position in the gray level co-occurrence matrix denotes the number of gray levels of the gray level co-occurrence matrix

[0038] The calculation formula of the gradient field direction spatial consistency of any position in the contour curve is:

[0039] ;

[0040] wherein, denotes the gradient field direction spatial consistency of the position in the contour curve ; denotes the unit vector of the gradient direction of the th pixel in the local neighborhood ; denotes the angle of the gradient direction of the th pixel ; denotes a very small positive number

[0041] Further, the second optimization factor of any position in the contour curve in the active contour model is obtained by fusing and analyzing the local contour curvature fractal dimension, the gradient field spatial texture complexity and the gradient field direction spatial consistency of any position in the contour curve, and specifically comprises:

[0042] The calculation formula of the second optimization factor of any position in the contour curve in the active contour model is:

[0043] ;

[0044] wherein, represents the contour curve the second optimization factor of the position; represents the contour curve the local contour curvature fractal dimension of the position; represents the contour curve the gradient field space texture complexity of the position; represents the contour curve the gradient field direction space consistency of the position; represents the constant .

[0045] Further, the step S2.3 optimizes the active contour model for aperture detection by the first optimization factor and the second optimization factor, specifically comprising:

[0046] The formula of the energy function of the active contour model for aperture detection after optimization by the first optimization factor and the second optimization factor is:

[0047] ;

[0048] wherein, represents the energy function of the active contour model after optimization by the first optimization factor and the second optimization factor; represents the contour curve the second optimization factor of 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 coordinates of the position on the active contour curve; represents the first optimization factor of the pixel point of 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 position of the curve.

[0049] Further, the step S3 performs screen aperture detection and screen quality evaluation by the optimized active contour model, specifically comprising the following steps:

[0050] Step 1: active contour model initialization, in the filter screen image to be analyzed, through Otsu threshold method for image binarization processing and in each aperture region to place an initialized contour curve;

[0051] Step 2: iteration update through the optimized energy function, that is, in each iteration, the energy function is minimized through the gradient descent method;

[0052] Step 3: set the energy function convergence threshold in the iteration process, obtain the iteration convergence of all aperture edge contour curves in the filter screen;

[0053] Step 4: obtain the aperture area, aperture equivalent diameter, aperture circumference and aperture roundness through the aperture edge contour curve;

[0054] Step 5: obtain the aperture area coefficient of variation through the standard deviation of all aperture areas in the filter screen; obtain the aperture roundness consistency evaluation through the standard deviation of all aperture roundness in the filter screen;

[0055] Step 6: quality evaluation through the aperture area coefficient of variation, aperture roundness consistency evaluation and aperture roundness, obtain the filter screen quality score;

[0056] Step 7: set the filter screen quality score threshold, evaluate the filter screen with a filter screen quality score greater than or equal to the filter screen quality score threshold as quality qualified, otherwise as quality unqualified.

[0057] Compared with the prior art, the present application has the following advantages:

[0058] The filter screen quality detection method based on aperture consistency analysis provided by the present application significantly improves the precision and stability of filter screen quality detection through two optimization factors. Through the comprehensive spatial gradient confusion degree, local gradient confusion degree and gradient spatial autocorrelation characteristics, the problem that the active contour model is misled by obvious abnormal areas in the initial stage is effectively avoided, and the active contour curve is stably close to the real aperture edge in the initial stage; the second optimization factor Then the local contour curvature fractal dimension, gradient field spatial texture complexity and gradient direction consistency are accurately quantified, and the problem of micro-scale local abnormal deformation in the later evolution stage of the active contour model is successfully solved. 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, and improves the detection accuracy of aperture geometric parameters and the reliability of consistency analysis. BRIEF DESCRIPTION OF DRAWINGS

[0059] The drawings that form a part of the present application are used to provide a further understanding of the present application, and the illustrative embodiments of the present application and their descriptions are used to explain the present application, and do not constitute an improper limitation on the present application. In the drawings:

[0060] Figure 1 A method flowchart of the filter screen quality detection method based on aperture consistency analysis according to an embodiment of the present application. DETAILED DESCRIPTION

[0061] It should be noted that the embodiments in the present application and the features in the embodiments can be combined with each other without conflict.

[0062] In the description of the present application, it should be noted that the terms "upper", "lower", "inner", "back" and the like indicate the orientation or positional relationship shown in the drawings, and are only for the convenience of describing the present application and simplifying the description, and do not indicate or imply that the devices or elements referred to must have a particular orientation, be constructed and operated in a particular orientation, and therefore cannot be understood as a limitation on the present application. In addition, the terms "first", "second" are only for the purpose of description, and cannot be understood as indicating or implying relative importance.

[0063] The present application will be described in detail below with reference to the accompanying drawings and in conjunction with the embodiments.

[0064] Reference Figure 1 is a method flowchart of the filter screen quality detection method based on aperture consistency analysis provided by Embodiment One of the present application, as shown in Figure 1 The filter screen quality detection method based on aperture consistency analysis can 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 a filter screen image acquisition device to ensure that the image has a high enough 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 subtle features of the single filter screen aperture edge can be clearly expressed and recognized on the image.

[0067] After the image acquisition is completed by the CCD industrial camera, the collected filter screen surface image is transmitted and stored in real time by an industrial image acquisition card, and a special image processing computer is used for subsequent filter screen quality detection based on aperture consistency analysis.

[0068] S2, optimization of the active contour model based on multi-local feature analysis of the filter screen image.

[0069] In the process of extracting the aperture edge of the filter screen by the active contour model to analyze the aperture consistency of the filter screen, because of the influence of the complex microscopic phenomena such as the impurity particles, local grain structure or surface reflection in the production process of the filter screen, although the size of these situations is extremely small, but in the image gradient space, it will show extremely significant abnormal characteristics, which will directly lead to local error recognition of the active contour model in edge extraction, that is, the active contour curve is misled by these local gradient abnormal areas, causing local protrusion or depression of the aperture edge, thereby reducing the accuracy of the aperture consistency analysis of the filter screen.

[0070] In view of the problems existing in this actual scene, because the gradient characteristics of the abnormal area and the normal aperture edge area have obviously different statistical and spatial distribution characteristics, the normal aperture edge area gradient direction is consistent, the spatial continuity is strong, and the gradient field spatial structure will show good performance; while the abnormal area is characterized by local gradient amplitude fluctuation, direction is highly random and spatial distribution is obviously isolated and irregular. Therefore, the first optimization factor is obtained by spatial analysis of the pixel points, the above abnormal situation is identified, so as to suppress the interference of these abnormal areas to the active contour model.

[0071] In the process of identifying the problems in the above actual scene by the first optimization factor, although it can preliminarily suppress the obvious gradient abnormal area in the filter screen aperture edge area, the active contour model still faces more fine local shape abnormal problems in the further evolution and accurate convergence process. These problems are that the active contour curve appears a large local protrusion or depression in the late iteration when it is close to the real edge, thereby leading to the extraction accuracy of the aperture ratio that is far from the ideal level, affecting the reliability and stability of the subsequent consistency analysis result. The actual scene problem of this situation is that the gradient field around the active contour curve has more complex spatial structure and subtle direction change. The complexity is that the local heterogeneity of the gradient field texture is obviously enhanced, leading to the imbalance of the gradient attraction felt by the active contour curve in the local range, thereby appearing subtle deformation in shape. In addition, the geometric shape characteristics of the curve itself when it is close to the edge also show certain irregularity, especially the complexity degree of the curvature distribution of the curve in the local area is obviously increased. This geometric irregular shape makes the smooth evolution trend of the active contour curve be disturbed, and cannot stably maintain the continuity and smoothness of the shape. At the same time, the inconsistency of the local gradient direction further aggravates the difficulty of the curve in judging the real direction of the edge in the microscopic scale.

[0072] Therefore, on the basis of the first optimization factor, the second optimization factor is further evaluated by the geometric characteristics of the curve itself and the spatial texture characteristics of the gradient field, so as to locally fine-tune the active contour curve, thereby correcting and improving the microscopic evolution process of the curve in the active contour model.

[0073] S2.1, obtaining a first optimization factor by gradient space analysis.

[0074] The active contour model (ACM) is widely used in high-precision identification of filter aperture edges. The model defines an energy function and continuously adjusts the position of the contour curve in the iteration process to gradually approach the true boundary of the target. In theory, the active contour model expects the aperture edge region to have a stable image gradient field feature, i.e., the gradient amplitude of the aperture edge should be large and the spatial distribution should be continuous, and the gradient direction should remain strong consistency in the local range, so that the active contour can stably evolve along the gradient direction and eventually converge to the true boundary.

[0075] However, in the analysis process of actual filter image data, there is a significant gap between the reality and the theoretical expectation. Specifically, there are often small-scale impurity particles, differences in material surface grain structure, and local reflection bright spots in filter images, which have obvious gradient anomaly characteristics: the gradient amplitude in the local area fluctuates randomly and dramatically, the direction is highly random, and the spatial distribution is highly isolated. This local abnormal gradient region appears as an abnormal high value of local energy or a random external force field in the iteration process of the active contour model. The randomness of this energy anomaly and external force field directly leads to the incorrect convergence of the active contour curve to these local abnormal regions during evolution, resulting in local protrusions or depressions, which severely 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 guide index, ignoring the randomness and spatial structure complexity of the gradient field in the local range in the actual scene. Therefore, in actual complex scenes, the traditional ACM method shows obvious shortcomings when facing complex micro-scale abnormal regions, and cannot effectively distinguish between real edges and local abnormal regions, thus cannot accurately control the initial evolution direction of the contour.

[0077] In view of the above analysis, in order to realize the accurate and stable evolution of the active contour model in actual complex filter image data, the external force guiding method of the model needs to be optimized. The core logic of this optimization is to use 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 misleading of local gradient abnormal regions.

[0078] Specifically, the initial iteration of the active contour model (i.e., when the curve just begins to approach the aperture edge) is the stage where local anomaly gradients have the most significant impact on the model. If the misleading effect of anomaly regions on 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 novel feature index that reflects the randomness, directional randomness, and spatial isolation of local gradients, thereby accurately judging and controlling the sensitivity of the active contour to these regions in the early stages of evolution.

[0079] The formula for calculating the first optimization factor of a pixel:

[0080]

[0081] Explanation of formula symbols:

[0082] Indicates the degree of spatial gradient disorder at a pixel. ;in This indicates that the gradient magnitude of a pixel in the neighborhood window falls within the first... The probability of each interval. To represent a very small positive number, in this embodiment, it is set as follows: ,by To select a neighborhood window centered on the target, in this embodiment, the size of the selected neighborhood window is [size missing]. No specific requirements are set; adjustments can be made based on the actual scenario to calculate the gradient magnitude within the statistical window. The probability distribution is set to discretize the gradient magnitude range as follows: The gradient magnitude falls into the [number]th level. The probability of each level is... .

[0083] This indicates the degree of local gradient disorder at a pixel. ;in , Discretization of gradient direction A directional interval, Indicates direction interval and direction interval The number of times they appear adjacently in the neighborhood. To represent a very small positive number, in this embodiment, it is set as follows: , gradient direction Discretized Establish gradient direction co-occurrence matrix for each directional interval. Set the spatial distance as For each pixel, the frequency of joint occurrence of pixel pairs in a direction within a local window is statistically analyzed, and the degree of local gradient rotation of a pixel is evaluated based on the frequency of joint occurrence of pixel pairs in a direction within the local window.

[0084] The local autocorrelation coefficient of the spatial gradient of a pixel (used to measure the degree of spatial correlation of gradient magnitudes within a local region). ,in Indicates The collection of all pixels within a local window centered on the pixel; This represents the elements of the spatial adjacency weight matrix, where the values ​​of adjacent pixels are... Otherwise ; This represents the average gradient magnitude within the local window; This represents the sum of the elements of the weight matrix. .

[0085] It should be noted that when the gradient magnitude has high randomness ( Large), high randomness in gradient direction ( Large), and its spatial distribution is highly isolated ( When the initial optimization factor is relatively small, The significant increase in the value accurately reflects the high probability that this area is an anomaly.

[0086] In the practical application of the active contour model, in the early stage of contour evolution (i.e., when the initial number of iterations is small), the optimization factors constructed above are utilized. Real-time assessment of the degree of anomaly in each local region of the image. When When the value is high, it indicates that there are obvious abnormal features at the location. At this time, the external force energy weight in the active contour model will be automatically reduced, or even the external force guidance in the region will be directly blocked, thereby effectively avoiding the erroneous evolution of the active contour curve into these abnormal regions.

[0087] By directly introducing this optimization factor in the initial stage of the active contour model, we have clearly achieved efficient identification and preliminary suppression of gradient anomaly regions in complex real-world image scenes. This method effectively compensates for the shortcomings of traditional active contour models that only consider the magnitude of gradients while ignoring spatial structural features, ensuring that the active contour model evolves stably and correctly towards the true edge position in the initial stage, and significantly improving the overall accuracy and stability of screen aperture consistency analysis.

[0088] In summary, optimization factors The complete construction process not only deeply analyzes the problems in real-world scenarios and clearly points out the shortcomings of traditional ACM models, but more importantly, it proposes clear optimization logic and methodological steps by effectively introducing gradient entropy features, which significantly improves the performance and practicality of active contour models from both theoretical and practical application perspectives.

[0089] S2.2, obtain the second optimization factor through spatial texture information analysis.

[0090] Based on the high-precision filter screen image collected, through the preliminary optimization factor , the risk of the active contour model (ACM) being misled by the obviously abnormal gradient region in the initial iteration process has been effectively reduced. However, in the actual scene, we further observe that even after the preliminary suppression by the factor in the initial stage, the active contour model may still have subtle but critical local contour abnormalities in the later evolution process of approximating the real edge of the filter screen aperture. This phenomenon is specifically manifested as slight local bulging or concave of the active contour curve when approximating the real boundary, which cannot accurately fit the real boundary of the aperture, seriously affecting the final extraction accuracy and stability of the aperture edge.

[0091] Further analysis of the evolution data of the filter screen image and the active contour curve shows that the root cause of 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 of the active contour curve itself in the later evolution stage. This local complexity leads to slight local morphological changes of the active contour in the later evolution stage, and although the scale of this slight change is not large, it is enough to affect the accurate fitting of the overall aperture edge, thereby affecting the reliability and accuracy of the aperture consistency analysis. Therefore, in order to ensure that the active contour model can maintain high precision and stability in the later evolution stage, it is necessary to further introduce an optimization factor that can finely describe the local geometric morphology of the active contour, the spatial structure and direction information of the local gradient field, so as to realize the fine control and correction of the later evolution of the active contour model.

[0092] For the pixel point position of the contour curve position , the formula of the second optimization factor is:

[0093]

[0094] Formula symbol explanation:

[0095] represents the local contour curvature fractal dimension, wherein represents the minimum number of boxes required when covering the local contour curve segment to be analyzed using a small square with a side length of ; represents the side length of the small square used to cover the local contour curve, that is, the analysis scale;

[0096] represents the spatial texture complexity of the gradient field, wherein represents the position of the pixel point in the gray level co-occurrence matrix the element value of the curvature fractal dimension; the number of gray levels of the co-occurrence matrix;

[0097] representing the degree of spatial consistency of the gradient field direction, wherein represents the unit vector of the gradient direction of the i-th pixel in the local neighborhood ; represents the angle of the gradient direction of the i-th pixel; represents the total number of pixels in the local neighborhood; represents a very small positive number.

[0098] When necessary, the numerator part of the second optimization factor is composed of the curvature fractal dimension and the gradient field texture complexity, and the sensitivity of the geometric complexity of the active contour curve and the spatial heterogeneity of the local gradient field to the abnormal region identification is enhanced by an exponential weighting form; the denominator part is composed of the degree of spatial consistency of the gradient field direction, and the lower the degree of consistency (the stronger the randomness), the smaller the denominator value, so as to further enlarge the value of the overall optimization factor and enhance the identification ability of the local abnormal region.

[0099] S2.3, optimizing the active contour model for aperture detection by the first optimization factor and the second optimization factor.

[0100] In the traditional active contour model, the contour curve is gradually evolved to the image edge by defining a total energy function (the sum of internal and external force energy), and finally the accurate extraction of the contour is realized. The traditional external force usually directly depends on the simple statistics or spatial gradient field of the image gradient amplitude, ignoring the gradient randomness and local structure features in the actual scene, so that the curve is easily affected by the local abnormal gradient point, resulting in local protrusions or depressions.

[0101] In view of this deficiency, we design a staged progressive active contour model optimization method based on the two optimization factors constructed above:

[0102] Initial stage: when the active contour curve just approaches the aperture edge, it is easy to be misled by the obvious abnormal gradient region, so the preliminary optimization factor is used in this stage to evaluate the abnormal degree of each position in the image in real time. When the factor is high, the weight of the region in the active contour external force term is reduced or shielded, so as to avoid the active contour curve being attracted by the obvious abnormal region 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 real edge region, the curve is more sensitive to local micro-scale changes, and small gradient field irregularities or curve self-geometric complexity can lead to abnormal local deformation. Therefore, we introduce a refinement optimization factor to fine-tune the energy weight in the local region. When is higher, the energy of the curve smoothing term (internal force) is enhanced to correct the local micro-scale abnormal trend, so as to ensure that the active contour curve stably and accurately fits the aperture edge.

[0104] The optimized energy function is:

[0105]

[0106] Formula symbol explanation:

[0107] represents the coordinates of the position on the active contour curve;

[0108] represents the smoothing term (internal force) of the original active contour model, ; and

[0109] represents a weight parameter of the elastic constraint strength of the curve in the internal force term of the active contour model, which is used to control the constraint degree of the local length of the contour curve in the evolution process, the greater the value of , the more uniform the active contour curve tends to stretch or shrink in the iterative evolution process, which shows that the elastic constraint effect on the overall length of the curve is enhanced, preventing the local curve from appearing severe stretching or twisting changes;

[0110] represents a weight parameter of the rigid constraint strength of the curve in the internal force term of the active contour model, which is used to control the smoothness constraint of the curve bending degree in the evolution process, the greater the value of , the more smooth the active contour curve tends to maintain in the evolution process, and the local curvature change is strongly limited, thereby preventing the curve from appearing large bending or inflection points in the evolution process.

[0111] The value of is in the range of , and in the embodiment, it is set to . The value of is in the range of , and in the embodiment, it is set to

[0112] . represents the external force term of the original active contour model, wherein represents the gradient magnitude of the image at the curve position .

[0113] represents the first optimization factor of the pixel point at the position in the image, when there is a significant abnormal area in the image at the position , the value of becomes high, and is reduced to a small value, so that the external force term is weakened to prevent the curve from being misdirected to evolve to the abnormal area;

[0114] represents the second optimization factor at the position in the image, when the geometric complexity of the curve at the position is relatively strong, the value of becomes high, the weight of the internal force term is increased, the smoothing constraint is enhanced, and the abnormal micro-scale deformation trend of the curve in the local area is effectively inhibited.

[0115] The optimized energy function can accurately solve 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, so that the active contour curve is not affected by the significant abnormal area too early, and the initial curve evolution is effectively stabilized to quickly approach 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 to correct the abnormal changes that may occur in the micro-scale range of the active contour curve, and ensure that the contour curve is finally accurately fitted to the real boundary of the aperture in a smooth and stable manner.

[0118] This two-step optimization strategy in stages and with targets fundamentally makes up for the problem of ignoring the gradient field structure characteristics and the curve geometric complexity in the traditional active contour model, so that the active contour model can accurately and stably realize the accurate extraction of the filter screen aperture edge, and greatly improve the consistency analysis precision of the filter screen quality detection.

[0119] S3, performing filter screen aperture detection and filter screen quality evaluation through the optimized active contour model.

[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 performed.

[0121] Step 1. Active contour model initialization, in the filter screen image to be analyzed, through Otsu threshold method for image binarization processing and in each aperture region to place an initialized contour curve.

[0122] Step 2. Iterative update through the optimized energy function, that is, minimizing the energy function in each iteration, and the iteration of the energy function is a known technology, so it is not described here.

[0123] Step 3. Set the energy function convergence threshold in the iteration process as , and obtain the iteration convergence of all aperture edge contour curves in the filter screen.

[0124] Step 4. Obtain the aperture area, aperture equivalent diameter, aperture circumference and aperture roundness through the aperture edge contour curve (use the contour integral formula to calculate the area of each aperture, define the aperture equivalent diameter as the diameter of the circle with the same area as the aperture area, and use the integral formula to obtain the aperture circumference).

[0125] Step 5. Obtain the aperture area coefficient of variation through the standard deviation of all aperture areas in the filter screen , wherein represents the standard deviation of the aperture area of all apertures in the filter screen, represents the average value of all aperture areas in the filter screen; , wherein 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 , wherein respectively represent the area consistency weight, the roundness consistency weight, and the average roundness weight, and the sum of the three is , which can be adjusted according to the actual scene and is not limited.

[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 quality qualified, otherwise as quality unqualified.

[0128] The above only describes the preferred embodiments of the present application and does not limit the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principles of the present application shall be included in the protection scope of the present application.

Claims

1. A filter screen quality detection method based on aperture consistency analysis, characterized in that, The method comprises the following steps: Step S1: collecting a filter screen image; Step S2: optimizing an active contour model based on local feature analysis of the filter screen image; Step S2.1: obtaining a first optimization factor through gradient space analysis; Step S2.2: obtaining a second optimization factor through spatial texture information analysis; Step S2.3: optimizing the active contour model for aperture detection through the first optimization factor and the second optimization factor; Step S3: performing filter screen aperture detection and filter screen quality evaluation through the optimized active contour model; In the step S2.1, the first optimization factor is obtained through gradient space analysis, and the specific steps comprise: obtaining filter screen image data, obtaining the spatial gradient confusion degree of a pixel point through gradient amplitude evaluation analysis on a neighborhood window of the pixel point, obtaining the local gradient confusion degree of the pixel point through gradient direction discretization analysis on the neighborhood window of the pixel point, obtaining the spatial gradient local autocorrelation coefficient of the pixel point through correlation analysis on the local spatial gradient of the pixel point, and obtaining the first optimization factor of the pixel point in the filter screen image through fusion analysis on the spatial gradient confusion degree, the local gradient confusion degree and the spatial gradient local autocorrelation coefficient of the pixel point. In the step S2.2, the second optimization factor is obtained through spatial texture information analysis, and the specific steps comprise: obtaining a contour curve in the original active contour model, obtaining the local contour curvature fractal dimension of any position in the contour curve through box number analysis on the contour curve, obtaining the gradient field spatial texture complexity of any position in the contour curve through texture analysis on the local contour curve, obtaining the gradient field direction spatial consistency degree of any position in the contour curve through consistency analysis on the local gradient field direction of the contour curve, and obtaining the second optimization factor of any position in the contour curve in the active contour model through fusion analysis on the local contour curvature fractal dimension, the gradient field spatial texture complexity and the gradient field direction spatial consistency degree of any position in the contour curve.

2. The screen quality detection method based on aperture consistency analysis according to claim 1, characterized in that, In the step S2.1, the first optimization factor is obtained through gradient space analysis, and the specific steps comprise: obtaining filter screen image data, obtaining the spatial gradient confusion degree of a pixel point through gradient amplitude evaluation analysis on a neighborhood window of the pixel point, obtaining the local gradient confusion degree of the pixel point through gradient direction discretization analysis on the neighborhood window of the pixel point, obtaining the spatial gradient local autocorrelation coefficient of the pixel point through correlation analysis on the local spatial gradient of the pixel point, and obtaining the first optimization factor of the pixel point in the filter screen image through fusion analysis on the spatial gradient confusion degree, the local gradient confusion degree and the spatial gradient local autocorrelation coefficient of the pixel point. In the step S2.2, the second optimization factor is obtained through spatial texture information analysis, and the specific steps comprise: obtaining a contour curve in the original active contour model, obtaining the local contour curvature fractal dimension of any position in the contour curve through box number analysis on the contour curve, obtaining the gradient field spatial texture complexity of any position in the contour curve through texture analysis on the local contour curve, obtaining the gradient field direction spatial consistency degree of any position in the contour curve through consistency analysis on the local gradient field direction of the contour curve, and obtaining the second optimization factor of any position in the contour curve in the active contour model through fusion analysis on the local contour curvature fractal dimension, the gradient field spatial texture complexity and the gradient field direction spatial consistency degree of any position in the contour curve. ; in, This indicates that the coordinates in the screen image data are... The degree of spatial gradient disorder of pixels; Represents a linear normalization function; This indicates that the gradient magnitude of a pixel in the neighborhood window falls within the first... The probability of each interval. ; This indicates the gradient magnitude of a pixel at the th... The number of intervals; This represents the side length of the neighborhood window of a pixel. Represents a very small positive number; In the step S2.1, the first optimization factor is obtained through gradient space analysis, and the specific steps comprise: obtaining filter screen image data, obtaining the spatial gradient confusion degree of a pixel point through gradient amplitude evaluation analysis on a neighborhood window of the pixel point, obtaining the local gradient confusion degree of the pixel point through gradient direction discretization analysis on the neighborhood window of the pixel point, obtaining the spatial gradient local autocorrelation coefficient of the pixel point through correlation analysis on the local spatial gradient of the pixel point, and obtaining the first optimization factor of the pixel point in the filter screen image through fusion analysis on the spatial gradient confusion degree, the local gradient confusion degree and the spatial gradient local autocorrelation coefficient of the pixel point. ; wherein, denotes a local gradient confusion degree of a pixel point with coordinates in the filter image data; denotes a linear normalization function; denotes Q direction intervals of gradient direction discretization; denotes a neighborhood window gradient direction co-occurrence matrix of a pixel point with coordinates in the filter image data, ; denotes a number of times that direction interval and direction interval appear adjacently in the neighborhood; denotes a minimum positive number; In the step S2.2, the second optimization factor is obtained through spatial texture information analysis, and the specific steps comprise: obtaining a contour curve in the original active contour model, obtaining the local contour curvature fractal dimension of any position in the contour curve through box number analysis on the contour curve, obtaining the gradient field spatial texture complexity of any position in the contour curve through texture analysis on the local contour curve, obtaining the gradient field direction spatial consistency degree of any position in the contour curve through consistency analysis on the local gradient field direction of the contour curve, and obtaining the second optimization factor of any position in the contour curve in the active contour model through fusion analysis on the local contour curvature fractal dimension, the gradient field spatial texture complexity and the gradient field direction spatial consistency degree of any position in the contour curve. ; wherein, denotes the local autocorrelation coefficient of spatial gradient of the pixel point with coordinates in the filter net image data; denotes the side length of the neighborhood window of the pixel point; denotes the sum of the elements of the weight matrix; denotes the set of all pixel points in the neighborhood window centered on the pixel point with coordinates ; denotes the spatially adjacent weight matrix element, the adjacent pixel has a value of , otherwise ; denotes the average value of the gradient magnitude in the local window.

3. The screen quality detection method based on aperture consistency analysis according to claim 1, characterized in that, The first optimization factor of the pixel point in the filter screen image is obtained by fusion analysis on the spatial gradient confusion degree, the local gradient confusion degree and the spatial gradient local autocorrelation coefficient of the pixel point, and specifically includes: The calculation formula of the first optimization factor of the pixel point in the filter screen image is: ; wherein, represents a first optimization factor of a pixel point with coordinates in the filter image data; represents a spatial gradient confusion degree of a pixel point with coordinates in the filter image data; represents a local gradient confusion degree of a pixel point with coordinates in the filter image data; represents a spatial gradient local autocorrelation coefficient of a pixel point with coordinates in the filter image data; represents a constant .

4. The screen quality detection method based on aperture consistency analysis according to claim 1, characterized in that, The local contour curvature fractal dimension of any position in the contour curve is obtained by box number analysis on the contour curve; the gradient field spatial texture complexity of any position in the contour curve is obtained by texture analysis on the local contour curve; the gradient field direction spatial consistency degree of any position in the contour curve is obtained by consistency analysis on the local gradient field direction of the contour curve, and specifically includes: The calculation formula of the local contour curvature fractal dimension of any position in the contour curve is: ; wherein, denotes the profile curve denotes the local profile curvature fractal dimension of the position; denotes the side length of the small squares used to cover the local profile curve; denotes the minimum number of boxes needed to cover the segment of the local profile curve to be analyzed using small squares of side length ; denotes the linear normalization function; The calculation formula of the gradient field spatial texture complexity of any position in the contour curve is: ; wherein, denotes a profile curve the gradient field space texture complexity of a position; denotes a linear normalization function; denotes the value of the element of the gray level co-occurrence matrix at position ; and denotes the number of gray levels of the gray level co-occurrence matrix. The calculation formula of the gradient field direction spatial consistency degree of any position in the contour curve is: ; wherein denotes the contour curve denotes the gradient field direction space consistency degree of the position; denotes the total number of pixels within the local neighborhood; denotes the unit vector of the gradient direction of the pixel within the local neighborhood, ; denotes the angle of the gradient direction of the pixel; denotes a very small positive number.

5. The screen quality detection method based on aperture consistency analysis of claim 1, wherein, The second optimization factor of any position in the contour curve in the active contour model is obtained by fusion analysis on the local contour curvature fractal dimension, the gradient field spatial texture complexity and the gradient field direction spatial consistency degree of any position in the contour curve, and specifically includes: The calculation formula of the second optimization factor of any position in the contour curve in the active contour model is: ; wherein, represents a contour curve a second optimization factor of the position; represents a contour curve a local contour curvature fractal dimension of the position; represents a contour curve a gradient field spatial texture complexity of the position; represents a contour curve a gradient field direction spatial uniformity of the position; represents a constant .

6. The screen quality detection method based on aperture consistency analysis according to claim 1, characterized in that, The step S2.3 optimizes the active contour model for aperture detection by the first optimization factor and the second optimization factor, and specifically includes: The formula of the energy function of the active contour model after optimization of the active contour model for aperture detection by the first optimization factor and the second optimization factor is: ; wherein, represents an energy function of the active contour model optimized by the first optimization factor and the second optimization factor; represents a contour curve of the position; represents a smoothing term of the original active contour model, , represents a weight parameter of the strength of the elastic constraint on the curve in the internal force term of the active contour model; represents a weight parameter of the strength of the rigid constraint on the curve in the internal force term of the active contour model; represents a coordinate of the position on the active contour curve; represents a contour curve of the position; represents an external force term of the original active contour model, , represents a gradient amplitude of the image at the position of the contour curve.

7. The screen quality detection method based on aperture consistency analysis of claim 1, wherein, The step S3 performs filter screen aperture detection and filter screen quality evaluation by the optimized active contour model, and specifically includes the following steps: Step 1: Active contour model initialization, in the filter screen image to be analyzed, image binarization processing is performed by Otsu threshold method, and an initialized contour curve is placed in each aperture region; Step 2: iterative update is performed by the optimized energy function, that is, the energy function is minimized by gradient descent method in each iteration; Step 3: set the energy function convergence threshold in the iteration process, and obtain the iteration-converged contour curve of all aperture edges in the filter screen; Step 4: obtain the aperture area, the aperture equivalent diameter, the aperture perimeter and the aperture roundness by the aperture edge contour curve; Step 5: obtain the aperture area coefficient of variation by the standard deviation of all aperture areas in the filter screen; obtain the aperture roundness consistency evaluation by the standard deviation of all aperture roundnesses in the filter screen; Step 6: quality evaluation is performed by the aperture area coefficient of variation, the aperture roundness consistency evaluation and the aperture roundness, and the filter screen quality score is obtained; Step 7: set the filter screen quality score threshold, and evaluate the filter screen as qualified in quality if the filter screen quality score is greater than or equal to the filter screen quality score threshold, otherwise evaluate the filter screen as unqualified in quality.

Citation Information

Patent Citations

  • Change detection method based on geometric active contour model and sparse self-encoding

    CN111161229A

  • Goat milk filtering efficiency detection method and system based on machine vision

    CN119313672A