CN115100208A - Film surface defect evaluation method based on histogram and dynamic light source - Google Patents

Film surface defect evaluation method based on histogram and dynamic light source Download PDF

Info

Publication number
CN115100208A
CN115100208A CN202211029544.1A CN202211029544A CN115100208A CN 115100208 A CN115100208 A CN 115100208A CN 202211029544 A CN202211029544 A CN 202211029544A CN 115100208 A CN115100208 A CN 115100208A
Authority
CN
China
Prior art keywords
light source
defect
evaluation
region
film
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202211029544.1A
Other languages
Chinese (zh)
Other versions
CN115100208B (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.)
Shandong Lanhai Crystal Technology Co ltd
Original Assignee
NANTONG SANXIN PLASTICS EQUIPMENT TECHNOLOGY 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 NANTONG SANXIN PLASTICS EQUIPMENT TECHNOLOGY CO LTD filed Critical NANTONG SANXIN PLASTICS EQUIPMENT TECHNOLOGY CO LTD
Priority to CN202211029544.1A priority Critical patent/CN115100208B/en
Publication of CN115100208A publication Critical patent/CN115100208A/en
Application granted granted Critical
Publication of CN115100208B publication Critical patent/CN115100208B/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
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/40Image enhancement or restoration using histogram techniques
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/90Dynamic range modification of images or parts thereof
    • 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/13Edge detection
    • 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/20004Adaptive image processing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30168Image quality inspection
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/30Computing systems specially adapted for manufacturing

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Quality & Reliability (AREA)
  • Investigating Materials By The Use Of Optical Means Adapted For Particular Applications (AREA)

Abstract

The invention relates to the field of defect detection, and provides a film surface defect degree evaluation method based on a gray level histogram and a dynamic light source, which comprises the following steps: s1: performing self-adaptive segmentation on the obtained film gray level image to obtain each segmented region; s2: acquiring a gray level histogram of each region, and acquiring multi-order moments of the gray level histogram of the region; s3: obtaining a quality evaluation value of the region by using the obtained multi-order moments of the regional gray level histogram; s4: judging whether the area is a defect area; s5: adjusting the initial light source angle, and acquiring a quality evaluation value of the area judged to be defective after each light source angle adjustment by using the methods of S2-S3; s6: obtaining the evaluation entropy of each defect area; s7: and evaluating the defect degree of the film surface according to the maximum evaluation entropy in the evaluation entropies of all the defect areas. The invention can improve the film surface evaluation precision.

Description

Film surface defect evaluation method based on histogram and dynamic light source
Technical Field
The invention relates to the field of defect detection, in particular to a film surface defect evaluation method based on a histogram and a dynamic light source.
Background
The plastic film is mainly made of polyvinyl chloride (PVC), and a finished product is produced through a film production line. However, in the film production process, due to the influence of tiny impurities and other factors in the production, some defective films inevitably appear, so that the product yield of the films is seriously influenced, and the production benefit is influenced.
In the prior art, the detection of the surface defects of the film is mainly carried out in a manual mode, which has low efficiency and seriously wastes labor force; with the development of the field of machine vision, the film defect detection technology is also integrated with the machine vision defect detection, the image binaryzation, the morphology and the image enhancement are utilized to carry out the feature extraction on the surface image defects of the film, the surface defects of the film are obtained, and the defect degree evaluation is carried out on the surface defects of the film. In the process of detecting the defects of the film through machine vision, the defects are not accurately detected due to reasons such as light reflection of the film when the film is illuminated, so that the defects of the film cannot be accurately evaluated, and the problems that the defective products flow into the market or the defective products are mistaken as the defective products and the like are caused.
Disclosure of Invention
In order to overcome the defects of the prior art, the invention provides a film surface defect evaluation method based on a histogram and a dynamic light source, which evaluates defect areas in different light source angles by continuously adjusting the light source angle and finally achieves accurate evaluation of a film.
In order to achieve the purpose, the invention adopts the following technical scheme that the film surface defect evaluation method based on the histogram and the dynamic light source comprises the following steps:
s1: setting an initial light source angle, acquiring a film gray image under the initial light source angle, and performing self-adaptive segmentation on the acquired film gray image to obtain each segmented region;
s2: acquiring a gray level histogram of each region, and acquiring multi-order moments of the gray level histogram of the region by using the gray level mean value of each gray level in the gray level histogram;
s3: obtaining a quality evaluation value of the region by using the obtained multi-order moments of the regional gray level histogram;
s4: comparing the quality evaluation value of each area with an evaluation threshold value, and judging whether the area is a defect area;
s5: adjusting the initial light source angle, and acquiring a quality evaluation value of the area judged as the defect after each light source angle adjustment by using the method of S2-S3;
s6: obtaining the probability of the quality evaluation value of each light source angle of the defect area in the quality evaluation values of all light source angles of the defect area by using the quality evaluation values of the defect area at different light source angles, and obtaining the evaluation entropy of each defect area according to the probability of the quality evaluation value of each light source angle of the defect area in the quality evaluation values of all light source angles of the defect area and the length and width of the defect area;
s7: and evaluating the defect degree of the film surface according to the maximum evaluation entropy in the evaluation entropies of all the defect areas.
Further, in the method for evaluating the surface defects of the film based on the histogram and the dynamic light source, the method for obtaining the segmented regions in S1 includes:
in the row/column direction of the film gray image, if the average division column number/average division row number is greater than the maximum edge column number/maximum edge row number, performing average blocking on the film gray image in the row direction/column direction; and if the average segmentation column number/average segmentation row number is less than the maximum edge column number/maximum edge row number, performing self-adaptive blocking on the film gray-scale image in the row direction/column direction.
Further, in the method for evaluating surface defects of a film based on a histogram and a dynamic light source, the method for adjusting the initial light source angle in S5 is as follows:
adjusting the angle of the light source for the first time according to the set initial adjustment step length;
acquiring a quality evaluation value of the defect area after the first light source angle adjustment;
and calculating the absolute value of the difference between the quality evaluation value after the first light source angle adjustment and the quality evaluation value before the first light source angle adjustment, obtaining the second light source adjustment step length through the absolute value of the difference and the initial adjustment step length, obtaining the light source adjustment step length after the second light source adjustment according to the method for obtaining the second light source adjustment step length, and completing the adjustment of the light source angle.
Further, in the method for evaluating the defect on the surface of the film based on the histogram and the dynamic light source, the expression of the evaluation entropy of the defect area in S6 is as follows:
Figure 536184DEST_PATH_IMAGE002
in the formula:
Figure 100002_DEST_PATH_IMAGE003
the evaluation entropy of the defective region is represented,
Figure 311504DEST_PATH_IMAGE004
denotes the first
Figure 50790DEST_PATH_IMAGE004
Individual light source angles, ɸ indicates the number of light source angle adjustments,
Figure 100002_DEST_PATH_IMAGE005
indicating a defective area at the second
Figure 645982DEST_PATH_IMAGE004
The probability of the quality assessment value at each light source angle in the quality assessment values at all light source angles of the defect region,
Figure 128916DEST_PATH_IMAGE006
indicating the length of the current film image,
Figure 100002_DEST_PATH_IMAGE007
indicating the width of the current film image,
Figure 747024DEST_PATH_IMAGE008
is shown as
Figure 100002_DEST_PATH_IMAGE009
The length of each of the defect regions is,
Figure 781844DEST_PATH_IMAGE010
is shown as
Figure 503813DEST_PATH_IMAGE009
A defective areaThe width of the domain.
Further, in the method for evaluating surface defects of a thin film based on a histogram and a dynamic light source, the expression of the quality evaluation value of the area in S3 is as follows:
Figure 291903DEST_PATH_IMAGE012
in the formula:
Figure 100002_DEST_PATH_IMAGE013
a quality estimation value representing the area is determined,
Figure 9192DEST_PATH_IMAGE014
the second order moment is represented by a second order moment,
Figure 100002_DEST_PATH_IMAGE015
the third-order moment is represented by the following equation,
Figure 919641DEST_PATH_IMAGE016
the fourth-order moment is represented by the following equation,
Figure 100002_DEST_PATH_IMAGE017
the weight of the second moment is represented by,
Figure 253539DEST_PATH_IMAGE018
the weight of the third-order moment is represented,
Figure 100002_DEST_PATH_IMAGE019
representing the weight of the fourth moment.
Further, in the method for evaluating defects on a surface of a film based on a histogram and a dynamic light source, in S4, the quality evaluation value of each region is compared with an evaluation threshold, and whether the region is a defective region is determined by:
if the quality evaluation value of the area is greater than or equal to the threshold value of the quality evaluation value, judging the area as a non-defective area;
and if the quality evaluation value of the area is smaller than the threshold value of the quality evaluation value, judging the area as a defect area.
Further, in the method for evaluating the surface defect of the film based on the histogram and the dynamic light source, the method for evaluating the surface defect degree of the film according to the maximum evaluation entropy of the evaluation entropies of all defect regions in S7 includes:
if the maximum evaluation entropy in the evaluation entropies of all the defect areas is larger than the evaluation entropy threshold value, judging the corresponding thin film to be a second-class product;
and if the maximum evaluation entropy in the evaluation entropies of all the defect areas is less than or equal to the evaluation entropy threshold value, judging the corresponding film to be an equal product.
Further, in the film surface defect evaluation method based on the histogram and the dynamic light source, an angle between an initial light source of the film gray image and the horizontal direction in S1 is 90 degrees.
The invention has the beneficial effects that: based on the method, self-adaptive image segmentation is carried out through the gray level features of the images on the surface of the film to obtain a plurality of suspected defect images, a quality evaluation model is established by utilizing the gray level histogram features of different image areas, and whether the area is a defect area is judged; through continuously adjusting the light source angle, the defect areas in different light source angles are evaluated, and finally the film is accurately evaluated.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to these drawings without creative efforts.
FIG. 1 is a schematic flow chart of an embodiment of a method for evaluating defects on a surface of a thin film based on a histogram and a dynamic light source according to the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Example 1
An embodiment of the method for evaluating the surface defects of the film based on the histogram and the dynamic light source of the present invention, as shown in fig. 1, includes:
s1: setting an initial light source angle, acquiring a film gray image under the initial light source angle, and performing self-adaptive segmentation on the acquired film gray image to obtain each segmented region.
Setting the initial light source angle of the film surface image as
Figure 438795DEST_PATH_IMAGE020
The angle is the included angle between the light source and the horizontal direction, RGB images on the surface of the film are collected through a camera, and the size of the images is
Figure DEST_PATH_IMAGE021
Performing graying processing on the RGB image on the surface of the film, wherein the graying adopts three-channel mean graying:
Figure 980897DEST_PATH_IMAGE022
to obtain a gray scale image
Figure DEST_PATH_IMAGE023
. Then to the gray scale image
Figure 91942DEST_PATH_IMAGE023
Carrying out gray scale space distribution feature extraction and gray scale image segmentation, wherein the specific process is as follows:
first, for the gray image
Figure 788502DEST_PATH_IMAGE023
Edge pixel points existing on the surface of the gray image are obtained through a Sobel edge detection algorithm, the edge pixel points are fitted to obtain an edge area, the distribution area of the edge pixel points is counted, and the number of rows and the number of columns of all the existing edge pixel points distributed in an image coordinate system are obtained.
Then, carrying out self-adaptive segmentation on the image according to the number of the rows and the number of the columns distributed on the edge, wherein in the row direction of the image: according to the number of all edge regions
Figure 918395DEST_PATH_IMAGE024
And the number of columns distributed per edge
Figure 79117DEST_PATH_IMAGE026
The image is blocked in the direction of the image line,
Figure DEST_PATH_IMAGE027
in this case, the image is divided into blocks in the row direction, and the number of the divided blocks is set to
Figure 800211DEST_PATH_IMAGE028
. (wherein,
Figure DEST_PATH_IMAGE029
indicating the maximum number of edge regions in the image line direction,
Figure 311964DEST_PATH_IMAGE030
the number of distribution columns indicating the largest edge in the image row direction); when the temperature is higher than the set temperature
Figure DEST_PATH_IMAGE031
In the time, self-adaptive blocking is adopted in the image row direction, and the number of columns occupied by each image is changed
Figure 104602DEST_PATH_IMAGE032
And
Figure DEST_PATH_IMAGE033
wherein the former term is the number of division columns at the edge larger than the average number of division columns, the latter term is the number of division columns at the edge smaller than the average number of division columns,
Figure 854252DEST_PATH_IMAGE034
in order to adapt the coefficients of the motion vector,
Figure DEST_PATH_IMAGE035
indicating the number of columns occupied by the u-th edge region larger than the average number of divided columns. When in self-adaptive segmentation, if the number of rows occupied by the edge is large, the number of rows is divided into a plurality of rows at the edge; if the number of rows occupied by the edge is small, the number of rows is divided for the edge.
Likewise, in the image column direction: according to the number of all edges
Figure 820282DEST_PATH_IMAGE024
And the number of rows distributed per edge
Figure 288173DEST_PATH_IMAGE036
The image is divided into blocks in the direction of the image column,
Figure DEST_PATH_IMAGE037
the average block division is performed in the image column direction, and the number of rows of the divided blocks is
Figure 618922DEST_PATH_IMAGE038
(wherein,
Figure DEST_PATH_IMAGE039
indicates the maximum number of edge regions in the image column direction,
Figure 285396DEST_PATH_IMAGE040
number of distribution lines indicating the maximum edge in the column direction of the image) of the image
Figure DEST_PATH_IMAGE041
Then, self-adaptive block division is adopted in the image column direction to change the number of lines occupied by each image
Figure 410609DEST_PATH_IMAGE042
And
Figure DEST_PATH_IMAGE043
wherein the former term is the number of dividing lines of the edge larger than the average number of dividing lines, the latter term is the number of dividing lines of the edge smaller than the average number of dividing lines,
Figure 867260DEST_PATH_IMAGE044
in order to adapt the coefficients of the motion vector,
Figure DEST_PATH_IMAGE045
indicating the number of lines occupied by the vth edge larger than the average number of division lines. When in self-adaptive segmentation, if the number of lines occupied by the edge is large, the number of lines is divided for the edge; if the number of lines occupied by the edge is less, the number of division lines for the edge is less. By the self-adaptive segmentation method, a plurality of image segmentation areas are obtained, and the length and the width of each image segmentation area are obtained.
It should be noted that, after the adaptive segmentation is performed on the image by the above method, only one edge region or no edge region is reserved in each region of the finally segmented image, which is beneficial to performing adaptive segmentation on the image according to the distribution information of edge pixel points, obtaining an equal-size or unequal-size image block completely including the edge region, facilitating to provide a reference for performing dynamic light source angle adjustment on a plurality of adaptive-size image blocks, and simultaneously eliminating the influence between adjacent edge regions. The reason why the edge region is obtained by the Sobel edge detection algorithm is that the surface of the film may have surface protrusions or curled edges, so that the image region is unevenly distributed in illumination, a gray gradient is generated, and the edge region is obtained.
The steps realize graying and image segmentation of the surface image of the film, can perform region segmentation on regions possibly having defects according to the gray scale space characteristics of the surface of the film, and improve the defect evaluation precision.
S2: and acquiring a gray level histogram of each region, and acquiring multi-order moments of the gray level histogram of the region by using the gray level mean value of each gray level in the gray level histogram.
Obtaining each region segmentation image through the steps, carrying out gray histogram statistics on each region segmentation image, taking one segmentation image as an example: firstly, counting all gray levels in a segmentation region and the number of pixel points of all gray levels, then normalizing the gray levels of the pixel points, wherein the range is [0,1], drawing a gray level histogram curve of the region, the abscissa of the gray level histogram curve is the gray level, and the ordinate is the number of the pixel points corresponding to the gray level.
According to the curve characteristics of the gray histogram, the film quality evaluation of each area is carried out, and a film quality evaluation model is constructed by utilizing the multi-order moments of the gray histogram, and the specific process is as follows:
firstly, obtaining a gray histogram of each region, and solving a gray average value under each gray level
Figure 500236DEST_PATH_IMAGE046
Wherein
Figure DEST_PATH_IMAGE047
the number of gray levels of an image is represented,
Figure 725943DEST_PATH_IMAGE048
the size of the histogram representing the ith gray level,
Figure DEST_PATH_IMAGE049
representing the ith gray level.
Then, the mean value of the gray level histogram of each region image is calculated
Figure 786172DEST_PATH_IMAGE050
Obtaining multiple moments of a gray level histogram, wherein the multiple moments comprise: second moment
Figure DEST_PATH_IMAGE051
Third order moment
Figure 526857DEST_PATH_IMAGE052
And fourth order moment
Figure DEST_PATH_IMAGE053
. The multi-order moment of the gray level histogram is a known statistical index, and the calculation mode is not repeated.
The second moment is substantially variance, which is a measure of gray scale contrast, the surface texture of the film is smooth, the gray scale distribution is uniform, the smaller the gray scale fluctuation is, the smaller the second moment of the image is, and conversely, the larger the second moment of the image is. The third moment is the measurement of skewness of the gray level histogram and reflects gray level distribution information, and when the histogram is distributed on the left side in a concentrated mode, the third moment is a negative value; when the histogram is concentrated on the right side, the third moment is positive. The fourth moment reflects the relative flatness of the histogram, and the larger the edge gradient of the gray histogram curve, the larger the corresponding fourth moment.
S3: and obtaining the quality evaluation value of the region by using the obtained multi-order moments of the regional gray level histogram.
Constructing a film quality evaluation model according to the multi-order moments of the image gray level histogram of each region:
Figure DEST_PATH_IMAGE055
wherein,
Figure 996147DEST_PATH_IMAGE017
the weight of the second moment is represented by,
Figure 778158DEST_PATH_IMAGE018
the weight of the third-order moment is represented,
Figure 946971DEST_PATH_IMAGE019
representing the weight of the fourth moment, in this embodiment
Figure 315898DEST_PATH_IMAGE056
Figure DEST_PATH_IMAGE057
Representing the quality assessment value of the area, and performing the quality assessment value on the filmAnd (5) line normalization processing.
The gray level histogram corresponding to each image of the segmentation area is obtained in the steps, although the gray level histogram loses space information, the edge area is obtained through the gray level gradient difference between space pixel points, then the gray level histogram curve of each edge area is analyzed, the distribution characteristics of the gray level histogram are obtained, and the space distribution characteristics of each edge area are reserved.
S4: and comparing the quality evaluation value of each area with an evaluation threshold value, and judging whether the area is a defect area.
The step obtains the film surface quality evaluation value corresponding to each area according to the film quality evaluation model, if the quality evaluation value corresponding to the area is greater than or equal to 0.6, the area is not a defect area, and if the quality evaluation value corresponding to the area exists in the quality evaluation values corresponding to the area, the quality evaluation value of the area exists
Figure 290676DEST_PATH_IMAGE058
In this case, it is described that the corresponding area is defective, and is a defective area. Because the film is easily influenced by illumination, in order to accurately evaluate the defect degree of the defect area, the light source of the defect area of the film is adjusted at multiple angles.
S5: and adjusting the initial light source angle, and acquiring the quality evaluation value of the area judged to be the defect after each light source angle adjustment by using the method of S2-S3.
And (3) carrying out dynamic light source angle adjustment on the image area on the surface of the film, wherein the specific adjustment process is as follows:
and triggering dynamic light source angle adjustment when the quality evaluation value is smaller than a threshold value. The dynamic light source angle is further adjusted based on the current position. First, the initial adjustment step of the light source angle is
Figure DEST_PATH_IMAGE059
The initial light source angle for collecting RGB images on the surface of the film is
Figure 275994DEST_PATH_IMAGE020
The angle adjusting direction is a pitch angleThe angle of the light source from the horizontal).
According to the quality evaluation values of the film defect area and the corresponding film defect area existing in the light source angle adjusting range
Figure 553392DEST_PATH_IMAGE013
Angle adjustment is carried out with an initial adjustment step of
Figure 206352DEST_PATH_IMAGE060
And performing adaptive angle adjustment according to the change of the quality evaluation value as a guide. Specifically, the initial adjustment step length of the light source angle is
Figure 125767DEST_PATH_IMAGE060
After each light source angle adjustment, acquiring corresponding quality evaluation value by utilizing the gray level histograms of the defect areas before and after adjustment
Figure DEST_PATH_IMAGE061
Using front and rear of adjustment
Figure 475846DEST_PATH_IMAGE062
As a reference index, when the quality evaluation index changes more, the influence of the light source angle on the defect area is larger, and when the quality evaluation index changes less, the influence of the light source angle on the defect area is smaller. Will be obtained before and after adjustment
Figure DEST_PATH_IMAGE063
As a reference value of the adjustment step length, the adjustment step length is further subdivided, and the size of the step length refinement is
Figure 487926DEST_PATH_IMAGE064
Reference index
Figure 392297DEST_PATH_IMAGE063
The larger the value of (A), the smaller the light source angle adjustment step length is, when the reference index is
Figure 351288DEST_PATH_IMAGE063
And when the light source angle approaches 0, the light source angle adjustment is stopped, and the new film defect area information can be obtained by each adjustment.
Recording the quality evaluation value of the initial light source angle area
Figure DEST_PATH_IMAGE065
Obtaining the quality evaluation value of the defect area after each light source angle adjustment
Figure 759136DEST_PATH_IMAGE066
S6: and obtaining the probability of the quality evaluation value of each light source angle of the defect region in the quality evaluation values of all light source angles of the defect region by using the quality evaluation values of the defect region at different light source angles, and obtaining the evaluation entropy of each defect region according to the probability of the quality evaluation value of each light source angle of the defect region in the quality evaluation values of all light source angles of the defect region, and the length and the width of the defect region.
Performing evaluation entropy analysis by using the quality evaluation value corresponding to each light source angle of the defect area:
Figure 706232DEST_PATH_IMAGE068
wherein,
Figure DEST_PATH_IMAGE069
the evaluation entropy of the defective region is represented,
Figure DEST_PATH_IMAGE071
is shown as
Figure 396102DEST_PATH_IMAGE071
The individual light source angle ɸ represents the number of times of light source angle adjustment, and is not a fixed value, and the specific size is determined according to the number of times of actual adjustment of the light source angle,
Figure 955521DEST_PATH_IMAGE008
denotes the first
Figure 421138DEST_PATH_IMAGE009
The length of the block defect area is,
Figure 476818DEST_PATH_IMAGE010
denotes the first
Figure 90202DEST_PATH_IMAGE009
The width of the area of the block defect,
Figure 125417DEST_PATH_IMAGE006
indicating the length of the current film image,
Figure 507856DEST_PATH_IMAGE007
indicating the width of the current film image,
Figure 734438DEST_PATH_IMAGE072
is shown as
Figure DEST_PATH_IMAGE073
The probability of occurrence of the quality assessment value corresponding to each defect region under the angle of the light source is that each defect region is at the second position
Figure 133321DEST_PATH_IMAGE073
The probability of the quality evaluation value under each light source angle in all the quality evaluation values of the defect area is normalized by the corresponding evaluation entropy of each defect area, and the normalization range is [0,1]]. And expressing the defect degree of the defect region according to the evaluation entropy constructed by the quality evaluation index.
The process of the dynamic light source angle adjustment is as follows: when the quality evaluation value of one divided area is smaller than the threshold value, the light source is subjected to angle adjustment for multiple times, the quality evaluation value of each defect area after each angle adjustment is calculated, and the evaluation entropy of each defect area is calculated through the probability of the quality evaluation values corresponding to all light source angles of each defect area.
S7: and evaluating the defect degree of the film surface according to the maximum evaluation entropy in the evaluation entropies of all the defect areas.
And evaluating the defect degree of the current film surface according to the evaluation entropy after the dynamic light source is adjusted, wherein the larger the evaluation entropy is, the larger the change of the quality evaluation value of each defect area is in the light source angle adjusting process. Further, it is described that the higher the degree of protrusion of the film surface in each defective region is, the higher the degree of defect of the corresponding film surface is.
Namely, the larger the evaluation entropy of each defect region is, the larger the degree of surface defect of the current defect region is.
Setting an evaluation entropy threshold value for facilitating quality grade evaluation, and if the maximum evaluation entropy in the evaluation entropies of all defect regions is greater than the evaluation entropy threshold value, judging the corresponding film to be a second-class product;
and if the maximum evaluation entropy in the evaluation entropies of all the defect areas is less than or equal to the evaluation entropy threshold value, judging the corresponding film to be an equal-quality product. The quality of the first-class product is superior to that of the second-class product.
The evaluation entropy threshold is an empirical value and can be adjusted according to production requirements.
Based on the method, self-adaptive image segmentation is carried out through the gray level features of the film surface image to obtain a plurality of suspected defect images, a quality evaluation model is established by utilizing the gray level histogram features of different image areas, and whether the area is a defect area is judged; through continuously adjusting the light source angle, the defect areas in different light source angles are evaluated, and finally the film is accurately evaluated.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like that fall within the spirit and principle of the present invention are intended to be included therein.

Claims (8)

1. A film surface defect evaluation method based on a histogram and a dynamic light source is characterized by comprising the following steps:
s1: setting an initial light source angle, acquiring a film gray image under the initial light source angle, and performing self-adaptive segmentation on the acquired film gray image to obtain each segmented region;
s2: acquiring a gray level histogram of each region, and acquiring multi-order moments of the gray level histogram of the region by using the gray level mean value of each gray level in the gray level histogram;
s3: obtaining a quality evaluation value of the region by using the obtained multi-order moments of the regional gray level histogram;
s4: comparing the quality evaluation value of each area with an evaluation threshold value, and judging whether the area is a defect area;
s5: adjusting the initial light source angle, and acquiring a quality evaluation value of the area judged to be defective after each light source angle adjustment by using the methods of S2-S3;
s6: obtaining the probability of the quality evaluation value of the defect region at each light source angle in the quality evaluation values of the defect region at all light source angles by using the quality evaluation values of the defect region at different light source angles, and obtaining the evaluation entropy of each defect region according to the probability of the quality evaluation value of the defect region at each light source angle in the quality evaluation values of the defect region at all light source angles, the length and the width of the defect region;
s7: and evaluating the defect degree of the film surface according to the maximum evaluation entropy in the evaluation entropies of all the defect areas.
2. The method for evaluating the surface defects of the film based on the histogram and the dynamic light source as claimed in claim 1, wherein the method for obtaining the segmented regions in S1 is as follows:
in the row/column direction of the film gray image, if the average division column number/average division row number is larger than the maximum edge column number/maximum edge row number, performing average blocking on the film gray image in the row direction/column direction; and if the average segmentation column number/average segmentation row number is less than the maximum edge column number/maximum edge row number, performing self-adaptive blocking on the film gray-scale image in the row direction/column direction.
3. The method for evaluating defects on the surface of a film based on a histogram and a dynamic light source as claimed in claim 1, wherein the method for adjusting the initial light source angle in S5 is:
carrying out primary light source angle adjustment according to the set initial adjustment step length;
acquiring a quality evaluation value of the defect area after the first light source angle adjustment;
and calculating the absolute value of the difference between the quality evaluation value after the first light source angle adjustment and the quality evaluation value before the first light source angle adjustment, obtaining the second light source adjustment step length through the absolute value of the difference and the initial adjustment step length, obtaining the light source adjustment step length after the second light source adjustment according to the method for obtaining the second light source adjustment step length, and completing the adjustment of the light source angle.
4. The method for evaluating the surface defects of a film based on a histogram and a dynamic light source as claimed in claim 1, wherein the evaluation entropy of the defect area in S6 is expressed as:
Figure 624426DEST_PATH_IMAGE002
in the formula:
Figure DEST_PATH_IMAGE003
the evaluation entropy of the defective region is represented,
Figure 860498DEST_PATH_IMAGE004
is shown as
Figure 250153DEST_PATH_IMAGE004
Individual light source angles, ɸ, indicate the number of light source angle adjustments,
Figure DEST_PATH_IMAGE005
indicating a defectRegion at the first
Figure 474330DEST_PATH_IMAGE004
The probability of the quality assessment value at each light source angle in the quality assessment values at all light source angles of the defect region,
Figure 785488DEST_PATH_IMAGE006
indicating the length of the current film image,
Figure DEST_PATH_IMAGE007
indicating the width of the current film image,
Figure 323785DEST_PATH_IMAGE008
is shown as
Figure DEST_PATH_IMAGE009
The length of each of the defective regions is,
Figure 567947DEST_PATH_IMAGE010
is shown as
Figure 369550DEST_PATH_IMAGE009
The width of each defective region.
5. A method as claimed in claim 1, wherein the expression of the quality estimation value of the region in S3 is:
Figure 914143DEST_PATH_IMAGE012
in the formula:
Figure DEST_PATH_IMAGE013
a quality assessment value representing a region is obtained,
Figure 990553DEST_PATH_IMAGE014
the second-order moment is represented by a second-order moment,
Figure DEST_PATH_IMAGE015
the third-order moment is represented by the following equation,
Figure 620379DEST_PATH_IMAGE016
the fourth-order moment is represented by the equation,
Figure DEST_PATH_IMAGE017
the weight of the second moment is represented by,
Figure 156665DEST_PATH_IMAGE018
the weight of the third-order moment is represented,
Figure DEST_PATH_IMAGE019
representing the weight of the fourth moment.
6. A method for evaluating defects on a surface of a film based on a histogram and a dynamic light source as claimed in claim 1, wherein the method for comparing the quality evaluation value of each region with the evaluation threshold in S4 to determine whether the region is a defective region comprises:
if the quality evaluation value of the area is greater than or equal to the threshold value of the quality evaluation value, judging the area as a non-defective area;
and if the quality evaluation value of the area is smaller than the threshold value of the quality evaluation value, judging the area as a defect area.
7. The method of claim 1, wherein the evaluation of the defect level of the surface of the thin film according to the maximum evaluation entropy of the evaluation entropies of all defect regions in S7 comprises:
if the maximum evaluation entropy in the evaluation entropies of all the defect areas is larger than the evaluation entropy threshold value, judging the corresponding film as a second-class product;
and if the maximum evaluation entropy in the evaluation entropies of all the defect areas is less than or equal to the evaluation entropy threshold value, judging the corresponding film to be an equal-class product.
8. The method of claim 1, wherein an angle between an initial light source of the gray scale image of the film and a horizontal direction is 90 degrees in S1.
CN202211029544.1A 2022-08-26 2022-08-26 Film surface defect evaluation method based on histogram and dynamic light source Active CN115100208B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211029544.1A CN115100208B (en) 2022-08-26 2022-08-26 Film surface defect evaluation method based on histogram and dynamic light source

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211029544.1A CN115100208B (en) 2022-08-26 2022-08-26 Film surface defect evaluation method based on histogram and dynamic light source

Publications (2)

Publication Number Publication Date
CN115100208A true CN115100208A (en) 2022-09-23
CN115100208B CN115100208B (en) 2024-01-12

Family

ID=83301111

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211029544.1A Active CN115100208B (en) 2022-08-26 2022-08-26 Film surface defect evaluation method based on histogram and dynamic light source

Country Status (1)

Country Link
CN (1) CN115100208B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115631173A (en) * 2022-10-28 2023-01-20 兰州理工大学 Composite film defect identification method
CN116168039A (en) * 2023-04-26 2023-05-26 济宁市新华电力特种材料有限公司 Environment-friendly energy-saving aluminum silicate plate quality detection method

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101403704A (en) * 2007-12-07 2009-04-08 东华大学 On-line fault detection system and method for fluoroplastic thin film
CN102099672A (en) * 2008-07-18 2011-06-15 旭硝子株式会社 Image data processing apparatus and method for defect inspection, defect inspecting apparatus and method using the image data processing apparatus and method, board-like body manufacturing method using the defect inspecting apparatus and method, and storage medium
CN113947821A (en) * 2021-12-20 2022-01-18 南京航空航天大学 Quality control method for turbocharging blade
CN114166849A (en) * 2021-11-29 2022-03-11 广州海谷电子科技有限公司 Method for detecting defects of printed carbon lines and moisture-sensitive film of humidity sensor
CN114299066A (en) * 2022-03-03 2022-04-08 清华大学 Defect detection method and device based on salient feature pre-extraction and image segmentation

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101403704A (en) * 2007-12-07 2009-04-08 东华大学 On-line fault detection system and method for fluoroplastic thin film
CN102099672A (en) * 2008-07-18 2011-06-15 旭硝子株式会社 Image data processing apparatus and method for defect inspection, defect inspecting apparatus and method using the image data processing apparatus and method, board-like body manufacturing method using the defect inspecting apparatus and method, and storage medium
CN114166849A (en) * 2021-11-29 2022-03-11 广州海谷电子科技有限公司 Method for detecting defects of printed carbon lines and moisture-sensitive film of humidity sensor
CN113947821A (en) * 2021-12-20 2022-01-18 南京航空航天大学 Quality control method for turbocharging blade
CN114299066A (en) * 2022-03-03 2022-04-08 清华大学 Defect detection method and device based on salient feature pre-extraction and image segmentation

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115631173A (en) * 2022-10-28 2023-01-20 兰州理工大学 Composite film defect identification method
CN115631173B (en) * 2022-10-28 2023-04-18 兰州理工大学 Composite film defect identification method
CN116168039A (en) * 2023-04-26 2023-05-26 济宁市新华电力特种材料有限公司 Environment-friendly energy-saving aluminum silicate plate quality detection method

Also Published As

Publication number Publication date
CN115100208B (en) 2024-01-12

Similar Documents

Publication Publication Date Title
CN115311292B (en) Strip steel surface defect detection method and system based on image processing
CN115100208B (en) Film surface defect evaluation method based on histogram and dynamic light source
CN115082467B (en) Building material welding surface defect detection method based on computer vision
CN114494210B (en) Plastic film production defect detection method and system based on image processing
CN115222741A (en) Cable surface defect detection method
CN109035195B (en) Fabric defect detection method
CN115018844B (en) Plastic film quality evaluation method based on artificial intelligence
CN116912261B (en) Plastic mold injection molding surface defect detection method
CN114723705A (en) Cloth flaw detection method based on image processing
CN115359053B (en) Intelligent detection method and system for defects of metal plate
CN115035106B (en) Strip steel defect intelligent detection method
CN114882026B (en) Sensor shell defect detection method based on artificial intelligence
CN114881915A (en) Symmetry-based mobile phone glass cover plate window area defect detection method
CN107240086B (en) A kind of fabric defects detection method based on integral nomography
CN116664565A (en) Hidden crack detection method and system for photovoltaic solar cell
CN116228768B (en) Method for detecting scratches on surface of electronic component
CN116883408B (en) Integrating instrument shell defect detection method based on artificial intelligence
CN116152242B (en) Visual detection system of natural leather defect for basketball
CN118037722B (en) Copper pipe production defect detection method and system
CN116071363B (en) Automatic change shaped steel intelligent production monitoring system
CN117274291B (en) Method for detecting mold demolding residues based on computer vision
CN116630304B (en) Lithium battery mold processing detection method and system based on artificial intelligence
CN116990323A (en) High-precision printing plate visual detection system
CN114119603A (en) Image processing-based snack box short shot defect detection method
CN115346126A (en) Side slope crack identification method

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
TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20231213

Address after: No. 317 Shuangquan Road, Lixin Street, Gangcheng District, Jinan City, Shandong Province, 250000

Applicant after: Shandong Lanhai Crystal Technology Co.,Ltd.

Address before: 226000 Taijiao Industrial Park, Huilong Town, Qidong City, Nantong City, Jiangsu Province

Applicant before: NANTONG SANXIN PLASTICS EQUIPMENT TECHNOLOGY Co.,Ltd.

GR01 Patent grant
GR01 Patent grant