A method and system for detecting impurities before printing of PVC decals
By employing multi-band spectroscopy and polarization spectroscopy techniques, combined with texture feature extraction and spatial correlation analysis, the problem of incomplete impurity detection in traditional detection methods has been solved. This enables accurate identification and efficient screening of impurities on PVC decal surfaces, improving the comprehensiveness and accuracy of the detection.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SIHUI NANYUE PACKING COLOR PRINTING CO LTD
- Filing Date
- 2026-02-03
- Publication Date
- 2026-05-29
AI Technical Summary
Traditional methods for detecting impurities before PVC decal printing cannot fully capture changes in impurities over different time periods, leading to decreased detection accuracy. Furthermore, these methods struggle to identify impurities with complex shapes and similar colors, resulting in a high probability of misjudgment and missed detection. They are also subject to severe background noise interference and have poor adaptability.
By employing multi-band spectroscopy and polarization spectroscopy techniques, combined with texture feature extraction, image segmentation, and spatial correlation analysis, ultra-high-definition polarization spectral images are obtained by projecting different wavelength spectra and adjusting the polarization angles during multiple detection periods. Polarization state calibration, substrate region segmentation, texture gradient feature extraction, and spatial correlation screening of suspected impurity regions are then performed, and a deep belief network is used for the final determination.
It enables precise detection of impurities on the surface of PVC decals, improves the comprehensiveness and accuracy of detection, reduces false positives and false negatives, enhances the adaptability and identification ability of complex impurities, and suppresses background noise interference.
Smart Images

Figure CN122109096A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of PVC testing technology, specifically to a method and system for detecting impurities before printing PVC decals. Background Technology
[0002] With the development of industries such as decorative materials, home building materials, and automotive interiors, PVC decals have shifted from ordinary decorative materials to high-end customization. Users have significantly increased their requirements for the clarity, color consistency, and surface quality of printed patterns. Traditional methods that rely on manual or low-precision inspection can no longer meet the high-quality requirements of modern printing.
[0003] Currently, traditional methods typically perform detection within a fixed time period, lacking comprehensive capture of impurity behavior across different time periods. Such detection methods may miss or fail to effectively identify minute changes in surface impurities, leading to decreased accuracy. Furthermore, they often rely on simple image processing techniques and cannot intelligently identify and process impurities based on their different morphologies, resulting in an inability to accurately distinguish impurities with complex shapes and similar colors, thus increasing the possibility of misjudgment and missed detection.
[0004] Furthermore, in traditional image processing methods, background noise is often difficult to suppress effectively, especially in low-resolution or ambient light conditions where there are large variations. The presence of noise may interfere with the accurate identification of impurities. Moreover, traditional methods often rely on fixed threshold settings and processing methods based on simple features, which cannot be dynamically adjusted according to different surface conditions, impurity types, or environmental changes, resulting in poor adaptability when faced with irregular and complex impurities. Summary of the Invention
[0005] To achieve the above objectives, the present invention provides the following technical solution: a method for detecting impurities before printing PVC decals, comprising:
[0006] The multi-band spectral projection unit is controlled to project multiple wavelength spectra onto the PVC decal surface to be tested during multiple detection periods, and the polarization state adjustment component is controlled to synchronously adjust the polarization angle to obtain at least one set of polarization spectral images acquired by the ultra-high-definition area array imaging module during the multiple detection periods.
[0007] Polarization state calibration is performed on the at least one set of polarization spectral images to obtain calibrated polarization spectral image data for the multiple detection time periods;
[0008] Based on the calibrated polarization spectral image data for each detection period, a set of polarization spectral images for each detection period is segmented into substrate regions to obtain multiple substrate region image sets.
[0009] Texture gradient features are extracted from the image set of the substrate region to extract candidate image blocks with abnormal texture features from the image set of the substrate region, thereby obtaining a candidate image block set corresponding to the image set of the substrate region.
[0010] For each candidate image block in each set of candidate image blocks, find similar texture blocks of the candidate image block from the set of remaining candidate image blocks, and determine multiple suspected impurity image blocks based on the similar texture blocks;
[0011] Based on the suspected impurity image blocks in adjacent time periods among the multiple detection time periods, spatial correlation screening is performed on the suspected impurity image blocks in adjacent time periods to obtain preliminary impurity regions; feature fusion and judgment are performed on all the preliminary impurity regions to obtain the impurity detection results before the printing of the PVC decal to be detected.
[0012] Preferably, polarization state calibration is performed on the at least one set of polarization spectral images to obtain calibrated polarization spectral image data for the multiple detection time periods, including:
[0013] Obtain a preset polarization reference library, wherein the preset polarization reference library includes reference polarization parameters of standard PVC material under multiple wavelength spectra and multiple polarization angles, the multiple wavelength spectra correspond one-to-one with the spectral wavelengths projected by the multi-band spectral projection unit, and the multiple polarization angles are consistent with the angle range adjusted by the polarization state adjustment component;
[0014] Based on a set of polarization spectral images for each detection period, the actual polarization parameters of each pixel point under each detection period are extracted, wherein the actual polarization parameters include the degree of polarization and polarization direction of the pixel point under the corresponding wavelength spectrum and polarization angle.
[0015] Based on the reference polarization parameters and the actual polarization parameters, the polarization deviation value of each pixel point in each detection period is calculated, wherein the polarization deviation value is the difference between the actual polarization parameters and the corresponding reference polarization parameters;
[0016] Based on the polarization deviation value of each pixel in each detection period, pixel correction is performed on a set of polarization spectral images in each detection period to obtain calibrated polarization spectral image data for the multiple detection periods.
[0017] Among them, obtaining the preset polarization reference library includes:
[0018] Collect standard PVC samples of various specifications, including PVC samples of different thicknesses, colors and surface gloss levels;
[0019] The multi-band spectral projection unit is controlled to project multiple wavelengths of light onto the surface of each standard PVC sample in sequence, and the polarization state adjustment component is controlled to adjust multiple polarization angles in sequence, so as to simultaneously acquire at least one set of standard polarization spectral images collected by the ultra-high-definition area array imaging module.
[0020] The polarization parameters of each pixel in each set of standard polarization spectral images are extracted. The average value of the polarization parameters of the pixels under the same specifications, wavelength spectrum and polarization angle is taken as the reference polarization parameters under the same specifications, wavelength spectrum and polarization angle conditions.
[0021] The reference polarization parameters under all conditions are classified and stored according to the specified wavelength and spectral polarization angle to construct the preset polarization reference library.
[0022] Preferably, based on the calibrated polarization spectral image data for each detection period, a set of polarization spectral images for each detection period is segmented into substrate regions to obtain multiple substrate region image sets, including:
[0023] The calibrated polarization spectral image data are sequentially subjected to mean denoising, color normalization, and detail enhancement to obtain a preprocessed image set;
[0024] The substrate region model is used as the segmentation object, and the preprocessed image set is used as the segmentation image set;
[0025] Based on the segmented image set, calculate the dynamic clustering threshold for each pixel;
[0026] Based on the dynamic clustering threshold, each pixel in the segmented image set is divided into a substrate pixel and a background pixel to obtain a substrate region image composed of substrate pixels.
[0027] The image of the substrate region is removed from the segmented image set to obtain the remaining image data. It is then determined whether the number of the remaining image data is less than a preset segmentation end threshold.
[0028] The iteration ends when the amount of remaining image data is less than a preset segmentation termination threshold.
[0029] In response to the fact that the amount of remaining image data is not less than a preset segmentation end threshold, the remaining image data is used as a segmented image set, and the step of calculating the dynamic clustering threshold for each pixel based on the segmented image set is returned to be executed.
[0030] Preferably, texture gradient feature extraction is performed on the substrate region image set to extract candidate image patches with abnormal texture features from the substrate region image set, including:
[0031] The texture gradient feature parameters of each image data in the substrate region image set are calculated, and the normal texture feature threshold range of the substrate region image set is established based on the texture gradient feature parameters.
[0032] The substrate region image set is divided into multiple image sub-blocks, and the multiple image sub-blocks are further divided into normal texture sub-blocks and abnormal texture sub-blocks according to the texture gradient feature parameters of each image sub-block;
[0033] From all the abnormal texture sub-blocks, extract the abnormal texture sub-blocks that satisfy the impurity texture conditions as candidate image blocks, and classify the candidate image blocks into the candidate image block set.
[0034] Preferably, finding similar texture blocks of the candidate image blocks from the remaining candidate image block set, and determining multiple suspected impurity image blocks based on the similar texture blocks, includes:
[0035] From each of the remaining candidate image block sets, a similar texture block of the candidate image block is found to obtain multiple similar texture groups of the candidate image block, wherein each similar texture group includes the candidate image block and a similar texture block of the candidate image block;
[0036] For each group of similar textures, the consistency of the multispectral grayscale distribution features of the two image blocks in the group of similar textures is verified to obtain the verification result. The image block whose verification result meets the preset conditions is regarded as a suspected impurity image block.
[0037] Preferably, from each of the remaining candidate image block sets, a similar texture block is found for each candidate image block, including:
[0038] Calculate the texture gradient feature parameter vector of the candidate image patch and use it as the target parameter vector;
[0039] Calculate the texture gradient feature parameter vector of each candidate image block in the remaining candidate image block set, and use it as the parameter vector to be matched;
[0040] Calculate the feature space similarity between the target parameter vector and each parameter vector to be matched, and take the candidate image block corresponding to the parameter vector to be matched with the highest feature space similarity as the similar texture block of the candidate image block.
[0041] Preferably, based on suspected impurity image blocks from adjacent time periods within the plurality of detection time periods, spatial correlation screening is performed on the suspected impurity image blocks from adjacent time periods to obtain preliminary impurity regions, including:
[0042] Spatial coordinate mapping is performed on the suspected impurity image blocks in the adjacent time periods to obtain at least one region group in the adjacent time periods, wherein each region group includes at least two image blocks with matching coordinates in the suspected impurity image blocks in the adjacent time periods;
[0043] If there are at least two region groups, then the at least two region groups are prioritized according to the number of image patches in each region group and the average feature similarity.
[0044] Interference elimination detection is performed on each of the sorted at least two regions, and the regions that pass the detection are identified as preliminary impurity regions.
[0045] If there is only one region group, then the local image details of all suspected impurity image blocks in the region group are extracted, the local image details are compared with the preset interference feature library, and after removing the image blocks that match the interference features, the remaining image blocks constitute the preliminary impurity region.
[0046] Preferably, the at least two region groups are prioritized based on the number of image patches in each region group and the average feature similarity, including:
[0047] The number of suspected impurity image blocks contained in each of the at least two region groups is counted and used as the first evaluation index for each region group.
[0048] Calculate the feature similarity between all suspected impurity image blocks within each region group. The feature similarity includes gray-level distribution similarity and shape similarity. Take the average of all feature similarities as the second evaluation index for each region group.
[0049] Based on the first evaluation index, the at least two regional groups are initially sorted in descending order of their values;
[0050] If there are at least two regional groups with the same first evaluation index, then the regional groups are sorted a second time according to the second evaluation index in descending order of value to obtain the final priority ranking result.
[0051] Preferably, feature fusion and determination are performed on all the preliminary impurity regions to obtain the impurity detection results before printing the PVC decal, including:
[0052] For each of the preliminary impurity regions, multispectral texture features and shape features are extracted to obtain a multidimensional feature vector for each preliminary impurity region;
[0053] All the multi-dimensional feature vectors are input into a pre-trained deep belief network classifier to obtain the classification result of each preliminary impurity region;
[0054] The preliminary impurity regions classified as impurities are merged to obtain the impurity detection results before the PVC decal printing is tested.
[0055] A system for detecting impurities before printing PVC decals, applicable to the aforementioned method for detecting impurities before printing PVC decals, comprising:
[0056] The image acquisition module is used to control the multi-band spectral projection unit to project multiple wavelength spectra onto the PVC decal surface to be detected during multiple detection periods, and to control the polarization state adjustment component to synchronously adjust the polarization angle, so as to acquire at least one set of polarization spectral images acquired by the ultra-high-definition area array imaging module during the multiple detection periods.
[0057] The image calibration module is used to perform polarization state calibration on the at least one set of polarization spectral images respectively, so as to obtain calibrated polarization spectral image data under the multiple detection time periods;
[0058] The region segmentation module is used to segment the substrate region based on the calibrated polarization spectral image data of each detection period, thereby obtaining multiple substrate region image sets.
[0059] The feature extraction module is used to extract texture gradient features from the substrate region image set to extract candidate image blocks with abnormal texture features from the substrate region image set, thereby obtaining a candidate image block set corresponding to the substrate region image set.
[0060] The impurity detection module is used to find similar texture blocks of each candidate image block in each candidate image block set from the remaining candidate image block set, and to determine multiple suspected impurity image blocks based on the similar texture blocks.
[0061] The fusion and determination module is used to perform spatial correlation screening on suspected impurity image blocks in adjacent time periods based on the multiple detection time periods to obtain preliminary impurity regions; and to perform feature fusion and determination on all the preliminary impurity regions to obtain the impurity detection result of the PVC decal before printing.
[0062] Compared with the prior art, the beneficial effects of the present invention are:
[0063] This invention utilizes multi-band spectroscopy and polarization spectroscopy techniques, combined with texture feature extraction, image segmentation, and spatial correlation analysis, to achieve accurate detection of impurities on PVC decal surfaces. In particular, with the support of high-resolution polarization spectral image data, it can more effectively identify potential impurities, thereby improving detection accuracy. Furthermore, by projecting spectra of different wavelengths and simultaneously adjusting the polarization angle during multiple detection periods, it can comprehensively capture different spectral and polarization characteristics of the PVC decal surface, avoiding impurity information that may be missed by traditional single-period detection, thus improving the comprehensiveness and accuracy of detection.
[0064] This invention calibrates the polarization state of polarization spectral image data and segments the substrate region. Combined with the extraction and fusion of multi-dimensional features such as texture and shape, it can effectively distinguish impurities from normal surfaces, reducing the probability of misjudgment and missed judgment. Furthermore, through preprocessing steps such as mean denoising, color normalization, and detail enhancement, it can effectively suppress background noise, ensuring clearer extraction of valuable image information and helping to identify small and easily overlooked impurities.
[0065] This invention effectively identifies and filters out misidentified impurity regions by screening the spatial correlation of suspected impurity image blocks in adjacent time periods, further improving the reliability and accuracy of the detection results. Furthermore, by utilizing methods such as dynamic clustering threshold, similarity calculation of texture feature parameters, and priority ranking of region groups, the algorithm's adaptability to different impurity types is enhanced, enabling intelligent processing of complex impurity patterns and stains or defects of different forms. Attached Figure Description
[0066] Figure 1 This is a schematic flowchart of the overall method in one embodiment of the present invention;
[0067] Figure 2 This is a schematic diagram of the overall system architecture in one embodiment of the present invention.
[0068] In the diagram: 1. Image acquisition module; 2. Image calibration module; 3. Region segmentation module; 4. Feature extraction module; 5. Impurity detection module; 6. Fusion determination module. Detailed Implementation
[0069] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0070] Example 1, please refer to Figure 1This invention provides a technical solution: a method for detecting impurities before printing PVC decals, comprising:
[0071] S1. Control the multi-band spectral projection unit to project multiple wavelength spectra onto the PVC decal surface to be tested during multiple detection periods, and control the polarization state adjustment component to synchronously adjust the polarization angle to obtain at least one set of polarization spectral images acquired by the ultra-high-definition area array imaging module during multiple detection periods.
[0072] S2. Perform polarization state calibration on at least one set of polarization spectral images to obtain calibrated polarization spectral image data for multiple detection time periods.
[0073] S3. Based on the calibrated polarization spectral image data for each detection period, perform substrate region segmentation on a set of polarization spectral images for each detection period to obtain multiple substrate region image sets.
[0074] S4. Extract texture gradient features from the substrate region image set to extract candidate image blocks with abnormal texture features from the substrate region image set, and obtain the candidate image block set corresponding to the substrate region image set.
[0075] S5. For each candidate image block in each candidate image block set, find similar texture blocks of the candidate image block from the remaining candidate image block set, and determine multiple suspected impurity image blocks based on the similar texture blocks.
[0076] S6. Based on the suspected impurity image blocks in adjacent time periods in multiple detection time periods, perform spatial correlation screening on the suspected impurity image blocks in adjacent time periods to obtain preliminary impurity regions; perform feature fusion and judgment on all preliminary impurity regions to obtain the impurity detection results before the PVC decal printing to be detected.
[0077] It should be noted that the multi-band spectral projection unit projects different wavelengths of light onto the PVC decal surface to be tested, and the polarization angle of the light is adjusted by the polarization state adjustment component. Then, the ultra-high-definition imaging module acquires multiple images to obtain polarization spectral image data. For example, suppose there is a PVC decal with some tiny impurities (such as oil, dust, or scratches) on its surface. By projecting light of different wavelengths (such as red light, green light, and blue light) and adjusting the polarization angle (such as 0°, 45°, and 90°), the spectral data reflected from the surface can be obtained from different angles and different light wavelengths. This allows us to capture the reflectivity of different materials under different lighting conditions.
[0078] The acquired polarization spectrum images are calibrated to eliminate deviations that may be caused by equipment or environmental factors; this ensures the accuracy of the image data. For example, polarization spectrum images may be affected by factors such as light source and camera angle, resulting in some noise in the image; through calibration, these influencing factors can be removed, making the image more realistically reflect the state of the PVC surface.
[0079] Based on the calibrated polarization spectral image data for each detection period, the substrate area is segmented; that is, the part belonging to the substrate (i.e., the PVC surface) in the image is distinguished from other irrelevant areas (such as impurities, bubbles, etc.). For example, in the image of PVC decals, a part may be seen as the substrate area (i.e., the plastic surface), while other parts may contain impurities or air bubbles. Through image processing technology, the substrate area can be automatically identified and segmented, and irrelevant parts can be excluded.
[0080] Texture gradient features are extracted from images of the substrate area to analyze the surface structure of image blocks and identify areas with abnormal textures, which may contain impurities. For example, a normal PVC surface should be smooth with a consistent texture; if the surface has oil stains, scratches, or dust, the texture of these areas will appear inconsistent or abnormal. These abnormal areas can be identified by extracting texture features (such as edges, corners, color differences, etc.).
[0081] From the image set of all substrate regions, candidate image patches with abnormal textures are extracted, and the presence of suspected impurities is determined by searching for similar texture patches. For example, suppose that a small area (image patch) in the result of texture gradient feature extraction shows abnormal texture (such as fine scratches or stains on the surface). This area can be compared with other parts of the image to find similar areas. If multiple similar areas are found, it can be preliminarily determined that these areas may contain impurities.
[0082] Spatial correlation screening is performed on suspected impurity image patches across multiple detection time periods to check if these regions are spatially related. If they appear in adjacent time periods, it may indicate that impurities in these regions are persistent. Finally, based on this information, a fusion analysis is performed to obtain the final impurity detection result. For example, if stains or scratches repeatedly appear in a certain region within different time periods, and they exhibit similar texture features in the image, this indicates that these regions may contain actual impurities. By further analyzing and fusing data from different time periods, the final impurity region can be identified.
[0083] In an optional embodiment, polarization state calibration is performed on at least one set of polarization spectral images to obtain calibrated polarization spectral image data for multiple detection time periods, including:
[0084] Obtain a preset polarization reference library, which includes reference polarization parameters of standard PVC material under multiple wavelength spectra and multiple polarization angles. The multiple wavelength spectra correspond one-to-one with the spectral wavelengths projected by the multi-band spectral projection unit, and the multiple polarization angles are consistent with the angle range adjusted by the polarization state adjustment component.
[0085] Based on a set of polarization spectral images for each detection period, the actual polarization parameters of each pixel in each detection period are extracted. The actual polarization parameters include the degree of polarization and polarization direction of the pixel under the corresponding wavelength spectrum and polarization angle.
[0086] Based on the reference polarization parameters and the actual polarization parameters, the polarization deviation value of each pixel point in each detection period is calculated, where the polarization deviation value is the difference between the actual polarization parameter and the corresponding reference polarization parameter.
[0087] Based on the polarization deviation value of each pixel in each detection period, pixel correction is performed on a set of polarization spectral images for each detection period to obtain calibrated polarization spectral image data for multiple detection periods.
[0088] Among them, obtaining the preset polarization reference library includes:
[0089] Standard PVC samples of various specifications were collected, including PVC samples with different thicknesses, colors, and surface gloss levels.
[0090] The multi-band spectral projection unit is controlled to project multiple wavelengths of light onto the surface of each standard PVC sample in sequence, and the polarization state adjustment component is controlled to adjust multiple polarization angles in sequence, so as to simultaneously acquire at least one set of standard polarization spectral images collected by the ultra-high-definition area array imaging module.
[0091] The polarization parameters of each pixel in each set of standard polarization spectral images are extracted. The average value of the polarization parameters of pixels with the same specifications, wavelength spectrum and polarization angle is taken as the reference polarization parameter under the same specifications, wavelength spectrum and polarization angle conditions.
[0092] The reference polarization parameters under all conditions are classified and stored according to the specified wavelength and spectral polarization angle to construct a preset polarization reference library.
[0093] It should be noted that a variety of standard PVC samples of different specifications need to be collected, and these samples are tested at multiple wavelengths and polarization angles. The establishment of the polarization reference library depends on the polarization spectral data of these samples under different conditions. For example, suppose there are three different specifications of PVC samples: Sample 1: 1 mm thick, high surface gloss, white color; Sample 2: 2 mm thick, low surface gloss, gray color; Sample 3: 3 mm thick, moderate surface gloss, blue color. These samples will be used to collect data under different conditions, such as using different wavelengths of light (e.g., red, green, blue light) and different polarization angles (e.g., 0°, 45°, 90°, etc.). For example, the wavelength of red light is 620-750 nm, the wavelength of green light is 495-570 nm, and the wavelength of blue light is 450-495 nm.
[0094] The multi-band spectral projection unit projects light of different wavelengths onto a standard PVC sample, while the polarization state adjustment component adjusts different polarization angles to acquire image data under each angle and spectrum. For example, when testing sample 1 (1mm thick, white PVC), red light, green light, and blue light may be used for spectral projection in sequence. After each spectral projection, the polarization state adjustment component will adjust the polarization angle in sequence, such as 0°, 45°, and 90°, and use an ultra-high-definition area array imaging module to acquire images under these different conditions.
[0095] From each set of polarization spectral images, the polarization parameters of each pixel are extracted, including the degree of polarization and the polarization direction. Then, the baseline polarization parameters under each condition are calculated by averaging all pixels under the same specifications, wavelength, and polarization angle. For example, suppose that when testing sample 1 with red light (620-750nm) and a polarization angle of 0°, polarization data of 10,000 pixels are obtained. Each pixel will have a polarization degree value (e.g., 0.8) and a polarization direction value (e.g., 30°). By calculating the average value of these pixels, the baseline polarization parameters under that condition are obtained, such as an average polarization degree of 0.82 and an average polarization direction of 28°.
[0096] During each detection period, the actual polarization parameters of each pixel are compared with the preset reference polarization parameters to calculate the polarization deviation value. The polarization deviation value is the difference between the actual measured value and the reference value. For example, in a subsequent detection, if sample 1 is tested again, a value of 0.75 polarization degree and 32° polarization direction may be obtained. Compared with the previously obtained reference value (polarization degree 0.82, polarization direction 28°), the polarization deviation value is: polarization degree deviation = 0.75 - 0.82 = -0.07, polarization direction deviation = 32° - 28° = 4°.
[0097] Based on the polarization deviation value, pixel correction is performed on the polarization spectral image for each detection period to obtain calibrated polarization spectral image data. This process can correct polarization deviations caused by equipment errors or environmental influences, ensuring more accurate image data. For example, based on the above polarization deviation value, the polarization parameter of each pixel in the image will be corrected. Assuming that the actual polarization degree deviation of a certain pixel is -0.07, the corrected polarization degree will be adjusted to the reference value of 0.82 minus the deviation value of 0.07, resulting in a correction value of 0.75. The polarization direction will also be corrected in a similar way.
[0098] In an optional embodiment, based on the calibrated polarization spectral image data for each detection period, a set of polarization spectral images for each detection period is segmented into substrate regions to obtain multiple substrate region image sets, including:
[0099] The calibrated polarization spectral image data were sequentially subjected to mean denoising, color normalization, and detail enhancement to obtain a preprocessed image set.
[0100] The substrate region model is used as the segmentation object, and the preprocessed image set is used as the segmentation image set.
[0101] Based on the segmented image set, the dynamic clustering threshold for each pixel is calculated.
[0102] Based on the dynamic clustering threshold, each pixel in the segmented image set is divided into substrate pixels and background pixels to obtain a substrate region image composed of substrate pixels.
[0103] The substrate region image is removed from the segmented image set to obtain the remaining image data. It is then determined whether the number of remaining image data is less than the preset segmentation end threshold.
[0104] The iteration ends when the amount of remaining image data is less than the preset segmentation end threshold.
[0105] In response to the fact that the amount of remaining image data is not less than the preset segmentation end threshold, the remaining image data is used as a segmented image set, and the process returns to the step of calculating the dynamic clustering threshold for each pixel based on the segmented image set.
[0106] It should be noted that a series of processes are performed on the calibrated polarization spectral image data to improve image quality and make it suitable for subsequent segmentation operations. These processes include: mean denoising: removing random noise from the image to make it smoother; color normalization: standardizing the colors in the image to make them more consistent under different lighting conditions; and detail enhancement: improving the details in the image to make important features more prominent. For example, suppose we have a polarization spectral image. The original image may contain noise and uneven lighting. Mean denoising removes the noise, resulting in a cleaner image. Then, color normalization ensures that the colors in the image remain consistent under different testing conditions. Finally, detail enhancement technology makes the edges and important regions in the image clearer.
[0107] In the preprocessed image, the "substrate region" is set as the target for image segmentation. The substrate region is the part of interest, which is usually the area in the image that represents the surface of the material or a specific object, while the background is the part that needs to be removed. For example, in a polarization spectrum image of a PVC sample, the substrate region may be the surface of the PVC material, while the background may be other areas in the image, such as the edge environment or surface defects. The goal is to obtain the substrate region through segmentation and remove the background.
[0108] By performing dynamic clustering analysis on each pixel in the segmented image set, a "clustering threshold" is calculated for each pixel. This threshold is used to determine whether the pixel belongs to the substrate region or the background region. For example, for each pixel, its feature values (e.g., polarization degree and polarization direction) are calculated, and dynamic clustering is performed based on these feature values. For instance, if a pixel has a high polarization degree, it may indicate that it belongs to the substrate region, while a pixel with a low polarization degree may belong to the background region. By dynamically adjusting the clustering threshold, adaptive segmentation can be performed.
[0109] Based on the calculated dynamic clustering threshold, each pixel in the image is divided into "substrate pixels" and "background pixels," thus obtaining an image containing only the substrate region. For example, after clustering, if some pixels in the image have a polarization degree greater than 0.8, they are identified as substrate pixels, while pixels with a polarization degree less than 0.4 are identified as background pixels. In this way, the area belonging to the PVC material surface in the image can be extracted, resulting in an image containing only the substrate region.
[0110] Once the substrate region image is obtained, it is removed from the original segmented image to obtain the remaining image data. Next, it is determined whether the amount of remaining image data is less than a preset "segmentation end threshold". If it is less than the threshold, the segmentation process ends; if it is not less than the threshold, the segmentation process continues iteratively. For example, assuming that the pixels of the substrate region image account for 90% of the total image, after removing the substrate region, 10% of the image data remains. If the set segmentation end threshold is 5%, then since the amount of remaining data is greater than 5%, the segmentation process continues; otherwise, the segmentation process ends.
[0111] If the amount of remaining image data is greater than the preset segmentation end threshold, the remaining data is used as a new segmented image set, and dynamic clustering threshold calculation and pixel segmentation are performed again. This process will be repeated until the amount of remaining data is less than the segmentation end threshold. For example, suppose that after the first segmentation, the remaining image data still contains some unwanted background parts. These background regions are used as a new segmented image set, and dynamic clustering and segmentation operations are continued until only a very small amount of background data remains, which meets the stopping condition and ends the iteration.
[0112] In an optional embodiment, texture gradient feature extraction is performed on the substrate region image set to extract candidate image patches with abnormal texture features from the substrate region image set, including:
[0113] The texture gradient feature parameters of each image data in the substrate region image set are calculated, and the normal texture feature threshold range of the substrate region image set is established based on the texture gradient feature parameters.
[0114] The image set of the substrate region is divided into multiple image sub-blocks, and based on the texture gradient feature parameters of each image sub-block, the multiple image sub-blocks are further divided into normal texture sub-blocks and abnormal texture sub-blocks.
[0115] From all anomalous texture sub-blocks, extract the anomalous texture sub-blocks that meet the impurity texture conditions as candidate image blocks, and classify the candidate image blocks into the candidate image block set.
[0116] It should be noted that for each substrate region image, the texture gradient feature parameters of each pixel are calculated. The texture gradient typically involves the gray-level changes in various regions of the image, used to describe the changes and directionality of surface texture in the image. Texture gradient: Common methods include calculating the gradient of the image (such as the Sobel operator, Laplacian operator, etc.), the purpose of which is to detect the rate of change of gray-level values in the image, reflecting the edge and morphological features of the texture. Example: Suppose there is an image of a PVC material substrate region, and the Sobel operator is used to calculate the texture gradient of the image. Some regions in the image may exhibit higher gray-level changes (such as changes in edges or texture), and the gradient values of these regions will be larger, while the gradient values of smooth regions will be smaller. By calculating these gradient values, the texture features of each pixel can be extracted.
[0117] Based on the texture gradient feature parameters of all image data, a threshold range for "normal" texture features is established. Normal texture refers to texture without any defects or impurities. By analyzing the texture features of the substrate area image, a reasonable range of texture gradient values can be set to determine which areas have normal textures. For example, in an image of PVC material, a normal texture might be a flat surface with smooth and uniform grayscale changes. Therefore, by statistically analyzing the texture gradient features of all substrate area images (e.g., calculating the mean and standard deviation of gradient values), a normal texture gradient range can be determined. For example, areas with gradient values between [0.2, 0.8] are considered normal texture areas.
[0118] To perform more detailed analysis, the substrate area image is divided into multiple smaller sub-blocks; each sub-block corresponds to a small region in the image, and the size of the sub-blocks is usually fixed (e.g., 32x32 or 64x64 pixels); this can effectively capture local texture variations in the image; for example, suppose the substrate area image of PVC material is divided into multiple 64x64 pixel sub-blocks; each sub-block is an independent image block, representing a small region in the image; the purpose of doing this is to allow for independent texture analysis of different regions of the image, especially for those areas that may contain impurities or defects.
[0119] By calculating the texture gradient features of each image sub-block and comparing them with the previously defined normal texture threshold range, the sub-blocks are classified into "normal texture sub-blocks" and "abnormal texture sub-blocks." Abnormal texture sub-blocks are those regions whose texture features exceed the normal range, usually representing defects, impurities, or anomalies in the image. For example, for each 64x64 sub-block, its texture gradient features (such as the average gradient value) are calculated. If the texture gradient value of a sub-block exceeds the normal threshold range (e.g., a gradient value greater than 0.8 or less than 0.2), then the sub-block is classified as an abnormal texture sub-block. For example, suppose a sub-block has an average gradient value of 1.2, which is greater than the normal threshold of 0.8, so it is classified as an abnormal texture sub-block, possibly indicating that the region has abnormal texture or impurities.
[0120] Among all sub-blocks marked as anomalous textures, anomalous sub-blocks that meet the "impurity texture" criterion are further filtered out. These sub-blocks may contain harmful impurities, scratches, or other defects, typically appearing as image areas that are significantly different from the substrate texture. Sub-blocks that meet the criteria are added to the candidate image block set. For example, in an image of PVC material, some anomalous texture sub-blocks may appear as irregular dot-like or line-like areas in the image, which may represent impurities or defects. By further analyzing the anomalous texture sub-blocks, those sub-blocks with obvious impurity features (such as high-contrast spots or obvious scratches) are filtered out and marked as candidate image blocks. For example, an anomalous texture sub-block may contain an obvious scratch or stain, meeting the impurity texture criterion, and is therefore selected as a candidate image block.
[0121] All anomalous texture sub-blocks that meet the impurity texture criteria are collected into a candidate image block set; these candidate image blocks are usually areas that need further analysis and processing; for example, suppose that from multiple anomalous texture sub-blocks, several sub-blocks containing impurities or defects are selected, such as one sub-block containing a small stain and another sub-block containing a scratch; these sub-blocks are included in the candidate image block set to prepare for subsequent processing (such as repairing or removing impurities).
[0122] In an optional embodiment, finding similar texture blocks to candidate image blocks from the remaining candidate image block set, and determining multiple suspected impurity image blocks based on the similar texture blocks, includes:
[0123] From each of the remaining candidate image block sets, find a similar texture block for the candidate image block to obtain multiple similar texture groups for the candidate image block. Each similar texture group includes the candidate image block and a similar texture block for the candidate image block.
[0124] For each similar texture group, the consistency of the multispectral grayscale distribution features of the two image blocks in the similar texture group is verified to obtain the verification result. The image block whose verification result meets the preset conditions is regarded as a suspected impurity image block.
[0125] It should be noted that for each candidate image block, a block with similar texture features is found, called a similar texture block. These similar texture blocks are similar to the candidate image block in texture, and are usually normal areas in the substrate region without impurities. Each candidate image block is paired with its similar texture block to form a "similar texture group". For example, suppose there is a candidate image block of a PVC material image that is identified as an anomalous texture block (possibly containing stains or defects). We want to find a region with a similar texture to this candidate block. By analyzing the area around the candidate block, we find a normal area with a similar texture (such as a smooth area without impurities). These two blocks (candidate image block and similar texture block) are combined into a similar texture group. Each candidate image block will have one such similar texture block, eventually forming multiple similar texture groups.
[0126] For each similar texture group, verify whether the multispectral grayscale distribution features of the two image patches within the group are consistent; multispectral grayscale distribution features refer to the distribution of grayscale values in different bands (such as the three color channels of RGB) in the image; if the grayscale distribution features of the two image patches are very similar, it means that they have similar texture and lighting features, and thus may be normal areas; otherwise, there may be some anomalies (e.g., stains, scratches or other impurities); Example: Suppose that the multispectral grayscale distribution of the candidate image patch in the three RGB channels is: [0.5, 0.6, 0.7] (each channel) (This represents the grayscale value distribution of the image in this color channel). Compare it with the grayscale distribution of a similar texture block, assuming the grayscale distribution of the similar texture block is: [0.5, 0.6, 0.7]. Since the grayscale distributions of the two blocks are very similar, they are highly consistent in texture features. This indicates that the candidate image block is likely normal and does not contain impurities. Conversely, if the grayscale distribution of the candidate image block is: [0.5, 0.7, 0.9], while the similar texture block is: [0.5, 0.6, 0.7], then their grayscale distributions are significantly different, which may indicate that the candidate image block contains impurities.
[0127] Based on the consistency verification results of multispectral grayscale distribution, image blocks that meet preset conditions (e.g., grayscale distribution difference greater than a certain threshold) are marked as suspected impurity image blocks. These preset conditions are usually derived from experience and data analysis in practical applications and may include thresholds for grayscale distribution differences, standards for texture similarity between image blocks, etc. For example, suppose the verification condition is: if the grayscale distribution difference between two image blocks in the RGB channels is greater than 0.2, their textures are considered inconsistent, and the candidate image block may contain impurities. Therefore, when the grayscale distribution difference between a candidate image block and a similar texture block is greater than 0.2, the candidate image block is marked as a "suspected impurity image block." For instance, suppose the grayscale distribution of the candidate image block is [0.5, 0.7, 0.9], while the grayscale distribution of the similar texture block is [0.5, 0.6, 0.7]. The grayscale difference between the two image blocks in the RGB channels is [0.0, 0.1, 0.2]. This indicates a large texture difference, therefore the candidate image block is considered to contain impurities and is marked as a suspected impurity image block.
[0128] In an optional embodiment, finding a similar texture block for each remaining candidate image block set includes:
[0129] Calculate the texture gradient feature parameter vector of the candidate image patch and use it as the target parameter vector.
[0130] Calculate the texture gradient feature parameter vector of each candidate image block in the remaining candidate image block set, and use it as the parameter vector to be matched.
[0131] Calculate the feature space similarity between the target parameter vector and each parameter vector to be matched, and take the candidate image patch corresponding to the parameter vector to be matched with the highest feature space similarity as the similar texture patch of the candidate image patch.
[0132] It should be noted that for each candidate image patch, its features are extracted by calculating the texture gradient in the image patch. The texture gradient is the degree of change in the gray value of each pixel in the image, reflecting the directionality and change of the texture in the image. These gradient features are organized into a parameter vector, which serves as the feature vector of the target image patch. For example, suppose there is an image patch B1B1, and we need to calculate the texture gradient features of this image patch. Suppose the pixel values of image patch B1B1 are grayscale images, and the gray value of each pixel is represented as a numerical value. By calculating the grayscale difference of each pixel relative to its neighboring pixels, we can obtain the texture gradient of the image patch. These gradient values can be calculated using a method called the Sobel operator, which extracts gradient features by calculating the grayscale changes in the horizontal and vertical directions of the image. Finally, these gradient features can be organized into a vector, for example: target parameter vector = [0.12, 0.15, 0.20, −0.05, 0.18, ...].
[0133] For each remaining candidate image patch, the texture gradient features of each image patch are calculated using the same method; these feature vectors will be used as parameter vectors to be matched and prepared for comparison with the feature vectors of the target image patch.
[0134] The most similar image patch is selected by calculating the similarity between the feature vector of the target image patch and the feature vector of each image patch to be matched; common similarity measurement methods include cosine similarity or Euclidean distance; the candidate image patch with the highest similarity is the patch with the most similar texture.
[0135] In an optional embodiment, based on suspected impurity image blocks from adjacent time periods within multiple detection time periods, spatial correlation screening is performed on the suspected impurity image blocks from adjacent time periods to obtain preliminary impurity regions, including:
[0136] Spatial coordinate mapping is performed on suspected impurity image blocks in adjacent time periods to obtain at least one region group in adjacent time periods, wherein each region group includes at least two image blocks in the suspected impurity image blocks in adjacent time periods whose coordinates match.
[0137] If there are at least two region groups, then the at least two region groups are prioritized based on the number of image patches in each region group and the average feature similarity.
[0138] Interference elimination detection is performed on at least two sorted regions one by one, and the regions that pass the detection are identified as preliminary impurity regions.
[0139] If there is only one region group, then the local image details of all suspected impurity image blocks in the region group are extracted, the local image details are compared with the preset interference feature library, and after removing the image blocks that match the interference features, the remaining image blocks constitute the preliminary impurity region.
[0140] It should be noted that, assuming the image was captured in multiple time periods or multiple frames, each time period's image patch may contain suspected impurities; firstly, these suspected impurity image patches need to be compared using coordinate mapping to find their corresponding positions in different time periods, and then these suspected impurity image patches are divided into different "region groups" according to coordinate matching rules.
[0141] If there are multiple region groups, these region groups will be sorted according to the number of image patches in each region group and the feature similarity of the image patches; similarity can be calculated by comparing the feature vectors of the image patches, such as using cosine similarity or Euclidean distance.
[0142] For each prioritized region group, interference elimination detection is performed. Interference elimination is to eliminate false detections caused by noise or other factors. Usually, some rules or algorithms are used to determine whether the region is indeed a smudge region. For example, interference can be identified by checking the texture, color and other information of the image patches. For example, suppose region group 1 passes the interference elimination detection, while region group 2 does not (possibly because the texture of the image patches in region group 2 is smoother and does not look like a smudge region). Therefore, region group 1 is considered a preliminary smudge region.
[0143] If there is only one region group, then all image patches within that region group need to be further processed. First, local image details (such as local texture, edges, colors, etc.) of these image patches are extracted and compared with a preset interference feature library. If the features of an image patch match the features in the interference feature library, it is considered to be interference and is removed. The remaining image patches are considered to be preliminary impurity regions.
[0144] In an optional embodiment, prioritizing at least two region groups based on the number of image patches in each region group and the average feature similarity includes:
[0145] The number of suspected impurity image blocks contained in each of at least two region groups is counted and used as the primary evaluation metric for each region group.
[0146] Calculate the feature similarity among all suspected impurity image blocks within each region group. Feature similarity includes grayscale distribution similarity and shape similarity. Take the average of all feature similarities as the second evaluation index for each region group.
[0147] Based on the first evaluation index, at least two regional groups are initially ranked in descending order of their numerical values.
[0148] If at least two regional groups have the same first evaluation index, then the regional groups are sorted a second time according to the second evaluation index, in descending order of value, to obtain the final priority ranking result.
[0149] It should be noted that for each region group, the number of suspected impurity image patches contained therein is counted; this number reflects the size or importance of the region group; in the evaluation, the more image patches in a region group, the more significant the potential impurities in that region are, and therefore it will be used as the first evaluation indicator; for example, suppose there are two region groups: region group 1 contains B1,1, B1,2, B1,3 (3 image patches); region group 2 contains B2,1, B2,2 (2 image patches).
[0150] Therefore, the first evaluation indicator for region group 1 is 3, and the first evaluation indicator for region group 2 is 2.
[0151] The feature similarity between each suspected impurity image patch within a region group is calculated. Feature similarity can include: gray-level distribution similarity: comparing the gray-level distribution of image patches; shape similarity: comparing the shape features of image patches (e.g., edges, contours, etc.). The feature similarity between all image patches within a region group is calculated, and the average value is taken as the second evaluation index. The higher the feature similarity value, the more consistent the image patches in the region are in terms of features, which may indicate that the region is more impurity-prone. For example, assuming that for region group 1 (containing B1,1,B1,2,B1,3), the average value of the calculated gray-level distribution and shape similarity is 0.85; for region group 2 (containing B2,1,B2,2B2,1,B2,2), the average similarity value is 0.75; therefore, the second evaluation index for region group 1 is 0.85; the second evaluation index for region group 2 is 0.75.
[0152] Based on the first evaluation metric (number of image patches in a region group), all region groups are initially sorted in descending order; the more image patches a region group has, the higher it ranks in the initial sort. For example, region group 1 has 3 image patches and region group 2 has 2 image patches; the initial sorting result is: region group 1 (3 image patches) and region group 2 (2 image patches).
[0153] If multiple region groups have the same number of image patches based on the first evaluation metric (i.e., they contain the same number of image patches), then further ranking is required based on the second evaluation metric (mean feature similarity). Region groups with higher mean feature similarity indicate that they are more consistent in features and may be more consistent with the characteristics of impurities, thus ranking higher. For example, suppose in another scenario, region group 1 and region group 2 have the same number of image patches (e.g., both region groups contain 2 image patches). In this case, the second evaluation metric (mean feature similarity) will play a decisive role: the mean similarity of region group 1 is 0.85; the mean similarity of region group 2 is 0.75. In this case, although they have the same number of image patches, region group 1 will rank higher than region group 2 due to its higher mean similarity (0.85).
[0154] Through the above steps, the priority ranking of each region group is finally obtained; if the number of image patches and feature similarity are different, the ranking is directly determined by the first and second evaluation indicators; if the number of image patches in two region groups is the same, the priority is further determined by feature similarity.
[0155] In an optional embodiment, feature fusion and determination are performed on all preliminary impurity regions to obtain impurity detection results before printing the PVC decal, including:
[0156] For each preliminary impurity region, multispectral texture features and shape features are extracted to obtain a multidimensional feature vector for each preliminary impurity region.
[0157] All multi-dimensional feature vectors are input into a pre-trained deep belief network classifier to obtain the classification results for each preliminary impurity region.
[0158] The preliminary impurity regions classified as impurities are merged to obtain the impurity detection results before the PVC decal printing is tested.
[0159] It should be noted that for each initially detected impurity region, multiple features (such as spectral features, texture features, and shape features) need to be extracted. These features can comprehensively describe the properties of each region. These extracted features will form a "multi-dimensional feature vector," which contains various types of information about the region. Multispectral features typically involve information from different bands of the image (such as infrared and visible light), and can help distinguish the material and properties of different objects in the image. Texture features describe the details of the image surface, such as the gray-level co-occurrence matrix and local binary pattern (LBP), and can reflect the roughness, repeatability, and structure of the region. Shape features describe the shape of the region, such as the curvature of the edges, the area of the region, and the perimeter, and can help determine the region's shape. Whether the region is a regular shape or an anomalous impurity morphology; for example: suppose there is a preliminary impurity region, which may contain some stains or irregular printing defects; from this region, the following features will be extracted: multispectral features: such as the reflectance of the red band, the reflectance of the green band, etc.; texture features: such as the gray-level co-occurrence matrix in the region, describing the degree of gray-level variation in the region, or the local binary pattern (LBP) to reflect the surface texture of the region; shape features: such as the area, perimeter, and smoothness of the shape of the region, etc.; these extracted features will be synthesized into a feature vector containing information of different dimensions; for example: feature vector = [spectral feature 1, spectral feature 2, ..., texture feature 1, texture feature 2, ..., shape feature 1, shape feature 2, ...].
[0160] The multi-dimensional feature vector extracted in the previous step is used as input and passed to a Deep Belief Network (DBN) classifier for classification. A Deep Belief Network is a pre-trained deep learning model that can determine whether a region belongs to an impurity region based on the input feature vector. Through multi-layered learning, DBN can better extract information from complex features and perform accurate classification. For example, suppose a Deep Belief Network has been trained and can classify based on multi-dimensional feature vectors. The feature vector mentioned above is input into this DBN, and after the network's layered analysis, the classification result is obtained. For example, input feature vector: Feature vector 1 = [0.23, 0.45, 0.67, ..., 0.12], output classification result: DBN returns the classification result "Issue," indicating that this region is classified as an impurity region.
[0161] After DBN classification, all preliminary impurity regions identified as impurities will be merged. The purpose of region merging is to combine multiple adjacent impurity regions into one large region for better subsequent processing. The merged region is more uniform, which can effectively reduce detection errors or omissions.
[0162] After merging the regions, the final result is the impurity detection result before printing the PVC decal. These merged regions identify the impurity areas that need further processing before printing the decal. For example, suppose the final detected merged region D contains multiple small impurity areas, which may be some irregular stains or printing defects. The detection result will show region D and indicate that these impurity areas must be removed or repaired before the PVC decal is printed.
[0163] Example 2, please refer to Figure 2 This invention provides a technical solution: a system for detecting impurities before printing PVC decals, applicable to the aforementioned method for detecting impurities before printing PVC decals, comprising:
[0164] Image acquisition module 1 is used to control the multi-band spectral projection unit to project multiple wavelength spectra onto the PVC decal surface to be detected during multiple detection periods, and to control the polarization state adjustment component to synchronously adjust the polarization angle, so as to acquire at least one set of polarization spectral images acquired by the ultra-high-definition area array imaging module during multiple detection periods.
[0165] Image calibration module 2 is used to perform polarization state calibration on at least one set of polarization spectral images to obtain calibrated polarization spectral image data under multiple detection time periods.
[0166] The region segmentation module 3 is used to segment the substrate region based on the calibrated polarization spectral image data of each detection period, thereby obtaining multiple substrate region image sets.
[0167] Feature extraction module 4 is used to extract texture gradient features from the substrate region image set, so as to extract candidate image blocks with abnormal texture features from the substrate region image set and obtain the candidate image block set corresponding to the substrate region image set.
[0168] The impurity detection module 5 is used to find similar texture blocks of each candidate image block in each candidate image block set from the remaining candidate image block set, and to determine multiple suspected impurity image blocks based on the similar texture blocks.
[0169] The fusion judgment module 6 is used to perform spatial correlation screening on suspected impurity image blocks in adjacent time periods based on multiple detection time periods to obtain preliminary impurity regions; and to perform feature fusion and judgment on all preliminary impurity regions to obtain the impurity detection results before the printing of PVC decals.
[0170] The embodiments of the present invention have been described in detail above with reference to the accompanying drawings. However, the present invention is not limited thereto. Various changes can be made within the scope of knowledge possessed by those skilled in the art without departing from the spirit of the present invention.
Claims
1. A method for detecting impurities before printing PVC decals, characterized in that, include: The multi-band spectral projection unit is controlled to project multiple wavelength spectra onto the PVC decal surface to be tested during multiple detection periods, and the polarization state adjustment component is controlled to synchronously adjust the polarization angle to obtain at least one set of polarization spectral images acquired by the ultra-high-definition area array imaging module during the multiple detection periods. Polarization state calibration is performed on the at least one set of polarization spectral images to obtain calibrated polarization spectral image data for the multiple detection time periods; Based on the calibrated polarization spectral image data for each detection period, a set of polarization spectral images for each detection period is segmented into substrate regions to obtain multiple substrate region image sets. Texture gradient features are extracted from the image set of the substrate region to extract candidate image blocks with abnormal texture features from the image set of the substrate region, thereby obtaining a candidate image block set corresponding to the image set of the substrate region. For each candidate image block in each set of candidate image blocks, find similar texture blocks of the candidate image block from the set of remaining candidate image blocks, and determine multiple suspected impurity image blocks based on the similar texture blocks; Based on the suspected impurity image blocks in adjacent time periods among the multiple detection time periods, spatial correlation screening is performed on the suspected impurity image blocks in adjacent time periods to obtain preliminary impurity regions; Feature fusion and determination are performed on all the preliminary impurity regions to obtain the impurity detection results of the PVC decal before printing.
2. The method for impurity detection before printing PVC decals according to claim 1, characterized in that, Polarization state calibration is performed on the at least one set of polarization spectral images to obtain calibrated polarization spectral image data for the multiple detection time periods, including: Obtain a preset polarization reference library, wherein the preset polarization reference library includes reference polarization parameters of standard PVC material under multiple wavelength spectra and multiple polarization angles, the multiple wavelength spectra correspond one-to-one with the spectral wavelengths projected by the multi-band spectral projection unit, and the multiple polarization angles are consistent with the angle range adjusted by the polarization state adjustment component; Based on a set of polarization spectral images for each detection period, the actual polarization parameters of each pixel point under each detection period are extracted, wherein the actual polarization parameters include the degree of polarization and polarization direction of the pixel point under the corresponding wavelength spectrum and polarization angle. Based on the reference polarization parameters and the actual polarization parameters, the polarization deviation value of each pixel point in each detection period is calculated, wherein the polarization deviation value is the difference between the actual polarization parameters and the corresponding reference polarization parameters; Based on the polarization deviation value of each pixel in each detection period, pixel correction is performed on a set of polarization spectral images in each detection period to obtain calibrated polarization spectral image data for the multiple detection periods. Among them, obtaining the preset polarization reference library includes: Collect standard PVC samples of various specifications, including PVC samples of different thicknesses, colors and surface gloss levels; The multi-band spectral projection unit is controlled to project multiple wavelengths of light onto the surface of each standard PVC sample in sequence, and the polarization state adjustment component is controlled to adjust multiple polarization angles in sequence, so as to simultaneously acquire at least one set of standard polarization spectral images collected by the ultra-high-definition area array imaging module. The polarization parameters of each pixel in each set of standard polarization spectral images are extracted. The average value of the polarization parameters of the pixels under the same specifications, wavelength spectrum and polarization angle is taken as the reference polarization parameters under the same specifications, wavelength spectrum and polarization angle conditions. The reference polarization parameters under all conditions are classified and stored according to the specified wavelength and spectral polarization angle to construct the preset polarization reference library.
3. The method for impurity detection before printing PVC decals according to claim 2, characterized in that, Based on the calibrated polarization spectral image data for each detection period, a set of polarization spectral images for each detection period is segmented into substrate regions to obtain multiple substrate region image sets, including: The calibrated polarization spectral image data are sequentially subjected to mean denoising, color normalization, and detail enhancement to obtain a preprocessed image set; The substrate region model is used as the segmentation object, and the preprocessed image set is used as the segmentation image set; Based on the segmented image set, calculate the dynamic clustering threshold for each pixel; Based on the dynamic clustering threshold, each pixel in the segmented image set is divided into a substrate pixel and a background pixel to obtain a substrate region image composed of substrate pixels. The image of the substrate region is removed from the segmented image set to obtain the remaining image data. It is then determined whether the number of the remaining image data is less than a preset segmentation end threshold. The iteration ends when the amount of remaining image data is less than a preset segmentation termination threshold. In response to the fact that the amount of remaining image data is not less than a preset segmentation end threshold, the remaining image data is used as a segmented image set, and the step of calculating the dynamic clustering threshold for each pixel based on the segmented image set is returned to be executed.
4. The method for impurity detection before printing PVC decals according to claim 3, characterized in that, Extracting texture gradient features from the substrate region image set to extract candidate image patches with abnormal texture features from the substrate region image set includes: The texture gradient feature parameters of each image data in the substrate region image set are calculated, and the normal texture feature threshold range of the substrate region image set is established based on the texture gradient feature parameters. The substrate region image set is divided into multiple image sub-blocks, and the multiple image sub-blocks are further divided into normal texture sub-blocks and abnormal texture sub-blocks according to the texture gradient feature parameters of each image sub-block; From all the abnormal texture sub-blocks, extract the abnormal texture sub-blocks that satisfy the impurity texture conditions as candidate image blocks, and classify the candidate image blocks into the candidate image block set.
5. The method for impurity detection before printing PVC decals according to claim 4, characterized in that, Finding similar texture blocks to the candidate image blocks from the remaining candidate image block set, and determining multiple suspected impurity image blocks based on the similar texture blocks, including: From each of the remaining candidate image block sets, a similar texture block of the candidate image block is found to obtain multiple similar texture groups of the candidate image block, wherein each similar texture group includes the candidate image block and a similar texture block of the candidate image block; For each group of similar textures, the consistency of the multispectral grayscale distribution features of the two image blocks in the group of similar textures is verified to obtain the verification result. The image block whose verification result meets the preset conditions is regarded as a suspected impurity image block.
6. The method for detecting impurities before printing PVC decals according to claim 5, characterized in that, From each of the remaining candidate image patch sets, find a similar texture patch for each candidate image patch, including: Calculate the texture gradient feature parameter vector of the candidate image patch and use it as the target parameter vector; Calculate the texture gradient feature parameter vector of each candidate image block in the remaining candidate image block set, and use it as the parameter vector to be matched; Calculate the feature space similarity between the target parameter vector and each parameter vector to be matched, and take the candidate image block corresponding to the parameter vector to be matched with the highest feature space similarity as the similar texture block of the candidate image block.
7. The method for impurity detection before printing PVC decals according to claim 6, characterized in that, Based on suspected impurity image blocks from adjacent time periods within the multiple detection time periods, spatial correlation screening is performed on these suspected impurity image blocks to obtain preliminary impurity regions, including: Spatial coordinate mapping is performed on the suspected impurity image blocks in the adjacent time periods to obtain at least one region group in the adjacent time periods, wherein each region group includes at least two image blocks with matching coordinates in the suspected impurity image blocks in the adjacent time periods; If there are at least two region groups, then the at least two region groups are prioritized according to the number of image patches in each region group and the average feature similarity. Interference elimination detection is performed on each of the sorted at least two regions, and the regions that pass the detection are identified as preliminary impurity regions. If there is only one region group, then the local image details of all suspected impurity image blocks in the region group are extracted, the local image details are compared with the preset interference feature library, and after removing the image blocks that match the interference features, the remaining image blocks constitute the preliminary impurity region.
8. The method for impurity detection before printing PVC decals according to claim 7, characterized in that, Based on the number of image patches and the average feature similarity of each region group, the at least two region groups are prioritized, including: The number of suspected impurity image blocks contained in each of the at least two region groups is counted and used as the first evaluation index for each region group. Calculate the feature similarity between all suspected impurity image blocks within each region group. The feature similarity includes gray-level distribution similarity and shape similarity. Take the average of all feature similarities as the second evaluation index for each region group. Based on the first evaluation index, the at least two regional groups are initially sorted in descending order of their values; If there are at least two regional groups with the same first evaluation index, then the regional groups are sorted a second time according to the second evaluation index in descending order of value to obtain the final priority ranking result.
9. The method for impurity detection before printing PVC decals according to claim 8, characterized in that, Feature fusion and determination are performed on all the aforementioned preliminary impurity regions to obtain the impurity detection results of the PVC decal before printing, including: For each of the preliminary impurity regions, multispectral texture features and shape features are extracted to obtain a multidimensional feature vector for each preliminary impurity region; All the multi-dimensional feature vectors are input into a pre-trained deep belief network classifier to obtain the classification result of each preliminary impurity region; The preliminary impurity regions classified as impurities are merged to obtain the impurity detection results before the PVC decal printing is tested.
10. A system for detecting impurities before printing PVC decals, applicable to the method for detecting impurities before printing PVC decals as described in any one of claims 1-9, characterized in that, include: The image acquisition module is used to control the multi-band spectral projection unit to project multiple wavelength spectra onto the PVC decal surface to be detected during multiple detection periods, and to control the polarization state adjustment component to synchronously adjust the polarization angle, so as to acquire at least one set of polarization spectral images acquired by the ultra-high-definition area array imaging module during the multiple detection periods. The image calibration module is used to perform polarization state calibration on the at least one set of polarization spectral images respectively, so as to obtain calibrated polarization spectral image data under the multiple detection time periods; The region segmentation module is used to segment the substrate region based on the calibrated polarization spectral image data of each detection period, thereby obtaining multiple substrate region image sets. The feature extraction module is used to extract texture gradient features from the substrate region image set to extract candidate image blocks with abnormal texture features from the substrate region image set, thereby obtaining a candidate image block set corresponding to the substrate region image set. The impurity detection module is used to find similar texture blocks of each candidate image block in each candidate image block set from the remaining candidate image block set, and to determine multiple suspected impurity image blocks based on the similar texture blocks. The fusion determination module is used to perform spatial correlation screening on suspected impurity image blocks in adjacent time periods based on the suspected impurity image blocks in the multiple detection time periods to obtain preliminary impurity regions; Feature fusion and determination are performed on all the preliminary impurity regions to obtain the impurity detection results of the PVC decal before printing.