CN116912131A - Visual detection method for water transfer surface film paper based on image processing - Google Patents

Visual detection method for water transfer surface film paper based on image processing Download PDF

Info

Publication number
CN116912131A
CN116912131A CN202311098578.0A CN202311098578A CN116912131A CN 116912131 A CN116912131 A CN 116912131A CN 202311098578 A CN202311098578 A CN 202311098578A CN 116912131 A CN116912131 A CN 116912131A
Authority
CN
China
Prior art keywords
pixel point
point
pixel
edge
water transfer
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.)
Pending
Application number
CN202311098578.0A
Other languages
Chinese (zh)
Inventor
伍名亮
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Dongguan Woye Packaging Materials Co ltd
Original Assignee
Dongguan Woye Packaging Materials Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Dongguan Woye Packaging Materials Co ltd filed Critical Dongguan Woye Packaging Materials Co ltd
Priority to CN202311098578.0A priority Critical patent/CN116912131A/en
Publication of CN116912131A publication Critical patent/CN116912131A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/74Image or video pattern matching; Proximity measures in feature spaces
    • G06V10/761Proximity, similarity or dissimilarity measures
    • 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
    • G06T7/00Image analysis
    • G06T7/0002Inspection of images, e.g. flaw detection
    • G06T7/0004Industrial image inspection

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • General Physics & Mathematics (AREA)
  • Physics & Mathematics (AREA)
  • Computing Systems (AREA)
  • Evolutionary Computation (AREA)
  • General Health & Medical Sciences (AREA)
  • Medical Informatics (AREA)
  • Software Systems (AREA)
  • Databases & Information Systems (AREA)
  • Artificial Intelligence (AREA)
  • Health & Medical Sciences (AREA)
  • Multimedia (AREA)
  • Quality & Reliability (AREA)
  • Image Processing (AREA)

Abstract

The application relates to the technical field of image processing, in particular to a visual detection method of water transfer surface film paper based on image processing, which is used for collecting a water transfer surface film paper image, obtaining the same position of each pixel point according to the neighborhood similarity between the pixel points in the same row, and obtaining the deformation diffusivity of each pixel point in a suspected defect area according to the change of the trend of the edge line where the two pixel points are located and the combination of the pixel points; and adjusting the probability accumulated value of each gray level according to the deformation diffusivity of each pixel point in the suspected defect area, and enhancing the image according to the adjusted probability accumulated value to obtain an enhanced image. Therefore, visual detection of the water transfer surface film paper is realized, the gray contrast of a suspected defect area is enhanced, detection of defect positions and degree of the water transfer surface film paper is facilitated, and detection efficiency and accuracy are improved.

Description

Visual detection method for water transfer surface film paper based on image processing
Technical Field
The application relates to the technical field of image processing, in particular to a visual detection method for water transfer printing surface film paper based on image processing.
Background
The water transfer printing surface film paper is produced into transfer printing film with color pattern by gravure printing machine and through printing required pattern with special ink onto the hydrolyzable polymer film. The transfer film and the transfer ink are key materials for ensuring the quality of the water transfer, and the quality of the printing of the transfer film also determines the final effect of the water transfer product. The water transfer printing technology has the requirements on the water transfer printing surface film paper that the surface is smooth and flat, and the defects such as bubbles, wrinkles, bending and the like do not have deformation influence on the pattern. The traditional water transfer printing surface film paper detection method is to use naked eyes to observe the water transfer printing film paper to check whether obvious defects exist, small defects are not easy to observe, time and labor are wasted, and missed detection is easy to occur.
At present, a computer vision technology is often adopted to detect the water transfer printing surface film paper, so that the detection efficiency is improved to a certain extent. However, the water transfer surface film paper image directly collected by the camera is difficult to distinguish in detail of the defect part, and the detection efficiency is affected.
In summary, the method calculates the defect degree weight of each pixel point of the water transfer surface film paper image by analyzing the characteristics of the water transfer surface film paper, obtains the probability accumulated value of each gray level according to the defect degree weight of each pixel point, enhances the image by combining a histogram equalization algorithm, enhances the contrast of the image of the defect area, and improves the visual detection efficiency.
Disclosure of Invention
In order to solve the technical problems, the application provides a visual detection method for water transfer printing surface film paper based on image processing, which aims to solve the existing problems.
The visual detection method of the water transfer printing surface film paper based on image processing adopts the following technical scheme:
the embodiment of the application provides a visual detection method of water transfer printing surface film paper based on image processing, which comprises the following steps:
collecting a water transfer printing surface film paper image;
obtaining neighborhood similarity between each pixel point and the pixel points in the same row according to the neighborhood of each row of pixel points; obtaining the co-location point of each pixel point according to the neighborhood similarity between each pixel point and the pixel points in the same row; obtaining the width of the pattern according to the distance between each pixel point and the corresponding point; obtaining the local pattern drift degree of each pixel point according to the width of the pattern; obtaining deformation distortion rate of the edge pixel points according to the local pattern drift degree of each pixel point; acquiring each edge pixel point with deformation curvature larger than a deformation threshold, marking the pixel point as a first edge pixel point, and acquiring suspected defect areas of each first edge pixel point; obtaining deformation diffusivity of each pixel point in the suspected defect area according to the coordinate change of each pixel point in the suspected defect area; obtaining the defect degree weight of each pixel point according to the deformation diffusivity of each pixel point in the suspected defect area; obtaining a probability accumulated value of each gray level according to the defect degree weight and the gray level probability of each pixel point in the gray level image; and enhancing according to the probability accumulated value of each gray level to obtain an enhanced image.
Preferably, the obtaining the neighborhood similarity between each pixel point and the pixel points in the same row according to the neighborhood of each row of pixel points specifically includes:
obtaining the same-row pixel points of each pixel point; calculating the difference value of the gray value of the ith pixel point in the neighborhood of each pixel point and the neighborhood of any pixel point in the same row; and taking the average value of the squares of the differences of the pixel points in the neighborhood as the neighborhood similarity between each pixel point and any pixel point in the same row.
Preferably, the method obtains the co-location point of each pixel point according to the neighborhood similarity between each pixel point and the pixel points in the same row, specifically includes:
setting an error threshold value, and taking a sequence formed by pixel points in the same row, wherein the neighborhood similarity between the pixel points is larger than the error threshold value, as a parity point sequence of each pixel point; taking the (i+1) th pixel point of the parity point sequence as the parity point of the (i) th pixel point, and taking the last-last pixel point of the parity point sequence as the parity point of the last pixel point.
Preferably, the width of the pattern is obtained according to the distance between each pixel point and the corresponding point, specifically: and carrying out probability histogram statistics on the distances between each pixel point and the corresponding point, and taking the average value of the interval with the largest probability distribution in the histogram as the width of the pattern.
Preferably, the obtaining the local pattern drift degree of each pixel according to the width of the pattern specifically includes:
acquiring Euclidean distance between each pixel point and the corresponding point; calculating the absolute value of the difference between the distance and the pattern width; and taking the ratio of the absolute value of the difference to the pattern width as the local pattern drift degree of each pixel point.
Preferably, the obtaining the deformation distortion ratio of the edge pixel point according to the local pattern drift degree of each pixel point specifically includes:
acquiring an edge image of the water transfer surface film paper image through edge detection, and acquiring edge trend vectors of all edge pixel points according to the direction of each edge pixel point towards the adjacent edge pixel point and the distance from each edge pixel point to the adjacent edge pixel point; obtaining the co-located edge trend vector of each pixel point; calculating cosine of an included angle between each edge pixel point and the edge trend vector of the same point; and taking the product of the cosine value and the local pattern drift degree of each edge pixel point as the deformation distortion rate of each edge pixel point.
Preferably, the obtaining the suspected defect area of each first edge pixel point specifically includes:
constructing a circular neighborhood of each first edge pixel point and the same point, calculating neighborhood similarity between each first edge pixel point and the circular neighborhood of the same point, and if the neighborhood similarity is larger than a similarity threshold value, expanding the circular neighborhood of each first edge pixel point and the circular neighborhood of the same point, and recalculating; and when the neighborhood similarity is smaller than the similarity threshold, taking the circular neighborhood of each first edge pixel point at the moment as a suspected defect area of each first edge pixel point.
Preferably, the obtaining the deformation diffusivity of each pixel point in the suspected defect area according to the coordinate change of each pixel point in the suspected defect area specifically includes:
acquiring a central pixel point of a suspected defect area, and calculating Euclidean distance between each pixel point in the suspected defect area and the central pixel point; and taking the ratio of the deformation distortion rate of the central pixel point to the Euclidean distance as the deformation diffusivity of each pixel point in the suspected defect area.
Preferably, the obtaining the defect degree weight of each pixel point according to the deformation diffusivity of each pixel point in the suspected defect area specifically includes:
when each pixel point is in the suspected defect area, taking the value of adding 1 to the normalized deformation diffusivity of each pixel point as the defect index of each pixel point; setting a defect index of each pixel point when each pixel point is in a non-suspected defect area; taking the normalized defect index of each pixel point as the defect degree weight of each pixel point.
Preferably, the obtaining the probability accumulated value of each gray level according to the defect degree weight and the gray level probability of each pixel point in the gray image specifically includes:
wherein S is k For the probability accumulated value at the kth pixel level, norm () is a linear normalization function, P g The average value of the defect degree weight of each pixel point in the g-th pixel level of the gray level image is given, and p (g) is the gray level probability of the g-th pixel level of the gray level image.
The application has at least the following beneficial effects:
the defect degree weight of each pixel point is obtained through the characteristic that the pattern of the water transfer surface film paper image repeatedly changes; according to the defect degree weight of each pixel point, the probability accumulated value of each gray level is calculated, histogram equalization is carried out to obtain an enhanced image, the problem that details of a defect part in a water transfer surface film paper image are difficult to distinguish is solved, the contrast of the image of the defect part is improved, and the detection precision is high;
in order to improve the foreground and background contrast of a defect area, the method acquires a water transfer surface film paper image, obtains the same point of each pixel point according to the neighborhood similarity between each pixel point and the pixel points in the same row, and obtains the deformation distortion rate of the edge pixel point according to the distance between each pixel point and the same point and the trend change of the edge line where the two pixel points are located; acquiring deformation diffusivity of each pixel point in the suspected defect area by combining each pixel point; the defect degree weight of each pixel point is obtained according to the deformation diffusivity of each pixel point in the suspected defect area, the probability accumulated value of each gray level is adjusted, the enhanced water transfer printing surface film paper image is obtained according to the probability accumulated value of each gray level after adjustment, the gray contrast of the suspected defect area is enhanced, the visual quality of the image is improved, the detection of the defect position and degree of the water transfer printing surface film paper is facilitated, and the detection efficiency and accuracy are improved.
Drawings
In order to more clearly illustrate the embodiments of the application or the technical solutions and advantages of the prior art, the following description will briefly explain the drawings used in the embodiments or the description of the prior art, and it is obvious that the drawings in the following description are only some embodiments of the application, and other drawings can be obtained according to the drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flow chart of a visual detection method of water transfer printing surface film paper based on image processing;
FIG. 2 is a water transfer surface film paper image;
FIG. 3 is a schematic illustration of parity drift;
fig. 4 is a schematic overlapping diagram of suspected defect areas.
Detailed Description
In order to further explain the technical means and effects adopted by the application to achieve the preset aim, the following is a detailed description of specific implementation, structure, characteristics and effects of the water transfer printing surface film paper visual detection method based on image processing according to the application with reference to the attached drawings and the preferred embodiment. In the following description, different "one embodiment" or "another embodiment" means that the embodiments are not necessarily the same. Furthermore, the particular features, structures, or characteristics of one or more embodiments may be combined in any suitable manner.
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs.
The application provides a water transfer printing surface film paper visual detection method based on image processing, which is specifically described below with reference to the accompanying drawings.
The embodiment of the application provides a visual detection method for water transfer printing surface film paper based on image processing.
Specifically, the following visual detection method of the water transfer printing surface film paper based on image processing is provided, please refer to fig. 1, the method comprises the following steps:
and S001, collecting a water transfer printing surface film paper image.
The water transfer printing surface film paper image is acquired by using a high-resolution CCD camera, in order to obtain an image capable of better detecting the defect of the water transfer printing surface film paper, the water transfer printing surface film paper is required to be paved on a tabletop, and the water transfer printing surface film paper is shot in an environment with rich light sources and more sufficient light rays, so that the water transfer printing surface film paper image under the RGB color space is obtained. In order to improve the image quality, the image is denoising processed by bilateral filtering, and specific image acquisition and image denoising method implementation personnel can select the image by themselves, so that the embodiment is not particularly limited.
Step S002, the probability accumulated value of each gray level is adjusted according to the neighborhood gray value change of the pixel point and the trend of the edge line, and the image enhancement is carried out according to the adjusted probability accumulated value.
According to the reflective characteristic of the water transfer surface film paper material, the positions of flaws such as folding, bending, pulling deformation and the like can present a brighter area on a light receiving part, and specific pattern details of the brighter part are difficult to distinguish, so that visual judgment of pattern flaws is affected. Aiming at the problem, a gray level histogram enhancement algorithm in an image enhancement technology is often adopted to process the image, and the distribution of each gray level in the image is balanced, so that the visual quality of the image is improved. However, the conventional method based on globally uniformly dividing the gray level has poor enhancement effect on the defect area with smaller area occupation, so that the probability value of the gray level needs to be calculated by adopting different weights according to the defect characteristics so as to achieve good equalization effect.
The surface film paper for water transfer printing is formed by duplicating and arranging the same patterns, such as figures, textures, images or characters, etc. in the manufacturing process, and a continuous and seamless pattern is formed on the surface of the surface film paper for water transfer printing, as shown in figure 2Where L is the minimum repeat distance of the pattern, denoted the width of the pattern. Defects such as bubbles, wrinkles, bends, etc. are generated in the integrity of the pattern morphology. According to the repeated arrangement mode of patterns in the water transfer surface film paper, the positions of the same pixel points of any pixel point on the patterns can be obtained, specifically, firstly, converting an RGB image into a gray image, taking a pixel point t as an example and taking the pixel point t as a central pixel point to construct a 5×5 neighborhood c (t), wherein a construction implementation of the neighborhood can be set by oneself, the embodiment is not particularly limited, and the same-row pixel point of the pixel point t is obtained, and a set X= { X formed by the same-row pixel points of the pixel point t is obtained 1 ,x 2 ,…,x n The pixel point set is marked as the same row, that is, the abscissa of each pixel point in the set X is the same as the abscissa of the pixel point t, n is the number of the pixel points in the set X, and the neighborhood c (X) of each pixel point in the set X is obtained according to the neighborhood construction mode of the pixel point t 1 ),c(x 2 ),…,c(x n ) N=25 pixels are arranged in each pixel neighborhood, and the pixel t and the a-th pixel X in the set X are calculated a Neighborhood similarity d (t, x) a ):
Wherein d (t, x a ) Is pixel point t and pixel point x a T (i) is the gray value of the ith pixel point in the neighborhood of the pixel point t, x a (i) Is pixel point x a The gray value of the ith pixel point in the neighborhood of (2), N is the number of the pixel points in the neighborhood. According to the consistency of the repeated pattern, d (t, x a ) The smaller the difference of gray values of corresponding pixels in the two neighborhoods is, the more similar the pattern is.
Calculating the neighborhood similarity of each pixel point in the set X and the pixel point t, taking gray value errors caused by factors such as illumination in the image shooting process into consideration, setting an error threshold, wherein an error threshold setting implementation can be selected by a user, the error threshold is set to be sigma=30, and the neighborhood similarity is carried out on each pixel point in the set XPlacing the pixel points with the sex smaller than the error threshold value into a co-locus set X, namely using the pixel points X a For example, if d (t, x a )<Sigma, the pixel point x a Adding a set X; placing the pixel points T into the set X, and ordering the pixel points in the set X from small to large according to the abscissa, wherein the formed sequence is marked as a parity point sequence T= { T 1 ,t 2 ,…,t m M is the number of pixels in the parity point sequence T, in which the next pixel is used as the same point of the previous pixel, i.e. for the pixel T i Pixel point t i+1 Is the pixel point t i Is the same-site of the last pixel point t m Is t at the same site as t m-1 So that each pixel point T in the parity point sequence T i All have a same site, denoted t j . The co-location point of each pixel point in the gray level image is obtained through the mode.
The distance between each pixel point in the water transfer surface film paper image and the same point is equal everywhere and is equal to the width of the pattern in the water transfer surface film paper image, in order to obtain the width of the pattern, the distance dx between each pixel point in the gray level image and the same point is calculated, the distribution range of distance values is equally divided into 6 groups of intervals, the group distance is taken as an abscissa and the frequency is taken as an ordinate, a probability distribution histogram of the distance is obtained, the interval with the largest probability distribution is taken, and the average value of the distances in the interval is obtainedAs the width of the pattern. The water transfer surface film paper is pulled and deformed to lead the pattern to stretch or shrink, so that the same-point drift is generated, as shown in figure 3, for a certain pixel point b in the gray level image i Let the same site as b j Pixel point b i Is a local pattern drift degree DR (t) i ) The expression of (2) is:
wherein DR (b) i ) Is pixel point b in gray level image i Is used for the local pattern drift degree of (a),dx(b i ,b j ) Is pixel point b i In the same position b as it j The euclidean distance between the coordinates,is the width of the pattern. When DR (b) i ) The larger the description pixel point b i And b j The larger the distance between the pixels deviates from the width value of the pattern, the pixel point b i The greater the local pattern drift of (c).
Because the deformation degree of the pattern in the water transfer surface film paper image can be obtained through the edge change degree of the pattern, the gray level image is subjected to edge detection by adopting a Canny operator to obtain an edge image, each pixel point on each edge line in the edge image is used as each edge pixel point, and for each edge pixel point, an edge pixel point q is used i For example, if the edge pixel point q i The edge line will also be distorted when the position is deformed, and the pixel point q is at the edge i The edge line trend at that location will also change. Therefore, for each edge pixel point, an adjacent edge pixel point q with a larger ordinate is obtained i ' denoted as edge pixel point q i Is the first adjacent pixel point q of (1) i ' edge pixel point q i Toward its first adjacent pixel point q i ' direction to its adjacent edge pixel point q i Vector' as edge pixel point q i If the edge line is not relative to q i The adjacent edge pixel points with the increased ordinate of (2) are selected according to the change of the abscissa, namely if the edge pixel point q i And if the edge line is a transverse line, acquiring adjacent edge pixel points with larger transverse coordinates to calculate an edge trend vector. The pixel point q is obtained through the mode i Is equal to the parity point q of (2) j According to the edge trend vector of the edge pixel point q i Edge pixel point q is calculated by edge trend vector and drift degree of the co-locus i Deformation distortion ratio S (q) i ):
Wherein S (q i ) For edge pixel point q i Is characterized by a deformation-to-distortion ratio,for edge pixel point q i Edge trend vector of->For the parity point q j Edge trend vector, DR (q i ) For edge pixel point q i Is used for the local pattern drift of the pattern. Vector->Vector->The greater the angle between DR (q i ) The larger the description edge pixel point q i The greater the difference between the trend at the same point and the trend at the same point, and the greater the degree of drift, the greater the S (q i ) The larger the deformation distortion degree of the point is, the larger the deformation distortion degree is.
The deformation torsion curvature of each edge pixel point in the edge image is obtained in the above manner, since the gray value of the pixel point in a certain area is changed when the pattern on the water transfer surface film paper is deformed, and the deformation threshold is set for extracting the defect area where the pattern is deformed, it should be noted that the setting implementation of the deformation threshold can be selected by the user himself, in this embodiment, the deformation threshold is set to α=0.25, the edge pixel point with the deformation torsion rate greater than the deformation threshold is used as the first edge pixel point, and the first edge pixel point is put into the set f= { s 1 ,s 2 ,…,s m Then, for each pixel point and its equivalent point in the set F as the central pixel point, a circular neighborhood window with R as radius is constructed, it should be noted that, the value of R can be set by the practitioner, in this embodiment, the value of R is set to 5 pixels, and the pixel point s is obtained according to the calculation mode of the above neighborhood similarity i Similarity d(s) i ,s j ) Setting a similarity threshold, and the description is thatThe setting implementation of the similarity threshold can be selected by the user, and in this embodiment, the similarity threshold is set to h=30, if d (s i ,s j )<h, the patterns in the two circular neighborhood windows are approximately consistent, and the pixel points s are indicated i Is a circular neighborhood window C(s) i ) As a suspected defect area; if d(s) i ,s j )>h, the pattern parts corresponding to the two windows are larger in difference, the defect area is larger, and the range needs to be enlarged. When d(s) i ,s j )>h, constructing a new circular neighborhood window with radius of R+1 for each pixel point and the same point thereof, and calculating the similarity d(s) of each pixel point and the new circular neighborhood window of the same point thereof i ,s j ) Then judge d(s) i ,s j ) The relationship with h is repeated until d (s i ,s j )<h will be in pixel points s i A circular area with a radius of r+f, where f is the number of repetitions, is used as the suspected defect area.
The above formula calculates the deformation distortion ratio of the pixel points on the edge line, and for the suspected defect region, the deformation distortion degree of each pixel point and the central pixel point s thereof i Is related to the deformation distortion degree, and each pixel point and the central pixel point s in the suspected defect area are calculated i The euclidean distance D between the two pixels, the deformation diffusivity SR of each pixel in the suspected defect area is expressed as follows:
in the formula, SR (c) i ) In s i Pixel point c in the suspected defect area being the center pixel point i Is a strain diffusivity of S (S) i ) As the center pixel point s i Is characterized by a deformation-to-distortion ratio,is pixel point c i And s i Euclidean distance between them. When S (S) i ) The larger the size of the container,the smaller the description pixel point c i The closer to the center point of the suspected defective region and the more severely the degree of distortion affected by the deformation of the center point, the SR (c) i ) The larger c i The greater the degree of deformation distortion at the location.
As a result of overlapping multiple suspected defect areas, as shown in fig. 4, the pixel point z belongs to both the suspected defect area I and the suspected defect area I', so that multiple deformation diffusivities can be calculated for the pixel point z, and in order to avoid the influence on subsequent calculation, the maximum value of the multiple deformation diffusivities of the pixel point z is taken as the final deformation diffusivity of the pixel point z.
Calculating each pixel point t in the image according to the deformation degree of the pixel points in the suspected defect area in the image i Defect degree weight P of (2) i
P i =norm(F i )
Wherein P is i At t i Defect degree weight of F i At t i Is the defect index, SR (t i ) At t i The deformation diffusivity of the part, I is the inside of the divided suspected defect area, and E is the outside of the divided suspected defect area. F of the pixel point outside the suspected defect area i If 1, SR (t) i ) The larger the deformation distortion degree is, the larger the P is i The greater the defect level, the more serious.
When the histogram equalization is carried out on the whole image, the defect degree weight P of each pixel point in the gray level image is used i Gray level probability P i And calculating the probability accumulated value of each gray level, and increasing the gray level probability accumulated value of the pixel point with serious defect degree to ensure that the contrast of the defect part in the equalized image is larger so as to obtain a good enhancement effect. The probability accumulated value at each pixel level in this embodiment is S k The method comprises the following steps:
wherein S is k For the probability accumulated value at the kth pixel level, norm () is a linear normalization function, P g The average value of the defect degree weight of each pixel point in the g-th pixel level of the gray level image is given, and p (g) is the gray level probability of the g-th pixel level of the gray level image. P (P) g The larger the S k The larger the probability accumulated value of the gray level is, the larger the difference between the probability accumulated value of the gray level and the probability accumulated value of the previous gray level is, and the larger the contrast after mapping is. The histogram equalization is performed according to the probability accumulated value of each pixel level to obtain an enhanced image, and the specific histogram equalization mode is a known technology and is not described herein in detail. The enhanced image enhances the gray contrast of the suspected defect area, and is convenient for detecting the defect position and degree of the water transfer surface film paper.
In summary, in the embodiment of the present application, the defect degree weight of each pixel point is obtained through the feature of repeated pattern change of the water transfer surface film paper image; according to the defect degree weight of each pixel point, calculating the probability accumulated value of each gray level, carrying out histogram equalization to obtain an enhanced image, and carrying out defect detection on the enhanced image, so that the problem that details of defect parts in the water transfer surface film paper image are difficult to distinguish is solved, the contrast of the image of the defect parts is improved, and higher detection precision is achieved;
in order to improve the contrast between the foreground and the background of the defect area, the embodiment obtains the same point of each pixel point according to the neighborhood similarity between each pixel point and the pixel points in the same row by collecting the water transfer surface film paper image, and obtains the deformation distortion rate of the edge pixel point according to the distance between each pixel point and the same point and the trend change of the edge line where the two pixel points are located; acquiring deformation diffusivity of each pixel point in the suspected defect area by combining each pixel point; the defect degree weight of each pixel point is obtained according to the deformation diffusivity of each pixel point in the suspected defect area, the probability accumulated value of each gray level is adjusted, the enhanced water transfer printing surface film paper image is obtained according to the probability accumulated value of each gray level after adjustment, the gray contrast of the suspected defect area is enhanced, the visual quality of the image is improved, the detection of the defect position and degree of the water transfer printing surface film paper is facilitated, and the detection efficiency and accuracy are improved.
It should be noted that: the sequence of the embodiments of the present application is only for description, and does not represent the advantages and disadvantages of the embodiments. And the foregoing description has been directed to specific embodiments of this specification. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
In this specification, each embodiment is described in a progressive manner, and the same or similar parts of each embodiment are referred to each other, and each embodiment mainly describes differences from other embodiments.
The above embodiments are only for illustrating the technical solution of the present application, and not for limiting the same; the technical solutions described in the foregoing embodiments are modified or some of the technical features are replaced equivalently, so that the essence of the corresponding technical solutions does not deviate from the scope of the technical solutions of the embodiments of the present application, and all the technical solutions are included in the protection scope of the present application.

Claims (10)

1. The visual detection method of the water transfer printing surface film paper based on the image processing is characterized by comprising the following steps of:
collecting a water transfer printing surface film paper image;
obtaining neighborhood similarity between each pixel point and the pixel points in the same row according to the neighborhood of each row of pixel points; obtaining the co-location point of each pixel point according to the neighborhood similarity between each pixel point and the pixel points in the same row; obtaining the width of the pattern according to the distance between each pixel point and the corresponding point; obtaining the local pattern drift degree of each pixel point according to the width of the pattern; obtaining deformation distortion rate of the edge pixel points according to the local pattern drift degree of each pixel point; acquiring each edge pixel point with deformation curvature larger than a deformation threshold, marking the pixel point as a first edge pixel point, and acquiring suspected defect areas of each first edge pixel point; obtaining deformation diffusivity of each pixel point in the suspected defect area according to the coordinate change of each pixel point in the suspected defect area; obtaining the defect degree weight of each pixel point according to the deformation diffusivity of each pixel point in the suspected defect area; obtaining a probability accumulated value of each gray level according to the defect degree weight and the gray level probability of each pixel point in the gray level image; and enhancing according to the probability accumulated value of each gray level to obtain an enhanced image.
2. The visual detection method of the water transfer printing surface film paper based on image processing as set forth in claim 1, wherein the neighborhood similarity between each pixel point and the same-row pixel points is obtained according to the neighborhood of each row of pixel points, specifically comprising:
obtaining the same-row pixel points of each pixel point; calculating the difference value of gray values of pixel points in the corresponding positions in the neighborhood of each pixel point and the neighborhood of the pixel points in the same row; and taking the average value of the squares of the differences of all the pixel points in the neighborhood as the neighborhood similarity between each pixel point and the pixel points in the same row.
3. The visual inspection method of water transfer printing surface film paper based on image processing as set forth in claim 1, wherein the method is characterized in that the co-location of each pixel is obtained according to the neighborhood similarity between each pixel and the pixels in the same row, specifically:
setting an error threshold value, and taking a sequence formed by pixel points in the same row, wherein the neighborhood similarity between the pixel points is larger than the error threshold value, as a parity point sequence of each pixel point; taking the (i+1) th pixel point of the parity point sequence as the parity point of the (i) th pixel point, and taking the last-last pixel point of the parity point sequence as the parity point of the last pixel point.
4. The visual inspection method of water transfer printing surface film paper based on image processing as set forth in claim 1, wherein the width of the pattern is obtained according to the distance between each pixel point and the corresponding point, specifically: and carrying out probability histogram statistics on the distances between each pixel point and the corresponding point, and taking the average value of the interval with the largest probability distribution in the histogram as the width of the pattern.
5. The visual inspection method of water transfer printing surface film paper based on image processing as claimed in claim 1, wherein the obtaining the local pattern drift degree of each pixel point according to the width of the pattern specifically comprises:
acquiring Euclidean distance between each pixel point and the corresponding point; calculating the absolute value of the difference between the distance and the pattern width; and taking the ratio of the absolute value of the difference to the pattern width as the local pattern drift degree of each pixel point.
6. The visual inspection method of water transfer printing surface film paper based on image processing as claimed in claim 1, wherein the obtaining the deformation distortion ratio of the edge pixel point according to the local pattern drift degree of each pixel point specifically comprises:
acquiring each edge pixel point of the water transfer surface film paper image, taking an adjacent edge pixel point with the ordinate larger than the ordinate of the edge pixel point as a first adjacent pixel point of the edge pixel point, acquiring the direction of the edge pixel point to the first adjacent pixel point, calculating the distance between the edge pixel point and the first adjacent pixel point, and taking a vector formed by the direction and the distance as an edge trend vector of the edge pixel point; acquiring edge trend vectors of the same point of each pixel point; calculating cosine of an included angle between each edge pixel point and the edge trend vector of the same point; and taking the product of the cosine value and the local pattern drift degree of each edge pixel point as the deformation distortion rate of each edge pixel point.
7. The visual inspection method for water transfer printing surface film paper based on image processing as claimed in claim 1, wherein the obtaining suspected defect areas of each first edge pixel point specifically comprises:
constructing a circular neighborhood of each first edge pixel point and each co-located point, calculating neighborhood similarity between each first edge pixel point and the circular neighborhood of each co-located point, if the neighborhood similarity is larger than a similarity threshold, expanding the circular neighborhood of each first edge pixel point and each co-located point, repeating the calculation of the neighborhood similarity until the neighborhood similarity is smaller than the similarity threshold, and taking the circular neighborhood of each first edge pixel point at the moment as a suspected defect area of each first edge pixel point.
8. The visual inspection method of water transfer surface film paper based on image processing as claimed in claim 1, wherein the obtaining the deformation diffusivity of each pixel point in the suspected defect area according to the coordinate change of each pixel point in the suspected defect area specifically comprises:
acquiring a central pixel point of a suspected defect area, and calculating Euclidean distance between each pixel point in the suspected defect area and the central pixel point; and taking the ratio of the deformation distortion rate of the central pixel point to the Euclidean distance as the deformation diffusivity of each pixel point in the suspected defect area.
9. The visual inspection method of water transfer surface film paper based on image processing as claimed in claim 1, wherein the obtaining the defectivity weight of each pixel point according to the deformation diffusivity of each pixel point in the suspected defect area specifically comprises:
when each pixel point is in the suspected defect area, taking the value of adding 1 to the normalized deformation diffusivity of each pixel point as the defect index of each pixel point; when each pixel point is in a non-suspected defect area, presetting a defect index of each pixel point; taking the normalized defect index of each pixel point as the defect degree weight of each pixel point.
10. The visual inspection method of water transfer surface film paper based on image processing as claimed in claim 1, wherein the obtaining the probability accumulated value of each gray level according to the defect degree weight and gray level probability of each pixel point in the gray level image specifically comprises:
wherein S is k For the probability accumulated value at the kth pixel level, norm () is a linear normalization function, P g The average value of the defect degree weight of each pixel point in the g-th pixel level of the gray level image is given, and p (g) is the gray level probability of the g-th pixel level of the gray level image.
CN202311098578.0A 2023-08-29 2023-08-29 Visual detection method for water transfer surface film paper based on image processing Pending CN116912131A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311098578.0A CN116912131A (en) 2023-08-29 2023-08-29 Visual detection method for water transfer surface film paper based on image processing

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311098578.0A CN116912131A (en) 2023-08-29 2023-08-29 Visual detection method for water transfer surface film paper based on image processing

Publications (1)

Publication Number Publication Date
CN116912131A true CN116912131A (en) 2023-10-20

Family

ID=88365220

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311098578.0A Pending CN116912131A (en) 2023-08-29 2023-08-29 Visual detection method for water transfer surface film paper based on image processing

Country Status (1)

Country Link
CN (1) CN116912131A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117541588A (en) * 2024-01-10 2024-02-09 大连建峰印业有限公司 Printing defect detection method for paper product
CN117808800B (en) * 2024-02-29 2024-05-10 深圳市富安娜艺术家居有限公司 Intelligent assessment method and system for dyeing quality of textile

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117541588A (en) * 2024-01-10 2024-02-09 大连建峰印业有限公司 Printing defect detection method for paper product
CN117541588B (en) * 2024-01-10 2024-03-12 大连建峰印业有限公司 Printing defect detection method for paper product
CN117808800B (en) * 2024-02-29 2024-05-10 深圳市富安娜艺术家居有限公司 Intelligent assessment method and system for dyeing quality of textile

Similar Documents

Publication Publication Date Title
CN116912131A (en) Visual detection method for water transfer surface film paper based on image processing
CN111563889B (en) Liquid crystal screen Mura defect detection method based on computer vision
CN116977358B (en) Visual auxiliary detection method for corrugated paper production quality
CN106960428A (en) Visible ray and infrared double-waveband image co-registration Enhancement Method
CN114998355B (en) Production defect identification method and device for sealing rubber ring
CN107240112B (en) Individual X corner extraction method in complex scene
CN115082470B (en) Waterproof cloth performance detection method and system based on image recognition
CN110889807B (en) Image processing method for channel type X-ray security inspection equipment
CN109211918B (en) Fabric bow weft detection method based on weft trend
CN113628189A (en) Rapid strip steel scratch defect detection method based on image recognition
CN110996096B (en) Tone mapping image quality evaluation method based on structural similarity difference
CN113012234B (en) High-precision camera calibration method based on plane transformation
CN111882489A (en) Super-resolution graph recovery method for simultaneously enhancing underwater images
CN116309559A (en) Intelligent identification method for production flaws of medium borosilicate glass
CN115100206A (en) Printing defect identification method for textile with periodic pattern
CN116958125B (en) Electronic contest host power supply element defect visual detection method based on image processing
CN116645429B (en) Visual-aided paint production sample color analysis and detection method
CN112330613A (en) Method and system for evaluating quality of cytopathology digital image
CN110595397A (en) Grate cooler working condition monitoring method based on image recognition
CN116934761B (en) Self-adaptive detection method for defects of latex gloves
CN116485788B (en) Image processing method and mobile phone PET (polyethylene terephthalate) protective film priming process quality detection method
CN114998571B (en) Image processing and color detection method based on fixed-size markers
CN110390339B (en) Image correction method, device and storage medium
CN115496657A (en) Pathological section digitalization method and system for low-resolution imaging
CN115456888A (en) Correction method and device for electronic artistic examination works, electronic equipment and medium

Legal Events

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