CN113643233A - Oily coating detection method, system and equipment and computer readable storage medium - Google Patents

Oily coating detection method, system and equipment and computer readable storage medium Download PDF

Info

Publication number
CN113643233A
CN113643233A CN202110749173.3A CN202110749173A CN113643233A CN 113643233 A CN113643233 A CN 113643233A CN 202110749173 A CN202110749173 A CN 202110749173A CN 113643233 A CN113643233 A CN 113643233A
Authority
CN
China
Prior art keywords
scratch
coating
connected domain
width
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
CN202110749173.3A
Other languages
Chinese (zh)
Other versions
CN113643233B (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.)
Shenzhen Geling Jingrui Vision Co ltd
Original Assignee
Shenzhen Geling Jingrui Vision 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 Shenzhen Geling Jingrui Vision Co ltd filed Critical Shenzhen Geling Jingrui Vision Co ltd
Priority to CN202110749173.3A priority Critical patent/CN113643233B/en
Publication of CN113643233A publication Critical patent/CN113643233A/en
Application granted granted Critical
Publication of CN113643233B publication Critical patent/CN113643233B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/0002Inspection of images, e.g. flaw detection
    • G06T7/0004Industrial image inspection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/136Segmentation; Edge detection involving thresholding
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/187Segmentation; Edge detection involving region growing; involving region merging; involving connected component labelling
    • 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/20081Training; Learning
    • 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/20092Interactive image processing based on input by user
    • G06T2207/20104Interactive definition of region of interest [ROI]
    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Biophysics (AREA)
  • Data Mining & Analysis (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Biomedical Technology (AREA)
  • Software Systems (AREA)
  • Computational Linguistics (AREA)
  • Health & Medical Sciences (AREA)
  • Evolutionary Computation (AREA)
  • General Health & Medical Sciences (AREA)
  • Molecular Biology (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Mathematical Physics (AREA)
  • Quality & Reliability (AREA)
  • Investigating Materials By The Use Of Optical Means Adapted For Particular Applications (AREA)

Abstract

The application discloses an oily coating detection method, an oily coating detection system, oily coating detection equipment and a computer-readable storage medium, and relates to the technical field of image processing, wherein the oily coating detection method comprises the following steps: collecting an initial image; preprocessing the initial image to obtain a coating area to be detected; obtaining a plurality of pieces of first connected domain information and a plurality of pieces of second connected domain information according to the coating area to be detected; obtaining a scratch characteristic value according to the width ratio of two adjacent first connected domain information; if the scraping characteristic value is smaller than or equal to the scraping threshold value, judging as the scraping defect; obtaining a scratch characteristic value according to the width and the height of the same second connected domain information; and if the scratch characteristic value is larger than the scratch threshold value, judging that the scratch defect exists. According to the detection method for the oily coating, automatic defect detection can be achieved, false detection and missing detection are reduced, and detection efficiency is improved.

Description

Oily coating detection method, system and equipment and computer readable storage medium
Technical Field
The present disclosure relates to the field of image processing technologies, and in particular, to a method, a system, and a device for detecting an oily coating, and a computer-readable storage medium.
Background
The coating quality of the coating machine directly influences the quality of the lithium battery, various defects can appear on the oil coating when the coating machine coats, and if the defects cannot be found and processed in time, the quality problem of finished products can be influenced, and unnecessary waste can be caused. At present, field workers find out serious flaws through a visual inspection mode and stop the machine for processing in time, the detection mode is low in detection efficiency, operation processing on a production line is not facilitated, and accidental misjudgment and misjudgment caused by visual inspection by human eyes cannot be avoided.
Disclosure of Invention
The present application aims to solve at least one of the technical problems in the prior art, and provides a method, a system, a device, and a computer-readable storage medium for detecting an oily coating, which can realize automatic defect detection, reduce false detection and missed detection, and improve detection efficiency.
The oily coating detection method according to the embodiment of the first aspect of the application comprises the following steps:
collecting an initial image;
preprocessing the initial image to obtain a coating area to be detected;
obtaining a plurality of pieces of first connected domain information and a plurality of pieces of second connected domain information according to the coating area to be detected;
obtaining a scratch characteristic value according to the width ratio of two adjacent first connected domain information;
if the scraping characteristic value is smaller than or equal to the scraping threshold value, judging as the scraping defect;
obtaining a scratch characteristic value according to the width and the height of the same second connected domain information;
and if the scratch characteristic value is larger than the scratch threshold value, judging that the scratch defect exists.
According to the detection method of the oily coating, at least the following technical effects are achieved: the collected initial image is automatically detected through an image processing visual detection technology, manual operation is not needed, whether flaws are generated on an oil coating coated on the pole piece or not is detected, the link of manual watching is removed, false detection and missing detection are reduced, detection efficiency is improved, and the quality of products is improved.
According to some embodiments of the present application, the pre-processing the initial image to obtain the coating region to be detected comprises:
sequentially carrying out binarization and connected domain processing on the initial image to obtain a processed image;
acquiring a coating width corresponding to the initial image;
and extracting the coating area to be detected from the processed image according to the coating width.
According to some embodiments of the present application, obtaining a plurality of first connected domain information and a plurality of second connected domain information according to the coating region to be detected includes:
according to a first fixed threshold value, dividing the coating area to be detected to obtain a first binary image;
carrying out corrosion expansion treatment on the first binary image to obtain a first corrosion expansion image;
and carrying out connected domain processing on the first corrosion expansion diagram to obtain a plurality of pieces of first connected domain information.
According to some embodiments of the present application, obtaining first connected domain information and second connected domain information according to the coating region to be detected further includes:
according to a second fixed threshold value, segmenting the coating region to be detected to obtain a second binary image;
carrying out corrosion expansion processing on the second binary image to obtain a second corrosion expansion image;
and carrying out connected domain processing on the second corrosion expansion diagram to obtain a plurality of second connected domain information.
According to some embodiments of the present application, the obtaining the scratch feature value according to a wide ratio of two adjacent first connected domain information includes:
transversely equally dividing and cutting each first connected domain information to obtain a plurality of first equally divided domains;
respectively obtaining the width ratio of two first equal-division areas corresponding to each transverse equal-division truncation of two adjacent first connected area information to obtain a plurality of width ratios;
taking a plurality of width ratios as the scratch characteristic values;
correspondingly, if the scratch characteristic value is less than or equal to the scratch threshold, determining that the scratch defect is detected, including:
comparing each width ratio value with the scratch threshold value respectively;
and if each width ratio is less than or equal to the scraping threshold, judging as the scraping defect.
According to some embodiments of the present application, the scratch threshold comprises a ratio threshold, a threshold width value, and a threshold height value; if the scratch characteristic value is greater than the scratch threshold value, determining that the scratch defect exists, including:
comparing the height of the scratch characteristic value with the threshold height value to obtain a first ratio;
comparing the width of the scratch characteristic value with the threshold width value to obtain a second ratio;
comparing the ratio of the height to the width of the scratch characteristic value with the ratio threshold to obtain a third ratio;
and if the first ratio, the second ratio and the third ratio are all not in the corresponding threshold values, judging that the scratch defects exist.
According to some embodiments of the application, after the acquiring the initial image, further comprising:
loading a deep learning model;
acquiring image size information, a first execution degree and a second execution degree;
and inputting the image size information, the first execution degree and the second execution degree into the deep learning model to obtain dry material defect information and bubble defect information.
An oily coating detection system according to an embodiment of the second aspect of the application comprises:
the camera flow-taking module is used for acquiring an initial image;
the algorithm processing module is used for detecting the scratch defects, the dry material defects, the bubble defects and the like of the coating;
the communication management module is used for controlling the algorithm processing module to detect different defects and stop the system;
and the parameter management module is used for setting the information of the coating area and the judgment standards of defects such as scratch defects, dry material defects, bubble defects and the like.
An electronic device according to an embodiment of the third aspect of the present application includes:
at least one processor, and,
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions for execution by the at least one processor to cause the at least one processor to carry out the method of oil coating detection according to the first aspect as described above when executing the instructions.
The computer-readable storage medium according to an embodiment of the fourth aspect of the present application stores computer-executable instructions for causing a computer to perform the oily coating detection method according to the first aspect described above.
Additional aspects and advantages of the present application will be set forth in part in the description which follows and, in part, will be obvious from the description, or may be learned by practice of the present application.
Drawings
The present application is further described with reference to the following figures and examples;
FIG. 1 is a schematic flow chart of an oily coating detection method according to an embodiment of the present application;
FIG. 2 is a schematic view of an oily coating detection system according to another embodiment of the present disclosure;
fig. 3 is a schematic diagram of an electronic device according to another embodiment of the present application.
Detailed Description
Reference will now be made in detail to the present embodiments of the present application, preferred embodiments of which are illustrated in the accompanying drawings, which are for the purpose of visually supplementing the description with figures and detailed description, so as to enable a person skilled in the art to visually and visually understand each and every feature and technical solution of the present application, but not to limit the scope of the present application.
In the description of the present application, the meaning of a plurality is one or more, the meaning of a plurality is two or more, and larger, smaller, larger, etc. are understood as excluding the present number, and larger, smaller, inner, etc. are understood as including the present number. If the first and second are described for the purpose of distinguishing technical features, they are not to be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated or implicitly indicating the precedence of the technical features indicated.
The coating quality of the coating machine directly affects the quality of the lithium battery, and when the coating machine is used for coating, various defects of the oil coating on the coating machine can occur, such as bubble defects caused by uneven stirring of the coating material, dry material defects caused by particles of the coating material, scratch defects caused by serious dry material defects, and scratch defects caused by serious scratch defects. If the defects cannot be found and processed in time, the quality problem of the finished product is influenced, and unnecessary waste is caused. At present, field workers find out serious flaws through a visual inspection mode and stop the machine for processing in time, the detection mode is low in detection efficiency, operation processing on a production line is not facilitated, and accidental misjudgment and misjudgment caused by visual inspection by human eyes cannot be avoided.
Based on this, the embodiment of the application provides an oily coating detection method, system and device, and a computer readable storage medium, which can realize automatic defect detection, reduce false detection and missed detection, and improve detection efficiency. In lithium battery pole piece oil coating scene, make full use of the material characteristic of oil coating, through on-the-spot observation, know the manufacturing process of oil coating and the antecedent consequence that the defect produced, picture automatic detection who gathers camera through image processing visual inspection technique, need not manual operation, whether the oil coating for pole piece coating of coating machine produces the flaw on the solution production water line, get rid of the link that the manual work was watched, can in time detect out the coating flaw and feed back to the system, promote the efficiency of shutting down, reduce the waste material because of the defect produces, thereby improve the quality of product.
An oily coating detection method according to an embodiment of the present application is described below with reference to the drawings.
As shown in fig. 1, the method for detecting oily coating according to the embodiment of the first aspect of the present application at least includes the following steps:
s100: collecting an initial image;
s200: preprocessing the initial image to obtain a coating area to be detected;
s300: obtaining a plurality of pieces of first connected domain information and a plurality of pieces of second connected domain information according to the coating area to be detected;
s400: obtaining a scratch characteristic value according to the width ratio of two adjacent first connected domain information;
s500: if the scraping characteristic value is less than or equal to the scraping threshold value, judging as the scraping defect;
s600: obtaining a scratch characteristic value according to the width and the height of the same second connected domain information;
s700: and if the scratch characteristic value is larger than the scratch threshold value, judging that the scratch defect exists.
In some embodiments, step S100: collecting an initial image; specifically, the oil coating is collected by an image collecting unit, and a black-and-white image, namely an initial image, of the front side of the coating is obtained.
Step S200: preprocessing the initial image to obtain a coating area to be detected; specifically, for initializationAnd (3) preprocessing the image, namely the black and white image of the front surface of the coating collected in the step (S100), wherein the preprocessing comprises binarization and connected domain detection, and obtaining an interested region, namely a coating region to be detected, according to information such as width, wherein the width is the coating width of the coating. Further, in this embodiment, the coating region to be detected includes two regions, each with ROIl[x0,x1],ROIr[x2,x3]Represents; the indices l and r denote the coating region to be examined in the region of the left side of the coating and the coating region to be examined in the region of the right side of the coating, x0And x1Respectively showing the x-axis coordinate of the black-and-white picture of the left boundary of the coating area to be detected on the left side of the coating on the front side of the coating and the x-axis coordinate, x, of the black-and-white picture of the right boundary on the front side of the coating2And x3Respectively shows the x-axis coordinate of the black-and-white picture of the coating front at the left boundary and the x-axis coordinate of the black-and-white picture of the coating front at the right boundary of the coating area to be detected at the right side of the coating.
Step S300: obtaining a plurality of pieces of first connected domain information and a plurality of pieces of second connected domain information according to the coating area to be detected; specifically, the two coating regions to be detected obtained in step S200 are respectively subjected to defect detection, taking one of the coating regions to be detected as an example, a first fixed threshold is set according to the characteristics of the scratch defect, and the coating region to be detected is subjected to fixed threshold segmentation, corrosion expansion, connected domain treatment and the like according to the first fixed threshold, so as to obtain a plurality of pieces of first connected domain information, stats1(i, x, y, w, h, c) (i ═ 1,2, 3.), wherein x, y are coordinate locations, w is wide, h is high, and c is the centroid; setting a second fixed threshold according to the characteristics of the scratch defects, and performing fixed threshold segmentation, corrosion expansion, connected domain processing and the like on the coating area to be detected according to the second fixed threshold to obtain a plurality of second connected domain information, stats2(i, x, y, w, h, c) (i ═ 1,2, 3.), where x, y are coordinate locations, w is wide, h is high, and c is the centroid.
Step S400: obtaining a scratch characteristic value according to the width ratio of two adjacent first connected domain information; step S500: if the scraping characteristic value is less than or equal to the scraping threshold value, judging as the scraping defect; specifically, in this embodiment, when a scratch characteristic value is detected, a backlight source is used to obtain an image, when a scratch defect exists, the section of the scratch defect is a downward horn mouth, a scratch threshold value is set according to the characteristic, and if the scratch characteristic value is less than or equal to the scratch threshold value, the scratch defect is determined, and an alarm is issued and the coater is controlled to stop; otherwise, carrying out scratch defect detection.
Step S600: obtaining a scratch characteristic value according to the width and the height of the same second connected domain information; step S700: if the scratch characteristic value is larger than the scratch threshold value, judging that the scratch defect exists; specifically, a scratch threshold value is set according to the characteristics of scratch defects, a scratch characteristic value is obtained according to the ratio of the width to the height of the same second connected domain information, if the scratch characteristic value is larger than the scratch threshold value, the scratch defects are judged, and if the scratch defects continuously appear within 1 meter, an alarm is given out and the coating machine is controlled to stop; otherwise, dry material detection and bubble detection are carried out.
According to the detection method of the oily coating, the collected initial image is automatically detected through an image processing visual detection technology, manual operation is not needed, whether flaws are generated on the oily coating coated on the pole piece or not is detected, the link of manual watching is removed, false detection and missing detection are reduced, the detection efficiency is improved, and the quality of a product is improved.
In some embodiments of the present application, step S100: after the initial image is collected, dry material defect and bubble defect detection is further included, wherein the dry material defect and the bubble defect detection at least comprises the following steps:
loading a deep learning model;
acquiring image size information, a first execution degree and a second execution degree;
and inputting the image size information, the first execution degree and the second execution degree into a deep learning model to obtain dry material defect information and bubble defect information.
In some embodiments, after step S700, if both scratch defect and scratch defect detection pass, dry defect and bubble defect detection is performed: a deep learning model, specifically YOLOv5, was loaded, where the model had been previously trained through a large number of coating images. Image size information, a first execution degree, and a second execution degree are acquired, specifically, according to the picture size, length and width are set to img _ size 640, the first execution degree conf _ th is set to 0.3, and the second execution degree iou _ th is set to 0.6. Inputting the image size information, the first execution degree and the second execution degree into a deep learning model to obtain dry material defect information and bubble defect information, and specifically, inputting the picture size (i.e. the length and the width are img _ size ═ 640), the first execution degree conf _ th ═ 0.3 and the second execution degree iou _ th ═ 0.6 into a trained YOLOv5 model to obtain coordinate information and size information of the dry material defect and the bubble defect through the trained YOLOv5 model, wherein the size information comprises the width and the height. If the defect of dry material defect or bubble defect within 1 meter reaches 3 times, an alarm is given and the coating machine is controlled to stop; otherwise, continuing the defect detection of the next round.
And after the step S100, sequentially detecting the scratch defect, the dry material defect and the bubble defect according to the collected initial image, detecting the next defect after the current defect passes, and repeating the steps S100 to S700 and the steps related to the detection of the dry material defect and the bubble defect if all four types of defects pass, so as to detect the next round of defects.
In other embodiments, after step S100, the detection of the scratch defect, the dry material defect, and the bubble defect may be performed simultaneously, and when any one of the defects does not meet the quality requirement, an alarm is issued and the coater is controlled to stop; and if all the four defect detections pass, continuing the next round of defect detection.
In some embodiments of the present application, step S200: pre-processing the initial image to obtain a coating area to be detected, and at least comprising the following steps of:
sequentially carrying out binarization and connected domain processing on the initial image to obtain a processed image;
acquiring a coating width corresponding to an initial image;
the coating region to be detected is extracted from the processed image according to the coating width.
In some embodiments, the method is used for acquiringPerforming binarization and connected domain processing on the initial image, namely the black and white image on the front surface of the coating to obtain a processed image; extracting coating areas to be detected from the processed image according to the coating width of the actual coating corresponding to the initial image, wherein the coating areas to be detected comprise two coating areas, and the two coating areas are respectively used as ROIl[x0,x1],ROIr[x2,x3]And (4) showing. By the method, the coating area to be detected corresponding to the actual coating in the initial image can be extracted more accurately.
In some embodiments of the present application, step S300: obtaining a plurality of pieces of first connected domain information and a plurality of pieces of second connected domain information according to the coating area to be detected, and at least comprising the following steps:
according to a first fixed threshold value, dividing a coating area to be detected to obtain a first binary image;
carrying out corrosion expansion treatment on the first binary image to obtain a first corrosion expansion image;
and carrying out connected domain processing on the first corrosion expansion diagram to obtain a plurality of pieces of first connected domain information.
In some embodiments, for scratch defect detection, a first fixed threshold Tscrape1 is set to 200 according to the optimal effect of distinguishing the foreground and the background and the image features corresponding to the scratch defects; respectively carrying out fixed threshold segmentation on two coating areas to be detected according to a first fixed threshold Tschape 1-200 to obtain first binary images respectively D1l[x0,x1]And D1r[x2,x3](ii) a And then respectively aligning the two first binary images D1l[x0,x1]And D1r[x2,x3]The corrosion and the expansion are respectively carried out to obtain two first corrosion patterns DO1l[x0,x1]And DO1r[x2,x3](ii) a Finally, connected domain processing is respectively carried out to obtain a plurality of first connected domain information stats1(i, x, y, w, h, c) (i ═ 1,2, 3.), where x, y are coordinate locations, w is wide, h is high, and c is the centroid.
In some embodiments of the present application, step S300: obtaining first communication domain information and second communication domain information according to a coating region to be detected, and at least comprising the following steps of:
according to a second fixed threshold value, dividing a coating region to be detected to obtain a second binary image;
carrying out corrosion expansion treatment on the second binary image to obtain a second corrosion expansion image;
and carrying out connected domain processing on the second corrosion expansion diagram to obtain a plurality of second connected domain information.
In some embodiments, for scratch defect detection, to eliminate the interference term, a second fixed threshold Tscrape2 is set to 15; respectively carrying out fixed threshold segmentation on the two coating regions to be detected according to a second fixed threshold Tschape 2-15 to obtain second binary images which are respectively D2l[x0,x1]And D2r[x2,x3](ii) a And respectively aligning the two second binary images D2l[x0,x1]And D2r[x2,x3]The etching and the expansion are respectively carried out to obtain two second etching graphs DO2l[x0,x1]And DO2r[x2,x3](ii) a Finally, connected domain processing is respectively carried out to obtain a plurality of first connected domain information stats2(i, x, y, w, h, c) (i ═ 1,2, 3.), where x, y are coordinate locations, w is wide, h is high, and c is the centroid.
In some embodiments of the present application, step S400: obtaining a scratch characteristic value according to the width ratio of two adjacent first connected domain information, and at least comprising the following steps:
transversely equally dividing and cutting each first connected domain information to obtain a plurality of first equally divided domains;
respectively obtaining the width ratio of two first equal-division areas corresponding to each transverse equal-division truncation of two adjacent first connected area information to obtain a plurality of width ratios;
taking a plurality of width ratios as scratch characteristic values;
correspondingly, step S500: if the scratch characteristic value is less than or equal to the scratch threshold value, judging the scratch defect, and at least comprising the following steps:
comparing each width ratio with a scratch threshold value respectively;
and if each width ratio is less than or equal to the scraping threshold, judging as the scraping defect.
In some embodiments, each first connected domain information is transversely divided equally to obtain a plurality of first equally divided domains; specifically, each first connected domain information stats1(i, x, y, w, h, c) (i 1,2, 3..) is transversely equally divided into three parts to obtain three first equal-divided regions stats1(i, x, y, w, h, c, j) (j ═ 0,1, 2); the transverse equally dividing may also be one, five, seven, nine, and the more the transverse equally dividing fraction is, the more accurate the transverse equally dividing fraction is, but the higher the calculation complexity is, and the trisection is taken as an example in this embodiment, and is not specifically limited herein.
Respectively obtaining the width ratio of two first equal-division areas corresponding to each transverse equal-division truncation of two adjacent first connected area information to obtain a plurality of width ratios; specifically, for each pair of adjacent first connected domain information, three first equal-division domains stats corresponding to each pair of first connected domain information1(i, x, y, w, h, c, j) (j is 0,1,2) processing the connected domain to obtain the wide stats of each region1(i,x,y,w,h,c,j)[1,2]Where 1 represents a connected component and 2 represents the width of the connected component; and then, according to the width ratio of two first equal partition areas corresponding to each transverse equal partition of the information of two adjacent first connected areas, obtaining the corresponding three width ratios Ri1 (stats)1(i,x,y,w,h,c,j)[1,2]/stats1(i+1,x,y,w,h,c,j)[1,2]I.e. scratch characterization values.
Correspondingly, each width ratio is compared with a scratch threshold, specifically, each width ratio Ri1 is compared with a scratch threshold, and a scratch threshold th1 is set to 0.67 according to the scratch defect. If each width ratio is less than or equal to the scraping threshold, judging as the scraping defect; specifically, if each width ratio Ri1 meets Ri 1< ═ th1, the scratch defect is detected and determined, and the control system gives an alarm and controls the coating machine to stop; otherwise, entering scratch defect detection.
It is easy to think that, when comparing with the scratch threshold, the width ratio corresponding to each pair of adjacent first connected component information may be compared with it, or the set of width ratios corresponding to a plurality of pairs of adjacent first connected component information may be compared with it.
By the method, the characteristic value is extracted by fully utilizing the characteristics of the scraping defect, and meanwhile, the transverse equally-divided truncation is carried out for multiple threshold value comparison, so that the detection accuracy is improved.
In some embodiments of the present application, the scratch threshold comprises a ratio threshold, a threshold width value, and a threshold height value; step S700: if the scratch characteristic value is larger than the scratch threshold value, judging the scratch defect, and at least comprising the following steps:
comparing the high value of the scratch characteristic value with a threshold high value to obtain a first ratio;
comparing the width of the scratch characteristic value with the threshold width value to obtain a second ratio;
comparing the ratio of the height to the width of the scratch characteristic value with a ratio threshold to obtain a third ratio;
and if the first ratio, the second ratio and the third ratio are all not in the corresponding threshold values, judging that the scratch defects exist.
In some embodiments, prior to step S700, step S600: obtaining a scratch characteristic value according to the width and the height of the same second connected domain information, and at least comprising the following steps of: transversely equally dividing and truncating each second connected domain information to obtain a plurality of second equally divided regions; specifically, each second connected domain information stats2i, x, y, w, h, c) (i 1,2, 3..) are transversely bisected and cut into three parts to obtain three second bisected regions stats2(i, x, y, w, h, c, j) (j ═ 0,1, 2); dividing three parts of the second equal part into regions stats2(i, x, y, w, h, c, j) (j is 0,1,2) processing the connected domain to obtain the wide stats of each region2(i,x,y,w,h,c,j)[1,2]And high stats2(i,x,y,w,h,c,j)[1,3]Where 1 represents a connected component, 2 represents the width of the connected component, and 3 represents the height of the connected component; further, for the scratch with a breakpoint in the middle, closing operation is performed on the scratch, and then connected domain processing is performed on the scratch to obtain the width and height of each region; broad stats of each region2(i,x,y,w,h,c,j)[1,2]The height stats of each region was defined as the width of the scratch feature value2(i,x,y,w,h,c,j)[1,3]As the height of the scratch feature value, the ratio Ri2 of the height and width of each region of the same second connected component is made to be stats (i, x, y, w, h, c, j) [1, 3%]/stats(i,x,y,w,h,c,j)[1,2]As the ratio of the height to width of the scratch feature value.
The scratch threshold includes a ratio threshold, a threshold width value and a threshold height value, specifically, the ratio threshold is set to th 2-5, the threshold width value is set to 50 and the threshold height value is set to 200 according to the characteristics of the scratch defect. In step S700, specifically, if the scratch feature value is wide stats2(i,x,y,w,h,c,j)[1,2]High stats of scratch characteristic value less than 50 threshold width value2(i,x,y,w,h,c,j)[1,3]If the ratio Ri2 of the height to the width of the scratch characteristic value is greater than the threshold height value 200, the ratio is greater than the ratio threshold, namely Ri2 is greater than th2, the scratch defect is detected and judged, and if the scratch defect continuously appears within 1 meter, the control system gives an alarm and controls the coating machine to stop; otherwise, dry material detection is carried out.
By the method, the characteristic value is extracted by fully utilizing the characteristics of the scratch defect, and the transverse equally-divided truncation is carried out for multiple threshold value comparison, so that the detection accuracy is improved.
An oily coating detection system according to an embodiment of the second aspect of the application comprises:
the camera flow-taking module is used for acquiring an initial image;
the algorithm processing module is used for detecting the scratch defects, the dry material defects, the bubble defects and the like of the coating;
the communication management module is used for controlling the algorithm processing module to detect different defects and carry out shutdown processing on the system;
and the parameter management module is used for setting the information of the coating area and the judgment standards of defects such as scratch defects, dry material defects, bubble defects and the like.
As shown in fig. 2, in some embodiments, there is provided an oily coating detection system for automatically detecting a defect of an oily coating, comprising:
the camera flow-taking module is used for acquiring an initial image, specifically, in the normal production process of the coating machine, the camera acquires the image and drives the encoder to move according to the running speed of a large roller of the coating machine, so that a pulse is sent to the camera for real-time image acquisition;
the communication management module is used for controlling the algorithm processing module to detect different defects and perform system shutdown processing, specifically, the running state of the coating machine needs to be acquired after the system sends information, and the running of the algorithm processing module and the shutdown processing of the coating machine are controlled according to different states;
the algorithm processing module is used for detecting the scratch defects, the dry material defects, the bubble defects and the like of the coating, and specifically, the oily coating detection method of the first aspect is used for detecting the scratch defects, the dry material defects and the bubble defects of the coating and feeding the results back to the front-end interface, the data storage module and the signal module for processing;
the parameter management module is used for setting the information of a coating area and judgment standards of defects such as scratch defects, dry material defects, bubble defects and the like, and specifically, an operator can set the position of the coating area through the parameter management module and set each defect standard of the machine for judging and stopping the scratch defects, the dry material defects and the bubble defects;
the log management module stores defect information, system abnormal information and other key information by day;
and the data storage module stores defect specific information (including time, defect type, defect coordinate information, defect size and whether to stop or not) according to days.
In other embodiments, the application further provides an automatic defect detection method for the oily coating.
The parameter setting unit obtains a defect result required by production by setting different defect sizes and different judgment standards, and timely handles field problems through the defect result.
The image acquisition unit acquires the oil coating image in real time through a high-precision industrial line scanning camera and provides an original image for subsequent system detection.
The detection unit detects and analyzes the acquired original image through a computer vision image processing technology and a deep learning technology, firstly judges whether the image has defects or not, and judges which type of the defects belong to under the condition of the defects.
The data storage unit stores the information (time, result graph, defect information (position, defect size, defect type)) detected as the defects into the local through the system storage function for the staff to inquire.
According to a third aspect of the embodiments of the present application, an electronic device 700 is provided, where the electronic device 700 may be any type of smart terminal, such as a mobile phone, a tablet computer, a personal computer, and the like.
As shown in fig. 3, the electronic device 800, according to some embodiments of the present application, includes: one or more processors 801 and memory 802, one processor 801 being illustrated in fig. 3.
The processor 801 and the memory 802 may be communicatively coupled via a bus or otherwise, as illustrated in FIG. 3 by way of example for coupling via a bus.
The memory 802 is a non-transitory computer readable storage medium, and can be used for storing non-transitory software programs, non-transitory computer executable programs, and units, such as program instructions/units corresponding to the electronic device 800 in the embodiments of the present application. The processor 801 executes various functional applications and data processing by running non-transitory software programs, instructions and units stored in the memory 802, namely, implements the oily coating detection method of the above-described method embodiments.
The memory 802 may include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store data created according to program instructions/units, and the like. Further, the memory 802 may include high-speed random access memory, and may also include non-transitory memory, such as at least one magnetic disk storage device, flash memory device, or other non-transitory solid state storage device. In some embodiments, the memory 802 optionally includes memory located remotely from the processor 801, which may be connected to the electronic device 800 via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
One or more units are stored in the memory 802, and when executed by the one or more processors 801, perform the oily coating detection method in any of the method embodiments described above. For example, the above-described method steps S100 to S700 in fig. 1 are performed.
In a third aspect of the embodiments of the present application, a computer-readable storage medium is further provided, where the computer-readable storage medium stores computer-executable instructions, which are executed by one or more processors 801, for example, by one processor 801 in fig. 3, and may cause the one or more processors 801 to perform the oily coating detection method in the above-described method embodiment, for example, perform the above-described method steps S100 to S700 in fig. 1.
The above-described embodiments of the apparatus are merely illustrative, and the units described as separate parts may or may not be physically separate, and the parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
Through the above description of the embodiments, those skilled in the art will clearly understand that each embodiment can be implemented by software plus a general hardware platform, and certainly can also be implemented by hardware. It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware related to instructions of a computer program, which can be stored in a computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. The storage medium may be a magnetic disk, an optical disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), or the like.
In the description herein, reference to the description of the terms "one embodiment," "some embodiments," "an illustrative embodiment," "an example," "a specific example," or "some examples" or the like means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the application. In this specification, the schematic representations of the terms used above do not necessarily refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
While embodiments of the present application have been shown and described, it will be understood by those of ordinary skill in the art that: many changes, modifications, substitutions and alterations to these embodiments may be made without departing from the principles and spirit of this application, and are intended to be included within the scope of this application.

Claims (10)

1. An oily coating detection method is characterized by comprising the following steps:
collecting an initial image;
preprocessing the initial image to obtain a coating area to be detected;
obtaining a plurality of pieces of first connected domain information and a plurality of pieces of second connected domain information according to the coating area to be detected;
obtaining a scratch characteristic value according to the width ratio of two adjacent first connected domain information;
if the scraping characteristic value is smaller than or equal to the scraping threshold value, judging as the scraping defect;
obtaining a scratch characteristic value according to the width and the height of the same second connected domain information;
and if the scratch characteristic value is larger than the scratch threshold value, judging that the scratch defect exists.
2. The oily coating detection method according to claim 1, wherein the pre-processing of the initial image to obtain the coating area to be detected comprises:
sequentially carrying out binarization and connected domain processing on the initial image to obtain a processed image;
acquiring a coating width corresponding to the initial image;
and extracting the coating area to be detected from the processed image according to the coating width.
3. The method for detecting oily coating according to claim 1, wherein the obtaining of a plurality of first connected domain information and a plurality of second connected domain information according to the coating region to be detected comprises:
according to a first fixed threshold value, dividing the coating area to be detected to obtain a first binary image;
carrying out corrosion expansion treatment on the first binary image to obtain a first corrosion expansion image;
and carrying out connected domain processing on the first corrosion expansion diagram to obtain a plurality of pieces of first connected domain information.
4. The method for detecting oily coating according to claim 3, wherein the obtaining of the first connected domain information and the second connected domain information according to the coating region to be detected further comprises:
according to a second fixed threshold value, segmenting the coating region to be detected to obtain a second binary image;
carrying out corrosion expansion processing on the second binary image to obtain a second corrosion expansion image;
and carrying out connected domain processing on the second corrosion expansion diagram to obtain a plurality of second connected domain information.
5. The oily coating detection method according to claim 1 or 3, wherein the obtaining of the scratch characteristic value according to the wide ratio of two adjacent first connected domain information comprises:
transversely equally dividing and cutting each first connected domain information to obtain a plurality of first equally divided domains;
respectively obtaining the width ratio of two first equal-division areas corresponding to each transverse equal-division truncation of two adjacent first connected area information to obtain a plurality of width ratios;
taking a plurality of width ratios as the scratch characteristic values;
correspondingly, if the scratch characteristic value is less than or equal to the scratch threshold, determining that the scratch defect is detected, including:
comparing each width ratio value with the scratch threshold value respectively;
and if each width ratio is less than or equal to the scraping threshold, judging as the scraping defect.
6. The oily coating detection method according to claim 1 or 4, wherein the scratch threshold value comprises a ratio threshold, a threshold width value and a threshold height value; if the scratch characteristic value is greater than the scratch threshold value, determining that the scratch defect exists, including:
comparing the height of the scratch characteristic value with the threshold height value to obtain a first ratio;
comparing the width of the scratch characteristic value with the threshold width value to obtain a second ratio;
comparing the ratio of the height to the width of the scratch characteristic value with the ratio threshold to obtain a third ratio;
and if the first ratio, the second ratio and the third ratio are all not in the corresponding threshold values, judging that the scratch defects exist.
7. The oily coating detection method of claim 1, wherein after the initial image is acquired, the method further comprises:
loading a deep learning model;
acquiring image size information, a first execution degree and a second execution degree;
and inputting the image size information, the first execution degree and the second execution degree into the deep learning model to obtain dry material defect information and bubble defect information.
8. An oily coating detection system, comprising:
the camera flow-taking module is used for acquiring an initial image;
the algorithm processing module is used for detecting the scratch defects, the dry material defects and the bubble defects of the coating;
the communication management module is used for controlling the algorithm processing module to detect different defects and stop the system;
and the parameter management module is used for setting the information of the coating area and the judgment standards of defects such as scratch defects, dry material defects, bubble defects and the like.
9. An electronic device, comprising:
at least one processor, and,
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions for execution by the at least one processor to cause the at least one processor to perform the oily coating detection method of any one of claims 1 to 7 when executing the instructions.
10. A computer-readable storage medium storing computer-executable instructions for causing a computer to perform the oily coating detection method according to any one of claims 1 to 7.
CN202110749173.3A 2021-07-01 2021-07-01 Oily coating detection method, system and equipment, and computer readable storage medium Active CN113643233B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110749173.3A CN113643233B (en) 2021-07-01 2021-07-01 Oily coating detection method, system and equipment, and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110749173.3A CN113643233B (en) 2021-07-01 2021-07-01 Oily coating detection method, system and equipment, and computer readable storage medium

Publications (2)

Publication Number Publication Date
CN113643233A true CN113643233A (en) 2021-11-12
CN113643233B CN113643233B (en) 2024-05-24

Family

ID=78416494

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110749173.3A Active CN113643233B (en) 2021-07-01 2021-07-01 Oily coating detection method, system and equipment, and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN113643233B (en)

Citations (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101105459A (en) * 2007-05-15 2008-01-16 广州市万世德包装机械有限公司 Empty bottle mouth defect inspection method and device
JP2008281580A (en) * 2008-06-26 2008-11-20 Olympus Corp Defect classification system
CN101995223A (en) * 2009-08-25 2011-03-30 比亚迪股份有限公司 Chip appearance detection method and system
US20130236086A1 (en) * 2012-03-09 2013-09-12 National Applied Research Laboratories Method of Inspecting Chip Defects
US20160021750A1 (en) * 2014-07-16 2016-01-21 International Business Machines Corporation Multi-stacked electronic device with defect-free solder connection
WO2016172827A1 (en) * 2015-04-27 2016-11-03 武汉武大卓越科技有限责任公司 Stepwise-refinement pavement crack detection method
CN106204614A (en) * 2016-07-21 2016-12-07 湘潭大学 A kind of workpiece appearance defects detection method based on machine vision
GB201705052D0 (en) * 2017-03-29 2017-05-10 Redlux Ltd Inspection of components for imperfections
US20180225816A1 (en) * 2017-02-07 2018-08-09 Xerox Corporation System and method for detecting defects in an image
CN110163842A (en) * 2019-04-15 2019-08-23 深圳高速工程检测有限公司 Building cracks detection method, device, computer equipment and storage medium
CN110766684A (en) * 2019-10-30 2020-02-07 江南大学 Stator surface defect detection system and detection method based on machine vision
CN111179243A (en) * 2019-12-25 2020-05-19 武汉昕竺科技服务有限公司 Small-size chip crack detection method and system based on computer vision
CN111223080A (en) * 2020-01-02 2020-06-02 长江存储科技有限责任公司 Wafer detection method and device, electronic equipment and storage medium
CN111444921A (en) * 2020-03-25 2020-07-24 浙江华睿科技有限公司 Scratch defect detection method and device, computing equipment and storage medium
CN111627009A (en) * 2020-05-27 2020-09-04 歌尔股份有限公司 Screen detection method and device and head-mounted display equipment
CN111882541A (en) * 2020-07-28 2020-11-03 广州柔视智能科技有限公司 Defect detection method, device, equipment and computer readable storage medium
CN112102278A (en) * 2020-09-11 2020-12-18 天津科技大学 Metal workpiece machining surface defect detection method based on computer vision
CN112541884A (en) * 2020-10-30 2021-03-23 浙江大华技术股份有限公司 Defect detection method and apparatus, and computer-readable storage medium

Patent Citations (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101105459A (en) * 2007-05-15 2008-01-16 广州市万世德包装机械有限公司 Empty bottle mouth defect inspection method and device
JP2008281580A (en) * 2008-06-26 2008-11-20 Olympus Corp Defect classification system
CN101995223A (en) * 2009-08-25 2011-03-30 比亚迪股份有限公司 Chip appearance detection method and system
US20130236086A1 (en) * 2012-03-09 2013-09-12 National Applied Research Laboratories Method of Inspecting Chip Defects
US20160021750A1 (en) * 2014-07-16 2016-01-21 International Business Machines Corporation Multi-stacked electronic device with defect-free solder connection
WO2016172827A1 (en) * 2015-04-27 2016-11-03 武汉武大卓越科技有限责任公司 Stepwise-refinement pavement crack detection method
CN106204614A (en) * 2016-07-21 2016-12-07 湘潭大学 A kind of workpiece appearance defects detection method based on machine vision
US20180225816A1 (en) * 2017-02-07 2018-08-09 Xerox Corporation System and method for detecting defects in an image
GB201705052D0 (en) * 2017-03-29 2017-05-10 Redlux Ltd Inspection of components for imperfections
CN110163842A (en) * 2019-04-15 2019-08-23 深圳高速工程检测有限公司 Building cracks detection method, device, computer equipment and storage medium
CN110766684A (en) * 2019-10-30 2020-02-07 江南大学 Stator surface defect detection system and detection method based on machine vision
CN111179243A (en) * 2019-12-25 2020-05-19 武汉昕竺科技服务有限公司 Small-size chip crack detection method and system based on computer vision
CN111223080A (en) * 2020-01-02 2020-06-02 长江存储科技有限责任公司 Wafer detection method and device, electronic equipment and storage medium
CN111444921A (en) * 2020-03-25 2020-07-24 浙江华睿科技有限公司 Scratch defect detection method and device, computing equipment and storage medium
CN111627009A (en) * 2020-05-27 2020-09-04 歌尔股份有限公司 Screen detection method and device and head-mounted display equipment
CN111882541A (en) * 2020-07-28 2020-11-03 广州柔视智能科技有限公司 Defect detection method, device, equipment and computer readable storage medium
CN112102278A (en) * 2020-09-11 2020-12-18 天津科技大学 Metal workpiece machining surface defect detection method based on computer vision
CN112541884A (en) * 2020-10-30 2021-03-23 浙江大华技术股份有限公司 Defect detection method and apparatus, and computer-readable storage medium

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
PETER LIN; NA CAI; SANGKEE EAH; OLIVER D. PATTERSON; WEIHONG GAO: "E-beam mechanics and net connectivity for interlayer short detection: DI: Defect inspection and reduction", 《2017 28TH ANNUAL SEMI ADVANCED SEMICONDUCTOR MANUFACTURING CONFERENCE (ASMC)》 *
郭全民;张海先: "基于图像处理技术的混凝土路面裂缝检测方法", 传感器与微***, no. 004 *
马丽莎: "基于数字图像处理的路面裂缝识别方法研究", 《CNKI》 *

Also Published As

Publication number Publication date
CN113643233B (en) 2024-05-24

Similar Documents

Publication Publication Date Title
CN110930357B (en) In-service steel wire rope surface defect detection method and system based on deep learning
CN106770332A (en) A kind of electronic die blank defects detection implementation method based on machine vision
CN106683099A (en) Product surface defect detection method
CN114897908B (en) Machine vision-based method and system for analyzing defects of selective laser powder spreading sintering surface
KR101743270B1 (en) The method for separating and recognizing individual plankton using deep learning in a clumped or dispersed microscopic plankton image
CN113935666B (en) Building decoration wall tile abnormity evaluation method based on image processing
CN111339907A (en) Pollution discharge identification method and device based on image identification technology
CN111325738A (en) Intelligent detection method and system for peripheral cracks of transverse hole
CN115035092A (en) Image-based bottle detection method, device, equipment and storage medium
CN115631146A (en) Image-based pantograph carbon slide strip defect detection method
CN113643233A (en) Oily coating detection method, system and equipment and computer readable storage medium
CN112070748A (en) Metal oil pipe defect detection method and device
CN111738991A (en) Method for creating digital ray detection model of weld defects
CN115049641A (en) Electric data processing method and system for anomaly detection of mechanical parts
CN109272480B (en) Detection method for boundary of immiscible solution
CN116152191A (en) Display screen crack defect detection method, device and equipment based on deep learning
CN113781513B (en) Leakage detection method and system for water supply pipeline of power plant
JPH07333197A (en) Automatic surface flaw detector
Purahong et al. Crack detection of eggshell using image processing and computer vision
Aydin et al. A vision based inspection system using gaussian mixture model based interactive segmentation
CN113763491A (en) Visual detection method for tobacco shred barrel residues
CN113487538A (en) Multi-target segmentation defect detection method and device and computer storage medium thereof
Chong et al. Fabric Defect Detection Method Based on Projection Location and Superpixel Segmentation
Haffner et al. Weld segmentation for diagnostic and evaluation method
Peng et al. An online glass medicine bottle defect inspection method 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