Intelligent detection method for production quality of special paper

By employing a bilateral weighting calculation and iterative threshold segmentation method, the problem of stain detection on special paper is solved, improving detection accuracy and applicability. This method is suitable for stain identification on special paper under complex textures and varying lighting conditions.

CN120912569BActive Publication Date: 2026-05-05SHANDONG HEHE SPECIAL PAPER CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SHANDONG HEHE SPECIAL PAPER CO LTD
Filing Date
2025-08-01
Publication Date
2026-05-05

AI Technical Summary

Technical Problem

Detecting stains on specialty paper is more difficult and affects the accuracy of production quality testing.

Method used

A two-sided weighted calculation method is adopted, which combines spatial distance and color distance to construct a saliency map and segment taint regions by iteratively updating the threshold.

Benefits of technology

It improves the accuracy of stain identification in the quality inspection of special paper production, adapts to complex texture backgrounds and varying lighting conditions, and achieves high-precision and robust stain localization and segmentation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120912569B_ABST
    Figure CN120912569B_ABST
Patent Text Reader

Abstract

This invention relates to the field of image processing, specifically to an intelligent detection method for the production quality of special paper. The method includes: acquiring a target point, which is any pixel in an image of the paper to be inspected; using any other pixel in the image of the paper to be inspected besides the target point as a reference point; calculating the bilateral weights between the target point and the reference point; calculating the color distance between the target point and the reference point; using the product of the bilateral weights and the color distance as the significant difference between the target point and the reference point; and using the sum of the significant differences between the target point and all reference points as the saliency of the target point; iterating through and acquiring the saliency of all pixels in the image of the paper to be inspected to construct a saliency map; constructing a desired threshold; and segmenting the saliency map according to the desired threshold to obtain the blemish region. This invention can improve the accuracy of blemish detection in the production quality inspection process of special paper.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of image processing. More specifically, this invention relates to an intelligent detection method for the production quality of special paper. Background Technology

[0002] Specialty paper refers to paper with special uses and produced in relatively small quantities. There are many types of specialty paper, a general term encompassing various types of special-purpose paper or art paper. Product quality inspection is one of the most crucial steps in the production process. The unique characteristics of specialty paper make stain detection more difficult than for ordinary paper, thus affecting the accuracy of production quality inspection. Summary of the Invention

[0003] The main objective of this application is to propose an intelligent detection method for the production quality of special paper, which aims to improve the accuracy of stain detection in the production quality inspection of special paper.

[0004] To achieve the above objectives, embodiments of this application propose an intelligent inspection method for the production quality of special paper.

[0005] The method includes: acquiring a target point, which is any pixel in an image of paper to be inspected; taking any other pixel in the image of paper to be inspected besides the target point as a reference point, calculating the bilateral weights between the target point and the reference point, calculating the color distance between the target point and the reference point, taking the product of the bilateral weights and the color distance as the significant difference between the target point and the reference point, and taking the sum of the significant differences between the target point and all the reference points as the saliency of the target point; traversing to acquire the saliency of all pixels in the image of paper to be inspected, and constructing a saliency map; constructing an expected threshold, and segmenting the saliency map according to the expected threshold to obtain the smudge region.

[0006] In some embodiments, calculating the bilateral weights includes: calculating the spatial distance between the target point and the reference point, and using an exponential function to perform a negative correlation mapping on the ratio of the square of the spatial distance to a preset spatial scale parameter to obtain a spatial weight; calculating the color distance between the target point and the reference point, and using an exponential function to map the ratio of the square of the color distance to a preset color scale parameter to obtain a color weight; and using the product of the spatial weights and the color weights as the bilateral weights.

[0007] In some embodiments, obtaining the spatial distance includes: constructing a two-dimensional coordinate system for the paper image to be inspected, wherein the spatial distance is the positional distance between the target point and the reference point in the two-dimensional coordinate system.

[0008] In some embodiments, the color distance is the Euclidean distance between the three-dimensional color vector of the target point and the three-dimensional color vector of the reference point.

[0009] In some embodiments, obtaining the desired threshold includes: dividing the saliency map into an initial foreground and an initial background according to a preset initial threshold; using the mean of all saliencies in the initial foreground as the initial foreground mean; using the mean of all saliencies in the initial background as the initial background mean; calculating an initial step size based on the initial foreground mean and the initial background mean; in response to the initial foreground mean not being greater than the sum of the initial background mean and a preset mean threshold, iteratively updating the initial threshold using the initial step size to obtain a first updated threshold; in response to the absolute difference between the first updated threshold and the initial threshold not satisfying a preset convergence condition, re-dividing the saliency map into a first updated foreground and a first updated background according to the first updated threshold, and using the mean of all saliencies in the first updated foreground as the first foreground mean. The mean of all saliencies in the first updated background is used as the first background mean. A first update step size is calculated based on the first foreground mean and the first background mean. In response to the first foreground mean not being greater than the sum of the first background mean and the mean threshold, the first update threshold is iteratively updated using the first update step size to obtain a second update threshold. In response to the absolute difference between the second update threshold and the first update threshold satisfying a preset convergence condition, the iteration stops, and the second update threshold is used as the expected threshold. In response to the absolute difference between the second update threshold and the first update threshold not satisfying the preset convergence condition, the iteration continues according to the iterative process until the absolute difference between the update thresholds obtained from two adjacent iterations satisfies the preset convergence condition, at which point the iteration stops, and the update threshold obtained from the last iteration is used as the expected threshold.

[0010] In some embodiments, calculating the initial step size includes: calculating the initial difference between the initial foreground mean and the initial background mean; using the absolute difference between the initial difference and the mean threshold as the initial absolute difference; and using the product of the initial absolute difference and a preset learning rate as the initial step size.

[0011] In some embodiments, dividing the saliency map into an initial foreground and an initial background according to a preset initial threshold includes: assigning pixels with saliency not less than the initial threshold to the initial foreground, and assigning pixels with saliency less than the initial threshold to the initial background.

[0012] In some embodiments, acquiring the image of the paper to be inspected includes: acquiring an initial image; optimizing the color data of the initial image; and using the optimized initial image as the image of the paper to be inspected.

[0013] The beneficial effects of this invention are:

[0014] This invention introduces a two-sided weighting method when calculating the saliency of a target point and a reference point. Then, based on the two-sided weighting, it calculates the significant difference between the target point and any other point, and the sum of the significant differences between the target point and all other pixels is taken as the saliency of the target point. After obtaining a saliency map composed of the saliency of each pixel, the saliency map is segmented according to a desired threshold. It is understood that in the saliency map, this invention can significantly amplify pixels with colors different from surrounding pixels according to the degree of the two-sided weighting, thus making stain identification easier during the segmentation process. Therefore, this invention improves the accuracy of detecting paper stains in the quality inspection stage of special paper production. Attached Figure Description

[0015] Figure 1 This is a flowchart of steps S1-S4 in a special paper production quality intelligent detection method according to an embodiment of the present invention. Detailed Implementation

[0016] The technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are some embodiments of the present invention, but not all embodiments.

[0017] The specific embodiments of the present invention will now be described in detail with reference to the accompanying drawings.

[0018] Reference Figure 1 A special paper production quality intelligent detection method includes steps S1-S4, as detailed below:

[0019] Step S1: Obtain the target point, which is any pixel in the image of the paper to be inspected.

[0020] It should be noted that the paper to be inspected is the paper whose quality is to be tested. First, an initial image is collected, and after optimizing the color data of the initial image, the optimized initial image is used as the image of the paper to be inspected.

[0021] Step S2: Take any other pixel in the paper image except the target point as a reference point, calculate the bilateral weights between the target point and the reference point, calculate the color distance between the target point and the reference point, take the product of the bilateral weights and the color distance as the significant difference between the target point and the reference point, and take the sum of the significant differences between the target point and all reference points as the significance of the target point.

[0022] It should be added that color distance is the same as color difference.

[0023] It should be noted that this invention describes the process of calculating the salience of a target point from the perspective of the target point. The target point can be used as a reference for calculating the salience of any pixel in the image of the paper to be inspected.

[0024] Step S3: Traverse the saliency of all pixels in the pixel matrix and construct a saliency map.

[0025] It should be noted that the saliency map is another map constructed based on the image of the paper to be inspected.

[0026] Step S4: Obtain the expected threshold, segment the saliency map according to the expected threshold, and obtain the tainted region.

[0027] It should be noted that the expected threshold is the same as the optimal segmentation threshold.

[0028] Understandably, calculating the bilateral weights involves: calculating the spatial distance between the target point and the reference point, using an exponential function to negatively correlate the ratio of the square of the spatial distance to a preset spatial scale parameter to obtain the spatial weight; calculating the color distance between the target point and the reference point, using an exponential function to map the ratio of the square of the color distance to a preset color scale parameter to obtain the color weight; and using the product of the spatial weight and the color weight as the bilateral weight.

[0029] It is understandable that obtaining spatial distance includes: constructing a two-dimensional coordinate system for the image of the paper to be inspected, and the spatial distance is the positional distance between the target point and the reference point in the two-dimensional coordinate system.

[0030] It is understandable that the color distance is the Euclidean distance between the three-dimensional color vector of the target point and the three-dimensional color vector of the reference point.

[0031] For example, for the target point and reference points Calculate its bilateral weights The formula is as follows:

[0032]

[0033] In formula (1), The target point Two-dimensional coordinates, Reference point spatial coordinates, The target point and reference points The square of the positional distance in a two-dimensional coordinate system. These are preset spatial scale parameters. It is spatial weight. Indicates the target point In a three-dimensional color vector in a color space, Indicates reference point In a three-dimensional color vector in a color space, The target point 3D color vector and reference point Euclidean distance between three-dimensional color vectors The target point 3D color vector and reference point The square of the Euclidean distance between three-dimensional color vectors. These are preset color scale parameters. It is color weight.

[0034] Regarding the above formula (1), it should be noted that in the CIELab color space, , CIELab color space. CIELab stands for CIE 1976 Lab. The design goal of a color space is to achieve a uniform distribution of colors through mathematical modeling, making the calculation of color differences closer to the subjective judgment of the human eye.

[0035] For the above formula (1), it is necessary to add a note about the spatial scale parameter. In This controls the size of the comparison neighborhood; the larger the value, the more pixels farther from the target point will be included in the comparison. This is similar to how the human eye perceives paper: areas farther from the focal point are more blurred. In scenes with complex, intricate, and random background textures, to reduce the misjudgment of textures as blemishes, the spatial scale parameter needs to be reduced, which means... Setting the spatial scale parameter to a smaller value forces the system to compare and calculate the salience of pixels only within a smaller neighborhood, thus ignoring the huge computational load and errors caused by large-scale background texture changes. In scenes with sparse, regular background textures or large blemishes, the spatial scale parameter can be increased to utilize more background information to highlight the blemishes, which means... Set it to a larger value.

[0036] Regarding the above formula (1), it is necessary to add a note about the color scale parameter. In Controlling the rate at which color differences decay, The smaller the value, the more sensitive the system is to subtle color differences. This mimics the human eye's alertness to abrupt color changes. In scenarios where the brightness of a stain and the background are very similar, and differentiation relies mainly on subtle color differences, the color scale parameter needs to be reduced to capture these imperceptible color differences. Setting it to a smaller value increases the penalty for color differences, amplifying the significance of subtle color variations.

[0037] For the above formula (1), it can be understood that the two exponential terms constitute the spatial proximity kernel and the color similarity kernel, respectively.

[0038] Regarding the above formula (1), it should be noted that the spatial weight can also be called the spatial proximity weight. The design of the spatial proximity weight fully considers the local continuity characteristics of the paper texture. By setting appropriate spatial scale parameters, it can be ensured that the comparison calculation is performed within a reasonable neighborhood range. This avoids losing important information due to an excessively small neighborhood, or introducing unnecessary interference due to an excessively large neighborhood. This spatial constraint is suitable for processing special papers with repetitive textures and can reduce the probability of misjudging periodic textures as defects.

[0039] Regarding formula (1) above, it should be noted that color weight can also be called color similarity weight. The design of color similarity weight focuses on the perceptual characteristics of human eyes regarding color differences. In the Lab color space, by calculating the color difference distance and applying appropriate weight attenuation, the system becomes sufficiently sensitive to minute color differences. This design can distinguish between color fluctuations caused by real blemishes and textures, maintaining stable detection performance even when the color difference is very weak.

[0040] For example, calculate the target point The formula for the significance of is as follows:

[0041]

[0042] In formula (2), The target point The significance of It is the width of the image on the paper to be inspected. It is the height of the image on the paper to be inspected. The target point and reference points bilateral weights, Indicates the target point In a three-dimensional color vector in a color space, Indicates reference point In a three-dimensional color vector in a color space, The target point 3D color vector and reference point The Euclidean distance between three-dimensional color vectors is the color distance of this invention.

[0043] It should be noted that after calculating the saliency of all pixels, the original saliency map is constructed. Considering the diagram The value range is uncertain. To facilitate subsequent threshold segmentation, it needs to be linearly normalized to [value range missing]. Interval. The specific steps are as follows: Traverse the entire saliency map. Find its minimum value and maximum value ; For saliency plot Target point , . For normalized It is understandable that the normalized image In the middle, all pixel values ​​are in Within the range. The closer the value is to 1, the more significant the color contrast of that pixel relative to the whole image, and the higher the probability that it is a blemish.

[0044] It should be further explained that the bilateral weighted color contrast saliency calculation method proposed in this invention considers both the spatial proximity and color similarity relationships between pixels. Compared to traditional single-dimensional analysis methods, this invention organically combines spatial and color information to form a composite feature extraction mechanism, which can accurately capture subtle color differences against complex texture backgrounds, thereby improving the detection accuracy of blemishes. For example, for blemishes where paper textures intersect and merge, this invention calculates the weighted difference of each pixel relative to all other pixels in the image, which can amplify pixels with significant color differences from surrounding pixels (i.e., potential blemishes) while suppressing texture areas with similar colors to surrounding pixels.

[0045] Understandably, obtaining the expected threshold includes: dividing the saliency map into initial foreground and initial background based on a preset initial threshold; using the mean of all saliencies in the initial foreground as the initial foreground mean; using the mean of all saliencies in the initial background as the initial background mean; calculating the initial step size based on the initial foreground mean and the initial background mean; in response to the initial foreground mean not being greater than the sum of the initial background mean and a preset mean threshold, iteratively updating the initial threshold using the initial step size to obtain the first updated threshold; in response to the absolute difference between the first updated threshold and the initial threshold not satisfying a preset convergence condition, re-dividing the saliency map into a first updated foreground and a first updated background based on the first updated threshold; using the mean of all saliencies in the first updated foreground as the first foreground mean; and then iteratively updating the initial threshold to obtain the first updated threshold. The first update step size is calculated based on the mean of all saliencies in the updated background and the first background mean. If the first foreground mean is not greater than the sum of the first background mean and the mean threshold, the first update threshold is iteratively updated using the first update step size to obtain a second update threshold. If the absolute difference between the second update threshold and the first update threshold satisfies a preset convergence condition, the iteration stops, and the second update threshold is used as the desired threshold. If the absolute difference between the second update threshold and the first update threshold does not satisfy the preset convergence condition, the iteration continues until the absolute difference between the update thresholds obtained from two adjacent iterations satisfies the preset convergence condition, at which point the iteration stops, and the update threshold obtained from the last iteration is used as the desired threshold.

[0046] Understandably, calculating the initial step size includes: calculating the initial difference between the initial foreground mean and the initial background mean; using the absolute difference between the initial difference and the mean threshold as the initial absolute difference; and using the product of the initial absolute difference and the preset learning rate as the initial step size.

[0047] Understandably, dividing the saliency map into initial foreground and initial background based on the preset initial threshold includes: assigning pixels with saliency not less than the initial threshold to the initial foreground, and assigning pixels with saliency less than the initial threshold to the initial background.

[0048] For example, the process of dividing a saliency map into foreground and background based on a threshold is as follows:

[0049] prospect :

[0050] background :

[0051] In formulas (3) and (4), Indicates the number of iterations. Indicates the first The update threshold after the next iteration. Indicates according to The foreground obtained after segmentation, Indicates according to The background obtained after segmentation.

[0052] For example, referring to formulas (3) and (4), the initial threshold can be used. The saliency map is divided into initial foreground. and initial background .

[0053] For example, the process of calculating the foreground mean and the background mean is as follows:

[0054]

[0055]

[0056] In formula (5) and formula (6). Indicates the number of iterations. Indicates according to The mean of the foreground obtained after segmentation, Indicates according to The number of pixels in the foreground obtained after segmentation; Indicates according to The mean value of the background obtained after segmentation. Indicates according to The number of pixels in the foreground obtained after segmentation; It is a pixel. Significance after normalization.

[0057] For example, referring to formulas (5) and (6), the initial foreground mean is and the initial background mean is .

[0058] For example, the iterative formula is as follows:

[0059]

[0060] In formula (7), Indicates the first update threshold. This indicates the second update threshold. For learning rate, The mean threshold, This is the iteration step size.

[0061] For example, referring to formula (7), the initial step size is ,

[0062] Regarding formula (7), it should be noted that... It is the learning rate (which can be a small positive number, such as...) The meaning of this update rule is: if the difference between the foreground and background is not significant enough ( near This indicates that the current threshold may be too low and should be increased. (Increase the threshold value) to make the segmentation more stringent. It should be noted that this invention sets a mean threshold. To help determine whether the difference between the foreground and background is significant, the mean threshold is used. The size can be set as needed. If the average significance of the foreground is greater than the sum of the average significance of the background and the mean threshold, then... If the mean is significantly higher than the mean significance of the background, it indicates that the average significance of the foreground is significantly higher than that of the background. The mean threshold can be set according to different situations. For example, if the stain is similar in color to the paper, the mean threshold can be set smaller; conversely, if the stain is significantly different in color from the paper, the mean threshold can be set larger.

[0063] Regarding formula (7), it should be noted that the convergence condition is... If the convergence condition is met, the iteration stops and the final segmentation threshold is output. Otherwise, let Return to continue iterating. A maximum number of iterations can be set to prevent non-convergence (e.g., 50 iterations).

[0064] It should be noted that the expected threshold is the optimal segmentation threshold.

[0065] It should be further explained that this invention employs a strategy combining fixed step size and adaptive adjustment. A larger step size is used in the early stages of iteration to quickly approximate the optimal value, while the step size is automatically reduced to improve accuracy as convergence approaches. This strategy ensures both convergence speed and accuracy of the final result. This invention uses an iterative threshold evolution algorithm to automatically find the optimal segmentation threshold, i.e., the desired threshold. Compared to traditional fixed threshold methods, this dynamic threshold determination method can automatically adjust according to the specific features of each image, thus adapting to different paper types and lighting conditions.

[0066] It should be added that after obtaining each new threshold, the saliency plot can be... Perform binarization to allow paper quality inspectors to more clearly observe the traces of stains in the image. After obtaining the expected threshold, adjust the saliency map according to the expected threshold. Perform a final image binarization to obtain a preliminary taint mask. .

[0067] For example, generating a taint mask The formula is as follows:

[0068]

[0069] Regarding formula (8), it should be noted that... For blemish mask The pixels in This is the desired threshold.

[0070] It should be added that after obtaining the taint mask... Subsequently, morphological processing, connected component analysis, and edge refinement were performed to accurately extract blemish contours and eliminate artifacts. Morphological processing included opening and closing operations; the opening operation involved erosion followed by dilation, using a radius of... (For example The purpose of using circular or square structuring elements (pixels) is to remove tiny isolated points caused by noise (salt-and-pepper noise), smooth the boundaries of blemish areas, and break fine connections; the closing operation first dilates and then erodes, using a radius of... (For example The structural elements (pixels) are used to fill small holes inside blemish areas, connect adjacent blemish areas, and smooth boundaries. Connected component analysis involves labeling connected components in the morphologically processed binary image, calculating the area (number of pixels) of each connected component, and removing those with areas smaller than a preset threshold. (For example Tiny areas, typically residual noise or insignificant texture fragments, are placed as the background. This can be the minimum number of pixels a blemish might have. A Canny edge detector is applied to the final binary mask to extract a precise, single-pixel-wide blemish outline.

[0071] It is understandable that obtaining an image of the paper to be inspected includes: acquiring an initial image; optimizing the color data of the initial image; and using the optimized initial image as the image of the paper to be inspected.

[0072] It should be noted that color images acquired using high-resolution industrial linear or area scan cameras can be used as initial images. These images must have a resolution of at least 2048×2048 pixels to ensure clear capture of minute blemishes and texture details. Subsequently, color space conversion and noise suppression are performed on the initial images to optimize their color data.

[0073] For example, the color space conversion process can be as follows: convert the initial image to the CIELab color space, which is more suitable for color difference analysis. This space has perceptual uniformity, matches the characteristics of human vision, and can more accurately reflect actual color differences. Specifically, the conversion process adopts the standard RGB→XYZ→Lab conversion flow to ensure the accuracy of color representation and provide an optimized color data foundation for subsequent bilateral saliency calculation.

[0074] For example, the noise suppression process can be: [the process involves processing the converted data...] , Each of the three image channels was individually Gaussian smoothed to suppress high-frequency sensor noise. The Gaussian convolution kernel size was 5×5 pixels, and the standard deviation was [missing value]. This step helps improve the stability of subsequent significance calculations.

[0075] It should be noted that, firstly, the initial threshold is obtained. , Typically, the value is the median of the entire saliency plot (0.5), ensuring the algorithm starts its search from a relatively balanced position. Then, based on... The saliency map is binarized to obtain temporary foreground and background segmentation results. Then, the average saliency values ​​of these two regions are calculated separately. These average values ​​reflect the typical saliency levels of pixels classified as foreground and background at the current threshold. If the average saliency of the foreground is significantly higher than that of the background, the current threshold setting is reasonable; if they are close, it indicates that the threshold needs to be iteratively adjusted.

[0076] The adaptive iterative process of the present invention is illustrated below with a specific embodiment: obtaining the initial threshold. The significance level in the normalized significance graph is not less than 1. The points are divided into the foreground to obtain the initial foreground. The significance level in the normalized significance graph is less than 1. The points are divided into the background to obtain the initial background. Compare the initial foreground Significance mean in With the initial background Significance mean in ,like Greater than The sum of the sum and the preset mean threshold indicates that Significantly higher That is, the current initial threshold If set properly, then the initial threshold will be... As the desired threshold. Specifically, the initial threshold in this embodiment. It can be 0.8.

[0077] The adaptive iterative process of the present invention is illustrated below with another specific embodiment: obtaining the initial threshold. The significance level in the normalized significance graph is not less than 1. The points are divided into the foreground to obtain the initial foreground. The significance level in the normalized significance graph is less than 1. The points are divided into the background to obtain the initial background. Compare the initial foreground Significance mean in With the initial background Significance mean in ,like Not greater than The sum of the sum and the preset mean threshold, using the initial step size Iteratively update the initial threshold Obtain the first update threshold If at this time The convergence condition is met, that is This indicates the current first update threshold. If set properly, the first update threshold will be... As the desired threshold. Specifically, the initial threshold in this embodiment. It can be 0.75.

[0078] The adaptive iterative process of the present invention is illustrated below with another specific embodiment: obtaining the initial threshold. The significance level in the normalized significance graph is not less than 1. The points are divided into the foreground to obtain the initial foreground. The significance level in the normalized significance graph is less than 1. The points are divided into the background to obtain the initial background. Compare the initial foreground Significance mean in With the initial background Significance mean in ,like Not greater than The sum of the sum and the preset mean threshold, using the initial step size Iteratively update the initial threshold Obtain the first update threshold If at this time The convergence condition is not met, i.e. This indicates the current first update threshold. The settings are unreasonable; then, according to Re-divide the significance plot, ensuring that the significance level in the significance plot is not less than [value missing]. The points are assigned to the foreground, resulting in the first updated foreground. ; The significance level in the significance plot is less than The points are divided into the background to obtain the first updated background. Compare the first update prospect Significance mean in With the first update background Significance mean in ,like Not greater than The sum of the sum and the preset mean threshold is used with the first update step size. Iterative update of the first update threshold Obtain the second update threshold If at this time The convergence condition is met, that is This indicates the current second update threshold. If set properly, the second update threshold will be... As the expected threshold. Specifically, in this embodiment... It can be 0.7. It should be added to the examples that if... If the convergence condition is not met, the iteration process continues until the absolute difference between the update thresholds obtained from two adjacent iterations meets the preset convergence condition. Then the iteration stops and the update threshold obtained from the last iteration is taken as the expected threshold.

[0079] This invention provides a highly adaptive, intelligent method for detecting stains on special paper that requires no manual labeling and can be deployed in real-time in industrial settings. By combining bilateral weighted color contrast saliency calculation with automatic threshold evolution technology, this invention achieves high-precision and robust localization and segmentation of minute color difference stains (including stains intersecting with textures) under complex random textures and varying lighting conditions, significantly improving the accuracy, automation, and applicability of the detection.

[0080] It should be noted that the preferred embodiments of this application have been described above with reference to the accompanying drawings, but this does not limit the scope of the claims of this application. For those skilled in the art, various modifications and improvements can be made without departing from the concept of the invention, and these all fall within the protection scope of the invention. Therefore, the protection scope of this patent should be determined by the appended claims.

Claims

1. A method for intelligent detection of the production quality of special paper, characterized in that, include: Obtain the target point, which is any pixel in the image of the paper to be inspected; Using any other pixel in the image of the paper to be inspected, excluding the target point, as a reference point, calculate the bilateral weights between the target point and the reference point, calculate the color distance between the target point and the reference point, use the product of the bilateral weights and the color distance as the significant difference between the target point and the reference point, and use the sum of the significant differences between the target point and all the reference points as the salience of the target point. The saliency of all pixels in the image of the paper to be inspected is obtained by traversing the graph and constructing a saliency map. Construct an expected threshold, and segment the saliency map according to the expected threshold to obtain the tainted region; Calculating the bilateral weights includes: Calculate the spatial distance between the target point and the reference point, and use an exponential function to perform a negative correlation mapping on the ratio of the square of the spatial distance to a preset spatial scale parameter to obtain the spatial weight; Calculate the color distance between the target point and the reference point, and use an exponential function to map the ratio of the square of the color distance to a preset color scale parameter to obtain the color weight; The product of the spatial weight and the color weight is taken as the bilateral weight; Obtaining the spatial distance includes: A two-dimensional coordinate system is constructed for the image of the paper to be inspected, and the spatial distance is the positional distance between the target point and the reference point in the two-dimensional coordinate system; The Euclidean distance between the three-dimensional color vector of the target point and the three-dimensional color vector of the reference point.

2. The intelligent detection method for the production quality of special paper according to claim 1, characterized in that, Obtaining the expected threshold includes: The saliency map is divided into an initial foreground and an initial background according to a preset initial threshold. The mean of all saliencies in the initial foreground is taken as the initial foreground mean, and the mean of all saliencies in the initial background is taken as the initial background mean. An initial step size is calculated based on the initial foreground mean and the initial background mean. In response to the initial foreground mean not being greater than the sum of the initial background mean and the preset mean threshold, the initial threshold is iteratively updated using the initial step size to obtain a first update threshold. In response to the absolute difference between the first update threshold and the initial threshold not satisfying a preset convergence condition, the saliency map is re-divided into a first update foreground and a first update background based on the first update threshold. The mean of all saliencies in the first update foreground is taken as the first foreground mean, and the mean of all saliencies in the first update background is taken as the first background mean. A first update step size is calculated based on the first foreground mean and the first background mean. In response to the first foreground mean not being greater than the sum of the first background mean and the mean threshold, the first update threshold is iteratively updated using the first update step size to obtain a second update threshold. If the absolute difference between the second update threshold and the first update threshold satisfies a preset convergence condition, the iteration stops and the second update threshold is taken as the expected threshold. If the absolute difference between the second update threshold and the first update threshold does not satisfy the preset convergence condition, the iteration continues until the absolute difference between the update thresholds obtained from two adjacent iterations satisfies the preset convergence condition, at which point the iteration stops and the update threshold obtained from the last iteration is taken as the expected threshold.

3. The intelligent detection method for the production quality of special paper according to claim 2, characterized in that, Calculating the initial step size includes: Calculate the initial difference between the initial foreground mean and the initial background mean; The absolute difference between the initial difference and the mean threshold is used as the initial absolute difference; The product of the initial absolute difference and the preset learning rate is used as the initial step size.

4. The intelligent detection method for the production quality of special paper according to claim 2, characterized in that, The step of dividing the saliency map into initial foreground and initial background according to a preset initial threshold includes: Pixels with a saliency not less than the initial threshold are assigned to the initial foreground, and pixels with a saliency less than the initial threshold are assigned to the initial background.

5. The intelligent detection method for the production quality of special paper according to claim 1, characterized in that, Obtaining the image of the paper to be inspected includes: Acquire initial images; Optimize the color data of the initial image; The optimized initial image is used as the image of the paper to be inspected.

Citation Information

Patent Citations

  • Method and device for detecting paper surface defect, based on visual saliency

    CN108663382A

  • Chip surface scratch defect detection method and device and computer equipment

    CN113781402A

  • Wafer defect detection method and device, electronic equipment and storage medium

    CN120259187A