An intelligent detection method for appearance defects of OLED display optical film

By performing image processing and classification network model judgment on the OLED display optical film, the problems of low efficiency and low accuracy of OLED display optical film defect detection in the prior art are solved, and automatic detection of high accuracy and effective control of defect categories are achieved.

CN119251235BActive Publication Date: 2025-03-28ZHIYIBO INTELLIGENT TECH (SUZHOU) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411790529.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-06
Publication Date
2025-03-28
Estimated Expiration
2044-12-06

AI Technical Summary

Technical Problem

The prior art is difficult to efficiently and accurately detect bubbles, foreign objects and concave and convex defects in the OLED display optical film, resulting in low detection efficiency and inaccurate results, which cannot effectively meet the control needs of industrial production for defect categories.

Method used

By collecting the optical film grayscale image of the OLED display optical film, Gaussian filtering and grayscale histogram analysis, the product area is extracted and linear scaling and maximum grayscale value replacement processing is performed, the enhanced image is generated for threshold segmentation, the defect area is positioned, and the defect crop image is judged in category through the pre-trained classification network model.

Benefits of technology

It realizes high-precision automatic detection of bubbles, foreign objects and concave and convex defects of the OLED display optical film, improves detection efficiency and accuracy of results, and meets the control needs of industrial production for defect categories.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119251235B_ABST
    Figure CN119251235B_ABST
Patent Text Reader

Abstract

The present invention relates to an intelligent detection method for appearance defects of an OLED display optical film, which comprises: obtaining a product area by performing grayscale value difference according to an optical film grayscale image, performing Gaussian filtering to obtain an initial preprocessed grayscale image, and calculating the overall grayscale mean, performing linear scaling processing on the initial preprocessed grayscale image according to the overall grayscale mean to obtain a first enhanced image, calculating the maximum grayscale value using a specific structural element according to the first enhanced image, and using the maximum grayscale value as the current pixel grayscale value to obtain a second enhanced image, extracting all defective areas within the product area according to the first and second enhanced images, cutting the original grayscale image according to the centroid coordinates of the defective area, and sending the cut defective cut image to a classification network model for category judgment to output bubbles, foreign matter and concave-convex defects. The present invention greatly improves the efficiency of defect detection of OLED display optical films, the accuracy and reliability of the detection results.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of visual inspection technology, and in particular to an intelligent inspection method for appearance defects of an OLED display optical film. Background Art

[0002] OLED display optical film is composed of multiple layers of transparent optical films of different materials. It has the advantages of ultra-thin and lightweight, fast response time, wide viewing angle, high contrast, low power consumption, etc. It is widely used in smart phones, computers, TVs, wearable devices, car displays and other fields. In order to ensure the display effect, it is necessary to detect the appearance defects of OLED display optical film; since the appearance of optical film is prone to bubbles, foreign matter and bumps, manual inspection is not only inefficient and low-cost, but also easy to cause missed inspections; the traditional method of optical film inspection will extract defect features based on pixel grayscale differences, but the features of different types of defects on the image are complex and changeable, and there are certain limitations in distinguishing categories with artificially designed features, which will reduce the accuracy of defect detection results, and cannot effectively meet the control needs of industrial production for defect categories, so as to further trace the problems in the production process. Summary of the invention

[0003] The main purpose of the present invention is to provide an intelligent detection method for the appearance defects of OLED display optical films, which can achieve high-precision and efficient automatic detection of the three defects of bubbles, foreign matter and bumps in OLED display optical films, greatly improving the efficiency of OLED display optical film defect detection, the accuracy and reliability of the detection results.

[0004] The present invention achieves the above-mentioned purpose through the following technical solution: an intelligent detection method for appearance defects of an OLED display optical film, comprising the following steps:

[0005] S1: Collecting the grayscale image of the optical film of the OLED display optical film;

[0006] S2: According to the distribution of pixel grayscale values ​​in the optical film grayscale image, the background area is removed to obtain the product area, the product area is filtered using Gaussian filtering, and the overall grayscale mean of the filtered product area is calculated;

[0007] S21: Calculate and obtain a corresponding grayscale histogram according to the grayscale value distribution of all pixels in the grayscale image of the optical film;

[0008] S22: Segment the product area and the background area according to the peak position in the grayscale histogram;

[0009] S23: Performing Gaussian filtering on the obtained product area to obtain a new image, which is recorded as an initial preprocessed grayscale image;

[0010] S24: Calculate the average value of the grayscale values ​​of all pixels in the initial preprocessed grayscale image, and use the calculated result as the overall grayscale mean value of the product area;

[0011] S3: performing linear scaling processing on the grayscale values ​​of all pixels in the initial preprocessed grayscale image according to the overall grayscale mean, and obtaining a new image as a first enhanced image;

[0012] S4: using a specific structural element according to the first enhanced image, calculating a maximum gray value in a neighborhood of each pixel position, and replacing the gray value of the current pixel with the obtained maximum gray value, and obtaining a new image after traversing the first enhanced image, which is recorded as a second enhanced image;

[0013] S5: performing threshold segmentation processing according to the first enhanced image and the second enhanced image to obtain all defect areas in the product area;

[0014] S6: calculating the centroid coordinates of each defective area according to all defective areas, and cutting out a plurality of images of fixed sizes corresponding to the centroid coordinate positions on the grayscale image of the optical film to obtain a plurality of defective cut images;

[0015] S7: Send the defective cropped images to a pre-trained classification network model, and perform category judgment on all input defective cropped images according to the classification network model to output corresponding bubble, foreign matter and concave-convex defect results.

[0016] Preferably, in step S22, segmenting the product area and the background area according to the peak positions appearing in the grayscale histogram specifically includes:

[0017] S221: In the grayscale histogram, the horizontal axis is the grayscale level of each pixel in the image, and the vertical axis is the number and frequency of occurrence of pixels with corresponding grayscale levels in the image; peaks with vertical axes less than a set value are discarded;

[0018] S222: sorting the peaks greater than or equal to the set value from small to large, selecting the largest and smallest peaks as the segmentation basis, and calculating the average value of the grayscale levels of the horizontal coordinates corresponding to the largest peak and the smallest peak as the segmentation threshold;

[0019] S223: The area composed of all pixels whose grayscale values ​​are lower than the segmentation threshold is the product area, and the area composed of all pixels whose grayscale values ​​are higher than the segmentation threshold is the background area.

[0020] Preferably, in step S3, performing linear scaling processing on the grayscale values ​​of all pixels in the initial preprocessed grayscale image according to the overall grayscale mean to obtain the first enhanced image specifically includes:

[0021] The grayscale values ​​of the initial preprocessed grayscale image are changed from the range Map to the new scope according to the mapping rules , the mapping rule is: ;

[0022] in, Represents the new grayscale value output after linear scaling; Represents the minimum value of the original grayscale range in the initial preprocessed grayscale image; Represents the maximum value of the original grayscale range in the initial preprocessed grayscale image; Represents the minimum value of the new grayscale range after linear scaling; Represents the maximum value of the new grayscale range after linear scaling; Represents the original grayscale value of the input in the initial preprocessed grayscale image.

[0023] Preferably, in step S4, the step of using a specific structural element according to the first enhanced image to calculate the maximum grayscale value in the neighborhood of each pixel position specifically includes:

[0024] Assume that the first enhanced image of the input is , the specific structural element is , calculate each pixel position in a specific structural element The maximum gray value in the neighborhood of , the second enhanced image D is defined as:

[0025] ;

[0026] in, Indicates the pixel position of the current processed image; Represents a specific structural element The coordinates in .

[0027] For each pixel Calculating the pixel grayscale values ​​at the corresponding positions of all structural elements in its neighborhood and taking the maximum value as the final output result can effectively enhance the bright areas in the image.

[0028] Preferably, in step S5, the threshold segmentation process is performed according to the first enhanced image and the second enhanced image to obtain all defect areas existing in the product area, specifically including:

[0029] S51: Divide the first enhanced image and the second enhanced image into a plurality of rectangular areas according to their width and height;

[0030] S52: Calculate the overall grayscale mean of each rectangular area, and in the first enhanced image, deduct the preset defect level threshold from the overall grayscale mean of the current rectangular area to obtain a new threshold as the first extraction threshold; in the second enhanced image, add the preset defect level threshold to obtain a new threshold as the second extraction threshold;

[0031] S53: In the first enhanced image, pixels whose grayscale values ​​are lower than the first extraction threshold are extracted, all rectangular regions are traversed in sequence, and all extracted regions are recorded as first defective regions; the first defective regions are defective regions containing bubbles and / or foreign matter;

[0032] S54: extracting pixels with grayscale values ​​higher than the second extraction threshold in the second enhanced image, traversing all rectangular areas in sequence, and recording all extracted areas as second defective areas; the second defective area is a defective area containing concavities and convexities;

[0033] S55: Merge the first defective region and the second defective region to obtain all defective regions in the product region.

[0034] Preferably, in step S51, dividing the first enhanced image and the second enhanced image into a plurality of rectangular areas according to their width and height specifically includes:

[0035] S511: Set the coordinates of the upper left corner of the entire rectangular area of ​​the first enhanced image or the second enhanced image to be , the coordinates of the lower right corner are , divide it into R OK C Column, get A rectangular area;

[0036] S512: Calculate the width of each rectangular area W and height H They are: ;

[0037] S513: Calculate the coordinates of the upper left corner of each rectangular area and the lower right corner coordinates :

[0038] The coordinates of the upper left corner of the rectangular area for: , ;

[0039] The lower right corner of the rectangular area for: ;

[0040] in .

[0041] Preferably, in step S6, the step of calculating the centroid coordinates of each defective area according to all defective areas specifically includes: marking the centroid coordinates as ,in,

[0042] ;

[0043] In the formula and is the coordinate of each pixel in a single defect area, and N is the number of all pixels in a single defect area.

[0044] Preferably, in step S6, a plurality of images of fixed sizes are cut out corresponding to the centroid coordinate position on the optical film grayscale image to obtain the plurality of defective cut images, which specifically includes:

[0045] Set the width of the cropping area to be cropped on the optical film grayscale image. , the height is , calculate the coordinates of the upper left corner of the cropping area through the centroid coordinates for: ;

[0046] The lower right corner coordinates of the cropping area for:

[0047] ;

[0048] Based on coordinates Cutting is performed on the optical film grayscale image to obtain the plurality of defective cut images.

[0049] Preferably, in step S7, the defective cropped images are fed into a pre-trained classification network model, and the classification network model is used to perform category judgment on all input defective cropped images and output corresponding bubble, foreign matter and concave-convex defect results, specifically including:

[0050] For all defective cropped images obtained in step S6, they are input into a pre-trained classification network model; after judgment by the classification network model, all categories of the current defective cropped image and the confidence corresponding to each category are obtained; the category with the highest confidence is selected as the category of the current defective cropped image, and the confidence of the category is compared and judged with the preset category confidence. If it is lower than the preset category confidence, the result is not output; if it is greater than or equal to the preset category confidence, the category and confidence of the defective cropped image are output.

[0051] Compared with the prior art, the beneficial effect of the intelligent detection method for appearance defects of an OLED display optical film of the present invention is as follows: a product area is obtained by performing grayscale value difference according to a grayscale image of the OLED display optical film, an initial preprocessed grayscale image is obtained by performing Gaussian filtering processing according to the product area, and an overall grayscale mean is calculated, and a linear scaling processing is performed on the grayscale values ​​of all pixels in the initial preprocessed grayscale image according to the overall grayscale mean to obtain a first enhanced image, and a maximum grayscale value is calculated in a neighborhood of each pixel position according to the first enhanced image using a specific structural element, and the maximum grayscale value is used as the grayscale value of the current pixel to obtain a second enhanced image, and all defect areas existing in the product area are extracted according to the first and second enhanced images, and the centroid coordinates are calculated according to these defect areas, and a defect crop of a fixed size is cut out on the original grayscale image. Image, and classify the defective cut image according to the pre-trained classification network model to output bubbles, foreign matter and concave-convex defects; compared with the prior art, the bubbles, foreign matter and concave-convex defects on the appearance of the OLED display optical film have complex and changeable features on the image, and artificial extraction of design defect features will have certain limitations, resulting in inaccurate detection results of surface defects of the optical film, and the inability to use the detection results for effective defect category management; the first and second enhanced images of the present invention can improve the contrast between the defective area and the normal area, quickly locate the defective area of ​​the product, and send the acquired defective cut image to the classification network model for judgment and output of the corresponding result, which greatly improves the accuracy and reliability of the defect detection results of OLED optical film products and meets the control needs of defect categories in actual industrial production. BRIEF DESCRIPTION OF THE DRAWINGS

[0052] Figure 1 Schematic diagram of the process flow of an embodiment of the present invention. DETAILED DESCRIPTION

[0053] In order to further explain the technical means and effects adopted by the present invention to achieve the predetermined invention purpose, the following is a detailed description of the intelligent detection method for appearance defects of an OLED display optical film proposed by the present invention, its specific implementation, structure, characteristics and effects, in combination with the accompanying drawings and preferred embodiments. In the following description, different "one embodiment" or "another embodiment" does not necessarily refer to the same embodiment. In addition, specific features, structures or characteristics in one or more embodiments may be combined in any suitable form.

[0054] Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs.

[0055] Embodiment 1:

[0056] The specific scheme of the intelligent detection method for appearance defects of an OLED display optical film provided by the present invention is described in detail below with reference to the accompanying drawings.

[0057] See also Figure 1 , which shows a flowchart of a method for intelligently detecting appearance defects of an OLED display optical film provided by an embodiment of the present invention, the method comprising the following steps:

[0058] Step S1: collecting optical film grayscale images of a number of OLED display optical films.

[0059] It should be noted that the traditional method extracts features from the collected OLED display optical film images based on the pixel grayscale difference, but the features presented by different types of defects on the images are complex and changeable, and there are certain limitations when artificially designing features to distinguish defect categories, which will reduce the accuracy of defect detection results and make it impossible to effectively control defect categories. To this end, this embodiment proposes an intelligent detection method for appearance defects of OLED display optical films.

[0060] Specifically, in order to implement the intelligent detection method for appearance defects of an OLED display optical film proposed in this embodiment, it is first necessary to collect grayscale images of the OLED display optical film. The specific process is: use an industrial camera to take a number of images of the OLED display optical film, which are recorded as optical film images; and grayscale each optical film image to obtain a number of grayscale images, which are recorded as optical film grayscale images. The grayscale processing is a well-known technology and will not be repeated in this embodiment.

[0061] So far, the optical film grayscale images of all OLED display optical films are obtained through the above method.

[0062] Step S2: according to the distribution of the pixel grayscale values ​​in the optical film grayscale image, the background area is removed to obtain the product area, the product area is processed using Gaussian filtering, and the overall grayscale mean of the filtered area is calculated.

[0063] It should be noted that the OLED display optical film itself is composed of multiple layers of transparent optical films of different materials. Each layer of optical film is glued together. In the grayscale image of the optical film taken by an industrial camera, the overall grayscale difference between the product area and the background area of ​​the optical film is very small, and the glue between the layers will present an irregular granular texture on the product area. According to the grayscale distribution of all pixels in the grayscale image of the optical film, it is converted into a grayscale histogram to obtain the range of product and background distribution. The pixels in the transition area between the edge of the product and the background area will also have a certain grayscale fluctuation range. This part of the interference needs to be eliminated here to avoid the extracted product area being inaccurate. In this way, the actual effective product area on the grayscale image of the optical film can be obtained, which is convenient for further analysis and processing of subsequent images.

[0064] It should be further explained that the granular texture presented by the glue on the product area will cause certain interference to the subsequent image processing. When locating and extracting defects on the image, in order to avoid extracting these granular texture areas as potential defect areas, filtering processing is required. It can not only effectively smooth the image and reduce the impact of the granular texture, but also effectively remove the noise on the image, and at the same time reduce the time required for image processing.

[0065] Specifically, taking any OLED optical film grayscale image as an example, the grayscale values ​​of all pixels in the optical film grayscale image are calculated, and the corresponding grayscale histogram is obtained according to the distribution of grayscale levels 0-255. The horizontal axis is the grayscale level of each pixel in the image, and the vertical axis represents the number of pixels of each grayscale level appearing in the image and the frequency of the grayscale level. The position of the peak can be obtained through the grayscale histogram. Considering that the pixels at the transition position between the edge and the background area of ​​the optical film product will have a certain grayscale variation range, the vertical axis position, that is, the peak position with a frequency lower than the set value (for example, 0.01) is discarded, and all the peak positions after screening are sorted from small to large, and the largest and smallest peaks are selected as the segmentation basis. The average value of the grayscale level of the horizontal axis corresponding to the largest peak and the smallest peak is calculated as the average threshold. Through threshold segmentation, the area composed of all pixels with grayscale values ​​lower than or equal to the average threshold in the entire optical film grayscale image is defined as the product area, and the area composed of all pixels with grayscale values ​​higher than the average threshold is defined as the background area. The grayscale histogram and threshold segmentation are both well-known technologies, and will not be repeated in this embodiment. The above setting values ​​can be set accordingly according to the actual situation, and the setting values ​​corresponding to different products will be different.

[0066] Furthermore, after obtaining the product area on the grayscale image of the optical film, Gaussian filtering is performed on the area. When filtering the image, Gaussian filtering will select a suitable filter size. This embodiment is described as a filter size of 5. This embodiment is not specifically limited and can be determined according to the specific implementation of the image size. A 5×5 template is used to slide the window in the entire product area. In this template area, the mean grayscale of all pixels in the area is calculated to replace the value of the center pixel of the template to achieve the effect of smoothing the image. The new image obtained after sliding the entire product area is recorded as the initial preprocessed grayscale image. The result of the mean calculation of the grayscale values ​​of all pixels in the product area in the initial preprocessed grayscale image is used as the overall grayscale mean of the product area. This mean is used as a basis for subsequent image processing. It should be noted that Gaussian filtering is a well-known technology and will not be described in detail in this embodiment.

[0067] So far, the initial preprocessed grayscale image and the overall grayscale mean of the product area on the image are obtained through the above method.

[0068] Step S3: linearly scale the grayscale values ​​of all pixels in the filtered area according to the overall grayscale mean to obtain a first enhanced image.

[0069] It should be noted that the bubbles, foreign matter and concave-convex defects on the OLED optical film have different degrees of each defect, and the morphological characteristics of light, medium and severe defects on the image are also different. In order to locate all defects on the optical film as much as possible in subsequent processing, it is necessary to further process the initial pre-processed grayscale image obtained to increase the contrast between the normal area and the defective area on the image as much as possible to achieve the effect of image enhancement.

[0070] Specifically, taking any initial preprocessed grayscale image of the optical film grayscale image as an example, the value of the image is changed from the range Map to a new grayscale range , the new image obtained after processing is recorded as the first enhanced image, where the specific calculation method is:

[0071] ;

[0072] In the formula, represents the minimum value of the original grayscale range in the initial preprocessed grayscale image. In this embodiment, the new value obtained by reducing the overall grayscale mean by 15 is used as the minimum value; represents the maximum value of the original grayscale range in the initial preprocessed grayscale image. In this embodiment, the new value obtained by increasing the overall grayscale mean by 5 is taken as the maximum value; Represents the original grayscale value input in the initial preprocessed grayscale image; Represents the new grayscale value output after linear scaling; Indicates the minimum value of the new grayscale range mapped after linear scaling, which is set to 0 in this embodiment; It indicates the maximum value of the new grayscale range mapped after linear scaling, which is set to 255 in this embodiment. It should be noted that this method is a linear grayscale scaling method to enhance the image, and the grayscale of bubbles and foreign matter defects in the image will become darker. Since concave and convex defects will present a characteristic effect of alternating light and dark on the image, some areas of the defect area will become darker and some areas will become whiter.

[0073] So far, the first enhanced image of each optical film grayscale image is obtained through the above method.

[0074] Step S4: using a specific structural element according to the first enhanced image, calculating the maximum grayscale value in the neighborhood of each pixel position, assigning the maximum grayscale value to the current pixel, and obtaining a second enhanced image after traversing the entire image.

[0075] It should be noted that there are certain differences between concave-convex defects and air bubbles and foreign body defects. Concave-convex defects have a characteristic effect of alternating light and dark in imaging. In the first enhanced image, there will be both black and white areas, which represent the light and dark effects of the concave-convex defect area. However, there are two problems when extracting concave-convex defects. On the one hand, concave-convex defects will have different degrees of expression. For more severe concave-convex, the light and dark effects are very obvious in the first enhanced image, while for less severe concave-convex, the light effect will be much weaker, and the pixel ratio will be much less than the dark effect. Direct threshold extraction on the first enhanced image will cause many unnecessary areas to be located. On the other hand, concave-convex defects can be regarded as composed of light and dark areas, but the pixel changes in the light-dark transition area will also become complicated due to different forms of concave-convex, which will cause one concave-convex defect area to be extracted as two areas when extracted on the first enhanced image. Therefore, the first enhanced image needs to be further processed to extract the concave-convex defect area completely.

[0076] Specifically, taking any first enhanced image of the optical film grayscale image as an example, the maximum grayscale value is calculated in the neighborhood of each pixel position using a specific structural element according to the first enhanced image, and the grayscale value of the current pixel is replaced by the obtained maximum grayscale value, and the new image obtained after traversing the first enhanced image is recorded as the second enhanced image. The calculation method for calculating the maximum grayscale value is:

[0077] Assume that any first enhanced image of the input is , the specific structural element is , calculate each pixel position in a specific structural element The maximum gray value in the neighborhood of , the obtained second enhanced image D is defined as: ;

[0078] In the formula, Indicates the pixel position of the current processed image; Represents the coordinates in a particular structural element; for each pixel Calculate the pixel grayscale values ​​of the corresponding positions of all structural elements in its neighborhood, and replace the grayscale value of the current pixel with the obtained maximum grayscale value, which can effectively enhance the bright area in the image. It should be noted that this specific structural element in this embodiment uses a 25×25 mask, and the maximum value of all pixel grayscale values ​​will be calculated in this mask area. For the weaker concave-convex defect area, the bright feature effect can be further enhanced. The bright area will be further expanded on the second enhanced image, which can effectively connect the bright effect area and the dark area together, so that the concave-convex defect area remains in a complete state, which is convenient for subsequent image processing.

[0079] So far, the second enhanced image of each optical film grayscale image is obtained through the above method.

[0080] Step S5: Perform threshold segmentation processing based on the first enhanced image and the second enhanced image to obtain all defect areas in the product area.

[0081] It should be noted that when using an industrial camera to take pictures, the light received by the two sides and the middle range of the lens is different. There will be differences in the image grayscale of the two side areas and the middle image grayscale of the entire OLED optical film grayscale image. The surface of the OLED optical film is not completely flat when scanned by the camera, and there will be a certain amount of warping, resulting in uneven grayscale in the image. In order to adapt to this uneven grayscale change, when performing threshold extraction on the first enhanced image and the second enhanced image, the image area will be cut into many small areas to extract the defective area, and each small area will be analyzed and processed separately, which can reduce the extraction of unnecessary areas to a certain extent.

[0082] Specifically, taking any first or second enhanced image as an example, the entire image area is divided into a plurality of rectangular areas according to its width and height, wherein the calculation method for dividing into a plurality of rectangular areas is:

[0083] Assume that the coordinates of the upper left corner of the entire rectangular area of ​​any first enhanced image or second enhanced image are , the coordinates of the lower right corner are , to be divided into R rows and C columns, we get Rectangular areas, calculate the width and height of each rectangular area as:

[0084] ;

[0085] Calculate the coordinates of each rectangular area. Row and The coordinates of the upper left corner and lower right corner of the column sub-rectangle can be expressed as:

[0086] The upper left corner of the rectangular area :

[0087] ;

[0088] The lower right corner of the rectangular area :

[0089] ;

[0090] In the formula and .

[0091] Furthermore, after the entire image is divided into multiple rectangular areas, taking any divided rectangular area as an example, the grayscale mean of all pixels in the current rectangular area is calculated as the overall grayscale mean of the rectangular area, and in the first enhanced image, the new threshold obtained by subtracting the preset defect degree threshold from the overall grayscale mean of the current rectangular area is recorded as the first extraction threshold, wherein the preset defect degree threshold of this embodiment is equal to 40 as an example for description, and this embodiment is not specifically limited, wherein the preset defect degree threshold can be determined according to the specific implementation situation; pixels with grayscale values ​​lower than the first extraction threshold are extracted to obtain potential defect areas; the operation is repeated to traverse all rectangular areas, and all potential defect areas finally extracted are recorded as the first defective areas.

[0092] Furthermore, in the second enhanced image, the new threshold obtained by adding the overall grayscale mean value of the current rectangular area to the preset defect level threshold is recorded as the second extraction threshold, and the pixels with grayscale values ​​higher than the second extraction threshold are extracted to obtain potential defect areas. The operation is repeated to traverse all rectangular areas, and all the areas finally extracted are recorded as the second defective area. It should be noted that the first defective area will contain defective areas of bubbles and foreign matter, and the second defective area will contain concave and convex defective areas; the first and second defective areas are merged to obtain all defective areas in the product area.

[0093] So far, all defective areas existing in each optical film grayscale image are obtained through the above method.

[0094] Step S6: cutting an image of a fixed size according to the acquired defect area and the grayscale image of the optical film to obtain a plurality of defect cut images.

[0095] It should be noted that OLED display optical films need to be controlled according to the actual needs of customers during industrial production. Through defect category control, industrial personnel can trace the actual production conditions of different batches of products, and it is also convenient to check whether there are abnormal conditions in the production process. After the three defects of bubbles, foreign matter and bumps on the appearance of OLED display optical films are extracted and located, they need to be further classified. The traditional processing method is to use artificially designed defect features to distinguish and process, but the features presented by different types of defects on the image are complex and changeable, and the features presented to different degrees of the same defect will also be different. Artificially designed features will have certain limitations and will not be compatible with many complex situations, which will eventually lead to a decrease in the accuracy of the detection results. Therefore, a classification network model is used to classify the extracted potential defect areas to further improve the accuracy of the detection results. When using the classification model for classification tasks, some pre-processing related work needs to be performed on the input defective images.

[0096] Specifically, taking any grayscale image of an optical film as an example, many of the acquired defect areas are irregular areas. The centroid coordinates of each area are calculated based on all the defect areas. , which is calculated as: ;

[0097] In the formula and is the coordinate of each pixel in the region, and N is the number of all pixels in the region.

[0098] Furthermore, taking any centroid coordinate obtained as an example, the grayscale image of the optical film is cropped to obtain an image of a fixed size, and the calculation method is:

[0099] For any centroid coordinate , the width is , the height is , calculate the coordinates of the upper left corner of the cropping area through the centroid coordinates:

[0100] ;

[0101] The coordinates of the lower right corner of the cropping area:

[0102] ;

[0103] Based on coordinates The image is cropped on the grayscale image of the optical film. It should be noted that in the multiple image processing steps, the domain of the optical film product area on the entire image does not change, but the grayscale value of the pixels in the area changes. After the image is cropped, the domain of each defective cropped image will change. The size of the cropped image in this embodiment is 64 in width and 64 in height. This embodiment does not make specific limitations. The width and height of the cropped image can be determined according to the specific implementation situation. The width and height of the defective cropped image sent to the classification network model should not be too large, otherwise it will cause the classification network model to be slow during the reasoning process.

[0104] So far, all defective cut images of each optical film grayscale image are obtained through the above method.

[0105] Step S7: All defective cropped images are sent to a pre-trained classification network model, and the classification network model is used to perform category judgment on all input defective cropped images, and the corresponding bubbles, foreign matter and concave-convex defects are output.

[0106] Specifically, taking any grayscale image of an optical film as an example, all defective cut images obtained on the image are sequentially input into the pre-trained classification network model; after judgment by the classification network model, all categories of the current defective cut image and the confidence corresponding to each category can be obtained, by selecting the category with the highest confidence as the category of the current defective cut image, and judging the confidence of the category and the preset category confidence, where the range of the preset category confidence is 0-1, and this embodiment sets the value to 0.8. This embodiment is not specifically limited and can be determined according to the specific implementation situation; if the confidence of the category is lower than the preset category confidence, the result is not output, and if it is greater than or equal to the preset category confidence, the category and confidence of the defective cut image are output. It should be noted that all the input defective cut images are sent to the pre-trained classification network, where the convolutional neural network used in this embodiment is ResNet50, and the method for obtaining the data set for training the neural network is:

[0107] A large number of optical film grayscale images of OLED display optical films are collected, and the defective cut images are finally obtained through the above-mentioned multi-step image processing. All the acquired defective cut images are artificially labeled, bubble defects are labeled with bubble labels, foreign matter defects are labeled with foreign matter labels, and concave-convex defects are labeled with concave-convex labels. The defective cut images with corresponding labels are placed in a file, and finally a data set with multiple defect labels is obtained. The data set is used to train a network model, and the network model is used for subsequent image classification tasks. The loss function used in the training process is a cross-entropy loss function. The specific training process is a well-known content of convolutional neural networks, and the specific training process is not repeated in this embodiment.

[0108] So far, the bubbles, foreign matter and concave-convex defects in the grayscale images of all optical films are obtained by the above method.

[0109] 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. An intelligent method for detecting appearance defects of an OLED display optical film, characterized in that: The method comprises the following steps: S1: Collecting the grayscale image of the optical film of the OLED display optical film; S2: According to the distribution of pixel grayscale values ​​in the optical film grayscale image, the background area is removed to obtain the product area, the product area is filtered using Gaussian filtering, and the overall grayscale mean of the filtered product area is calculated; S21: Calculate and obtain a corresponding grayscale histogram according to the grayscale value distribution of all pixels in the grayscale image of the optical film; S22: Segment the product area and the background area according to the peak position appearing in the grayscale histogram; S23: Performing Gaussian filtering on the obtained product area to obtain a new image, which is recorded as an initial preprocessed grayscale image; S24: Calculate the average value of the grayscale values ​​of all pixels in the initial preprocessed grayscale image, and use the calculated result as the overall grayscale mean value of the product area; S3: performing linear scaling processing on the grayscale values ​​of all pixels in the initial preprocessed grayscale image according to the overall grayscale mean, and obtaining a new image as a first enhanced image; S4: using a specific structural element according to the first enhanced image, calculating a maximum gray value in a neighborhood of each pixel position, and replacing the gray value of the current pixel with the obtained maximum gray value, and obtaining a new image after traversing the first enhanced image, which is recorded as a second enhanced image; S5: performing threshold segmentation processing according to the first enhanced image and the second enhanced image to obtain all defect areas in the product area; S6: calculating the centroid coordinates of each defective area according to all defective areas, and cutting out a plurality of images of fixed sizes corresponding to the centroid coordinate positions on the grayscale image of the optical film to obtain a plurality of defective cut images; S7: Send the defective cropped images to a pre-trained classification network model, and perform category judgment on all input defective cropped images according to the classification network model to output corresponding bubble, foreign matter and concave-convex defect results.

2. The method for intelligently detecting appearance defects of an OLED display optical film according to claim 1, characterized in that: In step S22, the product area and the background area are segmented according to the peak positions appearing in the grayscale histogram, and the method includes: S221: In the grayscale histogram, the horizontal axis is the grayscale level of each pixel in the image, and the vertical axis is the number and frequency of occurrence of pixels with corresponding grayscale levels in the image; peaks with vertical axes less than a set value are discarded; S222: sorting the peaks greater than or equal to the set value from small to large, selecting the largest and smallest peaks as the segmentation basis, and calculating the average value of the grayscale levels of the horizontal coordinates corresponding to the largest peak and the smallest peak as the segmentation threshold; S223: The area composed of all pixels whose grayscale values ​​are lower than or equal to the segmentation threshold is the product area, and the area composed of all pixels whose grayscale values ​​are higher than the segmentation threshold is the background area.

3. The method for intelligently detecting appearance defects of an OLED display optical film according to claim 1, characterized in that: In step S3, obtaining the first enhanced image includes: The grayscale values ​​of the initial preprocessed grayscale image are changed from the range Map to the new scope according to the mapping rules , the mapping rule is: ; in, Represents the new grayscale value output after linear scaling; Represents the minimum value of the original grayscale range in the initial preprocessed grayscale image; Represents the maximum value of the original grayscale range in the initial preprocessed grayscale image; Represents the minimum value of the new grayscale range after linear scaling; Represents the maximum value of the new grayscale range after linear scaling; Represents the original grayscale value of the input in the initial preprocessed grayscale image.

4. The method for intelligently detecting appearance defects of an OLED display optical film according to claim 1, characterized in that: In step S4, obtaining the second enhanced image includes: Assume that the first enhanced image of the input is , the specific structural element is , calculate each pixel position in a specific structural element The maximum gray value in the neighborhood of , the second enhanced image D is defined as: ; in, Indicates the pixel position of the current processed image; Represents a specific structural element The coordinates in .

5. The method for intelligently detecting appearance defects of an OLED display optical film according to claim 1, characterized in that: In step S5, obtaining all defective areas existing in the product area includes the following steps: S51: Divide the first enhanced image and the second enhanced image into a plurality of rectangular areas according to their width and height; S52: Calculate the overall grayscale mean of each rectangular area, and in the first enhanced image, deduct the preset defect level threshold from the overall grayscale mean of the current rectangular area to obtain a new threshold as the first extraction threshold; in the second enhanced image, add the preset defect level threshold to obtain a new threshold as the second extraction threshold; S53: In the first enhanced image, pixels whose grayscale values ​​are lower than the first extraction threshold are extracted, all rectangular regions are traversed in sequence, and all extracted regions are recorded as first defective regions; the first defective regions are defective regions containing bubbles and / or foreign matter; S54: extracting pixels with grayscale values ​​higher than the second extraction threshold in the second enhanced image, traversing all rectangular areas in sequence, and recording all extracted areas as second defective areas; the second defective area is a defective area containing concavities and convexities; S55: Merge the first defective region and the second defective region to obtain all defective regions in the product region.

6. The method for intelligently detecting appearance defects of an OLED display optical film according to claim 5, characterized in that: The step S51 comprises: S511: Set the coordinates of the upper left corner of the entire rectangular area of ​​the first enhanced image or the second enhanced image to be , the coordinates of the lower right corner are , divide it into R OK C Column, get A rectangular area; S512: Calculate the width of each rectangular area W and height H They are: ; S513: Calculate the coordinates of the upper left corner of each rectangular area and the lower right corner coordinates : The coordinates of the upper left corner of the rectangular area for: ; The lower right corner of the rectangular area for: ;in .

7. The method for intelligently detecting appearance defects of an OLED display optical film according to claim 1, characterized in that: In step S6, the centroid coordinates of each defect area are calculated according to all defect areas, including: The centroid coordinates are denoted as ,in, ; In the formula and is the coordinate of each pixel in a single defect area, and N is the number of all pixels in a single defect area.

8. The method for intelligently detecting appearance defects of an OLED display optical film according to claim 7, characterized in that: In step S6, the acquisition of the plurality of defective cropped images includes: Set the width of the cropping area to be cropped on the optical film grayscale image. , the height is , calculate the coordinates of the upper left corner of the cropping area through the centroid coordinates for: ; The lower right corner coordinates of the cropping area for: ; Based on coordinates Cutting is performed on the optical film grayscale image to obtain the plurality of defective cut images.

9. The method for intelligently detecting appearance defects of an OLED display optical film according to claim 1, characterized in that: Step S7 includes: For all defective cropped images obtained in step S6, they are input into a pre-trained classification network model; after judgment by the classification network model, all categories of the current defective cropped image and the confidence corresponding to each category are obtained; the category with the highest confidence is selected as the category of the current defective cropped image, and the confidence of the category is compared and judged with the preset category confidence. If it is lower than the preset category confidence, the result is not output; if it is greater than or equal to the preset category confidence, the category and confidence of the defective cropped image are output.

Citation Information

Patent Citations

  • Product edge defect detection method

    CN113450307A

  • Surface self-adaptive defect detection method for silicon steel strip

    CN115272318A