CN112147147A - Edge defect detection method, edge defect detection device and quality detection equipment - Google Patents

Edge defect detection method, edge defect detection device and quality detection equipment Download PDF

Info

Publication number
CN112147147A
CN112147147A CN201910559978.4A CN201910559978A CN112147147A CN 112147147 A CN112147147 A CN 112147147A CN 201910559978 A CN201910559978 A CN 201910559978A CN 112147147 A CN112147147 A CN 112147147A
Authority
CN
China
Prior art keywords
detection
edge
defect
fine
discrete
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
CN201910559978.4A
Other languages
Chinese (zh)
Other versions
CN112147147B (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.)
Hangzhou Hikrobot Technology Co Ltd
Original Assignee
Hangzhou Hikrobot Technology 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 Hangzhou Hikrobot Technology Co Ltd filed Critical Hangzhou Hikrobot Technology Co Ltd
Priority to CN201910559978.4A priority Critical patent/CN112147147B/en
Publication of CN112147147A publication Critical patent/CN112147147A/en
Application granted granted Critical
Publication of CN112147147B publication Critical patent/CN112147147B/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
    • 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/8854Grading and classifying of flaws
    • G01N2021/8861Determining coordinates of flaws
    • 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/8854Grading and classifying of flaws
    • G01N2021/8874Taking dimensions of defect into account
    • 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/8854Grading and classifying of flaws
    • G01N2021/8877Proximity analysis, local statistics
    • 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

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

Abstract

The invention provides an edge defect detection method, an edge defect detection device and quality detection equipment. Based on the method, the preset ideal edge curve can be used as a detection reference for the target image, so that the interference of image noise on the accuracy of the edge curve can be reduced; furthermore, the regionalized defects can be defined according to the distribution of the fine candidate defect points obtained by fine detection, so that the missing detection probability of the defects can be reduced, and the accuracy of the defect detection can be improved. In addition, the method can support the manual setting or automatic detection of the ideal edge curve based on the sample image, and is beneficial to the precision control of the ideal edge curve; the invention can support the manual setting or automatic generation of the detection area, and is beneficial to improving the accuracy of the target positioning of the defect detection; the invention can shield the predictable strong interference area by introducing the mask; the types of defects recognizable by the present invention may include asperity defects and fracture defects.

Description

Edge defect detection method, edge defect detection device and quality detection equipment
Technical Field
The invention relates to the field of machine vision, in particular to an edge defect detection method, an edge defect detection device and quality detection equipment.
Background
The edge defect detection of the product is an important quality detection index. How to improve the accuracy of edge defect detection is a technical problem to be solved in the prior art.
Disclosure of Invention
In view of the above, embodiments of the present invention respectively provide an edge defect detection method, an edge defect detection apparatus, and a quality detection apparatus.
In one embodiment, there is provided an edge defect detection method, including:
loading a preset ideal edge curve in a detection area of a target image, wherein the detection area covers edge features presented in the target image;
carrying out discrete detection in a detection area of the target image along the ideal edge curve;
when the discrete candidate defect point is detected, carrying out fine detection on the discrete candidate defect point along the ideal edge curve, wherein the detection granularity of the fine detection is smaller than that of the discrete detection, and the detection density of the fine detection is greater than that of the discrete detection;
and determining the regionalized defects according to the distribution condition of the fine candidate defect points obtained by fine detection.
Optionally, before loading a preset ideal edge curve in a detection area of the captured target image, the method further includes: visually presenting the acquired sample image on a human-computer interaction interface, and storing an input curve detected in the human-computer interaction interface as an ideal edge curve; or detecting sample edge points in the obtained sample image and fitting the detected sample edge points to form an ideal edge curve; wherein the sample image contains the desired edge of the target image.
Optionally, before performing discrete detection in the detection area of the target image along the ideal edge curve, the method further includes: and performing pose matching correction on the loaded ideal edge curve and the target image.
Optionally, before performing discrete detection in the detection area of the target image along the ideal edge curve, the method further includes: determining a detection area of the target image according to the human-computer interaction input information, and correcting the loaded ideal edge curve to take the boundary of the detection area as a cut-off endpoint; alternatively, a detection region in which the boundary is located at the end point of the ideal edge curve is created from the extension range of the ideal edge curve.
Optionally, before performing discrete detection in the detection region of the target image along the ideal edge curve and/or performing fine detection on discrete candidate defect points obtained by the discrete detection along the ideal edge curve, the method further includes: a mask is loaded in the detection area of the target image.
Optionally, performing discrete detection in the detection region of the target image along the ideal edge curve includes: creating a plurality of discrete detector sub-regions arranged at predetermined intervals along an ideal edge curve in a detection region; respectively detecting discrete edge points in each discrete detection sub-region; measuring deviation distance of each detected discrete edge point relative to an ideal edge curve; and determining the discrete edge points with the deviation distance exceeding a preset first deviation threshold value as discrete candidate defect points.
Optionally, the fine detecting the discrete candidate defect points along the ideal edge curve comprises: selecting a sub-region set of a plurality of discrete detector sub-regions centered on the discrete detector sub-region in which each discrete candidate defect point is located; creating a plurality of fine detector sub-regions along the ideal edge curve with the outermost boundary of the selected sub-region set truncated as a cut-off point, wherein the number of the plurality of fine detector sub-regions is greater than the number of the plurality of discrete detector sub-regions included in the sub-region set, and the span size of a single fine detector sub-region along the ideal edge curve is less than the span size of a single discrete detector sub-region along the ideal edge curve; respectively detecting fine edge points in each fine detection sub-area; measuring deviation distance of each detected fine edge point relative to an ideal edge curve; defining the fine edge points with the deviation distance exceeding a preset second deviation threshold value as at least one fine candidate defect point set according to the position distribution; measuring the size of a distribution area of each fine candidate defect point set; and determining a set of fine candidate defect points with the distribution area size exceeding a predetermined size threshold as a set of defect edge points.
Optionally, the creating a plurality of fine detection sub-regions along the ideal edge curve with an outermost boundary cutoff of the selected set of sub-regions as a cutoff point comprises: sequentially adjoining multiple fine detection sub-regions are created along an ideal edge curve with an outermost boundary cutoff of the selected set of sub-regions as a cutoff point, wherein a span dimension of a single fine detection sub-region along the ideal edge curve is no more than half of a span dimension of a single discrete detection sub-region along the ideal edge curve.
Optionally, the fine detecting the discrete candidate defect points along the ideal edge curve further comprises: and additionally defining the fine edge points of which the deviation distance does not exceed a preset second deviation threshold value and both sides are adjacent to the fine candidate defect point set as the fine candidate defect point set.
Optionally, the determining the localized defect according to the distribution of the fine candidate defect points obtained by the fine detection includes: and determining the defect edge point set as a concave-convex defect area and/or determining the area in which the fine edge point detection fails as a fracture defect area.
Optionally, determining the fine defect edge point set as a concave-convex defect area and/or determining the area in which the fine edge point detection fails as a fracture defect area includes: creating a bounding box for each defect edge point set and the area in which the fine edge point detection fails; determining the defect attribute of each enclosure frame, wherein the defect attribute comprises concave-convex defects and fracture defects;
bounding boxes that have the same defect attribute and that intersect are merged.
In another embodiment, there is provided an edge defect detecting apparatus including:
the edge curve loading module is used for loading a preset ideal edge curve in a detection area of a shot target image;
the defect discrete detection module is used for carrying out discrete detection in the detection area of the target image along the ideal edge curve;
the defect fine detection module is used for carrying out fine detection on the discrete candidate defect points along the ideal edge curve when the discrete candidate defect points are detected, wherein the detection granularity of the fine detection is smaller than that of the discrete detection, and the detection density of the fine detection is greater than that of the discrete detection;
and the area defect identification module is used for determining the regionalized defects according to the distribution condition of the fine candidate defect points obtained by fine detection.
Optionally, further comprising: the system comprises an ideal edge creating module, a judging module and a judging module, wherein the ideal edge creating module is used for visually presenting an acquired sample image on a human-computer interaction interface and storing an input curve detected in the human-computer interaction interface as an ideal edge curve before loading a preset ideal edge curve in a detection area of a shot target image, or detecting sample edge points in the acquired sample image and fitting the detected sample edge points to form the ideal edge curve; wherein the sample image contains the desired edge of the target image.
Optionally, further comprising: and the detection area setting module is used for determining the detection area of the target image according to the human-computer interaction input information and correcting the loaded ideal edge curve to take the boundary of the detection area as a cut-off endpoint or creating the detection area which takes the endpoint of the ideal edge curve to position the boundary according to the extension range of the ideal edge curve before carrying out discrete detection in the detection area of the target image along the ideal edge curve.
Optionally, further comprising: and the local area shielding module is used for loading a mask in the detection area of the target image before performing discrete detection in the detection area of the target image along the ideal edge curve and/or performing fine detection on discrete candidate defect points obtained by the discrete detection along the ideal edge curve.
Optionally, the area defect identification module is further configured to determine a defect edge point set determined by the fine detection as a concave-convex defect area, and determine a fine detection sub-area in which the fine detection fails as a fracture defect area.
In another embodiment, a quality inspection apparatus is provided, comprising a processor for performing the steps in the edge defect detection method as described above.
In another embodiment, a non-transitory computer readable storage medium is provided that stores instructions that, when executed by a processor, cause the processor to perform the steps in the edge defect detection method described above.
Based on the embodiment, the preset ideal edge curve can be used as the detection reference of the target image, so that compared with the edge curve obtained by detecting and fitting the target image, the interference of image noise on the accuracy of the edge curve can be reduced; moreover, when discrete candidate defect points are detected along the ideal edge curve, each discrete candidate defect point can be subjected to fine detection, and regionalized defects can be defined according to the distribution of the fine candidate defect points obtained through the fine detection, so that compared with a detection mode in which isolated points obtained through the discrete detection represent defects, the probability of missing detection of the defects can be reduced, and the accuracy of defect detection is improved.
As an optional further optimization, the embodiment can support the manual setting or automatic detection of the ideal edge curve based on the sample image, and is beneficial to the precision control of the ideal edge curve; the embodiment can also support manual setting or automatic generation of the detection area, and is beneficial to improving the accuracy of targeted positioning of defect detection; the embodiment can also introduce a mask in the edge defect detection, which is helpful for shielding the influence of a predictable strong interference area on the detection accuracy; and, the above-mentioned embodiment can not only discern the concave-convex defect through the defect detection of edge, but also can reach the fracture defect.
Drawings
The following drawings are only schematic illustrations and explanations of the present invention, and do not limit the scope of the present invention:
FIG. 1 is a schematic flow chart of an edge defect detection method in one embodiment;
FIG. 2 is a schematic flow chart of an ideal edge curve creation process suitable for the edge defect detection method shown in FIG. 1;
FIG. 3 is a schematic diagram of an example of automatic detection based on the ideal edge curve creation process shown in FIG. 2;
FIG. 4 is a schematic diagram of an expanded flow of the edge defect detection method shown in FIG. 1 based on ideal edge curve adaptation;
fig. 5a to 5c are schematic diagrams of an example of manual setting of a detection region based on the extended procedure shown in fig. 4;
FIG. 6 is a schematic diagram of another expanded flow chart of the edge defect detection method shown in FIG. 1 based on the ideal edge curve adaptation;
FIG. 7 is a flowchart illustrating an example of the edge defect detection method shown in FIG. 1;
FIG. 8 is a schematic diagram of an example of discrete detection based on the example flow shown in FIG. 7;
FIG. 9 is a schematic diagram of an example of fine detection based on the example flow shown in FIG. 7;
FIG. 10 is a schematic diagram of an exemplary structure of an edge defect detecting apparatus in another embodiment;
FIG. 11 is a schematic diagram of an expanded structure of the edge defect detecting apparatus shown in FIG. 10;
FIG. 12 is a schematic diagram of another expanded structure of the edge defect detecting apparatus shown in FIG. 10;
FIG. 13 is a schematic diagram of another expanded structure of the edge defect detecting apparatus shown in FIG. 10;
fig. 14 is a schematic structural diagram of a quality detection apparatus in another embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to the accompanying drawings and examples.
FIG. 1 is a schematic flow chart of an edge defect detection method in one embodiment. Referring to fig. 1, in an embodiment, an edge defect detection method may include:
s110: and loading a preset ideal edge curve in the detection area of the target image. The target image may be obtained in advance or in real time before the step, and the detection area may cover an edge feature presented in the target image.
The ideal edge curve loaded in this step may be a straight line or a curve, and the setting of the ideal edge curve may refer to an expected edge of the target detection object corresponding to the target image. That is, the ideal edge curve may be arbitrarily adjusted according to the difference between the target detection objects corresponding to the target images or the difference between the expected edges of the target detection objects.
In addition, in the step, the loaded ideal edge curve and the target image can be subjected to pose matching correction.
S120: discrete detection is performed in the detection area of the target image along the ideal edge curve.
The discrete detection in this step may be regarded as discrete sampling of the target image along the ideal edge curve, and each discrete sampling region is not necessarily capable of detecting discrete candidate defect points. If no discrete candidate defect point is obtained through discrete detection, it can be considered that no edge defect exists in the target image, and at this time, the process can be directly ended.
As an optional optimization processing manner, a mask may be further loaded in the detection area of the target image before this step, so as to shield an interference or redundant area that can be expected.
S130: and when the discrete candidate defect point is detected, performing fine detection on the discrete candidate defect point along the ideal edge curve, wherein the detection granularity of the fine detection is smaller than that of the discrete detection, and the detection density of the fine detection is greater than that of the discrete detection.
The fine detection in this step may be discrete sampling with more densely distributed sampling regions along the ideal edge curve of the target image, or even continuous sampling with sampling regions adjacent to each other, aiming to search for the actual edge features around the discrete candidate defect points.
As an optional optimization processing manner, a mask may be further loaded in the detection area of the target image before this step, so as to shield an interference or redundant area that can be expected.
S140: and determining the regionalized defects according to the distribution condition of the fine candidate defect points obtained by fine detection.
The localized defect in this step refers to a region edge feature surrounding a discrete candidate defect point, i.e., a linear defect extending from a point-like defect to have a certain edge length. The distribution conditions of the fine candidate defect points may include a distribution shape of the lattice set (which may indicate unevenness), continuity of distribution of the lattice set (which may indicate fracture), and the like.
Of course, it may also happen that only the discrete candidate defect point detected in S120 is included in the detected fine candidate defect points, and no other defect edge points are included in the detected fine candidate defect points, and the localized defect at this time may be determined as a non-defective conclusion that the discrete candidate defect point is a suspected noise point, or may also be determined as a burr defect that indicates that the edge is severely worn, which may be specifically set according to the product attribute and the detection experience value of the actually detected object.
Based on the process, the preset ideal edge curve can be used as a detection reference for the target image, so that compared with the edge curve obtained by detecting and fitting the target image, the interference of image noise on the accuracy of the edge curve can be reduced; moreover, when discrete candidate defect points are detected along the ideal edge curve, each discrete candidate defect point can be subjected to fine detection, and regionalized defects can be defined according to the distribution of the fine candidate defect points obtained through the fine detection, so that compared with a detection mode in which isolated points obtained through the discrete detection represent defects, the probability of missing detection of the defects can be reduced, and the accuracy of defect detection is improved. In addition, if the above-mentioned flow introduces a mask in the discrete detection and/or the fine detection, it may also help to shield the influence of the predictable strong interference area on the detection accuracy.
In practical application, the ideal edge curve can support manual setting and also can support automatic detection setting, and can support both manual setting and automatic detection setting, and can be selected preferentially from the ideal edge curves set in the two modes.
FIG. 2 is a flow chart illustrating an ideal edge curve creation process suitable for the edge defect detection method shown in FIG. 1. Referring to fig. 2, before the process shown in fig. 1 is executed (i.e., before S110 shown in fig. 1), the edge defect detection method in this embodiment may further include the following steps:
s210: and starting a human-computer interaction interface for setting the ideal edge curve.
S220: and in response to the sample loading instruction detected at the human-computer interaction interface, acquiring a sample image from a path specified by the sample loading instruction. Wherein the sample image contains the desired edge of the target image.
S230: and responding to a setting mode selection instruction detected on the human-computer interaction interface, determining a setting mode of the ideal edge curve, and jumping to S241 if the setting mode is a manual setting mode, or jumping to S251 if the setting mode is detected.
S241: and visually presenting the acquired sample image on a human-computer interaction interface, and then jumping to S242.
S242: and saving the input curve detected in the human-computer interaction interface as an ideal edge curve, and then jumping to S260.
For example, the input curve detected in the human-computer interaction interface can be a regular geometric edge such as a straight line, a circular arc and the like, and the input curve can be formed by dragging with an interface tool and subjected to fine pose adjustment and the like. It will be appreciated that the pose described herein may include information on the position, angle, etc. of the geometric edge as close as possible to the desired edge in the sample image.
S251: sample edge points are detected in the acquired sample image.
S252: the detected sample edge points are fitted to form an ideal edge curve, and then a jump is made to S260.
S260: the ideal edge curve is saved.
As can be seen from the above flow, this embodiment supports the precision control of the ideal edge curve by manual setting or automatic detection of the sample image.
Fig. 3 is a schematic diagram of an example of automatic detection based on the ideal edge curve creation process shown in fig. 2. Referring to fig. 3, when S251 in the flow shown in fig. 2 is implemented:
firstly, a detection area 300 can be determined according to an area bounding box detected in the human-computer interaction interface (in fig. 3, the detection area 300 is taken as a rectangular area as an example);
then, the detection area 300 is divided into a plurality of sub-areas 310 (in fig. 3, the sub-areas 310 are rectangular areas as an example), wherein the dividing direction of the sub-areas 310, the width W of a single sub-area 310, and the distance S between adjacent sub-areas 310 can be determined according to a configuration instruction detected in the human-computer interaction interface;
thereafter, the edge points 320 are searched for in each sub-region 310 by using any one of edge point search algorithms, such as Canny algorithm, Sobel algorithm, Prewitt algorithm, Roberts algorithm, etc., and a pre-created mask may be loaded during the edge point search to mask the undesired edge points;
if a plurality of edge points 320 are found in the same sub-region 310, one of the strongest edge points may be selected by using a preset screening condition, and the pixel difference may be used as an available screening condition for the strongest edge point, that is, the strongest edge point may have the largest gray difference compared to the adjacent pixel points, although the screening condition is not limited thereto;
finally, the edge points 320 in each sub-region 310 are subjected to straight line fitting or circular arc fitting (straight line fitting is taken as an example in fig. 3), and the fitting algorithm may use, for example, least squares, robust least squares, or the like.
It will be appreciated that although the above examples are examples of ideal edge curves in the form of rectangular detection regions, rectangular sub-regions and straight line segments, the detection principles underlying the above examples are equally applicable to the case where ideal edge curves in the form of circular segments fit circular, and sector-shaped detection regions and sub-regions.
When the edge defect detection method of the embodiment is implemented, in order to more accurately position the detection target in the area where the edge feature is located, the detection area may support a manual setting mode, and if the extension range of the ideal edge curve does not match the size of the detection area, the embodiment may implement automatic adaptation of the ideal edge curve and the manually set detection area. Of course, the detection area may also be automatically created with reference to the ideal edge curve.
Fig. 4 is an expanded flow diagram of the edge defect detection method shown in fig. 1 based on ideal edge curve adaptation. Referring to fig. 4, in order to support the adaptation of the ideal edge curve in the case of manually setting the detection area, the process shown in fig. 1 may be further extended to include the following steps:
s410: and loading a preset ideal edge curve in the detection area of the target image. Wherein the target image may be obtained in advance of this step or in real time, and the detection area may cover edge features present in the target image.
The principle of this step can be considered to be basically the same as that of S110 in fig. 1, and in this step, pose matching correction can be further performed on the loaded ideal edge curve and the target image.
S420: and determining a detection area of the target image according to the human-computer interaction input information.
S430: and correcting the loaded ideal edge curve to take the boundary of the detection area as a cut-off endpoint.
S440: discrete detection is performed in the detection area of the target image along the ideal edge curve.
This step can be considered as basically the same as the principle of S120 in fig. 1, and as an optional optimization processing manner, this step may be preceded by further loading a mask in the detection area of the target image to shield the interference or redundant area that can be expected.
S450: and when the discrete candidate defect point is detected, performing fine detection on the discrete candidate defect point along the ideal edge curve, wherein the detection granularity of the fine detection is smaller than that of the discrete detection, and the detection density of the fine detection is greater than that of the discrete detection.
This step can be considered as basically the same as the principle of S130 in fig. 1, and as an optional optimization processing manner, this step may be preceded by further loading a mask in the detection area of the target image to shield an interference or redundant area that can be expected.
S460: and determining the regionalized defects according to the distribution condition of the fine candidate defect points obtained by fine detection.
This step can be considered to be basically the same principle as S140 in fig. 1.
Fig. 5a to 5c are schematic diagrams of an example of manual setting of the detection region based on the extended procedure shown in fig. 4. In the example shown in fig. 5a to 5c, an ideal edge curve (taking the ideal edge curve as a straight line segment as an example) and a target image may be registered and positioned by using any template matching algorithm, so that the ideal edge curve is rotationally translated to a pose close to an edge feature, and then:
referring to fig. 5a, for a manually set detection region 511 (taking a rectangular detection region as an example), if both ends of the ideal edge curve 512 after being registered and positioned are retracted into the detection region 511, both ends of the ideal edge curve 512 are extended to the boundary of the detection region 511, that is, extended sections are formed outside both ends of the original model section of the ideal edge curve 512 (the extended sections are shown by the dotted line in fig. 5 a);
referring to fig. 5b, for the manually set detection area 521 (taking a rectangular detection area as an example), if both ends of the registered ideal edge curve 522 extend out of the detection area 521, then clipping is performed at the intersection of both ends of the ideal edge curve 522 and the boundary of the detection area 521, that is, clipping is performed at both ends of the original model segment of the ideal edge curve 522 and the boundary of the detection area 521 (the clipping portions are shown by the dotted line portions in fig. 5 b);
referring to fig. 5c, for the manually set detection region 531 (taking a rectangular detection region as an example), if one end of the ideal edge curve 532 after registration positioning is retracted within the detection region 531 and the other end is extended outside the detection region 531, the retracted end of the ideal edge curve 532 is extended to the corresponding boundary of the detection region 531 and the other end of the ideal edge curve 532 is cut at the intersection of the boundary of the detection region 531, that is, an extension is formed outside one end of the original model segment of the ideal edge curve 532, and the other end of the original model segment of the ideal edge curve 532 is cut at the boundary of the detection region 531 (the extension and cut part is shown as a dotted line in fig. 5 c).
It will be appreciated that although the above examples are illustrated with respect to ideal edge curves in the form of rectangular detection regions and straight line segments, the adaptation principle underlying the above examples is equally applicable to the case where ideal edge curves in the form of circular arc segments fit circular, and sector-shaped detection regions.
FIG. 6 is a schematic diagram of another extended flow of the edge defect detection method shown in FIG. 1 based on the ideal edge curve adaptation. Referring to fig. 6, in order to support the adaptation of the ideal edge curve in the case of automatically setting the detection area, the process shown in fig. 1 may be further extended to include the following steps:
s610: and loading a preset ideal edge curve in the detection area of the target image. Wherein the target image may be obtained in advance of this step or in real time, and the detection area may cover edge features present in the target image.
The principle of this step can be considered to be basically the same as that of S110 in fig. 1, and in this step, pose matching correction can be further performed on the loaded ideal edge curve and the target image.
S620: a detection area for locating the boundary with the end point of the ideal edge curve is created based on the extension range of the ideal edge curve.
S630: discrete detection is performed in the detection area of the target image along the ideal edge curve.
This step can be considered as basically the same as the principle of S120 in fig. 1, and as an optional optimization processing manner, this step may be preceded by further loading a mask in the detection area of the target image to shield the interference or redundant area that can be expected.
S640: and when the discrete candidate defect point is detected, performing fine detection on the discrete candidate defect point along the ideal edge curve, wherein the detection granularity of the fine detection is smaller than that of the discrete detection, and the detection density of the fine detection is greater than that of the discrete detection.
This step can be considered as basically the same as the principle of S130 in fig. 1, and as an optional optimization processing manner, this step may be preceded by further loading a mask in the detection area of the target image to shield an interference or redundant area that can be expected.
S650: and determining the regionalized defects according to the distribution condition of the fine candidate defect points obtained by fine detection.
This step can be considered to be basically the same principle as S140 in fig. 1.
In the specific implementation of the method flow in the above embodiment, both the discrete detection and the fine detection may refer to the detection creation process of the ideal edge curve, and adopt a molecular region detection manner, and the density of the sub-regions used for the fine detection may be greater than that of the discrete detection. For better understanding the sub-region based implementation of the dissociation scatter detection and the fine detection, the following description is made in conjunction with an example flow.
FIG. 7 is a flowchart illustrating an example of the edge defect detection method shown in FIG. 1. Referring to fig. 7, the edge defect detection method shown in fig. 1 in this embodiment can implement discrete detection and fine detection based on sub-regions, and can be extended to include the following steps:
s700: and loading a preset ideal edge curve in the detection area of the target image. Wherein the target image may be obtained in advance or in real time before this step.
The principle of this step can be considered to be basically the same as that of S110 in fig. 1, and in this step, pose matching correction can be further performed on the loaded ideal edge curve and the target image. In addition, after this step, the manual setting of the detection region and the adaptation of the ideal edge curve to the detection region may be implemented according to S420 to S430 shown in fig. 4, or the automatic setting and adaptation of the detection region based on the ideal edge curve may be implemented according to S620 shown in fig. 6.
S710: a plurality of discrete detector sub-regions arranged at predetermined intervals are created along an ideal edge curve in the detection region.
The size of the single discrete detector sub-region set in this step and the distance between adjacent discrete detector sub-regions can be adjusted by setting.
S711: discrete edge points are detected in each discrete detection sub-region.
In the step, any one of edge point search algorithms, such as a Canny algorithm, a Sobel algorithm, a Prewitt algorithm, a Roberts algorithm and the like, may be used for detecting the discrete edge points, and a pre-created mask may be loaded during edge point search to mask edge points which are not desired to be detected; if a plurality of discrete edge points are found in the same discrete detection sub-area, one of the strongest edge points can be selected as a discrete edge point in the discrete detection sub-area by using a preset screening condition.
S712: the deviation distance of each detected discrete edge point from the ideal edge curve is measured and the discrete edge points deviating beyond a predetermined first deviation threshold are determined as discrete candidate defect points. If it is detected that the deviation distance of all the discrete candidate defect points from the ideal edge curve does not exceed the first deviation threshold, that is, no discrete candidate defect point is obtained through discrete detection, it can be considered that no edge defect exists in the target image, and at this time, the process can be directly ended.
S710 to S712 may be regarded as an extension of S120 shown in fig. 1, and may be an optional optimization processing manner.
S720: when discrete candidate defect points are detected, a sub-region set of a plurality of discrete detector sub-regions centered on the discrete detector sub-region in which each discrete candidate defect point is located is selected.
S721: a plurality of fine detection sub-regions are created along the ideal edge curve with the outermost boundary of the selected set of sub-regions truncated as a cut-off point. Wherein the number of the plurality of fine detection sub-regions is greater than the number of the plurality of discrete detection sub-regions comprised by the set of sub-regions, and the size of the span of a single fine detection sub-region along the ideal edge curve is less than the size of the span of a single discrete detection sub-region along the ideal edge curve.
For example, this step creates a plurality of sequentially contiguous fine detection sub-regions along the ideal edge curve with the outermost boundary of the selected set of sub-regions truncated as a cut-off point, wherein the span size of a single fine detection sub-region along the ideal edge curve may not exceed half the span size of a single discrete detection sub-region along the ideal edge curve.
S722: and respectively detecting fine edge points in each fine detection subarea.
In this step, any edge point search algorithm, such as Canny algorithm, Sobel algorithm, Prewitt algorithm, Roberts algorithm, etc., may also be used for the detection of the fine edge point, and a pre-created mask may also be loaded during the edge point search to mask an edge point that is not desired to be detected.
In theory, for the case of performing fine detection around a discrete candidate defect point, the obtained fine candidate defect points at least include the discrete candidate defect point, and further include other fine candidate defect points whose deviation distance exceeds the second deviation threshold. The second deviation threshold may be the same as the first deviation threshold or may be different from the first deviation threshold.
S723: and measuring deviation distances of the detected fine edge points relative to the ideal edge curve, and defining the fine edge points with the deviation distances exceeding a preset second deviation threshold value as at least one fine candidate defect point set according to the position distribution.
In this step, the fine edge points whose deviation distance exceeds the predetermined second deviation threshold are defined according to the position distribution, and it can be understood that, when the fine edge points whose deviation distance exceeds the second deviation threshold are detected in one fine detection sub-area:
if the fine edge points with the deviation distance exceeding the second deviation threshold do not exist in the fine detection subareas adjacent to the two sides of the fine detection subarea, the fine edge points with the deviation distance exceeding the second deviation threshold in the fine detection subarea are defined as a fine candidate defect point set;
and if the fine edge points with the deviation distance exceeding the second deviation threshold also exist in the fine detection subarea adjacent to at least one side of the fine detection subarea, the fine edge points with the deviation distance exceeding the second deviation threshold in the fine detection subarea and the fine detection subarea adjacent to at least one side are defined as a fine candidate defect point set.
That is, the number of fine candidate defective point sets depends on the number of fine edge points whose deviation distances exceed the second deviation threshold, and the continuity of distribution of such fine edge points.
In addition, for some of the tooth-like concave-convex defects, a part of the edge points deviate from the ideal edge curve, and another part of the edge points are close to the ideal edge curve, so for fine edge points whose deviation distance does not exceed the second deviation threshold, if both sides of the fine edge points are adjacent to the fine candidate defect point set, these fine edge points should be additionally identified as fine candidate defect points. As used herein, adjacent may refer to a fine edge point that is spaced from a deviation distance that does not exceed the second deviation threshold by more than a predetermined number (three or five) of fine detection sub-regions.
S724: and additionally defining the fine edge points of which the deviation distance does not exceed a preset second deviation threshold value and both sides are adjacent to the fine candidate defect point set as the fine candidate defect point set.
S725: the size of the distribution area of each fine candidate defect point set is measured, and the fine candidate defect point set whose distribution area size exceeds a predetermined size threshold is determined as a defect edge point set. The size of the distribution area measured in this step may be a size of the distribution area formed by the fine candidate defect point set in the extending direction along the ideal edge curve, and the size may be regarded as a projection size of the distribution area formed by the fine candidate defect point set on the ideal edge curve.
S720 to S725 described above may be considered as an extension of S130 shown in fig. 1, and as an optional optimization processing manner, a mask may be further loaded in the detection region of the target image before S722 to shield an interference or redundant region that can be expected.
S730: and determining the defect edge point set as a concave-convex defect area, and/or determining an area in which the fine edge point detection fails as a fracture defect area. The number and form of the regionalized defects determined in the step can be determined according to input settings detected on a human-computer interaction interface.
For example, this step may create bounding boxes for each set of fine defect edge points and for the region in which the fine edge point detection fails, respectively, determine the defect attribute of each bounding box (the defect attribute of the bounding box of the defect edge point region is a concave-convex defect, the defect attribute of the bounding box of the fine detection subregion in which the fine edge point detection fails is a fracture defect), and merge the bounding boxes that have the same defect attribute and intersect.
In addition, the step may further perform statistical processing on the localized defects, which may specifically include: determining the image coordinates of the central position of each regional defect in the target image, and/or determining the image area of each regional defect in the target image, and/or determining the maximum deviation of each regional defect compared with an ideal edge curve, and/or intercepting a local graph of the regional defect in the target image.
In addition, in theory, there is an extreme case that only the discrete candidate defect point detected in S713 is included in the detected fine candidate defect points, and no other defect edge points are included in the detected fine candidate defect points, and the localization defect at this time may be determined as a non-defect conclusion that the discrete candidate defect point is a suspected noise point, or may also be determined as a burr defect indicating that the edge is severely worn, and may be specifically set according to the product property and the detection experience value of the actually detected object.
Fig. 8 is a schematic diagram of an example of discrete detection based on the example flow shown in fig. 7. Please refer to fig. 8:
when S710 in the flow shown in fig. 7 is implemented, the detection region 300 may be divided into a plurality of discrete detection sub-regions 810 (in fig. 8, the discrete detection sub-regions 810 are rectangular regions, for example) along the ideal edge curve 800 (in fig. 8, the ideal edge curve 800 is taken as a straight line segment as an example);
when the above S711 in the flow shown in fig. 7 is specifically implemented, the discrete edge points 820 may be searched for in each discrete detection sub-region 810 by using any one edge point search algorithm, where if a plurality of discrete edge points 820 are searched for in the same discrete detection sub-region 810, one of the strongest edge points may be selected by using a preset screening condition;
in embodying S712 in the above-described flow shown in fig. 7, the projection distance of the discrete edge point 820 in the discrete detection sub-region 810 from the ideal edge curve 800 may be detected as a deviation, and the discrete edge point 820 whose deviation exceeds the first deviation threshold may be determined as a discrete candidate defect point (a solid line symbol "x" in bold in fig. 8 represents a discrete candidate defect point, and a dotted line symbol "x" represents a non-discrete candidate defect point).
Fig. 9 is a schematic diagram of an example of fine detection based on the example flow shown in fig. 7. Please refer to fig. 9 and also refer back to fig. 8:
in particular implementing S720 in the above-described flow illustrated in fig. 7, a sub-region set of a plurality of discrete detector sub-regions centered on the discrete detector sub-region in which each discrete candidate defect point is located, that is, three discrete detector sub-regions between boundary points identified as E1 and E2 along the ideal edge curve 800 in fig. 8, may be selected;
in specific implementations of S721 in the above-described flow shown in fig. 7, sixteen fine detector sub-regions 830 are created along the ideal edge curve 800, the sixteen fine detector sub-regions 830 are arranged adjacent to each other between the boundary points E1 and E2, and the span size of a single fine detector sub-region 830 along the ideal edge curve 800 is one-fourth of the span size of a single discrete detector sub-region 820 along the ideal edge curve, i.e., no more than one-half of the span size of a single discrete detector sub-region 820 along the ideal edge curve;
in the specific implementation of S722 in the flow shown in fig. 7, fine edge points 840 may be detected in the fine detection sub-regions 830, respectively, where each fine detection sub-region 830 allows one or more than one fine edge points 840 to be detected;
in embodying S723 in the above-described flow shown in fig. 7, a fine edge point whose deviation distance exceeds a predetermined second deviation threshold may be defined as a fine candidate defect point set (a set of fine edge points 840 defined as dashed boxes 851, 853, and 855 in fig. 9);
in the specific implementation of S724 in the flow shown in fig. 7, the fine edge point that has the deviation distance not exceeding the predetermined second deviation threshold and both sides of which are adjacent to the fine candidate defect point set may be additionally defined as the fine candidate defect point set (the set of fine edge points 840 defined as the dashed box 852 in fig. 9) to be determined as the fine defect edge point set;
in embodying S725 in the above-described flow shown in fig. 7, the set of fine candidate defect points whose distribution region size in the extending direction of the ideal edge curve 800 (i.e., the projected size on the ideal edge curve 800) exceeds the predetermined size threshold may be determined as the set of defect edge points (the set of fine edge points 840 as defined by the dashed- line boxes 851, 852 and 853 in fig. 9), and the set of fine candidate defect points whose distribution region size in the extending direction of the ideal edge curve 800 (i.e., the projected size on the ideal edge curve 800) does not exceed the predetermined size threshold (the isolated fine edge points 840 as defined by the dashed-line box 855 in fig. 9) may be considered as noise;
when S730 in the flow shown in fig. 7 is implemented specifically, in addition to converting the recognition of the defect edge point set into the localization defect for identifying the concave-convex defect, the area where the fine edge point detection fails, which is defined by the dashed frame 854, may also be converted into the localization defect for identifying the fracture defect.
In a specific implementation, the dashed boxes 851, 852, 853, and 854 may be actually represented as bounding boxes that surround the localized defect, and corresponding defect attributes are set (the defect attributes of the dashed boxes 851, 852, and 853 are concave-convex defects, and the defect attribute of the dashed box 854 is a fracture defect), respectively, and bounding boxes that have the same defect attribute and intersect may be merged.
Fig. 10 is a schematic structural diagram of an edge defect detecting apparatus in another embodiment. Referring to fig. 10, in another embodiment, an edge defect detecting apparatus may include:
an edge curve loading module 1010, configured to load a preset ideal edge curve in the detection area of the target image. Wherein the target image may be captured in advance or in real time.
And a defect discrete detection module 1020, configured to perform discrete detection in the detection area of the target image along the ideal edge curve.
For example, the defect discrete detection module 1020 may detect discrete edge points in each discrete detection sub-region, detect deviation distances of the discrete edge points detected in each discrete detection sub-region with respect to the ideal edge curve, and determine discrete edge points having deviations exceeding a predetermined first deviation threshold as discrete candidate defect points.
And a defect fine detection module 1030, configured to perform fine detection on the discrete candidate defect point along the ideal edge curve when the discrete candidate defect point is detected, where a detection granularity of the fine detection is smaller than that of the discrete detection, and a detection density of the fine detection is greater than that of the discrete detection.
For example, when discrete candidate defect points are detected, the defect fine detection module 1030 may select a sub-region set of a plurality of discrete detection sub-regions centered on the discrete detection sub-region in which each discrete candidate defect point is located, cut off an outermost boundary of the selected sub-region set as a cut-off point, create a plurality of fine detection sub-regions along the ideal edge curve (the number of the plurality of fine detection sub-regions is greater than the number of the plurality of discrete detection sub-regions included in the sub-region set, and the span size of a single fine detection sub-region along the ideal edge curve is smaller than the span size of a single discrete detection sub-region along the ideal edge curve), detect fine edge points in the fine detection sub-regions, respectively, and measure deviation distances of the detected fine edge points with respect to the ideal edge curve, define the fine edge points whose deviation distances exceed a predetermined second deviation threshold as at least one fine candidate defect point set according to the position distribution, and measuring the size of a distribution area of each fine candidate defect point set, and determining the fine candidate defect point set with the size of the distribution area exceeding a preset size threshold value as a defect edge point set. In addition, the defect fine detection module 1030 may further determine, as the fine candidate defect point set, a fine edge point supplementary circle in which the deviation distance does not exceed the predetermined second deviation threshold and both sides of the fine edge point supplementary circle are adjacent to the fine candidate defect point set.
If the defect discrete detection module 1020 detects that the deviation distance of all the discrete candidate defect points compared with the ideal edge curve does not exceed the first deviation threshold, that is, no discrete candidate defect point is obtained through discrete detection, it may be considered that no edge defect exists in the target image, and the defect fine detection module 1030 may not be enabled at this time.
And the area defect identification module 1040 is configured to determine the localized defect according to the distribution of the fine candidate defect points obtained by the fine detection.
Based on the device, the preset ideal edge curve can be used as a detection reference for the target image, so that compared with the edge curve obtained by detecting and fitting the target image, the interference of image noise on the accuracy of the edge curve can be reduced; moreover, when discrete candidate defect points are detected along the ideal edge curve, each discrete candidate defect point can be subjected to fine detection, and regionalized defects can be defined according to the distribution of the fine candidate defect points obtained through the fine detection, so that compared with a detection mode in which isolated points obtained through the discrete detection represent defects, the probability of missing detection of the defects can be reduced, and the accuracy of defect detection is improved. In addition, if the above-mentioned flow introduces a mask in the discrete detection and/or the fine detection, it may also help to shield the influence of the predictable strong interference area on the detection accuracy.
In addition, in order to accurately identify the localized defect, the area defect identification module 1040 may be further configured to determine the fine defect edge point set as the concave-convex defect area, and/or determine the area in which the fine edge point detection fails as the fracture defect area.
For example, the area defect screening module 1040 may further create bounding boxes for each fine defect edge point set, determine the defect attribute of each bounding box (the defect attribute of the bounding box of the defect edge point area is a concave-convex defect, and the defect attribute of the bounding box of the fine detection sub-area in which the fine edge point detection fails is a fracture defect), and merge the bounding boxes that have the same defect attribute and intersect with each other. In addition, the local defect identification module 1040 may further perform statistical processing on the localized defects, which may specifically include: determining the image coordinates of the central position of each regional defect in the target image, and/or determining the image area of each regional defect in the target image, and/or determining the maximum deviation of each regional defect compared with an ideal edge curve, and/or intercepting a local graph of the regional defect in the target image.
FIG. 11 is a schematic diagram of an expanded structure of the edge defect detecting apparatus shown in FIG. 10. Referring to fig. 11, in order to support the manual setting or the automatic detection setting of the ideal edge curve, the edge defect detecting apparatus shown in fig. 10 may further include: an ideal edge creating module 1050, configured to, before loading a preset ideal edge curve in a detection area of a captured target image, visually present an acquired sample image on a human-computer interaction interface, and store an input curve detected in the human-computer interaction interface as the ideal edge curve, or detect sample edge points in the acquired sample image and fit the detected sample edge points to form the ideal edge curve. Wherein the sample image contains the desired edge of the target image.
FIG. 12 is a schematic diagram of another expanded structure of the edge defect detecting apparatus shown in FIG. 10. Referring to fig. 12, in order to support the adaptation of the setting of the detection area to the ideal edge curve, the edge defect detecting apparatus shown in fig. 10 may further include: the detection region setting module 1060 is configured to, before discrete detection is performed on the detection region of the target image along the ideal edge curve, determine the detection region of the target image according to the human-computer interaction input information, and modify the loaded ideal edge curve to have a boundary of the detection region as a cut-off endpoint, or create a detection region having a boundary located by an endpoint of the ideal edge curve according to an extension range of the ideal edge curve.
It is understood that the ideal edge creation module 1050 included in the extended structure shown in fig. 11 may be further introduced into the extended structure shown in fig. 12.
Fig. 13 is a schematic diagram of another expanded structure of the edge defect detecting apparatus shown in fig. 10. Referring to fig. 13, in order to selectively shield the interference region, the edge defect detecting apparatus shown in fig. 10 may further include: the local region shielding module 1070 is configured to load a mask in the detection region of the target image before the defect discrete detection module 1020 performs the discrete detection in the detection region of the target image along the ideal edge curve and/or before the fine discrete detection module 1030 performs the fine detection on the discrete candidate defect points obtained by the discrete detection along the ideal edge curve.
It is understood that the extension structure shown in fig. 13 may further include an ideal edge creation module 1050 included in the extension structure shown in fig. 11 and/or a detection region setting module 1060 included in the extension structure shown in fig. 11.
Fig. 14 is a schematic structural diagram of a quality detection apparatus in another embodiment. Referring to fig. 14, in another embodiment, a quality inspection apparatus may include a target image capturing module 1410 (e.g., an imaging element or an image recording element) and a processor 1420, wherein the processor 1420 is configured to execute the steps of the edge defect inspection method in the foregoing embodiments. Also, the quality detection device may further include a non-transitory computer readable storage medium 1430, which may store instructions that, when executed by the processor 1420, cause the processor 1420 to perform the steps in the edge defect detection method as in the previous embodiments.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like made within the spirit and principle of the present invention should be included in the scope of the present invention.

Claims (18)

1. An edge defect detection method, comprising:
loading a preset ideal edge curve in a detection area of a target image, wherein the detection area covers edge features presented in the target image;
carrying out discrete detection in a detection area of the target image along the ideal edge curve;
when the discrete candidate defect point is detected, carrying out fine detection on the discrete candidate defect point along the ideal edge curve, wherein the detection granularity of the fine detection is smaller than that of the discrete detection, and the detection density of the fine detection is greater than that of the discrete detection;
and determining the regionalized defects according to the distribution condition of the fine candidate defect points obtained by fine detection.
2. The edge defect detecting method according to claim 1, further comprising, before loading a preset ideal edge curve in a detection area of the captured target image:
visually presenting the acquired sample image on a human-computer interaction interface, and storing an input curve detected in the human-computer interaction interface as an ideal edge curve; or
Detecting sample edge points in the obtained sample image, and fitting the detected sample edge points to form an ideal edge curve;
wherein the sample image contains the desired edge of the target image.
3. The edge defect detecting method according to claim 1, further comprising, before performing discrete detection in the detection area of the target image along the ideal edge curve:
and performing pose matching correction on the loaded ideal edge curve and the target image.
4. The edge defect detecting method according to claim 1, further comprising, before performing discrete detection in the detection area of the target image along the ideal edge curve:
determining a detection area of the target image according to the human-computer interaction input information, and correcting the loaded ideal edge curve to take the boundary of the detection area as a cut-off endpoint; or
A detection area for locating the boundary with the end point of the ideal edge curve is created based on the extension range of the ideal edge curve.
5. The edge defect detecting method according to claim 1, further comprising, before performing discrete detection in the detection region of the target image along the ideal edge curve and/or performing fine detection on discrete candidate defect points obtained by the discrete detection along the ideal edge curve:
a mask is loaded in the detection area of the target image.
6. The edge defect detecting method according to claim 1, wherein performing discrete detection in the detection region of the target image along the ideal edge curve comprises:
creating a plurality of discrete detector sub-regions arranged at predetermined intervals along an ideal edge curve in a detection region;
respectively detecting discrete edge points in each discrete detection sub-region;
measuring deviation distance of each detected discrete edge point relative to an ideal edge curve;
and determining the discrete edge points with the deviation distance exceeding a preset first deviation threshold value as discrete candidate defect points.
7. The edge defect detection method of claim 6, wherein the fine detection of discrete candidate defect points along the ideal edge curve comprises:
selecting a sub-region set of a plurality of discrete detector sub-regions centered on the discrete detector sub-region in which each discrete candidate defect point is located;
creating a plurality of fine detector sub-regions along the ideal edge curve with the outermost boundary of the selected sub-region set truncated as a cut-off point, wherein the number of the plurality of fine detector sub-regions is greater than the number of the plurality of discrete detector sub-regions included in the sub-region set, and the span size of a single fine detector sub-region along the ideal edge curve is less than the span size of a single discrete detector sub-region along the ideal edge curve;
respectively detecting fine edge points in each fine detection sub-area;
measuring deviation distance of each detected fine edge point relative to an ideal edge curve;
defining the fine edge points with the deviation distance exceeding a preset second deviation threshold value as at least one fine candidate defect point set according to the position distribution;
measuring the size of a distribution area of each fine candidate defect point set;
and determining a set of fine candidate defect points with the distribution area size exceeding a predetermined size threshold as a set of defect edge points.
8. The edge defect detection method of claim 7, wherein creating a plurality of fine detection sub-regions along an ideal edge curve with an outermost boundary cutoff of the selected set of sub-regions as a cutoff point comprises:
sequentially adjoining multiple fine detection sub-regions are created along an ideal edge curve with an outermost boundary cutoff of the selected set of sub-regions as a cutoff point, wherein a span dimension of a single fine detection sub-region along the ideal edge curve is no more than half of a span dimension of a single discrete detection sub-region along the ideal edge curve.
9. The method of claim 7, wherein the fine detection of discrete candidate defect points along the ideal edge curve further comprises:
and additionally defining the fine edge points of which the deviation distance does not exceed a preset second deviation threshold value and both sides are adjacent to the fine candidate defect point set as the fine candidate defect point set.
10. The edge defect detection method of claim 7, wherein determining the localized defects according to the distribution of the fine candidate defect points obtained by the fine detection comprises:
and determining the defect edge point set as a concave-convex defect area and/or determining the area in which the fine edge point detection fails as a fracture defect area.
11. The edge defect detection method of claim 10, wherein determining the set of fine defect edge points as the concave-convex defect region and/or determining the region in which the fine edge point detection fails as the fracture defect region comprises:
creating a bounding box for each defect edge point set and the area in which the fine edge point detection fails;
determining the defect attribute of each enclosure frame, wherein the defect attribute comprises concave-convex defects and fracture defects;
bounding boxes that have the same defect attribute and that intersect are merged.
12. An edge defect detecting apparatus, comprising:
the edge curve loading module is used for loading a preset ideal edge curve in a detection area of a shot target image;
the defect discrete detection module is used for carrying out discrete detection in the detection area of the target image along the ideal edge curve;
the defect fine detection module is used for carrying out fine detection on the discrete candidate defect points along the ideal edge curve when the discrete candidate defect points are detected, wherein the detection granularity of the fine detection is smaller than that of the discrete detection, and the detection density of the fine detection is greater than that of the discrete detection;
and the area defect identification module is used for determining the regionalized defects according to the distribution condition of the fine candidate defect points obtained by fine detection.
13. The edge defect detecting apparatus according to claim 12, further comprising:
the system comprises an ideal edge creating module, a judging module and a judging module, wherein the ideal edge creating module is used for visually presenting an acquired sample image on a human-computer interaction interface and storing an input curve detected in the human-computer interaction interface as an ideal edge curve before loading a preset ideal edge curve in a detection area of a shot target image, or detecting sample edge points in the acquired sample image and fitting the detected sample edge points to form the ideal edge curve; wherein the sample image contains the desired edge of the target image.
14. The edge defect detecting apparatus according to claim 12, further comprising:
and the detection area setting module is used for determining the detection area of the target image according to the human-computer interaction input information and correcting the loaded ideal edge curve to take the boundary of the detection area as a cut-off endpoint or creating the detection area which takes the endpoint of the ideal edge curve to position the boundary according to the extension range of the ideal edge curve before carrying out discrete detection in the detection area of the target image along the ideal edge curve.
15. The edge defect detecting apparatus according to claim 12, further comprising:
and the local area shielding module is used for loading a mask in the detection area of the target image before performing discrete detection in the detection area of the target image along the ideal edge curve and/or performing fine detection on discrete candidate defect points obtained by the discrete detection along the ideal edge curve.
16. The edge defect detecting apparatus according to claim 12,
the area defect identification module is further used for determining the defect edge point set determined by the fine detection as a concave-convex defect area and determining the fine detection subarea failed in the fine edge point detection as a fracture defect area.
17. A quality detection apparatus, characterized by comprising a processor for performing the steps in the edge defect detection method of any one of claims 1 to 11.
18. A non-transitory computer readable storage medium storing instructions that, when executed by a processor, cause the processor to perform the steps in the edge defect detection method of any of claims 1 to 11.
CN201910559978.4A 2019-06-26 2019-06-26 Edge defect detection method, edge defect detection device and quality detection equipment Active CN112147147B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910559978.4A CN112147147B (en) 2019-06-26 2019-06-26 Edge defect detection method, edge defect detection device and quality detection equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910559978.4A CN112147147B (en) 2019-06-26 2019-06-26 Edge defect detection method, edge defect detection device and quality detection equipment

Publications (2)

Publication Number Publication Date
CN112147147A true CN112147147A (en) 2020-12-29
CN112147147B CN112147147B (en) 2023-12-22

Family

ID=73869705

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910559978.4A Active CN112147147B (en) 2019-06-26 2019-06-26 Edge defect detection method, edge defect detection device and quality detection equipment

Country Status (1)

Country Link
CN (1) CN112147147B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113658133A (en) * 2021-08-16 2021-11-16 江苏鑫丰源机电有限公司 Gear surface defect detection method and system based on image processing
CN114565771A (en) * 2022-04-29 2022-05-31 广东粤港澳大湾区硬科技创新研究院 Defect detection method and device for facilities on two sides of road
CN115063618A (en) * 2022-08-17 2022-09-16 成都数之联科技股份有限公司 Defect positioning method, system, equipment and medium based on template matching

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103439348A (en) * 2013-08-16 2013-12-11 中国科学院半导体研究所 Remote controller key defect detection method based on difference image method
CN105335963A (en) * 2015-09-24 2016-02-17 凌云光技术集团有限责任公司 Edge defect detection method and apparatus
CN105405142A (en) * 2015-11-12 2016-03-16 冯平 Edge defect detection method and system for glass panel
CN106251352A (en) * 2016-07-29 2016-12-21 武汉大学 A kind of cover defect inspection method based on image procossing
CN106408583A (en) * 2016-08-25 2017-02-15 凌云光技术集团有限责任公司 Multi-edge defect detecting method and device
CN106447649A (en) * 2016-08-25 2017-02-22 凌云光技术集团有限责任公司 Detection method and device of bead body position defect
CN107633507A (en) * 2017-09-02 2018-01-26 南京理工大学 LCD defect inspection methods based on contour detecting and characteristic matching
CN108956616A (en) * 2018-05-31 2018-12-07 南京航空航天大学 A kind of workpiece, defect detection method based on image

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103439348A (en) * 2013-08-16 2013-12-11 中国科学院半导体研究所 Remote controller key defect detection method based on difference image method
CN105335963A (en) * 2015-09-24 2016-02-17 凌云光技术集团有限责任公司 Edge defect detection method and apparatus
CN105405142A (en) * 2015-11-12 2016-03-16 冯平 Edge defect detection method and system for glass panel
CN106251352A (en) * 2016-07-29 2016-12-21 武汉大学 A kind of cover defect inspection method based on image procossing
CN106408583A (en) * 2016-08-25 2017-02-15 凌云光技术集团有限责任公司 Multi-edge defect detecting method and device
CN106447649A (en) * 2016-08-25 2017-02-22 凌云光技术集团有限责任公司 Detection method and device of bead body position defect
CN107633507A (en) * 2017-09-02 2018-01-26 南京理工大学 LCD defect inspection methods based on contour detecting and characteristic matching
CN108956616A (en) * 2018-05-31 2018-12-07 南京航空航天大学 A kind of workpiece, defect detection method based on image

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113658133A (en) * 2021-08-16 2021-11-16 江苏鑫丰源机电有限公司 Gear surface defect detection method and system based on image processing
CN114565771A (en) * 2022-04-29 2022-05-31 广东粤港澳大湾区硬科技创新研究院 Defect detection method and device for facilities on two sides of road
CN115063618A (en) * 2022-08-17 2022-09-16 成都数之联科技股份有限公司 Defect positioning method, system, equipment and medium based on template matching
CN115063618B (en) * 2022-08-17 2022-11-11 成都数之联科技股份有限公司 Defect positioning method, system, equipment and medium based on template matching

Also Published As

Publication number Publication date
CN112147147B (en) 2023-12-22

Similar Documents

Publication Publication Date Title
CN112147147A (en) Edge defect detection method, edge defect detection device and quality detection equipment
JP6106743B2 (en) Pattern measuring apparatus and semiconductor measuring system
JP6220061B2 (en) Wafer inspection using free form protection area
KR101764658B1 (en) Defect analysis assistance device, program executed by defect analysis assistance device, and defect analysis system
US10535129B2 (en) Pattern matching apparatus and computer program
JP6134366B2 (en) Image processing apparatus and computer program
KR101667471B1 (en) Defect determination device, radiography system, and defect determination method
JP5651428B2 (en) Pattern measuring method, pattern measuring apparatus, and program using the same
TW201945982A (en) Image processing system and computer program for carrying out image process
JP5094033B2 (en) Pattern matching method and computer program for performing pattern matching
JP5647999B2 (en) Pattern matching apparatus, inspection system, and computer program
JP6199799B2 (en) Self-luminous material image processing apparatus and self-luminous material image processing method
TWI780234B (en) Method, system and non-transitory computer readable medium for determining a critical dimension variation of a pattern
JP2013167448A (en) Semiconductor measuring device and computer program
CN117611619A (en) Linear fitting method, linear fitting system, electronic equipment and storage medium
JP5308766B2 (en) PATTERN SEARCH CONDITION DETERMINING METHOD AND PATTERN SEARCH CONDITION SETTING DEVICE
US10317203B2 (en) Dimension measuring apparatus and computer readable medium
KR102221526B1 (en) Melt pool width and deflection measurement method through melt pool image processing
JP2009236550A (en) Flaw detection method
JP6345937B2 (en) Pattern shape inspection apparatus and pattern shape inspection method
JP2016126823A (en) Beam condition setting device and charged particle beam device
CN117611566A (en) Defect detection method, defect detection system, electronic equipment and storage medium
Tian et al. Xpix2: Software to pick fiducial markers semi-automatically in electron tomography tilt images
JP2020144942A (en) Image processing system
JP2021006853A (en) Belt inspection system and belt inspection program

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
CB02 Change of applicant information
CB02 Change of applicant information

Address after: 310051 room 304, B / F, building 2, 399 Danfeng Road, Binjiang District, Hangzhou City, Zhejiang Province

Applicant after: Hangzhou Hikvision Robot Co.,Ltd.

Address before: 310052 5 / F, building 1, building 2, no.700 Dongliu Road, Binjiang District, Hangzhou City, Zhejiang Province

Applicant before: HANGZHOU HIKROBOT TECHNOLOGY Co.,Ltd.

GR01 Patent grant
GR01 Patent grant