TW202411883A - Automated defect detection methods - Google Patents

Automated defect detection methods Download PDF

Info

Publication number
TW202411883A
TW202411883A TW111134763A TW111134763A TW202411883A TW 202411883 A TW202411883 A TW 202411883A TW 111134763 A TW111134763 A TW 111134763A TW 111134763 A TW111134763 A TW 111134763A TW 202411883 A TW202411883 A TW 202411883A
Authority
TW
Taiwan
Prior art keywords
feature information
image
marked
similarity
defect detection
Prior art date
Application number
TW111134763A
Other languages
Chinese (zh)
Other versions
TWI816549B (en
Inventor
廖珗洲
子怡 林
劉祐誠
Original Assignee
朝陽科技大學
Filing date
Publication date
Application filed by 朝陽科技大學 filed Critical 朝陽科技大學
Priority to TW111134763A priority Critical patent/TWI816549B/en
Priority claimed from TW111134763A external-priority patent/TWI816549B/en
Application granted granted Critical
Publication of TWI816549B publication Critical patent/TWI816549B/en
Publication of TW202411883A publication Critical patent/TW202411883A/en

Links

Images

Abstract

本發明所提供之自動化瑕疵檢測方法,係對生產不良率低於百分之二十的生產線進行瑕疵檢測,並包含一設定程序及一檢測程序。該設定程序包含以下步驟:1.逐個拍攝多個第一待測物,以取得多數分別僅包含有單一個該第一待測物之第一影像;2.自各該第一影像中分別提取出一第一特徵資訊;3.將該些第一特徵資訊以兩個為一組,分別對同一組中的兩個第一特徵資訊彼此之間進行差異比對,當同組中的比對結果為實質相同時;係將該組之該第一特徵資訊標記為正常,而當比對結果為實質不同時,則將該組之該第一特徵資訊標記為異常;4.將標記為正常的第一特徵資訊整合成一標準特徵集。該檢測程序包含以下步驟:1.取得一位於該生產線上的第二待測物之第二影像;2.提取該第二影像的第二特徵資訊,並與該標準特徵集進行比對,當比對結果為實質相同時,係將該第二影像及/或該第二特徵資訊標記為正常;當比對結果為實質不同時,係將該第二影像及/或該第二特徵資訊標記為異常。The automated defect detection method provided by the present invention is to perform defect detection on a production line with a production defect rate of less than 20%, and includes a setting procedure and a detection procedure. The setting procedure includes the following steps: 1. Photographing a plurality of first test objects one by one to obtain a plurality of first images each containing only a single first test object; 2. Extracting a first feature information from each first image; 3. Grouping the first feature information into two pieces, and performing a difference comparison between the two first feature information in the same group. When the comparison results in the same group are substantially the same, the first feature information in the group is marked as normal, and when the comparison results are substantially different, the first feature information in the group is marked as abnormal; 4. Integrating the first feature information marked as normal into a standard feature set. The detection procedure includes the following steps: 1. Obtaining a second image of a second object to be tested on the production line; 2. Extracting second feature information of the second image and comparing it with the standard feature set. When the comparison result is substantially the same, the second image and/or the second feature information is marked as normal; when the comparison result is substantially different, the second image and/or the second feature information is marked as abnormal.

Description

自動化瑕疵檢測方法Automated defect detection method

本發明係與瑕疵檢測技術有關,特別是關於一種自動化瑕疵檢測方法。The present invention relates to defect detection technology, and in particular to an automated defect detection method.

按,產品或零組件常見的生產模式可分為多樣多量或少樣多量,其中,以電容器橡膠封口產品為例,是電路上常見的元件,但為了因應不同需求,依據電容的容量大小有各種不同的尺寸,且封口橡膠的規格也需隨之變化,而屬於多樣多量的產品。According to the common production mode of products or components, they can be divided into high variety and high quantity or low variety and high quantity. For example, capacitor rubber sealing products are common components in circuits, but in order to meet different needs, they have different sizes according to the capacity of the capacitor, and the specifications of the sealing rubber also need to change accordingly, which is a product of high variety and high quantity.

由於封口橡膠是維持電容正常運作的關鍵組件之一,並可作為判斷產品是否存在瑕疵的依據,如圖1(a),其分別顯示了經橡膠熱壓成型後之封口橡膠的正面與反面之影像。Since the sealing rubber is one of the key components to maintain the normal operation of the capacitor, it can also be used as a basis for judging whether the product has defects. As shown in Figure 1(a), it shows the front and back images of the sealing rubber after the rubber is hot-pressed.

再者,於圖1(b)則列舉了幾種封口橡膠於生產過程中可能出現的幾種瑕疵種類,另外,經後續的統計結果其瑕疵的種類共有38種,其包含21種正面或反面的表面瑕疵、7種針孔瑕疵、以及其他10種底部或沖打的瑕疵。如此,若生產每月1億顆電容,已無法透過人工來檢驗瑕疵,需改良之,例如以自動光學檢查系統(Automated Optical Inspection,AOI)進行檢測。Furthermore, several types of defects that may occur in the production process of sealing rubber are listed in Figure 1(b). In addition, subsequent statistical results show that there are 38 types of defects, including 21 surface defects on the front or back, 7 pinhole defects, and 10 bottom or punching defects. In this way, if 100 million capacitors are produced per month, it is no longer possible to inspect defects manually, and improvements are needed, such as using an automated optical inspection system (AOI) for inspection.

但是,開發一套適用於不同的製造產線之自動光學檢查系統確實有一定的複雜度,舉例來說,傳統開發自動光學檢查系統的基本步驟如下:However, developing an automatic optical inspection system suitable for different manufacturing lines is indeed complex. For example, the basic steps for traditionally developing an automatic optical inspection system are as follows:

1. 確認工件種類與瑕疵類型: 工件種類、檢測數量與檢測速度、瑕疵的類型與樣態等。1. Confirm the workpiece type and defect type: workpiece type, inspection quantity and inspection speed, defect type and pattern, etc.

2. 設計相機光源拍攝環境:依據瑕疵需求來規劃相機解析度、光源類型、工作距離等。2. Design the camera lighting shooting environment: plan the camera resolution, light source type, working distance, etc. according to the defect requirements.

3. 設計檢測方法:進行各項瑕疵檢測方法的設計與規劃。3. Design test methods: Design and plan various defect detection methods.

4. 開發檢測系統。4. Develop a testing system.

5. 測試與系統調校。5. Testing and system tuning.

6. 教育訓練與驗收。6. Education, training and acceptance.

由上述可知,要客製化開發一套針對上述需求的自動光學檢查系統,可能面臨的問題如下:From the above, we can see that if we want to customize and develop an automatic optical inspection system to meet the above requirements, we may face the following problems:

1. 開發時程長與人力成本高:由於系統開發都需要耗費相當的時間以及對應的人力成本才能實現檢測目標。1. Long development time and high labor cost: System development requires considerable time and corresponding labor costs to achieve detection goals.

2. 測試與系統調校:系統需要經過繁複以及完整的測試與驗證,才能確保系統運作符合預期目標。2. Testing and system tuning: The system needs to undergo complex and complete testing and verification to ensure that the system operates as expected.

3. 系統缺乏彈性:當有新型號或者新工件,需要經過各種參數的設定調整,必要時也需要適當地修改軟體程式,避免系統缺乏彈性,無法因應不同的工件樣式。3. Lack of flexibility in the system: When there are new models or new workpieces, various parameters need to be adjusted and the software program needs to be modified appropriately when necessary to avoid the lack of flexibility of the system and the inability to adapt to different workpiece styles.

此外,除了前述以傳統自動光學檢查系統來檢測瑕疵之外,近年來,更發展了將人工智慧、機器學習、深度學習或神經網路等技術應用於影像辨識上,例如以下所舉的各專利前案。In addition to the aforementioned traditional automatic optical inspection system to detect defects, in recent years, technologies such as artificial intelligence, machine learning, deep learning or neural networks have been developed and applied to image recognition, such as the following patent cases.

我國第I667575號『利用人工智慧的瑕疵檢測系統及其方法』發明專利案,其主要係在工業製程中引入人工智慧的方式,例如自動取樣、人工智慧影像標記、模型訓練、分類測試驗證等,藉此降低人力的負擔。Taiwan's invention patent No. I667575, "Defect Detection System and Method Using Artificial Intelligence," is mainly about introducing artificial intelligence into industrial processes, such as automatic sampling, artificial intelligence image labeling, model training, classification test verification, etc., to reduce the burden of manpower.

我國第I731565號『片狀材料快速檢測瑕疵整合系統及其使用方法』發明專利案,其係針對連續整捲的材料(例如:布料)進行檢測,並運用人工智慧技術進行各種瑕疵的檢測,如:缺邊、勾紗、壓痕、破洞等。Taiwan's invention patent No. I731565, "Integrated system for rapid defect detection of sheet materials and its use method," is aimed at detecting continuous rolls of materials (such as cloth) and uses artificial intelligence technology to detect various defects, such as missing edges, hooks, embossing marks, holes, etc.

我國第I749714號『瑕疵檢測方法、瑕疵分類方法及其系統』發明專利案,其係利用機器學習法,將影像中良品的各個區域進行模型訓練,接著透過拍攝一張或多張良品的影像後,可以針對每個區域來進行瑕疵檢測,並且也針對各區域的位置、面積、顏色、亮度以及形狀來進行檢測門檻值的設定,以實現瑕疵檢測。Taiwan's invention patent No. I749714, "Defect Detection Method, Defect Classification Method and System thereof," uses machine learning to train models for each area of a good product in an image. Then, after taking one or more images of a good product, defect detection can be performed on each area. The detection threshold is also set for each area based on its position, area, color, brightness and shape to achieve defect detection.

但是,該等前案均利用人工智慧技術進行辨識,必須收集大量的樣本進行學習訓練,始能進行檢測,特別是每個新產品都需要長時間收集大量正樣本或負樣本進行學習,且通常還需人工進行圖像標記。However, all of these previous cases utilize artificial intelligence technology for identification, and a large number of samples must be collected for learning and training before testing can be performed. In particular, each new product requires a long period of time to collect a large number of positive or negative samples for learning, and usually requires manual image labeling.

由於人工智慧技術主要係用於偵測及分類,在實務應用方面,還有以下幾點問題:Since artificial intelligence technology is mainly used for detection and classification, there are still the following problems in practical application:

1.無法找出細部或微小瑕疵的工件:不管偵測或分類都不易辨識。1. It is impossible to find details or tiny defects in workpieces: it is difficult to identify whether by detection or classification.

2.瑕疵工件的圖像不易收集:若欲檢測的生產線的不良率過低時,收集一定數量的瑕疵圖像較為耗時。2. It is difficult to collect images of defective workpieces: If the defect rate of the production line to be inspected is too low, it is time-consuming to collect a certain number of defective images.

3.模型驗證時程久:模型經過圖像收集、訓練、測試等循環步驟,耗時較久。3. Model verification takes a long time: The model goes through a cycle of image collection, training, and testing, which takes a long time.

4.應用於不同產業時需要個別導入:雖然機器學習模式通用,但不同應依賴不同模型的訓練與導入。4. Individual introduction is required when applied to different industries: Although the machine learning model is universal, different models should be trained and introduced.

5.辨識時間較久:可能是傳統自動光學檢查系統檢測時間的數倍或數十倍。5. Long recognition time: It may be several or even dozens of times longer than the detection time of traditional automatic optical inspection systems.

本發明之主要目的乃係在提供一種自動化瑕疵檢測方法,其係針對大量批次生產製造的零組件或工件,運用影像辨識進行瑕疵檢測時,可以將這些重複出現的工件圖案,透過交互比對來進行瑕疵檢測,相較於傳統自動化光學檢測系統的客製化作法、及利用人工智慧需大量數據資料進行演算的方式,本發明免去了客製化、及收集大量樣本的作業方式,大幅縮短導入時程並降低成本,以實現更快速有效的瑕疵檢測方法。The main purpose of the present invention is to provide an automated defect detection method, which is aimed at components or workpieces manufactured in large batches. When using image recognition for defect detection, these repeated workpiece patterns can be cross-matched for defect detection. Compared with the customization of traditional automated optical inspection systems and the use of artificial intelligence that requires a large amount of data for calculation, the present invention eliminates the need for customization and the collection of a large number of samples, greatly shortens the introduction process and reduces costs, so as to achieve a faster and more effective defect detection method.

緣是,為達成上述目的,本發明所提供之自動化瑕疵檢測方法,係對生產不良率低於百分之二十的生產線進行瑕疵檢測,並包含一設定程序及一檢測程序,其中,Therefore, in order to achieve the above-mentioned purpose, the automated defect detection method provided by the present invention is to perform defect detection on a production line with a production defect rate of less than 20%, and includes a setting procedure and a detection procedure, wherein:

該設定程序包含以下步驟:The setup process includes the following steps:

逐個拍攝多個第一待測物,以取得多數分別僅包含有單一個該第一待測物之第一影像;Photographing a plurality of first objects to be tested one by one to obtain a plurality of first images each including only a single first object to be tested;

自各該第一影像中分別提取出一第一特徵資訊;Extracting first feature information from each of the first images;

將該些第一特徵資訊以兩個為一組,分別對同一組中的兩個第一特徵資訊彼此之間進行差異比對,當同組中的比對結果為實質相同時;係將該組之該第一特徵資訊標記為正常,而當比對結果為實質不同時,則將該組之該第一特徵資訊標記為異常;The first feature information is grouped into two pieces, and the two first feature information in the same group are respectively compared for differences. When the comparison result in the same group is substantially the same, the first feature information in the group is marked as normal, and when the comparison result is substantially different, the first feature information in the group is marked as abnormal;

將標記為正常的第一特徵資訊整合成一標準特徵集;Integrate the first feature information marked as normal into a standard feature set;

該檢測程序包含以下步驟:The testing procedure includes the following steps:

取得一位於該生產線上的第二待測物之第二影像;Acquire a second image of a second object to be tested on the production line;

提取該第二影像的第二特徵資訊,並與該標準特徵集進行比對,當比對結果為實質相同時,係將該第二影像及/或該第二特徵資訊標記為正常;當比對結果為實質不同時,係將該第二影像及/或該第二特徵資訊標記為異常。The second feature information of the second image is extracted and compared with the standard feature set. When the comparison result is substantially the same, the second image and/or the second feature information is marked as normal; when the comparison result is substantially different, the second image and/or the second feature information is marked as abnormal.

據此,本發明係將屬於同一組的第一待測影像中的兩第一特徵資訊,以同中求異的方式進行比對,改善了習知客製化設計、及收集大量樣本等缺點,從而快速地獲得該標準特徵集,以作為瑕疵檢測之參照。Accordingly, the present invention compares two first feature information in the first test image belonging to the same group in a similarity-seeking-differences manner, thereby improving the shortcomings of learning customized design and collecting a large number of samples, thereby quickly obtaining the standard feature set as a reference for defect detection.

進一步來說,該生產線的生產不良率較佳係低於百分之一,更佳係低於千分之五。Furthermore, the production defect rate of the production line is preferably less than 1%, and more preferably less than 0.5%.

在一實施例中,該第一特徵資訊包含該第一待測物之輪廓、尺寸、顏色。In one embodiment, the first characteristic information includes the outline, size, and color of the first object to be measured.

在一實施例中,本發明之自動化瑕疵檢測方法更判斷同組中的該等第一特徵資訊間之一第一相似度是否落入一預設的第一閾值區間,其中,當該第一相似度未落入該第一閾值區間時,係將該組之該等第一特徵資訊標記為正常;當該第一相似度落入該第一閾值區間時,則將該組之該等第一特徵資訊標記為異常。In one embodiment, the automatic defect detection method of the present invention further determines whether a first similarity between the first feature information in the same group falls within a preset first threshold interval, wherein when the first similarity does not fall within the first threshold interval, the first feature information of the group is marked as normal; when the first similarity falls within the first threshold interval, the first feature information of the group is marked as abnormal.

在一實施例中,該第二特徵資訊包含該第二待測物之輪廓、尺寸、顏色。In one embodiment, the second feature information includes the outline, size, and color of the second object to be measured.

在一實施例中,本發明之自動化瑕疵檢測方法更判斷該第二特徵資訊與該標準特徵集間之一第二相似度是否落入一預設的第二閾值區間,當該第二相似度未落入該第二閾值區間時,係將該第二影像及/或該第二特徵資訊標記為正常;當該第二相似度落入該第二閾值區間時,係將該第二影像及/或該第二特徵資訊標記為異常。In one embodiment, the automatic defect detection method of the present invention further determines whether a second similarity between the second feature information and the standard feature set falls within a preset second threshold interval. When the second similarity does not fall within the second threshold interval, the second image and/or the second feature information is marked as normal; when the second similarity falls within the second threshold interval, the second image and/or the second feature information is marked as abnormal.

在一實施例中,在該設定程序中,還分別對各該第一影像進行去背景、二值化及/或銳化處理,以獲得經影像前處理之第一影像。In one embodiment, in the setting procedure, background removal, binarization and/or sharpening processing are performed on each of the first images to obtain the first image after image pre-processing.

在一實施例中,在該設定程序中,更對經影像前處理之第一影像進行物件偵測,以獲得該第一待測物於該第一影像中的位置、形狀或大小。In one embodiment, in the setting procedure, object detection is further performed on the first image after image pre-processing to obtain the position, shape or size of the first object to be detected in the first image.

在一實施例中,在該設定程序中,係根據物件偵測結果,定位該第一待測物於該第一影像中的所在位置。In one embodiment, in the setting procedure, the position of the first object to be detected in the first image is located according to the object detection result.

在一實施例中,在該檢測程序中,係對該第二影像進行物件偵測,以獲得該第二待測物於該第二影像中的位置、形狀或大小。In one embodiment, in the detection procedure, object detection is performed on the second image to obtain the position, shape or size of the second object to be detected in the second image.

在一實施例中,在該檢測程序中,係根據物件偵測結果,定位該第二待測物於該第二影像中的所在位置。In one embodiment, in the detection procedure, the position of the second object to be detected in the second image is located according to the object detection result.

首先說明,以下透過本發明一較佳實施例中所說明之待測物,係以生產線上之工件為例,具體為電容器橡膠封口產品,但關於瑕疵檢測技術中,無礙於本發明技術特徵揭露之部分,將不在以下的說明中敘及,惟此等省略之部分乃屬本發明所屬技術領域中之通常知識者在本發明申請之前既已知悉的習知技術,其省略亦不影響本發明主要技術特徵揭露的完整性。First of all, it is to be noted that the object to be tested described in the following preferred embodiment of the present invention is a workpiece on a production line, specifically a capacitor rubber sealing product. However, the part of the defect detection technology that does not hinder the disclosure of the technical features of the present invention will not be described in the following description. However, such omitted parts are the common knowledge in the technical field to which the present invention belongs, and the omission does not affect the completeness of the disclosure of the main technical features of the present invention.

本發明所指「拍攝」,係指利用一影像擷取模組,例如CCD灰階/彩色相機、線掃描相機等設備,來擷取一待測物的實際影像。並且,在該影像擷取模組作業的過程中,外在環境條件及待測物外型結構等因素均會影響光源到待測物表面的受光面積及反射角,有可能會使影像不清晰,據此,為了獲得更清晰的影像,還可利用一光源,以正向光、背光、或同軸光等對待測物進行補光,以提高該待測影像的對比度。The "shooting" referred to in the present invention refers to the use of an image capture module, such as a CCD grayscale/color camera, a line scan camera, etc., to capture an actual image of an object to be tested. In addition, during the operation of the image capture module, factors such as external environmental conditions and the external structure of the object to be tested will affect the light receiving area and reflection angle from the light source to the surface of the object to be tested, which may make the image unclear. Therefore, in order to obtain a clearer image, a light source can be used to supplement the light of the object to be tested with forward light, backlight, or coaxial light to improve the contrast of the image to be tested.

本發明所指「影像前處理」,係指對影像進行分析、加工及處理,以從處理後的影像中獲得更多、更有用的資訊,其中,常見的影像前處理為去背景、二值化或銳化技術等。The "image pre-processing" referred to in the present invention refers to analyzing, processing and treating an image to obtain more and more useful information from the processed image. Among them, common image pre-processing includes background removal, binarization or sharpening technology.

本發明所指「物件偵測」(Object Detection),係指同時辨識物件的位置與尺寸。The "object detection" referred to in the present invention refers to the simultaneous identification of the position and size of an object.

本發明所指「感興趣區域」(Region of Interest,ROI),係指透過前述物件偵測的結果,而於影像中以方框、圓、橢圓、不規則多邊形等方式勾勒出需要處理的區域。本發明所指「正常」,亦可被理解為「無瑕疵」,係指所比對的待測物影像未出現瑕疵。The "Region of Interest" (ROI) referred to in the present invention refers to the area to be processed in the image, which is outlined in the form of a box, circle, ellipse, irregular polygon, etc. through the result of the aforementioned object detection. The "normal" referred to in the present invention can also be understood as "defect-free", which means that the image of the object to be tested does not have any defects.

本發明所指「異常」,係指所比對的待測物影像出現瑕疵。The term "abnormal" as used in the present invention refers to a defect in the image of the object under test being compared.

請參閱圖2所示,在本發明一較佳實施例中所提供之自動化瑕疵檢測方法,係對生產不良率低於20%的生產線進行瑕疵檢測,較佳地生產不良率低於百分之一,更佳地生產不良率低於千分之五,且該方法包含一設定程序及一檢測程序。Please refer to FIG. 2 , which shows an automated defect detection method provided in a preferred embodiment of the present invention, which performs defect detection on a production line with a production defect rate of less than 20%, preferably less than 1% and more preferably less than 0.5%. The method includes a setup procedure and a detection procedure.

其中,該設定程序具有下列步驟;The setting procedure includes the following steps:

步驟S101:取得待測影像Step S101: Obtain the image to be tested

連續地逐個拍攝多數待測物,以取得多數分別僅包含有單一個該待測物之第一影像。A plurality of objects to be tested are photographed one by one continuously to obtain a plurality of first images each containing only a single object to be tested.

步驟S102:影像前處理Step S102: Image pre-processing

分別對各該第一影像進行影像前處理。Perform image pre-processing on each of the first images respectively.

步驟S103:物件偵測Step S103: Object detection

分別對經步驟S102處理後之各該第一影像進行物件偵測,例如,只要各該前處理影像中該待測物的邊緣有黑白輪廓,就可以將該待測物偵測出來,並獲得該第一待測物於該第一影像中的位置、形狀或大小。Object detection is performed on each of the first images processed in step S102. For example, as long as there is a black and white outline at the edge of the object to be detected in each of the pre-processed images, the object to be detected can be detected, and the position, shape or size of the first object to be detected in the first image can be obtained.

步驟S104:定位校正Step S104: Positioning calibration

由於拍攝時,待測物的位置會有偏差,係根據步驟S103的物件偵測結果,以定位該第一待測物於該第一影像中的所在位置,並於該第一影像中勾勒出一針對該第一待測物之第一感興趣區域。Since the position of the object to be measured may deviate during shooting, the position of the first object to be measured in the first image is located according to the object detection result of step S103, and a first region of interest for the first object to be measured is outlined in the first image.

步驟S105:特徵提取Step S105: Feature extraction

分別對步驟S104之各該第一感興趣區域分別提取出一第一特徵資訊,其中,該第一特徵資訊為該第一待測物之輪廓、尺寸或顏色。A first feature information is extracted from each of the first regions of interest in step S104, wherein the first feature information is the outline, size or color of the first object to be measured.

步驟S106:檢測比對Step S106: Detection and comparison

將該些第一特徵資訊以兩個為一組,分別對同一組中的兩個第一特徵資訊彼此之間進行差異比對,當同組中的比對結果為實質相同時,係將該組之該第一特徵資訊標記為正常,如圖3(a)所示;而當比對結果為實質不同時,則將該組之該第一特徵資訊標記為異常,如圖3(b)所示。The first feature information is grouped into two pieces, and the two first feature information in the same group are compared with each other. When the comparison results in the same group are substantially the same, the first feature information in the group is marked as normal, as shown in Figure 3(a); when the comparison results are substantially different, the first feature information in the group is marked as abnormal, as shown in Figure 3(b).

具體來說,於本例中,前述比對的方式為判斷同組中的該等第一特徵資訊間的該第一待測物之一第一相似度是否落入一預設的第一閾值區間,該第一相似度為輪廓相似度、尺寸相似度或顏色相似度,其中,當該第一相似度未落入該第一閾值區間時,係將該組之該等第一特徵資訊標記為正常,並代表了該組之該等第一影像中所包含的各該第一待測物屬正常;當該第一相似度落入該第一閾值區間時,則將該組之該等第一特徵資訊標記為異常,並代表了該組之該等第一影像中所包含的各該第一待測物其中一者或兩者屬異常之態樣。Specifically, in this example, the aforementioned comparison method is to determine whether a first similarity of the first object to be tested between the first feature information in the same group falls within a preset first threshold interval, and the first similarity is contour similarity, size similarity or color similarity, wherein, when the first similarity does not fall within the first threshold interval, the first feature information of the group is marked as normal, and represents that the first objects to be tested contained in the first images of the group are normal; when the first similarity falls within the first threshold interval, the first feature information of the group is marked as abnormal, and represents that one or both of the first objects to be tested contained in the first images of the group are abnormal.

其中,一般來說,當該第一相似度為輪廓相似度或尺寸相似度任一者時,該第一閾值區間的範圍是介於0至1之間,但因基於不同的該第一特徵資訊進行比對,而會對應有不同的該第一閾值區間範圍,例如,該第一閾值區間範圍係介於0.5至1之間、該第一閾值區間範圍係介於0至0.8之間、或該第一閾值區間範圍係介於0.2至0.8之間。Generally speaking, when the first similarity is either contour similarity or size similarity, the range of the first threshold interval is between 0 and 1, but due to the comparison based on different first feature information, there will be different corresponding first threshold interval ranges, for example, the first threshold interval range is between 0.5 and 1, the first threshold interval range is between 0 and 0.8, or the first threshold interval range is between 0.2 and 0.8.

另外,當該第一特徵資訊為顏色(即彩色RGB)時,相對應地,該第一相似度為顏色相似度,而該第一閾值區間的範圍是介於0至255之間。進一步來說,還可依照實際需求來設定不同的該第一閾值區間的範圍,例如,該第一閾值區間範圍係介於83至255之間、或該第一閾值區間範圍係介於50至160之間。In addition, when the first feature information is color (i.e., color RGB), correspondingly, the first similarity is color similarity, and the range of the first threshold interval is between 0 and 255. Furthermore, different ranges of the first threshold interval can be set according to actual needs, for example, the first threshold interval range is between 83 and 255, or the first threshold interval range is between 50 and 160.

接著,將比對結果並儲存到一資料庫中。Then, the comparison results are stored in a database.

步驟S107:標準特徵集Step S107: Standard feature set

接續步驟S106,收集所有標記為正常的第一影像之第一特徵資訊,並經整合後得到一標準特徵集,得於後續的該檢測程序中作為檢測對照之用。Continuing to step S106, the first feature information of all first images marked as normal is collected and integrated to obtain a standard feature set, which is used as a detection reference in the subsequent detection process.

該檢測程序具有以下步驟:The test procedure has the following steps:

步驟S201:取得一位於該生產線上的第二待測物之第二影像。再者,在進行下一步的步驟前還可對該第二影像進行影像前處理。Step S201: Obtain a second image of a second object to be tested on the production line. Furthermore, the second image may be subjected to image pre-processing before proceeding to the next step.

步驟S202:對該第二影像進行物件偵測,以獲得該第二待測物於該第二影像中的位置、形狀或大小。Step S202: Perform object detection on the second image to obtain the position, shape or size of the second object to be detected in the second image.

步驟S203:根據步驟S202的物件偵測結果,並配合該標準特徵集之該標準感興趣區,以定位該第二待測物於該第二影像中的所在位置,並於該第二影像中勾勒出一針對該第二待測物之第二感興趣區域。Step S203: According to the object detection result of step S202 and in combination with the standard region of interest of the standard feature set, the second object to be detected is located in the second image, and a second region of interest for the second object to be detected is outlined in the second image.

步驟S204:自該第二影像中的該第二感興趣區域提取一第二特徵資訊,其中,該第二特徵資訊為該第二待測物之輪廓、尺寸或顏色。Step S204: extracting second feature information from the second region of interest in the second image, wherein the second feature information is the outline, size or color of the second object to be measured.

步驟S205:將該第二特徵資訊與該標準特徵集進行比對,當比對結果為實質相同時,係將該第二影像及/或該第二特徵資訊標記為正常;當比對結果為實質不同時,係將該第二影像及/或該第二特徵資訊標記標記為異常。Step S205: Compare the second feature information with the standard feature set. When the comparison result is substantially the same, mark the second image and/or the second feature information as normal; when the comparison result is substantially different, mark the second image and/or the second feature information as abnormal.

具體來說,在本例中,前述比對方式為判斷該第二特徵資訊與該標準特徵集間之一第二相似度是否落入一預設的第二閾值區間,而該第二相似度為輪廓相似度、尺寸相似度或顏色相似度,其中,當該第二相似度未落入該第二閾值區間時,係將該第二影像及/或該第二特徵資訊為正常;當該第二相似度落入該第二閾值區間時,係將該第二影像及/或該第二特徵資訊標記為異常。Specifically, in this example, the aforementioned comparison method is to determine whether a second similarity between the second feature information and the standard feature set falls within a preset second threshold interval, and the second similarity is contour similarity, size similarity or color similarity, wherein, when the second similarity does not fall within the second threshold interval, the second image and/or the second feature information is normal; when the second similarity falls within the second threshold interval, the second image and/or the second feature information is marked as abnormal.

其中,一般來說,當該第二相似度為輪廓相似度或尺寸相似度任一者時,該第二閾值區間的範圍是介於0至1之間,但因基於不同的該第二特徵資訊進行比對,而會對應有不同的該第二閾值區間範圍,例如,該第二閾值區間範圍係介於0.5至1之間、該第二閾值區間範圍係介於0至0.8之間、或該第二閾值區間範圍係介於0.2至0.8之間。Generally speaking, when the second similarity is either contour similarity or size similarity, the range of the second threshold interval is between 0 and 1, but due to the comparison based on different second feature information, there will be different corresponding second threshold interval ranges, for example, the second threshold interval range is between 0.5 and 1, the second threshold interval range is between 0 and 0.8, or the second threshold interval range is between 0.2 and 0.8.

另外,當該第二特徵資訊所指的顏色(例如彩色RGB)時,相對應地,該第二相似度為顏色相似度,而該第二閾值區間的範圍是介於0至255之間。進一步來說,還可依照實際需求來設定不同的該第二閾值區間的範圍,例如,該第二閾值區間範圍係介於83至255之間、或該第二閾值區間範圍係介於50至160之間。In addition, when the second feature information refers to a color (e.g., color RGB), the second similarity is a color similarity, and the range of the second threshold interval is between 0 and 255. Furthermore, different ranges of the second threshold interval can be set according to actual needs, for example, the second threshold interval range is between 83 and 255, or the second threshold interval range is between 50 and 160.

步驟S206:最後將比對結果儲存到該資料庫中,並收集所有標記為正常的第一影像之第一特徵資訊,並經整合後得到一標準特徵集。Step S206: Finally, the comparison result is stored in the database, and the first feature information of all first images marked as normal is collected and integrated to obtain a standard feature set.

藉由上述技術,本發明係能夠自動偵測、鎖定待測物,並以任兩待測物為一組,依其影像進行比對,以實現自動化瑕疵檢測之目的。By using the above technology, the present invention is able to automatically detect and lock the objects to be tested, and to group any two objects to be tested and compare their images to achieve the purpose of automated defect detection.

再者,本發明可直接應用到現有的設備中,例如套用至原有的相機取像通訊界面上、或是包裝成函式庫以供軟體開發人員整合之用。Furthermore, the present invention can be directly applied to existing equipment, for example, applied to the original camera image acquisition communication interface, or packaged into a library for software developers to integrate.

此外,本發明於檢測過程中省去了傳統自動化光學檢測系統的客製化作法,且並未採用人工智慧技術進行演算或辨識,亦避免了進行冗長的大量數據收集、整理、運算等作業,更無須再對不同的瑕疵進行分類,自可達到縮短導入時程並降低成本之目的。In addition, the present invention eliminates the need for customization of traditional automated optical inspection systems during the inspection process, and does not use artificial intelligence technology for calculation or identification. It also avoids lengthy operations such as collecting, sorting, and calculating a large amount of data, and there is no need to classify different defects, thereby achieving the goal of shortening the introduction schedule and reducing costs.

如第4圖所示,本發明第二實施例還提供一種自動化瑕疵檢測系統,係包括一光源10、一影像擷取模組20、一運算模組30、一資料庫40,其中,該影像擷取模組20可為但不限於CCD灰階/彩色相機或線掃描相機,用以分別拍攝該等第一待測物及該第二待測物。As shown in FIG. 4 , the second embodiment of the present invention further provides an automated defect detection system, which includes a light source 10, an image capture module 20, a calculation module 30, and a database 40, wherein the image capture module 20 may be, but is not limited to, a CCD grayscale/color camera or a line scan camera, for photographing the first objects to be tested and the second objects to be tested, respectively.

該光源10可為但不限於白熾燈、低壓氣體放電燈、低壓鈉燈、冷陰極燈管(CCFL),HID燈(High Intensity Discharge Lamp)、LED燈,針對環境光源不足問題,對該第一待測物或該第二待測物進行補光。The light source 10 may be, but is not limited to, an incandescent lamp, a low-pressure gas discharge lamp, a low-pressure sodium lamp, a cold cathode lamp (CCFL), a HID lamp (High Intensity Discharge Lamp), or an LED lamp, and is used to supplement the light for the first object to be tested or the second object to be tested in order to solve the problem of insufficient ambient light.

該運算模組30可為但不限於中央處理單元(Central Processing Unit,CPU),或是其他可程式化之一般用途或特殊用途的微處理器(Microprocessor)、數位信號處理器(Digital Signal Processor,DSP)、可程式化控制器、特殊應用積體電路(Application Specific Integrated Circuit,ASIC)或其他類似元件或上述元件的組合,且該運算模組30係分別與該光源10、該影像擷取模組20及該資料庫30連接,用以執行前述之該設定程序與該檢測程序之部分的步驟,例如影像前處理、物件偵測、定位校正、特徵提取、檢測比對等等,據以快速地檢測出該第二待測物是否存在有瑕疵。The computing module 30 may be, but is not limited to, a central processing unit (CPU), or other programmable general-purpose or special-purpose microprocessors, digital signal processors (DSP), programmable controllers, application-specific integrated circuits (ASIC), or other similar components or a combination of the above components, and the computing module 30 is respectively connected to the light source 10, the image acquisition module 20, and the database 30 to execute the aforementioned steps of the setting procedure and part of the detection procedure, such as image pre-processing, object detection, positioning correction, feature extraction, detection comparison, etc., so as to quickly detect whether the second object to be tested has defects.

該資料庫40具體的儲存媒體可以為相變記憶體(PRAM)、靜態隨機存取記憶體(SRAM)、動態隨機存取記憶體(DRAM)、快閃記憶體碟、唯讀記憶體(Read-Only Memory,ROM)、隨機存取記憶體(Random Access Memory,RAM)、磁碟或光碟等,用以儲存前述該等數據資料、或該運算模組30的運算結果。The specific storage medium of the database 40 can be phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), flash memory disk, read-only memory (ROM), random access memory (RAM), magnetic disk or optical disk, etc., for storing the aforementioned data or the calculation results of the calculation module 30.

綜上所述,雖然本發明已以實施例揭露如上,然其並非用以限定本發明。本發明所屬技術領域中具有通常知識者,在不脫離本發明之精神和範圍內,當可作各種之更動與潤飾。因此,本發明之保護範圍當視後附之申請專利範圍所界定者為準。In summary, although the present invention has been disclosed as above by way of embodiments, it is not intended to limit the present invention. Those with ordinary knowledge in the technical field to which the present invention belongs can make various changes and modifications without departing from the spirit and scope of the present invention. Therefore, the scope of protection of the present invention shall be subject to the scope defined in the attached patent application.

10:光源10: Light source

20:影像擷取模組20: Image capture module

30:運算模組30: Computational Module

40:資料庫40: Database

S101、S102、S103、S104、S105、S106、S107、S201、S202、S203、S204、S205:步驟S101, S102, S103, S104, S105, S106, S107, S201, S202, S203, S204, S205: Steps

圖1(a)為傳統封口橡膠的正面與反面之影像。Figure 1(a) shows the front and back images of a traditional sealing rubber.

圖1(b)為傳統封口橡膠的瑕疵種類示意圖。Figure 1(b) is a schematic diagram showing the types of defects in traditional sealing rubber.

圖2係本發明一第一實施例之流程圖。FIG. 2 is a flow chart of a first embodiment of the present invention.

圖3(a)及圖3(b)分別為本發明一第一實施例之檢測第一待測物為正常或異常之示意圖。FIG. 3( a ) and FIG. 3( b ) are schematic diagrams of detecting whether the first object to be tested is normal or abnormal according to a first embodiment of the present invention.

圖4係本發明一第二實施例之系統方塊圖。FIG4 is a system block diagram of a second embodiment of the present invention.

S101、S102、S103、S104、S105、S106、S107、S201、S202、S203、S204、S205:步驟 S101, S102, S103, S104, S105, S106, S107, S201, S202, S203, S204, S205: Steps

Claims (11)

一種自動化瑕疵檢測方法,係對生產不良率低於百分之二十的生產線進行瑕疵檢測,並包含一設定程序及一檢測程序; 該設定程序包含以下步驟: 逐個拍攝多個第一待測物,以取得多數分別僅包含有單一個該第一待測物之第一影像; 自各該第一影像中分別提取出一第一特徵資訊; 將該些第一特徵資訊以兩個為一組,分別對同一組中的兩個第一特徵資訊彼此之間進行差異比對,當同組中的比對結果為實質相同時;係將該組之該第一特徵資訊標記為正常,而當比對結果為實質不同時,則將該組之該第一特徵資訊標記為異常; 將標記為正常的第一特徵資訊整合成一標準特徵集; 該檢測程序包含以下步驟: 取得一位於該生產線上的第二待測物之第二影像; 提取該第二影像的第二特徵資訊,並與該標準特徵集進行比對,當比對結果為實質相同時,係將該第二影像及/或該第二特徵資訊標記為正常;當比對結果為實質不同時,係將該第二影像及/或該第二特徵資訊標記為異常。 An automated defect detection method is to perform defect detection on a production line with a production defect rate of less than 20%, and includes a setting procedure and a detection procedure; The setting procedure includes the following steps: Photographing a plurality of first test objects one by one to obtain a plurality of first images each containing only a single first test object; Extracting a first feature information from each first image; Grouping the first feature information into two pieces, and performing a difference comparison between two first feature information in the same group. When the comparison results in the same group are substantially the same, the first feature information in the group is marked as normal, and when the comparison results are substantially different, the first feature information in the group is marked as abnormal; Integrating the first feature information marked as normal into a standard feature set; The detection procedure includes the following steps: Obtain a second image of a second object to be tested on the production line; Extract the second feature information of the second image and compare it with the standard feature set. When the comparison result is substantially the same, the second image and/or the second feature information is marked as normal; when the comparison result is substantially different, the second image and/or the second feature information is marked as abnormal. 如請求項1所述之自動化瑕疵檢測方法,其中,該生產線的生產不良率較佳係低於百分之一,更佳係低於千分之五。An automated defect detection method as described in claim 1, wherein the production defect rate of the production line is preferably less than 1%, and more preferably less than 0.5%. 如請求項1所述之自動化瑕疵檢測方法,其中,該第一特徵資訊包含該第一待測物之輪廓、尺寸、顏色。An automated defect detection method as described in claim 1, wherein the first feature information includes the outline, size, and color of the first object to be detected. 如請求項3所述之自動化瑕疵檢測方法,其中,更判斷同組中的該等第一特徵資訊間之一第一相似度是否落入一預設的第一閾值區間,而該第一相似度為輪廓相似度、尺寸相似度或顏色相似度,其中,當該第一相似度未落入該第一閾值區間時,係將該組之該等第一特徵資訊標記為正常;當該第一相似度落入該第一閾值區間時,則將該組之該等第一特徵資訊標記為異常。An automated defect detection method as described in claim 3, wherein it is further determined whether a first similarity between the first feature information in the same group falls within a preset first threshold interval, and the first similarity is contour similarity, size similarity or color similarity, wherein when the first similarity does not fall within the first threshold interval, the first feature information of the group is marked as normal; when the first similarity falls within the first threshold interval, the first feature information of the group is marked as abnormal. 如請求項1所述之自動化瑕疵檢測方法,其中,該第二特徵資訊包含該第二待測物之輪廓、尺寸、顏色。An automated defect detection method as described in claim 1, wherein the second feature information includes the contour, size, and color of the second object to be detected. 如請求項5所述之自動化瑕疵檢測方法,其中,更判斷該第二特徵資訊與該標準特徵集間之一第二相似度是否落入一預設的第二閾值區間,當該第二相似度未落入該第二閾值區間時,係將該第二影像及/或該第二特徵資訊標記為正常;當該第二相似度落入該第二閾值區間時,係將該第二影像及/或該第二特徵資訊標記為異常。An automated defect detection method as described in claim 5, wherein it is further determined whether a second similarity between the second feature information and the standard feature set falls within a preset second threshold interval; when the second similarity does not fall within the second threshold interval, the second image and/or the second feature information is marked as normal; when the second similarity falls within the second threshold interval, the second image and/or the second feature information is marked as abnormal. 如請求項1所述之自動化瑕疵檢測方法,其中,在該設定程序中,還分別對各該第一影像進行去背景、二值化及/或銳化處理,以獲得經影像前處理之第一影像。As described in claim 1, the automated defect detection method, wherein, in the setting procedure, background removal, binarization and/or sharpening are performed on each of the first images to obtain a first image that has undergone image pre-processing. 如請求項7所述之自動化瑕疵檢測方法,其中,在該設定程序中,更對經影像前處理之第一影像進行物件偵測,以獲得該第一待測物於該第一影像中的位置、形狀或大小。The automated defect detection method as described in claim 7, wherein, in the setup procedure, object detection is further performed on the first image after image pre-processing to obtain the position, shape or size of the first object to be detected in the first image. 如請求項8所述之自動化瑕疵檢測方法,其中,在該設定程序中,係根據物件偵測結果,定位該第一待測物於該第一影像中的所在位置。An automated defect detection method as described in claim 8, wherein, in the setting procedure, the position of the first object to be detected in the first image is located based on the object detection result. 如請求項1所述之自動化瑕疵檢測方法,其中,在該檢測程序中,係對該第二影像進行物件偵測,以獲得該第二待測物於該第二影像中的位置、形狀或大小。The automated defect detection method as described in claim 1, wherein, in the detection procedure, object detection is performed on the second image to obtain the position, shape or size of the second object to be detected in the second image. 如請求項10所述之自動化瑕疵檢測方法,其中,在該檢測程序中,係根據物件偵測結果,並配合該標準特徵集,以定位該第二待測物於該第二影像中的所在位置。An automated defect detection method as described in claim 10, wherein, in the detection procedure, the position of the second object to be detected in the second image is located based on the object detection result and in combination with the standard feature set.
TW111134763A 2022-09-14 2022-09-14 Automated defect detection methods TWI816549B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
TW111134763A TWI816549B (en) 2022-09-14 2022-09-14 Automated defect detection methods

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW111134763A TWI816549B (en) 2022-09-14 2022-09-14 Automated defect detection methods

Publications (2)

Publication Number Publication Date
TWI816549B TWI816549B (en) 2023-09-21
TW202411883A true TW202411883A (en) 2024-03-16

Family

ID=88966294

Family Applications (1)

Application Number Title Priority Date Filing Date
TW111134763A TWI816549B (en) 2022-09-14 2022-09-14 Automated defect detection methods

Country Status (1)

Country Link
TW (1) TWI816549B (en)

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9092841B2 (en) * 2004-06-09 2015-07-28 Cognex Technology And Investment Llc Method and apparatus for visual detection and inspection of objects
US7761182B2 (en) * 2005-01-21 2010-07-20 Photon Dynamics, Inc. Automatic defect repair system
TWI608322B (en) * 2016-11-02 2017-12-11 Printed circuit board inspection device
CN109949287A (en) * 2019-03-15 2019-06-28 江南大学 A kind of fabric defects detection method based on adaptivenon-uniform sampling and template correction

Similar Documents

Publication Publication Date Title
CN111325713B (en) Neural network-based wood defect detection method, system and storage medium
CN109829914B (en) Method and device for detecting product defects
US20190213725A1 (en) Board defect filtering method and device thereof and computer-readable recording medium
WO2021168733A1 (en) Defect detection method and apparatus for defect image, and computer-readable storage medium
CN113239930B (en) Glass paper defect identification method, system, device and storage medium
KR100598381B1 (en) in-line typed apparatus for auto wafer-defect classification and control method thereof
CN116188475B (en) Intelligent control method, system and medium for automatic optical detection of appearance defects
CN108257171A (en) Car radar assembling aperture detection method based on light vision
US11657599B2 (en) Method for detecting appearance of six sides of chip multi-layer ceramic capacitor based on artificial intelligence
CN109900719B (en) Visual detection method for blade surface knife lines
CN110349125A (en) A kind of LED chip open defect detection method and system based on machine vision
CN113608378B (en) Full-automatic defect detection method and system based on LCD (liquid crystal display) process
CN113706490B (en) Wafer defect detection method
CN113034488A (en) Visual detection method of ink-jet printed matter
CN111275700A (en) Terminal defect detection method and system based on deep learning
CN117392042A (en) Defect detection method, defect detection apparatus, and storage medium
CN116152242A (en) Visual detection system of natural leather defect for basketball
WO2022222467A1 (en) Open circular ring workpiece appearance defect detection method and system, and computer storage medium
CN114719749A (en) Metal surface crack detection and real size measurement method and system based on machine vision
CN114565558A (en) CMOS chip surface defect detection method and system
TWI816549B (en) Automated defect detection methods
CN111833350A (en) Machine vision detection method and system
TW202411883A (en) Automated defect detection methods
TW202411884A (en) Automatic defect detection method for multiple objects under test
KR20190119801A (en) Vehicle Headlight Alignment Calibration and Classification, Inspection of Vehicle Headlight Defects