CN116152262B - Method for detecting appearance defects of ionic intermediate film - Google Patents
Method for detecting appearance defects of ionic intermediate film Download PDFInfo
- Publication number
- CN116152262B CN116152262B CN202310443995.8A CN202310443995A CN116152262B CN 116152262 B CN116152262 B CN 116152262B CN 202310443995 A CN202310443995 A CN 202310443995A CN 116152262 B CN116152262 B CN 116152262B
- Authority
- CN
- China
- Prior art keywords
- window area
- mask
- image block
- value
- mutation
- 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.)
- Active
Links
- 230000007547 defect Effects 0.000 title claims abstract description 29
- 238000000034 method Methods 0.000 title claims description 55
- 230000035772 mutation Effects 0.000 claims abstract description 77
- 238000001514 detection method Methods 0.000 claims abstract description 11
- 230000011218 segmentation Effects 0.000 claims description 17
- 238000004364 calculation method Methods 0.000 claims description 14
- 239000011229 interlayer Substances 0.000 claims description 7
- 239000005340 laminated glass Substances 0.000 description 4
- 238000004519 manufacturing process Methods 0.000 description 4
- 238000005286 illumination Methods 0.000 description 3
- 230000005540 biological transmission Effects 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000003708 edge detection Methods 0.000 description 1
- 238000001914 filtration Methods 0.000 description 1
- 239000011521 glass Substances 0.000 description 1
- 239000000463 material Substances 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000010606 normalization Methods 0.000 description 1
- 238000001228 spectrum Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/0002—Inspection of images, e.g. flaw detection
- G06T7/0004—Industrial image inspection
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01N—INVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
- G01N21/00—Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
- G01N21/84—Systems specially adapted for particular applications
- G01N21/88—Investigating the presence of flaws or contamination
- G01N21/8851—Scan or image signal processing specially adapted therefor, e.g. for scan signal adjustment, for detecting different kinds of defects, for compensating for structures, markings, edges
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T5/00—Image enhancement or restoration
- G06T5/20—Image enhancement or restoration using local operators
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/10—Segmentation; Edge detection
- G06T7/11—Region-based segmentation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/10—Segmentation; Edge detection
- G06T7/136—Segmentation; Edge detection involving thresholding
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01N—INVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
- G01N21/00—Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
- G01N21/84—Systems specially adapted for particular applications
- G01N21/88—Investigating the presence of flaws or contamination
- G01N21/8851—Scan or image signal processing specially adapted therefor, e.g. for scan signal adjustment, for detecting different kinds of defects, for compensating for structures, markings, edges
- G01N2021/8887—Scan or image signal processing specially adapted therefor, e.g. for scan signal adjustment, for detecting different kinds of defects, for compensating for structures, markings, edges based on image processing techniques
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/20—Special algorithmic details
- G06T2207/20021—Dividing image into blocks, subimages or windows
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/20—Special algorithmic details
- G06T2207/20048—Transform domain processing
- G06T2207/20056—Discrete and fast Fourier transform, [DFT, FFT]
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Life Sciences & Earth Sciences (AREA)
- Signal Processing (AREA)
- Health & Medical Sciences (AREA)
- Quality & Reliability (AREA)
- Chemical & Material Sciences (AREA)
- Analytical Chemistry (AREA)
- Biochemistry (AREA)
- General Health & Medical Sciences (AREA)
- Immunology (AREA)
- Pathology (AREA)
- Image Analysis (AREA)
Abstract
The invention relates to the technical field of image data processing, and provides an ionic intermediate film appearance defect detection method, which comprises the following steps: acquiring an ionic intermediate film image and an intermediate film spectrogram; obtaining a binary mask according to the intermediate film spectrogram, obtaining a direction mask according to the binary mask, and obtaining an airspace image and an image block according to the direction mask; obtaining a position influence weight value and a direction influence weight value of a direction mask, obtaining a comprehensive influence weight value of the direction mask according to the position influence weight value and the direction influence weight value of the direction mask, obtaining a local range of pixel points by the density difference of mutation points of two window areas in a airspace image, and obtaining the probability of occurrence of true scratches of each image block; and finishing the detection of the appearance defects of the ionic intermediate film according to the probability of occurrence of the true scratches. The invention can avoid the problem of false identification of the pseudo scratches caused by special textures on the surface of the ionic intermediate film under the traditional machine vision.
Description
Technical Field
The invention relates to the technical field of image data processing, in particular to an ionic intermediate film appearance defect detection method.
Background
The ionic intermediate film is a high-performance sandwich material, and is widely used in laminated glass due to excellent mechanical properties, higher strength and better stability, the performance of the glass can be improved, and meanwhile, the thickness of the laminated glass can be reduced, so that the quality of the ionic intermediate film is extremely important to the quality of the laminated glass, the ionic intermediate film can be influenced by a production process in the production process, scratch defects can appear on the appearance surface of the ionic intermediate film, and the scratch defects can seriously influence the stability in the laminated glass, and therefore, a detection method for the appearance scratch defects of the ionic intermediate film is needed.
In the process of detecting the scratch defect of the ionic intermediate film by the machine vision technology, the film characteristic needs to be irradiated on the ionic intermediate film to detect the scratch defect, and the surface of the ionic intermediate film is not smooth and has certain special textures, so that the textures are recognized as scratches by the method (edge detection and the like) in the traditional machine vision technology, but the texture features belong to pseudo scratches and are not true scratches, and therefore, larger errors occur in the scratch defect result. As the texture features on the ionic intermediate film belong to high-frequency information, the occurrence of scratches can greatly influence the distribution features of the high-frequency information of the ionic intermediate film, so that the local frequency information in the image is greatly changed.
Disclosure of Invention
The invention provides an ionic intermediate film appearance defect detection method, which aims to solve the problem that the scratch detection is error due to the existing texture, and adopts the following technical scheme:
one embodiment of the invention provides a method for detecting appearance defects of an ionic intermediate film, which comprises the following steps:
acquiring an ionic intermediate film image and an intermediate film spectrogram;
threshold segmentation is carried out on the intermediate film spectrogram to obtain a segmentation threshold, a highlight point and a first range are obtained according to the segmentation threshold, and threshold iteration is carried out by utilizing the first range to obtain a binary mask; marking a straight line which is equally divided by each binary mask and passes through the center point of the binary mask as a direction straight line, marking a direction straight line which passes through two or more high-brightness points as a direction mask, and obtaining a airspace image and an image block according to the direction mask; adding ninety degrees to the spectrogram direction mask angle to obtain a direction mask of the image block, and taking a straight line formed by pixel points in the direction of the direction mask in the image block as a gray level distribution curve;
the direction corresponding to the direction mask of the image block is marked as a calculation direction, the ratio of the number of pixels of each gray distribution curve in the calculation direction in the image block to the maximum value of the number of pixels of all gray distribution curves in the calculation direction in the image block is marked as a first ratio, and the direction influence weight value of each direction mask is obtained according to the first ratio, the gray variance of each gray distribution curve in the calculation direction in the image block and the number of gray distribution curves in the calculation direction;
obtaining a position influence weight value of each directional mask in a corresponding direction according to the ratio of the Euclidean distance between the highlight point and the directional center in each directional mask and the Euclidean distance between the boundary pixel point of the upper left corner and the directional center in the intermediate film spectrogram;
obtaining the comprehensive influence weight value of each directional mask according to the product of the position influence weight value and the direction influence weight value of each directional mask;
in each airspace image, establishing two window areas for pixel points in each image block, recording the two window areas as a first window area and a second window area, obtaining mutation point density degree of each window area according to the ratio of the number of mutation points of the window areas to all pixel points of the window areas and the variance of the nearest distance of the mutation points in the window areas, and obtaining the local range of the pixel points of each image block according to the size relation between the mutation point density degree difference value of the first window area and the second window area and a specified threshold value;
obtaining the probability of true scratches of each image block according to the density degree of abrupt points in the local range of the pixel points, the comprehensive influence weight value of the directional masks and the number of the directional masks;
and detecting the appearance defects of the ionic intermediate film according to the probability of the true scratches of the image block.
Preferably, the method for obtaining the highlight point and the first range according to the segmentation threshold value comprises the following steps:
and marking the pixel point with the pixel value larger than the segmentation threshold value in the intermediate film spectrogram as a highlight point, marking the highlight point with the largest pixel value as a maximum highlight point, and taking the range formed by the segmentation threshold value and the pixel value of the maximum highlight point as a first range.
Preferably, the method for obtaining the binary mask by performing threshold iteration by using the first range includes:
the minimum value of the first range is recorded as an initial iteration threshold, a binary image is obtained according to the initial iteration threshold and is used as a binary mask, the initial iteration threshold is added with two to obtain a second iteration threshold, the second iteration threshold is used as a binary mask, the second iteration threshold is added with two to obtain a third iteration threshold, the third iteration threshold is used as a binary mask, and the like, each iteration threshold is used as a binary mask, and iteration is stopped until the iteration threshold exceeds the first range.
Preferably, the method for obtaining the direction influence weight value of each direction mask according to the first ratio, the gray variance of each gray distribution curve in the calculation direction in the image block, and the number of gray distribution curves in the calculation direction includes:
in the method, in the process of the invention,is indicated at +.>The>The number of gray-scale distribution curves in the direction corresponding to the respective direction mask, < >>Indicate->The>The number of pixel points in the nth gray scale distribution curve in the direction corresponding to the respective direction mask,/>Indicate->The>Maximum value of the number of pixels in all gray-scale distribution curves in the direction corresponding to the individual direction mask, +.>Indicate->The>The +.>Gray variance of the gray distribution curve +.>Indicate->The>The direction of the individual direction masks affects the weight values.
Preferably, the method for obtaining the mutation point density degree of each window area according to the ratio of the number of the mutation points in the window area to all the pixel points in the window area and the variance of the nearest distance of the mutation points in the window area comprises the following steps:
in the method, in the process of the invention,representing the current->The number of mutations in the size window region, +.>Representing the currentThe variance of the nearest distance of the mutation points within the window area of the size,/>representing the current->The number of all pixels in the window area of the size, +.>Represents a logarithmic function based on natural constants, < ->Representing the current->Mutation point density of large window region.
Preferably, the nearest distance of the mutation point is the minimum value of Euclidean distances between the mutation point and all the rest of mutation points.
Preferably, the method for obtaining the local range of the pixel point of each image block according to the magnitude relation between the mutation point density difference value of the first window area and the second window area and the specified threshold value comprises the following steps:
the first window area is smaller than the second window area, if the mutation point density difference value of the first window area and the second window area is larger than a specified threshold value, the first window area is used as a local range of the pixel point, if the mutation point density difference value of the first window area and the second window area is smaller than the specified threshold value, the window areas are iterated, the length and the width of the first window area and the second window area are both increased by two, the mutation point density difference value of the first window area and the second window area after the iteration is calculated again, if the mutation point density difference value of the first window area and the second window area after the iteration is larger than the specified threshold value, the first window area after the iteration is used as the local range of the pixel point, if the mutation point density difference value of the first window area and the second window area after the iteration is smaller than the specified threshold value, the iteration is performed again until the condition is met or the second window area is larger than the image block, and the first window area at the moment is used as the local range of the pixel point.
Preferably, the method for obtaining the probability of true scratches of each image block according to the density of the abrupt points in the local range of the pixel points, the comprehensive influence weight value of the directional masks and the number of the directional masks comprises the following steps:
in the method, in the process of the invention,indicate->The number of directional masks in the individual directions, < >>Indicate->The>Individual direction mask pair->Comprehensive influence weight value of individual image blocks, < ->Is indicated at +.>The>Mutation point density in local range of jth pixel point of ith image block under individual direction mask processing, +.>Is indicated at +.>Mean value of mutation point density in local range of jth pixel point of ith image block under all direction mask processing in each direction, +.>Indicate->The +.>First->Mutation point density in local range of each pixel point is changed, < >>Indicates the number of all directions>Indicate->The number of pixels in each image block, +.>Represents a logarithmic function based on natural constants, < ->Representing the probability that the i-th image block will have a true scratch.
The beneficial effects of the invention are as follows: the method comprises the steps of carrying out Fourier transform on an acquired image to obtain a spectrogram, processing the spectrogram in a mask mode, analyzing the change of the spectrogram converted into a space domain image by analyzing masks in different directions, analyzing a scratch area, and obtaining the distribution change degree of high-frequency information in the local range of each pixel point in each image block to determine the probability of true scratches. The influence degree of the masks with different thresholds in different directions on the image block is obtained according to the influence degree of the masks with different directions on the pixel points in the image block, so that the distribution change degree of the calculated high-frequency information is more accurate. The invention can avoid the problem of false scratch identification caused by special textures on the surface of the ionic intermediate film under the traditional machine vision, and considers the influence of masks in different directions on the identification degree so as to accurately determine the true scratch area.
Drawings
In order to more clearly illustrate the embodiments of the invention or the technical solutions of the prior art, the drawings which are used in the description of the embodiments or the prior art will be briefly described, it being obvious that the drawings in the description below are only some embodiments of the invention, and that other drawings can be obtained according to these drawings without inventive faculty for a person skilled in the art.
Fig. 1 is a flow chart of a method for detecting an appearance defect of an ionic interlayer according to an embodiment of the invention.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
Referring to fig. 1, a flowchart of a method for detecting an appearance defect of an ionic interlayer according to an embodiment of the invention is shown, and the method includes the following steps:
step S001, an image of the ionic intermediate film is acquired on the production line of the ionic intermediate film.
In this embodiment, the scratch defect detection is performed by arranging a machine vision system on the production line of the ionic intermediate film, where the machine vision system includes an image acquisition system, an illumination system, an image transmission system, and an image processing system. The image acquisition system is mainly used for arranging an industrial CCD camera to acquire an ionic intermediate film image, the illumination system is mainly used for arranging a light source and fixing an illumination angle, light is emitted to the ionic intermediate film, the image transmission system is mainly used for transmitting the acquired ionic intermediate film image to the image processing system, and the image processing system is mainly used for processing the acquired ionic intermediate film image to acquire a detection result of a scratch area.
Thus, an ionic intermediate film image was acquired.
Step S002, obtaining a plurality of binary masks according to the ionic intermediate film image, obtaining a plurality of directional masks according to the binary masks, and calculating the directional influence weight value and the position influence weight value of the directional masks to obtain the comprehensive influence weight value.
The acquired ionic intermediate film image is subjected to gray processing, the intermediate film spectrogram is obtained by using discrete Fourier transform on the ionic intermediate film image subjected to gray processing, and the pixel value of a pixel point in the intermediate film spectrogram corresponds to the frequency, so that the embodiment performs OTSU threshold segmentation processing on the acquired intermediate film spectrogram according to the pixel value of each pixel point to obtain a segmentation threshold, marks the pixel point with the pixel value larger than the segmentation threshold as a highlight point, marks the range formed by the segmentation threshold and the maximum gray value of the highlight point as a range F, performs threshold iteration in the range F, and obtains a binary mask for each iteration threshold.
The method comprises the steps of dividing an OTSU threshold value for the first time to obtain an initial iteration threshold value, marking a pixel point with a gray level greater than or equal to the initial iteration threshold value as 1 by using the initial iteration threshold value, marking a pixel point with a gray level smaller than the initial iteration threshold value as 0, obtaining a binary mask, then in a range F, enabling the initial division threshold value to be added with an iteration step length to obtain a second iteration threshold value, marking a pixel point with a gray level greater than or equal to the second iteration threshold value as 1 by using the second iteration threshold value, marking a pixel point with a gray level smaller than the second iteration threshold value as 0, obtaining a binary mask, then in the range F, enabling the second iteration threshold value to be added with the iteration step length to obtain a third iteration threshold value, and then analogically stopping iteration until the obtained iteration threshold value exceeds the range F.
Thus, several iteration thresholds are obtained, each of which results in a binary mask.
Since scratches may have directional characteristics, this embodiment needs to consider the directional characteristics in the process of generating a mask. Specifically, in each threshold iteration process, the center of the intermediate film spectrogram is taken as a direction center, straight lines passing through different directions of the direction center are obtained, straight lines which can equally divide the binary mask are found in a plurality of straight lines passing through the direction center, the straight lines passing through the direction center and equally dividing the binary mask are marked as direction straight lines, and a plurality of direction straight lines are formed, wherein the equally dividing definition is that the shapes and the areas of the divided parts are equal. Since the intermediate film spectrogram is a symmetrical image, the pixel points in the range F are all symmetrical with respect to the direction center, and among all the direction straight lines, the direction straight line passing through at least two highlight points is recorded as a direction mask. In each threshold iteration process, a plurality of directional masks exist, namely, different directional masks are corresponding to different iteration thresholds in the same direction.
According to the above steps, directional masks in different directions are obtained to the firstThe>For example, the direction masks are used for carrying out mask processing on the intermediate film spectrogram, carrying out inverse Fourier transform on the intermediate film spectrogram after the mask processing to obtain an air domain image, dividing the air domain image into image blocks, and equally dividing the air domain image into N image blocks, wherein the size of the air domain image obtained by each direction mask is the same, namely, the air domain image has N image blocks, each image block corresponds to a plurality of direction masks, and N is taken as 25 in the embodiment.
For each pixel point under each image block, the influence degree is different when the distribution change degree of the high-frequency information in the local range is calculated under different directions and different thresholds, and the influence weight value of each direction mask needs to be calculated because the scratch has directional characteristics and the pseudo scratch, namely the texture, under different directions has different characteristics under different directions, so the corresponding information representation degree of the intermediate film spectrogram processed by using the masks in different directions is also different.
In the ith image block, for the a-th directional mask, the straight line direction in the intermediate film spectrogram is recorded asThe direction corresponding to the spatial domain image is +.>The angle is taken as the corresponding direction of the direction mask in the spatial domain image. In each image block, the weight value of each direction mask is obtained according to the distribution condition of the pixel points in each direction, the influence degree of the direction mask is calculated according to the change degree of all gray distribution curves in the corresponding direction of each direction mask in each image block, the gray distribution curves are straight lines formed by gray values of the pixel points in a certain fixed direction in one image block, wherein in the +.>The>Direction influencing weight value of the individual direction mask +.>The calculated expression of (2) is:
in the method, in the process of the invention,is indicated at +.>The>The number of gray-scale distribution curves in the direction corresponding to the respective direction mask, < >>Indicate->The>The number of pixel points in the nth gray scale distribution curve in the direction corresponding to the respective direction mask,/>Indicate->The>Maximum value of the number of pixels in all gray-scale distribution curves in the direction corresponding to the individual direction mask, +.>Indicate->The>The +.>Gray variance of the gray distribution curve +.>Indicate->The>The direction of the individual direction masks affects the weight values.
Wherein the method comprises the steps ofThe method is characterized in that normalization processing is carried out according to the number of the pixel points in the gray distribution curve to be used as a gray variance weight value, if the number of the pixel points on the gray distribution curve is larger, the gray distribution characteristics of the pixel points in the gray distribution curve can represent the gray distribution characteristics of the whole image block in the direction, and the representing degree of the gray distribution curve is smaller when the number of the pixel points is smaller. Wherein->Indicate->The>The +.>The gray variance of the gray distribution curve represents the influence degree in the direction in the image block through the gray distribution curve variance, if the variance of the gray distribution curve is larger, the gray abrupt change points in the direction are more, and the corresponding texture characteristic representation of the ionic intermediate film in the direction is obvious.
After the threshold iteration process is finished, if a plurality of direction masks exist in the direction corresponding to each direction mask, the influence degree of the corresponding direction masks corresponding to different iteration thresholds on the frequency spectrum is different on the influence degree of each pixel point in the image block when the distribution change degree of high-frequency information in a local range is calculated, the change of different frequency information in the intermediate film spectrogram is corresponding to the change of different detail degrees in the airspace image, and the change of different detail degrees in the airspace image is truly markedA mark is understood to mean the change of information of an originally high frequency into information of a continuous relatively low frequency. Since the middle film spectrogram is closer to the low-frequency information from the center, the corresponding a-th direction isThe calculation formula of the position influence weight values of the individual directional masks is as follows:
in the method, in the process of the invention,indicate->The>Maximum value of Euclidean distance of all highlight points in the intermediate film spectrogram from center of intermediate film spectrogram for each direction mask, +.>Representing the Euclidean distance of the upper left corner boundary pixel point in the intermediate film spectrogram from the center of the intermediate film spectrogram,/and>represents +.>The position of the individual directional masks influences the weight values.
From the above calculation, the a-th direction is obtainedThe position of the individual directional mask influences the weight value and +.>The>The direction of the individual direction mask influences the weight value, the two are multiplied to obtain the +.>The>The individual direction mask pair->Comprehensive influence weight value of individual image blocks +.>。
Thus, the comprehensive influence weight value of each directional mask is obtained.
Step S003, a window area is established for each pixel point, the local range of each pixel point is obtained according to the mutation point density degree of the window area, and the probability of true scratches of each image block is calculated according to the mutation point density degree of the local range and the total influence weight value.
The probability of true scratches is determined by the distribution change degree of high-frequency information in the local range of each pixel point in the image block through different direction masks, wherein the existence of the true scratches in the spatial domain image can cause the distribution of the high-frequency information in different directions in the local range of each pixel point to change greatly, and the false scratches only generate linear characteristics with certain frequencies in a certain direction as the existence of the true scratches, so that the performance characteristics of the true scratches and the false scratches on the image are similar. Therefore, in this embodiment, on the basis of acquiring the comprehensive influence weight values of different directional masks, the distribution change of the high-frequency information in the local range of each pixel point in the airspace image after the directional mask processing is calculated.
In the space domain image, the local range of each pixel point in the image block is obtained, the density distribution characteristics of the abrupt change points in different directions of each pixel point in the image block are calculated in the space domain image, wherein the characteristic information in the local range of each pixel point is the same as far as possible, and the corresponding ionic intermediate texture characteristic information in the local range is the same in characteristic, namely the density distribution characteristics of the abrupt change points in the corresponding range are similar.
Specifically, each pixel point in the image block is taken as the center to establishA window of a size, a gray value difference threshold value is set in the window area +.>If the absolute value of the difference value of the gray value between the pixel point in the window area and the central point of the window area is larger than the gray value difference threshold, the pixel point is marked as a mutation point, the Euclidean distance between the mutation point and all the rest mutation points is calculated for each mutation point in one window area, the minimum value of the Euclidean distance between the mutation point and all the mutation points is found as the nearest distance of the mutation point, and the nearest distance of all the mutation points is obtained, so that the mutation point density degree in the current window area is obtained:
in the method, in the process of the invention,representing the current->The number of mutations in the size window region, +.>Representing the currentVariance of the nearest distance of the mutation points in the window region of the size, +.>Representing the current->The number of all pixels in the window area of the size, +.>Represents a logarithmic function based on natural constants, < ->Representing the current->Mutation point density of large window region. The more the number of the mutation points in the window area, the smaller the variance of the nearest distance between the mutation points, which means that the distribution uniformity and the density degree between the mutation points in the window area are larger.
Set up centered on each pixel point in an image blockSize window, also calculate mutation point intensity +.>Calculating mutation point density difference of two different window areas to obtain a mutation point density difference value, setting a density difference value threshold value as h, if the mutation point density difference value is larger than or equal to the density difference value threshold value, setting the local range size of the central point as the size of a smaller window area, if the mutation point density difference value is smaller than the density difference value threshold value, iterating the two window areas, wherein the iteration step length is 2, namely adding the iteration step length to the length and the width of the two window areas, then calculating the mutation point density difference value of the two window areas again, if the mutation point density difference value is larger than or equal to the density difference value threshold value, setting the local range size of the central point as the size of the smaller window area, if the mutation point density difference value is smaller than the density difference value threshold value, continuing iterating the two window areas, namely adding the iteration step length and width of the two window areas until the local range or window of the central point meeting the conditions is obtained, and so onStopping iteration when the mouth area is larger than the image block, and selecting a smaller window area as a local range of the central point when the iteration is ended, wherein +.>Take 5%>7,h is taken to be 0.3.
According to the steps, the local range of each pixel point is obtained, the distribution change of high-frequency information in the local range of each pixel point in the image block under different direction masks is calculated, and the probability of occurrence of true scratches in each image block is further obtainedThe probability of occurrence of the true scratch is calculated according to the change of the intensity degree of the mutation points in the local range of the pixel points of the directional mask under different thresholds in the same direction, and the specific formula is as follows:
in the method, in the process of the invention,indicate->The number of directional masks in the individual directions, < >>Indicate->The>Individual direction mask pair->Comprehensive influence weight value of individual image blocks, < ->Is indicated at +.>The>Mutation point density in local range of jth pixel point of ith image block under individual direction mask processing, +.>Is indicated at +.>Mean value of mutation point density in local range of jth pixel point of ith image block under all direction mask processing in each direction, +.>Indicate->The +.>First->Mutation point density in local range of each pixel point is changed, < >>Indicates the number of all directions>Indicate->Individual image blocksThe number of pixels in->Represents a logarithmic function based on natural constants, < ->Representing the probability that the i-th image block will have a true scratch. In the airspace image processed by calculating all directional masks in the same direction, if the mutation point density degree in the local range of the pixel point in the image block is larger in variation, the mutation point in the local range of the pixel point is indicated to have larger variation in variation of different frequencies, and correspondingly, if a scratch-shaped region appears in the image block, the scratch-shaped region is more likely to be a 'scratch shape' caused by the same directionality caused by high-frequency information points, rather than a true scratch under continuous variation (the true scratch is formed by continuous pixel points with similar frequencies and has the regularity characteristic in the local range), and correspondingly, if the mutation point in the local range of the pixel point is larger in variation of different frequencies in different directions, the probability of the true scratch appearing in the corresponding image block is smaller.
So far, the probability of true scratches of the image block is obtained.
And S004, finishing detection of the appearance defects of the ionic intermediate film according to the probability of occurrence of true scratches of each image block.
According to the steps, the occurrence probability of the true scratch in the image block is calculated and a probability threshold value is setIf the probability of occurrence of the true scratch of the image block is greater than the set threshold value, the image block is indicated to be possibly provided with the true scratch. And acquiring an image block larger than a threshold value, carrying out homomorphic filtering pretreatment, carrying out OTSU threshold segmentation on the pretreated image block, setting the pixel point with the gray value larger than the OTSU threshold value as 1, and setting the rest pixel points as 0. Wherein the pixel point is 1, namely the scratch defect.
Thus, the detection of the appearance defects of the ionic intermediate film is completed.
The foregoing description of the preferred embodiments of the invention is not intended to be limiting, but rather is intended to cover all modifications, equivalents, alternatives, and improvements that fall within the spirit and scope of the invention.
Claims (8)
1. An ionic intermediate film appearance defect detection method is characterized by comprising the following steps:
acquiring an ionic intermediate film image and an intermediate film spectrogram;
threshold segmentation is carried out on the intermediate film spectrogram to obtain a segmentation threshold, a highlight point and a first range are obtained according to the segmentation threshold, and threshold iteration is carried out by utilizing the first range to obtain a binary mask; marking a straight line which is equally divided by each binary mask and passes through the center point of the binary mask as a direction straight line, marking a direction straight line which passes through two or more high-brightness points as a direction mask, and obtaining a airspace image and an image block according to the direction mask; adding ninety degrees to the spectrogram direction mask angle to obtain a direction mask of the image block, and taking a straight line formed by pixel points in the direction of the direction mask in the image block as a gray level distribution curve;
the direction corresponding to the direction mask of the image block is marked as a calculation direction, the ratio of the number of pixels of each gray distribution curve in the calculation direction in the image block to the maximum value of the number of pixels of all gray distribution curves in the calculation direction in the image block is marked as a first ratio, and the direction influence weight value of each direction mask is obtained according to the first ratio, the gray variance of each gray distribution curve in the calculation direction in the image block and the number of gray distribution curves in the calculation direction;
obtaining a position influence weight value of each directional mask in a corresponding direction according to the ratio of the Euclidean distance between the highlight point and the directional center in each directional mask and the Euclidean distance between the boundary pixel point of the upper left corner and the directional center in the intermediate film spectrogram;
obtaining the comprehensive influence weight value of each directional mask according to the product of the position influence weight value and the direction influence weight value of each directional mask;
in each airspace image, establishing two window areas for pixel points in each image block, recording the two window areas as a first window area and a second window area, obtaining mutation point density degree of each window area according to the ratio of the number of mutation points of the window areas to all pixel points of the window areas and the variance of the nearest distance of the mutation points in the window areas, and obtaining the local range of the pixel points of each image block according to the size relation between the mutation point density degree difference value of the first window area and the second window area and a specified threshold value;
obtaining the probability of true scratches of each image block according to the density degree of abrupt points in the local range of the pixel points, the comprehensive influence weight value of the directional masks and the number of the directional masks;
and detecting the appearance defects of the ionic intermediate film according to the probability of the true scratches of the image block.
2. The method for detecting an appearance defect of an ionic interlayer according to claim 1, wherein the method for obtaining the highlight point and the first range according to the segmentation threshold is as follows:
and marking the pixel point with the pixel value larger than the segmentation threshold value in the intermediate film spectrogram as a highlight point, marking the highlight point with the largest pixel value as a maximum highlight point, and taking the range formed by the segmentation threshold value and the pixel value of the maximum highlight point as a first range.
3. The method for detecting an appearance defect of an ionic interlayer according to claim 1, wherein the method for obtaining a binary mask by performing a threshold iteration using a first range comprises:
the minimum value of the first range is recorded as an initial iteration threshold, a binary image is obtained according to the initial iteration threshold and is used as a binary mask, the initial iteration threshold is added with two to obtain a second iteration threshold, the second iteration threshold is used as a binary mask, the second iteration threshold is added with two to obtain a third iteration threshold, the third iteration threshold is used as a binary mask, and the like, each iteration threshold is used as a binary mask, and iteration is stopped until the iteration threshold exceeds the first range.
4. The method for detecting an appearance defect of an ionic interlayer according to claim 1, wherein the method for obtaining the direction influence weight value of each direction mask according to the first ratio, the gray variance of each gray distribution curve in the calculated direction in the image block, and the number of gray distribution curves in the calculated direction comprises the following steps:
in the method, in the process of the invention,is indicated at +.>The>The number of gray scale profiles in the corresponding direction of the directional mask,indicate->The>The number of pixel points in the nth gray scale distribution curve in the direction corresponding to the respective direction mask,/>Indicate->The>The number of pixel points in all gray scale distribution curves in the direction corresponding to each direction maskMaximum value of quantity>Indicate->The>The +.>Gray variance of the gray distribution curve +.>Indicate->The>The direction of the individual direction masks affects the weight values.
5. The method for detecting the appearance defects of the ionic intermediate film according to claim 1, wherein the method for obtaining the mutation point density degree of each window area according to the ratio of the number of the mutation points of the window area to all pixel points of the window area and the variance of the nearest distance of the mutation points in the window area is as follows:
in the method, in the process of the invention,representing the current->Large window area inward protrusionsNumber of change points>Representing the current->Variance of the nearest distance of the mutation points in the window region of the size, +.>Representing the current->The number of all pixels in the window area of the size, +.>Represents a logarithmic function based on natural constants, < ->Representing the current->Mutation point density of large window region.
6. The method for detecting an appearance defect of an ionic interlayer according to claim 1, wherein the nearest distance between the mutation point is the minimum value among euclidean distances between the mutation point and all the rest of the mutation points.
7. The method for detecting an appearance defect of an ionic interlayer according to claim 1, wherein the method for obtaining the local range of the pixel point of each image block according to the magnitude relation between the mutation point density difference value of the first window area and the second window area and the specified threshold value is as follows:
the first window area is smaller than the second window area, if the mutation point density difference value of the first window area and the second window area is larger than a specified threshold value, the first window area is used as a local range of the pixel point, if the mutation point density difference value of the first window area and the second window area is smaller than the specified threshold value, the window areas are iterated, the length and the width of the first window area and the second window area are both increased by two, the mutation point density difference value of the first window area and the second window area after the iteration is calculated again, if the mutation point density difference value of the first window area and the second window area after the iteration is larger than the specified threshold value, the first window area after the iteration is used as the local range of the pixel point, if the mutation point density difference value of the first window area and the second window area after the iteration is smaller than the specified threshold value, the iteration is performed again until the condition is met or the second window area is larger than the image block, and the first window area at the moment is used as the local range of the pixel point.
8. The method for detecting the appearance defects of the ionic intermediate film according to claim 1, wherein the method for obtaining the probability of true scratches of each image block according to the density of mutation points in the local range of pixel points, the comprehensive influence weight value of direction masks and the number of the direction masks is as follows:
in the method, in the process of the invention,indicate->The number of directional masks in the individual directions, < >>Indicate->The>Individual direction mask pair->Comprehensive influence weight value of individual image blocks, < ->Is indicated at +.>The>Mutation point density in local range of jth pixel point of ith image block under individual direction mask processing, +.>Is indicated at +.>Mean value of mutation point density in local range of jth pixel point of ith image block under all direction mask processing in each direction, +.>Indicate->The +.>First->The degree of mutation point density in the local range of each pixel point is changed,/>indicates the number of all directions>Indicate->The number of pixels in each image block, +.>Represents a logarithmic function based on natural constants, < ->Representing the probability that the i-th image block will have a true scratch.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310443995.8A CN116152262B (en) | 2023-04-24 | 2023-04-24 | Method for detecting appearance defects of ionic intermediate film |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310443995.8A CN116152262B (en) | 2023-04-24 | 2023-04-24 | Method for detecting appearance defects of ionic intermediate film |
Publications (2)
Publication Number | Publication Date |
---|---|
CN116152262A CN116152262A (en) | 2023-05-23 |
CN116152262B true CN116152262B (en) | 2023-06-23 |
Family
ID=86354757
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202310443995.8A Active CN116152262B (en) | 2023-04-24 | 2023-04-24 | Method for detecting appearance defects of ionic intermediate film |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN116152262B (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116843688B (en) * | 2023-09-01 | 2023-11-24 | 山东虹纬纺织有限公司 | Visual detection method for quality of textile |
CN117173188B (en) * | 2023-11-03 | 2024-01-26 | 泸州通鑫显示科技有限公司 | Glass scar identification method |
Family Cites Families (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2001192243A (en) * | 2000-01-05 | 2001-07-17 | Sekisui Chem Co Ltd | Intermediate film for laminated glass, and laminated glass |
JP2009216438A (en) * | 2008-03-07 | 2009-09-24 | Central Glass Co Ltd | Inspection method of optical defect of laminated glass |
CN102142130B (en) * | 2011-04-11 | 2012-08-29 | 西安电子科技大学 | Watermark embedding method and device based on wavelet-domain enhanced image masks |
JP6740107B2 (en) * | 2016-11-30 | 2020-08-12 | Hoya株式会社 | Mask blank, transfer mask, and semiconductor device manufacturing method |
TW201900421A (en) * | 2017-05-19 | 2019-01-01 | 日商積水化學工業股份有限公司 | Intermediate film and laminated glass for laminated glass |
KR20200125586A (en) * | 2017-12-26 | 2020-11-04 | 호야 가부시키가이샤 | Mask blank, phase shift mask, and manufacturing method of semiconductor device |
CN113744199B (en) * | 2021-08-10 | 2023-09-26 | 南方科技大学 | Image breakage detection method, electronic device, and storage medium |
CN114196330A (en) * | 2021-08-16 | 2022-03-18 | 江苏奥天利新材料有限公司 | Ionomer type laminated glass intermediate film and preparation method thereof |
CN114565552A (en) * | 2021-12-27 | 2022-05-31 | 歌尔光学科技有限公司 | Method and device for detecting surface defects of optical element and electronic equipment |
-
2023
- 2023-04-24 CN CN202310443995.8A patent/CN116152262B/en active Active
Also Published As
Publication number | Publication date |
---|---|
CN116152262A (en) | 2023-05-23 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN116152262B (en) | Method for detecting appearance defects of ionic intermediate film | |
CN114862862B (en) | Pump body cold shut defect identification method and system based on image processing | |
CN116843678B (en) | Hard carbon electrode production quality detection method | |
Asamoah et al. | Measuring the performance of image contrast enhancement technique | |
CN116912261B (en) | Plastic mold injection molding surface defect detection method | |
CN114723705A (en) | Cloth flaw detection method based on image processing | |
CN117197140B (en) | Irregular metal buckle forming detection method based on machine vision | |
CN116740058B (en) | Quality detection method for solid state disk matched wafer | |
CN114842010B (en) | Building fireproof wood defect detection method based on Gaussian filtering | |
CN115953409B (en) | Injection molding surface defect detection method based on image processing | |
CN108629790B (en) | Light bar image threshold segmentation method based on depth residual error network | |
CN111161222A (en) | Printing roller defect detection method based on visual saliency | |
CN115511907B (en) | Scratch detection method for LED screen | |
CN114494179A (en) | Mobile phone back damage point detection method and system based on image recognition | |
CN117745724B (en) | Stone polishing processing defect region segmentation method based on visual analysis | |
CN115272303A (en) | Textile fabric defect degree evaluation method, device and system based on Gaussian blur | |
CN104574417A (en) | Image edge grey level fluctuation measurement and adaptive detection method | |
CN117541582B (en) | IGBT insulation quality detection method for high-frequency converter | |
CN117764982B (en) | Stamping die carrier abrasion detection method based on three-dimensional point cloud technology | |
CN114881961A (en) | Glass fiber plate crack detection method and device | |
CN114419039A (en) | Decorative wallpaper defect detection method based on template matching | |
CN116681696B (en) | Mold quality monitoring method for automatic production equipment | |
CN116612112B (en) | Visual inspection method for surface defects of bucket | |
CN115294102B (en) | Stainless steel product abnormity identification method based on machine vision | |
CN114998354A (en) | Steel belt roll mark detection method based on graph filtering |
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 |