[go: up one dir, main page]

CN119919387A - Optical film surface defect detection method, system, product and medium - Google Patents

Optical film surface defect detection method, system, product and medium Download PDF

Info

Publication number
CN119919387A
CN119919387A CN202510004844.1A CN202510004844A CN119919387A CN 119919387 A CN119919387 A CN 119919387A CN 202510004844 A CN202510004844 A CN 202510004844A CN 119919387 A CN119919387 A CN 119919387A
Authority
CN
China
Prior art keywords
flaw
connected domain
optical film
gray
value
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202510004844.1A
Other languages
Chinese (zh)
Other versions
CN119919387B (en
Inventor
王康康
尹文龙
杨帆
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Sichuan Xinfurui Technology Development Co ltd
Original Assignee
Sichuan Xinfurui Technology Development Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Sichuan Xinfurui Technology Development Co ltd filed Critical Sichuan Xinfurui Technology Development Co ltd
Priority to CN202510004844.1A priority Critical patent/CN119919387B/en
Publication of CN119919387A publication Critical patent/CN119919387A/en
Application granted granted Critical
Publication of CN119919387B publication Critical patent/CN119919387B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/30Computing systems specially adapted for manufacturing

Landscapes

  • Investigating Materials By The Use Of Optical Means Adapted For Particular Applications (AREA)

Abstract

A method, system, product and medium for detecting surface flaws of an optical film. The method comprises the steps of obtaining an edge detection image, conducting connected domain segmentation in the edge detection image, calculating shape characteristics of the connected domains, comparing the shape characteristics of every two connected domains, combining the connected domains with similar shape characteristics into a combined connected domain, calculating gray value distribution characteristics and gradient change characteristics of the combined connected domains, inputting a single flaw characteristic model to obtain combined single flaw error values, splitting the combined connected domains with the combined single flaw error larger than a preset single flaw error threshold into original similar connected domains, serving as flaw connected domains, combining the connected domains with the flaw error not larger than the preset single flaw error threshold and dissimilar connected domains, constructing a flaw type characteristic library, and conducting flaw type matching on all flaw connected domains. By implementing the technical scheme provided by the application, the accuracy of flaw identification is improved.

Description

Method, system, product and medium for detecting surface flaws of optical film
Technical Field
The application relates to the field of new material industry, in particular to a method, a system, a product and a medium for detecting surface flaws of an optical film.
Background
The optical film plays a key role in various industries such as electronic display, optical instruments and the like, and the surface defects of the optical film can obviously reduce the optical performance and reliability of the product. The defects on the surface of the optical film are detected, so that the defects can be rapidly and accurately positioned, and defective products are prevented from flowing into the market. In recent years, the detection technology is developed from artificial visual to intelligent and automatic detection, the detection precision and efficiency are greatly improved, the quality of optical film products is effectively ensured, the fine production and technical progress of related industries are promoted, and the method has extremely important industrial value.
At present, the surface flaw detection of the optical film mainly adopts a machine vision detection technology, flaw characteristics are highlighted by utilizing light source irradiation from different angles, an image acquisition system transmits the images to computer software, and the software can preprocess the images, such as graying, filtering and the like, so as to improve the image quality. And extracting a flaw part by adopting algorithms such as edge detection, threshold segmentation and the like, and finally judging the flaw type according to the characteristics such as the size, the shape, the gray scale and the like of the flaw.
However, when the surface of the optical film has multiple dense areas with flaws, and the flaw areas are divided according to the characteristics of the flaws such as size, shape, gray scale and the like, the flaw characteristics are determined, and the flaw number, type and other characteristics may be determined incorrectly due to uneven distribution of the internal characteristics of the flaws, so that the precision of flaw identification of the optical film is affected.
Disclosure of Invention
The application provides a method, a system, a product and a medium for detecting surface flaws of an optical film, which are used for improving the precision of flaw identification.
In a first aspect, the present application provides a method for detecting surface flaws of an optical film, including:
Carrying out connected domain segmentation in the edge detection image to obtain a connected domain;
The method comprises the steps of calculating shape characteristics of connected domains, comparing the shape characteristics of every two connected domains, judging whether the shape characteristics are similar or not, combining the similar connected domains into a combined connected domain under the condition that the two connected domains are similar connected domains, calculating to obtain combined gray value distribution characteristics and combined gradient change characteristics of the combined connected domains, inputting the combined gray value distribution characteristics and the combined gradient change characteristics into a single flaw characteristic model to obtain combined single flaw error values, splitting the combined connected domain with the combined single flaw error being larger than a preset single flaw error threshold into the original similar connected domain to serve as flaw connected domains, constructing a flaw type feature library, and conducting flaw type matching on all flaw connected domains in the edge detection image.
In the above embodiment, the edge detection image is divided into a plurality of connected domains, the shape features of the connected domains are calculated and compared with the similarity, the connected domains with similar shapes are combined, the gray scale and gradient feature input model of the combined connected domains are calculated to obtain error values, and the error values are selected and split into the original connected domains or the combined connected domains are reserved, and after the feature library is constructed, the matching types of all the flaw connected domains are obtained. Through multi-feature analysis and model evaluation, the flaw connected domain is identified, flaw classification is carried out, the misjudgment rate is reduced, and the precision of flaw detection of the optical film is improved.
With reference to some embodiments of the first aspect, in some embodiments, performing connected domain segmentation in the edge detection image to obtain a connected domain specifically includes:
the method comprises the steps of calculating a gray average value and a gray standard deviation of a local area of each pixel point in an edge detection image, wherein the local area of each pixel point is an area which is covered by sliding with the pixel point as a center according to a window with a preset size, determining a flaw judgment threshold value through the gray average value and the gray standard deviation, and connecting adjacent pixel points, of all the pixel points of the edge detection image, of which the gray average value is larger than the flaw judgment threshold value to obtain a connected area.
In the embodiment, the threshold value is determined by calculating the local area characteristics of the pixel points, and the related pixel points are connected according to the threshold value, so that the connected domain can be accurately divided, a basis is provided for the follow-up accurate detection and analysis of the defects of the optical film, and the accuracy and efficiency of defect identification are improved.
With reference to the embodiments of the first aspect, in some embodiments, the calculating a gray average value and a gray standard deviation of a local area of each pixel in the edge detection image specifically includes:
sequentially selecting each pixel point from the upper left corner of the edge detection image as a central pixel point according to the row priority order; creating an empty data set for a current center pixel point, taking the current center pixel point as a center, storing pixel gray values in an area covered by window sliding with a preset size into the data set, and calculating a gray average value of a local area of the current center pixel point by using a first formula, wherein the first formula is as follows: calculating the gray standard deviation of the local area of the current center pixel point by using a second formula, wherein the second formula is as follows: Wherein, In the edge detection image, a coordinate axis is established by taking an upper left corner fixed point as an origin, an x-axis is established from the upper left corner fixed point to a lower left corner fixed point direction, a y-axis is established from the upper left corner fixed point to the upper right corner fixed point direction, a coordinate axis plane is divided into square grids with a pixel unit as a size, and the coordinate position of the current center pixel point in the coordinate axis is (i, j).
In the embodiment, the local characteristics of the pixel points are calculated by using the mean value and standard deviation calculation formula combined with the Gaussian formula one by one on the pixel points in the edge detection image, so that the situation of each local area of the image can be accurately quantized, and a foundation is laid for accurately screening flaws and improving the accuracy of flaw detection.
With reference to some embodiments of the first aspect, in some embodiments, the constructing a defect type feature library, performing defect type matching on all defect connected domains in the edge detection image specifically includes:
The method comprises the steps of collecting a plurality of known types of optical film flaw samples, extracting sample characteristic data of each sample connected domain aiming at the sample connected domain of the optical film flaw sample, wherein the sample characteristic data are sample gray value distribution characteristics, sample gradient change characteristics, sample circularity and sample rectangular degree of the sample connected domain, storing the sample characteristic data and sample flaw types of the corresponding sample connected domains in a correlation manner to construct a flaw type characteristic library, calculating flaw characteristic data of the flaw connected domain, wherein the flaw characteristic data comprise flaw gray value distribution characteristics, flaw gradient change characteristics, flaw circularity and flaw rectangular degree, carrying out similarity calculation on the flaw characteristic data and each sample characteristic data in the flaw type characteristic library to obtain a similarity value group, and taking a maximum flaw type as a flaw type matched with the flaw connected domain, wherein the maximum flaw type is the flaw type of the sample connected domain corresponding to the maximum similarity data in the similarity value group.
In the above embodiment, by constructing the feature library and comparing the similarities, the defect type of the defect connected domain can be accurately determined according to the existing sample, and the accuracy and efficiency of defect classification of the optical film can be improved.
With reference to some embodiments of the first aspect, in some embodiments, after performing similarity calculation on the flaw feature data and each sample feature data in the flaw type feature library to obtain a similarity value set, the method further includes:
And marking the flaw connected domain as an unknown connected domain under the condition that all the similarity data in the similarity data set are lower than a preset minimum similarity threshold value.
In the above embodiment, by marking the connected domain with low similarity to all flaw types in the feature library as the unknown connected domain, erroneous classification is avoided, which is helpful for improving the flaw classification system.
With reference to some embodiments of the first aspect, in some embodiments, after the defect type matching the defect connected domain is the maximum defect type, the method further includes:
And judging the flaw grade of the flaw communicating domain according to the flaw communicating domain area, the flaw gray level average value in the flaw gray level distribution characteristic and the flaw length-width ratio by a preset grade dividing threshold value.
In the above embodiment, by calculating the area of the defect connected domain and combining the characteristics of the gray average value, the aspect ratio and the like in the gray value distribution characteristic, and referring to the preset grading threshold, the defect grade to which the defect connected domain belongs is comprehensively determined, so that the defect on the optical film can be more carefully and quantitatively evaluated.
In combination with some embodiments of the first aspect, in some embodiments, after splitting the merged connected domain with the merged single defect error greater than a preset single defect error threshold into the original similar connected domain, as a defective connected domain, the method further includes determining a center position of the defective connected domain as a connected domain center, calculating a connected domain center distance of each two connected domain centers and a connected domain center density of the edge detection image, and marking an optical film corresponding to the edge detection image as a high defect optical film when a short distance proportion value in the connected domain center distance in the edge detection image is greater than a preset short distance proportion threshold or the connected domain center density is greater than a preset maximum density threshold, wherein the short distance proportion value is a proportion value of the connected domain center distance smaller than the preset distance threshold to all the connected domain center distances in the edge detection image.
In the embodiment, the defect density of the optical film can be judged according to the specific standard by analyzing the related parameters of the center of the connected domain, so that the high-defect optical film with more defects or more defects can be screened out, products with poor quality can be conveniently screened out, and the overall quality level of the products is ensured.
In a second aspect, embodiments of the present application provide an optical film surface flaw detection system comprising one or more processors and a memory coupled to the one or more processors, the memory for storing computer program code comprising computer instructions that are invoked by the one or more processors to cause the optical film surface flaw detection system to perform a method as described in any one of the possible implementations of the first aspect.
In a third aspect, embodiments of the present application provide a computer program product comprising instructions that, when run on an optical film surface flaw detection system, cause the optical film surface flaw detection system to perform a method as described in the first aspect and any one of the possible implementations of the first aspect.
In a fourth aspect, embodiments of the present application provide a computer-readable storage medium comprising instructions that, when run on an optical film surface flaw detection system, cause the optical film surface flaw detection system to perform a method as described in the first aspect and any one of the possible implementations of the first aspect.
It will be appreciated that the optical film surface flaw detection system provided in the second aspect, the computer program product provided in the third aspect, and the computer storage medium provided in the fourth aspect described above are all used to perform the optical film surface flaw detection method provided by the embodiment of the present application. Therefore, the advantages achieved by the method can be referred to as the advantages of the corresponding method, and will not be described herein.
One or more technical solutions provided in the embodiments of the present application at least have the following technical effects or advantages:
1. According to the application, the edge detection image is subjected to connected domain segmentation to obtain a plurality of connected domains, the shape characteristics of the connected domains are calculated and compared with the similarity, the connected domains with similar shapes are combined, the gray level and gradient characteristic input model of the combined connected domains is calculated to obtain an error value, the original connected domains are split or the combined connected domains are reserved according to the error value, and the matching types of all the flaw connected domains are realized after the feature library is constructed. Through multi-feature analysis and model evaluation, the flaw connected domain is identified, flaw classification is carried out, the misjudgment rate is reduced, and the precision of flaw detection of the optical film is improved.
2. According to the application, by constructing the feature library and comparing the similarity, the flaw type of the flaw connected domain can be accurately judged according to the existing sample, and the accuracy and the efficiency of flaw classification of the optical film are improved.
3. According to the application, the area of the flaw connected domain is calculated, and the flaw grade of the flaw connected domain is comprehensively judged by referring to the preset grade division threshold value by combining the characteristics of the gray average value, the length-width ratio and the like in the gray value distribution characteristic, so that more detailed quantitative evaluation can be carried out on flaws on the optical film.
Drawings
FIG. 1 is a schematic diagram of a system architecture applicable to the method for detecting surface defects of an optical film according to an embodiment of the present application;
FIG. 2 is a schematic flow chart of a method for detecting surface flaws of an optical film according to an embodiment of the present application;
FIG. 3 is a schematic flow chart of a method for detecting surface flaws of an optical film according to an embodiment of the present application;
FIG. 4 is a schematic diagram of an exemplary hardware configuration of an optical film surface flaw detection system according to an embodiment of the present application.
Detailed Description
The terminology used in the following embodiments of the application is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used in the specification of the present application and the appended claims, the singular forms "a," "an," "the," and "the" are intended to include the plural forms as well, unless the context clearly indicates to the contrary. It should also be understood that the term "and/or" as used in this disclosure refers to and encompasses any or all possible combinations of one or more of the listed items.
The terms "first," "second," and the like, are used below for descriptive purposes only and are not to be construed as implying or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defining "a first" or "a second" may explicitly or implicitly include one or more such feature, and in the description of embodiments of the application, unless otherwise indicated, the meaning of "a plurality" is two or more.
FIG. 1 is a schematic diagram of a system architecture to which the method for detecting surface defects of an optical film according to an embodiment of the present application is applicable.
Referring to fig. 1, the system architecture includes an image forming apparatus 110, a data transmission apparatus 120, and a server 130.
The imaging device 110 includes an industrial camera 111, an optical lens 112, and an illumination system 113, which is used to obtain an original image of the surface of the optical film, provide basic data for subsequent flaw detection, and is a data source of the whole detection system. The method comprises the steps of capturing a clear image of the surface of an optical film with a proper frame rate by using a high-resolution and high-precision industrial camera 111, meeting the requirement of detection on image details, providing a high-quality original image data source for subsequent flaw analysis, selecting optical lenses 112 with different focal lengths and apertures according to different requirements of detection scenes, adapting to the industrial camera 111, ensuring that the imaging field of view and definition meet detection standards, and enabling an illumination system 113 to comprise a plurality of types of light sources, such as uniform surface light sources, annular light sources and the like. By reasonably arranging and adjusting parameters such as brightness, angle, color and the like of the light source, sufficient and uniform illumination conditions are provided for the optical film, and the influence of shadows and reflection on the image quality is reduced, so that the photographed image can clearly show the real condition of the surface of the optical film.
The data transmission device 120 is a data cable 121, and is used for stably and rapidly transmitting the image data acquired by the imaging device to the data processing server, so that the high efficiency and accuracy of data transmission are ensured, and the data transmission device is a bridge for connecting data acquisition and processing links. The data cable 121 adopts a high-speed and stable data cable, such as an optical fiber, a high-speed network cable and the like, and transmits the image data acquired by the industrial camera to a hardware device for subsequent processing in real time, so that the continuity and timeliness of the detection flow are ensured.
In some embodiments of the present application, the data transmission device uses data cable devices such as optical fibers and network cables to perform data transmission, and in other embodiments of the present application, the data transmission mode further includes a network switch, and the data is transmitted by adopting a network transmission mode, which is not limited herein.
The server 130 includes a processor 131 and a memory and storage device 132, and performs complex computation processing on the transmitted image data, which is a core arithmetic unit of the entire system. The processor 131 is a high-performance central processing unit or a graphics processor, and for complex image data calculation tasks, the detection efficiency can be improved, the detection time can be reduced, the storage device 132 is used for temporarily storing the image data being processed, intermediate calculation results and the like, ensuring that the data reading and writing speed can keep up with the operation speed of the processor, and meanwhile, storing a large amount of historical detection data, training model data, detection result data and the like for a long time, so that the subsequent data analysis is convenient.
The following describes a method for detecting surface flaws of an optical film according to an embodiment of the present application:
Referring to fig. 2, a flow chart of a method for detecting surface defects of an optical film according to an embodiment of the application is shown, and the method can be applied to the system architecture shown in fig. 1, and includes the following steps:
s201, acquiring an edge detection image;
Firstly, an imaging device, such as an industrial camera, is matched with a proper optical lens and an illumination system to shoot the optical film, so as to obtain an original image of the optical film. And then, processing the original image by using a Canny edge detection algorithm, and highlighting the edge of the object by identifying characteristics such as pixel gray change and the like in the image so as to obtain an edge detection image.
In some embodiments of the present application, the original image is processed by using a Canny edge detection algorithm, and in other embodiments of the present application, the original image may be processed by using an image processing algorithm such as a Laplacian edge detection algorithm, which is not limited herein.
According to the technical steps, the original image of the optical film is subjected to an edge detection algorithm, so that the original complex image which is difficult to directly analyze flaws is converted into the image with the obvious edge information, an image base is provided for subsequent operation, and the detection accuracy is improved.
S202, carrying out connected domain segmentation in the edge detection image to obtain connected domains;
In the edge detection image, firstly, scanning image pixel points, judging which pixels belong to defective pixel points according to gray values of the pixel points, classifying the defective pixel points into a group, gradually marking and distinguishing different connected domains, and finally dividing the whole image into independent connected domains by continuously traversing all pixels of the image.
In some embodiments of the present application, whether the pixel belongs to the defective pixel is determined by the gray value of the pixel, and in other embodiments of the present application, whether the pixel belongs to the defective pixel may also be determined by the gradient feature or other features of the pixel, which is not limited herein.
According to the technical steps, the connected areas are divided according to the gray level characteristics of the pixel points, so that the image which is originally presented by the edges is further refined into different connected areas, a more targeted object is provided for the follow-up accurate analysis of the characteristics of each area, accurate judgment of flaws and other operations, and the detection precision is improved.
S203, calculating shape characteristics of the connected domain;
And for each connected domain, the shape characteristics of the connected domain are obtained by applying a corresponding mathematical algorithm and a geometric calculation method. For example, the degree of circularity of the connected domain is calculated by a specific formula, the degree of similarity with the circularity is measured, the degree of rectangle is calculated by a related algorithm to see the condition that the connected domain is close to the rectangle, and the length-width ratio is calculated to know the proportional relation between the length and the width of the connected domain, so that the key characteristic data of each connected domain in terms of shape are obtained.
In some embodiments of the present application, the shape features of the connected domain include circularity, rectangularity, and aspect ratio, and in other embodiments of the present application, the shape features of the connected domain may further include parting dimensions, etc., without limitation.
According to the technical steps, through calculating the shape characteristics of the connected domains, different connected domains can be described and distinguished from the geometric form, the similarity between the connected domains can be conveniently compared, important basis is provided for accurate combination of similar connected domains, judgment of flaw types and other operations, and improvement of flaw detection accuracy and efficiency is facilitated.
S204, judging whether each two connected domains are similar connected domains or not;
If the two connected domains are similar connected domains, the following step S205 is performed;
If one connected domain and all other connected domains are dissimilar connected domains, the following step S207 is performed;
For each connected domain, selecting every two connected domains one by one, extracting shape characteristics of the two connected domains, comparing whether the shapes are similar or not according to a preset difference range, for example, whether the circularity difference is within a preset circularity difference threshold value range, and judging whether the distance between the two connected domains is smaller than a preset distance threshold value or not under the condition that the shapes of the two connected domains are similar, if the distance is smaller than the preset distance threshold value, judging that the two connected domains are similar connected domains, executing the following step S205 to combine the similar connected domains into one connected domain, and if one connected domain and all other connected domains do not meet the requirements of the similar connected domains, judging that the one connected domain is a dissimilar connected domain, executing the following step S207 to add the dissimilar connected domain into the connected defect domain.
In some embodiments of the present application, the distance between the centers of the two connected domains may be calculated after determining the center of the connected domain by a gravity center method, and in other embodiments of the present application, the distance between the two connected domains may be determined by a method of calculating the distance between two pixels closest to the two connected domains, and the like, which is not limited herein.
The technical steps distinguish similarity or not by comparing the shape characteristics and the distance of the connected domains, so that the connected domains can be combined or processed in a targeted manner later, and the defect that the number, the type and other characteristics of the defects are wrongly judged due to uneven distribution of the internal characteristics of the defects is avoided, thereby wrongly dividing the connected domains and being beneficial to improving the accuracy of processing the connected domains in defect detection.
S205, merging the similar connected domains into a merged connected domain;
when the two connected domains are judged to be similar connected domains, the operation is carried out through an image region merging algorithm, such as selecting one pixel in one connected domain as a starting point, and then adding the pixels in the other connected domain to the region where the starting point is located one by one, so that merging is achieved, and merging operation is completed.
In some embodiments of the present application, the combination of similar connected domains into one connected domain uses the reverse effect of the region growing method, and in other embodiments of the present application, the combination of similar connected domains into one connected domain may also use an image combination algorithm such as expansion and combination of complex screening operations, which is not limited herein.
By combining similar connected domains, the condition that a plurality of connected domains are divided by the same flaw due to uneven distribution of internal characteristics of the flaw is avoided, and the accuracy of operations such as flaw type matching is improved.
S206, calculating to obtain gray value distribution characteristics and gradient change characteristics of the combined connected domain, and inputting the combined gray value distribution and the combined gradient change characteristics into a single flaw characteristic model to obtain a combined single flaw error value;
Specifically, the single-flaw feature model is obtained by training a preset neural network by using a plurality of groups of historical gray value distribution features, historical gradient change features and single-flaw error values finished by corresponding marks, and is used for outputting the single-flaw error values according to an input group of gray value distribution features and historical gradient change features.
Firstly, corresponding algorithm is used for counting gray value distribution characteristics and gradient change characteristics of pixels in a combined connected domain, such as gray average value and gray median value are calculated to serve as gray distribution characteristics, and meanwhile a Sobel operator is adopted to calculate gradient change characteristics. And then inputting the feature data into a single flaw feature model trained by historical data in advance, and finally outputting a combined single flaw error value through model internal operation.
In some embodiments of the present application, the gray scale distribution features are gray scale mean and gray scale median, and in other embodiments of the present application, the gray scale distribution features may also include gray scale mode, gray scale range, etc., without limitation.
In some embodiments of the present application, the Sobel operator is used to calculate the gradient change feature, and in other embodiments of the present application, the gradient change feature may be calculated by using the Prewitt operator, which is not limited herein.
According to the technical steps, the difference degree between the combined connected domain and the single defect is evaluated through extracting the characteristics and by means of model operation, so that error combination of the connected domains with different defects is avoided, if the single defect error value is large, the similar connected domains are judged not to be the same defect, and the defect detection accuracy is improved.
S207, splitting a merging connected domain with the merging single defect error larger than a preset single defect error threshold into an original similar connected domain, wherein the defect connected domain further comprises a merging connected domain with the merging single defect error not larger than the preset single defect error threshold and a dissimilar connected domain;
Under the condition that the combined single-defect error value obtained by combining the connected domains is larger than a preset single-defect error threshold value, the combined connected domains are not in accordance with the requirement, and are restored and split into the original similar connected domains according to the previously recorded similar connected domain division condition, and the original similar connected domains are taken as defect connected domains together with the combined connected domains with the error value not exceeding the threshold value and the dissimilar connected domains which cannot form the similar connected domains with all other connected domains.
The technical steps are reasonably split through error comparison, so that the real flaw connected domain can be accurately screened, flaw judgment errors caused by error combination are avoided, and accuracy of defining flaws on the surface of the optical film is improved.
S208, constructing a flaw type feature library, and performing flaw type matching on all flaw connected domains in the edge detection image.
Firstly, collecting various known optical film flaw samples, extracting characteristic data of a sample connected domain, and associating corresponding flaw types so as to construct a flaw type characteristic library. And then, aiming at the flaw connected domain in the edge detection image, the related characteristic data are extracted, and are compared and matched with the data in the characteristic library, so that the flaw type is determined.
By constructing and matching the feature library, the type of the flaw connected domain can be accurately judged by referring to the existing sample data, the precision and the efficiency of flaw detection classification of the optical film are improved, and the quality of the optical film product can be better controlled.
In the above embodiment, the edge detection image is divided into a plurality of connected domains, the shape features of the connected domains are calculated and compared with the similarity, the connected domains with similar shapes are combined, the gray scale and gradient feature input model of the combined connected domains are calculated to obtain the error value, the connected domains are split into the original connected domains or the combined connected domains are reserved according to the error value, and the matching types of all the flaw connected domains are performed after the feature library is constructed. Through multi-feature analysis and model evaluation, the flaw connected domain is identified, flaw classification is carried out, the misjudgment rate is reduced, and the precision of flaw detection of the optical film is improved.
In some embodiments, special conditions are encountered during the detection of defects on the surface of the optical film, for example, when the defects on the surface of the optical film are too many or some defects are too dense, special treatment is required to be performed on the optical film, and the method for detecting the defects on the surface of the optical film can perform special marking on the optical film with too many defects or more defects at a short distance according to the distance and the density between the defects on the surface of the optical film. Fig. 3 is a schematic flow chart of another method for detecting surface defects of an optical film according to an embodiment of the present application, which can be used in the system architecture shown in fig. 1, and includes the following steps:
s301, acquiring an edge detection image;
S302, sequentially selecting each pixel point from the upper left corner of the edge detection image as a central pixel point according to the row priority order;
For edge detection images, the image is considered as a matrix form composed of a plurality of pixels. Starting from the first pixel point at the upper left corner of the image, each pixel point is sequentially taken as a central pixel point in the order of column by column from left to right and row by row from top to bottom, and preparation is made for carrying out operations such as calculating local area characteristics and the like on each pixel point.
Through selecting the central pixel point according to a specific sequence, the technical steps can regularly and non-missed process each pixel point in the image, and the related characteristics are conveniently and uniformly calculated.
S303, for a current central pixel point, creating an empty data set, and storing pixel gray values in an area covered by sliding of a window with a preset size into the data set by taking the current central pixel point as a center;
When the current central pixel point is selected, an empty data set is initialized, the window is made to slide on the image by taking the current central pixel point as the center according to the preset window size (such as3×3,5×5 and the like), gray values corresponding to all pixel points in the coverage area of the window are sequentially extracted, and then the gray values are sequentially stored in the empty data set created before.
According to the technical steps, the pixel gray values of the coverage area of the window are collected and stored into the data set, so that statistics such as mean values, standard deviations and the like can be accurately calculated based on the data, effective numerical basis is provided for judging flaws, carrying out connected domain segmentation and the like, and flaw detection accuracy is improved.
S304, calculating the gray average value of the local area of the current center pixel point by using a first formula;
Specifically, in the edge detection image, a coordinate axis is established by taking an upper left corner fixed point as an origin, a direction from the upper left corner fixed point to the lower left corner fixed point is an x axis, a direction from the upper left corner fixed point to the upper right corner fixed point is a y axis, the coordinate axis plane is divided into square grids with a pixel unit as a size, and the coordinate position of the current center pixel point in the coordinate axis is (i, j). The first formula is: Wherein, And the size of a window with a preset size is m multiplied by n for the gray average value of the local area of the current central pixel point.
For the calculation of local region features, it is necessary to determine a window range centered on the current pixel point, and the form of integral domain calculation in the formula involved here, such asAndIn order to accurately define a window region centered on a pixel (i, j).
In the image coordinate system, when we want to construct a local window with size of m×n with a pixel point (i, j) as the center, we need to accurately determine the start and end positions of the window. UsingTo the point ofThis form (and the same applies to the y-direction) ensures that the window is centered on (i, j). When m is an odd number (which is a common window size choice in image processing because an odd number can guarantee an explicit center pixel), this calculation allows to determine precisely the window range, with the window center exactly at (i, j).
When the local area calculation of pixel points is carried out on the whole image, the calculation form can ensure that a relatively consistent processing mode can be provided at the edge of the image, and although the window part exceeds the boundary of the image at the edge of the image, the calculation form can ensure the continuity and accuracy of the calculation through reasonable boundary processing (such as neglecting the part exceeding the boundary or adopting a specific filling mode).
By defining the gray average value to be calculated in this local area, the local gray feature can be captured better. In image processing, many features (e.g., edges, textures, etc.) are often presented in localized areas, and such localized calculations help to accurately discover and describe the features.
By such an integration domain selection based on a central pixel point, boundary effects can be avoided or reduced to some extent. Inaccurate computation results may occur at the edges of the image or at the junctions of different feature areas if global or inappropriate integration domain selection is employed. The integral domain selection of the local areas enables the calculation of each local area to be relatively independent, and mutual interference among different areas is reduced.
S305, calculating the gray standard deviation of the local area of the current center pixel point by using a second formula;
Specifically, the second formula is: Wherein sigma is the gray standard deviation of the local area of the current center pixel point.
The second formula is based on the gray average value calculated from the local area when calculating the standard deviationThe calculation of the standard deviation is closely related to the gray level distribution of the local area, and the degree of dispersion of the pixel gray level values in the local area can be reflected better.
The second formula, which is similar to the first formula, is calculated based on the local area and helps describe the change of the pixel gray level in the local area. In image processing, the gray standard deviation may reflect features such as the texture complexity of the image. By means of the local calculation, local texture features of the image can be more accurately characterized.
The standard deviation is calculated in a local area, and the influence of noise can be suppressed to some extent. If the standard deviation is calculated over the whole image, the noise point may cause a larger disturbance to the result. By local area calculation, only noise in the local area can affect the result, and normal pixels in the local area can balance the influence of noise to a certain extent, so that a more reliable gray standard deviation result is obtained.
In the two steps, the gray average value and the gray standard deviation are calculated through the first formula and the second formula, so that the interference of noise pixels in the local area on the result can be reduced, and the accuracy of determining the threshold value and the connected domain segmentation based on the gray average value and the gray standard deviation in the follow-up process is improved.
S306, determining a flaw judgment threshold value through a gray average value and a gray standard deviation;
After the gray average value and the gray standard deviation of the local area of each pixel point are obtained, determining a flaw judgment threshold value according to the gray average value and the gray standard deviation. For example, the average value plus several times the standard deviation is used as the flaw determination threshold value.
In some embodiments of the present application, the defect determination threshold is obtained by calculating a weighted average of the gray average and the gray standard deviation, and in other embodiments of the present application, the defect determination threshold may be obtained by a machine learning method, by training a model using known defect and non-defect samples, and letting the model output the threshold according to the input average and the gray standard deviation, etc., which is not limited herein.
The threshold value is determined by utilizing the gray average value and the standard deviation, so that normal pixel points and pixel points possibly with flaws can be clearly distinguished, a quantized standard is provided for accurately screening out flaw pixel points subsequently, and the misjudgment condition is reduced.
S307, connecting adjacent pixel points in all the pixel points of the edge detection image, wherein the gray average value of the adjacent pixel points is larger than the flaw judgment threshold value, so as to obtain a connected domain;
Specifically, all pixels in the edge detection image are traversed, and for each pixel, pixels adjacent thereto (e.g., vertically, laterally, etc.) are viewed. And comparing the gray average value with a determined flaw judgment threshold value, and if the gray average value of the adjacent pixel points exceeds the threshold value, connecting the adjacent pixel points meeting the conditions through a corresponding algorithm to form a whole, namely obtaining a connected domain.
According to the technical steps, the defective pixel points are judged according to the threshold value and are connected with adjacent defective pixel points in the detection image, so that the area possibly with defects can be segmented from the image to serve as the connected areas, and the characteristics of the connected areas can be conveniently and further analyzed.
S308, calculating shape characteristics of the connected domain;
S309, judging whether each two connected domains are similar connected domains or not;
If the two connected domains are similar connected domains, the following step S205 is performed;
If one connected domain and all other connected domains are dissimilar connected domains, the following step S207 is performed;
s310, merging the similar connected domains into a merged connected domain;
s311, calculating to obtain a combined gray value distribution characteristic and a combined gradient change characteristic of the combined connected domain, and inputting the combined gray value distribution characteristic and the combined gradient change characteristic into a single flaw characteristic model to obtain a combined single flaw error value;
s312, splitting the merging connected domain with the merging single defect error larger than the preset single defect error threshold into an original similar connected domain, and taking the original similar connected domain as a defect connected domain, wherein the defect connected domain also comprises merging connected domains with the merging single defect error not larger than the preset single defect error threshold and dissimilar connected domains;
S313, collecting a plurality of optical film flaw samples of known types, and extracting sample characteristic data of sample connected domains of each optical film flaw sample;
Specifically, the sample characteristic data includes a sample gray value distribution characteristic, a sample gradient change characteristic, a sample circularity, and a sample rectangular degree.
Collecting known optical film flaw samples of different types such as scratches, spots, holes and the like, extracting characteristic data of connected domains in each sample by applying a corresponding algorithm, for example, calculating gray value distribution characteristics, gradient change characteristics, circularity and rectangularity of the connected domains, and obtaining sample characteristic data of each sample connected domain in an omnibearing manner.
According to the technical steps, the feature data of the sample connected domain are extracted, so that the feature information corresponding to various flaws can be accumulated, a data base is provided for constructing a flaw type feature library, and the unknown flaw types can be accurately matched.
S314, constructing a flaw type feature library;
When the flaw type feature library is constructed, a proper data storage structure, such as a database table or a file with a specific format, is firstly constructed, then collected and extracted sample feature data are subjected to one-to-one correspondence according to the sample flaw types of the corresponding sample connected domains, and are stored in the created storage structure in a key value pair or record mode to finish the associated storage, and the flaw type feature library is constructed.
According to the technical steps, the sample characteristic data and the flaw types are stored in a correlated mode, so that the type of an unknown flaw can be judged according to characteristic comparison and search in subsequent detection.
S315, calculating flaw characteristic data of flaw connected domains;
specifically, the flaw characteristic data includes flaw gray value distribution characteristics, flaw gradient change characteristics, flaw circularity, and flaw rectangular degree.
According to the technical steps, the characteristic data of the flaw connected domain is calculated, so that the follow-up flaw type can be compared and matched with the data in the flaw type characteristic library, and the flaw type to which the flaw connected domain belongs can be accurately judged.
S316, performing similarity calculation on the flaw characteristic data and each sample characteristic data in the flaw type characteristic library to obtain a similarity numerical group;
And calculating the flaw characteristic data of the flaw connected domain with each sample characteristic data in the flaw type characteristic library in sequence according to a similarity algorithm, obtaining a corresponding similarity value every time of comparison, and summarizing the values to obtain a similarity value group containing a plurality of similarity values.
In some embodiments of the present application, the similarity algorithm used for performing the similarity calculation is a euclidean distance algorithm, and in other embodiments of the present application, the similarity calculation may also be performed using a similarity algorithm such as a cosine similarity algorithm, which is not limited herein.
According to the technical steps, the similarity value sets are calculated, so that the similarity degree of the flaw connected domain and the sample can be measured according to the values, and then the best matched sample is found out to judge the flaw type corresponding to the flaw connected domain.
S317, matching the defect type of the defect connected domain as the maximum defect type;
After the similarity value group is obtained, comparing each similarity value in the group to obtain the maximum similarity value, and judging the flaw type of the flaw connected domain as the flaw type of the sample corresponding to the maximum similarity value, namely the maximum flaw type.
The above technical steps enable the defect connected domain to be accurately classified by matching the maximum defect type, and the defect type to which the defect connected domain belongs is clarified.
S318, marking the flaw connected domain as an unknown connected domain under the condition that all similarity data in the similarity data set are lower than a preset minimum similarity threshold value;
After the similarity data set is obtained, comparing each similarity value in the set to obtain a maximum similarity value, if the maximum similarity value is lower than a preset minimum similarity threshold value, indicating that the sample features in the flaw connected domain and the feature library are too large to be matched with the existing types accurately, and marking the flaw connected domain as an unknown type connected domain at the moment.
According to the technical steps, the unknown type connected domain is marked by reasonably setting the threshold value, so that special flaw situations which are not covered in the feature library can be distinguished, further analysis and research of the new situations are facilitated, the flaw type feature library is continuously perfected, and the comprehensiveness of identifying various flaws is improved.
S319, calculating the area of the flaw communicating region;
and determining all pixel points contained in the flaw connected domain, counting the number of the pixel points, wherein the counted number of the pixel points is equal to the area size of the flaw connected domain because each pixel can occupy a certain unit area (for example, the area of a single pixel is set to be 1) in the image.
In some embodiments of the present application, the pixel calculation method is used to calculate the area of the defective connected domain, and in other embodiments of the present application, the integration method may be used to calculate the area of the next connected domain, which is not limited herein.
The technical steps provide a basis for evaluating the influence degree of the flaws on the optical film by calculating the areas of the flaw communicating areas, and provide a data basis for the follow-up operations such as grading treatment of the flaws according to factors such as area size.
S320, judging the flaw grade of the flaw connected domain by a preset grade dividing threshold value;
and obtaining the area, the flaw gray level average value and the flaw length-width ratio data of the flaw connected domain, and comparing the area, the flaw gray level average value and the flaw length-width ratio data with corresponding grading thresholds respectively, for example, the area reaches a certain range, the gray level average value is in a specific interval, the length-width ratio meets corresponding conditions and the like, and determining which flaw grade the flaw connected domain meets after comprehensive judgment.
The technical steps judge the flaw grade according to the multi-index comparison threshold value, so that the severity degree of flaws can be quantitatively distinguished, and the scientificity and rationality of flaw management and control of the optical film are effectively improved.
S321, determining the center position of the flaw connected domain as the center of the connected domain;
And marking all pixel points belonging to the connected domain for the flaw connected domain, respectively counting coordinate values of the pixel points in the horizontal direction and the vertical direction, taking the average value of the coordinate values in the horizontal direction as an abscissa and the average value of the coordinate values in the vertical direction as an ordinate, and determining the position of the coordinate point as the center of the connected domain.
In some embodiments of the present application, the centroid method is used to determine the center position of the defect connected domain, and in other embodiments of the present application, the bounding box center method may be used to determine the center position of the defect connected domain, which is not limited herein.
S322, calculating the center distance of each two connected domain centers and the center density of the connected domain of the edge detection image, calculating the distance between each two connected domain centers for each determined connected domain center, substituting the coordinates into a calculated value through a formula between two points, and dividing the number of the connected domain centers by the total area of the edge detection image to measure the distribution condition of the connected domain centers in unit area.
The technical steps are that the distribution density degree and the mutual position relation of flaws in an image can be mastered by calculating the distance and the density, and the flaw distribution condition of the surface of the optical film is obtained.
S323, marking the optical film corresponding to the edge detection image as a high-flaw optical film when the short distance proportion value in the center distance of the connected domain in the edge detection image is larger than a preset short distance proportion threshold value or the center density in the connected domain is larger than a preset maximum density threshold value.
Specifically, the short-distance proportional value is a proportional value of the center distance of the connected domain smaller than a preset distance threshold value to the center distances of all the connected domains in the edge detection image.
And counting the ratio of short distances in the center distance of the connected domain in the edge detection image, calculating a short-distance proportion value, calculating the center density of the connected domain at the same time, comparing the two values with a preset short-distance proportion threshold value and a preset maximum density threshold value respectively, and marking the corresponding optical film as a high-flaw optical film under the condition that the short-distance proportion value is larger than the preset short-distance proportion threshold value or the center density is larger than the maximum density threshold value.
By setting the threshold value for comparison and judgment, the optical films with dense flaw distribution or more flaws can be rapidly screened, special treatment on the high-flaw optical films is facilitated, and the quality control efficiency of the whole optical film product is improved.
Steps S301, S308-S312 are similar to steps S201, S203-S207 in the embodiment shown in fig. 2, and the descriptions in steps S201, S203-S207 will be referred to, and will not be repeated here.
According to the embodiment of the application, firstly, an edge detection image is obtained, connected domains are divided, the local area characteristic determination threshold of each pixel point is calculated to divide the connected domains, so that possible flaw areas can be accurately positioned, secondly, the shape characteristics of the connected domains are compared, similar connected domains are combined, the input model evaluation of the combined connected domain characteristics is calculated, the flaw types are matched according to error splitting or reserving, a characteristic library is built again, the similarity is compared, the flaw types are accurately identified, the classification accuracy is improved, the flaw grade is judged by calculating the characteristics such as the flaw connected domain area, the center distance and the density are determined to distinguish the high flaw optical film, and therefore quantitative evaluation and distribution analysis can be carried out on flaws, the misjudgment rate is effectively reduced, the quality of optical film products is guaranteed, and the precision of flaw detection is improved.
An exemplary optical film surface flaw detection system 400 provided in accordance with an embodiment of the present application is described below. Fig. 4 is a schematic diagram of an exemplary hardware structure of an optical film surface flaw detection system 400 according to an embodiment of the present application.
In some embodiments, the optical film surface flaw detection system 400 includes a computer device. The computer device includes a processor, a memory, and a network interface connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. Data of the computer device the library is used to store data. The network interface of the computer device is used for communicating with other terminals or servers outside through network connection. In some embodiments, the network interface may be a wired network interface, and in some embodiments, the network interface may also be a wireless network interface. The computer program is executed by a processor to implement the method in the embodiment of the application.
It will be appreciated by persons skilled in the art that the architecture shown in fig. 4 is merely a block diagram of some of the architecture relevant to the present inventive arrangements and is not limiting as to the computer device to which the present inventive arrangements are applicable, and that a particular computer device may include more or fewer components than shown, or may combine some of the components, or have a different arrangement of components.
While the application has been described in detail with reference to the foregoing embodiments, it will be understood by those skilled in the art that the foregoing embodiments may be modified or equivalents may be substituted for some of the features thereof, and that the modifications or substitutions do not depart from the spirit of the embodiments.
As used in the above embodiments, the term "when..is interpreted as meaning" if..or "after..or" in response to determining..or "in response to detecting..is" depending on the context. Similarly, the phrase "when determining..or" if (a stated condition or event) is detected "may be interpreted to mean" if determined.+ -. "or" in response to determining.+ -. "or" when (a stated condition or event) is detected "or" in response to (a stated condition or event) "depending on the context.
In the above embodiments, it may be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, produces a flow or function in accordance with embodiments of the present application, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a computer network, or other programmable apparatus. The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center by a wired (e.g., coaxial cable, fiber optic, digital subscriber line), or wireless (e.g., infrared, wireless, microwave, etc.). The computer readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. that contains an integration of one or more available media. The usable medium may be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid state disk), etc.
Those of ordinary skill in the art will appreciate that implementing all or part of the above-described method embodiments may be accomplished by a computer program to instruct related hardware, the program may be stored in a computer readable storage medium, and the program may include the above-described method embodiments when executed. The storage medium includes a ROM or a random access memory RAM, a magnetic disk or an optical disk, and other various media capable of storing program codes.

Claims (10)

1. A method for detecting surface flaws of an optical film, comprising:
acquiring an edge detection image;
Carrying out connected domain segmentation in the edge detection image to obtain connected domains;
calculating shape characteristics of the connected domain, wherein the shape characteristics comprise circularity, rectangularity and length-width ratio;
Comparing the shape characteristics of every two connected domains to judge whether the shape characteristics are similar, wherein the shape characteristics are similar, namely that the circularity difference value is in a preset circularity difference value threshold range, the rectangular degree difference value is in a preset rectangular degree difference value threshold range and the length-width ratio difference value is in a preset length-width ratio difference value threshold range;
merging the similar connected domains into a merged connected domain under the condition that the two connected domains are similar connected domains, wherein the similar connected domains are two connected domains with similar shape characteristics and a distance smaller than a preset distance threshold value;
The method comprises the steps of calculating a combined gray value distribution characteristic and a combined gradient change characteristic of the combined connected domain, inputting the combined gray value distribution characteristic and the combined gradient change characteristic into a single flaw characteristic model to obtain a combined single flaw error value, wherein the single flaw characteristic model is obtained by training a preset neural network by using a plurality of groups of historical gray value distribution characteristics, historical gradient change characteristics and single flaw error values which are marked correspondingly;
Splitting the merged connected domain with the merged single defect error larger than a preset single defect error threshold into the original similar connected domain as a defect connected domain, wherein the defect connected domain also comprises the merged connected domain with the merged single defect error not larger than the preset single defect error threshold and a dissimilar connected domain, and the dissimilar connected domain is a connected domain which cannot form the similar connected domain with all other connected domains in the edge detection image;
and constructing a flaw type feature library, and performing flaw type matching on all flaw connected domains in the edge detection image.
2. The method according to claim 1, wherein the performing connected domain segmentation in the edge detection image to obtain the connected domain specifically includes:
calculating the gray average value and gray standard deviation of each pixel local area in the edge detection image, wherein the pixel local area is an area which is covered by sliding according to a window with a preset size by taking the pixel as the center;
determining a flaw judgment threshold value through the gray average value and the gray standard deviation;
And connecting adjacent pixel points in all the pixel points of the edge detection image, wherein the gray average value of the adjacent pixel points is larger than the flaw judgment threshold value, so as to obtain a connected domain.
3. The method according to claim 2, wherein the calculating the gray average value and the gray standard deviation of the local area of each pixel in the edge detection image specifically includes:
Sequentially selecting each pixel point from the upper left corner of the edge detection image as a central pixel point according to the row priority order;
Creating an empty data set for a current central pixel point, and storing pixel gray values in an area covered by sliding a window with a preset size into the data set by taking the current central pixel point as a center;
calculating the gray average value of the local area of the current center pixel point by using a first formula;
wherein, the first formula is:
calculating the gray standard deviation of the local area of the current center pixel point by using a second formula;
wherein, the second formula is:
Wherein, And in the edge detection image, a coordinate axis is established by taking an upper left corner fixed point as an origin, the direction from the upper left corner fixed point to the lower left corner fixed point is an x axis, the direction from the upper left corner fixed point to the upper right corner fixed point is a y axis, the coordinate axis plane is divided into square grids with a pixel unit, and the coordinate position of the current central pixel point in the coordinate axis is (i, j).
4. The method according to claim 1, wherein the constructing a defect type feature library performs defect type matching on all defect connected domains in the edge detection image, and specifically includes:
collecting a plurality of known optical film flaw samples, and extracting sample characteristic data of a sample communicating region aiming at the sample communicating region of each optical film flaw sample, wherein the sample characteristic data are sample gray value distribution characteristics, sample gradient change characteristics, sample circularity and sample rectangular degree of the sample communicating region;
The sample characteristic data and the sample flaw types of the corresponding sample connected domains are stored in a correlated mode, and a flaw type characteristic library is constructed;
Calculating flaw characteristic data of the flaw connected domain, wherein the flaw characteristic data comprises flaw gray value distribution characteristics, flaw gradient change characteristics, flaw circularity and flaw rectangular degree;
performing similarity calculation on the flaw characteristic data and each sample characteristic data in the flaw type characteristic library to obtain a similarity value group;
And taking the maximum flaw type as the flaw type matched with the flaw connected domain, wherein the maximum flaw type is the flaw type of the sample connected domain corresponding to the maximum similarity data in the similarity value group.
5. The method of claim 4, further comprising marking the fault connected domain as an unknown type connected domain if all of the similarity data in the similarity data set is below a preset minimum similarity threshold after performing a similarity calculation on the fault signature data and each of the sample signature data in the fault type signature library to obtain a similarity value set.
6. The method of claim 4, further comprising, after said matching said defect type of said defect connected domain is said maximum defect type:
Calculating the area of the flaw communicating region;
And judging the flaw grade of the flaw communicating domain according to the flaw communicating domain area, the flaw gray level average value in the flaw gray level distribution characteristic and the flaw length-width ratio by a preset grade dividing threshold value.
7. The method according to claim 1, wherein after splitting the merged connected domain having the merged single defect error greater than a preset single defect error threshold into the original similar connected domain, the method further comprises:
Determining the center position of the flaw connected domain as the center of the connected domain;
Calculating the center distance of the connected domain between the centers of every two connected domains and the center density of the connected domain of the edge detection image;
And marking the optical film corresponding to the edge detection image as a high-flaw optical film under the condition that a short-distance proportion value in the center distance of the connected domain in the edge detection image is larger than a preset short-distance proportion threshold or the center density of the connected domain is larger than a preset maximum density threshold, wherein the short-distance proportion value is a proportion value of the center distance of the connected domain smaller than the preset distance threshold to the center distance of all the connected domains in the edge detection image.
8. An optical film surface flaw detection system comprising one or more processors and a memory coupled to the one or more processors, the memory for storing computer program code comprising computer instructions that the one or more processors invoke to cause the optical film surface flaw detection system to perform the method of any of claims 1-7.
9. A computer program product comprising instructions which, when run on an optical film surface flaw detection system, cause the optical film surface flaw detection system to perform the method of any of claims 1-7.
10. A computer readable storage medium comprising instructions which, when run on an optical film surface flaw detection system, cause the optical film surface flaw detection system to perform the method of any of claims 1-7.
CN202510004844.1A 2025-01-02 2025-01-02 Method, system, product and medium for detecting surface flaws of optical film Active CN119919387B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202510004844.1A CN119919387B (en) 2025-01-02 2025-01-02 Method, system, product and medium for detecting surface flaws of optical film

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202510004844.1A CN119919387B (en) 2025-01-02 2025-01-02 Method, system, product and medium for detecting surface flaws of optical film

Publications (2)

Publication Number Publication Date
CN119919387A true CN119919387A (en) 2025-05-02
CN119919387B CN119919387B (en) 2025-07-29

Family

ID=95512580

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202510004844.1A Active CN119919387B (en) 2025-01-02 2025-01-02 Method, system, product and medium for detecting surface flaws of optical film

Country Status (1)

Country Link
CN (1) CN119919387B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN120823207A (en) * 2025-09-17 2025-10-21 安徽墙煌科技股份有限公司 A method and system for detecting appearance defects of thermal insulation decorative panels based on image recognition

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5787194A (en) * 1994-11-08 1998-07-28 International Business Machines Corporation System and method for image processing using segmentation of images and classification and merging of image segments using a cost function
CN112884792A (en) * 2021-02-02 2021-06-01 青岛海信医疗设备股份有限公司 Lung image segmentation method and device, electronic equipment and storage medium
CN113449620A (en) * 2021-06-17 2021-09-28 深圳思谋信息科技有限公司 Table detection method, device, equipment and medium based on semantic segmentation
CN116109637A (en) * 2023-04-13 2023-05-12 杭州深度视觉科技有限公司 System and method for detecting appearance defects of turbocharger impeller based on vision
CN117252861A (en) * 2023-10-31 2023-12-19 西安芯晖检测技术有限公司 A method, device and system for detecting wafer surface defects
CN117314924A (en) * 2023-11-30 2023-12-29 湖南西欧新材料有限公司 Image feature-based electroplated product surface flaw detection method
CN118334030A (en) * 2024-06-14 2024-07-12 张家港梦康生活家居科技有限公司 A polyurethane floor mat molding detection method and system
CN118446955A (en) * 2024-01-30 2024-08-06 章鱼博士智能技术(上海)有限公司 Method and device for detecting surface mark defects of lithium battery pole piece and storage medium
CN118587187A (en) * 2024-06-07 2024-09-03 东莞市锦凌电子有限公司 A method for visual defect detection of automobile connectors
CN118781112A (en) * 2024-09-10 2024-10-15 宝鸡世邦钛制品有限公司 A quality inspection method for metal composite materials based on image processing
CN119205720A (en) * 2024-10-30 2024-12-27 西安交通大学医学院第二附属医院 Image-assisted grading detection method, storage medium and system for skin acne

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5787194A (en) * 1994-11-08 1998-07-28 International Business Machines Corporation System and method for image processing using segmentation of images and classification and merging of image segments using a cost function
CN112884792A (en) * 2021-02-02 2021-06-01 青岛海信医疗设备股份有限公司 Lung image segmentation method and device, electronic equipment and storage medium
CN113449620A (en) * 2021-06-17 2021-09-28 深圳思谋信息科技有限公司 Table detection method, device, equipment and medium based on semantic segmentation
CN116109637A (en) * 2023-04-13 2023-05-12 杭州深度视觉科技有限公司 System and method for detecting appearance defects of turbocharger impeller based on vision
CN117252861A (en) * 2023-10-31 2023-12-19 西安芯晖检测技术有限公司 A method, device and system for detecting wafer surface defects
CN117314924A (en) * 2023-11-30 2023-12-29 湖南西欧新材料有限公司 Image feature-based electroplated product surface flaw detection method
CN118446955A (en) * 2024-01-30 2024-08-06 章鱼博士智能技术(上海)有限公司 Method and device for detecting surface mark defects of lithium battery pole piece and storage medium
CN118587187A (en) * 2024-06-07 2024-09-03 东莞市锦凌电子有限公司 A method for visual defect detection of automobile connectors
CN118334030A (en) * 2024-06-14 2024-07-12 张家港梦康生活家居科技有限公司 A polyurethane floor mat molding detection method and system
CN118781112A (en) * 2024-09-10 2024-10-15 宝鸡世邦钛制品有限公司 A quality inspection method for metal composite materials based on image processing
CN119205720A (en) * 2024-10-30 2024-12-27 西安交通大学医学院第二附属医院 Image-assisted grading detection method, storage medium and system for skin acne

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
陈孝玉;李春利;: "基于连通域的图像文本自动定位", 微计算机信息, no. 28, 5 October 2009 (2009-10-05) *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN120823207A (en) * 2025-09-17 2025-10-21 安徽墙煌科技股份有限公司 A method and system for detecting appearance defects of thermal insulation decorative panels based on image recognition
CN120823207B (en) * 2025-09-17 2025-12-05 安徽墙煌科技股份有限公司 Thermal insulation decorative board appearance flaw detection method and system based on image recognition

Also Published As

Publication number Publication date
CN119919387B (en) 2025-07-29

Similar Documents

Publication Publication Date Title
CN114140679A (en) Defect fusion method, device, recognition system and storage medium
CN107230203A (en) Casting defect recognition methods based on human eye vision attention mechanism
CN119850602B (en) Photoelectric product detection method and system based on image processing
CN105973148A (en) Pen point appearance size standardization detection system based on machine vision
CN110334760B (en) Optical component damage detection method and system based on RESUnet
CN116993653B (en) Camera lens defect detection method, device, equipment, storage medium and product
CN119091236B (en) Ceramic packaging substrate detection method and system based on visual inspection and meta-learning
KR101782364B1 (en) Vision inspection method based on learning data
CN119919387B (en) Method, system, product and medium for detecting surface flaws of optical film
CN117011216A (en) Defect detection method and device, electronic equipment and storage medium
CN119715554A (en) Electric tricycle body spraying defect detection method and system based on machine vision
CN111968136A (en) Coal rock microscopic image analysis method and analysis system
CN118397248A (en) Constant volume method and system based on machine vision
CN117315250A (en) A method for semantic segmentation of laser stripes under multiple reflection interference
CN119323567B (en) Module lens dirt detection and glue line detection method
CN120471930A (en) Polarizer defect detection method and system based on deep learning
CN111507177B (en) Identification method and device for metering turnover cabinet
CN118505708B (en) Product repair system based on image reconstruction technology
CN119723200A (en) Defect type detection method and device, electronic device and storage medium
CN118261875A (en) Universal defect detection method, device and equipment based on visual language big model
CN117935246A (en) Instrument indication number recognition method and device based on deep learning technology
Chen et al. Machine vision based Vernier caliper reading technology research
CN120707560B (en) Automobile part defect detection method
CN120807488A (en) Crankshaft quality inspection method and system based on image data
CN119741554A (en) Defect type detection method and device, electronic device and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant