CN108776146B - Method and device for detecting silk-screen lines - Google Patents

Method and device for detecting silk-screen lines Download PDF

Info

Publication number
CN108776146B
CN108776146B CN201810772238.4A CN201810772238A CN108776146B CN 108776146 B CN108776146 B CN 108776146B CN 201810772238 A CN201810772238 A CN 201810772238A CN 108776146 B CN108776146 B CN 108776146B
Authority
CN
China
Prior art keywords
silk
detected
screen lines
screen
lines
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
CN201810772238.4A
Other languages
Chinese (zh)
Other versions
CN108776146A (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.)
Gree Electric Appliances Inc of Zhuhai
Zhuhai Gree Intelligent Equipment Co Ltd
Original Assignee
Gree Electric Appliances Inc of Zhuhai
Zhuhai Gree Intelligent Equipment 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 Gree Electric Appliances Inc of Zhuhai, Zhuhai Gree Intelligent Equipment Co Ltd filed Critical Gree Electric Appliances Inc of Zhuhai
Priority to CN201810772238.4A priority Critical patent/CN108776146B/en
Publication of CN108776146A publication Critical patent/CN108776146A/en
Application granted granted Critical
Publication of CN108776146B publication Critical patent/CN108776146B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • 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
    • G01MEASURING; TESTING
    • G01NINVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
    • G01N1/00Sampling; Preparing specimens for investigation
    • G01N1/28Preparing specimens for investigation including physical details of (bio-)chemical methods covered elsewhere, e.g. G01N33/50, C12Q
    • G01N1/32Polishing; Etching
    • 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/95Investigating the presence of flaws or contamination characterised by the material or shape of the object to be examined
    • 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
    • G01N2021/8887Scan 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 based on image processing techniques

Landscapes

  • Chemical & Material Sciences (AREA)
  • Biochemistry (AREA)
  • Pathology (AREA)
  • Physics & Mathematics (AREA)
  • Health & Medical Sciences (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Immunology (AREA)
  • Analytical Chemistry (AREA)
  • General Physics & Mathematics (AREA)
  • General Health & Medical Sciences (AREA)
  • Engineering & Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Signal Processing (AREA)
  • Image Processing (AREA)
  • Image Analysis (AREA)

Abstract

The invention discloses a method and a device for detecting silk-screen lines. Wherein, the method comprises the following steps: extracting silk-screen lines to be detected from a panel area on a product image; carrying out corrosion treatment on the silk-screen lines to be detected by adopting different corrosion kernel values to obtain the silk-screen lines subjected to corrosion treatment; and determining whether the silk-screen lines to be detected have defects by counting the number of the silk-screen lines subjected to the corrosion treatment, wherein the defects comprise at least one of the following defects: the invention solves the technical problem that in the prior art, the detection result is inaccurate by adopting a method for detecting whether the silk-screen lines are defective by calipers because the silk-screen lines are small in size.

Description

Method and device for detecting silk-screen lines
Technical Field
The invention relates to the technical field of detection, in particular to a method and a device for detecting silk-screen lines.
Background
In the field of detection at present, visual detection is mainly used as a method for detecting unclosed line burrs or defects, and the detection method used by enterprises under common conditions is as follows: (1) extracting a line edge area; (2) planning a path for the area; (3) taking a point at intervals on the path as a measuring point of the caliper; (4) measuring the width of the line segment by using a caliper tool; (5) the defects of each part of the line can be measured along the path in one circle. The method has the following defects in the detection of some non-closed lines with the width of less than 0.2 mm: firstly, the risk of misjudgment exists, for example, the silk-screen lines of a panel of a manual operator are used, a commonly-used industrial camera with 500 ten thousand pixels is used for detection, the width of the lines is only two to three pixels, the detection of the small lines by the calipers is not accurate, and the risk of misdetection of poor products exists; secondly, the complexity of the detection algorithm is increased, the opening of the line needs to be avoided around the path, and the calculation amount of the algorithm is increased.
Aiming at the technical problem that in the prior art, due to the fact that the silk-screen lines are small in size, the method for detecting whether the silk-screen lines are defective through calipers can cause inaccurate detection results, an effective solution is not provided at present.
Disclosure of Invention
The embodiment of the invention provides a method and a device for detecting a silk-screen line, which are used for at least solving the technical problem that in the prior art, the detection result is inaccurate by adopting a method for detecting whether the silk-screen line is defective or not by using a caliper because the size of the silk-screen line is small.
According to an aspect of the embodiments of the present invention, a method for detecting a silk-screen line is provided, including: extracting silk-screen lines to be detected from a panel area on a product image; carrying out corrosion treatment on the silk-screen lines to be detected by adopting different corrosion kernel values to obtain the silk-screen lines subjected to corrosion treatment; and determining whether the silk-screen lines to be detected have defects by counting the number of the silk-screen lines subjected to the corrosion treatment, wherein the defects comprise at least one of the following defects: defects and burrs.
Further, under the condition that the corrosion treatment is the narrowing treatment, the silk-screen lines to be detected are subjected to corrosion treatment to obtain the silk-screen lines subjected to the corrosion treatment, and the method comprises the following steps: carrying out narrowing treatment on the silk-screen lines to be detected by using a first corrosion kernel value to obtain the silk-screen lines with narrowed line width; and if the narrowed silk-screen lines are detected to be in a disconnected state, determining that the defects exist in the silk-screen lines to be detected.
Further, detecting that the silk-screen lines after the narrowing process are in a disconnected state comprises: and if the quantity of the narrowed silk-screen lines exceeds a first threshold value, determining that the narrowed silk-screen lines are in a disconnected state.
Further, the silk-screen lines to be detected are subjected to narrowing treatment in the horizontal and/or vertical direction.
Further, before the narrowing of the silk-screen line to be detected by using the first etching kernel value to obtain the silk-screen line with the narrowed line width, the method further comprises:
counting the number of the extracted silk-screen lines to be detected; if the number of the silk-screen lines to be detected is a second threshold value, executing the step of narrowing the silk-screen lines to be detected; otherwise, determining that the silk-screen line to be detected has defects and/or burrs.
Further, when the etching treatment is to completely etch the silk-screen lines, the silk-screen lines to be detected are etched to obtain the silk-screen lines after the etching treatment, including: adding a corrosion area to the silk-screen lines to be detected in the horizontal and/or vertical direction by using a second corrosion kernel value to obtain a completely corroded area in a gray form; and if the silk-screen lines are detected in the area completely corroded by the gray scale morphology, determining that the burrs exist in the silk-screen lines to be detected.
Further, detecting the silk-screen lines of the completely corroded area with the gray scale morphology comprises: counting the number of silk-screen lines in the area completely corroded by the gray form; and if the number exceeds a second threshold value, determining that silk-screen lines still exist in the area with complete gray scale morphology corrosion.
Further, before extracting the silk-screen lines to be detected from the panel area on the product image, the method further includes: determining a panel area on the product image based on an image template; searching an interference image in the panel area, and determining a background area to be shielded; and obtaining the area where the silk-screen lines are located by shielding the background area.
According to another aspect of the embodiments of the present invention, there is also provided a device for detecting a silk-screen line, including: the extraction unit is used for extracting the silk-screen lines to be detected from the panel area on the product image; the processing unit is used for carrying out corrosion treatment on the silk-screen lines to be detected by adopting different corrosion kernel values to obtain the silk-screen lines subjected to corrosion treatment; the determining unit is configured to determine whether the silk-screen lines to be detected have defects by counting the number of the silk-screen lines subjected to the etching, where the defects include at least one of the following defects: defects and burrs.
Further, in a case where the etching process is a narrowing process, the processing unit includes: and the narrowing processing module is used for narrowing the silk-screen lines to be detected by using the first corrosion kernel value to obtain the silk-screen lines with narrowed line width, wherein if the silk-screen lines after narrowing processing are detected to be in a disconnected state, the silk-screen lines to be detected are determined to have the defects.
Further, the narrowing processing module includes: and the first determining submodule is used for determining that the narrowed silk-screen lines are in a disconnected state if the number of the narrowed silk-screen lines exceeds a first threshold value.
Further, the silk-screen lines to be detected are subjected to narrowing treatment in the horizontal and/or vertical direction.
Further, the apparatus further comprises: the first counting unit is used for counting the number of the extracted silk-screen lines to be detected; the first execution unit is used for executing the step of narrowing the silk-screen lines to be detected if the number of the silk-screen lines to be detected is less than or equal to a second threshold value; and the second execution unit is used for determining that the silk-screen lines to be detected have defects and/or burrs if the number of the silk-screen lines to be detected is larger than a second threshold value.
Further, in a case that the etching process is to completely etch the silk-screen lines, the processing unit includes: the full-etching module is used for increasing the etching area of the silk-screen line to be detected in the horizontal and/or vertical direction by using a second etching kernel value to obtain a region with complete gray scale morphological etching; and if the silk-screen lines are detected in the area completely corroded by the gray scale morphology, determining that the burrs exist in the silk-screen lines to be detected.
Further, the total etching module includes: the second counting submodule is used for counting the number of the silk-screen lines in the area where the gray-scale morphology is completely corroded; and the third execution submodule is used for determining that silk-screen lines still exist in the area completely corroded by the gray form if the number exceeds a second threshold value.
Further, the apparatus further comprises: the determining unit is used for determining the panel area on the product image based on the image template before the silk-screen lines to be detected are extracted from the panel area on the product image; the searching unit is used for searching the interference image in the panel area and determining a background area to be shielded; and the obtaining unit is used for obtaining the area where the silk-screen lines are located by shielding the background area.
In the embodiment of the invention, the silk-screen lines to be detected are extracted from the panel area on the product image in a mode of corroding the silk-screen lines; carrying out corrosion treatment on the silk-screen lines to be detected by adopting different corrosion kernel values to obtain the silk-screen lines subjected to corrosion treatment; and determining whether the silk-screen lines to be detected have defects by counting the number of the silk-screen lines subjected to the corrosion treatment, wherein the defects comprise at least one of the following defects: the defects and the burrs achieve the purpose of improving the accuracy of detecting the silk-screen lines, so that the technical effect of automatically, quickly and accurately detecting the defects of the silk-screen lines is achieved, and the technical problem that in the prior art, the method for detecting whether the silk-screen lines are defective or not by using calipers can lead to inaccurate detection results due to the fact that the silk-screen lines are small in size is solved.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the invention and together with the description serve to explain the invention without limiting the invention. In the drawings:
fig. 1 is a flowchart of a method for detecting a silk-screen line according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of an alternative method for detecting silk-screen lines according to an embodiment of the present invention;
FIG. 3 is a first schematic diagram of a silk-screen line detection process according to an embodiment of the present invention;
FIG. 4 is a second schematic diagram of a silk-screen line detection process according to an embodiment of the present invention;
FIG. 5 is a third schematic diagram in a silk-screen line detection process according to an embodiment of the present invention;
FIG. 6 is a fourth schematic diagram in the process of detecting the silk-screen lines according to the embodiment of the invention;
FIG. 7 is a fifth schematic diagram of a silk-screen line detection process according to an embodiment of the present invention;
FIG. 8 is a sixth schematic diagram of a silk-screen line detection process according to an embodiment of the present invention; and
fig. 9 is a schematic diagram of a processing device of a detection method of a silk-screen line according to an embodiment of the invention.
Detailed Description
In order to make the technical solutions of the present invention better understood, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that the terms "first," "second," and the like in the description and claims of the present invention and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the invention described herein are capable of operation in sequences other than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
In accordance with an embodiment of the present invention, there is provided an embodiment of a method for detecting silk-screen lines, where the steps shown in the flowchart of the drawings may be executed in a computer system, such as a set of computer-executable instructions, and where a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in an order different from that shown.
Fig. 1 is a method for detecting a silk-screen line according to an embodiment of the present invention, as shown in fig. 1, the method includes the following steps:
and S102, extracting silk-screen lines to be detected from a panel area on the product image.
In order to detect whether a silk-screen line on a control panel of the air-conditioning hand operator has a defect, in the embodiment of the application, the silk-screen line to be detected is extracted from the panel area of the image of the air-conditioning hand operator.
Optionally, in the method for detecting a silk-screen line provided in the embodiment of the present application, before extracting the silk-screen line to be detected from a panel region on a product image, the method further includes: determining a panel area on the product image based on the image template; searching an interference image in a panel area, and determining a background area to be shielded; and obtaining the area where the silk-screen lines are located by shielding the background area.
The interference image can be an image of a liquid crystal display screen on the air-conditioning hand operator, the image of the liquid crystal display screen is shielded to obtain an area where the silk-screen lines to be detected on the air-conditioning hand operator are located, and the silk-screen lines to be detected are extracted from the area where the silk-screen lines to be detected are located, so that the speed and accuracy of extracting the silk-screen lines to be detected from a panel area are improved.
The interference image can also be a logo image of a product on the air-conditioning manual operator, the area where the silk-screen lines to be detected on the air-conditioning manual operator are located is obtained by shielding the logo image of the product, and the silk-screen lines to be detected are extracted from the area where the silk-screen lines to be detected are located, so that the speed and accuracy of extracting the silk-screen lines to be detected from the panel area are improved.
For example, a panel area of a manual operator product is found and extracted through an image template, background interferents such as silk-screen fonts and a liquid crystal display screen on the surface of the product are found in the panel area through a trained template, the backgrounds are removed, the background areas are filled and shielded with white with the gray level of 255, areas except the shielded background areas in the panel area are used as areas where silk-screen lines are located, unclosed lines with darker colors to be detected are extracted from the areas where the silk-screen lines are located, and the silk-screen lines to be detected are extracted.
Further, the product image is not limited to the image of the air-conditioning hand operator, and includes, for example: the image of the television, the image of the computer display, the image of the circuit board and the like can be suitable for the detection method of the silk-screen lines provided by the embodiment of the application as long as the products needing to be designed on the relevant products for detection of the silk-screen lines.
Step S104, carrying out corrosion treatment on the silk-screen lines to be detected by adopting different corrosion kernel values to obtain the silk-screen lines after the corrosion treatment;
it should be noted that the corrosion kernel value may be determined according to the width of the silk-screen lines to be detected, for the silk-screen lines with different widths, different corrosion kernel values are used for corrosion treatment, and for the silk-screen lines with the same width, different corrosion kernel values are also used for corrosion treatment.
The method also adopts different corrosion kernel values to corrode the silk-screen lines to be detected to obtain different corrosion-treated results, and judges whether the silk-screen lines have defects or not based on the different results, thereby ensuring the accuracy of the detection of the silk-screen lines to be detected.
Step S106, determining whether the silk-screen lines to be detected have defects or not by counting the number of the silk-screen lines subjected to corrosion treatment, wherein the defects comprise at least one of the following defects: defects and burrs.
Through the steps S102 to S106, the number of the silk-screen lines subjected to corrosion treatment is counted, and whether the silk-screen lines to be detected have defects or not is determined based on the number of the silk-screen lines subjected to corrosion treatment, so that the defects of manual visual detection of the silk-screen lines are avoided, and the accuracy of detection of the silk-screen lines is improved.
In the detection method of the silk-screen lines provided by the embodiment of the application, the silk-screen lines to be detected are extracted from a panel area on a product image; carrying out corrosion treatment on the silk-screen lines to be detected by adopting different corrosion kernel values to obtain the silk-screen lines after the corrosion treatment; whether the silk-screen lines to be detected have defects is determined by counting the number of the silk-screen lines subjected to corrosion treatment, wherein the defects comprise at least one of the following defects: the defects and the burrs achieve the purpose of improving the accuracy of detecting the silk-screen lines, so that the technical effect of automatically, quickly and accurately detecting the defects of the silk-screen lines is achieved, and the technical problem that in the prior art, the method for detecting whether the silk-screen lines are defective or not by using calipers can lead to inaccurate detection results due to the fact that the silk-screen lines are small in size is solved.
Optionally, in the method for detecting a silk-screen line provided in the embodiment of the present application, under the condition that the etching process is a narrowing process, the etching process is performed on the silk-screen line to be detected, so as to obtain the silk-screen line after the etching process, including: narrowing the silk-screen lines to be detected by using the first corrosion kernel value to obtain the silk-screen lines with narrowed line width; and if the narrowed silk-screen lines are detected to be in a disconnected state, determining that the silk-screen lines to be detected are defective.
For example, in the detection of some non-closed lines with a width of less than 0.2mm, when the etching treatment is a narrowing treatment, the degree of the silk-screen line is narrowed, the etching kernel value used is 17X17 (corresponding to the first etching kernel value), and the silk-screen line to be detected is narrowed by using the etching kernel value of 17X17, so that the silk-screen line with the narrowed line width is obtained. And if the narrowed silk-screen lines are detected to be in a disconnected state, determining that the silk-screen lines to be detected are defective.
Specifically, in the method for detecting a silk-screen line provided in the embodiment of the present application, detecting that the narrowed silk-screen line is in a disconnected state includes: and if the quantity of the narrowed silk-screen lines exceeds a first threshold value, determining that the narrowed silk-screen lines are in a disconnected state.
When the number of the narrowed silk-screen lines is one, it can be determined that the silk-screen lines provided by the embodiment of the application are not defective, otherwise, if the number of the obtained lines is more than one after the silk-screen lines provided by the embodiment of the application are narrowed, it can be determined that the silk-screen lines provided by the embodiment of the application are in a disconnected state.
Optionally, in the method for detecting a silk-screen line provided in the embodiment of the present application, the silk-screen line to be detected is narrowed in the horizontal and/or vertical direction.
Wherein, can carry out the constriction processing on the horizontal direction to the silk screen printing lines that this application embodiment provided, also can carry out the constriction processing on the vertical direction to the silk screen printing lines that this application embodiment provides, can also carry out the constriction processing on vertical and horizontal direction simultaneously to the silk screen printing lines that this application embodiment provides.
Optionally, in the method for detecting a silk-screen line provided in the embodiment of the present application, before narrowing the silk-screen line to be detected by using the first erosion kernel value to obtain the silk-screen line with a narrowed line width, the method further includes: counting the number of the extracted silk-screen lines to be detected; if the number of the silk-screen lines to be detected is the second threshold value, executing a step of narrowing the silk-screen lines to be detected; otherwise, determining that the silk-screen line to be detected has defects and/or burrs.
In the above scheme, a blob analysis method may be adopted to detect whether the number of the to-be-detected silk-screen lines is only one (corresponding to the second threshold), if the number of the to-be-detected silk-screen lines is one, the to-be-detected silk-screen lines are narrowed, and if the number of the to-be-detected silk-screen lines is not one, it is determined that the silk-screen lines are broken or a panel on which the silk-screen lines are located has impurities.
Optionally, in the method for detecting a silk-screen line provided in the embodiment of the present application, when the etching process is complete etching of the silk-screen line, the etching process is performed on the silk-screen line to be detected, so as to obtain the silk-screen line after the etching process, where the method includes: adding the corrosion area of the silk-screen lines to be detected in the horizontal and/or vertical direction by using the second corrosion kernel value to obtain a region with complete gray scale morphology corrosion; and if the silk-screen lines are detected in the area completely corroded by the gray form, determining that burrs exist in the silk-screen lines to be detected.
For example, for the detection of some non-closed lines with a width of less than 0.2mm, when the etching process is a complete etching process, the silk-screen lines are subjected to complete etching process, the used etching kernel value is 25X25 (corresponding to the second etching kernel value), the silk-screen lines to be detected are subjected to complete etching process by using the etching kernel value of 25X25, a region with complete gray scale form etching is obtained, and if the silk-screen lines are detected in the region with complete gray scale form etching, the existence of burrs on the silk-screen lines to be detected is determined.
Optionally, in the method for detecting a silk-screen line provided in the embodiment of the present application, detecting a silk-screen line in an area where gray-scale morphology is completely corroded includes: counting the number of silk-screen lines in the area with completely corroded gray morphology; and if the number exceeds a second threshold value, determining that silk-screen lines still exist in the area with complete gray-scale morphological corrosion.
And analyzing the number of the silk-screen lines in the area with completely corroded gray morphology by using a blob analysis method, if the number of the silk-screen lines is 0 (corresponding to the second threshold value), determining that the silk-screen lines have no defects, and if the number of the silk-screen lines is not 0, determining that the silk-screen lines have burrs, namely the silk-screen lines have defects.
Fig. 2 is a schematic diagram of an optional method for detecting silk-screen lines according to an embodiment of the present invention, as shown in fig. 2, a blob analysis method is used to detect whether a silk-screen line is only one line or not by scratching an interference background such as a liquid crystal display and a logo on a photographed picture, otherwise, the line is broken or a panel has impurities, when the silk-screen line is one line, an etching kernel 17X17 in gray morphology is used to perform etching treatment, the normal line width is only narrowed and is not broken, the blob analysis method is used to detect that the number is 1, otherwise, the silk-screen line is defective. Processing by using a corrosion kernel 25X25 in gray morphology, wherein silk-screen lines just disappear, and finding the number of lines by using a blob analysis method, wherein the number is zero under normal conditions, otherwise, the lines have burrs. If the silk-screen lines are defective or burrs are found, the silk-screen lines are considered to have defects.
The specific process is as shown in fig. 3 to 8, photographing the hand operator product, firstly finding and extracting a panel area of the hand operator product through a template by the photographed picture to obtain an image as shown in fig. 3, then searching background interferents such as silk screen fonts and liquid crystal display screens on the surface of the product in the panel area by using a trained template, scratching off the interfering backgrounds, filling and shielding the areas by white with the gray scale of 255, and extracting an unclosed line with a darker color to be detected as shown in fig. 4. Because the difference between the target line and the background panel of the product is obvious, the gray level change among different products is small, and the accurate pixel value at the junction of the target line and the background panel can be found, a hard threshold (fixed threshold) method can be used for dividing the image into the target line and the background panel, a blob analysis detection method is used for detecting whether the number of the existing lines is 1, if so, the next detection is carried out, otherwise, the silk-screen lines are broken or have burrs, and the method is shown in figure 5. And then, performing corrosion treatment operation in gray morphology to detect whether the silk-screen lines have defects, searching for a proper corrosion kernel value by using a corrosion method, narrowing the width of the whole silk-screen line, analyzing the number of the lines by using a blob analysis method, wherein the width of the normal silk-screen line is only narrowed, the number of the normal silk-screen lines is still 1, and otherwise, the silk-screen lines have defects as shown in fig. 6. And then, continuously executing corrosion operation in the gray morphology to detect whether burrs exist on the silk-screen lines, applying a corrosion method, simultaneously increasing the number of horizontal and vertical corrosion kernels until the lines are completely corroded, and then applying a blob analysis method to analyze the number of the lines, wherein the number is 0 under the normal condition, otherwise, the lines are indicated to have poor burrs, as shown in fig. 7. The detection result is shown in the target detection result graph of fig. 8, and the middle break is the defect of the silk-screen line.
It should be noted that the steps illustrated in the flowcharts of the figures may be performed in a computer system such as a set of computer-executable instructions and that, although a logical order is illustrated in the flowcharts, in some cases, the steps illustrated or described may be performed in an order different than presented herein.
The embodiment of the present application further provides a detection apparatus for a silk-screen line, and it should be noted that the detection apparatus for a silk-screen line of the embodiment of the present application may be used to execute the detection method for a silk-screen line provided by the embodiment of the present application. The detection device for the silk-screen lines provided by the embodiment of the application is introduced below.
Fig. 9 is a schematic diagram of a detection device for silk-screen lines according to an embodiment of the present application. As shown in fig. 9, the apparatus includes: an extraction unit 10, a processing unit 20 and a determination unit 30.
Specifically, the extracting unit 10 is configured to extract a silk-screen line to be detected from a panel region on a product image;
the processing unit 20 is configured to perform corrosion processing on the silk-screen lines to be detected by using different corrosion kernel values to obtain silk-screen lines after the corrosion processing;
the determining unit 30 is configured to determine whether the silk-screen lines to be detected have defects by counting the number of the silk-screen lines subjected to the etching processing, where the defects include at least one of the following: defects and burrs.
In the detection method of the silk-screen lines provided by the embodiment of the application, the silk-screen lines to be detected are extracted from the panel area on the product image through the extraction unit 10; the processing unit 20 performs corrosion treatment on the silk-screen lines to be detected by adopting different corrosion kernel values to obtain the silk-screen lines after the corrosion treatment; the determining unit 30 determines whether the silk-screen lines to be detected have defects by counting the number of the silk-screen lines after the etching treatment, wherein the defects include at least one of the following: the defects and the burrs achieve the purpose of improving the accuracy of detecting the silk-screen lines, so that the technical effect of automatically, quickly and accurately detecting the defects of the silk-screen lines is achieved, and the technical problem that in the prior art, the method for detecting whether the silk-screen lines are defective or not by using calipers can lead to inaccurate detection results due to the fact that the silk-screen lines are small in size is solved.
Optionally, in the detection apparatus for a silk-screen line provided in an embodiment of the present application, in a case that the etching process is a narrowing process, the processing unit includes: and the narrowing processing module is used for narrowing the silk-screen lines to be detected by using the first corrosion kernel value to obtain the silk-screen lines with narrowed line width, wherein if the silk-screen lines after narrowing processing are detected to be in a disconnected state, the silk-screen lines to be detected are determined to be defective.
Optionally, in the detection apparatus for a silk-screen line provided in the embodiment of the present application, the narrowing processing module includes: and the first determining submodule is used for determining that the narrowed silk-screen lines are in a disconnected state if the number of the narrowed silk-screen lines exceeds a first threshold value.
Optionally, in the detection apparatus for a silk-screen line provided in the embodiment of the present application, the silk-screen line to be detected is narrowed in the horizontal and/or vertical direction.
Optionally, in the detection apparatus for a silk-screen line provided in this embodiment of the present application, the apparatus further includes:
the first counting unit is used for counting the number of the extracted silk-screen lines to be detected; the first execution unit is used for executing the step of narrowing the silk-screen lines to be detected if the number of the silk-screen lines to be detected is less than or equal to a second threshold value; and the second execution unit is used for determining that the silk-screen lines to be detected have defects and/or burrs if the number of the silk-screen lines to be detected is larger than a second threshold value.
Optionally, in the detection apparatus for a silk-screen line provided in this embodiment of the present application, in a case that the etching process is to completely etch the silk-screen line, the processing unit includes: the full-etching module is used for increasing the etching area of the silk-screen line to be detected in the horizontal and/or vertical direction by using the second etching kernel value to obtain a region with complete gray scale morphological etching; and if the silk-screen lines are detected in the area completely corroded by the gray form, determining that burrs exist in the silk-screen lines to be detected.
Optionally, in the detection apparatus for a silk-screen line provided in an embodiment of the present application, the total etching module includes: the second counting submodule is used for counting the number of the silk-screen lines in the area with completely corroded gray morphology; and the third execution submodule is used for determining that silk-screen lines still exist in the area completely corroded in the gray form if the number exceeds a second threshold value.
Optionally, in the detection apparatus for a silk-screen line provided in this embodiment of the present application, the apparatus further includes: the determining unit is used for determining the panel area on the product image based on the image template before the silk-screen lines to be detected are extracted from the panel area on the product image; the searching unit is used for searching the interference image in the panel area and determining a background area to be shielded; and the obtaining unit is used for obtaining the area where the silk-screen lines are located by shielding the background area.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
In the above embodiments of the present invention, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
In the embodiments provided in the present application, it should be understood that the disclosed technology can be implemented in other ways. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units may be a logical division, and in actual implementation, there may be another division, for example, multiple units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, units or modules, and may be in an electrical or other form.
The units described as separate parts may or may not be physically separate, and 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 units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic or optical disk, and other various media capable of storing program codes.
The foregoing is only a preferred embodiment of the present invention, and it should be noted that, for those skilled in the art, various modifications and decorations can be made without departing from the principle of the present invention, and these modifications and decorations should also be regarded as the protection scope of the present invention.

Claims (14)

1. A detection method of silk-screen lines is characterized by comprising the following steps:
extracting silk-screen lines to be detected from a panel area on a product image;
carrying out corrosion treatment on the silk-screen lines to be detected by adopting different corrosion kernel values to obtain the silk-screen lines after the corrosion treatment;
and determining whether the silk-screen lines to be detected have defects by counting the number of the silk-screen lines subjected to the corrosion treatment, wherein the defects comprise at least one of the following defects: defects and burrs;
wherein, under the condition that corrosion treatment is totally corroded the silk screen printing lines, carry out corrosion treatment to the silk screen printing lines that wait to detect, obtain the silk screen printing lines after corrosion treatment, include:
adding a corrosion area to the silk-screen lines to be detected in the horizontal and/or vertical direction by using a second corrosion kernel value to obtain a completely corroded area in a gray form;
and if the silk-screen lines are detected in the area completely corroded by the gray scale morphology, determining that the burrs exist in the silk-screen lines to be detected.
2. The method according to claim 1, wherein, in a case that the etching treatment is a narrowing treatment, the etching treatment is performed on the silk-screen line to be detected to obtain the silk-screen line after the etching treatment, and the method comprises the following steps:
carrying out narrowing treatment on the silk-screen lines to be detected by using a first corrosion kernel value to obtain the silk-screen lines with narrowed line width;
and if the narrowed silk-screen lines are detected to be in a disconnected state, determining that the defects exist in the silk-screen lines to be detected.
3. The method of claim 2, wherein detecting that the narrowed silk-screen lines are in a disconnected state comprises:
and if the quantity of the narrowed silk-screen lines exceeds a first threshold value, determining that the narrowed silk-screen lines are in a disconnected state.
4. The method according to claim 2, characterized in that the narrowing is performed on the silkscreen lines to be detected in a horizontal and/or vertical direction.
5. The method as claimed in claim 2, wherein before the narrowing of the silk-screen line to be detected by using the first erosion kernel value to obtain the silk-screen line with the narrowed line width, the method further comprises:
counting the number of the extracted silk-screen lines to be detected;
if the number of the silk-screen lines to be detected is a second threshold value, executing the step of narrowing the silk-screen lines to be detected;
otherwise, determining that the silk-screen line to be detected has defects and/or burrs.
6. The method of claim 1, wherein detecting the silkscreen lines of the area where the gray scale morphology is completely etched comprises:
counting the number of silk-screen lines in the area completely corroded by the gray form;
and if the number exceeds a second threshold value, determining that silk-screen lines still exist in the area with complete gray scale morphology corrosion.
7. The method according to any one of claims 1 to 6, characterized in that before extracting the silkscreen lines to be detected from the panel area on the product image, the method further comprises:
determining a panel area on the product image based on an image template;
searching an interference image in the panel area, and determining a background area to be shielded;
and obtaining the area where the silk-screen lines are located by shielding the background area.
8. The utility model provides a detection apparatus for silk screen printing lines, its characterized in that includes:
the extraction unit is used for extracting the silk-screen lines to be detected from the panel area on the product image;
the processing unit is used for carrying out corrosion treatment on the silk-screen lines to be detected by adopting different corrosion kernel values to obtain the silk-screen lines subjected to corrosion treatment;
the determining unit is configured to determine whether the silk-screen lines to be detected have defects by counting the number of the silk-screen lines subjected to the etching, where the defects include at least one of the following defects: defects and burrs;
wherein, under the condition that the etching treatment is to completely etch the silk-screen lines, the processing unit comprises:
the full-etching module is used for increasing the etching area of the silk-screen line to be detected in the horizontal and/or vertical direction by using a second etching kernel value to obtain a region with complete gray scale morphological etching;
and if the silk-screen lines are detected in the area completely corroded by the gray scale morphology, determining that the burrs exist in the silk-screen lines to be detected.
9. The apparatus according to claim 8, wherein in the case where the etching process is a narrowing process, the processing unit includes:
a narrowing processing module for narrowing the silk-screen lines to be detected by using the first corrosion kernel value to obtain the silk-screen lines with narrowed line width,
and if the narrowed silk-screen lines are detected to be in a disconnected state, determining that the defects exist in the silk-screen lines to be detected.
10. The apparatus of claim 9, wherein the narrowing processing module comprises:
and the first determining submodule is used for determining that the narrowed silk-screen lines are in a disconnected state if the number of the narrowed silk-screen lines exceeds a first threshold value.
11. The device according to claim 9, characterized in that the narrowing is performed on the silkscreen lines to be detected in a horizontal and/or vertical direction.
12. The apparatus of claim 9, further comprising:
the first counting unit is used for counting the number of the extracted silk-screen lines to be detected;
the first execution unit is used for executing the step of narrowing the silk-screen lines to be detected if the number of the silk-screen lines to be detected is less than or equal to a second threshold value;
and the second execution unit is used for determining that the silk-screen lines to be detected have defects and/or burrs if the number of the silk-screen lines to be detected is larger than a second threshold value.
13. The apparatus of claim 8, wherein the total etch module comprises:
the second counting submodule is used for counting the number of the silk-screen lines in the area where the gray-scale morphology is completely corroded;
and the third execution submodule is used for determining that silk-screen lines still exist in the area completely corroded by the gray form if the number exceeds a second threshold value.
14. The apparatus of any one of claims 8 to 13, further comprising:
the determining unit is used for determining the panel area on the product image based on the image template before the silk-screen lines to be detected are extracted from the panel area on the product image;
the searching unit is used for searching the interference image in the panel area and determining a background area to be shielded;
and the obtaining unit is used for obtaining the area where the silk-screen lines are located by shielding the background area.
CN201810772238.4A 2018-07-13 2018-07-13 Method and device for detecting silk-screen lines Active CN108776146B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810772238.4A CN108776146B (en) 2018-07-13 2018-07-13 Method and device for detecting silk-screen lines

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810772238.4A CN108776146B (en) 2018-07-13 2018-07-13 Method and device for detecting silk-screen lines

Publications (2)

Publication Number Publication Date
CN108776146A CN108776146A (en) 2018-11-09
CN108776146B true CN108776146B (en) 2021-02-26

Family

ID=64029838

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810772238.4A Active CN108776146B (en) 2018-07-13 2018-07-13 Method and device for detecting silk-screen lines

Country Status (1)

Country Link
CN (1) CN108776146B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110018169B (en) * 2019-04-10 2022-01-28 珠海格力智能装备有限公司 Detection method and device for silk-screen lines, storage medium and processor

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6687396B1 (en) * 1998-07-29 2004-02-03 Pentax Corporation Optical member inspection apparatus, image-processing apparatus, image-processing method, and computer readable medium
CN103018261A (en) * 2012-11-29 2013-04-03 华中科技大学 Appearance fault detecting system and appearance fault detecting method of RFID (Radio Frequency Identification Device) antenna
CN103500459A (en) * 2013-09-24 2014-01-08 华南理工大学 Printed circuit board defect detecting method based on regularization parameters
CN104280406A (en) * 2014-09-16 2015-01-14 中国科学院广州能源研究所 Machine vision system for detecting surface defects of copper part
CN106296636A (en) * 2015-06-02 2017-01-04 征图新视(江苏)科技有限公司 The detection method of printing image and detection device
CN107543828A (en) * 2017-08-25 2018-01-05 广东工业大学 A kind of Surface Flaw Detection method and system

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6687396B1 (en) * 1998-07-29 2004-02-03 Pentax Corporation Optical member inspection apparatus, image-processing apparatus, image-processing method, and computer readable medium
CN103018261A (en) * 2012-11-29 2013-04-03 华中科技大学 Appearance fault detecting system and appearance fault detecting method of RFID (Radio Frequency Identification Device) antenna
CN103500459A (en) * 2013-09-24 2014-01-08 华南理工大学 Printed circuit board defect detecting method based on regularization parameters
CN104280406A (en) * 2014-09-16 2015-01-14 中国科学院广州能源研究所 Machine vision system for detecting surface defects of copper part
CN106296636A (en) * 2015-06-02 2017-01-04 征图新视(江苏)科技有限公司 The detection method of printing image and detection device
CN107543828A (en) * 2017-08-25 2018-01-05 广东工业大学 A kind of Surface Flaw Detection method and system

Also Published As

Publication number Publication date
CN108776146A (en) 2018-11-09

Similar Documents

Publication Publication Date Title
CN1690678B (en) Image analysis method, image analysis program and pixel evaluation system having the sames
CN108896278B (en) Optical filter silk-screen defect detection method and device and terminal equipment
CN110930427B (en) Image segmentation method, device and storage medium based on semantic contour information
CN109472271B (en) Printed circuit board image contour extraction method and device
CN106157286B (en) Image processing method and screen light leakage detection method
CN112577969B (en) Defect detection method and defect detection system based on machine vision
CN108955901B (en) Infrared temperature measurement method and system and terminal equipment
CN108918093B (en) Optical filter mirror surface defect detection method and device and terminal equipment
CN115205223B (en) Visual inspection method and device for transparent object, computer equipment and medium
CN113379680A (en) Defect detection method, defect detection device, electronic equipment and computer readable storage medium
CN114022503A (en) Detection method, detection system, device and storage medium
CN113780484B (en) Industrial product defect detection method and device
CN108776146B (en) Method and device for detecting silk-screen lines
CN117351011B (en) Screen defect detection method, apparatus, and readable storage medium
CN112465780B (en) Method and device for monitoring abnormal film thickness of insulating layer
CN116091503B (en) Method, device, equipment and medium for discriminating panel foreign matter defects
CN117036345A (en) Method and system for measuring opposite side distance of crimping wire
CN116993654B (en) Camera module defect detection method, device, equipment, storage medium and product
CN116402771A (en) Defect detection method and device and model training method and device
CN112330583A (en) Product defect detection method, device, equipment and storage medium
CN113284133B (en) Method, device and equipment for determining photovoltaic cell piece spacing and storage medium
CN115578331A (en) Display panel edge line defect detection method and application
CN113610775A (en) Pill detection method and device for pill plate and storage medium
CN111935480A (en) Detection method for image acquisition device and related device
JP6114559B2 (en) Automatic unevenness detector for flat panel display

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