Irregular cross scratch contour segmentation algorithm

Through the irregular cross scratch contour segmentation algorithm, the problem that deep learning technology cannot accurately calculate the number of scratches is solved, and the precise segmentation of irregular cross scratches is achieved, which is suitable for equipment with accurate requirements for scratches.

CN120525909AInactive Publication Date: 2025-08-22FABOS (NINGBO) SEMICON EQUIP CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510960793.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-12
Publication Date
2025-08-22
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Existing deep learning technologies cannot accurately calculate the number of scratches in the outline of irregular cross scratches, and cannot meet the exact counting requirements for scratches.

Method used

An irregular cross scratch contour segmentation algorithm is used to divide the independent scratch contours by setting input data, contour processing, calculating midpoints, using DBSCAN clustering algorithm, filtering denoising points, calculating slopes and classifying midline points.

Benefits of technology

It realizes accurate segmentation of irregular cross scratches, solves the problem that deep learning technology cannot divide cross scratches, and is suitable for equipment with precise requirements for the number of scratches.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120525909A_ABST
    Figure CN120525909A_ABST
Patent Text Reader

Abstract

The invention relates to an irregular cross scratch contour segmentation algorithm, which comprises the following steps of S1, setting input data {p1, p2, p3,..., pn}; s2, contour processing: S21, drawing contour points on an all-black grey-scale image with the same size as the original image, and filling white in the middle of the contour; s22, calculating midpoints of two sides of the contour; s23, using a machine to cluster midline points by using a DBSCAN clustering algorithm so as to obtain midlines segmented at the cross points; s24, discrete noisy points are removed through data filtering; s25, cyclically traversing the center line point array, and calculating the slope of each center line; s26, carrying out center line classification; s27, according to the contour points to which the midline points belong, the contour points are sorted according to the types of the midline points, and a complete contour belonging to one scratch is obtained; s3, outputting a result; according to the method, the number of the connected and crossed scratches in the irregular contour can be accurately segmented, so that the problem that the crossed scratches cannot be segmented by a deep learning technology is solved, and the method is suitable for equipment with the requirement for controlling the number of the scratches.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of machine vision detection, and in particular to an irregular cross scratch contour segmentation algorithm. Background Art

[0002] In most of the current surface defect detection equipment, taking wafer surface scratch detection as an example, the mainstream technology used is image segmentation in deep learning. It can accurately identify scratches on the wafer surface, but the segmentation result is a continuous irregular contour based on the scratch. Although it meets the requirements of scratch detection, if there is a requirement for the number of scratches in the site card control, then under deep learning, the number of multiple connected cross scratches will be summarized as 1. Obviously, the number of cross scratches is not 1. At this time, it is necessary to segment the contours of these scratches and accurately calculate the number of scratches. However, the current level of deep learning technology is powerless for contours with multiple cross scratches, and cannot accurately calculate the number of scratches in irregular contours, which urgently needs to be solved. Summary of the Invention

[0003] In view of the current status of the above-mentioned existing technologies, the technical problem to be solved by the present invention is to provide an irregular cross scratch contour segmentation algorithm that can accurately segment the number of connected and crossed scratches in the irregular contour, thereby solving the problem that deep learning technology cannot segment crossed scratches, and is suitable for equipment that has control requirements on the number of scratches.

[0004] The technical solution adopted by the present invention to solve the above technical problems is: an irregular cross scratch contour segmentation algorithm, characterized by comprising the following steps: S1. Set input data: The input data is an array of points that intersect the contours {p1, p2, p3, ..., pn}, where p is the coordinate of a point on the contour. S2. Contour processing: S21, draw the contour points on a completely black grayscale image of the same size as the original image, and fill the center of the contour with white; S22. Calculate the midpoints of both sides of the contour: S23: Use a machine to cluster the midline points using the DBSCAN clustering algorithm, and then obtain the midline split at the intersection; S24: Use data filtering to remove discrete noise; S25: Loop through the midline point array and calculate the slope of each midline; S26: Midline classification: S27: Arrange the contour points according to the categories of the midline points according to the contour points to which the midline points belong, and obtain a complete contour belonging to a scratch; S3. Output results: The original contour is split into multiple contours, each of which is a non-intersecting scratch, and the original input data {p1,p2,p3,...,pn} is split into {{p1_1,p1_2,p1_3,...,p1_n},{p2_1,p2_2,p2_3,...,p2_n},{p3_1,p3_2,p3_3,...,p3_n},...,{pm_1,pm_2,pm_3,...,pm_n}}.

[0005] Preferably, the step S22 includes: S221: Scan the grayscale image horizontally and calculate the midpoints of both sides of the horizontal contour; S222: Scan the grayscale image longitudinally and calculate the midpoints of both sides of the longitudinal contour.

[0006] Preferably, in step S221 or S222, if the x or y coordinates of the two midpoints are the same, the horizontal or vertical distance between the contours of the two points is calculated, the midpoint of the contour with the smaller distance is selected as the point of the contour midline, and the midline is used to replace the original contour.

[0007] Preferably, the step S26 includes: S261: Divide lines with the same slope into one line according to their slope; S262: Determine whether all the midlines that are divided into one line belong to one line based on the distance between the two lines; Preferably, the judgment method in step S262 is: finding the common points of all the midlines, and determining which line these common points should belong to based on the distances from the common points to the midlines to which they belong, thereby achieving a better segmentation effect.

[0008] Compared with the prior art, the advantages of the present invention are: The present invention can accurately segment the number of connected and intersecting scratches in an irregular contour, thereby solving the problem that deep learning technology cannot segment intersecting scratches, and is therefore suitable for equipment that has requirements for controlling the number of scratches. BRIEF DESCRIPTION OF THE DRAWINGS

[0009] Figure 1 Schematic diagram of the processing flow of the present invention; Figure 2 This is a schematic diagram of inputting contour points into a completely black grayscale image according to the present invention; Figure 3 This is a schematic diagram of the center line of the present invention after classification and noise reduction; Figure 4 Schematic diagram of the segmentation result of the present invention. DETAILED DESCRIPTION

[0010] Unless otherwise defined, the technical or scientific terms used in the present invention shall have the usual meanings understood by persons of ordinary skill in the field to which the present invention belongs. The words "first", "second" and similar terms used in the present invention do not indicate any order, quantity or importance, but are only used to distinguish different components. Words such as "include" or "comprise" mean that the elements or objects preceding the word include the elements or objects listed after the word and their equivalents, without excluding other elements or objects. Words such as "connect" or "connected" are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. "Up", "down", "left", "right" and the like are only used to indicate relative positional relationships. When the absolute position of the object being described changes, the relative positional relationship may also change accordingly.

[0011] In order to keep the following description of the embodiments of the present invention clear and concise, detailed descriptions of known functions and known components are omitted.

[0012] like Figure 1 As shown, an irregular cross scratch contour segmentation algorithm includes the following steps: S1. Set input data: The input data is an array containing the intersection contour points, such as {p1,p2,p3,...,pn}, where p is the coordinate of a point on the contour, such as p1:(x1, y1); S2, contour processing, see Figure 2 : S21, draw the contour points on a completely black grayscale image of the same size as the original image, and fill the center of the contour with white; S22. Calculate the midpoints of both sides of the contour: S221: Scan the grayscale image horizontally and calculate the midpoints of both sides of the horizontal contour; S222: Scan the grayscale image longitudinally and calculate the midpoints of both sides of the longitudinal contour; If the x or y coordinates of the two midpoints are the same, the horizontal or vertical distance between the two points is calculated, and the midpoint of the contour with the smaller distance is selected as the point of the contour midline, and the midline is used to replace the original contour, thereby simplifying the amount of calculation data and optimizing the complexity of the algorithm logic; S23: Use a machine to cluster the midline points using the DBSCAN clustering algorithm, and then obtain the midline split at the intersection; S24: Use data filtering to remove discrete noise, see Figure 3 ; S25: Loop through the midline point array and calculate the slope of each midline; S26: Midline classification: S261: Divide lines with the same slope into one line according to their slope; S262: Determine whether all the midlines that are divided into one line belong to one line according to the distance between the two lines; S2621: Find the common points of all midlines, and determine which line these common points belong to based on the distance from the common points to the midline, so as to achieve a better segmentation effect. Figure 4 ; S27: Arrange the contour points according to the categories of the midline points according to the contour points to which the midline points belong, and obtain a complete contour belonging to a scratch; S3. Output results: Split the original contour into multiple contours, each of which is a non-intersecting scratch, and then split the original contour point set {p1,p2,p3,...,pn} into {{p1_1,p1_2,p1_3,...,p1_n},{p2_1,p2_2,p2_3,...,p2_n},{p3_1,p3_2,p3_3,...,p3_n},...,{pm_1,pm_2,pm_3,...,pm_n}}.

[0013] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present invention.

Claims

1. An irregular cross scratch contour segmentation algorithm, characterized in that: The following steps are involved: S1. Set input data: The input data is an array of points that intersect the contours {p1, p2, p3, ..., pn}, where p is the coordinate of a point on the contour. S2. Contour processing: S21, draw the contour points on a completely black grayscale image of the same size as the original image, and fill the center of the contour with white; S22. Calculate the midpoints of both sides of the contour: S23: Use a machine to cluster the midline points using the DBSCAN clustering algorithm, and then obtain the midline split at the intersection; S24: Use data filtering to remove discrete noise; S25: Loop through the midline point array and calculate the slope of each midline; S26: Midline classification: S27: Arrange the contour points according to the categories of the midline points according to the contour points to which the midline points belong, and obtain a complete contour belonging to a scratch; S3. Output results: The original contour is split into multiple contours, each of which is a non-intersecting scratch, and the original input data {p1,p2,p3,...,pn} is split into {{p1_1,p1_2,p1_3,...,p1_n},{p2_1,p2_2,p2_3,...,p2_n},{p3_1,p3_2,p3_3,...,p3_n},...,{pm_1,pm_2,pm_3,...,pm_n}}.

2. The irregular cross scratch contour segmentation algorithm according to claim 1, characterized in that: The step S22 includes: S221: Scan the grayscale image horizontally and calculate the midpoints of both sides of the horizontal contour; S222: Scan the grayscale image longitudinally and calculate the midpoints of both sides of the longitudinal contour.

3. The irregular cross scratch contour segmentation algorithm according to claim 2, characterized in that: In step S221 or S222, if the x or y coordinates of the two midpoints are the same, the horizontal or vertical distance between the contours of the two points is calculated, the midpoint of the contour with the smaller distance is selected as the point of the contour midline, and the midline is used to replace the original contour.

4. The irregular cross scratch contour segmentation algorithm according to claim 1, characterized in that: The step S26 includes: S261: Divide lines with the same slope into one line according to their slope; S262: Determine whether all the midlines that are divided into one line belong to one line based on the distance between the two lines.

5. The irregular cross scratch contour segmentation algorithm according to claim 4, characterized in that: The judgment method in step S262 is as follows: finding the common points of all the midlines, and determining which line these common points belong to based on the distances from the common points to the midlines to which they belong, thereby achieving a better segmentation effect.