CN116152262B - Method for detecting appearance defects of ionic intermediate film - Google Patents

Method for detecting appearance defects of ionic intermediate film Download PDF

Info

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
Application number
CN202310443995.8A
Other languages
Chinese (zh)
Other versions
CN116152262A (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.)
Dongguan Qun'an Plastic Industry Co ltd
Original Assignee
Dongguan Qun'an Plastic Industry 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 Dongguan Qun'an Plastic Industry Co ltd filed Critical Dongguan Qun'an Plastic Industry Co ltd
Priority to CN202310443995.8A priority Critical patent/CN116152262B/en
Publication of CN116152262A publication Critical patent/CN116152262A/en
Application granted granted Critical
Publication of CN116152262B publication Critical patent/CN116152262B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/0002Inspection of images, e.g. flaw detection
    • G06T7/0004Industrial image inspection
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01NINVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
    • G01N21/00Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
    • G01N21/84Systems specially adapted for particular applications
    • G01N21/88Investigating the presence of flaws or contamination
    • G01N21/8851Scan 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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/20Image enhancement or restoration using local operators
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/11Region-based segmentation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/136Segmentation; Edge detection involving thresholding
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01NINVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
    • G01N21/00Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
    • G01N21/84Systems specially adapted for particular applications
    • G01N21/88Investigating the presence of flaws or contamination
    • G01N21/8851Scan 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/8887Scan 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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20021Dividing image into blocks, subimages or windows
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20048Transform domain processing
    • G06T2207/20056Discrete 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

Method for detecting appearance defects of ionic intermediate film
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:
Figure SMS_1
in the method, in the process of the invention,
Figure SMS_8
is indicated at +.>
Figure SMS_5
The>
Figure SMS_16
The number of gray-scale distribution curves in the direction corresponding to the respective direction mask, < >>
Figure SMS_10
Indicate->
Figure SMS_17
The>
Figure SMS_9
The number of pixel points in the nth gray scale distribution curve in the direction corresponding to the respective direction mask,/>
Figure SMS_15
Indicate->
Figure SMS_7
The>
Figure SMS_12
Maximum value of the number of pixels in all gray-scale distribution curves in the direction corresponding to the individual direction mask, +.>
Figure SMS_2
Indicate->
Figure SMS_11
The>
Figure SMS_3
The +.>
Figure SMS_13
Gray variance of the gray distribution curve +.>
Figure SMS_6
Indicate->
Figure SMS_14
The>
Figure SMS_4
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:
Figure SMS_18
in the method, in the process of the invention,
Figure SMS_21
representing the current->
Figure SMS_24
The number of mutations in the size window region, +.>
Figure SMS_26
Representing the current
Figure SMS_20
The variance of the nearest distance of the mutation points within the window area of the size,/>
Figure SMS_23
representing the current->
Figure SMS_25
The number of all pixels in the window area of the size, +.>
Figure SMS_27
Represents a logarithmic function based on natural constants, < ->
Figure SMS_19
Representing the current->
Figure SMS_22
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:
Figure SMS_28
Figure SMS_29
in the method, in the process of the invention,
Figure SMS_37
indicate->
Figure SMS_36
The number of directional masks in the individual directions, < >>
Figure SMS_47
Indicate->
Figure SMS_35
The>
Figure SMS_48
Individual direction mask pair->
Figure SMS_40
Comprehensive influence weight value of individual image blocks, < ->
Figure SMS_45
Is indicated at +.>
Figure SMS_34
The>
Figure SMS_41
Mutation point density in local range of jth pixel point of ith image block under individual direction mask processing, +.>
Figure SMS_30
Is indicated at +.>
Figure SMS_42
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, +.>
Figure SMS_39
Indicate->
Figure SMS_44
The +.>
Figure SMS_32
First->
Figure SMS_49
Mutation point density in local range of each pixel point is changed, < >>
Figure SMS_33
Indicates the number of all directions>
Figure SMS_43
Indicate->
Figure SMS_38
The number of pixels in each image block, +.>
Figure SMS_46
Represents a logarithmic function based on natural constants, < ->
Figure SMS_31
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 first
Figure SMS_50
The>
Figure SMS_51
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 as
Figure SMS_52
The direction corresponding to the spatial domain image is +.>
Figure SMS_53
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 +.>
Figure SMS_54
The>
Figure SMS_55
Direction influencing weight value of the individual direction mask +.>
Figure SMS_56
The calculated expression of (2) is:
Figure SMS_57
in the method, in the process of the invention,
Figure SMS_59
is indicated at +.>
Figure SMS_63
The>
Figure SMS_68
The number of gray-scale distribution curves in the direction corresponding to the respective direction mask, < >>
Figure SMS_65
Indicate->
Figure SMS_70
The>
Figure SMS_64
The number of pixel points in the nth gray scale distribution curve in the direction corresponding to the respective direction mask,/>
Figure SMS_72
Indicate->
Figure SMS_62
The>
Figure SMS_71
Maximum value of the number of pixels in all gray-scale distribution curves in the direction corresponding to the individual direction mask, +.>
Figure SMS_58
Indicate->
Figure SMS_69
The>
Figure SMS_61
The +.>
Figure SMS_67
Gray variance of the gray distribution curve +.>
Figure SMS_66
Indicate->
Figure SMS_73
The>
Figure SMS_60
The direction of the individual direction masks affects the weight values.
Wherein the method comprises the steps of
Figure SMS_74
The 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->
Figure SMS_75
Indicate->
Figure SMS_76
The>
Figure SMS_77
The +.>
Figure SMS_78
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 is
Figure SMS_79
The calculation formula of the position influence weight values of the individual directional masks is as follows:
Figure SMS_80
in the method, in the process of the invention,
Figure SMS_81
indicate->
Figure SMS_82
The>
Figure SMS_83
Maximum value of Euclidean distance of all highlight points in the intermediate film spectrogram from center of intermediate film spectrogram for each direction mask, +.>
Figure SMS_84
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>
Figure SMS_85
represents +.>
Figure SMS_86
The position of the individual directional masks influences the weight values.
From the above calculation, the a-th direction is obtained
Figure SMS_87
The position of the individual directional mask influences the weight value and +.>
Figure SMS_88
The>
Figure SMS_89
The direction of the individual direction mask influences the weight value, the two are multiplied to obtain the +.>
Figure SMS_90
The>
Figure SMS_91
The individual direction mask pair->
Figure SMS_92
Comprehensive influence weight value of individual image blocks +.>
Figure SMS_93
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 establish
Figure SMS_94
A window of a size, a gray value difference threshold value is set in the window area +.>
Figure SMS_95
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:
Figure SMS_96
in the method, in the process of the invention,
Figure SMS_98
representing the current->
Figure SMS_101
The number of mutations in the size window region, +.>
Figure SMS_103
Representing the current
Figure SMS_99
Variance of the nearest distance of the mutation points in the window region of the size, +.>
Figure SMS_102
Representing the current->
Figure SMS_104
The number of all pixels in the window area of the size, +.>
Figure SMS_105
Represents a logarithmic function based on natural constants, < ->
Figure SMS_97
Representing the current->
Figure SMS_100
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 block
Figure SMS_106
Size window, also calculate mutation point intensity +.>
Figure SMS_107
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 +.>
Figure SMS_108
Take 5%>
Figure SMS_109
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 obtained
Figure SMS_110
The 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:
Figure SMS_111
Figure SMS_112
in the method, in the process of the invention,
Figure SMS_121
indicate->
Figure SMS_116
The number of directional masks in the individual directions, < >>
Figure SMS_128
Indicate->
Figure SMS_117
The>
Figure SMS_129
Individual direction mask pair->
Figure SMS_123
Comprehensive influence weight value of individual image blocks, < ->
Figure SMS_130
Is indicated at +.>
Figure SMS_115
The>
Figure SMS_126
Mutation point density in local range of jth pixel point of ith image block under individual direction mask processing, +.>
Figure SMS_113
Is indicated at +.>
Figure SMS_124
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, +.>
Figure SMS_119
Indicate->
Figure SMS_132
The +.>
Figure SMS_120
First->
Figure SMS_125
Mutation point density in local range of each pixel point is changed, < >>
Figure SMS_118
Indicates the number of all directions>
Figure SMS_127
Indicate->
Figure SMS_122
Individual image blocksThe number of pixels in->
Figure SMS_131
Represents a logarithmic function based on natural constants, < ->
Figure SMS_114
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 set
Figure SMS_133
If 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:
Figure QLYQS_1
in the method, in the process of the invention,
Figure QLYQS_5
is indicated at +.>
Figure QLYQS_3
The>
Figure QLYQS_15
The number of gray scale profiles in the corresponding direction of the directional mask,
Figure QLYQS_9
indicate->
Figure QLYQS_13
The>
Figure QLYQS_7
The number of pixel points in the nth gray scale distribution curve in the direction corresponding to the respective direction mask,/>
Figure QLYQS_11
Indicate->
Figure QLYQS_4
The>
Figure QLYQS_14
The number of pixel points in all gray scale distribution curves in the direction corresponding to each direction maskMaximum value of quantity>
Figure QLYQS_2
Indicate->
Figure QLYQS_16
The>
Figure QLYQS_8
The +.>
Figure QLYQS_12
Gray variance of the gray distribution curve +.>
Figure QLYQS_10
Indicate->
Figure QLYQS_17
The>
Figure QLYQS_6
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:
Figure QLYQS_18
in the method, in the process of the invention,
Figure QLYQS_20
representing the current->
Figure QLYQS_24
Large window area inward protrusionsNumber of change points>
Figure QLYQS_26
Representing the current->
Figure QLYQS_21
Variance of the nearest distance of the mutation points in the window region of the size, +.>
Figure QLYQS_22
Representing the current->
Figure QLYQS_25
The number of all pixels in the window area of the size, +.>
Figure QLYQS_27
Represents a logarithmic function based on natural constants, < ->
Figure QLYQS_19
Representing the current->
Figure QLYQS_23
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:
Figure QLYQS_28
Figure QLYQS_29
in the method, in the process of the invention,
Figure QLYQS_38
indicate->
Figure QLYQS_33
The number of directional masks in the individual directions, < >>
Figure QLYQS_42
Indicate->
Figure QLYQS_34
The>
Figure QLYQS_45
Individual direction mask pair->
Figure QLYQS_39
Comprehensive influence weight value of individual image blocks, < ->
Figure QLYQS_47
Is indicated at +.>
Figure QLYQS_32
The>
Figure QLYQS_43
Mutation point density in local range of jth pixel point of ith image block under individual direction mask processing, +.>
Figure QLYQS_30
Is indicated at +.>
Figure QLYQS_44
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, +.>
Figure QLYQS_37
Indicate->
Figure QLYQS_46
The +.>
Figure QLYQS_35
First->
Figure QLYQS_41
The degree of mutation point density in the local range of each pixel point is changed,/>
Figure QLYQS_36
indicates the number of all directions>
Figure QLYQS_48
Indicate->
Figure QLYQS_40
The number of pixels in each image block, +.>
Figure QLYQS_49
Represents a logarithmic function based on natural constants, < ->
Figure QLYQS_31
Representing the probability that the i-th image block will have a true scratch.
CN202310443995.8A 2023-04-24 2023-04-24 Method for detecting appearance defects of ionic intermediate film Active CN116152262B (en)

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)

* Cited by examiner, † Cited by third party
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)

* Cited by examiner, † Cited by third party
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

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