CN114494226B - Method for detecting greasy dirt defect of spinning cake based on graph centroid tracking algorithm - Google Patents

Method for detecting greasy dirt defect of spinning cake based on graph centroid tracking algorithm Download PDF

Info

Publication number
CN114494226B
CN114494226B CN202210127787.2A CN202210127787A CN114494226B CN 114494226 B CN114494226 B CN 114494226B CN 202210127787 A CN202210127787 A CN 202210127787A CN 114494226 B CN114494226 B CN 114494226B
Authority
CN
China
Prior art keywords
image
contour
spinning cake
greasy dirt
rectangle
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202210127787.2A
Other languages
Chinese (zh)
Other versions
CN114494226A (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.)
Anhui University
Original Assignee
Anhui University
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 Anhui University filed Critical Anhui University
Priority to CN202210127787.2A priority Critical patent/CN114494226B/en
Publication of CN114494226A publication Critical patent/CN114494226A/en
Application granted granted Critical
Publication of CN114494226B publication Critical patent/CN114494226B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/0002Inspection of images, e.g. flaw detection
    • G06T7/0004Industrial image inspection
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01NINVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
    • G01N21/00Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
    • G01N21/84Systems specially adapted for particular applications
    • G01N21/88Investigating the presence of flaws or contamination
    • G01N21/8851Scan or image signal processing specially adapted therefor, e.g. for scan signal adjustment, for detecting different kinds of defects, for compensating for structures, markings, edges
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/002D [Two Dimensional] image generation
    • G06T11/001Texturing; Colouring; Generation of texture or colour
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/002D [Two Dimensional] image generation
    • G06T11/20Drawing from basic elements, e.g. lines or circles
    • G06T11/206Drawing of charts or graphs
    • 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
    • G06T5/30Erosion or dilatation, e.g. thinning
    • 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/60Analysis of geometric attributes
    • G06T7/66Analysis of geometric attributes of image moments or centre of gravity
    • 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
    • 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/30108Industrial image inspection
    • G06T2207/30124Fabrics; Textile; Paper
    • 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)
  • Health & Medical Sciences (AREA)
  • Geometry (AREA)
  • Signal Processing (AREA)
  • Quality & Reliability (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Chemical & Material Sciences (AREA)
  • Analytical Chemistry (AREA)
  • Biochemistry (AREA)
  • General Health & Medical Sciences (AREA)
  • Immunology (AREA)
  • Pathology (AREA)
  • Image Analysis (AREA)

Abstract

The invention relates to a method for detecting greasy dirt defects of spinning cakes based on a graph centroid tracking algorithm, which comprises the following steps: acquiring a spinning cake image, and downsampling the image; graying the image; gao Silv wave and binarization treatment; drawing an edge contour, namely drawing a rectangle with the minimum circumscribed edge contour; constructing a mask image, and obtaining a mask image after phase inversion of the downsampled image; setting an oil pollution pixel range, and carrying out pixel processing on the image after masking; performing log operator operation and expansion treatment; extracting the contour and calculating the barycenter coordinates of the contour; and comparing the coordinates of the centroid of the contour with the coordinates of four vertexes of the minimum bounding rectangle to obtain a result. The invention has high accuracy and short time consumption for detecting the greasy dirt defect of the spinning cake; meanwhile, the automatic positioning of the greasy dirt can be realized.

Description

Method for detecting greasy dirt defect of spinning cake based on graph centroid tracking algorithm
Technical Field
The invention relates to the technical field of 2D industrial image processing, in particular to a method for detecting greasy dirt defects of spinning cakes based on a graph centroid tracking algorithm.
Background
In daily life, textiles are visible everywhere, china serves as an agricultural large country, and silk and other textiles are produced from ancient times. The spinning cake is an important spinning raw material because of the advantages of high strength, wear resistance, low density, good elasticity and the like, is formed by winding filaments, is widely used in the fields of fabrics, clothing, building interiors and the like, and is also related to the fields of national defense aerospace, biomedical materials, energy development and the like. The quality of the spinning cake affects the quality of the textile. The defect detection of the spinning cake is mainly carried out manually on an industrial production line, but the detection method is greatly influenced by manpower, so that the production efficiency and the accuracy of the spinning cake are low, the labor cost is high, and the labor cost is continuously increased, so that the development of textile enterprises encounters a bottleneck. At present, the professor and scholars of each university in China are still in the beginning stage of the automated detection defect research of textile products, and although related papers, patents and other achievements are obtained, the achievements are not mature and can only stay in the research and verification stage of a laboratory.
At present, three main ideas are adopted for researching the oil stain defect method of the spinning cake: firstly, using a machine to learn some traditional feature extraction algorithms, then processing an image into a data set, training to obtain feature vectors, calculating the accuracy rate by combining labels with some classification methods of the machine learning, and finally, carrying out slider prediction on the whole image, and then detecting whether the image has greasy dirt or not; however, some traditional feature extraction methods and machine learning classification methods of machine learning are more, and how to select and improve the method to obtain high accuracy; and how to avoid a series of interference brought by imaging on the industrial production line in the learning process; secondly, a deep learning method is used; third, some conventional image processing methods are used. The traditional image processing method has high efficiency and high stability, but has larger limitation.
Therefore, how to realize the detection of the greasy dirt defect of the spinning cake with high accuracy, high efficiency and real time and to timely use the spinning cake on the production line of some textile manufacturing enterprises has become a technical problem to be solved urgently.
Disclosure of Invention
The invention aims to provide the method for detecting the greasy dirt defects of the spinning cake based on the graph centroid tracking algorithm, which can effectively and automatically detect the greasy dirt defects on the spinning cake, so that the spinning cake can successfully realize automatic defect detection, and the production efficiency and the product quality of the detection of the greasy dirt defects of the spinning cake can be greatly improved.
In order to achieve the above purpose, the present invention adopts the following technical scheme: a method for detecting greasy dirt defects of spinning cake based on a graph centroid tracking algorithm comprises the following steps in sequence:
(1) Obtaining a spinning cake image, and performing downsampling: reading all spinning cake images in the folder; the length and the width of the spinning cake image are reduced equally;
(2) Carrying out gray processing on the silk cake image after downsampling;
(3) Carrying out Gaussian filtering and binarization on the spinning cake image subjected to gray level treatment;
(4) Drawing an edge contour on the spinning cake image subjected to binarization treatment, and drawing a minimum circumscribed rectangle of the edge contour, namely constructing a minimum rectangle to surround the edge contour;
(5) Constructing a mask image, and obtaining a mask image after phase after downsampling;
(6) Setting the range of greasy dirt pixels, and then carrying out pixel processing on the image after masking;
(7) Performing log operator operation and expansion treatment on the image processed by the pixels;
(8) Extracting the outline of the image after the expansion treatment, and obtaining the centroid coordinates of the outline according to the extracted outline;
(9) The result is obtained by comparing the barycenter coordinates of the outline with the coordinates of the four vertexes of the minimum bounding rectangle: if the barycenter abscissa of the contour is between two abscissas of the four vertexes of the minimum bounding rectangle and the barycenter ordinate of the contour is also between two abscissas of the four vertexes of the minimum bounding rectangle, judging that the spinning cake image has greasy dirt; otherwise, judging that the spinning cake image is free of greasy dirt.
In step (4), the drawing the edge contour specifically includes the following steps:
(2a) Searching contours of the binarized images, defining the background as black, and defining the object as white;
(2b) Searching for a white object contour;
(2c) And drawing the outline of the found white object.
In step (4), the drawing the minimum bounding rectangle of the edge contour specifically includes the following steps:
(3a) Firstly, calculating four vertex coordinates of a minimum circumscribed rectangle of the edge profile;
(3b) And then drawing the minimum rectangular frame of the edge contour according to the four vertex coordinates of the minimum circumscribed rectangle of the edge contour.
The step (5) comprises the following steps:
(4a) Creating an image with the same size as the downsampled cake image, initializing all pixels on the image to 0, and completely black;
(4b) Drawing a rectangle on the full black image by using four vertex coordinates of the minimum circumscribed rectangle, setting all pixel values of the area in the rectangle to 255, namely, the area in the rectangle is changed into white, and the area outside the rectangle is also black, so as to obtain a mask image;
(4c) Performing AND operation on each pixel on the downsampled cake image and each pixel at a position corresponding to the mask image to obtain a masked image, wherein the masked image retains an image in a rectangle corresponding to the downsampled cake image, and the image outside the rectangle is black;
setting the pixel of the downsampled spinning cake image as x [ i ], wherein the mask image is only black and white, the black pixel is 0, and the white pixel is 1;
x [ i ] & 1=x [ i ]; the result of the formula can know the phase of the white area on the mask, and finally obtains the original body of the mask;
x [ i ] & 0=0; the result of this formula is known to phase with the black area on the mask, eventually turning black.
In step (6), the pixel processing specifically means: according to the set range of the greasy dirt pixels, if the greasy dirt pixel is larger than the set range, the pixels are changed into 255, namely, become white; if it is smaller than this range, the pixel is changed to 0, i.e., to black.
In step (8), the log operator operation specifically includes the following steps:
(6a) Carrying out Gaussian filtering on the image after masking;
(6b) And carrying out Laplace operator operation, wherein the calculation formula of the Laplace operator is as follows:
where f (x, y) represents the coordinates of a point on the image,for second order bias of the function f (x, y), a>For second order bias to abscissa x, +.>Is a second order bias to the ordinate y.
In step (9), the obtaining of the centroid coordinates thereof from the profile includes the steps of:
(7a) Calculating zero order moment m of contour in expanded image 00 First moment m 10 、m 01
(7b) Calculating the centroid of the contour in the inflated image: m is m 10 /m 00 Represents the abscissa of the centroid, m 01 /m 00 An ordinate representing the centroid;
(7c) If the width of the contour on the expanded image is M and the length is N, the zero-order moment M of the contour 00 First moment m 10 、m 01 The calculation formula of (2) is as follows:
zero order moment:
wherein f (i, j) is the pixel value of a certain point of the contour in the image, M is the maximum value of the abscissa of the contour in the expanded image, and N is the maximum value of the ordinate of the contour in the expanded image;
first moment:
according to the technical scheme, the beneficial effects of the invention are as follows: firstly, the accuracy rate of detecting the greasy dirt defects of the spinning cake is extremely high; secondly, the invention has very little time required for detecting whether each spinning cake belongs to a normal spinning cake or a spinning cake containing greasy dirt defects; thirdly, the invention can position the oil stain position on each spinning cake containing the oil stain defect; fourth, the invention can detect in real time for 24 hours.
Drawings
FIG. 1 is a flow chart of the method of the present invention;
FIG. 2 (a) is a normal spinning cake image;
FIG. 2 (b) is an image of a spinning cake containing greasy dirt;
FIG. 3 (a) is a normal spinning cake image with interference removed;
FIG. 3 (b) is an image of a disturbed oil-containing spinning cake;
FIG. 4 (a) is a normal spinning cake image for performing a log operator operation;
FIG. 4 (b) is an image of a greasy textile cake with log operator operations;
FIG. 5 (a) is an image of a normal woven cake after expansion treatment;
FIG. 5 (b) is an image of a greasy textile cake after expansion;
FIG. 6 (a) is a normal spinning cake image after contour extraction;
FIG. 6 (b) is a representation of a spinning cake after contour extraction of the contours;
FIG. 7 (a) is a normal spinning cake image for obtaining the centroid coordinates thereof;
fig. 7 (b) is an image of a spinning cake to obtain greasy dirt at its centroid coordinates.
Detailed Description
As shown in FIG. 1, the method for detecting the greasy dirt defect of the spinning cake based on the graph centroid tracking algorithm comprises the following sequential steps:
(1) Obtaining a spinning cake image, and performing downsampling: reading all spinning cake images in the folder; the length and the width of the spinning cake image are reduced equally;
(2) Carrying out gray processing on the silk cake image after downsampling;
(3) Carrying out Gaussian filtering and binarization on the spinning cake image subjected to gray level treatment;
(4) Drawing an edge contour on the spinning cake image subjected to binarization treatment, and drawing a minimum circumscribed rectangle of the edge contour, namely constructing a minimum rectangle to surround the edge contour;
(5) Constructing a mask image, and obtaining a mask image after phase after downsampling;
(6) Setting the range of greasy dirt pixels, and then carrying out pixel processing on the image after masking;
(7) Performing log operator operation and expansion treatment on the image processed by the pixels;
(8) Extracting the outline of the image after the expansion treatment, and obtaining the centroid coordinates of the outline according to the extracted outline;
(9) The result is obtained by comparing the barycenter coordinates of the outline with the coordinates of the four vertexes of the minimum bounding rectangle: if the barycenter abscissa of the contour is between two abscissas of the four vertexes of the minimum bounding rectangle and the barycenter ordinate of the contour is also between two abscissas of the four vertexes of the minimum bounding rectangle, judging that the spinning cake image has greasy dirt; otherwise, judging that the spinning cake image is free of greasy dirt.
In step (4), the drawing the edge contour specifically includes the following steps:
(2a) Searching contours of the binarized images, defining the background as black, and defining the object as white;
(2b) Finding a white object contour using the function findContours () in the opencv library;
(2c) The function drawContours () in the opencv library is used to draw the outline drawing found white object outline.
In step (4), the drawing the minimum bounding rectangle of the edge contour specifically includes the following steps:
(3a) Firstly, using a function minAreRect () in an opencv library to obtain four vertex coordinates of a minimum circumscribed rectangle of an edge contour;
(3b) And then drawing the minimum rectangular frame of the edge contour according to the four vertex coordinates of the minimum circumscribed rectangle of the edge contour. The minimum rectangular box of the edge contour is drawn using the function line () in the opencv library.
The step (5) comprises the following steps:
(4a) Creating an image with the same size as the downsampled cake image, initializing all pixels on the image to 0, and completely black;
(4b) Drawing a rectangle on the full black image by using four vertex coordinates of the minimum circumscribed rectangle, setting all pixel values of the area in the rectangle to 255, namely, the area in the rectangle is changed into white, and the area outside the rectangle is also black, so as to obtain a mask image;
(4c) Performing AND operation on each pixel on the downsampled cake image and each pixel at a position corresponding to the mask image to obtain a masked image, wherein the masked image retains an image in a rectangle corresponding to the downsampled cake image, and the image outside the rectangle is black;
setting the pixel of the downsampled spinning cake image as x [ i ], wherein the mask image is only black and white, the black pixel is 0, and the white pixel is 1;
x [ i ] & 1=x [ i ]; the result of the formula can know the phase of the white area on the mask, and finally obtains the original body of the mask;
x [ i ] & 0=0; the result of this formula is known to phase with the black area on the mask, eventually turning black.
In step (6), the pixel processing specifically means: according to the set range of the greasy dirt pixels, if the greasy dirt pixel is larger than the set range, the pixels are changed into 255, namely, become white; if it is smaller than this range, the pixel is changed to 0, i.e., to black.
In step (8), the log operator operation specifically includes the following steps:
(6a) Carrying out Gaussian filtering on the image after masking;
(6b) And carrying out Laplace operator operation, wherein the calculation formula of the Laplace operator is as follows:
where f (x, y) represents the coordinates of a point on the image,for second order bias of the function f (x, y), a>For second order bias to abscissa x, +.>Is a second order bias to the ordinate y.
In step (9), the obtaining of the centroid coordinates thereof from the profile includes the steps of:
(7a) Calculating zero order moment m of contour in expanded image 00 First moment m 10 、m 01
(7b) Calculating the centroid of the contour in the inflated image: m is m 10 /m 00 Represents the abscissa of the centroid, m 01 /m 00 An ordinate representing the centroid;
(7c) If the width of the contour on the expanded image is M and the length is N, the zero-order moment M of the contour 00 First moment m 10 、m 01 The calculation formula of (2) is as follows:
zero order moment:
wherein f (i, j) is the pixel value of a certain point of the contour in the image, M is the maximum value of the abscissa of the contour in the expanded image, and N is the maximum value of the ordinate of the contour in the expanded image;
first moment:
as shown in fig. 2 (a), the image is a normal spinning cake image photographed by a camera on a production line of the textile industry, and as can be seen from fig. 2 (a), the outermost two sides of the normal spinning cake image have serious background interference, and in the foreground image, the filaments are wound on the cake regularly, and no greasy dirt is contained thereon. As shown in fig. 2 (b), the image is an oil-contaminated spinning cake image photographed by a camera on a production line of the textile industry, and as can be seen from fig. 2 (b), the outermost two sides of the oil-contaminated spinning cake image have serious background interference. In the foreground image, the silk is wound regularly on the cake and has greasy dirt on it.
As shown in fig. 3 (a), to remove the interference normal spinning cake image, it can be seen that the interference around both sides has been completely removed; as shown in FIG. 3 (b), to remove the disturbed oil-containing spinning cake image, it can be seen that the disturbance around both sides has been completely removed.
As shown in fig. 4 (a), to perform the log operator operation of the normal spinning cake image, it can be seen that the edges of the spinning cake have been extracted; as shown in fig. 4 (b), for the greasy textile cake image with log operator operation, it can be seen that the edges of the textile cake have been extracted and that edge drawing has also been performed in the greasy places.
As shown in fig. 5 (a), in order to perform the normal spinning cake image after the expansion treatment, it can be seen that the edge of the spinning cake is expanded and thickened; as shown in fig. 5 (b), in order to form an image of the woven cake containing oil stains after the expansion treatment, it can be seen that the edge of the woven cake is expanded and thickened and the portion having oil stains is also expanded and thickened.
As shown in fig. 6 (a), to perform the normal spinning cake image after contour extraction, it can be seen that the expanded and thickened contour has been drawn; as shown in fig. 6 (b), the textile cake image of the greasy dirt after contour extraction was seen to have been drawn at the swelled and thickened contour and the swelled and thickened greasy dirt.
As shown in fig. 7 (a), a normal spinning cake image of its centroid coordinates is obtained; as shown in fig. 7 (b), an image of the greasy dirt spinning cake is obtained with its centroid coordinates and can be tracked to the centroid of the profile.
In conclusion, the accuracy of detecting the greasy dirt defects of the spinning cake is extremely high; the invention has very little time required for detecting whether each spinning cake belongs to a normal spinning cake or a spinning cake containing greasy dirt defects; the invention can position the greasy dirt on each spinning cake containing greasy dirt defect; the invention can detect in 24 hours in real time.

Claims (6)

1. A method for detecting greasy dirt defects of spinning cake based on a graph centroid tracking algorithm is characterized by comprising the following steps of: the method comprises the following steps in sequence:
(1) Obtaining a spinning cake image, and performing downsampling: reading all spinning cake images in the folder; the length and the width of the spinning cake image are reduced equally;
(2) Carrying out gray processing on the silk cake image after downsampling;
(3) Carrying out Gaussian filtering and binarization on the spinning cake image subjected to gray level treatment;
(4) Drawing an edge contour on the spinning cake image subjected to binarization treatment, and drawing a minimum circumscribed rectangle of the edge contour, namely constructing a minimum rectangle to surround the edge contour;
(5) Constructing a mask image, and obtaining a mask image after phase after downsampling;
(6) Setting the range of greasy dirt pixels, and then carrying out pixel processing on the image after masking;
(7) Performing log operator operation and expansion treatment on the image processed by the pixels;
(8) Extracting the outline of the image after the expansion treatment, and obtaining the centroid coordinates of the outline according to the extracted outline;
(9) The result is obtained by comparing the barycenter coordinates of the outline with the coordinates of the four vertexes of the minimum bounding rectangle: if the barycenter abscissa of the contour is between two abscissas of the four vertexes of the minimum bounding rectangle and the barycenter ordinate of the contour is also between two abscissas of the four vertexes of the minimum bounding rectangle, judging that the spinning cake image has greasy dirt; otherwise, judging that the spinning cake image is free of greasy dirt;
in step (8), the obtaining of the centroid coordinates thereof from the profile includes the steps of:
(7a) Calculating zero order moment m of contour in expanded image 00 First moment m 10 、m 01
(7b) Calculating the centroid of the contour in the inflated image: m is m 10 /m 00 Represents the abscissa of the centroid, m 01 /m 00 An ordinate representing the centroid;
(7c) If the width of the contour on the expanded image is M and the length is N, the zero-order moment M of the contour 00 First moment m z0 、m 01 The calculation formula of (2) is as follows:
zero order moment:
wherein f (i, j) is the pixel value of a certain point of the contour in the image, M is the maximum value of the abscissa of the contour in the expanded image, and N is the maximum value of the ordinate of the contour in the expanded image;
first moment:
2. the method for detecting the greasy dirt defect of the spinning cake based on the graph centroid tracking algorithm of claim 1, which is characterized by comprising the following steps: in step (4), the drawing the edge contour specifically includes the following steps:
(2a) Searching contours of the binarized images, defining the background as black, and defining the object as white;
(2b) Searching for a white object contour;
(2c) And drawing the outline of the found white object.
3. The method for detecting the greasy dirt defect of the spinning cake based on the graph centroid tracking algorithm of claim 1, which is characterized by comprising the following steps: in step (4), the drawing the minimum bounding rectangle of the edge contour specifically includes the following steps:
(3a) Firstly, calculating four vertex coordinates of a minimum circumscribed rectangle of the edge profile;
(3b) And then drawing the minimum rectangular frame of the edge contour according to the four vertex coordinates of the minimum circumscribed rectangle of the edge contour.
4. The method for detecting the greasy dirt defect of the spinning cake based on the graph centroid tracking algorithm of claim 1, which is characterized by comprising the following steps: the step (5) comprises the following steps:
(4a) Creating an image with the same size as the downsampled cake image, initializing all pixels on the image to 0, and completely black;
(4b) Drawing a rectangle on the full black image by using four vertex coordinates of the minimum circumscribed rectangle, setting all pixel values of the area in the rectangle to 255, namely, the area in the rectangle is changed into white, and the area outside the rectangle is also black, so as to obtain a mask image;
(4c) Performing AND operation on each pixel on the downsampled cake image and each pixel at a position corresponding to the mask image to obtain a masked image, wherein the masked image retains an image in a rectangle corresponding to the downsampled cake image, and the image outside the rectangle is black;
setting the pixel of the downsampled spinning cake image as x [ i ], wherein the mask image is only black and white, the black pixel is 0, and the white pixel is 1;
x [ i ] & 1=x [ i ]; the result of the formula can know the phase of the white area on the mask, and finally obtains the original body of the mask;
x [ i ] & 0=0; the result of this formula is known to phase with the black area on the mask, eventually turning black.
5. The method for detecting the greasy dirt defect of the spinning cake based on the graph centroid tracking algorithm of claim 1, which is characterized by comprising the following steps: in step (6), the pixel processing specifically means: according to the set range of the greasy dirt pixels, if the greasy dirt pixel is larger than the set range, the pixels are changed into 255, namely, become white; if it is smaller than this range, the pixel is changed to 0, i.e., to black.
6. The method for detecting the greasy dirt defect of the spinning cake based on the graph centroid tracking algorithm of claim 1, which is characterized by comprising the following steps: in step (7), the log operator operation specifically includes the following steps:
(6a) Carrying out Gaussian filtering on the image after masking;
(6b) And carrying out Laplace operator operation, wherein the calculation formula of the Laplace operator is as follows:
where f (x, y) represents the coordinates of a point on the image,to second order bias the function f (x, y),for second order bias to abscissa x, +.>Is a second order bias to the ordinate y.
CN202210127787.2A 2022-02-11 2022-02-11 Method for detecting greasy dirt defect of spinning cake based on graph centroid tracking algorithm Active CN114494226B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210127787.2A CN114494226B (en) 2022-02-11 2022-02-11 Method for detecting greasy dirt defect of spinning cake based on graph centroid tracking algorithm

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210127787.2A CN114494226B (en) 2022-02-11 2022-02-11 Method for detecting greasy dirt defect of spinning cake based on graph centroid tracking algorithm

Publications (2)

Publication Number Publication Date
CN114494226A CN114494226A (en) 2022-05-13
CN114494226B true CN114494226B (en) 2024-03-12

Family

ID=81480403

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210127787.2A Active CN114494226B (en) 2022-02-11 2022-02-11 Method for detecting greasy dirt defect of spinning cake based on graph centroid tracking algorithm

Country Status (1)

Country Link
CN (1) CN114494226B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115272304B (en) * 2022-09-26 2022-12-09 山东滨州安惠绳网集团有限责任公司 Cloth defect detection method and system based on image processing
CN117333483B (en) * 2023-11-30 2024-06-25 中科慧远视觉技术(洛阳)有限公司 Defect detection method and device for bottom of metal concave structure

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2020134109A1 (en) * 2018-12-28 2020-07-02 歌尔股份有限公司 Object detection method and device and storage medium
CN113436212A (en) * 2021-06-22 2021-09-24 广西电网有限责任公司南宁供电局 Extraction method for inner contour of circuit breaker static contact meshing state image detection

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2020134109A1 (en) * 2018-12-28 2020-07-02 歌尔股份有限公司 Object detection method and device and storage medium
CN113436212A (en) * 2021-06-22 2021-09-24 广西电网有限责任公司南宁供电局 Extraction method for inner contour of circuit breaker static contact meshing state image detection

Also Published As

Publication number Publication date
CN114494226A (en) 2022-05-13

Similar Documents

Publication Publication Date Title
CN111179225B (en) Test paper surface texture defect detection method based on gray gradient clustering
CN114494226B (en) Method for detecting greasy dirt defect of spinning cake based on graph centroid tracking algorithm
CN111539935B (en) Online cable surface defect detection method based on machine vision
Liu et al. A fabric defect detection method based on deep learning
CN102305798B (en) Method for detecting and classifying glass defects based on machine vision
CN107478657A (en) Stainless steel surfaces defect inspection method based on machine vision
CN110827235B (en) Steel plate surface defect detection method
CN110889837A (en) Cloth flaw detection method with flaw classification function
CN114972356B (en) Plastic product surface defect detection and identification method and system
CN106780526A (en) A kind of ferrite wafer alligatoring recognition methods
CN104021561A (en) Fabric fuzzing and pilling image segmentation method based on wavelet transformation and morphological algorithm
CN110348461A (en) A kind of Surface Flaw feature extracting method
CN114511527A (en) Textile spinning cake forming defect detection method based on expanded local binary pattern
CN105069778A (en) Industrial product surface defect detection method constructed based on target characteristic saliency map
CN105572143B (en) The detection method of rolled material surface periodic defect in calender line
Jia et al. A modified centernet for crack detection of sanitary ceramics
Oni et al. Patterned fabric defect detection and classification (FDDC) techniques: a review
CN114494225A (en) Paper tube breakage defect detection method based on shape characteristics
Wang et al. Data augmentation method for fabric defect detection
Peng et al. A fast detection scheme for original fabric based on Blob, canny and rotating integral algorithm
CN113920112A (en) Fabric flaw detection method based on independent classification type feature extraction
Xu et al. Detection method of edge position of belt conveyor based on complex environment
CN114354631A (en) Valve blank surface defect detection method based on vision
Chong et al. Fabric Defect Detection Method Based on Projection Location and Superpixel Segmentation
Li et al. A hough line detection based glass surface defects recognition algorithm

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