The disclosure relates to a method for determining wire regions of a circuit.
Defect detection of a circuit product, for example, a semiconductor circuit, utilizes masks with respect to different components of the circuit product. For example, the masks may include a mask for wires, a mask for input/output holes and a mask for integrated circuits (ICs). A conventional mask for wires disposed on a circuit product reveals all wires on the circuit. That is, the wires on the circuit have to be inspected all at once, and cannot be inspected individually. Therefore, there is a downside in using the conventional mask to inspect wires.
An object of the disclosure is to provide a method for determining individual wire regions of a circuit that includes multiple wires, wherein the wire regions thus determined correspond to the wires respectively. The wire regions determined by the method may be utilized to generate masks respectively for the individual wires, and the masks may be utilized to inspect the wires individually. Using a mask dedicated for an individual wire to inspect the wire may increase precision of defect detection, and may reduce computational complexity. Therefore, the disclosed method alleviates at least one of the drawbacks of the prior art.
According to one aspect of the disclosure, the method includes steps of: obtaining an original image that is a binary image and that contains multiple stick regions having a first pixel value and corresponding respectively to multiple wires of a layout of a circuit; processing the original image to obtain a first processed image that is a binary image and that contains multiple line segments having the first pixel value and being obtained from the stick regions; based on distances and included angles among the line segments, grouping the line segments into multiple groups that correspond respectively to the stick regions in the original image; generating a second processed image based on the first processed image, the second processed image being a binary image and including multiple complete lines that have the first pixel value and that correspond respectively to the groups and respectively to the stick regions in the original image, each of the complete lines being constructed by integrating the line segments of the respective one of the groups into the complete line; generating a third processed image by extending the complete lines in the second processed image based respectively on the stick regions in the original image, the third processed image being a binary image and including multiple extended lines which have the first pixel value, which correspond respectively to the stick regions in the original image, and each of which has a length equal to a length of the corresponding one of the stick regions; and for each of the extended lines in the third processed image, determining a rectangular region in the third processed image that covers the extended line, that has a length equal to the length of the extended line, and that has a width which is determined based on the corresponding one of the stick regions in the original image.
Other features and advantages of the disclosure will become apparent in the following detailed description of the embodiment (s) with reference to the accompanying drawings, of which:
Before the disclosure is described in greater detail, it should be noted that where considered appropriate, reference numerals or terminal portions of reference numerals have been repeated among the figures to indicate corresponding or analogous elements, which may optionally have similar characteristics.
Step 101 is to obtain a binary image (referred to as “original image” hereinafter) that represents a mask for multiple wires of a layout of the circuit. The original image contains multiple stick regions that have a first pixel value and that correspond respectively to the multiple wires. The rest of the original image excluding the stick regions has a second pixel value that is different from the first pixel value. An example original image thus obtained is schematically illustrated in
Step 102 is to process the original image to obtain a first processed image that is also a binary image and that contains multiple line segments. The line segments have the first pixel value, and are obtained from the stick regions. According to an embodiment, Step 102 may include Sub-steps 1021 and 1022 as illustrated in
Referring to
Next, Sub-step 1022 is to perform Hough transform on the simplified image to obtain the line segments, so as to obtain the first processed image. Hough transform is a known feature extraction technique that may detect and extract lines or line segments in an image. According to some embodiments of the disclosure, short line segments that are shorter than a length threshold are considered noises, and are ignored when performing Hough transform. Therefore, the first processed image thus obtained would not contain any line segment that is shorter than the length threshold, and some of the thinned lines may be broken into the line segments. In an embodiment, the length threshold is 5 pixels, but the disclosure is not limited thereto. Ignoring the short line segments may be implemented by manipulating settings of a Hough transform algorithm that is used. An example of the first processed image is schematically illustrated in
Returning to
Referring to
Sub-step 1032 is to compare the included angle with an angle threshold that may be, for example, 10 degrees.
Sub-step 1033 is to determine three distances that are respectively between three points on the first line segment and the line defined by the second line segment. The three distances include a first distance between a first end point of the first line segment and said line, a second distance between a second end point (i.e., the other end point) of the first line segment and said line, and a third distance between a center point of the first line segment and said line.
Sub-step 1034 is to compare each of the first distance, the second distance and the third distance with a distance threshold that may be, for example, 10 pixels.
Sub-step 1035 is to determine that the first line segment and the second line segment belong to a same group when the included angle obtained in Sub-step 1031 is smaller than the angle threshold and any two of the first distance, the second distance and the third distance obtained in Sub-step 1033 are smaller than the distance threshold.
It should be noted that Sub-steps 1031 and 1032 need not be performed before Sub-steps 1033 and 1034 as illustrated in
Returning to
According to some embodiments of the disclosure, Step 104 may include four sub-steps (i.e., first to fourth sub-steps) that are to be performed with respect to each different pair of the line segments that are determined to be of the same group and that include a first segment and a second segment. The first sub-step is to, for each of the first and second segments in the pair, find or locate two opposite end points of the line segment (referred to as “first end point” and “second end point” hereinafter). The second sub-step is to calculate six distances related to the first and second segments. The six distances include a distance between the first and second end points of the first segment, a distance between the first end point of the first segment and the first end point of the second segment, a distance between the first end point of the first segment and the second end point of the second segment, a distance between the second end point of the first segment and the first end point of the second segment, a distance between the second end point of the first segment and the second end point of the second segment, and a distance between the first and second end points of the second segment. The third sub-step is to determine a greatest one of the six distances and two of the first end points and the second end points that correspond to the greatest one of the six distances. The fourth sub-steps is to integrate the first and second segments based on the two of the first end points and the second end points that are determined in the third sub-step.
Step 105 is to generate a third processed image by extending the complete lines in the second processed image based respectively on the stick regions in the original image. It should be understood that the third processed image is also a binary image. The third processed image includes multiple extended lines that correspond respectively to the complete lines and also respectively to the stick regions in the original image, and that each have a length equal to a length of the corresponding one of the stick regions. The extended lines in the third processed image have the first pixel value, and the rest of the third processed image has the second pixel value. According to an embodiment, Step 105 may include Sub-steps 1051 to 1054, as illustrated in
Referring to
Sub-step 1052 is to find or locate two opposite end points of the complete line that is mapped on the original image.
Sub-step 1053 includes three Sub-steps 10531 to 10533 that are to be performed with respect to each of the two opposite endpoints of the complete line. First, Sub-step 10531 is to find a pixel (referred to as “boundary pixel” hereinafter) on the original image that is located on an extension line which extends the complete line from the end point. The boundary pixel is a nearest pixel with respect to the end point that has the second pixel value.
Next, Sub-step 10532 is to find an end pixel on the original image that is located on the extension line and is a nearest pixel with respect to the boundary pixel that has the first pixel value.
At last, Sub-step 10533 is to determine a position (e.g., a set of pixel coordinates) of the end pixel (referred to as “pixel position” hereinafter).
Sub-step 1054 following Sub-step 1053 is to extend the complete line in the second processed image to the two pixel positions that are determined in Sub-step 1053 respectively for the two opposite end points of the complete line, so as to obtain the corresponding one of the extended lines to be included in the third processed image.
Returning to
According to an embodiment, a first implementation of Step 106 may include Sub-steps 1061 to 1064, as illustrated in
Referring to
Sub-step 1062 is to, for each of multiple pixels (referred to as “line pixel” hereinafter) on the extended line that is mapped on the original image, determine a distance between the line pixel and one pixel on the original image that is located on a normal line passing through the line pixel and being perpendicular to the extended line (referred to as “normal-line pixel” hereinafter), wherein the normal-line pixel is a nearest pixel with respect to the line pixel that has the second pixel value. As such, multiple distances respectively for the multiple line pixels are determined. In an embodiment, said line pixels include all pixels on the extended line, but the disclosure is not limited thereto.
Sub-step 1063 is to calculate an average distance of the multiple distances determined in Sub-step 1062.
At last, Sub-step 1064 is to determine the rectangular region for the extended line of the third processed image by widening the extended line in both directions perpendicular to the extended line by the average distance calculated in Sub-step 1063. In this way, the rectangular region determined for the extended line has a length equal to the length of the extended line and a width equal to twice the average distance, and is centered on the extended line.
Referring to
Sub-step 1062′ is to determine a first distance and a second distance for each of the multiple line pixels on the extended line that is mapped on the original image. The first distance is between the line pixel and a first pixel on the original image that is located on a first normal line passing through the line pixel and extending from the line pixel in a first direction perpendicular to the extended line. The first pixel is a nearest pixel with respect to the line pixel that is on the first normal line and that has the second pixel value. The second distance is between the line pixel and a second pixel on the original image that is located on a second normal line passing through the line pixel and extending from the line pixel in a second direction opposite to the first direction. The second pixel is a nearest pixel with respect to the line pixel that is on the second normal line and that has the second pixel value. As such, multiple first distances respectively for the multiple line pixels and multiple second distances respectively for the multiple line pixels are determined.
Sub-step 1063′ is to calculate a first average distance of the multiple first distances determined in Sub-step 1062′, and a second average distance of the multiple second distances determined in Sub-step 1062′.
Sub-step 1064′ is to determine the rectangular region for the extended line of the third processed image by widening the extended line in the first direction by the first average distance and in the second direction by the second average distance. In this way, the rectangular region determined for the extended line has a length equal to the length of the extended line and a width equal to the first average distance plus the second average distance, and has an orientation the same as the orientation of the extended line.
Referring to
Sub-step 1065 that follows Sub-step 1061 in the third implementation is to gradually widen the extended line into a bar on the original image until the bar completely covers the stick region that corresponds to the extended line. According to some embodiments of the disclosure, the extended line may be gradually widened by one pixel or two pixels, but the disclosure is not limited thereto. According to some embodiments of the disclosure, in Sub-step 1065, whether the bar completely covers the stick region may be determined by determining whether a ratio of a number of pixels in the bar that have the first pixel value to a total number of the pixels in the bar is smaller than a predetermined percentage that is less than 100%. In an embodiment, the predetermined percentage is 95%, but the disclosure is not limited thereto.
At last, Sub-step 1066 is to make the region defined by the bar that completely covers the stick region the rectangular region for the extended line.
It should be noted that modifications may be made to the method 100 illustrated in
As shown in
Second additional Step 108 is to, for each of the wires of the layout of the circuit, generate a mask based on the rectangular region that is determined (in Step 106) for the extended line that corresponds to the stick region which corresponds to the wire. The mask thus generated for the wire may be used for inspection, e.g., defect detection, of the wire. Using the mask dedicated for the individual wire may increase efficiency of the inspection, and reduce possibility of overlooking defections.
It should be noted that it is not necessary for the two additional Steps 107 and 108 to coexist when implementing the present disclosure. According to some embodiments, one of Step 107 and Step 108 may be omitted from the method 1300.
In the description above, for the purposes of explanation, numerous specific details have been set forth in order to provide a thorough understanding of the embodiment(s). It will be apparent, however, to one skilled in the art, that one or more other embodiments may be practiced without some of these specific details. It should also be appreciated that reference throughout this specification to “one embodiment,” “an embodiment,” an embodiment with an indication of an ordinal number and so forth means that a particular feature, structure, or characteristic may be included in the practice of the disclosure. It should be further appreciated that in the description, various features are sometimes grouped together in a single embodiment, figure, or description thereof for the purpose of streamlining the disclosure and aiding in the understanding of various inventive aspects, and that one or more features or specific details from one embodiment may be practiced together with one or more features or specific details from another embodiment, where appropriate, in the practice of the disclosure.
While the disclosure has been described in connection with what is (are) considered the exemplary embodiment(s), it is understood that this disclosure is not limited to the disclosed embodiment(s) but is intended to cover various arrangements included within the spirit and scope of the broadest interpretation so as to encompass all such modifications and equivalent arrangements.