CN114494210A - Plastic film production defect detection method and system based on image processing - Google Patents

Plastic film production defect detection method and system based on image processing Download PDF

Info

Publication number
CN114494210A
CN114494210A CN202210106633.5A CN202210106633A CN114494210A CN 114494210 A CN114494210 A CN 114494210A CN 202210106633 A CN202210106633 A CN 202210106633A CN 114494210 A CN114494210 A CN 114494210A
Authority
CN
China
Prior art keywords
gray
feature extraction
plastic film
abnormal
defect
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
CN202210106633.5A
Other languages
Chinese (zh)
Other versions
CN114494210B (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.)
Jiangsu Haoshang New Material Technology Co ltd
Original Assignee
Jiangsu Haoshang New Material 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 Jiangsu Haoshang New Material Technology Co ltd filed Critical Jiangsu Haoshang New Material Technology Co ltd
Priority to CN202210106633.5A priority Critical patent/CN114494210B/en
Publication of CN114494210A publication Critical patent/CN114494210A/en
Application granted granted Critical
Publication of CN114494210B publication Critical patent/CN114494210B/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
    • 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
    • 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/70Denoising; Smoothing
    • 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
    • G06T7/00Image analysis
    • G06T7/90Determination of colour characteristics
    • 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/20024Filtering details
    • G06T2207/20032Median filtering
    • 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, in particular to a plastic film production defect detection method based on image processing, which comprises the following steps: acquiring a gray scale image of the plastic film; performing Gaussian kernel convolution on each feature extraction space in the gray level image to obtain each Gaussian kernel template gray level value; constructing a gradient direction histogram, and adjusting standard deviation parameters of a Gaussian convolution function according to the histogram to obtain the gray value of each Gaussian kernel template after adjustment; obtaining a gray change descriptor of each Gaussian kernel template according to each adjusted gray value, and further obtaining a gray change descriptor of the feature extraction space; obtaining an abnormal region in the feature extraction space according to the gray change descriptor of the feature extraction space; determining all defect areas by utilizing the gray level change conditions of the abnormal areas and the normal areas before and after the light source is enhanced; and carrying out edge detection on the defect area to obtain a defect position. The method is used for detecting the defects of the plastic film, and the defect detection efficiency can be improved by the method.

Description

Plastic film production defect detection method and system based on image processing
Technical Field
The application relates to the field of defect detection, in particular to a plastic film production defect detection method and system based on image processing.
Background
Plastic films are widely used in life because of their good properties. In the production process of the plastic film, various defects exist on the surface of the produced plastic film due to improper operation or process problems, and the use of the plastic film is influenced. Therefore, it is necessary to detect defects in the produced plastic film.
In the prior art, the defect detection of the plastic film is mainly performed through manual detection, and the defect detection is also performed through combining an image recognition technology with different light beams and utilizing brightness change.
However, the problems in the prior art are: the workload of detecting the defects of the plastic film manually is large, and the omission ratio is high. The method for detecting brightness change by utilizing image recognition is characterized in that due to the defect detection of the plastic film, the defect detection performed by the light source will inevitably cause reflection, so that the brightness change is influenced, and the defect detection is possibly influenced. Therefore, there is a need for a method for improving the efficiency and accuracy of defect detection of plastic films.
Disclosure of Invention
The invention provides a plastic film production defect detection method based on image processing, which comprises the following steps: acquiring a gray scale image of the plastic film; performing Gaussian kernel convolution on each feature extraction space in the gray level image to obtain each Gaussian kernel template gray level value; constructing a gradient direction histogram, and adjusting standard deviation parameters of a Gaussian convolution function according to the histogram to obtain the gray value of each Gaussian kernel template after adjustment; obtaining a gray change descriptor of each Gaussian kernel template according to each adjusted gray value, and further obtaining a gray change descriptor of the feature extraction space; obtaining an abnormal region in the feature extraction space according to the gray change descriptor of the feature extraction space; determining all defect areas by utilizing the gray level change conditions of the abnormal areas and the normal areas before and after the light source enhancement; compared with the prior art, the method has the advantages that the characteristic extraction space is subjected to Gaussian kernel convolution, a parameter adjusting model is built through a gradient histogram inside the Gaussian kernel, parameters in a Gaussian convolution function are adjusted in a self-adaptive mode to obtain the gray change descriptor index, the gray change characteristic of the surface of the plastic film can be obtained quickly, and the rough positioning of the surface defect of the plastic film is realized according to the standard deviation parameter of dynamic change. Furthermore, the method and the device can accurately locate the defect area by performing light source enhancement on the surface of the abnormal plastic film and utilizing the gray scale change degree of the defect rough location area of the plastic film and the contrast change of the peripheral area, so that the defect position of the plastic film can be accurately obtained, and the gray scale change error caused by the vibration of the plastic film can be reduced by changing the light source intensity.
In order to achieve the purpose, the invention adopts the following technical scheme that the plastic film production defect detection method based on image processing comprises the following steps:
and acquiring a surface image and a gray scale image of the plastic film.
And carrying out region division on the gray level image to obtain all feature extraction spaces.
And performing Gaussian kernel convolution on each feature extraction space to obtain each Gaussian kernel template gray value.
And obtaining a gradient direction histogram of each feature extraction space according to the gray value of the pixel point in each Gaussian kernel template.
And adjusting the standard deviation parameters in the Gaussian convolution function according to the mean value and the variance of the gradient direction histogram of each feature extraction space, and performing Gaussian kernel convolution on each feature extraction space by using the Gaussian convolution function after the standard deviation parameters are adjusted to obtain the gray value of each adjusted Gaussian kernel template.
And taking the gray value adjusted by each Gaussian kernel template as a gray change descriptor of each Gaussian kernel template, and obtaining the gray change descriptors of all the feature extraction spaces according to the average value of the gray change descriptors of all the Gaussian kernel templates of each feature extraction space.
And obtaining abnormal regions in all the feature extraction spaces according to the gray change descriptors of the feature extraction spaces.
And determining the defect areas in all the abnormal areas by utilizing the gray level change conditions of the abnormal areas and the normal areas before and after the light source is enhanced.
And carrying out edge detection on the defect area to obtain the defect position in each abnormal area.
Further, in the method for detecting defects in plastic film production based on image processing, the histogram of gradient directions of each feature extraction space is obtained as follows:
and traversing the sliding window of each characteristic extraction space by using a Gaussian kernel template, accumulating the gradient values corresponding to all pixel points in each angle interval range by taking the central pixel point in each template as the center of a circle and taking each 20 degrees as a unit angle interval, and obtaining the accumulation result of all angle intervals.
And obtaining a gradient direction histogram of each feature extraction space according to the accumulation result of each angle interval.
Further, in the plastic film production defect detection method based on image processing, the gray values of the adjusted gaussian kernel templates are obtained as follows:
and acquiring the mean and the variance of the gradient direction histograms of all the feature extraction spaces.
And constructing an adjusting model according to the mean value and the variance of the gradient direction histogram of each feature extraction space, and adjusting the standard deviation parameters in the Gaussian convolution function to obtain the Gaussian convolution function after each standard deviation parameter is adjusted.
And performing Gaussian kernel convolution on each feature extraction space by using the Gaussian convolution function after the standard deviation parameter is adjusted to obtain the gray value of each adjusted Gaussian kernel template.
Further, in the method for detecting the production defects of the plastic film based on the image processing, the expression of the adjustment model is as follows:
Figure BDA0003493675540000031
where μ is the mean, σ, of the gradient direction histogram of each feature extraction space2′The variance of the gradient direction histogram of the space is extracted for each feature,
Figure BDA0003493675540000032
to adjust the model parameters.
Further, according to the plastic film production defect detection method based on image processing, the abnormal regions in all the feature extraction spaces are obtained as follows:
setting a threshold value, judging the gray level change descriptors of all the feature extraction spaces, and taking the feature extraction space with the gray level change descriptors larger than the threshold value as an abnormal space.
And judging the gray change descriptors of the Gaussian kernel templates in the abnormal space, and taking the Gaussian kernel templates with the gray change descriptors larger than a threshold value as abnormal regions to obtain the abnormal regions in all the feature extraction spaces.
Further, in the method for detecting the production defects of the plastic film based on the image processing, the defect areas in all the abnormal areas are determined as follows:
and obtaining and subtracting the gray level mean values of the abnormal regions and the normal regions before the light source is enhanced to obtain the gray level mean value difference values of the abnormal regions and the normal regions before the light source is enhanced.
And obtaining and subtracting the gray level mean values of the abnormal regions and the normal regions after the light source is enhanced to obtain the gray level mean value difference values of the abnormal regions and the normal regions after the light source is enhanced.
And subtracting the gray level mean value difference value of each abnormal area and the normal area after the light source is enhanced from the gray level mean value difference value of each abnormal area and the normal area before the light source is enhanced to obtain the change of the gray level mean value difference value before and after the light source is enhanced.
Setting a threshold value, judging the change of the gray level average difference value before and after the light source is enhanced, determining the abnormal area with the gray level average difference value before and after the light source is enhanced being larger than the threshold value as the defect area, and determining the defect area in all the abnormal areas.
Further, in the method for detecting the production defects of the plastic film based on the image processing, the defect positions in the different regions are obtained as follows:
and performing Sobel operator edge detection on each defect region, and obtaining the defect position in each abnormal region through the gray gradient in different directions.
On the other hand, the invention also provides a plastic film production defect detection system based on image processing, which comprises an acquisition unit, a processing unit, a calculation unit and a control unit:
and the acquisition unit is used for acquiring the surface image of the plastic film on the production line by arranging the camera right above the inlet of the coiling machine.
The processing unit is used for preprocessing the image acquired by the acquisition unit by using the data master controller to obtain a plastic film gray image; and further extracting the characteristics of the gray level image to obtain a coarse positioning abnormal area and a coarse positioning normal area.
The calculation unit calculates the gray level change values before and after the light source enhancement of the coarse positioning abnormal area and the normal area acquired by the processing unit by using the data master controller; and further obtaining the defect position according to the gray level change value.
And the control unit and the data master controller control and adjust the plastic film production process according to the defect condition of the defect position obtained by the calculation unit.
The invention has the beneficial effects that:
according to the method, the characteristic extraction space is subjected to Gaussian kernel convolution, a parameter adjusting model is constructed through a gradient histogram in the Gaussian kernel, parameters in a Gaussian convolution function are adjusted in a self-adaptive mode, so that a gray change descriptor index is obtained, the gray change characteristic of the surface of the plastic film can be rapidly obtained, and the rough positioning of the surface defect of the plastic film is realized according to the standard deviation parameter of dynamic change.
Furthermore, the method and the device can accurately locate the defect area by performing light source enhancement on the surface of the abnormal plastic film and utilizing the gray scale change degree of the defect rough location area of the plastic film and the contrast change of the peripheral area, so that the defect position of the plastic film can be accurately obtained, and the gray scale change error caused by the vibration of the plastic film can be reduced by changing the light source intensity.
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 a method for detecting defects in the production of plastic films according to embodiment 1 of the present invention;
FIG. 2 is a schematic flow chart of a method for detecting defects in the production of plastic films according to embodiment 2 of the present invention;
fig. 3 is a block diagram of a system for detecting defects in plastic film production provided in embodiment 3 of 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
The embodiment of the invention provides a plastic film production defect detection method based on image processing, which comprises the following steps of:
s101, obtaining a plastic film surface image and a gray scale image thereof.
The gray scale map is also called a gray scale map. The relationship between white and black is logarithmically divided into several levels, called gray scale. The gray scale is divided into 256 steps.
And S102, carrying out region division on the gray level image to obtain all feature extraction spaces.
The feature extraction space is equivalent to partitioning the entire gray scale image.
S103, performing Gaussian kernel convolution on each feature extraction space to obtain each Gaussian kernel template gray value.
The convolution operation is to perform left-to-right and top-to-bottom sliding on the image in the form of a window by the convolution kernel, so as to obtain a new image.
And S104, obtaining a gradient direction histogram of each feature extraction space according to the gray value of the pixel point in each Gaussian kernel template.
Wherein the histogram of gradient directions is used for subsequent adjustment of the gaussian convolution function.
And S105, adjusting standard deviation parameters in the Gaussian convolution function according to the mean value and the variance of the gradient direction histogram of each feature extraction space, and performing Gaussian kernel convolution on each feature extraction space by using the Gaussian convolution function after the standard deviation parameters are adjusted to obtain the gray value of each adjusted Gaussian kernel template.
Wherein the model parameters are adjusted
Figure BDA0003493675540000051
The larger the standard deviation parameter σ of the corresponding gaussian convolution function.
And S106, taking the adjusted gray value of each Gaussian kernel template as a gray change descriptor of each Gaussian kernel template, and obtaining the gray change descriptors of all the feature extraction spaces according to the mean value of the gray change descriptors of all the Gaussian kernel templates of each feature extraction space.
The abnormal region can be obtained through the gray change descriptors of the feature extraction spaces.
And S107, obtaining abnormal regions in all the feature extraction spaces according to the gray change descriptors of the feature extraction spaces.
Setting a threshold value, and taking a feature extraction space with the gray change descriptor larger than the threshold value as an abnormal space.
And S108, determining the defect areas in all the abnormal areas by utilizing the gray scale change conditions of the abnormal areas and the normal areas before and after the light source is enhanced.
Wherein, the larger the gray scale change between the abnormal region and the normal region before and after the light source is enhanced, the larger the possibility of the defect existing in the abnormal region is.
And S109, carrying out edge detection on the defect area to obtain the defect position in each abnormal area.
The purpose of edge detection is to identify points in the digital image where the brightness changes are significant.
The beneficial effect of this embodiment lies in:
in the embodiment, the characteristic extraction space is subjected to Gaussian kernel convolution, a parameter adjusting model is constructed through a gradient histogram in the Gaussian kernel, parameters in a Gaussian convolution function are adaptively adjusted to obtain a gray change descriptor index, the gray change characteristic of the surface of the plastic film can be rapidly obtained, and the rough positioning of the surface defect of the plastic film is realized according to the standard deviation parameter of dynamic change.
Furthermore, in the embodiment, the light source is enhanced on the surface of the abnormal plastic film, the defect area is accurately positioned by utilizing the gray scale change degree of the defect rough positioning area on the surface of the plastic film and the contrast change of the defect rough positioning area and the peripheral area, the defect position of the plastic film can be accurately obtained, and the gray scale change error caused by the vibration of the plastic film can be reduced by changing the light source intensity.
Example 2
The main purposes of this embodiment are: and detecting the production defects in the plastic film production process through the plastic film image and the set light source.
The embodiment of the invention provides a plastic film production defect detection method based on image processing, which comprises the following steps of:
s201, adding an external light source, and acquiring a surface image of the plastic film.
By installing the image acquisition device at the coiler inlet, the image acquisition device comprises: a common RGB camera and a planar light source. A planar light source is used for polishing the surface of the plastic film, and a camera is used for collecting the surface image of the plastic film. The planar light source and the camera are fixed in position, and the light source is free from scattering influence. The detection object is a white transparent plastic film, and the main defects are as follows: gel defects.
S202, preprocessing the image.
The purpose of this step is: and preprocessing the image. The method has the advantage that the influence of noise in the image on detection can be reduced by utilizing a preprocessing method.
The input is as follows: and (3) carrying out image preprocessing on the surface image of the plastic film, and outputting: the processed image.
The method comprises the steps of collecting an image after a light source is polished by a camera, carrying out median filtering denoising processing on the image, eliminating noise with interference, carrying out graying processing on the denoised image to obtain a gray level image on the surface of the plastic film, wherein graying adopts R, G and B three-channel mean graying, and is consistent with a conversion method of a brightness (I) channel in the HSI color space conversion process, so that gray level change can be equivalently understood as brightness change.
And S203, constructing a gray change descriptor.
The purpose of this step is: and performing gray feature extraction through the surface image to construct a gray change descriptor. The method has the advantages that the gray scale change descriptor can be used for carrying out feature description on the surface of the plastic film, and the subsequent defect detection of the plastic film is facilitated.
The input is as follows: the processed image is subjected to gray change descriptor extraction, and the output is as follows: and roughly positioning an abnormal detection area.
It should be noted that, in order to improve the plastic film surface detection speed, a continuous multi-frame image acquisition mode is adopted for a moving plastic film production line, one frame of image corresponds to a plastic film image with a fixed size, no overlapping part exists between continuous multi-frame images, and the plastic film movement speed is 10 m/min.
Obtaining a gray level change descriptor through the image surface characteristics, wherein the specific obtaining process is as follows:
1. firstly, constructing a feature extraction space with a fixed size of NxN on the surface of a plastic film, wherein N is a self-adaptive adjustment parameter, performing Gaussian kernel convolution inside each feature extraction space, and a Gaussian kernel template is mxm, wherein m is<N, mn (representing m divided by N), the gaussian convolution function is:
Figure BDA0003493675540000071
wherein, sigma represents the standard deviation of the Gaussian template, g (x, y) represents the gray value of the pixel point with the coordinate of (x, y),
Figure BDA0003493675540000075
representing the mean value of the gray scale of the gaussian template.
2. Then, a histogram of gradient directions (HOG) is obtained for the image in the feature extraction space, and the histogram of gradient directions is obtained by: in the process of sliding a Gaussian core template window, taking a central pixel point in the template as a circle center, taking every 20 degrees as a unit angle interval, accumulating the gradient values corresponding to all pixel points in the angle interval range, and constructing a gradient direction histogram, wherein each angle interval corresponds to an accumulation result.
3. The standard deviation parameter sigma of the Gaussian convolution function is determined through the gradient value distribution of the gradient direction histogram, under the normal condition, the surface of a normal plastic film is smooth and free of defects, and the light source is uniformly distributed on the surface, so that no gradient exists between pixel points generally, the gradient direction histogram should be close to 0, and correspondingly, the standard deviation sigma of the Gaussian convolution function is → ∞. Therefore, the mean μ and variance σ of the histogram are passed through2′Adjusting a standard deviation parameter sigma in the Gaussian convolution function to construct an adjusting model:
Figure BDA0003493675540000072
adjusting model parameters
Figure BDA0003493675540000074
The larger the standard deviation parameter σ of the corresponding gaussian convolution function.
4. Sliding the Gaussian kernel template on the characteristic extraction space of NxN, and enabling the size Ga of the Gaussian convolution function corresponding to the Gaussian kernel templateiAs a grey scale change descriptor α for each gaussian kernel templatei. Then, the gray-scale change descriptor mean of all Gaussian kernel templates in all feature extraction spaces
Figure BDA0003493675540000073
As a grey scale change descriptor of the current feature extraction space.
And S204, acquiring a coarse positioning abnormity detection area.
Gray scale change descriptor mean threshold M using feature extraction space1And (5) performing defect evaluation on the feature extraction space of the continuous frame images, and describing the average value mu of the gray change descriptors by using the average value mug>M1Is regarded as an abnormal space, and the descriptor alpha is described according to the gray scale change of each Gaussian kernel template in the abnormal spaceiExtracting abnormal region to obtain alphaiAnd extracting the abnormal region more than 0.2 to obtain a roughly positioned abnormal region.
It should be noted that the gray scale change descriptor is mainly used to characterize the size and speed of the gray scale change in the current image space. The gray scale change descriptor can be used for quickly acquiring possible defect areas on the surface of the current plastic film.
And S205, performing fine detection on the surface of the plastic film.
The purpose of this step is: and acquiring the change condition of the gray change descriptor of the roughly positioned defect area through the enhanced light source. The method has the advantages that the surface defects of the plastic film can be accurately detected, and the influence caused by vibration of the plastic film is eliminated.
The input is as follows: and roughly positioning an abnormal detection area, performing enhanced light source processing, and outputting: plastic film surface defect images.
And performing light source enhancement through the roughly positioned abnormal detection area in the obtained feature extraction space, improving the overall brightness of the planar light source, and re-acquiring the feature extraction space image. The surface of a normal plastic film area is smooth, so the brightness change is obvious; due to the existence of gel defects, the abnormal plastic film region can scatter and reflect light paths, so that the brightness distribution is uneven, and the contrast with other regions is high.
Extracting a space image according to the re-collected features, and carrying out gray feature analysis of the coarse positioning abnormal detection area, wherein the specific process is as follows:
1. firstly, obtaining the gray average value of the abnormal detection area before the light source is enhanced
Figure BDA0003493675540000081
And a method of producing the sameMean value of the gray levels of his normal area
Figure BDA0003493675540000082
Obtaining the mean difference of gray levels
Figure BDA0003493675540000083
Then, the gray average value of the abnormal detection area after the light source is enhanced is obtained
Figure BDA0003493675540000084
And the mean value of the gray levels of other normal regions
Figure BDA0003493675540000085
Obtaining the mean difference of gray levels
Figure BDA0003493675540000086
2. The change c' -c > epsilon according to the gray-level mean difference before and after light source enhancement, where the magnitude of epsilon is related to the magnitude of light source enhancement, where the empirical value takes 10. To determine whether gel defects are present in the abnormal inspection area.
3. And then, carrying out Sobel operator edge detection on the pixel points in the abnormal detection region, and determining the accurate positions of the gel defects in the abnormal region through the gray gradients in different directions. The Sobel operator edge detection algorithm is a known algorithm, the implementation process is not described too much, and the gray gradient direction adopted by the Sobel operator in the embodiment is perpendicular to and parallel to the horizontal axis of the image coordinate system.
4. And finally, obtaining an accurate gel defect position in the abnormal detection area, and realizing the defect detection and positioning of the surface of the plastic film.
The beneficial effect of this embodiment lies in:
in the embodiment, the characteristic extraction space is subjected to Gaussian kernel convolution, a parameter adjusting model is constructed through a gradient histogram in the Gaussian kernel, parameters in a Gaussian convolution function are adaptively adjusted to obtain a gray change descriptor index, the gray change characteristic of the surface of the plastic film can be rapidly obtained, and the rough positioning of the surface defect of the plastic film is realized according to the standard deviation parameter of dynamic change.
Furthermore, in the embodiment, the light source is enhanced on the surface of the abnormal plastic film, the defect area is accurately positioned by utilizing the gray scale change degree of the defect rough positioning area on the surface of the plastic film and the contrast change of the defect rough positioning area and the peripheral area, the defect position of the plastic film can be accurately obtained, and the gray scale change error caused by the vibration of the plastic film can be reduced by changing the light source intensity.
Example 3
The embodiment of the invention provides a plastic film production defect detection system based on image processing, which comprises an acquisition unit, a processing unit, a calculation unit and a control unit, as shown in FIG. 3:
the acquisition unit is used for acquiring the surface image of the plastic film on the production line, and the camera is arranged right above the inlet of the coiling machine;
the processing unit inputs the image acquired by the acquisition unit into the data master controller, and the data master controller is used for preprocessing the image to obtain a surface gray image of the plastic film; extracting the characteristics of the gray scale image to obtain a gray scale change descriptor of the plastic film, and evaluating the defects of the plastic film according to the gray scale change descriptor to obtain a coarse positioning abnormal area;
the computing unit is used for performing enhanced light source processing on the abnormal area obtained by the processing unit by using the data master controller, calculating gray level change values of the abnormal area and the normal area before and after the enhanced light source, obtaining the abnormal area with the defect according to the gray level change values, and performing edge detection on the abnormal area with the defect to obtain the defect position of the surface of the plastic film;
and the control unit adjusts the plastic film production process by using the data master controller according to the defect condition of the defect position of the surface of the plastic film obtained by the calculation unit.
The beneficial effect of this embodiment lies in:
in the embodiment, the characteristic extraction space is subjected to Gaussian kernel convolution, a parameter adjusting model is constructed through a gradient histogram in the Gaussian kernel, parameters in a Gaussian convolution function are adaptively adjusted to obtain a gray change descriptor index, the gray change characteristic of the surface of the plastic film can be rapidly obtained, and the rough positioning of the surface defect of the plastic film is realized according to the standard deviation parameter of dynamic change.
Furthermore, in the embodiment, the light source is enhanced on the surface of the abnormal plastic film, the defect area is accurately positioned by utilizing the gray scale change degree of the defect rough positioning area on the surface of the plastic film and the contrast change of the defect rough positioning area and the peripheral area, the defect position of the plastic film can be accurately obtained, and the gray scale change error caused by the vibration of the plastic film can be reduced by changing the light source intensity.
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 plastic film production defect detection method based on image processing is characterized by comprising the following steps:
acquiring a surface image and a gray scale image of the plastic film;
carrying out region division on the gray level image to obtain all feature extraction spaces;
performing Gaussian kernel convolution on each feature extraction space to obtain each Gaussian kernel template gray value;
obtaining a gradient direction histogram of each feature extraction space according to the gray value of a pixel point in each Gaussian kernel template;
adjusting standard deviation parameters in the Gaussian convolution function according to the mean value and the variance of the gradient direction histogram of each feature extraction space, and performing Gaussian kernel convolution on each feature extraction space by using the Gaussian convolution function after the standard deviation parameters are adjusted to obtain the gray value of each adjusted Gaussian kernel template;
the gray value adjusted by each Gaussian kernel template is used as a gray change descriptor of each Gaussian kernel template, and the gray change descriptors of all the feature extraction spaces are obtained according to the mean value of the gray change descriptors of all the Gaussian kernel templates of each feature extraction space;
obtaining abnormal regions in all the feature extraction spaces according to the gray change descriptors of the feature extraction spaces;
determining defect areas in all abnormal areas by utilizing gray level change conditions of the abnormal areas and the normal areas before and after light source enhancement;
and carrying out edge detection on the defect area to obtain the defect position in each abnormal area.
2. The image processing-based plastic film production defect detection method as claimed in claim 1, wherein the gradient direction histogram of each feature extraction space is obtained as follows:
performing sliding window traversal on each feature extraction space by using a Gaussian kernel template, wherein the center pixel point in each template is used as the center of a circle, and the center pixel point is 20 th0Accumulating the gradient values corresponding to all pixel points in each angle interval range to obtain the accumulation results of all angle intervals;
and obtaining a gradient direction histogram of each feature extraction space according to the accumulation result of each angle interval.
3. The image processing-based plastic film production defect detection method as claimed in claim 1, wherein the adjusted gray value of each gaussian kernel template is obtained as follows:
obtaining the mean value and the variance of the gradient direction histogram of each feature extraction space;
establishing an adjusting model according to the mean value and the variance of the gradient direction histogram of each feature extraction space, and adjusting the standard deviation parameters in the Gaussian convolution function to obtain the Gaussian convolution function after each standard deviation parameter is adjusted;
and performing Gaussian kernel convolution on each feature extraction space by using the Gaussian convolution function after the standard deviation parameter is adjusted to obtain the gray value of each adjusted Gaussian kernel template.
4. The image processing-based plastic film production defect detection method as claimed in claim 3, wherein the expression of the adjustment model is as follows:
Figure FDA0003493675530000021
where μ is the mean, σ, of the gradient direction histogram of each feature extraction space2′The variance of the gradient direction histogram of the space is extracted for each feature,
Figure FDA0003493675530000022
to adjust the model parameters.
5. The image processing-based plastic film production defect detection method according to claim 1, wherein the abnormal regions in all the feature extraction spaces are obtained as follows:
setting a threshold value, judging the gray change descriptors of all the feature extraction spaces, and taking the feature extraction space with the gray change descriptors larger than the threshold value as an abnormal space;
and judging the gray change descriptors of the Gaussian kernel templates in the abnormal space, and taking the Gaussian kernel templates with the gray change descriptors larger than a threshold value as abnormal regions to obtain the abnormal regions in all the feature extraction spaces.
6. The image processing-based plastic film production defect detection method according to claim 1, wherein the defect areas in all the abnormal areas are determined as follows:
acquiring and subtracting the gray level mean values of the abnormal regions and the normal regions before the light source is enhanced to obtain the gray level mean value difference values of the abnormal regions and the normal regions before the light source is enhanced;
obtaining and subtracting the gray level mean values of the abnormal areas and the normal areas after the light source is enhanced to obtain the gray level mean value difference values of the abnormal areas and the normal areas after the light source is enhanced;
the gray level mean value difference value of each abnormal area and the normal area after the light source is enhanced is subtracted from the gray level mean value difference value of each abnormal area and the normal area before the light source is enhanced, and the change of the gray level mean value difference value before and after the light source is enhanced is obtained;
setting a threshold value, judging the change of the gray level average difference value before and after the light source is enhanced, determining the abnormal area with the gray level average difference value before and after the light source is enhanced being larger than the threshold value as the defect area, and determining the defect area in all the abnormal areas.
7. The image processing-based plastic film production defect detection method as claimed in claim 1, wherein the defect positions in the respective abnormal regions are obtained as follows:
and performing Sobel operator edge detection on each defect region, and obtaining the defect position in each abnormal region through the gray gradient in different directions.
8. The plastic film production defect detection system based on image processing is characterized by comprising an acquisition unit, a processing unit, a calculation unit and a control unit:
the collecting unit is used for collecting the surface image of the plastic film on the production line, and the camera is arranged right above the inlet of the coiling machine;
the processing unit is used for preprocessing the image acquired by the acquisition unit by using the data master controller to obtain a plastic film gray image; further extracting the characteristics of the gray level image to obtain a coarse positioning abnormal area and a normal area;
the calculation unit calculates the gray level change values before and after the light source enhancement of the coarse positioning abnormal area and the normal area acquired by the processing unit by using the data master controller; further obtaining the defect position according to the gray level change value;
and the control unit and the data master controller control and adjust the plastic film production process according to the defect condition of the defect position obtained by the calculation unit.
CN202210106633.5A 2022-01-28 2022-01-28 Plastic film production defect detection method and system based on image processing Active CN114494210B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210106633.5A CN114494210B (en) 2022-01-28 2022-01-28 Plastic film production defect detection method and system based on image processing

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210106633.5A CN114494210B (en) 2022-01-28 2022-01-28 Plastic film production defect detection method and system based on image processing

Publications (2)

Publication Number Publication Date
CN114494210A true CN114494210A (en) 2022-05-13
CN114494210B CN114494210B (en) 2023-03-24

Family

ID=81477441

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210106633.5A Active CN114494210B (en) 2022-01-28 2022-01-28 Plastic film production defect detection method and system based on image processing

Country Status (1)

Country Link
CN (1) CN114494210B (en)

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114782475A (en) * 2022-06-16 2022-07-22 南通金石包装印刷有限公司 Corrugated carton line pressing defect detection optimization method based on artificial intelligence system
CN114792314A (en) * 2022-06-21 2022-07-26 南通永卓金属制品有限公司 Laser beam-based metal mesh defect detection method and artificial intelligence system
CN114972348A (en) * 2022-08-01 2022-08-30 山东尚雅建材有限公司 Seam beautifying effect detection method based on image processing
CN114972354A (en) * 2022-08-02 2022-08-30 济宁金筑新型建材科技有限公司 Image processing-based autoclaved aerated concrete block production control method and system
CN115082482A (en) * 2022-08-23 2022-09-20 山东优奭趸泵业科技有限公司 Metal surface defect detection method
CN115131353A (en) * 2022-08-30 2022-09-30 海门市元绒纺织科技有限公司 Flat screen printing textile production abnormity identification and positioning method and system
CN116973367A (en) * 2023-07-05 2023-10-31 广东汇发塑业科技有限公司 Method for inspecting degradation defect position of biodegradable film
CN117455914A (en) * 2023-12-25 2024-01-26 青岛海天成光伏新能源有限公司 Intelligent control method and system for production line of photovoltaic junction box
CN117811218A (en) * 2024-02-29 2024-04-02 广东电网有限责任公司 Unmanned aerial vehicle transmission and transformation and distribution integrated collaborative inspection method

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108022233A (en) * 2016-10-28 2018-05-11 沈阳高精数控智能技术股份有限公司 A kind of edge of work extracting method based on modified Canny operators
CN110570411A (en) * 2019-09-05 2019-12-13 中国科学院长春光学精密机械与物理研究所 mura detection method and device based on coefficient of variation
CN111325728A (en) * 2020-02-19 2020-06-23 南方科技大学 Product defect detection method, device, equipment and storage medium
CN112098416A (en) * 2020-08-21 2020-12-18 深圳大学 Fan blade defect detection method and system based on machine vision

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108022233A (en) * 2016-10-28 2018-05-11 沈阳高精数控智能技术股份有限公司 A kind of edge of work extracting method based on modified Canny operators
CN110570411A (en) * 2019-09-05 2019-12-13 中国科学院长春光学精密机械与物理研究所 mura detection method and device based on coefficient of variation
CN111325728A (en) * 2020-02-19 2020-06-23 南方科技大学 Product defect detection method, device, equipment and storage medium
CN112098416A (en) * 2020-08-21 2020-12-18 深圳大学 Fan blade defect detection method and system based on machine vision

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
沈红雷: "基于机器视觉技术的塑料制品缺陷检测研究", 《塑料科技》 *

Cited By (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114782475A (en) * 2022-06-16 2022-07-22 南通金石包装印刷有限公司 Corrugated carton line pressing defect detection optimization method based on artificial intelligence system
CN114792314A (en) * 2022-06-21 2022-07-26 南通永卓金属制品有限公司 Laser beam-based metal mesh defect detection method and artificial intelligence system
CN114972348A (en) * 2022-08-01 2022-08-30 山东尚雅建材有限公司 Seam beautifying effect detection method based on image processing
CN114972348B (en) * 2022-08-01 2022-09-30 山东尚雅建材有限公司 Seam beautifying effect detection method based on image processing
CN114972354A (en) * 2022-08-02 2022-08-30 济宁金筑新型建材科技有限公司 Image processing-based autoclaved aerated concrete block production control method and system
CN115082482B (en) * 2022-08-23 2022-11-22 山东优奭趸泵业科技有限公司 Metal surface defect detection method
CN115082482A (en) * 2022-08-23 2022-09-20 山东优奭趸泵业科技有限公司 Metal surface defect detection method
CN115131353A (en) * 2022-08-30 2022-09-30 海门市元绒纺织科技有限公司 Flat screen printing textile production abnormity identification and positioning method and system
CN116973367A (en) * 2023-07-05 2023-10-31 广东汇发塑业科技有限公司 Method for inspecting degradation defect position of biodegradable film
CN116973367B (en) * 2023-07-05 2024-01-30 广东汇发塑业科技有限公司 Method for inspecting degradation defect position of biodegradable film
CN117455914A (en) * 2023-12-25 2024-01-26 青岛海天成光伏新能源有限公司 Intelligent control method and system for production line of photovoltaic junction box
CN117455914B (en) * 2023-12-25 2024-03-15 青岛海天成光伏新能源有限公司 Intelligent control method and system for production line of photovoltaic junction box
CN117811218A (en) * 2024-02-29 2024-04-02 广东电网有限责任公司 Unmanned aerial vehicle transmission and transformation and distribution integrated collaborative inspection method
CN117811218B (en) * 2024-02-29 2024-05-14 广东电网有限责任公司 Unmanned aerial vehicle transmission and transformation and distribution integrated collaborative inspection method

Also Published As

Publication number Publication date
CN114494210B (en) 2023-03-24

Similar Documents

Publication Publication Date Title
CN114494210B (en) Plastic film production defect detection method and system based on image processing
CN109490316B (en) Surface defect detection algorithm based on machine vision
CN108921176B (en) Pointer instrument positioning and identifying method based on machine vision
CN109507192B (en) Magnetic core surface defect detection method based on machine vision
CN116168026B (en) Water quality detection method and system based on computer vision
CN115222741A (en) Cable surface defect detection method
CN115018844B (en) Plastic film quality evaluation method based on artificial intelligence
WO2021109697A1 (en) Character segmentation method and apparatus, and computer-readable storage medium
CN117237368B (en) Bridge crack detection method and system
CN115690105B (en) Milling cutter scratch detection method based on computer vision
CN116310845B (en) Intelligent monitoring system for sewage treatment
CN114881915A (en) Symmetry-based mobile phone glass cover plate window area defect detection method
CN111179362B (en) Test paper color uniformity detection method based on dynamic illumination correction algorithm
CN116993726B (en) Mineral casting detection method and system
CN117557820B (en) Quantum dot optical film damage detection method and system based on machine vision
CN116883408B (en) Integrating instrument shell defect detection method based on artificial intelligence
CN116110053A (en) Container surface information detection method based on image recognition
CN116664565A (en) Hidden crack detection method and system for photovoltaic solar cell
CN114881960A (en) Feature enhancement-based cloth linear defect detection method and system
CN114140384A (en) Transverse vibration image recognition algorithm for hoisting steel wire rope based on contour fitting and centroid tracking
CN115526885A (en) Product image defect detection method, system, device and medium
CN115272303A (en) Textile fabric defect degree evaluation method, device and system based on Gaussian blur
CN115018785A (en) Hoisting steel wire rope tension detection method based on visual vibration frequency identification
CN115100208A (en) Film surface defect evaluation method based on histogram and dynamic light source
CN107478656B (en) Paper pulp stirring effect detection and evaluation method, device and system based on machine vision

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