TW202242713A - Method of automatically setting optical parameters and automated optical inspection system using the same - Google Patents
Method of automatically setting optical parameters and automated optical inspection system using the same Download PDFInfo
- Publication number
- TW202242713A TW202242713A TW110115481A TW110115481A TW202242713A TW 202242713 A TW202242713 A TW 202242713A TW 110115481 A TW110115481 A TW 110115481A TW 110115481 A TW110115481 A TW 110115481A TW 202242713 A TW202242713 A TW 202242713A
- Authority
- TW
- Taiwan
- Prior art keywords
- optical parameter
- recommended
- optical
- module
- error
- Prior art date
Links
Images
Landscapes
- Testing Of Optical Devices Or Fibers (AREA)
- Investigating Materials By The Use Of Optical Means Adapted For Particular Applications (AREA)
- Microscoopes, Condenser (AREA)
Abstract
Description
本揭露有關於一種光學參數自動設定方法及應用其之自動光學檢測系統。The disclosure relates to a method for automatically setting optical parameters and an automatic optical inspection system using the same.
光學檢測系統可對產品拍攝,以取得產品(待測物)之影像,並經由分析影像,以檢測產品的缺陷。為了提高檢測準確度,自動光學檢測系統所擷取的影像須具有適當或最佳的色彩資訊,因此需要視環境或檢測之產品調整光學檢測系統的光學參數。目前的光學參數設定主要是由專家根據經驗現場調整光學檢測系統的光學參數。The optical inspection system can take pictures of the product to obtain the image of the product (object to be tested), and analyze the image to detect product defects. In order to improve the detection accuracy, the image captured by the automatic optical inspection system must have appropriate or optimal color information, so it is necessary to adjust the optical parameters of the optical inspection system according to the environment or the product to be inspected. The current optical parameter setting is mainly to adjust the optical parameters of the optical detection system on the spot by experts according to experience.
然而,現場專家依經驗調整光學參數存在誤判的風險,此外不同的專家的判斷與設定之光學參數通常不完全相同,如此可能造成品質管控不穩定的情況。另一方面,在光學參數項目數量龐大的情況下,由專家人工調整光學參數相當耗時,可能降低生產速度與效能。However, there is a risk of misjudgment when on-site experts adjust optical parameters based on experience. In addition, the judgments of different experts are usually not exactly the same as the optical parameters set, which may lead to unstable quality control. On the other hand, in the case of a large number of optical parameter items, manual adjustment of optical parameters by experts is quite time-consuming, which may reduce production speed and efficiency.
本揭露係有關於一種光學參數自動設定方法及應用其之自動光學檢測系統。The present disclosure relates to a method for automatically setting optical parameters and an automatic optical inspection system using the same.
根據本揭露之一實施例,提出一種光學參數自動設定方法。光學參數自動設定方法適用於一自動光學檢測(Automated Optical Inspection, AOI)系統。自動光學檢測系統包括一攝像模組、一誤差運算模組、一自動設定模組及一光學參數推薦模組。光學參數自動設定方法包括以下步驟:攝像模組在自動光學檢測系統被用一第一推薦光學參數組設定對一待測物取像,以取得一推薦待測物影像;誤差運算模組依據一優化誤差函數,對一待測物標準圖與推薦待測物影像執行運算,以取得待測物標準圖與推薦待測物影像之間的一推薦誤差值;誤差運算模組判斷推薦誤差值是否收斂。當判斷推薦誤差值未收斂時,光學參數推薦模組依據推薦誤差值及第一推薦光學參數組執行運算,而取得一第二推薦光學參數組,並且自動設定模組依據第二推薦光學參數組設定自動光學檢測系統;以及,當判斷推薦誤差值收斂時,誤差運算模組決定第一推薦光學參數組為自動光學檢測系統之一最佳光學參數組。According to an embodiment of the present disclosure, a method for automatically setting optical parameters is proposed. The method for automatically setting optical parameters is suitable for an Automated Optical Inspection (AOI) system. The automatic optical inspection system includes a camera module, an error calculation module, an automatic setting module and an optical parameter recommendation module. The method for automatically setting optical parameters includes the following steps: the camera module is set to use a first recommended optical parameter set in the automatic optical inspection system to capture an image of an object to be measured to obtain a recommended image of the object to be measured; the error calculation module is based on a Optimizing the error function, performing calculations on a standard image of the DUT and a recommended image of the DUT to obtain a recommended error value between the standard image of the DUT and the recommended image of the UUT; the error calculation module determines whether the recommended error value is convergence. When it is judged that the recommended error value has not converged, the optical parameter recommendation module performs calculations based on the recommended error value and the first recommended optical parameter set to obtain a second recommended optical parameter set, and automatically sets the module based on the second recommended optical parameter set Setting the automatic optical inspection system; and, when judging that the recommended error values converge, the error calculation module determines that the first recommended optical parameter set is one of the best optical parameter sets of the automatic optical inspection system.
根據本揭露之另一實施例,提出一種自動光學檢測系統。自動光學檢測系統包括一攝像模組、一誤差運算模組、一光學參數推薦模組及一自動設定模組。攝像模組經配置以執行:在一推薦光學參數下對一待測物取像,以取得一推薦待測物影像。誤差運算模組經配置以以執行: 依據一優化誤差函數,對一待測物標準圖與推薦待測物影像執行運算,以取得待測物標準圖與推薦待測物影像之間的一推薦誤差值;及,判斷推薦誤差值是否收斂。光學參數推薦模組經配置執行:當判斷推薦誤差值未收斂時,依據推薦誤差值及第一推薦光學參數組執行運算,而取得一第二推薦光學參數組。當判斷推薦誤差值收斂時,誤差運算模組更用以執行:決定推薦光學參數為自動光學檢測系統之一最佳光學參數組。According to another embodiment of the present disclosure, an automatic optical inspection system is provided. The automatic optical detection system includes a camera module, an error calculation module, an optical parameter recommendation module and an automatic setting module. The camera module is configured to perform: taking an image of an object under test under a recommended optical parameter, so as to obtain a recommended image of the object under test. The error calculation module is configured to perform: performing calculations on a DUT standard image and recommended DUT image according to an optimized error function to obtain a recommendation between the DUT standard image and the recommended DUT image an error value; and, judging whether the recommended error value converges. The optical parameter recommendation module is configured to execute: when it is judged that the recommended error value has not converged, the operation is performed according to the recommended error value and the first recommended optical parameter set to obtain a second recommended optical parameter set. When it is judged that the recommended error value converges, the error calculation module is further used to execute: determine the recommended optical parameter as one of the best optical parameter sets of the automatic optical inspection system.
為了對本揭露之上述及其他方面有更佳的瞭解,下文特舉實施例,並配合所附圖式詳細說明如下:In order to have a better understanding of the above and other aspects of the present disclosure, the following specific embodiments are described in detail in conjunction with the attached drawings as follows:
請參照第1~2及3A(a)~3H(b)圖,第1圖繪示依照本揭露一實施例之自動光學檢測(Automated Optical Inspection, AOI)系統100之示意圖,第2A及2B圖繪示第1圖之自動光學檢測系統100的光學參數自動設定方法的流程圖,而第3A(a)~3H(b)圖繪示第2A及2B圖之推薦光學參數
的取得過程示意圖。
Please refer to Figures 1-2 and 3A(a)-3H(b), Figure 1 shows a schematic diagram of an automated optical inspection (Automated Optical Inspection, AOI)
如第1圖所示,自動光學檢測系統100包括優化模組110、誤差運算模組120、光學參數推薦模組130、攝像模組140、自動設定模組150及光源模組160。攝像模組140例如是光學攝影機或線性光學掃描器。光源模組160例如是包含至少一光源(未繪示)。優化模組110、誤差運算模組120、光學參數推薦模組130與自動設定模組150之至少一者例如是採用半導體製程所形成的實體電路(circuit),或為韌體而藉由一運算處理器來完成。此外,優化模組110、誤差運算模組120、光學參數推薦模組130與自動設定模組150之至少一者可整合成單一模組,或整合於一控制器(未繪示)或運算處理器(未繪示)中。As shown in FIG. 1 , the automatic
如第1圖所示,攝像模組140在該自動光學檢測系統100被設定為推薦光學參數組
(例如,第3B圖之第一推薦光學參數組
)下,對待測物取像,以取得推薦待測物影像
。誤差運算模組120經配置以執行依據優化誤差函數EF,對待測物標準圖F2與推薦待測物影像
執行運算,以取得待測物標準圖F2與推薦待測物影像
之間的推薦誤差值
。接著,誤差運算模組120判斷推薦誤差值
是否收斂。當判斷推薦誤差值
收斂時,誤差運算模組120決定推薦光學參數組
(例如,第3B圖之第一推薦光學參數組
)為自動光學檢測系統100之最佳光學參數組;當誤差運算模組120判斷推薦誤差值
未收斂時,光學參數推薦模組130經配置以執行依據推薦誤差值
及第一推薦光學參數組
執行運算,而取得另一推薦光學參數組
(例如,第3E圖之第二推薦光學參數組
)。如此,自動光學檢測系統100可自動取得最佳光學參數組,改善習知人工調光的問題。
As shown in Figure 1, the camera module 140 is set as the recommended optical parameter set in the automatic optical inspection system 100 (For example, the first recommended optical parameter set in Fig. 3B ), take an image of the object to be measured to obtain the recommended image of the object to be measured . The error calculation module 120 is configured to execute the optimized error function EF, the standard image F2 of the object to be measured and the image of the recommended object to be measured Perform calculations to obtain the standard image F2 of the DUT and the recommended DUT image The recommended error value between . Next, the error calculation module 120 judges the recommended error value Whether to converge. When judging the recommended error value When converging, the error calculation module 120 decides to recommend the optical parameter set (For example, the first recommended optical parameter set in Fig. 3B ) is the optimal optical parameter set of the automatic
本文的「光學參數組」例如是包含至少一光學參數類型,如
等P種參數類型,其中
可分別表示不同的光學參數類型,如光源模組160的光源參數及/或攝像模組140的攝像參數,其中光源參數例如是照射光的色溫、亮度、發光角、發光時間及/或照射角度等的光學參數類型,而攝像參數例如是攝像模組的曝光時間等的光學參數類型。P表示光學參數類型的數量,本揭露實施例不限定P的最大值。在本實施例中,光學參數類型係以二個為例說明,如
及
,例如是分別為攝像模組的曝光時間及光源模組的發光時間。光源模組160之照明模式可由自動設定模組150依據推薦光學參數組
的相關光學參數類型執行設定,而攝像模組140之攝像模式可由自動設定模組150依據推薦光學參數組
的相關光學參數類型執行設定。光源模組160提供照明光給待測物(未繪示),而攝像模組140對待測物攝像,以取得待測物之推薦待測物影像。前述「待測物」例如是任何可透過AOI系統進行線上檢測(如,缺陷檢測、產品種類檢測等)的產品,如半導體晶片、電路板等,然本揭露不限制待測物的種類。
The "optical parameter set" herein, for example, includes at least one optical parameter type, such as and other P parameter types, where Different types of optical parameters can be represented, such as the light source parameters of the
以下係以第2A及2B圖之流程圖進一步說明本揭露實施例之自動光學檢測系統100的光學參數自動設定方法。The following is a further description of the automatic optical parameter setting method of the automatic
在步驟S110中,取得優化誤差函數EF。本實施例的優化誤差函數EF是由優化模組110運算取得(如第1圖所示)。然而在其他實施方式中,優化誤差函數EF可在線下或離線執行運算來事先取得,因此自動光學檢測系統可不包含優化模組。In step S110, an optimized error function EF is obtained. The optimization error function EF of this embodiment is obtained through the operation of the optimization module 110 (as shown in FIG. 1 ). However, in other implementations, the optimization error function EF can be obtained in advance by performing calculations offline or offline, so the automatic optical inspection system may not include an optimization module.
在步驟S110中,優化模組110對訓練標準圖F1(繪示於第1圖)、至少一專家標準影像M11
S(繪示於第1圖)及至少一非專家標準影像M12
t(繪示於第1圖)執行運算,而取得優化誤差函數EF,其中S為等於或大於1的正整數,S之最大值視專家標準影像M11
S的總數而定,本揭露實施例不加以限定,而t為等於或大於1的正整數,t之最大值視非專家標準影像M11
t的總數而定,本揭露實施例不加以限定。訓練標準圖F1的數量例如是1個,專家標準影像M11
S的數量可以是至少一個。每個專家可從數張影像中,挑選出一張與訓練標準圖F1 最接近的影像(例如可以是色溫、亮度等各種色彩資訊方面最接近者),並將各個專家所選出的影像定義為「專家標準影像」,其餘未被選取得的影像定義為「非專家標準影像」。本揭露實施例不限定專家標準影像M11
S的數量以及非專家標準影像M12
t的數量。如第1圖所示,訓練標準圖F1、專家標準影像M11
S及非專家標準影像M12
t可儲存於第一資料庫D1,而待測物標準圖F2可儲存於第二資料庫D2。第一資料庫D1與第二資料庫D2至少一者可隸屬於自動光學檢測系統100,然本揭露實施例不受此限。
In step S110, the
在一實施例中,優化模組110以最小化訓練標準圖F1與專家標準影像M11
S之間的誤差以及非最小化訓練標準圖F1與非專家標準影像M12
t之間的誤差為目標,取得優化誤差函數EF的優化權重
。例如,優化模組110以訓練標準圖F1與專家標準影像M11
S之間的目標誤差TE1設為0(如下式 (1))以及訓練標準圖F1與非專家標準影像M12
t之間的目標誤差TE2設為1(如下式(2))為目標,取得優化誤差函數EF的優化權重
(如下式(3))。式(1)及(2)的誤差運算函數f可採用各種誤差分析技術或數學方法對誤差運算函數f內的向量進行誤差分析,例如運算加權歐氏距離或馬氏距離,本揭露實施例在此不加以限制。
In one embodiment, the
在式(1),向量
例如是訓練標準圖F1的像素層級的特徵向量,向量
例如是第S張專家標準影像M11
S的像素層級的特徵向量。在式(2),向量
例如是第t張非專家標準影像M12
t的像素層級的特徵向量。在式(3),e為總誤差值,其運算目標是在所有專家標準影像之誤差值與所有非專家標準影像之誤差值之加總為0或接近0下取得優化權重
。如式(4)所示,優化模組110可採用argmin的數學方式,對優化權重
進行優化處理。例如,優化模組110可決定最小的總誤差值e所對應的優化權重
為最佳優化權重
。最佳優化權重
例如是包含至少一常數,亦可以是包含多個常數的矩陣。本實施例中,向量
、向量
、向量
為像素層級的特徵向量,例如表示RGB或HSV(色相、飽和度、明度),然而在其他實施方式中,向量
、向量
、向量
也可以是圖像層級的特徵向量,例如深度學習模型抽取出來的特徵向量。
In formula (1), the vector For example, it is the feature vector of the pixel level of the training standard image F1, the vector For example, it is the pixel-level feature vector of the S-th expert standard image M11 S. In formula (2), the vector For example, it is the pixel-level feature vector of the t-th non-expert standard image M12 t . In formula (3), e is the total error value, and its calculation goal is to obtain the optimal weight when the sum of the error values of all expert standard images and the error values of all non-expert standard images is 0 or close to 0 . As shown in formula (4), the
在取得最佳優化權重 後,即可依據最佳優化權重 來建構優化誤差函數EF,如下式(5)。在式(5)中,向量 為標準圖例如待測物標準圖)的像素層級的特徵向量,向量 為待測物影像例如初始待測物影像及/或推薦待測物影像)的像素層級的特徵向量。本實施例中,向量 及向量 為像素層級的特徵向量,例如表示RGB或HSV(色相、飽和度、明度),然而在其他實施方式中,向量 及向量 也可以是圖像層級的特徵向量,例如深度學習模型抽取出來的特徵向量。 In obtaining the optimal optimization weight After that, the weights can be optimized according to the best To construct the optimization error function EF, the following formula (5). In formula (5), the vector is the pixel-level eigenvector of the standard image (such as the standard image of the object to be tested), and the vector is a pixel-level feature vector of the UUT image (such as the initial UUT image and/or the recommended UUT image). In this example, the vector and vector is a feature vector at the pixel level, for example representing RGB or HSV (hue, saturation, lightness), however in other implementations, the vector and vector It can also be an image-level feature vector, such as a feature vector extracted by a deep learning model.
在將向量 及向量 代入式(5)後,依據優化誤差函數EF運算向量 及向量 間之誤差值(例如初始誤差值 及/或推薦誤差值),其中誤差值表示待測物影像與標準圖F2的差異,誤差值愈小,表示向量 及向量 之間的差異愈小(例如圖像在色彩資訊上愈接近);反之則愈大。 in the vector and vector After substituting into formula (5), the calculation vector is based on the optimization error function EF and vector The error value between (such as the initial error value and/or recommended error value), where the error value represents the difference between the image of the object under test and the standard map F2, the smaller the error value, the vector and vector The smaller the difference between (for example, the closer the image is in color information); otherwise, the larger.
在取得優化誤差函數EF後,可執行步驟S120~S190來決定光學參數組以自動設定光學參數。為了清楚說明,在本實施例之光學參數自動方法的步驟S120~S190是用以決定光學參數組,光學參數組以包含二光學參數類型為例說明,如 。在一實施例中,決定光學參數組的方法(如步驟S120~S190)是在 為固定值的情況下決定 (如,第3A(a)~3H(b)圖之座標橫軸)。在另一實施例中,決定光學參數組的方法(如步驟S120~S190)係在 及 皆為可變的情況決定 及 。在其它實施例中,光學參數組可包含P個光學參數類型 ,決定光學參數組的方法係在 之至少一者的值變動下進行。 After obtaining the optimized error function EF, steps S120˜S190 may be performed to determine the optical parameter set to automatically set the optical parameters. For clarity, the steps S120-S190 of the optical parameter automatic method in this embodiment are used to determine the optical parameter set, and the optical parameter set includes two optical parameter types as an example for illustration, such as . In one embodiment, the method for determining the optical parameter set (such as steps S120~S190) is in Determined in the case of a fixed value (For example, the horizontal axis of the coordinates in Figures 3A(a)~3H(b)). In another embodiment, the method for determining the optical parameter set (such as steps S120-S190) is in and are determined by variable circumstances and . In other embodiments, the optical parameter set may contain P optical parameter types , the method for determining the optical parameter set is in Under the change of the value of at least one of them.
在步驟S120中,自動光學檢測系統100可依據優化誤差函數EF,對待測物標準圖F2與M個初始待測物影像
進行運算,而取得第1個推薦光學參數組。符號MT
m的下標m表示第m個初始待測物影像,其中m為介於1~M的正整數,M為初始待測物影像的總數量,本揭露實施例不限定M的最大值。
In step S120, the automatic
步驟S120可包含步驟S121~S123。Step S120 may include steps S121-S123.
在步驟S121中,攝像模組140在自動光學檢測系統100被用M個初始光學參數組
設定的情況下,分別取得M個初始待測物影像
,亦在自動光學檢測系統100被用初始光學參數組PT
1設定的情況下,攝像模組140對待測物執行取像以取得初始待測物影像MT
1;接著,在自動光學檢測系統100被用初始光學參數組PT
2設定的情況下,攝像模組140取得初始待測物影像MT
2,如此自動光學檢測系統100是被用M個初始光學參數組
逐次設定,並攝像模組140逐次執行取像而取得M個初始待測物影像MT
m。初始光學參數組
包含的光學參數類型本揭露實施例不加以限定。如第3A(a)圖所示,本揭露實施例的初始光學參數組
以三個為例(即M=3的情況)說明,分別是初始光學參數組
、
及
。初始光學參數組
、
及
可分別表示成
、
及
,其餘光學參數組具有類似表達形式,於此不再贅述。
In step S121, the camera module 140 is used in the automatic
在步驟S122中,誤差運算模組120依據優化誤差函數EF,對待測物標準圖F2與M個初始待測物影像 執行運算,而分別取得M個初始待測物影像 分別與待測物標準圖F2之間的M個初始誤差值 ,其中m為介於1~M的正整數。如第3A(a)圖所示,本揭露實施例的初始誤差值 以三個(即,M=3的情況)為例說明,分別是初始誤差值 、 及 。 In step S122, the error calculation module 120 calculates the standard image F2 of the object under test and the M initial images of the object under test according to the optimized error function EF Execute calculations to obtain M initial UUT images respectively M initial error values between the standard chart F2 of the test object , where m is a positive integer ranging from 1 to M. As shown in Figure 3A(a), the initial error value of the disclosed embodiment Take three (that is, the case of M=3) as an example, which are the initial error values , and .
第3A(a)圖之曲線C1表示第0次疊代中光學參數組與誤差值的對應關係,第3A(b)圖的各點表示不同疊代次數與第0次疊代結果之曲線C1中的數個誤差值中最小者(稱「最小誤差值」)的對應關係,第3B~3H(b)圖具有相似的定義,於此不再說明。光學參數自動設定方法在第3A(b)圖所示的階段中,推薦光學參數組 尚未被引進運算(尚未執行步驟S140~S180的疊代流程),因此最小誤差值對應的疊代次為0。 Curve C1 in Figure 3A(a) represents the corresponding relationship between the optical parameter set and the error value in the 0th iteration, and each point in Figure 3A(b) represents the curve C1 between different iterations and the result of the 0th iteration Figures 3B~3H(b) have similar definitions for the smallest of several error values in (called "minimum error value"), and will not be described here. Optical parameter automatic setting method In the stage shown in Figure 3A(b), the optical parameter set is recommended The operation has not been introduced (the iterative process of steps S140-S180 has not been executed), so the iteration number corresponding to the minimum error value is 0.
在步驟S123中,光學參數推薦模組130 依據M個初始誤差值 及M個初始光學參數組 執行運算,而取得第1個推薦光學參數組 。 In step S123, the optical parameter recommendation module 130 based on M initial error values and M initial optical parameter sets Execute the operation to obtain the first recommended optical parameter set .
光學參數自動設定方法中,光學參數推薦模組130可利用多種實施方式來決定推薦光學參數組,例如,光學參數推薦模組130可依據式(6)~(7),取得推薦光學參數組。然,只要能取得推薦光學參數組即可,本揭露實施例之推薦光學參數組的取得方式不限於使用式(6)~(7)。In the optical parameter automatic setting method, the optical parameter recommendation module 130 can use various implementation methods to determine the recommended optical parameter set. For example, the optical parameter recommendation module 130 can obtain the recommended optical parameter set according to formulas (6)-(7). However, as long as the recommended optical parameter set can be obtained, the method of obtaining the recommended optical parameter set in the embodiment of the present disclosure is not limited to using formulas (6)-(7).
在式(6)、(7)中, 為候選光學參數組,其中j是介於1~J的正整數,用來表示 是第j個候選光學參數組,並且J為候選光學參數組的數量。 包含數個光學參數類型,可進一步以 表示。候選光學參數組 可以是所有光學參數組中尚未用以執行運算取得誤差值者。本揭露實施例不限定J的最大值,其可視光學參數類型的數目及/或其數值範圍而定。 In formula (6), (7), is a candidate optical parameter group, where j is a positive integer ranging from 1 to J, used to represent is the jth candidate optical parameter set, and J is the number of candidate optical parameter sets. Contains several optical parameter types, which can be further express. Candidate optical parameter set It may be those of all the optical parameter sets that have not been used to perform calculations to obtain error values. The embodiments of the present disclosure do not limit the maximum value of J, which may be determined by the number of optical parameter types and/or its value range.
在式(6)、(7)中, 為已選光學參數組,其中i為介於1~Q的正整數,用來表示 為第i個已選光學參數組,其中Q為已選光學參數組的數量。 包含數個光學參數類型,可進一步以 表示。已選光學參數組 包含已求得誤差值的初始光學參數組 及/或推薦光學參數組 。例如,以第3B圖(進入第1次疊代)來說,已選光學參數組 包含第3A(a)圖之初始光學參數組 、 及 (以實心圓點表示)。以第3D圖(進入第2次疊代)來說,已選光學參數組 包含第3C(a)圖之初始光學參數組 、 及 及推薦光學參數組 (以實心圓點表示)。在式(6)中, 表示第k個光學參數類型 的權重,其為常數,不同的數個光學參數類型 的數個 的值可相異或相同。此外,前述k為介於1~Q的正整數,其中Q為已選光學參數組 的數量。推薦光學參數組的數量隨疊代次而增加,亦即Q的值隨之增加,Q的最大值視疊代次數而定,本揭露實施例不限定Q的最大值。 In formula (6), (7), is the selected optical parameter group, where i is a positive integer ranging from 1 to Q, used to represent is the i-th selected optical parameter set, where Q is the number of selected optical parameter sets. Contains several optical parameter types, which can be further express. Selected optical parameter set initial set of optical parameters containing the calculated error values and/or recommended optical parameter sets . For example, in Figure 3B (entering iteration 1), the selected optical parameter set Including the initial optical parameter set of Fig. 3A(a) , and (indicated by solid dots). Taking the 3D picture (entering the second iteration), the selected optical parameter group Including the initial optical parameter set of Fig. 3C(a) , and and recommended optical parameter set (indicated by solid dots). In formula (6), Indicates the kth optical parameter type The weight of , which is a constant, differs in several optical parameter types several of The values of can be different or the same. In addition, the aforementioned k is a positive integer ranging from 1 to Q, where Q is the selected optical parameter set quantity. The number of recommended optical parameter sets increases with the number of iterations, that is, the value of Q increases accordingly, and the maximum value of Q depends on the number of iterations. The embodiments of the present disclosure do not limit the maximum value of Q.
在式(6)中, 表示第j個候選光學參數組 相較於第i個已選光學參數組 的差距。在指數函數exp的運算中,當第j個候選光學參數組 與第i個已選光學參數組 之間的差距愈大時, 的數值愈小;反之則愈大。 In formula (6), Indicates the jth candidate optical parameter group Compared to the ith selected optical parameter set difference. In the operation of the exponential function exp, when the jth candidate optical parameter group and the ith selected optical parameter group When the gap between The smaller the value is, the larger it is vice versa.
在式(7)中, 表示第j個候選光學參數組 相較於所有已選光學參數組 的第j個期望值(或機率),期望值 的值例如是介於0~1之間。期望值分析函數E用以取得第j個候選光學參數組 相較於所有已選光學參數組 的期望值,其可採用各種統計或機率分析技術。Q表示所有已選光學參數組 的數目,例如,以第3B圖(執行第1次疊代)來說,已選光學參數組 係3個(如,實心圓點的數量),即Q等於3;以第3D圖(進入第2次疊代)來說,已選光學參數組 係4個(如,實心圓點的數量),即Q等於4。 In formula (7), Indicates the jth candidate optical parameter group Compared to all selected optical parameter sets The jth expected value (or probability) of , expected value The value of is, for example, between 0 and 1. The expected value analysis function E is used to obtain the jth candidate optical parameter group Compared to all selected optical parameter sets The expected value of , which can employ various statistical or probabilistic analysis techniques. Q indicates all selected optical parameter groups The number of , for example, in Figure 3B (performing iteration 1), the selected optical parameter set There are 3 (for example, the number of solid dots), that is, Q is equal to 3; taking the 3D diagram (entering the second iteration), the selected optical parameter group Be 4 (eg, the number of solid dots), that is, Q is equal to 4.
在式(7)中,f min表示所有已選光學參數組 對應的所有誤差值中的最小者,例如,第3B圖(執行第1次疊代)中,f min為當前疊代次最新的初始誤差值 (如第3A(b)圖所示);在第3D圖(執行第2次疊代)中,f min為當前疊代次最新的最小誤差值,即第3C(b)圖最右邊的初始誤差值 (即, 為初始誤差值 ~ 中最小者);在第3F圖(執行第3次疊代)中,f min為當前疊代次最新的最小誤差值,即第3E(b)圖最右邊的初始誤差值 (即,初始誤差值 ~ 與推薦誤差值 中最小者)。 In formula (7), f min represents all selected optical parameter groups The minimum of all corresponding error values, for example, in Figure 3B (executing the first iteration), f min is the latest initial error value of the current iteration (as shown in Figure 3A(b)); in Figure 3D (executing the second iteration), f min is the latest minimum error value of the current iteration, that is, the initial value at the far right of Figure 3C(b) difference (which is, is the initial error value ~ the smallest among them); in Figure 3F (executing the third iteration), f min is the latest minimum error value of the current iteration, that is, the initial error value at the far right of Figure 3E(b) (i.e., the initial error value ~ and recommended error value the smallest).
在式(7)中, 表示待測物標準圖F2的像素層級的特徵向量V2與第i張已選影像的像素層級的特徵向量 ,其中已選影像是指已被用以執行運算取得誤差值的影像,例如在第3B圖(執行第1次疊代)中,已選影像即是初始待測物影像 (攝像模組140在基於第3A(a)圖之第1個初始光學參數組 之設定下取得)、初始待測物影像 (攝像模組140在基於第3A(a)圖之第2個初始光學參數組 之設定下取得)及初始待測物影像 (攝像模組140在基於第3A(a)圖之第3個初始光學參數組 之設定下取得);在第3D圖中(執行第2次疊代)來說,已選影像即是初始待測物影像 、 及 ,以及第一個推薦待測物影像 (攝像模組140在基於第3C(a)圖之第一個推薦光學參數組 之設定下取得)。在本實施例中,特徵向量V2及特徵向量 為像素層級的特徵向量,例如表示RGB或HSV(色相、飽和度、明度),然而在其他實施方式中,向量 及向量 也可以是圖像層級的特徵向量,例如深度學習模型抽取出來的特徵向量。 In formula (7), Represents the pixel-level feature vector V2 of the standard image F2 of the object to be tested and the pixel-level feature vector of the i-th selected image , where the selected image refers to the image that has been used to perform calculations to obtain the error value. For example, in Figure 3B (executing the first iteration), the selected image is the initial UUT image (The camera module 140 is based on the first initial optical parameter set in Fig. 3A(a) obtained under the setting), the initial image of the object under test (the camera module 140 is based on the second initial optical parameter set in Fig. 3A(a) Obtained under the setting) and the initial image of the object under test (camera module 140 is based on the 3rd initial optical parameter set of Fig. 3A(a) obtained under the setting); in the 3D diagram (executing the second iteration), the selected image is the initial UUT image , and , and the first recommended UUT image (the camera module 140 is based on the first recommended optical parameter set in Fig. 3C(a) obtained under the settings). In this embodiment, the eigenvector V2 and the eigenvector is a feature vector at the pixel level, for example representing RGB or HSV (hue, saturation, lightness), however in other implementations, the vector and vector It can also be an image-level feature vector, such as a feature vector extracted by a deep learning model.
如式(6)及(7)所示,當第j個候選光學參數組 相較於第i個已選光學參數組 的差距愈大時(即, 的值愈小),期望值 愈大,表示第j個候選光學參數組 有愈大的機率能產生比f min更小的誤差值。每一組候選光學參數組 可取得一個期望值 。光學參數推薦模組130可使用J個不同數值的候選光學參數組 ,取得對應之J個期望值 ,並決定J個期望值 中最大者所對應的第j個候選光學參數組 為推薦光學參數組 。 As shown in formulas (6) and (7), when the jth candidate optical parameter group Compared to the ith selected optical parameter set When the difference is larger (ie, The smaller the value), the expected value The larger the value, the jth candidate optical parameter group The greater the probability, the smaller the error value than f min will be. Each group of candidate optical parameter groups an expected value . The optical parameter recommendation module 130 can use J candidate optical parameter groups with different values , get the corresponding J expected values , and determine J expected values The jth candidate optical parameter group corresponding to the largest among For the recommended optical parameter set .
參考第3B~3C(b)圖,基於式(6)~(7)取得第1個推薦光學參數組 的流程舉例說明如下。光學參數推薦模組130先取得數個候選光學參數組 之分別相較於所有已選光學參數組 的數個期望值 ,然後決定(挑選)此些期望值 中之最大者之候選光學參數組 為第1個推薦光學參數組。取得第1個候選光學參數組 之期望值 的過程舉例說明如下。 Referring to Figures 3B~3C(b), the first recommended optical parameter set is obtained based on formulas (6)~(7) An example of the process is as follows. The optical parameter recommendation module 130 first obtains several candidate optical parameter groups compared to all selected optical parameter sets several expected values of , and then decide (pick) these expected values The largest set of candidate optical parameters Recommended optical parameter set for the 1st. Get the first candidate optical parameter set expected value An example of the process is as follows.
如第3A(a)圖所示,在已選光學參數組 的數量為3個(Q=3),且初始光學參數組 包含 、 及 的情況下,執行式(6)之運算。此時,在i等於1且j等於1的情況下,光學參數推薦模組130在執行式(6)之運算,取得第1個已選光學參數組 (如,初始光學參數組 )及第1個候選光學參數組 之 的值(計算式: );並且運算取得待測物標準圖F2之像素層級之特徵向量V2與第1張已選影像(如,第1張初始待測物影像 )的像素層級的特徵向量 的初始誤差值 (初始誤差值 為式(7)之 的結果值)。 As shown in Figure 3A(a), in the selected optical parameter set The number of is 3 (Q=3), and the initial optical parameter set Include , and In the case of , execute the operation of formula (6). At this time, when i is equal to 1 and j is equal to 1, the optical parameter recommendation module 130 performs the operation of formula (6) to obtain the first selected optical parameter set (e.g., the initial set of optical parameters ) and the first candidate optical parameter set Of value (calculation formula: ); and obtain the pixel-level feature vector V2 of the standard image F2 of the object to be measured and the first selected image (for example, the first initial image of the object to be measured ) pixel-level feature vector The initial error value of (initial error value is the formula (7) result value).
光學參數推薦模組130在i等於2且j等於1的情況下,執行式(6)之運算,取得第2個已選光學參數組 (如,初始光學參數組 )及第1個候選光學參數組 之 的值(計算式: );並且運算取得待測物標準圖F2之特徵向量V2與第2張已選影像(如,第2張初始待測物影像 )的特徵向量 的初始誤差值 (初始誤差值 為式(7)之 的結果值)。 The optical parameter recommendation module 130 executes the operation of formula (6) when i is equal to 2 and j is equal to 1, and obtains the second selected optical parameter set (e.g., the initial set of optical parameters ) and the first candidate optical parameter set Of value (calculation formula: ); and obtain the eigenvector V2 of the standard image F2 of the DUT and the second selected image (for example, the second initial DUT image ) eigenvector The initial error value of (initial error value is the formula (7) result value).
光學參數推薦模組130在i等於3(Q之值)及j等於1的情況下,執行式(6)之運算,取得第3個已選光學參數組 (如,初始光學參數組 )及第1個候選光學參數組 之 的值(計算式: );並且執行運算取得待測物標準圖F2之特徵向量V2與第3(即,i=3)張已選影像(如,第3張初始待測物影像 )的特徵向量 的初始誤差值 (初始誤差值 為式(7)之 的結果值)。 The optical parameter recommendation module 130 executes the operation of formula (6) when i is equal to 3 (the value of Q) and j is equal to 1, and obtains the third selected optical parameter group (e.g., the initial set of optical parameters ) and the first candidate optical parameter set Of value (calculation formula: ); and perform calculations to obtain the feature vector V2 of the standard image F2 of the object to be measured and the third (ie, i=3) selected image (for example, the third initial image of the object to be measured ) eigenvector The initial error value of (initial error value is the formula (7) result value).
然後,光學參數推薦模組130可依據式(7),取得 之商值、 之商值及 之商值,並在取得此些商值之加總(和值計算式: )後,運算式(7)之期望值分析函數E,取得(或計算出)第1個候選光學參數組 之期望值 。 Then, the optical parameter recommendation module 130 can obtain the business value of The commercial value of and quotient value, and obtain the sum of these quotient values (sum value calculation formula: ), calculate the expected value analysis function E of formula (7) to obtain (or calculate) the first candidate optical parameter group expected value .
依據前述原則,光學參數推薦模組130可取得在J個不同的候選光學參數組 的J個期望值 。光學參數推薦模組130可從J個期望值 中挑選出最大者,並決定該最大者為第1 (即,n=1)個推薦光學參數組 ,如第3B圖所示。 According to the aforementioned principles, the optical parameter recommendation module 130 can obtain J different candidate optical parameter groups J expected value of . The optical parameter recommendation module 130 can select from J expected values Select the largest one, and decide that the largest one is the first (that is, n=1) recommended optical parameter set , as shown in Figure 3B.
在取得第1個推薦光學參數組
後,執行步驟S124,自動設定模組150依據第1個推薦光學參數組
設定自動光學檢測系統100。自動設定模組150可依據推薦光學參數組
設定光源模組160及攝像模組140。例如,以推薦光學參數
之
為曝光時間而
為發光時間來說,自動設定模組150設定攝像模組140的曝光時間為推薦光學參數組
之
的數值,且設定光源模組160的發光時間為推薦光學參數組
之
的數值。自動設定模組150可自動依據推薦光學參數組設定光源模組160及/或攝像模組140,不需人工操作,如此可減少光學參數自動設定的所需時,間且增加光學參數自動設定的效率。在另一實施例中,若以人工設定,自動光學檢測系統100可選擇性省略自動設定模組150。
After obtaining the first recommended optical parameter set Afterwards, step S124 is executed, and the
執行步驟S130中,誤差運算模組120將n的初始值設為1。步驟S130與S124的兩者間的執行順序不限,可以任一先執行或同時執行。In step S130 , the error calculation module 120 sets the initial value of n to 1. The order of execution between steps S130 and S124 is not limited, and may be executed first or at the same time.
在步驟S140中,攝像模組140在在該自動光學檢測系統100是用第1個推薦光學參數組
設定下對待測物執行取像,以取得第1個推薦待測物影像
。
In step S140, the camera module 140 uses the first recommended optical parameter set in the automatic
在步驟S150中,誤差運算模組120依據式(5)之優化誤差函數EF,對待測物標準圖F2之像素層級之特徵向量V2與第1個推薦待測物影像 之像素層級之特徵向量U2執行運算,而取得待測物標準圖F2與第1個推薦待測物影像 之間的第1個推薦誤差值 ,如第3C(a)圖所示。 In step S150, the error calculation module 120 calculates the pixel-level feature vector V2 of the standard image F2 of the object to be tested and the first recommended image of the object to be measured according to the optimized error function EF of formula (5). The pixel-level eigenvector U2 performs calculations to obtain the standard image F2 of the UUT and the first recommended UUT image The first recommended error value between , as shown in Figure 3C(a).
如第3C(a)圖所示,光學參數推薦模組130可採用曲線擬合方法,取得初始誤差值ET 1、ET 2、ET 3與推薦誤差值 的擬合曲線C2。 As shown in Figure 3C(a), the optical parameter recommendation module 130 can use a curve fitting method to obtain initial error values ET 1 , ET 2 , ET 3 and recommended error values The fitting curve C2.
在步驟S160中,誤差運算模組120判斷推薦誤差值是否收斂。當誤差運算模組120判斷推薦誤差值收斂時,流程進入步驟S190;當判斷推薦誤差值未收斂時,流程進入步驟S170。In step S160 , the error calculation module 120 determines whether the recommended error value converges. When the error calculation module 120 judges that the recommended error value is convergent, the process proceeds to step S190; when it judges that the recommended error value is not convergent, the process proceeds to step S170.
在一實施例之步驟S160中,當推薦誤差值等於或小於一收斂門檻值或在數次疊代後之數個推薦誤差值之任二者的差值於一收斂變動範圍之間變動,則誤差運算模組120判斷誤差值已收斂。前述「收斂門檻值」例如是介於0.1~0.3之間的任一數值(包含端點值),「數次疊代」例如是等於或大於3次,而「收斂變動範圍」例如是介於0.1~0.3之間的任一數值(包含端點值),然本揭露實施例不以此為限。In step S160 of an embodiment, when the recommended error value is equal to or smaller than a convergence threshold or the difference between any two of several recommended error values after several iterations varies within a convergence variation range, then The error calculation module 120 determines that the error value has converged. The aforementioned "convergence threshold value" is, for example, any value between 0.1~0.3 (including the endpoint value), the "number of iterations" is, for example, equal to or greater than 3 times, and the "convergence variation range" is, for example, between Any value between 0.1-0.3 (including the endpoint value), but the embodiments of the present disclosure are not limited thereto.
如第3C(b)圖所示,經由步驟S150運算取得的第1個推薦誤差值 ,其並未小於前次疊代取得之最小誤差值 (在此即為第0次疊代次取得之多個初始誤差值中最小者初始誤差值 ),因此在第1次疊代後,最小誤差值仍為初始誤差值 。由於第1個推薦誤差值 並未小於前次疊代的最小誤差值(即為第0次疊代之初始誤差值 ),誤差運算模組120據此判斷最小誤差值尚未收斂,流程進入步驟S170。 As shown in Figure 3C(b), the first recommended error value obtained through step S150 calculation , which is not smaller than the minimum error value obtained in the previous iteration (here, it is the smallest initial error value among the multiple initial error values obtained in the 0th iteration ), so after the first iteration, the minimum error value is still the initial error value . Due to the first recommended error value Not less than the minimum error value of the previous iteration (that is, the initial error value of the 0th iteration ), the error calculation module 120 judges that the minimum error value has not yet converged, and the process enters step S170.
在步驟S170中,光學參數推薦模組130依據n個推薦誤差值、n個推薦光學參數組、M個初始誤差值及M個測試初始光學參數組執行運算,而取得第n+1個推薦光學參數組。換言之,光學參數推薦模組130採用式(6)及(7),運算所有已選光學參數組 (包含n個推薦光學參數組及M個測試初始光學參數組)及所有已運算取得之誤差值(包含n個推薦誤差值及M個初始誤差值),取得下一個(即,n+1)推薦光學參數組 (第n+1個推薦光學參數組)。 In step S170, the optical parameter recommendation module 130 performs calculations based on n recommended error values, n recommended optical parameter sets, M initial error values, and M test initial optical parameter sets to obtain the n+1th recommended optical parameter set parameter group. In other words, the optical parameter recommendation module 130 uses formulas (6) and (7) to calculate all the selected optical parameter sets (including n recommended optical parameter groups and M initial optical parameter groups for testing) and all calculated error values (including n recommended error values and M initial error values), get the next one (ie, n+1) Recommended Optical Parameter Set (the n+1th recommended optical parameter group).
以下進一步舉例說明透過式(6)~(7)取得第2個推薦光學參數組 的流程(對應第3D~3E(b)圖)。過程中,光學參數推薦模組130先運算取得數個候選光學參數組 之各者相較於所有已選光學參數組 的數個期望值 ,然後決定此些期望值 中之最大值者之候選光學參數組 為第2個推薦光學參數組 。以下以第1個候選光學參數組 為例,來說明運算期望值 的過程。 The following further illustrates how to obtain the second recommended optical parameter set through formulas (6)~(7) The process (corresponding to Figure 3D~3E(b)). During the process, the optical parameter recommendation module 130 first obtains several candidate optical parameter sets through calculation each compared to all selected optical parameter sets several expected values of , and then determine these expected values Candidate Optical Parameter Set of the Maximum Among Recommended optical parameter set for the 2nd . The following is the first candidate optical parameter set As an example, to illustrate the operation expected value the process of.
如第3C(a)圖所示,已選光學參數組 的數量係4個(Q=4),包含3個初始光學參數組 、 及 以及1個推薦光學參數組 。 As shown in Figure 3C(a), the selected optical parameter set The number of is 4 (Q=4), including 3 initial optical parameter groups , and and a recommended optical parameter set .
在i等於1且j等於1的情況下運算式(6),光學參數推薦模組130依據式(6)運算第1 (即,i=1)個已選光學參數組 (如,初始光學參數組 )及第1 (即,j=1)個候選光學參數組 之 的值(計算式: ),且運算待測物標準圖F2之像素層級之特徵向量V2與第1(即,i=1)張已選影像(如,第1張初始待測物影像 )的像素層級的特徵向量 的初始誤差值 (初始誤差值 為式(7)之 的運算結果值)。 When i is equal to 1 and j is equal to 1, formula (6) is calculated, and the optical parameter recommendation module 130 calculates the first (i.e., i=1) selected optical parameter group according to formula (6) (e.g., the initial set of optical parameters ) and the first (ie, j=1) candidate optical parameter set Of value (calculation formula: ), and calculate the pixel-level feature vector V2 of the standard image F2 of the object under test and the first (ie, i=1) selected image (for example, the first initial image of the object under test ) pixel-level feature vector The initial error value of (initial error value is the formula (7) operation result value).
在i等於2且j等於1的情況下運算式(6),光學參數推薦模組130依據式(6)運算第2 (即,i=2)個已選光學參數組 (如,初始光學參數組 )及第1 (即,j=1)個候選光學參數組 之 的值(計算式: ),且運算待測物標準圖F2之特徵向量V2與第2(即,i=2)張已選影像(如,第2張初始待測物影像 )的特徵向量 的初始誤差值 (初始誤差值 為式(7)之 的結果值)。 When i is equal to 2 and j is equal to 1, formula (6) is calculated, and the optical parameter recommendation module 130 calculates the second (i.e., i=2) selected optical parameter group according to formula (6). (e.g., the initial set of optical parameters ) and the first (ie, j=1) candidate optical parameter set Of value (calculation formula: ), and calculate the eigenvector V2 of the standard image F2 of the object under test and the second (ie, i=2) selected image (for example, the second initial image of the object under test ) eigenvector The initial error value of (initial error value is the formula (7) result value).
在i等於3及j等於1的情況下運算式(6),光學參數推薦模組130依據式(6)運算第3 (即,i=3)個已選光學參數組 (如,初始光學參數組 )及第1 (即,j=1)個候選光學參數組 之 的值(計算式: ),且運算待測物標準圖F2之特徵向量V2與第3(即,i=3)張已選影像(如,第3張初始待測物影像 )的特徵向量 的初始誤差值 (初始誤差值 為式(7)之 的結果值)。 When i is equal to 3 and j is equal to 1, formula (6) is calculated, and the optical parameter recommendation module 130 calculates the third (i.e., i=3) selected optical parameter group according to formula (6). (e.g., the initial set of optical parameters ) and the first (ie, j=1) candidate optical parameter set Of value (calculation formula: ), and calculate the eigenvector V2 of the standard image F2 of the object under test and the third (ie, i=3) selected image (for example, the third initial image of the object under test ) eigenvector The initial error value of (initial error value is the formula (7) result value).
在i等於4及j等於1的情況下運算式(6),光學參數推薦模組130依據式(6)運算第4 (即,i=4)個已選光學參數組 (如,推薦光學參數組 )及第1 (即,j=1)個候選光學參數組 之 的值(計算式: ),且運算待測物標準圖F2之特徵向量V2與第4(即,i=4)張已選影像(如,推薦光學參數組 )的特徵向量 的推薦誤差值 (推薦誤差值 為式(7)之 的結果值)。 When i is equal to 4 and j is equal to 1, formula (6) is calculated, and the optical parameter recommendation module 130 calculates the fourth (i.e., i=4) selected optical parameter group according to formula (6). (e.g. recommended optical parameter set ) and the first (ie, j=1) candidate optical parameter set Of value (calculation formula: ), and calculate the eigenvector V2 of the standard image F2 of the object to be measured and the fourth (ie, i=4) selected image (for example, the recommended optical parameter set ) eigenvector The recommended error value of (recommended error value is the formula (7) result value).
然後,光學參數推薦模組130可利用前述運算結果執行運算,取得 之商值、 之商值、 之商值及 之商值,並運算此些商值之加總(計算式: )後,再進一步依據式(7)之期望值分析函數E執行運算,取得第1個候選光學參數組 之期望值 。 Then, the optical parameter recommendation module 130 can use the aforementioned calculation results to perform calculations to obtain the business value of the business value of The commercial value of and quotient value, and calculate the sum of these quotient values (calculation formula: ), and then further perform operations according to the expected value analysis function E of formula (7), and obtain the first candidate optical parameter group expected value .
依據前述流程,光學參數推薦模組130可取得在J個不同的候選光學參數組 的J個期望值 。光學參數推薦模組130可從J個期望值 中挑選出最大者,並決定期望值最大者之 為第2(即,n+1)個推薦光學參數組 ,如第3D圖所示。 According to the aforementioned process, the optical parameter recommendation module 130 can obtain J different candidate optical parameter groups J expected value of . The optical parameter recommendation module 130 can select from J expected values Choose the largest among them, and determine the one with the largest expected value Recommended optical parameter set for the 2nd (i.e., n+1) , as shown in Figure 3D.
在取得第2個推薦光學參數組 後,則執行步驟S175。 After obtaining the second recommended optical parameter set After that, step S175 is executed.
在步驟S175中,自動設定模組150依據第2個(第n+1個)推薦光學參數組
設定自動光學檢測系統100。
In step S175, the
在步驟S180中,累加n的值(n=2),然後執行下一輪疊代,也就是再次執行步驟S140,在第2(n=2)次疊代中,攝像模組140在該自動光學檢測系統被用第2個推薦光學參數組 設定的情況下,對待測物執行取像,以取得第2個推薦待測物影像 。然後,執行步驟S150,在第2次疊代中,光學參數推薦模組130依據式(5)之優化誤差函數EF,對待測物標準圖F2與第2個推薦待測物影像 執行運算,而取得待測物標準圖F2與第2個推薦待測物影像 之間的第2個推薦誤差值 ,如第3E(a)圖所示。在第3E(a)圖中,光學參數推薦模組130可採用曲線擬合方法,取得初始誤差值ET 1、ET 2及ET 3與推薦誤差值 及 的擬合曲線C3。執行步驟S160,光學參數推薦模組130判斷推薦誤差值是否收斂。當判斷推薦誤差值收斂時,則執行步驟S190;當判斷推薦誤差值未收斂時,則執行步驟S170。如第3E(b)圖所示,第2個推薦誤差值 並未小於推薦誤差值 以及前幾次疊代(第0次疊代與第1次疊代)決定之最小誤差值(初始誤差值 ),光學參數推薦模組130據此判斷推薦誤差值尚未收斂,則執行步驟S170。 In step S180, the value of n is accumulated (n=2), and then the next iteration is executed, that is, step S140 is executed again. In the second (n=2) iteration, the camera module 140 The detection system is used with the 2nd recommended optical parameter set If it is set, the object to be tested will be captured to obtain the second recommended image of the object to be tested . Then, step S150 is executed. In the second iteration, the optical parameter recommendation module 130 calculates the standard image F2 of the object to be measured and the second recommended image of the object to be measured according to the optimized error function EF of formula (5). Execute calculations to obtain the standard image F2 of the UUT and the second recommended UUT image The 2nd recommended error value between , as shown in Figure 3E(a). In Figure 3E(a), the optical parameter recommendation module 130 can use the curve fitting method to obtain the initial error values ET 1 , ET 2 and ET 3 and the recommended error values and The fitting curve C3. Step S160 is executed, and the optical parameter recommendation module 130 determines whether the recommended error value converges. When it is judged that the recommended error value is converged, step S190 is executed; when it is judged that the recommended error value is not converged, step S170 is executed. As shown in Figure 3E(b), the second recommended error value Not less than the recommended error value And the minimum error value determined by the previous iterations (the 0th iteration and the 1st iteration) (the initial error value ), the optical parameter recommendation module 130 judges that the recommended error value has not yet converged, and then executes step S170.
在步驟S170中,光學參數推薦模組130採用前述決定推薦光學參數組之流程,運算取得第3個推薦光學參數組
,並執行步驟S175依據第3個推薦光學參數組
設定自動光學檢測系統100,及步驟S180以更新n(n=3)而進入下次疊代(第3次疊代)。在第3次疊代中,與前述第2次疊代相似地,執行步驟S140~S160,而運算取得第3個推薦誤差值
(如第3F及3G(a)圖所示)。接著執行S160,如第3G(b)圖所示,雖然第3個推薦誤差值
小於前幾次疊代結果之推薦誤差值
及
,及最小誤差值ET
2,但第3個推薦誤差值
並未低於收斂門檻值,光學參數推薦模組130據此判斷推薦誤差值尚未收斂,而進入下一輪的疊代,執行步驟S170~S180,取得下一次疊代之第n個推薦光學參數組PR
n。
In step S170, the optical parameter recommendation module 130 adopts the aforementioned process of determining the recommended optical parameter set, and calculates and obtains the third recommended optical parameter set , and execute step S175 according to the third recommended optical parameter set The automatic
如第3H(a)圖所示,光學參數推薦模組130依據前述原則,依序取得第4(即,n=4)次疊代之第4個推薦誤差值
、第5(即,n=5)次疊代之第5個推薦誤差值
、第6(即,n=6)次疊代之第6個推薦誤差值
及第7(即,n=7)次疊代之第7個推薦誤差值
。如第3H(b)圖所示,在第7次疊代的步驟S160中,第7個推薦誤差值
已低於前述收斂門檻值,光學參數推薦模組130據此判斷推薦誤差值已收斂,則執行步驟S190,光學參數推薦模組130決定第7次疊代之最小推薦誤差值,也就是第7個推薦誤差值
所對應之第7個推薦光學參數組
為自動光學檢測系統100之最佳光學參數組。
As shown in Figure 3H(a), the optical parameter recommendation module 130 sequentially obtains the fourth recommended error value of the fourth iteration (ie, n=4) according to the aforementioned principles , the 5th recommended error value of the 5th (ie, n=5) iteration , the 6th recommended error value of the 6th (ie, n=6) iteration And the 7th recommended error value of the 7th (ie, n=7) iteration . As shown in Figure 3H(b), in step S160 of the seventh iteration, the seventh recommended error value has been lower than the aforementioned convergence threshold, and the optical parameter recommendation module 130 judges that the recommended error value has converged accordingly, then executes step S190, and the optical parameter recommendation module 130 determines the minimum recommended error value of the seventh iteration, that is, the seventh Recommended error value Corresponding to the seventh recommended optical parameter group is the optimal optical parameter set of the automatic
自動光學檢測系統100之光源模組160及攝像模組140可依據此最佳光學參數組設定於產線上運作,使攝像模組140對產品攝像所取得的產品影像具有最佳的品質(例如色彩呈現),以提升自動光學檢測系統100檢測產品的準確度。The
綜上,本揭露實施例提出一種光學參數自動設定方法及應用其之自動光學檢測系統,利用機器學習的技術,自動取得最佳光學參數組。在應用本揭露實施例之光學參數自動設定方法中,在短時間內須對P個或全部光學參數進行高達數萬、數十萬次或甚至更多次的疊代,且計算過程繁複,此必須由電腦執行,非人腦所能完成。由於是採用電腦執行光學參數自動設定方法,因此在執行過程可考慮自動光學檢測系統中可能影響攝像器所擷取之產品影像呈現(或品質)的所有光學參數的至少一者,提升攝像器所擷取之產品影像的品質,增加檢測正確率。相較於人工調光,本揭露實施例具備以下數個技術功效的至少一者:(1). 避免人為因素的誤判,因此可提升調光穩定性;(2). 減少調光所需時間;(3). 降低人力成本;(4). 加入調光流程的光學參數類型的數量可以較多;(5). 增加自動光學檢測系統的檢測正確率。To sum up, the embodiments of the present disclosure propose a method for automatically setting optical parameters and an automatic optical inspection system using the same, using machine learning technology to automatically obtain the optimal optical parameter set. In the application of the method for automatically setting optical parameters according to the disclosed embodiments, tens of thousands, hundreds of thousands or even more iterations must be performed on P or all optical parameters in a short period of time, and the calculation process is complicated. It must be executed by a computer, not by a human brain. Since the computer is used to execute the automatic setting method of optical parameters, at least one of all optical parameters in the automatic optical inspection system that may affect the presentation (or quality) of the product image captured by the camera can be considered during the execution process, so as to improve the performance of the camera. The quality of captured product images increases the detection accuracy. Compared with manual dimming, the disclosed embodiments have at least one of the following technical effects: (1). Avoid misjudgment by human factors, so the stability of dimming can be improved; (2). Reduce the time required for dimming ; (3). Reduce labor costs; (4). The number of optical parameter types added to the dimming process can be more; (5). Increase the detection accuracy of the automatic optical detection system.
綜上所述,雖然本揭露已以實施例揭露如上,然其並非用以限定本揭露。本揭露所屬技術領域中具有通常知識者,在不脫離本揭露之精神和範圍內,當可作各種之更動與潤飾。因此,本揭露之保護範圍當視後附之申請專利範圍所界定者為準。To sum up, although the present disclosure has been disclosed above with embodiments, it is not intended to limit the present disclosure. Those with ordinary knowledge in the technical field to which this disclosure belongs may make various changes and modifications without departing from the spirit and scope of this disclosure. Therefore, the scope of protection of this disclosure should be defined by the scope of the appended patent application.
100:自動光學檢測系統 110:優化模組 120:誤差運算模組 130:光學參數推薦模組 140:攝像模組 150:自動設定模組 160:光源模組 C1~C3:曲線 D1, D2:資料庫 F1:訓練標準圖 F2:待測物標準圖 f:誤差運算函數 f min:最小誤差值 E:期望值分析函數 EF:優化誤差函數 , , , :初始誤差值 , , , , , , , :推薦誤差值 , , , , , , , :推薦待測物影像 M11 S:專家標準影像 M12 t:非專家標準影像 :初始待測物影像 , , , , , , , :推薦光學參數組 , , , :初始光學參數組 , , , , , :向量 S110~S190:步驟 , :優化權重 :候選光學參數組 :已選光學參數組 :已選光學參數組 :光學參數類型 :差距 :期望值 100: Automatic Optical Inspection System 110: Optimization Module 120: Error Calculation Module 130: Optical Parameter Recommendation Module 140: Camera Module 150: Automatic Setting Module 160: Light Source Module C1~C3: Curve D1, D2: Data Library F1: training standard graph F2: standard graph of the object to be tested f: error operation function f min : minimum error value E: expected value analysis function EF: optimization error function , , , : initial error value , , , , , , , : recommended error value , , , , , , , : recommended object image M11 S : expert standard image M12 t : non-expert standard image : Initial UUT image , , , , , , , : recommended optical parameter set , , , : initial optical parameter set , , , , , : vector S110~S190: step , : optimize weight : candidate optical parameter set : Selected optical parameter group : Selected optical parameter group : Optical parameter type :gap : expected value
第1圖繪示依照本揭露一實施例之自動光學檢測系統之示意圖。 第2A及2B圖繪示第1圖之自動光學檢測系統的光學參數自動設定方法的流程圖。 第3A(a)~3H(b)圖繪示第2A及2B圖之推薦光學參數的取得過程示意圖。 FIG. 1 shows a schematic diagram of an automatic optical inspection system according to an embodiment of the present disclosure. 2A and 2B are flowcharts showing the automatic optical parameter setting method of the automatic optical inspection system in FIG. 1 . Figures 3A(a)~3H(b) illustrate the process of obtaining the recommended optical parameters in Figures 2A and 2B.
S110~S130:步驟 S110~S130: steps
Claims (16)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
TW110115481A TWI792291B (en) | 2021-04-29 | 2021-04-29 | Method of automatically setting optical parameters and automated optical inspection system using the same |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
TW110115481A TWI792291B (en) | 2021-04-29 | 2021-04-29 | Method of automatically setting optical parameters and automated optical inspection system using the same |
Publications (2)
Publication Number | Publication Date |
---|---|
TW202242713A true TW202242713A (en) | 2022-11-01 |
TWI792291B TWI792291B (en) | 2023-02-11 |
Family
ID=85793303
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
TW110115481A TWI792291B (en) | 2021-04-29 | 2021-04-29 | Method of automatically setting optical parameters and automated optical inspection system using the same |
Country Status (1)
Country | Link |
---|---|
TW (1) | TWI792291B (en) |
Family Cites Families (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPWO2001041068A1 (en) * | 1999-11-29 | 2004-01-08 | オリンパス光学工業株式会社 | Defect inspection system |
CN107561737B (en) * | 2017-08-21 | 2020-05-22 | 武汉精测电子集团股份有限公司 | Method, device and tool for automatically adjusting IPC (International Process control) parameters of AOI (automatic Option identification) system |
TWI683262B (en) * | 2018-06-08 | 2020-01-21 | 財團法人工業技術研究院 | Industrial image inspection method and system and computer readable recording medium |
US10867108B2 (en) * | 2018-09-18 | 2020-12-15 | Taiwan Semiconductor Manufacturing Co., Ltd. | Optical mode optimization for wafer inspection |
CN111751279A (en) * | 2019-03-27 | 2020-10-09 | 鸿富锦精密工业(武汉)有限公司 | Optical image capturing parameter adjusting method and sensing device |
-
2021
- 2021-04-29 TW TW110115481A patent/TWI792291B/en active
Also Published As
Publication number | Publication date |
---|---|
TWI792291B (en) | 2023-02-11 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107145908B (en) | A kind of small target detecting method based on R-FCN | |
JP6869490B2 (en) | Defect inspection equipment, defect inspection methods, and their programs | |
JP7015001B2 (en) | Defect inspection equipment, defect inspection methods, and their programs | |
JP4559437B2 (en) | Sky detection in digital color images | |
US11631230B2 (en) | Method, device, system and computer-program product for setting lighting condition and storage medium | |
CN109902761B (en) | Fishing situation prediction method based on marine environment factor fusion and deep learning | |
TW201825883A (en) | Optimizing training sets used for setting up inspection-related algorithms | |
CN110310596B (en) | GAMMA (GAMMA-GAMMA) adjustment initial value prediction method and system of OLED module | |
CN112903692B (en) | Industrial hole wall defect detection system and identification algorithm based on AI | |
CN108445010A (en) | Automatic optical detection method and device | |
WO2022059402A1 (en) | Inspection device, inspection method, and inspection program | |
TWI792291B (en) | Method of automatically setting optical parameters and automated optical inspection system using the same | |
CN114913086B (en) | Face image quality enhancement method based on generation countermeasure network | |
CN116843618A (en) | Method for detecting shallow apparent appearance defects of metal parts | |
CN111178229A (en) | Vein imaging method and device based on deep learning | |
CN116486150A (en) | Uncertainty perception-based regression error reduction method for image classification model | |
US20220157050A1 (en) | Image recognition device, image recognition system, image recognition method, and non-transitry computer-readable recording medium | |
JP2020177429A (en) | Information processing apparatus, information processing method, and program | |
US20220084171A1 (en) | Systems and methods for recognition of user-provided images | |
CN115018787A (en) | Anomaly detection method and system based on gradient enhancement | |
CN110672631B (en) | Panel defect photographing method and panel defect photographing device | |
Chuquimarca et al. | Banana Ripeness Level Classification Using a Simple CNN Model Trained with Real and Synthetic Datasets. | |
CN114486895A (en) | Method for detecting sample substance concentration based on pushing of urine drying test strip to identification | |
US11788972B2 (en) | Method of automatically setting optical parameters and automated optical inspection system using the same | |
CN112508946A (en) | Cable tunnel abnormity detection method based on antagonistic neural network |