[go: up one dir, main page]

TWI874236B - Classification method of defects in picture - Google Patents

Classification method of defects in picture Download PDF

Info

Publication number
TWI874236B
TWI874236B TW113120647A TW113120647A TWI874236B TW I874236 B TWI874236 B TW I874236B TW 113120647 A TW113120647 A TW 113120647A TW 113120647 A TW113120647 A TW 113120647A TW I874236 B TWI874236 B TW I874236B
Authority
TW
Taiwan
Prior art keywords
image
defect
detection
normal image
normal
Prior art date
Application number
TW113120647A
Other languages
Chinese (zh)
Other versions
TW202548682A (en
Inventor
陳柏龍
樂慶莉
包寶茹
Original Assignee
力晶積成電子製造股份有限公司
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 力晶積成電子製造股份有限公司 filed Critical 力晶積成電子製造股份有限公司
Priority to TW113120647A priority Critical patent/TWI874236B/en
Priority to CN202410789199.4A priority patent/CN121073862A/en
Application granted granted Critical
Publication of TWI874236B publication Critical patent/TWI874236B/en
Publication of TW202548682A publication Critical patent/TW202548682A/en

Links

Images

Landscapes

  • Image Analysis (AREA)
  • Investigating Materials By The Use Of Optical Means Adapted For Particular Applications (AREA)

Abstract

A classification method of defects in picture including the following steps is provided. Performing image alignment on an inspection image and a normal image, then subtracting the inspection image and the normal image, and take an absolute value of a brightness difference to obtain a difference image. Performing a high-sensitivity detection on the difference image to confirm whether there are defects in the inspection image. If the defects are detected in the high-sensitivity detection, the inspection image is inspected using a first classification method. If the defects are a first type or there is no classification result, an image line-width detection is performed on the normal image. If a line width of the normal image is larger than a first preset pixel size, a low-sensitivity detection is performed on the difference image to confirm whether there are the defects in the inspection image. If the line width of the normal image is less than or equal to the first preset pixel size and the defects have no classification result, the inspection image is inspected by a second classification method.

Description

圖片中缺陷的分類方法Classification of defects in images

本發明是有關於一種分類方法,且特別是有關於一種圖片中缺陷的分類方法。The present invention relates to a classification method, and in particular to a classification method for defects in an image.

晶片製作的過程中,利用光蝕刻技術,藉由光罩將光罩上的圖案複製到半導體晶圓上。因此,光罩的品質影響了晶片製作的良率。為了找出可能導致影響產品的缺陷,一般是將光罩先投入光罩圖形檢驗機檢驗。During the chip manufacturing process, photolithography technology is used to copy the pattern on the mask onto the semiconductor wafer. Therefore, the quality of the mask affects the yield of chip manufacturing. In order to find defects that may affect the product, the mask is generally first put into the mask pattern inspection machine for inspection.

然而,現有圖形檢驗機的檢驗結果大半為誤警報(也就是實際上並不是缺陷)且無法對缺陷進行分類,因此需人工二次篩選掉誤警報的結果,並且逐顆分類缺陷。再者,直接使用CNN/YOLO等機器學習手法有可能遺漏高風險缺陷,並且在簡單的缺陷型態上會偶爾分類錯誤。However, most of the inspection results of existing image inspection machines are false alarms (that is, they are not actually defects) and cannot classify defects. Therefore, manual secondary screening is required to eliminate false alarm results and classify defects one by one. Furthermore, directly using machine learning methods such as CNN/YOLO may miss high-risk defects and occasionally misclassify simple defect types.

本發明提供一種圖片中缺陷的分類方法,其能對具有缺陷的檢測圖進行自動分類。The present invention provides a method for classifying defects in images, which can automatically classify inspection images with defects.

本發明的一實施例提供一種圖片中缺陷的分類方法,其包括以下步驟。對檢測圖與正常圖進行影像對準,再將檢測圖與正常圖相減並取亮度差異絕對值,以取得差異圖。對差異圖進行高敏感度偵測,以確認檢測圖是否存在缺陷。在高敏感度偵測中偵測到缺陷時,對檢測圖進行第一分類方法檢測。在缺陷為第一型態或無分類結果時,對正常圖進行圖片線寬偵測。在正常圖的線寬大於第一預設像素大小時,對差異圖進行低敏感度偵測,以確認檢測圖是否存在缺陷。在正常圖的線寬小於等於第一預設像素大小且缺陷為無分類結果時,對檢測圖進行第二分類方法檢測。An embodiment of the present invention provides a method for classifying defects in an image, which includes the following steps. Perform image alignment on a test image and a normal image, then subtract the test image from the normal image and take the absolute value of the brightness difference to obtain a difference image. Perform high-sensitivity detection on the difference image to confirm whether there is a defect in the test image. When a defect is detected in the high-sensitivity detection, perform a first classification method detection on the test image. When the defect is of the first type or there is no classification result, perform image line width detection on the normal image. When the line width of the normal image is greater than a first preset pixel size, perform low-sensitivity detection on the difference image to confirm whether there is a defect in the test image. When the line width of the normal image is less than or equal to the first preset pixel size and the defect is a non-classified result, perform a second classification method detection on the test image.

基於上述,在本發明的一實施例的圖片中缺陷的分類方法中,藉由高敏感度偵測或低敏感度偵測,確認檢測圖是否存在缺陷,再對檢測圖進行第一分類方法檢測或第二分類方法檢測。而且,分類方法進一步進行圖片線寬偵測,以決定要進行那一種分類方法檢測。因此,本發明實施例的分類方法透過影像處理結合機器學習手法,設計第一及第二分類方法,對圖片中的缺陷進行自動分類。除了具有高準確率、低風險、可隨圖片線寬調整偵測敏感度等優點之外,還可減少人力負擔,提升分類一致性。Based on the above, in a method for classifying defects in an image of an embodiment of the present invention, high sensitivity detection or low sensitivity detection is used to confirm whether a defect exists in the test image, and then the test image is subjected to the first classification method detection or the second classification method detection. Moreover, the classification method further performs image line width detection to determine which classification method detection to perform. Therefore, the classification method of the embodiment of the present invention uses image processing combined with machine learning techniques to design the first and second classification methods to automatically classify defects in the image. In addition to having the advantages of high accuracy, low risk, and the ability to adjust the detection sensitivity according to the image line width, it can also reduce the burden of manpower and improve classification consistency.

圖1A至圖1C分別是缺陷為第一型態第一類至第一型態第三類的示意圖。圖2A至圖2C分別是缺陷為第二型態第一類至第二型態第三類的示意圖。圖3A至圖3B分別是缺陷為第三型態第一類至第三型態第二類的示意圖。請先參考圖1A至圖3B,本發明的一實施例提供一種圖片中缺陷的分類方法。圖片例如是光罩上圖案的影像。但本發明不侷限於此,本發明實施例的圖片中缺陷的分類方法也可應用於其他圖片,例如電路圖案。FIG. 1A to FIG. 1C are schematic diagrams of defects of the first type and the first category to the third category of the first type, respectively. FIG. 2A to FIG. 2C are schematic diagrams of defects of the second type and the first category to the third category of the second type, respectively. FIG. 3A to FIG. 3B are schematic diagrams of defects of the third type and the first category to the second category of the third type, respectively. Please refer to FIG. 1A to FIG. 3B first. An embodiment of the present invention provides a method for classifying defects in a picture. The picture is, for example, an image of a pattern on a mask. However, the present invention is not limited thereto, and the method for classifying defects in a picture of the embodiment of the present invention can also be applied to other pictures, such as circuit patterns.

以光罩圖案為例,白區為透光區,其材質通常為石英(Qz)。黑區為不透光區,其材質通常為鉻(Cr)。其中,缺陷大致可歸類為三種型態。第一型態的缺陷位於圖片中黑區和白區的交界處。例如,圖1A示意缺陷1A為黑色凸起,圖1B示意缺陷1B為白色凸起,且圖1C示意缺陷1C為黑區與白區之間的不平整交界(即毛邊)。第二型態的缺陷位於白區或黑區內。例如,圖2A示意缺陷2A為白區內的黑點,圖2B示意缺陷2B為黑區內的白點,且圖2C示意缺陷2C為黑區內的黑點。第三型態的缺陷為其他型態的缺陷。例如,圖3A示意缺陷3A將兩側黑區連接,且圖3B示意缺陷3B可為黑色輔助線斷裂。Taking the mask pattern as an example, the white area is a light-transmitting area, and its material is usually quartz (Qz). The black area is an opaque area, and its material is usually chromium (Cr). Among them, defects can be roughly classified into three types. The first type of defect is located at the junction of the black area and the white area in the picture. For example, Figure 1A shows that defect 1A is a black protrusion, Figure 1B shows that defect 1B is a white protrusion, and Figure 1C shows that defect 1C is an uneven junction between the black area and the white area (i.e., burrs). The second type of defect is located in the white area or the black area. For example, Figure 2A shows that defect 2A is a black dot in the white area, Figure 2B shows that defect 2B is a white dot in the black area, and Figure 2C shows that defect 2C is a black dot in the black area. The third type of defect is other types of defects. For example, FIG. 3A shows that defect 3A connects two black areas, and FIG. 3B shows that defect 3B may be a break in the black auxiliary line.

圖4是根據本發明的一實施例的圖片中缺陷案的分類方法的流程圖。請參考圖4,在本實施例中,圖片中缺陷的分類方法包括以下步驟。步驟S100,對檢測圖與正常圖進行影像對準,再將檢測圖與正常圖相減並取亮度差異絕對值,以取得差異圖。步驟S200,對差異圖進行高敏感度偵測,以確認檢測圖是否存在缺陷。步驟S300,在高敏感度偵測中偵測到缺陷時,對檢測圖進行第一分類方法檢測。步驟S400,在缺陷為第一型態或無分類結果時,對正常圖進行圖片線寬偵測。步驟S500,在正常圖的線寬大於第一預設像素大小時,對差異圖進行低敏感度偵測,以確認檢測圖是否存在缺陷。步驟S600,在正常圖的線寬小於等於第一預設像素大小且缺陷為無分類結果時,對檢測圖進行第二分類方法檢測。其中,第一預設像素大小例如是設定為10個像素大小,但本發明不侷限於此。FIG4 is a flow chart of a method for classifying defects in an image according to an embodiment of the present invention. Referring to FIG4 , in this embodiment, the method for classifying defects in an image includes the following steps. Step S100, aligning the test image and the normal image, subtracting the test image from the normal image and taking the absolute value of the brightness difference to obtain a difference image. Step S200, performing high-sensitivity detection on the difference image to confirm whether there is a defect in the test image. Step S300, when a defect is detected in the high-sensitivity detection, performing the first classification method detection on the test image. Step S400, when the defect is of the first type or there is no classification result, performing image line width detection on the normal image. In step S500, when the line width of the normal image is greater than the first preset pixel size, a low-sensitivity detection is performed on the difference image to confirm whether the test image has a defect. In step S600, when the line width of the normal image is less than or equal to the first preset pixel size and the defect is a non-classified result, a second classification method detection is performed on the test image. The first preset pixel size is, for example, set to 10 pixels, but the present invention is not limited thereto.

在本實施例中,上述步驟S200中的高敏感度偵測為對差異圖進行每2像素×2像素掃描,並偵測滿足亮度差異絕對值大於等於第一閥值的位置。其中,圖片例如是以0至255灰階的方式被儲存。第一閥值可設定為20,但本發明不侷限於此。而且,前述的亮度差異絕對值大於等於第一閥值的條件可設定為每個像素都需滿足或像素的平均值需滿足。In this embodiment, the high sensitivity detection in the above step S200 is to scan the difference map every 2 pixels × 2 pixels, and detect the position where the absolute value of the brightness difference is greater than or equal to the first threshold value. The image is stored in a grayscale of 0 to 255, for example. The first threshold value can be set to 20, but the present invention is not limited thereto. Moreover, the condition that the absolute value of the brightness difference is greater than or equal to the first threshold value can be set to be satisfied by each pixel or the average value of the pixels.

圖5是根據本發明的一實施例的圖片中缺陷案的分類方法中的第一分類方法的流程圖。圖6是利用本發明的一實施例的圖片中缺陷案的分類方法中的第一分類方法將缺陷分類為第二形態第一類的示意圖。請參考圖5與圖6,在本實施例中,上述步驟S300包括以下步驟。步驟S310,依缺陷的位置P對檢測圖IP與正常圖NP進行裁剪。其中,前述對檢測圖IP與正常圖NP進行裁剪例如是以包圍缺陷的位置P為中心的最小正方形,再向外延伸兩個像素大小的正方形範圍。步驟S320至S330,在裁剪後的檢測圖IP’與裁剪後的正常圖NP’在圖片邊緣的亮度差異絕對值小於第一閥值,且在缺陷的位置P對應於正常圖的位置的亮度大於第二閥值時,判斷該缺陷在該位置P處為第二型態第一類2A,如圖2A或圖6所示。其中,第二閥值可設定為180,但本發明不侷限於此。FIG5 is a flow chart of a first classification method in a method for classifying defects in a picture according to an embodiment of the present invention. FIG6 is a schematic diagram of classifying defects into a first category of a second form using the first classification method in a method for classifying defects in a picture according to an embodiment of the present invention. Please refer to FIG5 and FIG6. In this embodiment, the above-mentioned step S300 includes the following steps. Step S310, cropping the detection image IP and the normal image NP according to the position P of the defect. The above-mentioned cropping of the detection image IP and the normal image NP is, for example, a minimum square centered at the position P of the defect, and then extending outward to a square range of two pixels in size. In steps S320 to S330, when the absolute value of the brightness difference between the cropped detection image IP' and the cropped normal image NP' at the edge of the image is less than the first threshold value, and the brightness of the position P of the defect corresponding to the position of the normal image is greater than the second threshold value, it is determined that the defect at the position P is the second type first category 2A, as shown in FIG2A or FIG6. The second threshold value can be set to 180, but the present invention is not limited thereto.

在本實施例中,上述步驟S300更包括以下步驟。步驟S320至S332,在裁剪後的檢測圖與裁剪後的正常圖在圖片邊緣的亮度差異絕對值小於第一閥值,在該缺陷的該位置對應於正常圖的位置的亮度小於等於第二閥值,且裁剪後的正常圖的平均亮度小於等於裁剪後的檢測圖的平均亮度,判斷該缺陷在該位置處為第二型態第二類2B,如圖2B所示。此外,在裁剪後的檢測圖與裁剪後的正常圖在圖片邊緣的亮度差異絕對值小於第一閥值,在該缺陷的該位置對應於正常圖的位置的亮度小於等於第二閥值,且裁剪後的正常圖的平均亮度大於裁剪後的檢測圖的平均亮度,判斷該缺陷在該位置處為第二型態第三類2C,如圖2C所示。In this embodiment, the above step S300 further includes the following steps. Steps S320 to S332: when the absolute value of the brightness difference between the cropped test image and the cropped normal image at the edge of the image is less than the first threshold value, the brightness of the position of the defect corresponding to the position of the normal image is less than or equal to the second threshold value, and the average brightness of the cropped normal image is less than or equal to the average brightness of the cropped test image, it is determined that the defect at the position is the second type, the second category 2B, as shown in FIG2B. In addition, the absolute value of the brightness difference between the cropped test image and the cropped normal image at the edge of the image is less than the first threshold value, the brightness of the position of the defect corresponding to the position of the normal image is less than or equal to the second threshold value, and the average brightness of the cropped normal image is greater than the average brightness of the cropped test image, and the defect is judged to be the second type third category 2C at this position, as shown in Figure 2C.

圖7是利用本發明的一實施例的圖片中缺陷案的分類方法中的第一分類方法將缺陷分類為第一形態第一類的示意圖。請參考圖5與圖7,在本實施例中,上述步驟S300更包括以下步驟。步驟S320至S350,在裁剪後的檢測圖IP1’或裁剪後的正常圖NP1’在圖片邊緣的亮度差異絕對值大於等於第一閥值,且缺陷的數量小於10時,將裁剪後的正常圖NP1’進行影像分割,以將裁剪後的正常圖NP1’分割為黑區BR與白區WR。步驟S360至S382,在黑區BR與白區WR之間的亮度差異絕對值大於第三閥值,黑區BR與白區WR為水平或垂直分割,黑區BR與白區WR的數量和為2,且裁剪後的正常圖NP1的平均亮度大於等於裁剪後的檢測圖IP1的平均亮度時,判斷該缺陷在該位置P1處為第一型態第一類1A,如圖1A或圖7所示。其中,上述步驟S350中進行影像分割的方法可為利用機器學習的方法來進行影像分割,例如利用k-平均演算法(k-means clustering)。第三閥值可設定為50,但本發明不侷限於此。而且,當檢測圖IP被檢測出缺陷的數量大於等於10時,極有可能是因為偵測的敏感度過高或是圖片的影像品質不佳,導致系統誤警報。因此,步驟S340中將缺陷的數量限制小於10,且缺陷的數量大於等於10時,暫時判斷為無分類結果。接著,可調整偵測敏感度(即步驟S500),或是改由人工判讀(即圖11中的步驟S640)。FIG7 is a schematic diagram of classifying defects into the first type and the first form using the first classification method in the method for classifying defects in an image of an embodiment of the present invention. Please refer to FIG5 and FIG7. In this embodiment, the above step S300 further includes the following steps. In steps S320 to S350, when the absolute value of the brightness difference at the edge of the cropped detection image IP1' or the cropped normal image NP1' is greater than or equal to the first threshold value, and the number of defects is less than 10, the cropped normal image NP1' is image segmented to segment the cropped normal image NP1' into a black area BR and a white area WR. In steps S360 to S382, when the absolute value of the brightness difference between the black area BR and the white area WR is greater than the third threshold value, the black area BR and the white area WR are horizontally or vertically segmented, the sum of the number of black areas BR and white areas WR is 2, and the average brightness of the cropped normal image NP1 is greater than or equal to the average brightness of the cropped test image IP1, it is determined that the defect at the position P1 is the first type and the first category 1A, as shown in FIG. 1A or FIG. 7. The method for performing image segmentation in the above step S350 can be to perform image segmentation using a machine learning method, such as using a k-means clustering algorithm. The third threshold value can be set to 50, but the present invention is not limited thereto. Moreover, when the number of defects detected in the test image IP is greater than or equal to 10, it is very likely that the system has a false alarm due to the high sensitivity of the detection or the poor image quality. Therefore, in step S340, the number of defects is limited to less than 10, and when the number of defects is greater than or equal to 10, it is temporarily judged as no classification result. Then, the detection sensitivity can be adjusted (i.e., step S500), or manual interpretation can be performed (i.e., step S640 in Figure 11).

此外,步驟S360至S382,在黑區與白區之間的亮度差異絕對值大於第三閥值,黑區與白區為水平或垂直分割,黑區與白區的數量和為2,且裁剪後的正常圖的平均亮度小於裁剪後的檢測圖的平均亮度時,判斷該缺陷在該位置處為第一型態第二類1B,如圖1B所示。In addition, in steps S360 to S382, when the absolute value of the brightness difference between the black area and the white area is greater than the third threshold value, the black area and the white area are divided horizontally or vertically, the sum of the number of black areas and the number of white areas is 2, and the average brightness of the cropped normal image is less than the average brightness of the cropped test image, it is determined that the defect at the position is the first type second category 1B, as shown in FIG. 1B.

請參考圖5,在本實施例中,上述步驟S300更包括以下步驟。步驟S360至S392,在黑區與白區之間的亮度差異絕對值大於第三閥值,黑區與白區為水平或垂直分割,黑區與白區的數量和為3,且裁剪後的正常圖的相對兩側(視黑區與白區為水平或垂直分割而為上、下兩側或左、右兩側,例如圖3A中的左、右兩側)皆為黑區時,判斷該缺陷在該位置處為第三型態第一類3A,如圖3A所示。Please refer to FIG5 , in this embodiment, the above step S300 further includes the following steps. Steps S360 to S392, when the absolute value of the brightness difference between the black area and the white area is greater than the third threshold value, the black area and the white area are divided horizontally or vertically, the sum of the number of black areas and the number of white areas is 3, and the opposite sides of the normal image after cropping (the upper and lower sides or the left and right sides are considered to be the black area and the white area are divided horizontally or vertically, such as the left and right sides in FIG3A ) are both black areas, it is determined that the defect at the position is the third type first category 3A, as shown in FIG3A .

圖8是利用本發明的一實施例的圖片中缺陷案的分類方法中的第一分類方法將缺陷分類為第三形態第二類的示意圖。請參考圖5與圖8,步驟S360至S394,在黑區BR與白區WR之間的亮度差異絕對值大於第三閥值,黑區BR與白區WR為水平或垂直分割,黑區BR與白區WR的數量和為3,裁剪後的正常圖NP2’的相對兩側(例如圖8中的左、右兩側)皆為白區WR,且裁剪後的正常圖NP2的平均亮度小於裁剪後的檢測圖IP2的平均亮度時,判斷該缺陷在該位置P2處為第三型態第二類3B,如圖3B或圖8所示。FIG8 is a schematic diagram of classifying defects into the third form second category using the first classification method in the classification method of defect cases in pictures of an embodiment of the present invention. Please refer to FIG5 and FIG8, steps S360 to S394, when the absolute value of the brightness difference between the black area BR and the white area WR is greater than the third threshold value, the black area BR and the white area WR are divided horizontally or vertically, the sum of the number of black areas BR and white areas WR is 3, the opposite sides of the cropped normal image NP2' (for example, the left and right sides in FIG8) are both white areas WR, and the average brightness of the cropped normal image NP2 is less than the average brightness of the cropped detection image IP2, it is judged that the defect at the position P2 is the third form second category 3B, as shown in FIG3B or FIG8.

此外,步驟S360至S394,在黑區與白區之間的亮度差異絕對值大於第三閥值,黑區與白區為水平或垂直分割,黑區與白區的數量和為3,裁剪後的正常圖的相對兩側皆為白區,且在裁剪後的正常圖的平均亮度大於等於裁剪後的檢測圖的平均亮度時,判斷該缺陷在該位置處為第一型態第一類1A,如圖1A所示。In addition, in steps S360 to S394, when the absolute value of the brightness difference between the black area and the white area is greater than the third threshold value, the black area and the white area are divided horizontally or vertically, the sum of the number of black areas and the number of white areas is 3, the opposite sides of the cropped normal image are both white areas, and when the average brightness of the cropped normal image is greater than or equal to the average brightness of the cropped test image, it is determined that the defect at the position is the first type, the first category 1A, as shown in FIG. 1A.

圖9是根據本發明的一實施例的圖片中缺陷案的分類方法中對正常圖進行圖片線寬偵測的一種示例的示意圖。圖10是根據本發明的一實施例的圖片中缺陷案的分類方法中對正常圖進行圖片線寬偵測的另一種示例的示意圖。請參考圖4、圖9與圖10,一般來說,圖片的線寬可定義為黑區間的最短間隔。由於當缺陷被分類為第一型態且線寬大時,系統容易發生誤警報。因此,缺陷被分類為第一型態時較佳是進行線寬偵測,再決定是否要調整偵測敏感度,即步驟S400至S500。FIG9 is a schematic diagram of an example of performing image line width detection on a normal image in a method for classifying defect cases in an image according to an embodiment of the present invention. FIG10 is a schematic diagram of another example of performing image line width detection on a normal image in a method for classifying defect cases in an image according to an embodiment of the present invention. Please refer to FIG4, FIG9 and FIG10. Generally speaking, the line width of an image can be defined as the shortest interval between black areas. When the defect is classified as the first type and the line width is large, the system is prone to false alarms. Therefore, when the defect is classified as the first type, it is better to perform line width detection and then decide whether to adjust the detection sensitivity, i.e., steps S400 to S500.

在本實施例中,上述步驟S400包括以下步驟。將正常圖NP3、NP4二元化,如圖9或圖10左邊至中間所示。將二元化後的正常圖NP3’、NP4’於黑區BR’的範圍膨脹第二預設像素大小,如圖9或圖10中間至右邊所示。在膨脹後的二元化後的正常圖NP3’’、NP4’’於黑區BR’’的連通數及於白區WR’’的連通數相比於膨脹前(正常圖NP3、NP4的黑區BR的連通數及白區WR的連通數)不變時(例如圖9,黑區BR’’的連通數保持為5,白區BR’’的連通數保持為1),判斷線寬大於等於第一預設像素大小。在膨脹後的二元化後的正常圖NP3’’、NP4’’於黑區BR’’的連通數及於白區WR’’的連通數相比於膨脹前(正常圖的黑區BR的連通數及白區WR的連通數)變少時(例如圖10,黑區BR’’的連通數保持為1,但白區BR’’的連通數由5變為0),判斷線寬小於第一預設像素大小。其中,第二預設像素大小例如是設定為5個像素大小,但本發明不侷限於此。In this embodiment, the above step S400 includes the following steps. Binarize the normal images NP3 and NP4, as shown in the left to middle of Figure 9 or Figure 10. Expand the binary normal images NP3' and NP4' by the second preset pixel size in the range of the black area BR', as shown in the middle to the right of Figure 9 or Figure 10. When the number of connections in the black area BR'' and the number of connections in the white area WR'' of the binary normal images NP3'' and NP4'' after expansion remain unchanged compared to before expansion (the number of connections in the black area BR and the number of connections in the white area WR of the normal images NP3 and NP4), it is judged that the line width is greater than or equal to the first preset pixel size. When the number of connections in the black area BR'' and the number of connections in the white area WR'' of the binary normal images NP3'' and NP4'' after expansion are less than before expansion (the number of connections in the black area BR and the number of connections in the white area WR of the normal image) (for example, in FIG. 10, the number of connections in the black area BR'' remains 1, but the number of connections in the white area BR'' changes from 5 to 0), it is determined that the line width is less than the first preset pixel size. The second preset pixel size is, for example, set to 5 pixels, but the present invention is not limited thereto.

也就是說,在本發明的一實施例的圖片中缺陷案的分類方法中,當線寬大時,可降低偵測敏感度。反之,可以維持高敏感度偵測。因此,透過動態調整偵測敏感度,可在低風險的情況下提高分類準確率。That is, in the defect classification method of an embodiment of the present invention, when the line width is large, the detection sensitivity can be reduced. On the contrary, high sensitivity detection can be maintained. Therefore, by dynamically adjusting the detection sensitivity, the classification accuracy can be improved under low risk conditions.

在本實施例中,上述步驟S500中的低敏感度偵測為對差異圖進行每3像素×3像素掃描,並偵測滿足亮度差異絕對值大於等於第四閥值的位置。其中,第四閥值需大於第一閥值。例如,第四閥值可設定為25,但本發明不侷限於此。而且,前述的亮度差異絕對值大於等於第四閥值的條件可設定為每個像素都需滿足或像素的平均值需滿足。In this embodiment, the low sensitivity detection in the above step S500 is to scan the difference map every 3 pixels × 3 pixels, and detect the position where the absolute value of the brightness difference is greater than or equal to the fourth threshold. The fourth threshold must be greater than the first threshold. For example, the fourth threshold can be set to 25, but the present invention is not limited to this. Moreover, the above-mentioned condition that the absolute value of the brightness difference is greater than or equal to the fourth threshold can be set to be satisfied by each pixel or the average value of the pixels.

圖11是根據本發明的一實施例的圖片中缺陷案的分類方法中的第二分類方法的流程圖。請參考圖4與圖11,在本實施例中,上述步驟S600包括以下步驟。步驟S610,利用物件偵測法在該缺陷的位置周圍對正常圖與檢測圖進行缺陷位置偵測。步驟S620至S630,在物件偵測法所偵測到的該缺陷位置與該缺陷的該位置重疊時,採用物件偵測法對該缺陷的分類。其中,物件偵測法可為圖11所示的YOLO(You Only Look Once)物件偵測,但本發明不限於此。FIG11 is a flow chart of a second classification method in a method for classifying defect cases in a picture according to an embodiment of the present invention. Please refer to FIG4 and FIG11. In this embodiment, the above step S600 includes the following steps. Step S610, using an object detection method to perform defect position detection on a normal image and a detection image around the position of the defect. Steps S620 to S630, when the defect position detected by the object detection method overlaps with the position of the defect, the object detection method is used to classify the defect. Among them, the object detection method can be the YOLO (You Only Look Once) object detection shown in FIG11, but the present invention is not limited thereto.

圖12A至圖12C分別是利用本發明的一實施例的圖片中缺陷案的分類方法中的第二分類方法所偵測出的不同類型的缺陷的示意圖。以圖12A為例,檢測圖IP5在位置P5具有缺陷。此缺陷雖應被分類為第二型態第一類2A,但在黑區的邊緣非直線。因此,此缺陷在第一分類方法中被歸類為無分類結果,如圖4中的步驟S300、S400及S600或步驟S300、S400、S500、S700及S600所示。以圖12B為例,檢測圖IP6在位置P6具有缺陷。此缺陷雖應被分類為第一型態第二類1B,但於正常圖NP6中的黑區與白區非為垂直或水平分割(黑、白交界處非直線,且交界處呈不平整的毛邊狀),因此在第一分類方法中亦被歸類為無分類結果。以圖12C為例,檢測圖IP7在位置P7具有缺陷。此缺陷雖應被分類為第三型態第一類3A,但於兩側黑、白交界處非直線,因此在第一分類方法中亦被歸類為無分類結果。FIG. 12A to FIG. 12C are schematic diagrams of different types of defects detected by the second classification method in the method for classifying defect cases in pictures of an embodiment of the present invention. Taking FIG. 12A as an example, the detection image IP5 has a defect at position P5. Although this defect should be classified as the second type first category 2A, the edge of the black area is not a straight line. Therefore, this defect is classified as a non-classified result in the first classification method, as shown in steps S300, S400 and S600 or steps S300, S400, S500, S700 and S600 in FIG. 4. Taking FIG. 12B as an example, the detection image IP6 has a defect at position P6. Although this defect should be classified as Type 1, Type 2, 1B, the black and white areas in the normal image NP6 are not divided vertically or horizontally (the black and white junction is not a straight line, and the junction is uneven and burred), so it is also classified as a non-classified result in the first classification method. Taking Figure 12C as an example, the test image IP7 has a defect at position P7. Although this defect should be classified as Type 3, Type 1, 3A, the black and white junctions on both sides are not straight lines, so it is also classified as a non-classified result in the first classification method.

也就是說,當使用第一分類方法被歸類為無分類結果,且只有缺陷的位置資訊時,此時可以利用物件偵測法進行分類,以增加系統自動分類的成功率。而且,當正常圖中某些原生圖案的型態與缺陷相似時,可利用物件偵測法的特性消除部分誤判的結果。若物件偵測法在該缺陷的該位置無預測結果,可交由人工分類,如步驟S640所示。That is, when the first classification method is classified as unclassified and only the location information of the defect is available, the object detection method can be used for classification to increase the success rate of the automatic classification of the system. Moreover, when the types of some native patterns in the normal image are similar to the defects, the characteristics of the object detection method can be used to eliminate some misjudgment results. If the object detection method has no predicted results at the location of the defect, it can be handed over to manual classification, as shown in step S640.

圖13是根據本發明的另一實施例的圖片中缺陷案的分類方法中的第二分類方法的流程圖。請參考圖4與圖13,在另一實施例中,上述步驟S600可包括以下步驟。步驟S610,利用物件偵測法在該缺陷的位置周圍對正常圖與檢測圖進行缺陷位置偵測。步驟S620’,在物件偵測法所偵測到在正常圖中的該缺陷位置與在檢測圖中的該缺陷位置的分類相同且範圍重疊時,移除物件偵測法的偵測結果。其中,正常圖中的該缺陷位置的該範圍與檢測圖中的該缺陷位置的該範圍重疊時,A∩B/A∪B > 0.3,其中A為正常圖中的該缺陷位置的該範圍,且B為檢測圖中的該缺陷位置的該範圍。FIG. 13 is a flow chart of a second classification method in a method for classifying defect cases in an image according to another embodiment of the present invention. Referring to FIG. 4 and FIG. 13, in another embodiment, the above step S600 may include the following steps. Step S610, using the object detection method to perform defect position detection on the normal image and the detection image around the position of the defect. Step S620', when the defect position detected by the object detection method in the normal image and the defect position in the detection image have the same classification and the range overlaps, remove the detection result of the object detection method. When the range of the defect position in the normal image overlaps with the range of the defect position in the detection image, A∩B/A∪B > 0.3, where A is the range of the defect position in the normal image, and B is the range of the defect position in the detection image.

圖14是利用本發明的另一實施例的圖片中缺陷案的分類方法中的第二分類方法,移除偵測結果的示意圖。以圖14為例,檢測圖IP8和正常圖NP8都可被物件偵測法偵測出在缺陷位置DP8、DP8’可能具有缺陷。也就是說,在正常圖NP8中的原生圖案與缺陷的型態相似,因此可能造成物件偵測法誤判。此時,可利用物件偵測法偵測物件位置的能力,將檢測圖IP8及正常圖NP8中重疊(也就是上述重疊率>0.3的判斷方式)且同分類的偵測結果移除,進而可減少誤判數,提高系統自動分類的準確率。FIG14 is a schematic diagram of removing detection results using the second classification method in the classification method of defect cases in pictures of another embodiment of the present invention. Taking FIG14 as an example, both the detection image IP8 and the normal image NP8 can be detected by the object detection method as having possible defects at the defect positions DP8 and DP8'. In other words, the native pattern in the normal image NP8 is similar to the type of the defect, which may cause a misjudgment by the object detection method. At this time, the object detection method can be used to detect the position of the object, and the detection results of the same classification that overlap (that is, the above-mentioned judgment method of overlap rate > 0.3) in the detection image IP8 and the normal image NP8 can be removed, thereby reducing the number of misjudgments and improving the accuracy of the system's automatic classification.

請再參考圖4,在本實施例中,圖片中缺陷的分類方法更包括以下步驟。步驟S500及S700,在低敏感度偵測中偵測到該缺陷時,再次對檢測圖進行第一分類方法檢測。步驟S700及S600,在再次對檢測圖進行第一分類方法檢測且該缺陷為無分類結果時,對檢測圖進行第二分類方法檢測。Please refer to FIG. 4 again. In this embodiment, the defect classification method in the image further includes the following steps. Steps S500 and S700: when the defect is detected in the low-sensitivity detection, the detection image is tested again using the first classification method. Steps S700 and S600: when the detection image is tested again using the first classification method and the defect is not classified, the detection image is tested using the second classification method.

在本實施例中,圖片中缺陷的分類方法更包括以下步驟。步驟S500及S800,在低敏感度偵測中未偵測到該缺陷時,判斷該缺陷在其位置處為第一型態第三類1C,如圖1C所示。In this embodiment, the defect classification method in the image further includes the following steps: Steps S500 and S800, when the defect is not detected in the low-sensitivity detection, the defect is determined to be of the first type third category 1C at its location, as shown in FIG1C .

總而言之,檢測圖中的缺陷可依照亮度、分割數、型態等進行規則判斷。對於有明顯型態特徵的缺陷可以直接用本發明實施例的規則進行分類,進而提高分類準確度。例如,在第二型態中(缺陷位於大黑區或是大白區),若裁剪後的圖片在邊緣亮度差異<20(第一閥值),可將缺陷分類為2A/2B/2C。而在第一型態(缺陷位於黑白交界處)或第三型態(其他情況),若正常圖中的黑區與白區為垂直或水平分割,可將缺陷分類為1A/1B/3A/3B。In summary, the defects in the test image can be judged according to the rules of brightness, number of divisions, shape, etc. Defects with obvious morphological characteristics can be directly classified using the rules of the embodiment of the present invention, thereby improving the classification accuracy. For example, in the second type (the defect is located in the large black area or the large white area), if the brightness difference at the edge of the cropped image is <20 (the first threshold), the defect can be classified as 2A/2B/2C. In the first type (the defect is located at the junction of black and white) or the third type (other situations), if the black and white areas in the normal image are divided vertically or horizontally, the defect can be classified as 1A/1B/3A/3B.

綜上所述,在本發明的一實施例中,圖片中缺陷的分類方法藉由對差異圖進行高敏感度偵測,以確認檢測圖是否存在缺陷;在高敏感度偵測中偵測到缺陷時,對檢測圖進行第一分類方法檢測;在缺陷為第一型態或無分類結果時,對正常圖進行圖片線寬偵測;在正常圖的線寬大於第一預設像素大小時,對差異圖進行低敏感度偵測,以確認檢測圖是否存在缺陷;以及在正常圖的線寬小於等於第一預設像素大小且缺陷為無分類結果時,對檢測圖進行第二分類方法檢測。因此,本發明實施例的分類方法透過影像處理結合機器學習手法,設計第一及第二分類方法,對圖片中的缺陷進行自動分類。除了具有高準確率、低風險、可隨圖片線寬調整偵測敏感度等優點之外,還可減少人力負擔,提升分類一致性。In summary, in one embodiment of the present invention, the classification method of defects in an image is to perform high-sensitivity detection on the difference image to confirm whether there is a defect in the test image; when a defect is detected in the high-sensitivity detection, the test image is detected by the first classification method; when the defect is of the first type or there is no classification result, the normal image is detected by line width of the image; when the line width of the normal image is greater than the first preset pixel size, the difference image is detected at a low sensitivity to confirm whether there is a defect in the test image; and when the line width of the normal image is less than or equal to the first preset pixel size and the defect is a non-classified result, the test image is detected by the second classification method. Therefore, the classification method of the embodiment of the present invention uses image processing combined with machine learning techniques to design the first and second classification methods to automatically classify defects in images. In addition to its advantages such as high accuracy, low risk, and the ability to adjust detection sensitivity according to the line width of the image, it can also reduce manpower burden and improve classification consistency.

1A、1B、1C、2A、2B、2C、3A、3B:缺陷1A, 1B, 1C, 2A, 2B, 2C, 3A, 3B: Defects

BR、BR’’:黑區BR, BR’’: Black Area

DP8、DP8’:缺陷位置DP8, DP8’: Defect location

IP、IP1、IP2、IP5、IP6、IP7、IP8:檢測圖IP, IP1, IP2, IP5, IP6, IP7, IP8: Test Diagram

IP’、IP1’、IP2’:裁剪後的檢測圖IP’, IP1’, IP2’: cropped detection images

NP、NP1、NP2、NP3、NP4、NP8:正常圖NP, NP1, NP2, NP3, NP4, NP8: Normal image

NP’、NP1’、NP2’:裁剪後的正常圖NP’, NP1’, NP2’: normal images after cropping

NP3’、NP4’:二元化後的正常圖NP3’, NP4’: normal images after binary transformation

NP3’’、NP4’’:膨脹後的二元化後的正常圖NP3’’, NP4’’: Normal image after binary expansion

P、P1、P2、P5、P6、P7:位置P, P1, P2, P5, P6, P7: Position

S100、S200、S300、S310、S320、S330、S332、S340、S350、S360、S370、S380、S382、S390、S392、S394、S400、S500、S600、S610、S620、S620’、S630、S640、S700、S800:步驟S100, S200, S300, S310, S320, S330, S332, S340, S350, S360, S370, S380, S382, S390, S392, S394, S400, S500, S600, S610, S620, S620’, S630, S640, S700, S800: Step

WR、WR’’:白區WR, WR’’: White area

圖1A至圖1C分別是缺陷為第一型態第一類至第一型態第三類的示意圖。 圖2A至圖2C分別是缺陷為第二型態第一類至第二型態第三類的示意圖。 圖3A至圖3B分別是缺陷為第三型態第一類至第三型態第二類的示意圖。 圖4是根據本發明的一實施例的圖片中缺陷的分類方法的流程圖。 圖5是根據本發明的一實施例的圖片中缺陷的分類方法中的第一分類方法的流程圖。 圖6是利用本發明的一實施例的圖片中缺陷的分類方法中的第一分類方法將缺陷分類為第二形態第一類的示意圖。 圖7是利用本發明的一實施例的圖片中缺陷的分類方法中的第一分類方法將缺陷分類為第一形態第一類的示意圖。 圖8是利用本發明的一實施例的圖片中缺陷的分類方法中的第一分類方法將缺陷分類為第三形態第二類的示意圖。 圖9是根據本發明的一實施例的圖片中缺陷的分類方法中對正常圖進行圖片線寬偵測的一種示例的示意圖。 圖10是根據本發明的一實施例的圖片中缺陷的分類方法中對正常圖進行圖片線寬偵測的另一種示例的示意圖。 圖11是根據本發明的一實施例的圖片中缺陷的分類方法中的第二分類方法的流程圖。 圖12A至圖12C分別是利用本發明的一實施例的圖片中缺陷的分類方法中的第二分類方法所偵測出的不同類型的缺陷的示意圖。 圖13是根據本發明的另一實施例的圖片中缺陷的分類方法中的第二分類方法的流程圖。 圖14是利用本發明的另一實施例的圖片中缺陷的分類方法中的第二分類方法,移除偵測結果的示意圖。 Figures 1A to 1C are schematic diagrams of defects of the first type and the first category to the first type and the third category, respectively. Figures 2A to 2C are schematic diagrams of defects of the second type and the first category to the second type and the third category, respectively. Figures 3A to 3B are schematic diagrams of defects of the third type and the first category to the third type and the second category, respectively. Figure 4 is a flow chart of a method for classifying defects in a picture according to an embodiment of the present invention. Figure 5 is a flow chart of a first classification method in a method for classifying defects in a picture according to an embodiment of the present invention. Figure 6 is a schematic diagram of classifying defects into the first category of the second form using the first classification method in a method for classifying defects in a picture according to an embodiment of the present invention. Figure 7 is a schematic diagram of classifying defects into the first category of the first form using the first classification method in a method for classifying defects in a picture according to an embodiment of the present invention. FIG8 is a schematic diagram of classifying defects into the second category of the third form using the first classification method in the method for classifying defects in pictures according to an embodiment of the present invention. FIG9 is a schematic diagram of an example of detecting the line width of a normal image in the method for classifying defects in pictures according to an embodiment of the present invention. FIG10 is a schematic diagram of another example of detecting the line width of a normal image in the method for classifying defects in pictures according to an embodiment of the present invention. FIG11 is a flow chart of the second classification method in the method for classifying defects in pictures according to an embodiment of the present invention. FIG12A to FIG12C are schematic diagrams of different types of defects detected by the second classification method in the method for classifying defects in pictures according to an embodiment of the present invention. FIG. 13 is a flow chart of a second classification method in a method for classifying defects in a picture according to another embodiment of the present invention. FIG. 14 is a schematic diagram of removing detection results using the second classification method in a method for classifying defects in a picture according to another embodiment of the present invention.

S100、S200、S300、S400、S500、S600、S700、S800:步驟 S100, S200, S300, S400, S500, S600, S700, S800: Steps

Claims (11)

一種圖片中缺陷的分類方法,該分類方法係藉由一處理器執行,包括:對一檢測圖與一正常圖進行影像對準,再將該檢測圖與該正常圖相減並取亮度差異絕對值,以取得一差異圖;對該差異圖進行高敏感度偵測,以確認該檢測圖是否存在缺陷;在該高敏感度偵測中偵測到缺陷時,對該檢測圖進行第一分類方法檢測,其中該高敏感度偵測為藉由該處理器對該差異圖進行每2像素×2像素掃描,並偵測滿足亮度差異絕對值大於等於第一閥值的位置;在該缺陷經過該第一分類方法檢測為第一型態或無分類結果時,對該正常圖進行圖片線寬偵測,其中該線寬定義為該正常圖於黑區間的最短間隔;在該正常圖的線寬大於第一預設像素大小時,對該差異圖進行低敏感度偵測,以確認該檢測圖是否存在該缺陷,其中該低敏感度偵測為藉由該處理器對該差異圖進行每3像素×3像素掃描,並偵測滿足亮度差異絕對值大於等於第四閥值的位置;以及在該正常圖的線寬小於等於該第一預設像素大小且該缺陷為無分類結果時,對該檢測圖進行第二分類方法檢測。 A method for classifying defects in an image is implemented by a processor, and includes: performing image alignment on a test image and a normal image, then subtracting the test image from the normal image and taking the absolute value of the brightness difference to obtain a difference image; performing high-sensitivity detection on the difference image to confirm whether the test image has a defect; when a defect is detected in the high-sensitivity detection, performing a first classification method detection on the test image, wherein the high-sensitivity detection is to scan the difference image every 2 pixels×2 pixels by the processor, and detect the position where the absolute value of the brightness difference is greater than or equal to a first threshold value; when the defect passes through the first classification method, When the detection method is the first type or no classification result, the normal image is subjected to image line width detection, wherein the line width is defined as the shortest interval of the normal image in the black area; when the line width of the normal image is greater than the first preset pixel size, the difference image is subjected to low sensitivity detection to confirm whether the detection image has the defect, wherein the low sensitivity detection is performed by the processor to scan the difference image every 3 pixels × 3 pixels and detect the position where the absolute value of the brightness difference is greater than or equal to the fourth threshold value; and when the line width of the normal image is less than or equal to the first preset pixel size and the defect is a no classification result, the detection image is subjected to the second classification method detection. 如請求項1所述的圖片中缺陷的分類方法,其中對該檢測圖進行該第一分類方法檢測的步驟包括以下步驟: 依該缺陷的位置對該檢測圖與該正常圖進行裁剪;在裁剪後的該檢測圖與裁剪後的該正常圖在圖片邊緣的亮度差異絕對值小於該第一閥值,且在該缺陷的該位置於該正常圖的位置的亮度大於第二閥值時,判斷該缺陷在該位置處為第二型態第一類。 The defect classification method in the image as described in claim 1, wherein the step of performing the first classification method detection on the detection image includes the following steps: Crop the detection image and the normal image according to the position of the defect; when the absolute value of the brightness difference between the cropped detection image and the cropped normal image at the edge of the image is less than the first threshold value, and the brightness of the position of the defect at the position of the normal image is greater than the second threshold value, it is judged that the defect at the position is the second type first category. 如請求項2所述的圖片中缺陷的分類方法,其中對該檢測圖進行該第一分類方法檢測的步驟更包括以下步驟:在該裁剪後的該檢測圖與該裁剪後的該正常圖在該圖片邊緣的該亮度差異絕對值小於該第一閥值,在該缺陷的該位置對應於該正常圖的該位置的該亮度小於等於該第二閥值,且該裁剪後的該正常圖的平均亮度小於等於該裁剪後的該檢測圖的平均亮度,判斷該缺陷在該位置處為第二型態第二類;以及在該裁剪後的該檢測圖與該裁剪後的該正常圖在該圖片邊緣的該亮度差異絕對值小於該第一閥值,在該缺陷的該位置對應於該正常圖的該位置的該亮度小於等於該第二閥值,且該裁剪後的該正常圖的該平均亮度大於該裁剪後的該檢測圖的該平均亮度,判斷該缺陷在該位置處為第二型態第三類。 The method for classifying defects in an image as described in claim 2, wherein the step of performing the first classification method on the test image further includes the following steps: the absolute value of the brightness difference between the cropped test image and the cropped normal image at the edge of the image is less than the first threshold value, the brightness at the position of the defect corresponding to the position of the normal image is less than or equal to the second threshold value, and the average brightness of the cropped normal image is less than or equal to the average brightness of the cropped test image. The average brightness of the defect is judged to be the second type and the second category at the position; and the absolute value of the brightness difference between the cropped test image and the cropped normal image at the edge of the image is less than the first threshold value, the brightness of the position of the defect corresponding to the position of the normal image is less than or equal to the second threshold value, and the average brightness of the cropped normal image is greater than the average brightness of the cropped test image, and the defect is judged to be the second type and the third category at the position. 如請求項1所述的圖片中缺陷的分類方法,其中對該檢測圖進行該第一分類方法檢測的步驟更包括以下步驟:依該缺陷的位置對該檢測圖與該正常圖進行裁剪;在該裁剪後的該檢測圖或該裁剪後的該正常圖在該圖片邊緣的該亮度差異絕對值大於等於該第一閥值,且該缺陷的數量小於 10時,將該裁剪後的該正常圖進行影像分割,以將該裁剪後的該正常圖分割為該黑區與白區。 The defect classification method in the image as described in claim 1, wherein the step of performing the first classification method detection on the detection image further includes the following steps: cropping the detection image and the normal image according to the position of the defect; when the absolute value of the brightness difference of the cropped detection image or the cropped normal image at the edge of the image is greater than or equal to the first threshold value, and the number of defects is less than 10, performing image segmentation on the cropped normal image to divide the cropped normal image into the black area and the white area. 如請求項4所述的圖片中缺陷的分類方法,其中對該檢測圖進行該第一分類方法檢測的步驟更包括以下步驟:在該黑區與該白區之間的亮度差異絕對值大於第三閥值,該黑區與該白區為水平或垂直分割,該黑區與該白區的數量和為2,且該裁剪後的該正常圖的平均亮度大於等於該裁剪後的該檢測圖的平均亮度時,判斷該缺陷在該位置處為第一型態第一類;以及在該黑區與該白區之間的亮度差異絕對值大於該第三閥值,該黑區與該白區為水平或垂直分割,該黑區與該白區的數量和為2,且該裁剪後的該正常圖的該平均亮度小於該裁剪後的該檢測圖的該平均亮度時,判斷該缺陷在該位置處為第一型態第二類。 The method for classifying defects in an image as described in claim 4, wherein the step of performing the first classification method on the test image further includes the following steps: the absolute value of the brightness difference between the black area and the white area is greater than a third threshold value, the black area and the white area are divided horizontally or vertically, the sum of the number of the black area and the white area is 2, and the average brightness of the cropped normal image is greater than or equal to the average brightness of the cropped test image. When the brightness is greater than or equal to 0, the defect at the position is judged to be of the first type and the first category; and when the absolute value of the brightness difference between the black area and the white area is greater than the third threshold value, the black area and the white area are divided horizontally or vertically, the sum of the number of the black area and the white area is 2, and the average brightness of the normal image after clipping is less than the average brightness of the test image after clipping, the defect at the position is judged to be of the first type and the second category. 如請求項4所述的圖片中缺陷的分類方法,其中對該檢測圖進行該第一分類方法檢測的步驟更包括以下步驟:在該黑區與該白區之間的亮度差異絕對值大於第三閥值,該黑區與該白區為水平或垂直分割,該黑區與該白區的數量和為3,且該裁剪後的該正常圖的相對兩側皆為該黑區時,判斷該缺陷在該位置處為第三型態第一類;在該黑區與該白區之間的亮度差異絕對值大於該第三閥值,該黑區與該白區為水平或垂直分割,該黑區與該白區的數量和為3,該裁剪後的該正常圖的該相對兩側皆為該白區,且該裁剪後的該正常圖的平均亮度小於該裁剪後的該檢測圖的平均亮度時,判斷 該缺陷在該位置處為第三型態第二類;以及在該黑區與該白區之間的亮度差異絕對值大於該第三閥值,該黑區與該白區為水平或垂直分割,該黑區與該白區的數量和為3,該裁剪後的該正常圖的該相對兩側皆為該白區時,且在該裁剪後的該正常圖的該平均亮度大於等於該裁剪後的該檢測圖的該平均亮度時,判斷該缺陷在該位置處為第一型態第一類。 The method for classifying defects in an image as described in claim 4, wherein the step of performing the first classification method detection on the detection image further includes the following steps: when the absolute value of the brightness difference between the black area and the white area is greater than a third threshold value, the black area and the white area are divided horizontally or vertically, the sum of the number of the black area and the white area is 3, and both opposite sides of the normal image after cropping are the black area, it is judged that the defect at the position is the first type of the third type; when the absolute value of the brightness difference between the black area and the white area is greater than the third threshold value, the black area and the white area are divided horizontally or vertically, the sum of the number of the black area and the white area is 3, and the normal image after cropping is When the two opposite sides of the normal image are both white areas, and the average brightness of the normal image after clipping is less than the average brightness of the test image after clipping, the defect is judged to be the third type and the second category at the position; and when the absolute value of the brightness difference between the black area and the white area is greater than the third threshold value, the black area and the white area are divided horizontally or vertically, the sum of the number of the black area and the white area is 3, and the two opposite sides of the normal image after clipping are both white areas, and the average brightness of the normal image after clipping is greater than or equal to the average brightness of the test image after clipping, the defect is judged to be the first type and the first category at the position. 如請求項1所述的圖片中缺陷的分類方法,其中對該正常圖進行圖片線寬偵測的步驟包括以下步驟:將該正常圖二元化;將二元化後的該正常圖於該黑區的範圍膨脹第二預設像素大小;在膨脹後的該二元化後的該正常圖於該黑區的連通數及於白區的連通數相比於膨脹前不變時,判斷該線寬大於等於該第一預設像素大小;以及在膨脹後的該二元化後的該正常圖於該黑區的該連通數及於該白區的該連通數相比於膨脹前變少時,判斷該線寬小於該第一預設像素大小。 The method for classifying defects in an image as described in claim 1, wherein the step of detecting the line width of the normal image includes the following steps: binarizing the normal image; expanding the binary normal image by a second preset pixel size in the range of the black area; when the number of connections in the black area and the number of connections in the white area of the binary normal image after expansion remain unchanged compared to before expansion, judging that the line width is greater than or equal to the first preset pixel size; and when the number of connections in the black area and the number of connections in the white area of the binary normal image after expansion decrease compared to before expansion, judging that the line width is less than the first preset pixel size. 如請求項1所述的圖片中缺陷的分類方法,其中對該檢測圖進行該第二分類方法檢測的步驟包括以下步驟:利用物件偵測法在該缺陷的位置周圍對該正常圖與該檢測圖進行缺陷位置偵測;以及在該物件偵測法所偵測到的該缺陷位置與該缺陷的該位置重 疊時,採用該物件偵測法對該缺陷的分類。 The method for classifying defects in images as described in claim 1, wherein the step of performing the second classification method detection on the detection image includes the following steps: using the object detection method to perform defect position detection on the normal image and the detection image around the position of the defect; and when the defect position detected by the object detection method overlaps with the position of the defect, classifying the defect using the object detection method. 如請求項1所述的圖片中缺陷的分類方法,其中對該檢測圖進行該第二分類方法檢測的步驟包括以下步驟:利用物件偵測法在該缺陷的位置周圍對該正常圖與該檢測圖進行缺陷位置偵測;以及在該物件偵測法所偵測到在該正常圖中的該缺陷位置與在該檢測圖中的該缺陷位置的分類相同且範圍重疊時,移除該物件偵測法的偵測結果,其中該正常圖中的該缺陷位置的該範圍與該檢測圖中的該缺陷位置的該範圍重疊時,A∩B/A∪B>0.3,其中A為該正常圖中的該缺陷位置的該範圍,且B為該檢測圖中的該缺陷位置的該範圍。 The defect classification method in the image as described in claim 1, wherein the step of performing the second classification method detection on the detection image includes the following steps: using the object detection method to perform defect position detection on the normal image and the detection image around the defect position; and when the defect position in the normal image detected by the object detection method is of the same classification as the defect position in the detection image and the range overlaps, removing the detection result of the object detection method, wherein when the range of the defect position in the normal image overlaps with the range of the defect position in the detection image, A∩B/A∪B>0.3, wherein A is the range of the defect position in the normal image, and B is the range of the defect position in the detection image. 如請求項1所述的圖片中缺陷的分類方法,更包括:在該低敏感度偵測中偵測到該缺陷時,再次對該檢測圖進行該第一分類方法檢測;以及在再次對該檢測圖進行該第一分類方法檢測且該缺陷為無分類結果時,對該檢測圖進行該第二分類方法檢測。 The method for classifying defects in an image as described in claim 1 further includes: when the defect is detected in the low-sensitivity detection, the detection image is tested again using the first classification method; and when the detection image is tested again using the first classification method and the defect is not classified, the detection image is tested using the second classification method. 如請求項1所述的圖片中缺陷的分類方法,更包括:在該低敏感度偵測中未偵測到該缺陷時,判斷該缺陷在其位置處為第一型態第三類。 The method for classifying defects in an image as described in claim 1 further includes: when the defect is not detected in the low-sensitivity detection, judging that the defect is of the third category of the first type at its location.
TW113120647A 2024-06-04 2024-06-04 Classification method of defects in picture TWI874236B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
TW113120647A TWI874236B (en) 2024-06-04 2024-06-04 Classification method of defects in picture
CN202410789199.4A CN121073862A (en) 2024-06-04 2024-06-19 Method for classifying defects in picture

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW113120647A TWI874236B (en) 2024-06-04 2024-06-04 Classification method of defects in picture

Publications (2)

Publication Number Publication Date
TWI874236B true TWI874236B (en) 2025-02-21
TW202548682A TW202548682A (en) 2025-12-16

Family

ID=95557504

Family Applications (1)

Application Number Title Priority Date Filing Date
TW113120647A TWI874236B (en) 2024-06-04 2024-06-04 Classification method of defects in picture

Country Status (2)

Country Link
CN (1) CN121073862A (en)
TW (1) TWI874236B (en)

Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TW552657B (en) * 2002-06-28 2003-09-11 United Microelectronics Corp Method for detecting wafer level defect
CN1920539A (en) * 2005-08-26 2007-02-28 精工爱普生株式会社 Defect detecting method and defect detecting device
CN1942757A (en) * 2004-04-14 2007-04-04 奥林巴斯株式会社 Device and method for classification
CN102132147A (en) * 2008-08-26 2011-07-20 夏普株式会社 Defect detecting apparatus, defect detecting method, defect detecting program, and computer-readable recording medium in which that program has been recorded
US20140268105A1 (en) * 2013-03-15 2014-09-18 Zygo Corporation Optical defect inspection system
TW201734442A (en) * 2016-02-19 2017-10-01 斯庫林集團股份有限公司 Defect detection apparatus, defect detection method and program product
TW202202827A (en) * 2020-07-01 2022-01-16 力晶積成電子製造股份有限公司 Defect identification method and image analysis system
TW202212813A (en) * 2020-08-11 2022-04-01 美商應用材料股份有限公司 Method for defect review measurement on a substrate, apparatus for imaging a substrate, and method of operating thereof
TW202238606A (en) * 2021-03-30 2022-10-01 力晶積成電子製造股份有限公司 Defect analysis method of semiconductor device and electonic device
CN117252861A (en) * 2023-10-31 2023-12-19 西安芯晖检测技术有限公司 A method, device and system for detecting wafer surface defects
CN117635565A (en) * 2023-11-29 2024-03-01 珠海诚锋电子科技有限公司 A semiconductor surface defect detection system based on image recognition
CN117351011B (en) * 2023-12-04 2024-03-12 歌尔股份有限公司 Screen defect detection method, apparatus, and readable storage medium

Patent Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TW552657B (en) * 2002-06-28 2003-09-11 United Microelectronics Corp Method for detecting wafer level defect
CN1942757A (en) * 2004-04-14 2007-04-04 奥林巴斯株式会社 Device and method for classification
CN1920539A (en) * 2005-08-26 2007-02-28 精工爱普生株式会社 Defect detecting method and defect detecting device
CN102132147A (en) * 2008-08-26 2011-07-20 夏普株式会社 Defect detecting apparatus, defect detecting method, defect detecting program, and computer-readable recording medium in which that program has been recorded
US20140268105A1 (en) * 2013-03-15 2014-09-18 Zygo Corporation Optical defect inspection system
TW201734442A (en) * 2016-02-19 2017-10-01 斯庫林集團股份有限公司 Defect detection apparatus, defect detection method and program product
TW202202827A (en) * 2020-07-01 2022-01-16 力晶積成電子製造股份有限公司 Defect identification method and image analysis system
TW202212813A (en) * 2020-08-11 2022-04-01 美商應用材料股份有限公司 Method for defect review measurement on a substrate, apparatus for imaging a substrate, and method of operating thereof
TW202238606A (en) * 2021-03-30 2022-10-01 力晶積成電子製造股份有限公司 Defect analysis method of semiconductor device and electonic device
CN117252861A (en) * 2023-10-31 2023-12-19 西安芯晖检测技术有限公司 A method, device and system for detecting wafer surface defects
CN117635565A (en) * 2023-11-29 2024-03-01 珠海诚锋电子科技有限公司 A semiconductor surface defect detection system based on image recognition
CN117351011B (en) * 2023-12-04 2024-03-12 歌尔股份有限公司 Screen defect detection method, apparatus, and readable storage medium

Also Published As

Publication number Publication date
CN121073862A (en) 2025-12-05

Similar Documents

Publication Publication Date Title
JP3051279B2 (en) Bump appearance inspection method and bump appearance inspection device
JP6675433B2 (en) Defect classification method, photomask blank sorting method, and mask blank manufacturing method
US20050002560A1 (en) Defect inspection apparatus
US7953269B2 (en) Method for inspecting pattern defect occured on patterns formed on a substrate
KR20050120420A (en) In-line typed apparatus for auto wafer-defect classification and control method thereof
TWI861415B (en) System and method for detecting defects and related non-transitory computer-readable medium
TW201805620A (en) Defect inspection device
WO2014103617A1 (en) Alignment device, defect inspection device, alignment method, and control program
US8358340B2 (en) Pattern inspection device and method of inspecting pattern
WO2025139960A1 (en) Image detection method and apparatus, electronic device, and storage medium
CN120142298A (en) A Corrugated Box Damage Detection Method Based on Machine Vision
TWI874236B (en) Classification method of defects in picture
JPH11231507A (en) Method and device for inspecting mask
CN115312414B (en) Defect detection method
JP3431567B2 (en) Defect inspection device and inspection method
TW202548682A (en) Classification method of defects in picture
JP3879904B2 (en) Gray tone mask defect inspection method and defect inspection apparatus
US20250078249A1 (en) Method of inspecting a mark engraved on a semiconductor package
JP2008020235A (en) Defect inspection device and defect inspection method
JP2000147748A (en) Photomask appearance inspection device
US7035448B2 (en) Method of defect inspection of graytone mask and apparatus doing the same
JP4537144B2 (en) Mask defect classification method and classification apparatus
CN117805142A (en) Defect detection method, defect detection apparatus, and computer-readable storage medium
JP7786050B2 (en) Inspection device, inspection method, glass plate manufacturing method, and inspection program
US20240281960A1 (en) Debris determination method