CN114897881A - Crystal grain defect detection method based on edge characteristics - Google Patents

Crystal grain defect detection method based on edge characteristics Download PDF

Info

Publication number
CN114897881A
CN114897881A CN202210656421.4A CN202210656421A CN114897881A CN 114897881 A CN114897881 A CN 114897881A CN 202210656421 A CN202210656421 A CN 202210656421A CN 114897881 A CN114897881 A CN 114897881A
Authority
CN
China
Prior art keywords
grain
template
image
detection frame
crystal grain
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.)
Pending
Application number
CN202210656421.4A
Other languages
Chinese (zh)
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.)
Hefei University of Technology
Original Assignee
Hefei University of Technology
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 Hefei University of Technology filed Critical Hefei University of Technology
Priority to CN202210656421.4A priority Critical patent/CN114897881A/en
Publication of CN114897881A publication Critical patent/CN114897881A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/0002Inspection of images, e.g. flaw detection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/40Image enhancement or restoration by the use of histogram techniques
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/13Edge detection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/74Image or video pattern matching; Proximity measures in feature spaces
    • G06V10/75Organisation of the matching processes, e.g. simultaneous or sequential comparisons of image or video features; Coarse-fine approaches, e.g. multi-scale approaches; using context analysis; Selection of dictionaries
    • G06V10/751Comparing pixel values or logical combinations thereof, or feature values having positional relevance, e.g. template matching
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30108Industrial image inspection
    • G06T2207/30148Semiconductor; IC; Wafer
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/30Computing systems specially adapted for manufacturing

Abstract

The invention discloses a grain defect detection method based on edge characteristics, which comprises the steps of obtaining a grain image to be detected and a template grain image; preprocessing a grain image to be detected and a template grain image, then carrying out contour detection on the template grain image, calculating size parameters of the template grain, searching all contours of the grain image to be detected, sequentially carrying out primary screening on the found contours, comparing the length and the width of the contour to be detected with the length and the width of the template grain according to the set precision grade, and if the length and the width of the contour to be detected are within a limited range, preliminarily determining that the contour is a grain and then carrying out next detection on the contour; template matching: carrying out template matching on the outline which is preliminarily determined as the crystal grain and the template crystal grain to obtain the correlation of the outline and the template crystal grain; and setting an edge detection frame to detect defects. The invention realizes the grain searching by using the gray histogram similarity template matching method and sets the detection frame to detect the edge to judge the grain defects.

Description

Crystal grain defect detection method based on edge characteristics
Technical Field
The invention relates to the field of machine vision, in particular to a grain defect detection method based on edge characteristics.
Background
In recent years, many countries have released policy signals that have promoted the development of the semiconductor industry, indicating that countries around the world are accelerating the deployment in this field against the background of the continuing spread of "wasteland". The produced crystal grains may have defects such as damage, twins and the like, and unqualified crystal grains are detected and removed in time, so that a detection method capable of efficiently and accurately detecting the defective crystal grains is needed. The traditional manual detection method is observed by human eyes, is limited by small volume and dense arrangement of crystal grains, has low efficiency and poor precision, is easy to generate false detection and missing detection, and cannot meet the requirement of crystal grain defect detection in modern industrial production.
Disclosure of Invention
The invention aims to provide a grain defect detection method based on edge characteristics, which realizes grain search by using a gray histogram similarity template matching method and sets a detection frame to detect edges and judge grain defects.
In one aspect of the invention, a method for detecting a grain defect based on edge features is provided. According to an embodiment of the invention, the method comprises the following steps:
(1) shooting by using an industrial camera with the resolution of 3072 multiplied by 2048 to obtain a grain image to be detected and a template grain image;
(2) preprocessing a crystal grain image to be detected and a template crystal grain image, then carrying out contour detection on the template crystal grain image, calculating the size parameter of the template crystal grain, then searching all contours of the crystal grain image to be detected, sequentially carrying out preliminary screening on the found contours, and comparing the length and the width of the contour to be detected with the length and the width of the template crystal grain according to the precision grade autonomously set by a user: the length and width of the template crystal grain are multiplied by a small value (more than 0 and less than 1) as the lower limit of the range, and the length and width of the template crystal grain are multiplied by a large value (more than 1) as the upper limit of the range. If the length and the width of the outline to be detected are within the limited range, preliminarily determining that the outline is a crystal grain, and then carrying out next detection on the crystal grain;
(3) template matching: carrying out template matching on the outline preliminarily determined as the crystal grain in the step (2) and the template crystal grain to obtain the correlation d (greater than 0, less than 1, and the closer to 1, the stronger the positive correlation is), setting a correlation threshold t by a user according to the requirement, and when d is less than t, not determining the outline to be detected as the crystal grain, otherwise, recognizing the outline to be detected as the crystal grain;
(4) setting an edge detection frame to detect defects: and (4) establishing a large detection frame and a small detection frame for the crystal grain identified in the step (3), wherein the small detection frame is arranged in the crystal grain, the total number of black spots in the detection frame is calculated, if the total number exceeds a set threshold value, the crystal grain is considered to be damaged, the large detection frame is arranged outside the crystal grain, the total number of white spots on four sides of the detection frame is calculated, and if the total number exceeds the set threshold value, the crystal grain is considered to be twin.
In addition, the method for detecting a grain defect based on edge features according to the above embodiment of the present invention may further have the following additional technical features:
in some embodiments of the present invention, in step (1), the grain image to be detected and the template grain image are obtained by shooting with an industrial camera with a resolution of 3072 × 2048.
In some embodiments of the present invention, in the step (2), the preprocessing method specifically includes performing median filtering on the image to be detected and the template grain image, performing binarization threshold segmentation processing, and performing a morphological operation of erosion before expansion.
In some embodiments of the invention, in the step (2), the size parameters include a grain width w (pixel), a grain length h (pixel), a lateral gap space x (pixel), a longitudinal gap space y (pixel), and the grain width (pixel), the grain length h (μm), the lateral gap sX (μm), the longitudinal gap sY (μm), and the pixel equivalent factor (μm/pixel) corresponding to the template grain image are calculated by a user according to a standard grain size, an actually required arrangement gap, a grain width w (μm) set by the user, an actually required arrangement gap, and an actually required imaging system parameter, and the calculation formula is as follows,
W=w/factor,
H=h/factor,
spaceX=sX/factor,
spaceY=sY/factor。
in some embodiments of the present invention, in the step (3), the template matching uses a gray histogram comparison to obtain a correlation between the outline preliminarily identified as the grain and the template grain.
In some embodiments of the present invention, the abscissa of the grayscale histogram represents a grayscale level, and the ordinate represents the number of pixels appearing in an image corresponding to a grayscale level or the frequency of the grayscale level, the grayscale histograms H1 and H2 of the die and the template die to be detected are obtained, and the correlation comparison formula is as follows,
Figure BDA0003688077100000031
the more positive the correlation between H1 and H2 is, the closer the correlation coefficient is to 1, and if the calculated value d is not less than the set correlation threshold value t, the next determination is performed.
In some embodiments of the present invention, in the step (4), the large detection frame and the small detection frame are constructed by the following method, and four vertex coordinates of the small detection frame can be obtained according to the grain inclination angle, the center point coordinate, and the set minimum length and width; and obtaining coordinates of four top points of the large detection frame according to the inclination angle of the crystal grains, the coordinates of the central point and the set maximum length and width.
In some embodiments of the present invention, the detection box vertex coordinates are calculated as follows:
firstly, labeling four vertexes of a crystal grain, wherein the minimum value of a coordinate Y is 0 point, the maximum value of a coordinate X is 1 point, the maximum value of the coordinate Y is 2 points, and the minimum value of the coordinate X is 3 points;
setting the absolute value of the crystal grain inclination angle as alpha deg, setting four vertexes of the detection frame as P4, the minimum coordinate Y value is P4[0] point, the maximum coordinate X value is P4[1] point, the maximum coordinate Y value is P4[2] point, the minimum coordinate X value is P4[3] point, then according to the known central coordinate (X0, Y0), the angle alpha and the minimum length width or maximum length width, the length is H, the width is W, the four vertex coordinates can be calculated by the following formula:
when the crystal grains tilt to the right:
P4[0].x=x0+0.5*W*cos(α)-0.5*H*sin(α)
P4[0].y=y0-0.5*H*cos(α)-0.5*W*sin(α)
P4[1].x=x0-0.5*W*cos(α)-0.5*H*sin(α)
P4[1].y=y0-0.5*H*cos(α)+0.5*W*sin(α)
when the crystal grains incline to the left:
P4[0].x=x0-0.5*W*cos(α)+0.5*H*sin(α)
P4[0].y=y0-0.5*H*cos(α)-0.5*W*sin(α)
P4[1].x=x0-0.5*W*cos(α)-0.5*H*sin(α)
P4[1].y=y0+0.5*H*cos(α)+0.5*W*sin(α)
from symmetry, the coordinates of the P4[2] and P4[3] points can be obtained by the following equations:
P4[2].x=2*x0-P4[0].x
P4[2].y=2*y0-P4[0].y
P4[3].x=2*x0-P4[1].x
P4[3].y=2*y0-P4[1].y。
in some embodiments of the present invention, in the step (4), the die breakage detecting method includes the following steps:
finding the minimum external positive rectangle of the small detection frame, and detecting the total number of internal black points;
calculating a four-side linear equation according to four vertexes of the small detection frame, judging whether the detected black points are in the small detection frame or not, and calculating the total number of the black points in the small detection frame;
and thirdly, if the total number of the black points exceeds a set threshold value, the crystal grain is considered to be damaged, otherwise, the crystal grain is considered to be not damaged.
In some embodiments of the present invention, in the step (4), the method for checking whether the grain is a twin grain includes the following steps:
calculating a four-side linear equation of the large detection frame according to four vertexes of the large detection frame;
secondly, when the crystal grains incline rightwards, the span of the short side direction is larger than that of the y direction, and x is sampled according to a corresponding linear equation; the y-direction span of the long side is larger than the x-direction, and y is sampled according to a corresponding linear equation; when the crystal grains incline to the left, sampling x for the short side according to a corresponding linear equation, and sampling y for the long side according to a corresponding linear equation; the sampling method only aims at the crystal grains with the longitudinal length larger than the transverse length on the image, and the sampling algorithm can be changed according to the same idea for the crystal grains with the transverse length larger than the longitudinal length on the image.
And thirdly, calculating the total number of white points obtained by sampling, and if the total number of white points exceeds a set threshold value, determining that the crystal grain is a twin crystal, otherwise, determining that the crystal grain is not a twin crystal.
Compared with the prior art, the invention has the beneficial effects that:
1) the invention provides a simple and efficient method for detecting the crystal grain defects by using a gray histogram similarity template matching method and setting different detection frames to detect the damage and the twin defects based on the edge characteristics of the defective crystal grains.
2) The method provided by the invention can enable a user to set parameters such as the grain size, the precision grade, the correlation threshold value, the pixel-level defect judgment threshold value and the like according to actual requirements, and is suitable for detecting the defects of the square grains with different sizes.
3) The invention is convenient for counting the defect data, including the information of the number of crystal grains, the positions of the crystal grains, the defect types and the like.
Drawings
Fig. 1 is an image of a die to be detected input in an embodiment of the present invention;
FIG. 2 is an input template die image in an embodiment of the present invention;
FIG. 3 is an image of a die to be inspected after pre-processing in an embodiment of the present invention;
FIG. 4 is a template die image after pre-processing in an embodiment of the invention;
FIG. 5 is a template grain grayscale histogram in an embodiment of the invention;
FIG. 6 is a diagram illustrating the numbering of four vertices of a die according to an embodiment of the present invention;
FIG. 7 is a diagram illustrating a die detection block according to an embodiment of the present invention;
fig. 8 is an image of the results of the completion of the die inspection in the embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
According to practical application and customer requirements, parameters such as the standard length and width (mum) of the crystal grains, the standard transverse gap (mum) and longitudinal gap (mum) of crystal grain arrangement, pixel equivalent (mum/pixel) and the like are known, and parameters such as a binarization threshold, a crystal grain length range, a width range, a precision level and the like can be set by a user according to requirements. After the search of the crystal grains is realized by using a gray histogram similarity template matching method, a size detection frame is set and is respectively used for detecting the twin and the damage defects.
A grain defect detection method based on edge features. According to an embodiment of the invention, the method comprises the following steps:
1. shooting by using an industrial camera with the resolution of 3072 multiplied by 2048 to obtain a grain image to be detected and a template grain image;
2. image pre-processing
The image to be detected and the template image are input as shown in fig. 1 and fig. 2, respectively.
The method comprises the following steps of firstly, performing median filtering with the size of 3 on two images respectively, effectively suppressing stray point noise, and simultaneously keeping the details of the images. Then, a binarization threshold segmentation processing is carried out, and then a morphology operation of corrosion before expansion with a structural element size of 5 is carried out for suppressing bright details smaller than the structural element, eliminating micro connection between individual adjacent crystal grains caused by the binarization processing, smoothing crystal grain boundaries, filling micro vacancies inside the individual crystal grains caused by the binarization processing, wherein the processed image to be detected and the template image are shown in fig. 3 and 4.
And carrying out contour detection on the template image, and calculating the length and width (unit is pixel) of the template crystal grain. And calculating the grain width (pixel), the grain length (pixel), the transverse gap (pixel) and the longitudinal gap (pixel) corresponding to the template grain image by using the grain width w (mum), the grain length h (mum), the transverse gap (mum), the longitudinal gap (mum) and the pixel equivalent factor (mum/pixel) which are automatically set by a user according to the standard grain size, the arrangement gap actually required and the parameters of an actual imaging system.
W=w/factor
H=h/factor
spaceX=sX/factor
spaceY=sY/factor
Then all the contours of the image to be detected are searched, the found contours are sequentially subjected to preliminary screening, and the length and width of the contour to be detected are compared with the length and width of the template crystal grain according to the precision grade independently set by a user: the length and width of the template crystal grain are multiplied by a small value (more than 0 and less than 1) as the lower limit of the range, and the length and width of the template crystal grain are multiplied by a large value (more than 1) as the upper limit of the range. If the length and width of the contour to be detected are within the limited range, the contour is preliminarily recognized as a crystal grain, and then the next detection is carried out on the contour.
3. Template matching
And searching all contours of the image to be detected, and sequentially carrying out primary screening on the found contours. For one of the approved dies, it is template matched to the template die. The template matching uses a method of comparing gray level histograms to obtain the correlation between the two.
A gray histogram is a function of gray level, and is a statistic of the distribution of gray levels in an image, reflecting the frequency of occurrence of each gray level pixel in an image. As shown in fig. 5, the abscissa of the template grain grayscale histogram represents the grayscale level, and the ordinate represents the number of pixels appearing in the image corresponding to a certain grayscale level.
Obtaining gray level histograms H1 and H2 of the crystal grains to be detected and the template crystal grains respectively, wherein the correlation comparison formula is as follows:
Figure BDA0003688077100000071
the correlation comparison formula is derived from the correlation coefficient in statistics, the more positive the correlation between H1 and H2 is, the closer the correlation coefficient d is to 1, and if the calculated value d is not less than the set correlation threshold value t, the next judgment is carried out.
4. Setting an edge detection frame to detect defects
The approved die is obtained through the first two steps, the four vertexes of the die are labeled firstly, and the logic is as follows: the minimum value of the coordinate Y is 0 point, the maximum value of the coordinate X is 1 point, the maximum value of the coordinate Y is 2 points, and the minimum value of the coordinate X is 3 points, as shown in fig. 6. The Angle and the central point coordinate are known, four vertex coordinates of a small detection box can be obtained according to the Angle (Angle), the central point coordinate (x0, y0) and the set minimum length (minH) and width (minW), and similarly, four vertex coordinates of a large detection box can be obtained according to the set maximum length (maxH) and width (maxW), and the schematic diagram of the detection box is shown in fig. 7.
(1) And calculating the vertex coordinates of the detection frame.
Taking a small detection frame as an example, if the absolute value of Angle is α °, four vertices P4 of the small detection frame are set according to a certain rule, the smallest coordinate Y is P4[0] point, the largest coordinate X is P4[1] point, the largest coordinate Y is P4[2] point, and the smallest coordinate X is P4[3] point, then according to the known central coordinates (X0, Y0), the Angle α, and the smallest length and width (minH and minW), the four vertex coordinates can be calculated by the following formula:
when the crystal grain inclines to the right (Angle > 0):
P4[0].x=x0+0.5*minW*cos(α)-0.5*minH*sin(α)
P4[0].y=y0-0.5*minH*cos(α)-0.5*minW*sin(α)
P4[1].x=x0-0.5*minW*cos(α)-0.5*minH*sin(α)
P4[1].y=y0-0.5*minH*cos(α)+0.5*minW*sin(α)
when the crystal grain inclines to the left (Angle < 0):
P4[0].x=x0-0.5*minW*cos(α)+0.5*minH*sin(α)
P4[0].y=y0-0.5*minH*cos(α)-0.5*minW*sin(α)
P4[1].x=x0-0.5*minW*cos(α)-0.5*minH*sin(α)
P4[1].y=y0+0.5*minH*cos(α)+0.5*minW*sin(α)
from symmetry, the coordinates of the P4[2] and P4[3] points can be obtained by the following equations:
P4[2].x=2*x0-P4[0].x
P4[2].y=2*y0-P4[0].y
P4[3].x=2*x0-P4[1].x
P4[3].y=2*y0-P4[1].y
the same applies to the four vertices of the large detection box.
(2) And detecting the edge judgment defect.
The small detection frame is arranged in the crystal grain, the total number of black points in the detection frame is calculated, and if the total number exceeds a set threshold value, the crystal grain is considered to be damaged. The detection method comprises the following steps:
finding the minimum external right rectangle of small detection frame (the top left vertex (P4[3] x, P4[0] y) and the bottom right vertex (P4[1] x, P4[2] y)) to detect the total number of black points inside the small detection frame;
calculating a four-side linear equation according to four vertexes of the small detection frame, judging whether the detected black points are in the small detection frame or not, and calculating the total number of the black points in the small detection frame;
and thirdly, if the total number of the black points exceeds a set threshold value, the crystal grain is considered to be damaged, otherwise, the crystal grain is considered to be not damaged.
The large detection frame is arranged outside the crystal grain, the total number of white spots on the four sides of the detection frame is calculated, and if the total number exceeds a set threshold value, the crystal grain is considered to be a twin crystal grain. The detection method comprises the following steps:
calculating a four-side linear equation of the large detection frame according to four vertexes of the large detection frame;
secondly, when the crystal grains incline rightwards (the sides 01 and 23 are short sides, the sides 03 and 12 are long sides), the span of the sides 01 and 23 in the x direction is larger than that in the y direction, so that the x is sampled according to a corresponding linear equation; the y-direction spans of the 03 side and the 12 side are larger than the x direction, so that y is sampled according to the corresponding linear equation. When the crystal grain inclines to the left (the sides 01 and 23 are long sides, and the sides 03 and 12 are short sides), similarly, x is sampled according to the corresponding linear equation for the short sides, and y is sampled according to the corresponding linear equation for the long sides. The sampling method only aims at crystal grains with longitudinal length larger than transverse length on the image, aims to reduce sampling omission as much as possible, and can change the sampling algorithm according to the same idea for the crystal grains with transverse length larger than the longitudinal length on the image.
And thirdly, calculating the total number of white points obtained by sampling, and if the total number of white points exceeds a set threshold value, determining that the crystal grain is a twin crystal, otherwise, determining that the crystal grain is not a twin crystal.
The image of the result of the detection is shown in fig. 8, in which the qualified dies are framed with green frames, the damaged dies are framed with red frames, and the twin dies are framed with blue frames.
The foregoing is merely exemplary and illustrative of the present invention and various modifications, additions and substitutions may be made by those skilled in the art to the specific embodiments described without departing from the scope of the present invention as defined in the accompanying claims.

Claims (10)

1. A grain defect detection method based on edge features is characterized by comprising the following steps:
(1) acquiring a grain image to be detected and a template grain image;
(2) preprocessing a grain image to be detected and a template grain image, then carrying out contour detection on the template grain image, calculating size parameters of the template grain, searching all contours of the grain image to be detected, sequentially carrying out preliminary screening on the found contours, comparing the length and width of the contour to be detected with the length and width of the template grain according to the precision grade set by a user, if the length and width of the contour to be detected are within a limited range, preliminarily determining that the contour is a grain, and then carrying out next detection on the contour;
(3) template matching: carrying out template matching on the outline preliminarily determined as the crystal grain in the step (2) and the template crystal grain to obtain the correlation d of the two, wherein the closer d is to 1, the stronger positive correlation is;
(4) setting an edge detection frame to detect defects: and (4) establishing a large detection frame and a small detection frame for the crystal grain identified in the step (3), wherein the small detection frame is arranged in the crystal grain, the total number of black spots in the detection frame is calculated, if the total number exceeds a set threshold value, the crystal grain is considered to be damaged, the large detection frame is arranged outside the crystal grain, the total number of white spots on four sides of the detection frame is calculated, and if the total number exceeds the set threshold value, the crystal grain is considered to be twin.
2. The method of claim 1, wherein the grain defect detection method based on edge feature comprises: in the step (1), an industrial camera with a resolution of 3072 × 2048 is used for shooting, and a die image to be detected and a template die image are obtained.
3. The method of claim 1, wherein the grain defect detection method based on edge feature comprises: in the step (2), the preprocessing method specifically includes performing median filtering on the image to be detected and the template grain image respectively, then performing binarization threshold segmentation processing, and then performing morphological operation of corrosion first and expansion second.
4. The method of claim 1, wherein the grain defect detection method based on edge feature comprises: in the step (2), the size parameters include a grain width W/pixel, a grain length H/pixel, a transverse gap space X/pixel, a longitudinal gap space Y/pixel, and the grain width W/μm, the grain length H/μm, the transverse gap sX/μm, the longitudinal gap sY/μm, and the pixel equivalent factor/μm/pixel which are automatically set by a user according to standard grain size, arrangement gap actually required, and actual imaging system parameters are calculated to obtain the grain width W/pixel, the grain length H/pixel, the transverse gap space X/pixel, and the longitudinal gap space Y/pixel corresponding to the template grain image, and the calculation formula is shown as follows,
W=w/factor,
H=h/factor,
spaceX=sX/factor,
spaceY=sY/factor。
5. the method of claim 1, wherein the grain defect detection method based on edge feature comprises: in the step (3), the template matching uses a gray histogram comparison to obtain the correlation between the outline primarily determined as the crystal grain and the template crystal grain.
6. The method of claim 5, wherein the grain defect detection method based on edge feature comprises: the abscissa of the gray level histogram represents the gray level, the ordinate represents the number of pixels appearing corresponding to a certain gray level in the image or the frequency of the gray level, the gray level histograms H1 and H2 of the crystal grain to be detected and the template crystal grain are obtained, the correlation comparison formula is as follows,
Figure FDA0003688077090000021
the more positive the correlation between H1 and H2 is, the closer the correlation coefficient is to 1, and if the calculated value d is not less than the set correlation threshold value t, the next determination is performed.
7. The method of claim 1, wherein the grain defect detection method based on edge feature comprises: in the step (4), the construction method of the large detection frame and the small detection frame is as follows, and four vertex coordinates of the small detection frame can be obtained according to the inclination angle of the crystal grain, the coordinate of the central point and the set minimum length and width; and obtaining coordinates of four top points of the large detection frame according to the inclination angle of the crystal grains, the coordinates of the central point and the set maximum length and width.
8. The method of claim 7, wherein the calculation of the vertex coordinates of the inspection box is as follows:
firstly, labeling four vertexes of a crystal grain, wherein the minimum value of a coordinate Y is 0 point, the maximum value of a coordinate X is 1 point, the maximum value of the coordinate Y is 2 points, and the minimum value of the coordinate X is 3 points;
setting the absolute value of the crystal grain inclination angle as alpha deg, setting four vertexes of the detection frame as P4, the minimum coordinate Y value is P4[0] point, the maximum coordinate X value is P4[1] point, the maximum coordinate Y value is P4[2] point, the minimum coordinate X value is P4[3] point, then according to the known central coordinate (X0, Y0), the angle alpha and the minimum length width or maximum length width, the length is H, the width is W, the four vertex coordinates can be calculated by the following formula:
when the crystal grains tilt to the right:
P4[0].x=x0+0.5*W*cos(α)-0.5*H*sin(α)
P4[0].y=y0-0.5*H*cos(α)-0.5*W*sin(α)
P4[1].x=x0-0.5*W*cos(α)-0.5*H*sin(α)
P4[1].y=y0-0.5*H*cos(α)+0.5*W*sin(α)
when the crystal grains incline to the left:
P4[0].x=x0-0.5*W*cos(α)+0.5*H*sin(α)
P4[0].y=y0-0.5*H*cos(α)-0.5*W*sin(α)
P4[1].x=x0-0.5*W*cos(α)-0.5*H*sin(α)
P4[1].y=y0+0.5*H*cos(α)+0.5*W*sin(α)
from symmetry, the coordinates of the P4[2] and P4[3] points can be obtained by the following equations:
P4[2].x=2*x0-P4[0].x
P4[2].y=2*y0-P4[0].y
P4[3].x=2*x0-P4[1].x
P4[3].y=2*y0-P4[1].y。
9. the method of claim 1, wherein in the step (4), the method of detecting the die breakage comprises the following steps:
finding the minimum external positive rectangle of the small detection frame, and detecting the total number of internal black points;
calculating a four-side linear equation according to four vertexes of the small detection frame, judging whether the detected black points are in the small detection frame or not, and calculating the total number of the black points in the small detection frame;
and thirdly, if the total number of the black points exceeds a set threshold value, the crystal grain is considered to be damaged, otherwise, the crystal grain is considered to be not damaged.
10. The method as claimed in claim 1, wherein the step (4) of checking whether the die is a twin die comprises the following steps:
calculating a four-side linear equation of the large detection frame according to four vertexes of the large detection frame;
secondly, when the crystal grains incline rightwards, the span of the short side direction is larger than that of the y direction, and x is sampled according to a corresponding linear equation; the y-direction span of the long side is larger than the x-direction, and y is sampled according to a corresponding linear equation; when the crystal grains incline to the left, sampling x for the short side according to a corresponding linear equation, and sampling y for the long side according to a corresponding linear equation; the sampling method only aims at the crystal grains with the longitudinal length larger than the transverse length on the image, and the sampling algorithm can be changed according to the same idea for the crystal grains with the transverse length larger than the longitudinal length on the image.
And thirdly, calculating the total number of white points obtained by sampling, and if the total number of white points exceeds a set threshold value, determining that the crystal grain is a twin crystal, otherwise, determining that the crystal grain is not a twin crystal.
CN202210656421.4A 2022-06-10 2022-06-10 Crystal grain defect detection method based on edge characteristics Pending CN114897881A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210656421.4A CN114897881A (en) 2022-06-10 2022-06-10 Crystal grain defect detection method based on edge characteristics

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210656421.4A CN114897881A (en) 2022-06-10 2022-06-10 Crystal grain defect detection method based on edge characteristics

Publications (1)

Publication Number Publication Date
CN114897881A true CN114897881A (en) 2022-08-12

Family

ID=82727686

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210656421.4A Pending CN114897881A (en) 2022-06-10 2022-06-10 Crystal grain defect detection method based on edge characteristics

Country Status (1)

Country Link
CN (1) CN114897881A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115661148A (en) * 2022-12-26 2023-01-31 视睿(杭州)信息科技有限公司 Wafer crystal grain arrangement detection method and system
CN116128873A (en) * 2023-04-04 2023-05-16 山东金帝精密机械科技股份有限公司 Bearing retainer detection method, device and medium based on image recognition

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115661148A (en) * 2022-12-26 2023-01-31 视睿(杭州)信息科技有限公司 Wafer crystal grain arrangement detection method and system
CN116128873A (en) * 2023-04-04 2023-05-16 山东金帝精密机械科技股份有限公司 Bearing retainer detection method, device and medium based on image recognition

Similar Documents

Publication Publication Date Title
CN108898610B (en) Object contour extraction method based on mask-RCNN
CN116721106B (en) Profile flaw visual detection method based on image processing
CN111179243A (en) Small-size chip crack detection method and system based on computer vision
CN114897881A (en) Crystal grain defect detection method based on edge characteristics
CN115239704B (en) Accurate detection and repair method for wood surface defects
CN111612781A (en) Screen defect detection method and device and head-mounted display equipment
CN107490582B (en) Assembly line workpiece detection system
CN115222733A (en) Metal component surface defect detection method based on image recognition
CN106780526A (en) A kind of ferrite wafer alligatoring recognition methods
CN113077437B (en) Workpiece quality detection method and system
CN116823822B (en) Ship sheet metal part welding defect detection method based on visual characteristics
CN110738106A (en) optical remote sensing image ship detection method based on FPGA
CN114910480A (en) Wafer surface defect detection method based on machine vision
CN112164050A (en) Method, device and storage medium for detecting surface defects of products on production line
CN115205223A (en) Visual detection method and device for transparent object, computer equipment and medium
CN115131359A (en) Method for detecting pitting defects on surface of metal workpiece
CN110060239B (en) Defect detection method for bottle opening of bottle
WO2022222467A1 (en) Open circular ring workpiece appearance defect detection method and system, and computer storage medium
CN111833350A (en) Machine vision detection method and system
CN113129260A (en) Automatic detection method and device for internal defects of lithium battery cell
CN112184619A (en) Metal part surface defect detection method based on deep learning
JP2002243655A (en) Method and equipment for visual inspection of electronic component
CN114187269A (en) Method for rapidly detecting surface defect edge of small-sized device
JPH03175343A (en) Method for extracting flaw by inspection appearance
CN114937003A (en) Multi-type defect detection system and method for glass panel

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