CN107345916B - Plane appearance detection method based on fixed contour - Google Patents
Plane appearance detection method based on fixed contour Download PDFInfo
- Publication number
- CN107345916B CN107345916B CN201710609704.2A CN201710609704A CN107345916B CN 107345916 B CN107345916 B CN 107345916B CN 201710609704 A CN201710609704 A CN 201710609704A CN 107345916 B CN107345916 B CN 107345916B
- Authority
- CN
- China
- Prior art keywords
- image
- appearance
- outline
- plane
- contour
- 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
Links
Images
Classifications
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01N—INVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
- G01N21/00—Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
- G01N21/84—Systems specially adapted for particular applications
- G01N21/88—Investigating the presence of flaws or contamination
- G01N21/8851—Scan 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
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01B—MEASURING LENGTH, THICKNESS OR SIMILAR LINEAR DIMENSIONS; MEASURING ANGLES; MEASURING AREAS; MEASURING IRREGULARITIES OF SURFACES OR CONTOURS
- G01B11/00—Measuring arrangements characterised by the use of optical techniques
- G01B11/24—Measuring arrangements characterised by the use of optical techniques for measuring contours or curvatures
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01N—INVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
- G01N21/00—Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
- G01N21/84—Systems specially adapted for particular applications
- G01N21/88—Investigating the presence of flaws or contamination
- G01N21/8851—Scan 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/8887—Scan 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
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Engineering & Computer Science (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Signal Processing (AREA)
- Health & Medical Sciences (AREA)
- Life Sciences & Earth Sciences (AREA)
- Chemical & Material Sciences (AREA)
- Analytical Chemistry (AREA)
- Biochemistry (AREA)
- General Health & Medical Sciences (AREA)
- Immunology (AREA)
- Pathology (AREA)
- Image Analysis (AREA)
- Image Processing (AREA)
Abstract
The invention discloses a plane appearance detection method based on a fixed contour, which is mainly used for detecting the defects of color difference on the plane appearance or concave-convex defects with 3D shapes on the surface, effectively distinguishing the plane contour aiming at a digital image and then segmenting and analyzing the abnormity in the contour.
Description
Technical Field
The invention relates to the field of machine vision detection, in particular to a plane appearance detection method based on a fixed contour.
Background
In industrial automation production, product appearance detection is widely applied, such as mobile phones, flat panels, various electronic products, refrigerators, washing machines and other household appliances. In the past, manual detection is usually adopted, the defects of high labor intensity of detection workers, poor detection stability and the like exist in the manual detection, the consistency of detection results is poor, and the risks of missed detection and false detection also exist.
With the rapid development of microelectronic technology, computer technology and image processing technology, machine vision inspection technology gradually moves from experiment to practical application stage. The automatic detection device has the advantages of high detection efficiency, good detection consistency and the like, and gradually reduces or replaces manpower, so that high automation is realized.
For example, the panel defect detection of a mobile phone or a flat panel is adopted, the sizes of panels of different models are different, the arrangement of holes on the panels is different, and after the panel parameters are generally required to be configured and input into a detection system, the fixed template is used as a template for learning and contrast detection. The input of template parameters in the process is complex, the template needs to be spatially calibrated, and the appearance defect detection can be performed after the position matching.
Disclosure of Invention
The invention aims to solve the technical problem of providing a plane appearance detection method based on a fixed contour, which is based on the contour of the plane, aims to remove the influence of the contour of the plane in the processing process, directly process and analyze the appearance defect inside the surface, simplify the image processing flow, improve the operation efficiency and optimize the processing effect.
The invention is realized by the following technical scheme: a plane appearance detection method based on fixed contours is mainly used for detecting the defects of color difference existing on the appearance of a plane or concave-convex defects with 3D shapes on the surface, aiming at a digital image, a plane contour is effectively distinguished, and then the abnormity in the contour is divided and analyzed, and the specific steps are as follows:
the method comprises the steps of firstly, acquiring an image of a plane appearance, acquiring a plane outline of an object to be detected, carrying out boundary detection aiming at the acquired image of the appearance, identifying the plane outline in the boundary image, including a peripheral outline and an internal hole pattern, carrying out quantitative extraction and storage on the position and the size of the outline, wherein the process belongs to a parameter learning and configuration process;
secondly, collecting an appearance image aiming at an object to be detected, carrying out boundary detection, filtering and gradient operation on the plane appearance image, carrying out binarization processing to obtain a binarized image, and identifying and extracting the contour of the image obtained at this time according to the contour identification obtained in the previous step;
removing the outline from the binary image of the appearance image, performing expansion processing on the identification in the second step and the extracted outline, and then subtracting the outline from the binary image, wherein the specific operation is to perform zeroing operation on the image gray value of an outline expansion area in the binary image;
fourthly, performing cluster analysis of connected regions on the rest abnormal targets in the image, and quantifying position and area information of the abnormal regions;
and fifthly, according to the result of the fourth step, fusing the information of the binary image and the gray information in the corresponding original image, performing area analysis on the appearance abnormity, and determining the type of the abnormal defect and the severity of the divided defect.
The invention has the beneficial effects that: the invention is based on the self-profile, removes the influence of the self-profile in the processing process, directly processes and analyzes the appearance defect inside the surface, simplifies the image processing flow and improves the operation efficiency and the processing effect.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
FIG. 1 is a schematic diagram of a gray scale image of a panel according to the present invention;
FIG. 2 is a schematic diagram of the contour identification and extraction image of the present invention;
FIG. 3 is a schematic diagram of a binarized image of a boundary of a planar appearance image according to the present invention;
FIG. 4 is a diagram illustrating the image effect of the invention after the boundary of the flat appearance image is expanded;
FIG. 5 is a schematic diagram illustrating the effect of the invention after the outline of the flat appearance image is removed;
FIG. 6 is a flow chart of image processing according to the present invention.
Detailed Description
All of the features disclosed in this specification, or all of the steps in any method or process so disclosed, may be combined in any combination, except combinations of features and/or steps that are mutually exclusive.
Any feature disclosed in this specification (including any accompanying claims, abstract and drawings), may be replaced by alternative features serving equivalent or similar purposes, unless expressly stated otherwise. That is, unless expressly stated otherwise, each feature is only an example of a generic series of equivalent or similar features.
As shown in fig. 1, the panel finishing profile is a rectangle with rounded corners, and includes a circular hole and a long hole inside as shown in fig. 1.
Performing boundary extraction on the image of fig. 1 to obtain a contour boundary, as shown in fig. 2, respectively identifying and extracting contour shapes in fig. 2: the outline 1 is a rectangle with round corners; 2-bit strip hole pattern on the outline; the outline 3 is a round hole; the areas of the enveloping rectangles are respectively A1, A2 and A3, and the central positions are respectively P1, P2 and P3.
During defect detection, an image is shot as shown in figure 1, an abnormal area A exists in a panel, image preprocessing is carried out, a gradient map of the image is obtained and binaryzation is carried out, and as shown in figure 3, position information and area information of a known contour are obtained;
the outline 1, the outline 2 and the outline 3 with approximate areas and positions are found in the figure 3, the image is subjected to expansion processing, namely the inside and the outside of the outline boundary are enlarged, as shown in the figure 4, the area which is not in the background color in the figure 4 is taken as the background on the figure 3, and as a result, as shown in the figure 5, the image is equivalent to only defects and has no appearance outline.
The connected region analysis is performed on the attached drawing 5, that is, the position PA and the area AA of the abnormal region a can be obtained, the region can be mapped back to the attached drawing 1, and the type and the severity of the defect can be divided according to the richer gray information in the attached drawing 1.
The method is based on the self-profile, the influence of the self-profile is removed in the processing process, the appearance defects in the surface are directly processed and analyzed, the image processing flow is simplified, and the operation efficiency and the processing effect are improved. Along with the increase of the demand of the quantity of electronic products and the improvement of the demand of the appearance detection precision, the method has better flexibility in the aspects of image processing flow and effect, and therefore, the method has wide application prospect.
As shown in fig. 6, (1) acquiring an image of a planar appearance, acquiring a planar contour of a detected object, performing boundary detection on the acquired image of the planar appearance, identifying the planar contour in the boundary image, including a peripheral contour, an internal hole pattern and the like, and quantitatively extracting and storing the position and size of the contour, wherein the process belongs to a parameter learning and configuration process;
(2) acquiring an appearance image aiming at an object to be detected, carrying out operations such as boundary detection, filtering, gradient and the like on the plane appearance image, carrying out binarization processing to obtain a binarized image, and identifying and extracting the contour of the image obtained at this time according to the contour identification obtained in the last step;
(3) removing the outline from the binary image of the appearance image, performing expansion processing on the second step identification and the extracted outline, and then subtracting the outline from the binary image, wherein the specific operation is to perform zeroing operation on the image gray value of the outline expansion area in the binary image;
(4) performing cluster analysis of connected regions on the rest abnormal targets in the image, and quantifying information such as positions, areas and the like of the abnormal regions;
(5) and according to the result of the fourth step, fusing the information of the binary image and the gray information in the corresponding original image, performing area analysis on the appearance abnormality, and determining the type of the abnormal defect and the severity of the divided defect.
The invention has the beneficial effects that: the invention is based on the self-profile, removes the influence of the self-profile in the processing process, directly processes and analyzes the appearance defect inside the surface, simplifies the image processing flow and improves the operation efficiency and the processing effect.
The method is based on the self-contour, the influence of the self-contour is removed in the processing process, the appearance defects in the surface are directly processed and analyzed, the image processing flow is simplified, and the operation efficiency and the processing effect are improved. Along with the increase of the demand of the quantity of electronic products and the improvement of the demand of the appearance detection precision, the method has better flexibility in the aspects of image processing flow and effect, and therefore, the method has wide application prospect.
The above description is only an embodiment of the present invention, but the scope of the present invention is not limited thereto, and any changes or substitutions that are not thought of through the inventive work should be included in the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope defined by the claims.
Claims (1)
1. A plane appearance detection method based on a fixed contour is characterized in that: the plane appearance defect detection mainly detects the defects of color difference or 3D-shaped concave-convex defects on the surface of a plane appearance, effectively distinguishes plane outlines aiming at a digital image, and then divides and analyzes the abnormity in the outlines, and the method comprises the following specific steps:
the method comprises the steps of firstly, acquiring an image of a plane appearance, acquiring a plane outline of an object to be detected, carrying out boundary detection aiming at the acquired image of the appearance, identifying the plane outline in the boundary image, including a peripheral outline and an internal hole pattern, carrying out quantitative extraction and storage on the position and the size of the outline, wherein the process belongs to a parameter learning and configuration process;
secondly, collecting an appearance image aiming at an object to be detected, carrying out boundary detection, filtering and gradient operation on the plane appearance image, carrying out binarization processing to obtain a binarized image, and identifying and extracting the contour of the image obtained at this time according to the contour identification obtained in the previous step;
removing the outline from the binary image of the appearance image, performing expansion processing on the identification in the second step and the extracted outline, and then subtracting the outline from the binary image, wherein the specific operation is to perform zeroing operation on the image gray value of an outline expansion area in the binary image;
fourthly, performing cluster analysis of connected regions on the rest abnormal targets in the image, and quantifying position and area information of the abnormal regions;
and fifthly, according to the result of the fourth step, fusing the information of the binary image and the gray information in the corresponding original image, performing area analysis on the appearance abnormity, and determining the type of the abnormal defect and the severity of the divided defect.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710609704.2A CN107345916B (en) | 2017-07-25 | 2017-07-25 | Plane appearance detection method based on fixed contour |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710609704.2A CN107345916B (en) | 2017-07-25 | 2017-07-25 | Plane appearance detection method based on fixed contour |
Publications (2)
Publication Number | Publication Date |
---|---|
CN107345916A CN107345916A (en) | 2017-11-14 |
CN107345916B true CN107345916B (en) | 2020-01-10 |
Family
ID=60257899
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710609704.2A Active CN107345916B (en) | 2017-07-25 | 2017-07-25 | Plane appearance detection method based on fixed contour |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107345916B (en) |
Families Citing this family (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109115800B (en) * | 2018-08-20 | 2022-04-12 | 深圳市杰恩世智能科技有限公司 | Method for rapidly detecting burrs of product and accurately measuring length |
CN112782180A (en) * | 2020-12-23 | 2021-05-11 | 深圳市杰恩世智能科技有限公司 | Method for detecting product appearance flaws and stains |
CN113313638A (en) * | 2020-12-23 | 2021-08-27 | 深圳市杰恩世智能科技有限公司 | Appearance defect detection method |
CN114359270B (en) * | 2022-03-09 | 2022-06-07 | 山东华硕汽车配件科技有限公司 | Computer vision-based automobile engine oil way copper sleeve defect detection method |
CN116718546B (en) * | 2023-08-10 | 2023-12-19 | 南通三喜电子有限公司 | Capacitor analysis method and system based on big data |
Family Cites Families (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105447854A (en) * | 2015-11-12 | 2016-03-30 | 程涛 | Small-size glass panel surface defect detection method and small-size glass panel surface defect detection system |
CN105447851B (en) * | 2015-11-12 | 2018-02-02 | 刘新辉 | The sound hole defect inspection method and system of a kind of glass panel |
CN105445277B (en) * | 2015-11-12 | 2018-02-06 | 湖北工业大学 | A kind of FPC surface quality Visual intelligent detection method |
CN105654495A (en) * | 2016-01-07 | 2016-06-08 | 太原工业学院 | Method for detecting internal defect of automobile brake disc |
CN105894036B (en) * | 2016-04-19 | 2019-04-09 | 武汉大学 | A kind of characteristics of image template matching method applied to mobile phone screen defects detection |
CN106546603A (en) * | 2016-10-29 | 2017-03-29 | 图麟信息科技(上海)有限公司 | A kind of TP, the industrial vision detection means of glass cover-plate and detection method |
-
2017
- 2017-07-25 CN CN201710609704.2A patent/CN107345916B/en active Active
Also Published As
Publication number | Publication date |
---|---|
CN107345916A (en) | 2017-11-14 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107345916B (en) | Plane appearance detection method based on fixed contour | |
US20230368361A1 (en) | Screen defect detection method, apparatus, and electronic device | |
CN109685760B (en) | MATLAB-based SLM powder bed powder laying image convex hull depression defect detection method | |
CN116188475B (en) | Intelligent control method, system and medium for automatic optical detection of appearance defects | |
CN109239073B (en) | Surface defect detection method for automobile body | |
CN115880248B (en) | Surface scratch defect identification method and visual detection equipment | |
CN106780526A (en) | A kind of ferrite wafer alligatoring recognition methods | |
CN112164050B (en) | Method and device for detecting surface defects of products on production line and storage medium | |
CN106383121B (en) | It is a kind of can adaptive multi-brand visible detection method and system | |
CN113077437B (en) | Workpiece quality detection method and system | |
CN117392042A (en) | Defect detection method, defect detection apparatus, and storage medium | |
CN111160451A (en) | Flexible material detection method and storage medium thereof | |
CN110060239B (en) | Defect detection method for bottle opening of bottle | |
CN109102507A (en) | Screw thread detection method and device | |
CN116228651A (en) | Cloth defect detection method, system, equipment and medium | |
CN107230200A (en) | A kind of method for extracting rotor coil contour feature | |
CN118154605A (en) | Textile AI flaw detection method, system and equipment | |
CN109584212B (en) | MATLAB-based SLM powder bed powder laying image scratch defect identification method | |
CN107240109B (en) | Automatic detection method for instrument scale mark position | |
CN107833222B (en) | Nonmetal part surplus detection device and method | |
CN109211919B (en) | Method and device for identifying magnetic tile defect area | |
CN109272480B (en) | Detection method for boundary of immiscible solution | |
CN111539951A (en) | Visual detection method for outline size of ceramic grinding wheel head | |
Chong et al. | Fabric Defect Detection Method Based on Projection Location and Superpixel Segmentation | |
CN113763491A (en) | Visual detection method for tobacco shred barrel residues |
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 |