Printing material surface quality detection method based on image enhancement

By calculating the anomaly factor and scratch possibility for each pixel point in the surface image of the printed material, adaptively adjusting the enhancement factor solves the problem of overlapping textures and scratches on frequency characteristics, achieving more accurate image enhancement and quality Test.

CN119090879BActive Publication Date: 2025-02-18WEINAN DADONG PRINTING PACKING MASCH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411571919.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-11-06
Publication Date
2025-02-18
Estimated Expiration
2044-11-06

AI Technical Summary

Technical Problem

The existing anti-sharpening masking algorithm cannot effectively distinguish the two when detecting the overlap of the surface texture of the printed material due to the overlap of texture and scratches in frequency characteristics, affecting the image enhancement effect and subsequent defect detection.

Method used

By calculating the anomaly factor and scratch possibility for each pixel point, the enhancement factor is adaptively adjusted, image enhancement is enhanced using the desharpening masking algorithm, and quality detection is performed through threshold segmentation.

Benefits of technology

The detection accuracy of the surface quality of the printing material is improved, the error detection rate is reduced, the contrast and clarity of the image are enhanced, and the accuracy and efficiency of subsequent detection algorithms are improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119090879B_ABST
    Figure CN119090879B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of image data processing technology, and more specifically, to a printed material surface quality detection method based on image enhancement, comprising: obtaining a pre-processed image of a collected printed material surface image; calculating the abnormal factor of the pixel for each pixel in the pre-processed image; clustering according to the size of the grayscale value to determine the similar area of ​​each pixel; calculating the scratch possibility of the pixel; calculating the adaptive enhancement factor of the pixel; performing image enhancement on the pre-processed image using an unsharp masking algorithm based on the adaptive enhancement factor; performing quality detection on the enhanced image using threshold segmentation, and completing the printed material surface quality detection method based on image enhancement. The present invention analyzes the grayscale change characteristics of the image, adaptively adjusts the enhancement factor for each pixel, and achieves targeted enhancement of the potential scratch area to improve the accuracy of the subsequent detection algorithm.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of image data processing, and more specifically, to a method for detecting the surface quality of printed materials based on image enhancement. Background Art

[0002] With the popularization of digital printing technology and the increase in demand, the printing industry is facing increasingly fierce market competition. Enterprises need to continuously improve product quality to meet customers' growing quality demands. The quality of printing materials plays a vital role in the printing industry, directly affecting the effect of the final product and customer satisfaction. High-quality printing materials can ensure the printing effect and can truly reproduce the design intent. During the transportation of printing materials, if there are defects or debris in the conveyor belt, roller or guide rail, it may cause a scratch defect on the surface of the printing material. Scratches may weaken the structural integrity of the printing material, especially on thin materials, which may cause more serious damage. Therefore, quality inspection of the surface of printing materials is not only a necessary step to ensure product quality, but also an important means to improve customer satisfaction.

[0003] When detecting scratches on the surface of printed materials, scratches will cause uneven reflection of light on the surface of the material, which may cause certain scratched areas on the surface of the printed material to have a low contrast with normal areas, making it difficult to detect during visual inspection. Therefore, before detecting potential scratches on the surface of printed materials, it is necessary to sharpen the potential scratched areas on the surface of the printed material so that they can be detected more accurately and completely later. An existing method for image enhancement of printed material surfaces is the Unsharp Masking (USM) algorithm, which has the advantages of strong adaptability, simplicity and ease of use, can significantly improve image quality, and facilitate subsequent defect detection.

[0004] The invention patent with announcement number CN115660971B discloses a method for implementing USM sharpening based on a deep learning hardware accelerator. By combining hardware encoding and decoding with USM for hardware acceleration, the video frames are completed within a chip. The entire process of decoding, sharpening, and encoding does not require the participation of the host side, thereby improving processing performance, reducing time delays, and ultimately improving user experience.

[0005] However, the above patent document combines the existing USM accelerated decoding, and does not solve the problem that the texture on the surface of some printed materials has a fine linear structure, and its characteristics may be similar to the potential scratch area. The direct use of the unsharp masking algorithm usually enhances the high-frequency details in the image. If the texture and scratches overlap in frequency characteristics, the unsharp masking algorithm cannot effectively distinguish between the two, thereby affecting the image enhancement effect, and ultimately affecting the subsequent defect detection algorithm to locate and classify scratches. Summary of the invention

[0006] In order to solve the problem that there is overlap between texture and scratches in frequency characteristics, the unsharp masking algorithm cannot effectively distinguish the two, thereby affecting the image enhancement effect, and ultimately affecting the subsequent defect detection algorithm to locate and classify scratches, the present invention proposes a printed material surface quality detection method based on image enhancement, the method comprising the following steps:

[0007] Acquire a preprocessed image of the collected printed material surface image;

[0008] For each pixel in the preprocessed image, the anomaly factor of the pixel is calculated based on the gray value of the pixel and the extreme difference of the gray value within the preset range of the pixel; clustering is performed according to the size of the gray value to determine the similar area of ​​the pixel; the scratch possibility of the pixel is calculated based on the anomaly factor of the pixel, the ratio of the area of ​​the similar area of ​​the pixel to the area of ​​the minimum circumscribed rectangle of the similar area, and the number of pixels corresponding to the gray value mode in the similar area of ​​the pixel; based on the normalized result of the scratch possibility of the pixel, the preset enhancement factor is corrected to obtain the adaptive enhancement factor of the pixel; according to the adaptive enhancement factor, the preprocessed image is enhanced by using the unsharp masking algorithm to obtain the enhanced image; the quality of the enhanced image is detected by using threshold segmentation to complete the printed material surface quality detection method based on image enhancement.

[0009] By calculating the anomaly factor and scratch possibility of each pixel, the texture and scratches in the image can be more accurately identified and distinguished, thereby improving the detection accuracy of the surface quality of printed materials; by comprehensively evaluating the possibility of scratches, the false detection rate can be reduced to ensure that real defects can be accurately identified, while reducing misjudgment of normal areas; through adaptive enhancement factors, the enhancement effect is dynamically adjusted according to the characteristics of different areas to adapt to different image contents, making the enhancement effect more targeted; the enhanced image is easier to process with subsequent defect detection algorithms, which can improve the execution efficiency and effectiveness of the algorithm and further accelerate the overall process of quality inspection.

[0010] Furthermore, the pre-processed image is a printed material surface image that is gray-scaled, and then a printed material area image in the printed material surface image is extracted using a U-NET semantic segmentation model.

[0011] Furthermore, the abnormal factor satisfies the following relationship:

[0012] ; In the formula, For the The anomaly factor of each pixel, For the The gray value of a pixel, is the mean gray value of pixels in the preprocessed image, For the The maximum value of the grayscale value of the pixels within the preset range of pixels. for The minimum value of the grayscale value of pixels within the preset range of pixels. is a hyperparameter, is a natural exponential function.

[0013] By comparing the grayscale value of each pixel with the maximum and minimum grayscale values ​​of the surrounding pixels, obvious abnormal pixels can be effectively identified; using the mean as a reference point to adapt to the grayscale distribution characteristics of different images, the versatility of the algorithm is enhanced and it is suitable for a variety of printed materials.

[0014] Furthermore, clustering is performed according to the size of grayscale values ​​to determine the similar areas of each pixel point, including: for each pixel point in the preprocessed image, recording the pixels in the neighborhood of the target pixel point whose grayscale value difference with the target pixel point is less than a similarity threshold as similar pixels of the target pixel point; recording the pixels in the neighborhood of the similar pixel point whose grayscale value difference with the target pixel point is less than a similarity threshold as similar pixels of the target pixel point; until the grayscale value differences between the pixels in the neighborhood of all similar pixels and the target pixel point are not less than the similarity threshold, the target pixel point and the similar pixels of the target pixel point form the similar area of ​​the target pixel point.

[0015] By identifying similar pixels with small grayscale value differences from the target pixels, local features of the image can be effectively extracted; the definition of similar regions helps to retain and highlight the details in the image, making subsequent processing more accurate; in the case of complex backgrounds or high noise, identifying similar regions can reduce the impact of surrounding noise on target pixel detection, thereby improving the accuracy of image processing.

[0016] Furthermore, the scratch probability satisfies the following relationship:

[0017] ; In the formula, For the The probability of scratching pixels, For the The anomaly factor of each pixel, For the The ratio of the area of ​​the similar region of pixels to the area of ​​the minimum circumscribed rectangle of the similar region. For the The number of pixels in the similar area of ​​​​the pixel, For the The number of pixels in the minimum bounding rectangle of the similar area of ​​pixels. For the The number of pixels corresponding to the grayscale value mode of the pixels in the similar area of ​​the pixels. is a natural exponential function.

[0018] By combining anomaly factors and statistical characteristics of similar areas, the possibility of scratches is quantified, thereby reflecting the quality status of each pixel more comprehensively; the introduction of anomaly factors makes the possibility of scratches higher when the grayscale value is abnormal, thereby increasing the sensitivity to potential defects; by introducing the number of pixels corresponding to the grayscale value mode in the similar area, it is possible to effectively distinguish those grayscale values ​​that dominate the overall similar area, thereby enhancing the recognition ability of normal areas and reducing the false alarm rate.

[0019] Furthermore, the adaptive enhancement factor satisfies the following relationship:

[0020] ; In the formula, For the Adaptive enhancement factor for each pixel, For the The probability of scratching pixels, is the preset enhancement factor, is the normalization function.

[0021] By calculating the scratch possibility of each pixel through adaptive enhancement factors, specific areas in the image can be processed more accurately, and the image processing effect will be more in line with actual needs; because the enhancement factor is dynamically adjusted based on the local characteristics of the pixel, it can more flexibly adapt to different image content and features, making the processing process more intelligent.

[0022] Furthermore, the method of using an unsharp masking algorithm to perform image enhancement on the preprocessed image includes: using a mean blur algorithm to blur the preprocessed image to obtain a blurred image of the preprocessed image; subtracting the grayscale value of each pixel in the preprocessed image from the grayscale value of the corresponding pixel in the blurred image to obtain a detail image of the preprocessed image; multiplying the grayscale value of each pixel in the detail image by the adaptive enhancement factor of the corresponding pixel in the preprocessed image, and then adding the grayscale value of the corresponding pixel in the preprocessed image to complete image enhancement.

[0023] Furthermore, the quality detection of the enhanced image using threshold segmentation includes: in response to the grayscale value of any pixel in the enhanced image being less than a preset threshold, the pixel is a scratch pixel, all scratch pixels are formed into a scratch area, and the scratch area of ​​the enhanced image is obtained.

[0024] The present invention has the following beneficial effects:

[0025] By analyzing the grayscale change characteristics of the surface image of the printed material, the enhancement factor is adaptively adjusted for each pixel. Since the texture of the printed material may overlap with the scratches in frequency characteristics, the adaptive adjustment of the enhancement factor can avoid excessive enhancement in the texture area, thereby reducing the probability of misidentification and achieving targeted enhancement of potential scratch areas, that is, focusing the enhancement on areas suspected of scratches, significantly improving the contrast and clarity of these areas, thereby improving the accuracy of subsequent detection algorithms; and different printed materials may have different texture characteristics. The adaptive enhancement factor can be flexibly adjusted according to the grayscale characteristics of the specific material, improving the universality of the detection method. At the same time, the adaptive enhancement factor also improves the robustness and applicability of the unsharp masking algorithm. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] By reading the detailed description below with reference to the accompanying drawings, the above and other objects, features and advantages of the exemplary embodiments of the present invention will become readily understood. In the accompanying drawings, several embodiments of the present invention are shown in an exemplary and non-limiting manner, and the same or corresponding reference numerals are the same or corresponding parts, wherein:

[0027] Figure 1 It is a flowchart of the steps of a printed material surface quality detection method based on image enhancement according to an embodiment of the present invention. DETAILED DESCRIPTION

[0028] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.

[0029] The main purpose of the present invention is to detect potential scratch defects on the surface of printed materials. Before detecting potential scratch defects on the surface of printed materials, an unsharp masking algorithm will be used to perform image enhancement on the potential scratch areas on the surface of printed materials. During this process, the enhancement factor of each pixel in the detail image of the printed material surface image will be adapted. The main basis for the adaptation is the analysis of the grayscale change characteristics of the printed material surface image.

[0030] The specific embodiments of the present invention are described in detail below with reference to the accompanying drawings.

[0031] See also Figure 1 , which shows a flowchart of a method for detecting surface quality of printed materials based on image enhancement provided by an embodiment of the present invention, the method comprising the following steps:

[0032] S1: obtaining a pre-processed image of the collected printed material surface image.

[0033] The present invention adopts a high-definition camera to collect images of the surface of the printing material.

[0034] Specifically, the pre-processed image is a printed material surface image that is gray-scaled, and then a U-shaped convolutional network (U-shaped Network for Biomedical Image Segmentation, U-NET) semantic segmentation model is used to extract a printed material area image from the printed material surface image.

[0035] S2: For each pixel in the preprocessed image, calculate the anomaly factor of the pixel.

[0036] It should be noted that this step obtains the abnormal factor of each pixel by analyzing the gray value performance of each pixel itself. According to the scene survey, the gray value of the scratched area on the surface of the printed material is usually low due to the change in light reflection. Therefore, when analyzing the abnormal factor of each pixel, the lower the gray value of each pixel and the greater the discreteness of the gray value of the pixels in the surrounding area of ​​each pixel, the more abnormal this pixel is in the printed material surface image, the greater the possibility that this pixel belongs to the potential scratched area, and the larger the corresponding abnormal factor.

[0037] Based on the grayscale value of the pixel and the extreme difference of the grayscale values ​​of all pixels within a preset range of the pixel, that is, the difference between the maximum and minimum grayscale values, the anomaly factor of the pixel is calculated.

[0038] Specifically, the abnormal factor satisfies the following relationship:

[0039] ;

[0040] In the formula, For the The anomaly factor of each pixel, For the The gray value of a pixel, is the mean gray value of pixels in the preprocessed image, For the The maximum value of the grayscale value of the pixels within the preset range of pixels. for The minimum value of the grayscale value of pixels within the preset range of pixels. is a hyperparameter, is a natural exponential function.

[0041] Implementers can set the size and hyperparameters of the preset pixel range according to the specific implementation situation. For example, the range is centered at each pixel. If any direction of the pixel point is insufficient for the value area, it will be supplemented in the opposite direction, and finally reach area; the hyperparameter is 0.001. The hyperparameter exists to prevent , resulting in the final calculation result being 0.

[0042] in, Indicates The relative value of the gray value of the pixel in the preprocessed image. The smaller the value, the The more abnormal a pixel is in the preprocessed image, the more likely it is to belong to a potential scratch area, and the larger the corresponding abnormality factor will be; Indicates The gray value range of the pixel within the preset range of pixels is expressed as The degree of dispersion of the grayscale values ​​of all pixels in the surrounding area of ​​a pixel. The larger the value, the greater the dispersion of the grayscale values ​​of the pixels in the surrounding area. The greater the possibility that there is a grayscale change in the surrounding area of ​​the pixel, the greater the probability that there is a grayscale change in the surrounding area of ​​the pixel. The more likely a pixel is to belong to a potential scratch area, the greater the credibility. The anomaly factor of each pixel will be larger.

[0043] S3: Clustering is performed according to the grayscale value to determine the similar areas of each pixel.

[0044] It should be noted that the anomaly factor of each pixel is obtained. This indicator is based on the analysis of the intuitive grayscale value performance of the pixels within the preset range of each pixel, that is, the surrounding pixels. In order to more accurately adaptively adjust the enhancement factor, it is also necessary to distinguish the potential scratch areas and texture areas of the preprocessed image. Therefore, it is necessary to determine the similar area of ​​each pixel.

[0045] Specifically, determining the similar area of ​​each pixel point according to the gray value includes:

[0046] For each pixel in the preprocessed image, the pixels in the neighborhood of the target pixel whose grayscale value difference with the target pixel is less than the similarity threshold are recorded as similar pixels of the target pixel; the pixels in the neighborhood of the similar pixel whose grayscale value difference with the target pixel is less than the similarity threshold are recorded as similar pixels of the target pixel; until the grayscale value differences between the pixels in the neighborhood of all similar pixels and the target pixel are not less than the similarity threshold, the target pixel and the similar pixels of the target pixel form the similar area of ​​the target pixel.

[0047] S4: Calculate the scratch probability of the pixel.

[0048] It should be noted that, according to the scene survey, the texture with strip features on the surface of the printed material usually shows obvious directionality, that is, the distribution of the texture area is often linear; and the potential scratch defects on the surface of the printed material are often not so straight compared to the texture area due to the randomness of the cause of their generation; similarly, the grayscale value consistency of the pixels in the potential scratch area is also lower than that of the texture area. Therefore, when the potential scratch area shows a straightness similar to that of the texture area or when the normal area shows a straightness similar to that of the potential scratch area, its grayscale value consistency can be further analyzed to further distinguish the potential scratch area from the texture area. Therefore, in this step, the characteristics of the similar area of ​​each pixel point are first obtained for analysis, and then the abnormal factor of each pixel point is optimized to obtain the scratch possibility of each pixel point. When analyzing the scratch possibility of each pixel point, the smaller the straightness of the area composed of all similar pixels near each pixel point and the pixel point itself, and the lower the grayscale value consistency, it can be said that the pixel point is more likely to belong to the potential scratch area, and the corresponding scratch possibility of this pixel point will also be greater.

[0049] The scratch possibility of each pixel is calculated based on the anomaly factor of the pixel, the ratio of the area of ​​the similar region of the pixel to the area of ​​the minimum circumscribed rectangle of the similar region, and the mode of the grayscale values ​​of the pixels in the similar region of the pixel, that is, the number of pixels corresponding to the grayscale value with the highest frequency.

[0050] Specifically, the scratch probability satisfies the following relationship:

[0051] ;

[0052] In the formula, For the The probability of scratching pixels, For the The anomaly factor of each pixel, For the The ratio of the area of ​​the similar region of pixels to the area of ​​the minimum circumscribed rectangle of the similar region. For the The number of pixels in the similar area of ​​​​the pixel, For the The number of pixels in the minimum bounding rectangle of the similar area of ​​pixels. For the The number of pixels corresponding to the grayscale value mode of the pixels in the similar area of ​​the pixels. is a natural exponential function.

[0053] in, The larger the The greater the probability that the pixel belongs to the potential scratch area, the The more pixels there are, the greater the possibility of scratches; It indicates the The ratio of the area of ​​the similar region of pixels to the area of ​​the smallest circumscribed rectangle of the similar region. The smaller the value, the more The lower the straightness of the similar area of ​​pixels, the greater the possibility that this area belongs to the potential scratch area. The more pixels there are, the greater the possibility of scratches; The smaller it is, the more it can explain the The lower the gray value consistency in the similar area of ​​the pixels, the greater the possibility that this area belongs to the potential scratch area. At the same time, it also means that the lower the straightness of this area, the greater the credibility. The larger the number of pixels, the greater the possibility of scratches.

[0054] S5: Calculate the adaptive enhancement factor of the pixel.

[0055] It should be noted that, through the analysis of the above steps, the scratch possibility of each pixel is obtained. In this step, the enhancement factor of each pixel in the preprocessed image needs to be adaptively adjusted based on this indicator. When adaptively calculating the enhancement factor of each pixel, the grayscale value of the pixel in the potential scratch area needs to be reduced, that is, the greater the possibility of scratches on the pixel, the greater the corresponding enhancement factor will be, so as to ensure that the grayscale value can be reduced to enhance the contrast between the potential scratch area and the normal area; on the contrary, for the pixel with a small possibility of scratches, the corresponding enhancement factor will be smaller, which can also enhance the contrast between the normal area and the potential scratch area. According to the above logic, the adaptive enhancement factor of each pixel in the preprocessed image is calculated.

[0056] Based on the normalized result of the scratch possibility of the pixel point, the preset enhancement factor is corrected to obtain the adaptive enhancement factor of the pixel point.

[0057] Specifically, the adaptive enhancement factor satisfies the following relationship:

[0058] ;

[0059] In the formula, For the Adaptive enhancement factor for each pixel, For the The probability of scratching pixels, is the preset enhancement factor, is the normalization function.

[0060] Implementers can set the enhancement factor according to specific implementation circumstances, for example, 2.

[0061] S6: performing image enhancement on the preprocessed image using an unsharp masking algorithm according to the adaptive enhancement factor to obtain an enhanced image.

[0062] Specifically, the method of performing image enhancement on the preprocessed image using an unsharp masking algorithm includes:

[0063] The preprocessed image is blurred using a mean blur algorithm to obtain a blurred image of the preprocessed image;

[0064] Subtract the grayscale value of each pixel in the preprocessed image from the grayscale value of the corresponding pixel in the blurred image to obtain a detail image of the preprocessed image;

[0065] The grayscale value of each pixel in the detail image is multiplied by the adaptive enhancement factor of the corresponding pixel in the preprocessed image, and then added to the grayscale value of the corresponding pixel in the preprocessed image to complete the image enhancement.

[0066] S7: Use threshold segmentation to perform quality inspection on the enhanced image, and complete the printed material surface quality inspection method based on image enhancement.

[0067] Specifically, the quality detection of the enhanced image using threshold segmentation includes:

[0068] In response to the grayscale value of any pixel in the enhanced image being less than a preset threshold, the pixel is a scratch pixel, and all scratch pixels are combined into a scratch area to obtain the scratch area of ​​the enhanced image.

[0069] Implementers can select a specific method of threshold segmentation according to specific implementation conditions, such as global threshold segmentation or adaptive threshold segmentation.

[0070] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the principles of the present invention should be included in the protection scope of the present invention.

Claims

1. A printed material surface quality detection method based on image enhancement, characterized in that: include: Acquire a preprocessed image of the collected printed material surface image; For each pixel in the preprocessed image, the abnormal factor of the pixel is calculated based on the gray value of the pixel and the extreme difference of the gray value within the preset range of the pixel; clustering is performed according to the size of the gray value to determine the similar area of ​​the pixel; the scratch possibility of the pixel is calculated based on the abnormal factor of the pixel, the ratio of the area of ​​the similar area of ​​the pixel to the area of ​​the minimum circumscribed rectangle of the similar area, and the number of pixels corresponding to the gray value mode in the similar area of ​​the pixel; The scratch probability satisfies the following relationship: ; In the formula, For the The probability of scratching pixels, For the The anomaly factor of each pixel, For the The ratio of the area of ​​the similar region of pixels to the area of ​​the minimum circumscribed rectangle of the similar region. For the The number of pixels in the similar area of ​​​​the pixel, For the The number of pixels in the minimum bounding rectangle of the similar area of ​​pixels. For the The number of pixels corresponding to the grayscale value mode of the pixels in the similar area of ​​the pixels. is the natural exponential function; Based on the normalized result of the scratch possibility of the pixel point, the preset enhancement factor is corrected to obtain an adaptive enhancement factor of the pixel point; According to the adaptive enhancement factor, an unsharp masking algorithm is used to perform image enhancement on the preprocessed image to obtain an enhanced image; The enhanced image is then subjected to quality inspection using threshold segmentation, completing a printed material surface quality inspection method based on image enhancement.

2. The printed material surface quality detection method based on image enhancement according to claim 1, characterized in that: The pre-processed image is a printed material surface image that is grayed out, and a printed material region image in the printed material surface image is extracted using a U-NET semantic segmentation model.

3. The printed material surface quality detection method based on image enhancement according to claim 1, characterized in that: The anomaly factor satisfies the following relationship: ; In the formula, For the The anomaly factor of each pixel, For the The gray value of a pixel, is the mean gray value of pixels in the preprocessed image, For the The maximum value of the grayscale value of the pixels within the preset range of pixels. for The minimum value of the grayscale value of pixels within the preset range of pixels. is a hyperparameter, is a natural exponential function.

4. The printed material surface quality detection method based on image enhancement according to claim 1, characterized in that: The clustering according to the gray value to determine the similar area of ​​the pixel point includes: For each pixel in the preprocessed image, the pixels in the neighborhood of the target pixel whose grayscale value difference with the target pixel is less than the similarity threshold are recorded as similar pixels of the target pixel; the pixels in the neighborhood of the similar pixel whose grayscale value difference with the target pixel is less than the similarity threshold are recorded as similar pixels of the target pixel; until the grayscale value differences between the pixels in the neighborhood of all similar pixels and the target pixel are not less than the similarity threshold, the target pixel and the similar pixels of the target pixel form the similar area of ​​the target pixel.

5. The printed material surface quality detection method based on image enhancement according to claim 1, characterized in that: The adaptive enhancement factor satisfies the following relationship: ; In the formula, For the Adaptive enhancement factor for each pixel, For the The probability of scratching pixels, is the preset enhancement factor, is the normalization function.

6. The printed material surface quality detection method based on image enhancement according to claim 1, characterized in that: The method of performing image enhancement on the preprocessed image by using an unsharp masking algorithm comprises: The preprocessed image is blurred using a mean blur algorithm to obtain a blurred image of the preprocessed image; Subtract the grayscale value of each pixel in the preprocessed image from the grayscale value of the corresponding pixel in the blurred image to obtain a detail image of the preprocessed image; The grayscale value of each pixel in the detail image is multiplied by the adaptive enhancement factor of the corresponding pixel in the preprocessed image, and then added to the grayscale value of the corresponding pixel in the preprocessed image to complete the image enhancement.

7. The printed material surface quality detection method based on image enhancement according to claim 1, characterized in that: The method of using threshold segmentation to perform quality detection on the enhanced image includes: In response to the grayscale value of any pixel in the enhanced image being less than a preset threshold, the pixel is a scratch pixel, and all scratch pixels are combined into a scratch area to obtain the scratch area of ​​the enhanced image.

Citation Information

Patent Citations

  • A method for implementing unsharp masking based on deep learning hardware accelerator

    CN115660971B

  • Shield tunneling machine tool bit defect detection method based on images

    CN116993731A