TWI744177B - Method and system for vision-based defect detection - Google Patents
Method and system for vision-based defect detection Download PDFInfo
- Publication number
- TWI744177B TWI744177B TW110102498A TW110102498A TWI744177B TW I744177 B TWI744177 B TW I744177B TW 110102498 A TW110102498 A TW 110102498A TW 110102498 A TW110102498 A TW 110102498A TW I744177 B TWI744177 B TW I744177B
- Authority
- TW
- Taiwan
- Prior art keywords
- time
- defect
- spectrogram
- item
- patent application
- Prior art date
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/0002—Inspection of images, e.g. flaw detection
- G06T7/0004—Industrial image inspection
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/24—Classification techniques
- G06F18/241—Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches
- G06F18/2411—Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches based on the proximity to a decision surface, e.g. support vector machines
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/10—Segmentation; Edge detection
- G06T7/11—Region-based segmentation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/20—Special algorithmic details
- G06T2207/20081—Training; Learning
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- Computer Vision & Pattern Recognition (AREA)
- General Physics & Mathematics (AREA)
- Data Mining & Analysis (AREA)
- Artificial Intelligence (AREA)
- Bioinformatics & Cheminformatics (AREA)
- Bioinformatics & Computational Biology (AREA)
- Evolutionary Biology (AREA)
- Evolutionary Computation (AREA)
- Life Sciences & Earth Sciences (AREA)
- General Engineering & Computer Science (AREA)
- Quality & Reliability (AREA)
- Measurement Of Mechanical Vibrations Or Ultrasonic Waves (AREA)
Abstract
Description
本發明是有關於一種檢測技術,且特別是一種缺陷檢測視覺化方法及其系統。The invention relates to a detection technology, and in particular to a defect detection visualization method and system.
揚聲器是一種把電訊號轉變為聲訊號的換能器,其廣泛地應用於音響、耳機等設備,而其性能影響此些設備的使用。揚聲器的組裝缺陷以往是由豐富經驗的聽者在生產線末端進行檢測。此種檢測需要對揚聲器施正弦對數掃頻訊(log-swept sine chirps),並且利用人的聽覺檢測分析其響應信號是否正常。然而,此種以人耳評估而檢測出的結果會隨著聽者的年齡、情緒變化、聽覺疲勞等主觀因素而有所不同,並且容易造成聽者的職業傷害。A speaker is a transducer that converts an electrical signal into an acoustic signal. It is widely used in audio equipment, earphones and other equipment, and its performance affects the use of these equipment. In the past, speaker assembly defects were detected by experienced listeners at the end of the production line. This type of detection requires the application of log-swept sine chirps to the speaker, and the use of human auditory detection to analyze whether the response signal is normal. However, the results detected by the human ear evaluation will vary with subjective factors such as the listener's age, mood changes, hearing fatigue, etc., and may easily cause occupational injury to the listener.
本發明提供一種缺陷檢測視覺化方法及其系統,其可從時頻譜圖中以電腦視覺技術來檢測待測物件是否在預先制定的聽覺標準中具有不可接受的缺陷。The present invention provides a defect detection visualization method and system, which can use computer vision technology to detect whether an object to be tested has unacceptable defects in a pre-established auditory standard from a time-spectrogram.
在本發明的一實施例中,上述的方法包括下列步驟。輸出測試音頻訊號至待測物件,並且接收待測物件對於測試音頻訊號的響應訊號,以產生收音音頻訊號。針對收音音頻訊號進行訊號處理,以產生時頻譜圖,並且根據時頻譜圖,視覺化判斷待測物件是否在預先制定的聽覺標準中具有不可接受的缺陷。In an embodiment of the present invention, the above-mentioned method includes the following steps. The test audio signal is output to the object under test, and the response signal of the object under test to the test audio signal is received to generate a radio audio signal. Signal processing is performed on the radio audio signal to generate a time-spectrogram, and based on the time-spectrogram, it is visually determined whether the object under test has unacceptable defects in the pre-established auditory standard.
在本發明的一實施例中,上述的系統包括訊號輸出裝置、麥克風、類比數位轉換器以及處理裝置。訊號輸出裝置用以輸出測試音頻訊號至待測物件。麥克風用以接收待測物件對於測試音頻訊號的響應訊號。類比數位轉換器用以將響應訊號轉換為收音音頻訊號。處理裝置用以針對收音音頻訊號進行訊號處理,以產生時頻譜圖,以及根據時頻譜圖,視覺化判斷待測物件是否在預先制定的聽覺標準中具有不可接受的缺陷。In an embodiment of the present invention, the aforementioned system includes a signal output device, a microphone, an analog-to-digital converter, and a processing device. The signal output device is used to output test audio signals to the object under test. The microphone is used to receive the response signal of the object under test to the test audio signal. The analog-to-digital converter is used to convert the response signal into a radio audio signal. The processing device is used for signal processing for the radio audio signal to generate a time-spectrogram, and based on the time-spectrogram, to visually determine whether the object under test has an unacceptable defect in the predetermined auditory standard.
本發明的部份實施例接下來將會配合附圖來詳細描述,以下的描述所引用的元件符號,當不同附圖出現相同的元件符號將視為相同或相似的元件。這些實施例只是本發明的一部份,並未揭示所有本發明的可實施方式。更確切的說,這些實施例只是本發明的專利申請範圍中的方法與系統的範例。Part of the embodiments of the present invention will be described in detail in conjunction with the accompanying drawings. The reference symbols in the following description will be regarded as the same or similar elements when the same symbol appears in different drawings. These embodiments are only a part of the present invention, and do not disclose all the possible implementation modes of the present invention. More precisely, these embodiments are just examples of methods and systems within the scope of the patent application of the present invention.
圖1為根據本發明一實施例所繪示的缺陷檢測系統的方塊圖,但此僅是為了方便說明,並不用以限制本發明。首先圖1先介紹缺陷檢測系統中的所有構件以及配置關係,詳細功能將配合圖2一併揭露。FIG. 1 is a block diagram of a defect detection system according to an embodiment of the present invention, but this is only for convenience of description, and is not intended to limit the present invention. First, Figure 1 first introduces all the components and configuration relationships in the defect detection system, and detailed functions will be disclosed in conjunction with Figure 2.
請參照圖1,缺陷檢測系統100包括訊號輸出裝置110、麥克風120、類比數位轉換器130以及處理裝置140,其用以檢測待測物件T是否有缺陷。1, the
訊號輸出裝置110用以將測試音頻訊號輸出至待測物件T,其可以例如是具有數位音頻輸出介面的電子裝置,並且利用無線或是有線的方式將測試音頻訊號輸出至待測物件T。麥克風120用以將待測物件T對於測試音頻訊號的響應進行收音,其可以是設置於待測物件T的鄰近處或是相對於待測物件T的最佳收音的位置。類比數位轉換器130連接於麥克風120,用以將麥克風120所接收到的類比聲音訊號轉換成數位聲音訊號。The
處理裝置140連接至類比數位轉換器130,用以將自類比數位轉換器130所接收到的數位聲音訊號進行處理,以檢測待測物件U是否有缺陷。處理裝置140包括記憶體以及處理器。記憶體可以例如是任意型式的固定式或可移動式隨機存取記憶體(random access memory,RAM)、唯讀記憶體(read-only memory,ROM)、快閃記憶體(flash memory)、硬碟或其他類似裝置、積體電路及其組合。處理器可以例如是中央處理單元(central processing unit,CPU)、應用處理器(application processor,AP),或是其他可程式化之一般用途或特殊用途的微處理器(microprocessor)、數位訊號處理器(digital signal processor,DSP)或其他類似裝置、積體電路及其組合。The
必須說明的是,在一實施例中,訊號輸出裝置110、麥克風120、類比數位轉換器130以及處理裝置140可以分屬四個獨立裝置。在一實施例中,訊號輸出裝置110以及處理裝置140可以整合至同一裝置,而處理裝置140可控制訊號輸出裝置110的輸出。在一實施例中,訊號輸出裝置110、麥克風120、類比數位轉換器130以及處理裝置140更可以為單一整合(all-in-one)電腦系統。本發明不針對訊號輸出裝置110、麥克風120、類比數位轉換器130以及處理裝置140的整合做任何設限,只要是包括此些裝置的系統皆屬於缺陷檢測系統100的範疇。It should be noted that, in one embodiment, the
以下即列舉實施例說明缺陷檢測系統100針對待測物件T執行缺陷檢測方法的詳細步驟。在以下的實施例中將以具有揚聲器的電子裝置做為待測物件T來進行說明,而缺陷檢測系統100所檢測的缺陷為待測物件T的組裝異音(rub and buzz)。The following is a list of embodiments to illustrate the detailed steps of the
圖2為根據本發明一實施例所繪示的缺陷檢測視覺化方法的流程圖,圖2流程將以圖1的缺陷檢測系統100來執行。FIG. 2 is a flowchart of a defect detection visualization method according to an embodiment of the present invention. The process of FIG. 2 will be executed by the
請同時參照圖1以及圖2,訊號輸出裝置110將輸出測試音頻訊號至待測物件T(步驟S202),麥克風120將接收待測物件T對於測試音頻訊號的響應訊號(步驟S204),類比數位轉換器130將轉換響應訊號為收音音頻訊號(步驟S206)。在此,測試音頻訊號的音頻範圍可以是1K~20Hz,其中1K~500Hz的振幅為-25dB,500Hz~300Hz的振幅為-15dB,300Hz~20Hz的振幅為-8dB。然而,由於組裝異音會與測試音頻訊號的特定頻率點產生共振,而為了避免非組裝異音的共振影響異音的檢測(例如按鈕共振),因此測試音頻訊號的音頻範圍與振幅會依照待測物件T的不同而有所調整。待測物件T將會對測試音頻訊號產生響應訊號,而麥克風120將接收來自待測物件T的響應訊號。接著,類比數位轉換器130會將類比的響應訊號進行類比數位轉換,以產生數位的響應訊號(以下稱為「收音音頻訊號」)。1 and 2 at the same time, the
處理裝置140將針對收音音頻訊號進行訊號處理,以產生時頻譜圖(步驟S208),並且根據時頻譜圖,視覺化判斷待測物件T是否具有缺陷(步驟S210)。處理裝置140可以是針對收音音頻訊號進行快速傅立葉轉換(Fast Fourier Transform,FFT),以產生時頻譜圖。在此將收音音頻訊號轉換成時頻譜圖的原因在於異音在收音音頻訊號並沒有顯著特徵,但是異音與測試音頻訊號產生共振時具有時間連續性,因此若將時間域訊號轉換成時頻譜圖後,異音特徵在時頻譜圖中將會呈現時間連續並且能量群聚的現象,以利用電腦視覺技術來達到待測物件的缺陷檢測。The
以圖3根據本發明一實施例所繪示的時頻譜圖的示意圖為例,時頻譜圖310對應於無異音的聲音訊號,時頻譜圖320對應於異音的聲音訊號。必須說明的是,本領域具通常知識者應明瞭,時頻譜圖代表訊號強度隨著時間以及頻率的分佈,而時頻譜圖310以及時頻譜圖320僅以曲線來簡易地示意出明顯的訊號強度來進行說明。在此,異音的聲音訊號在時頻譜圖320中有時間連續與能量群聚的特徵,如異音特徵RB。因此,若是利用處理裝置140以電腦視覺技術來分析時頻譜圖,則可從中判斷出待測裝置T是否有因組裝上的缺陷而產生異音。Taking the schematic diagram of the time spectrogram shown in FIG. 3 according to an embodiment of the present invention as an example, the
在以下的實施例中,將會以分類器來進行影像辨識,因此在處理裝置140在判斷待測物件T是否具有缺陷之前,將會取得已訓練好的分類器。在此的分類器可以是由處理裝置140自行訓練,或者是自其它處理裝置取得已訓練好的分類器,本發明不在此設限。In the following embodiments, a classifier will be used for image recognition. Therefore, before the
圖4為根據本發明一實施例所繪示的建構分類器的功能方塊流程圖,自以下的說明當中將以類似於處理裝置140(以下稱為「訓練系統」)來進行分類器的建構。4 is a functional block flow chart of constructing a classifier according to an embodiment of the present invention. From the following description, a similar processing device 140 (hereinafter referred to as a “training system”) will be used to construct the classifier.
請參照圖4,首先,訓練系統將會蒐集多筆訓練資料402。在此的訓練資料可以是N1個無缺陷訓練物件以及N2個缺陷訓練物件以類似步驟S202~S204的方式所分別產生的N1筆無缺陷訓練聲音樣本以及N2筆缺陷訓練聲音樣本,其中此N1+N2個訓練物件與待測物件T為相同物件,但是已經預先經過缺陷檢測。Please refer to FIG. 4. First, the training system will collect
接著,訓練系統會將訓練資料轉換成時頻譜圖404。為了降低運算複雜度,以及為了避免低頻噪音以及高頻雜訊的影像,訓練系統將選取例如是3K~15K Hz的預設頻率範圍做為檢測區域。以圖3為例,區域315為時頻譜圖310的檢測區域,而區域325為時頻譜圖320的檢測區域。為了方便說明,以下將對應於無缺陷訓練聲音樣本的時頻譜圖中的檢測區域稱為「無缺陷檢測區域影像」,而對應於缺陷訓練聲音樣本的時頻譜圖中的檢測區域稱為「缺陷檢測區域影像」。Then, the training system converts the training data into a time-
之後,訓練系統將會取得各個缺陷檢測區域影像以及各個無缺陷檢測區域影像中不同區域所對應的特徵值,並且取得各個缺陷檢測區域影像以及無缺陷檢測區域影像分別與參考模型408之間的紋理相關性(texture correlation)406,以做為空間特徵410來訓練分類器412,進而產生用來檢測待測物件T是否有缺陷的分類器414。After that, the training system will obtain each defect detection area image and the feature values corresponding to different areas in each defect detection area image, and obtain the texture between each defect detection area image and the defect detection area image and the
在此,訓練系統會先將所有缺陷檢測區域影像以及無缺陷檢測區域影像進行影像分割,以產生多個相同尺寸的子區塊(例如 200的像素尺寸)。在本實施例中,若是子區塊的尺寸太大,將會降低異音特徵的比重,而若是子區塊的尺寸太小,將會無法涵蓋異音特徵而影響後續的辨識結果。因此,訓練系統可以例如是以圖5根據本發明一實施例所繪示的功能方塊流程圖來取得各個缺陷檢測區域影像以及無缺陷檢測區域影像的空間特徵。 Here, the training system will first perform image segmentation of all defect detection area images and non-defect detection area images to generate multiple sub-blocks of the same size (for example, 200 pixel size). In this embodiment, if the size of the sub-block is too large, the proportion of the abnormal sound feature will be reduced, and if the size of the sub-block is too small, the abnormal sound feature will not be covered and the subsequent identification results will be affected. Therefore, the training system may, for example, obtain the spatial characteristics of each defect detection area image and the non-defect detection area image according to the functional block flowchart shown in FIG. 5 according to an embodiment of the present invention.
請參照圖5,訓練系統會將各個缺陷檢測區域影像以及無缺陷檢測區域影像分別進行影像金字塔處理H(image pyramid),以產生不同尺度(scale)的影像。本實施例將會具有兩個尺度,即原始影像大小以及原始影像大小的1/4(將原始影像的長與寬分別縮小為原本的1/2)。在此將以其中一張缺陷檢測區域影像來進行圖5流程的說明,而本領域具通常知識者可以類推其它缺陷檢測區域影像以及無缺陷檢測區域影像的處理方式。假設T1為其中一張缺陷檢測區域影像,其像素尺寸為 800。T11為影像分割後的其中一個子區塊(以下稱為「訓練子區塊」),其像素尺寸為 200。另一方面,T0為T1經過影像金字塔處理(縮小處理)後所產生的影像,其像素尺寸為 400。T01為影像分割後的其中一個訓練子區塊,其像素尺寸將與訓練子區塊T11相同,即 200的像素尺寸。 Please refer to Figure 5, the training system will perform image pyramid processing H (image pyramid) on the images of each defect detection area and the images of the non-defect detection area to generate images of different scales. This embodiment will have two scales, namely the original image size and 1/4 of the original image size (reducing the length and width of the original image to 1/2 of the original image size). Here, one of the defect detection area images will be used to illustrate the flow of FIG. 5, and those with ordinary knowledge in the art can analogize the processing methods of other defect detection area images and non-defect detection area images. Assume that T1 is one of the defect detection area images, and its pixel size is 800. T11 is one of the sub-blocks after image segmentation (hereinafter referred to as the "training sub-block"), and its pixel size is 200. On the other hand, T0 is the image generated after T1 undergoes image pyramid processing (reduction processing), and its pixel size is 400. T01 is one of the training sub-blocks after image segmentation, and its pixel size will be the same as the training sub-block T11, namely 200 pixel size.
接著,訓練系統將會針對各個不同尺度的無缺陷檢測區域影像以及缺陷檢測區域影像所分割出的每個訓練子區塊進行特徵擷取FE。在本實施例中,訓練系統可以例如是計算各個尺度的每個訓練子區塊的像素值的標準差 (standard deviation)以及直方圖偏態 (Kurtosis)至少之一者來做為每個訓練子區塊的特徵值,然而本發明不以此為限。此外,為了提高無缺陷與缺陷的差異性,訓練系統更可以根據N1個無缺陷檢測區域影像來產生關聯於無缺陷的參考模型。舉例來說,訓練系統可以是將相同尺度的N1個無缺陷檢測區域影像的像素值進行平均,以獲得參考模型。因此,各個尺度分別有其對應的參考模型。在本實施例中,訓練系統將會產生對應於影像T1的參考模型R1以及對應於影像T0的參考模型R0。在此的影像T1與參考模型R1具有相同尺度,因此影像T1中的訓練子區塊將會在參考模型R1中找到對應的子區塊(以下稱為「參考子區塊」)。類似地,T0與參考模型R0具有相同尺度,因此影像T0中的訓練子區塊將會在參考模型R0中找到對應的參考子區塊。 Then, the training system will perform feature extraction FE for each of the non-defect detection area images of different scales and each training sub-block segmented from the defect detection area images. In this embodiment, the training system may, for example, calculate the standard deviation of the pixel value of each training sub-block of various scales. (Standard deviation) and histogram skewness (Kurtosis) At least one of them is used as the feature value of each training sub-block, but the present invention is not limited to this. In addition, in order to improve the difference between defect-free and defect-free, the training system can also generate a reference model related to the defect-free based on the images of N1 defect-free detection areas. For example, the training system may average the pixel values of N1 images of the defect-free detection area of the same scale to obtain a reference model. Therefore, each scale has its corresponding reference model. In this embodiment, the training system will generate a reference model R1 corresponding to the image T1 and a reference model R0 corresponding to the image T0. The image T1 here has the same scale as the reference model R1, so the training sub-blocks in the image T1 will find the corresponding sub-blocks in the reference model R1 (hereinafter referred to as “reference sub-blocks”). Similarly, T0 and the reference model R0 have the same scale, so the training sub-block in the image T0 will find the corresponding reference sub-block in the reference model R0.
接著,訓練系統將會計算各個尺度的每個子區塊及其所對應的參考模型中的參考子區塊之間的紋理相關性。具體來說,訓練系統將會計算訓練子區塊T11與參考子區塊R11之間的紋理相關性以及計算子區塊T01與參考子區塊R01之間的紋理相關性。在此的紋理相關性可以是子區塊與參考子區塊之間的局部二值模式(local binary pattern,LBP)的相關係數 (coefficient)。 Then, the training system will calculate the texture correlation between each sub-block of each scale and the reference sub-block in the corresponding reference model. Specifically, the training system will calculate the texture correlation between the training sub-block T11 and the reference sub-block R11 and the texture correlation between the sub-block T01 and the reference sub-block R01. The texture correlation here can be the correlation coefficient of the local binary pattern (LBP) between the sub-block and the reference sub-block (Coefficient).
在此,每個子區塊將會有各自的特徵向量 ,每張影像將會有各自的影像特徵向量 ,其中 n為子區塊的數量。以圖5為例,缺陷檢測區域影像T1將會有影像特徵向量 ,其中 為缺陷檢測區域影像T1中訓練子區塊的數量。類似地,影像T0將會有影像特徵向量 ,其中 為影像T0中訓練子區塊的數量。之後,訓練系統可將兩個尺度的影像特徵向量連接(concatenate)為特徵向量 來輸入至分類器M。 Here, each sub-block will have its own feature vector , Each image will have its own image feature vector , Where n is the number of sub-blocks. Take Figure 5 as an example, the defect detection area image T1 will have an image feature vector ,in Is the number of training sub-blocks in the defect detection area image T1. Similarly, image T0 will have image feature vector ,in Is the number of training sub-blocks in the image T0. After that, the training system can concatenate the image feature vectors of the two scales into feature vectors To input to the classifier M.
當訓練系統輸入完所有N1+N2筆訓練資料所對應的特徵向量至分類器後,將會開始對分類器M進行訓練。在此的分類器可以是支撐向量機(support vector machines,SVM)分類器,而訓練系統將會計算出SVM分類器的最佳分割超平面(optimal separating hyperplane),以做為分辨待測物件T是否具有缺陷的依據。After the training system has input all the feature vectors corresponding to all N1+N2 training data to the classifier, it will start to train the classifier M. The classifier here can be a support vector machine (support vector machines, SVM) classifier, and the training system will calculate the optimal separating hyperplane of the SVM classifier to determine whether the test object T Defective basis.
圖6為根據本發明一實施例所繪示的缺陷檢測方法的功能方塊流程圖,而圖6的流程適用於缺陷檢測系統100。在進行圖6的流程前,處理裝置140將會預先儲存圖5所提到的參考模型以及分類器。FIG. 6 is a functional block flow chart of a defect detection method according to an embodiment of the present invention, and the flow of FIG. 6 is applicable to the
請同時參照圖1以及圖6,首先,類似於步驟S206以及步驟S208,處理裝置140將會取得測試資料602(即,對應於待測物件T的收音音頻訊號),並且將測試資料轉換成時頻譜圖604。 而在此的測試資料即為步驟S206的收音音頻訊號。1 and 6 at the same time, first, similar to step S206 and step S208, the
接著,處理裝置140將取得關聯於時頻譜圖的多個子區塊,以從中取得空間特徵610,以輸入至分類器612。在本實施例中,處理裝置140同樣將選取例如是3K~15K Hz的預設頻率範圍做為檢測區域,以產生檢測區域影像。在一實施例中,處理裝置140可以是直接將檢測區域影像進行分割,而直接產生多個大小相同的子區塊。在另一實施例中,處理裝置140可以是將檢測區域影像進行影像金字塔處理,以產生不同尺度的多張檢測區域影像。接著,處理裝置140再將不同尺度的檢測區域影像進行分割,以產生多個大小相同的子區塊。Next, the
之後,處理裝置140將會取得各個子區塊的特徵值,並且取得各個子區塊分別與參考模型608之間的紋理相關性606。在此的特徵值例如是子區塊的像素值的標準差以及直方圖偏態至少之一者,但需要符合預先儲存的分類器的輸入需求。在此的紋理相關性可以是子區塊與參考模型所對應的參考子區塊之間的局部二值模式的相關係數。接著,處理裝置140再將各個子區塊所對應的特徵值以及紋理相關性輸入至分類器612,以產生輸出結果,而此輸出結果將指出待測物件T是否具有缺陷。After that, the
在本實施例中,為了達到更為嚴謹的檢測,以避免實際上有缺陷的待測物件T被誤判為無缺陷,處理裝置140更可以在輸出結果指出待測物件T不具有缺陷時,更進一步地根據輸出結果的信賴度做更進一步的確認。詳細來說,以SVM分類器為例,處理裝置140可以是取得輸出結果的信心值(confidence level),並且判斷信心值是否大於預設信心閥值614,其中預設信心閥值可以是0.75。若是,則處理裝置140將判定待測物件T不具有缺陷。反之,則處理裝置140將判定待測物件T具有缺陷。In this embodiment, in order to achieve a more rigorous inspection, so as to prevent the object T to be tested that is actually defective from being misjudged as non-defective, the
在本實施例中,缺陷檢測系統100所檢測的缺陷為待測物件T的組裝異音。由於不同種類的組裝異音會在播放特定音頻訊號時產生共振諧波,處理裝置140更可以進一步地利用異音在時頻譜圖的頻率與諧波頻率範圍來判斷待測物件T中造成組裝異音的部件。以另一觀點來說,處理裝置140將根據時頻譜圖的特定區域,來判別造成組裝異音的部件。In this embodiment, the defect detected by the
舉例來說,圖7根據本發明一實施例所繪示的時頻譜圖的示意圖,而以下僅示意出時頻譜圖中的部份區域。時頻譜圖710以及時頻譜圖720皆具有組裝異音。由於螺絲未鎖緊時的共振頻率點為460Hz的單點共振,因此處理裝置140可從時頻譜圖710中得出待測裝置T的螺絲未鎖緊。由於揚聲器單體中鐵屑造成的共振音會在460~350Hz均有共振,因此處理裝置140可從時頻譜圖720中得出待測裝置T中存在鐵屑。For example, FIG. 7 is a schematic diagram of a time-spectrogram according to an embodiment of the present invention, and the following only illustrates a partial area of the time-spectrogram. Both the
在實作上,為了避免過度淘汰(overkill),當待測物件因組裝異音而被判定具有缺陷時,測試人員可根據異音的音量來判斷此異音是可接受或不可接受。當此異音為可接受時(不易或是無法被人耳察覺),此待測物件將會被視為「OK」待測物件。當此異音為不可接受時,此待測物件將會被視為「NG」待測物件。就視覺上來說,圖8為根據本發明一實施例所繪示的具有可接受的異音的時頻譜圖810以及具有不可接受的異音的時頻譜圖820的示意圖,其中時頻譜圖820包括高亮度的明顯群集。在後續的實施例中,將會根據此觀察來提出一種基於機器學習的量化機制,其可將異音分類成可接受以及不可接受,以降低過度淘汰率(overkill rate)。In practice, in order to avoid overkill, when the object to be tested is judged to be defective due to assembly of abnormal sound, the tester can judge whether the abnormal sound is acceptable or unacceptable according to the volume of the abnormal sound. When the abnormal sound is acceptable (difficult or undetectable by human ears), the object under test will be regarded as an "OK" object under test. When the abnormal sound is unacceptable, the object under test will be regarded as "NG" object under test. Visually, FIG. 8 is a schematic diagram of a time-
圖9為根據本發明一實施例所繪示的缺陷檢測系統的方塊圖,但此僅是為了方便說明,並不用以限制本發明。首先圖9先介紹缺陷檢測系統中的所有構件以及配置關係,詳細功能將配合圖10一併揭露。FIG. 9 is a block diagram of a defect detection system according to an embodiment of the present invention, but this is only for convenience of description and is not intended to limit the present invention. First, Figure 9 first introduces all the components and configuration relationships in the defect detection system, and detailed functions will be disclosed in conjunction with Figure 10.
請參照圖9,缺陷檢測系統900包括訊號輸出裝置910、麥克風920、類比數位轉換器930以及處理裝置940,其中首碼冠以「9」的類似數字用以表示與圖1類似的元件。缺陷檢測系統900用以判斷待測物件T是否在預先制定的聽覺標準中具有不可接受的缺陷。在此,預先制定的聽覺標準可以是根據人耳感知所設定的範圍、因應客戶需求的客製化範圍、第三方所界定的範圍等等。在以下的實施例中同樣將以具有揚聲器的電子裝置做為待測物件T來進行說明,而缺陷檢測系統900所檢測的缺陷為待測物件T的組裝異音。Please refer to FIG. 9, the
圖10為根據本發明一實施例所繪示的缺陷檢測視覺化方法的流程圖,圖10流程將以圖9的缺陷檢測系統900來執行。FIG. 10 is a flowchart of a defect detection visualization method according to an embodiment of the present invention. The process of FIG. 10 will be executed by the
請同時參照圖9以及圖10,訊號輸出裝置910將輸出測試音頻訊號至待測物件T(步驟S1002),麥克風920將接收待測物件T對於測試音頻訊號的響應訊號(步驟S1004)。接著,類比數位轉換器930將轉換響應訊號為收音音頻訊號(步驟S1006),處理裝置940將針對收音音頻訊號進行訊號處理,以產生時頻譜圖(步驟S1008)。在此,步驟S1002~S1008的細節請參照步驟S202~S208的相關說明,於此不再贅述。接著。處理裝置940將根據時頻譜圖,視覺化判斷待測物件T是否在預先制定的聽覺標準中具有不可接受的缺陷(步驟S1010)。在本實施例中,處理裝置940可先以類似步驟S208的方式來根據時頻譜圖,判斷待測物件T是否具有缺陷。若是,則處理裝置940可更進一步地根據時頻譜圖,判斷此缺陷是否在預先制定的聽覺標準中為不可接受,以避免過度淘汰。9 and 10 at the same time, the
基此,在處理裝置940判斷待測物件T是否具有不可接受的缺陷之前,另一個分類器將會被訓練建構。在此的分類器可以是由處理裝置140自行訓練,或者是自其它處理裝置取得已訓練好的分類器,本發明不在此設限。在以下的實施例中,將以類似於處理裝置940(以下稱為「訓練系統」)來進行分類器的建構。首先,訓練系統將蒐集多筆訓練資料,而此些訓練資料是標示為在預先制定的聽覺標準中「可接受的缺陷」的訓練物件。訓練系統將根據具有異音的待測物件的時頻譜圖中所呈現的時間以及空間特徵,來針對各個訓練聲音樣本所對應的時頻譜圖來進行投影轉換以及特徵量化處理。Based on this, before the
圖11為根據本發明一實施例所繪示的時頻譜圖轉換至投影曲線的功能圖。FIG. 11 is a functional diagram of converting a time-spectrogram to a projection curve according to an embodiment of the present invention.
請參照圖11,訓練系統將自時頻譜圖1110擷取感興趣區域1115,其中感興趣區域1115可以例如是圖7所判別出可能潛在表示異音的區域或是通常具有異音的預設檢測區域。接著,訓練系統會將時頻譜圖1110的感興趣區域1115分割成相對於不同頻率等級(即,水平分割)的多個子時頻譜圖(例如本實施例中的三個區域R1~R3)。訓練系統會將二維的子時頻譜圖R1~R3分別轉換為一維的投影曲線R1~R3。舉例來說,此種轉換可以是將各個子時頻譜圖R1~R3中各個時間的能量數值(即,垂直方向)來進行平均。Please refer to FIG. 11, the training system extracts the region of
對於水平軸代表時間、垂直軸代表能量的投影曲線CR1~CR3來說,具有異音特徵的子時頻譜圖的投影數值則會偏高。當投影數值在時間上持續地偏高,則很有可能具有嚴重的異音。此外,異音特徵將會更進一步地在預先制定的聽覺標準中分類成不可接受(嚴重)以及可接受的異音特徵。假設預先制定的聽覺標準是根據人耳聽覺感知的範圍來設定。人耳對於特定頻率將會較為敏感。例如,當異音特徵只出現在子時頻譜圖R1(頻率皆大約大於10K),則此異音可能為可接受。然而,當異音特徵出現在所有子時頻譜圖R1~R3,則此異音可能為不可接受。換句話說,不可接受(嚴重)的異音具有以下特徵:(1)較高的投影能量、(2)較長的持續時間以及(3)較寬的涵蓋頻率範圍。接著,訓練系統將會進行特徵量化。For the projection curves CR1 to CR3 in which the horizontal axis represents time and the vertical axis represents energy, the projection value of the sub-time spectrogram with abnormal sound characteristics will be higher. When the projection value is continuously high in time, it is likely to have serious abnormal noise. In addition, the abnormal sound characteristics will be further classified into unacceptable (severe) and acceptable abnormal sound characteristics in the pre-established auditory standards. It is assumed that the pre-established auditory standards are set according to the range of human hearing perception. The human ear will be more sensitive to certain frequencies. For example, when the abnormal sound feature only appears in the sub-time spectrogram R1 (the frequency is about greater than 10K), the abnormal sound may be acceptable. However, when the abnormal sound feature appears in all sub-time spectrograms R1 to R3, the abnormal sound may be unacceptable. In other words, unacceptable (serious) abnormal sounds have the following characteristics: (1) higher projection energy, (2) longer duration, and (3) wider frequency range. Next, the training system will perform feature quantification.
詳細來說,為了凸顯局部特徵,每個投影曲線將會依不同時間區間,更進一步地劃分為多個區段(即,垂直劃分)。舉例來說,圖11中的投影曲線CR1可以更進一步地如圖12劃分為五個區段 、 、 、 以及 。子時頻譜圖 中的第 區域中的第 區段所對應的各個區段 的特徵值將會涉及到在對應的區段的資料點的統計參數以及對應的子時頻譜圖所分配到的權重,例如根據方程式(1): (1) 在此, 為區段 中數值大於區段平均值 的平均值,並且 為大於該區段平均值的k倍標準差。 以及 分別為 以及 的平均值, 以及 分別為 以及 的數量。在此, 以及 組成的 集合代表區段 中大於區段平均值 的數值, 為區段 中資料點的數量, 為不同子時頻譜圖的權重。L為各個子時頻譜圖的係數,其中越低頻的子時頻譜圖的係數越低,並且該區間的異音越為重要。 In detail, in order to highlight local features, each projection curve will be further divided into multiple segments (ie, vertical division) according to different time intervals. For example, the projection curve CR1 in Figure 11 can be further divided into five sections as shown in Figure 12. , , , as well as . Sub-time spectrogram In the In the area Each section corresponding to the section The characteristic value of will be related to the statistical parameters of the data points in the corresponding section and the weight assigned to the corresponding sub-time spectrogram, for example, according to equation (1): (1) here, For segment The median value is greater than the segment average The average of and It is k times the standard deviation greater than the average value of the segment. as well as Respectively as well as average of, as well as Respectively as well as quantity. here, as well as consist of Collection representative section Medium is greater than the segment average The value of For segment The number of data points in the Is the weight of the spectrogram at different sub-times. L is the coefficient of each sub-time spectrogram, where the lower the frequency of the sub-time spectrogram, the lower the coefficient, and the more important the abnormal sound in this interval.
為了方便明瞭,假設 ,則 以及 。假設 ,則 。假設 以及 ,則 , , ,以及 。假設低頻子時頻譜圖的權重為 ,則 。區段 的量化結果可以表示成 。 For convenience and clarity, suppose ,but as well as . Hypothesis ,but . Hypothesis as well as ,but , , ,as well as . Assuming that the weight of the low frequency sub-time spectrogram is ,but . Section The quantitative result of can be expressed as .
當訓練系統計算具有可接受的缺陷的訓練物件的各個子時頻譜圖的特徵量化結果V= ,將會根據習知的機器學習或深度學習模型來建立並且訓練用來判斷可接受的異音的單一類別支援向量機(one-class SVM,OCSVM)分類器。之後,此分類器將可判別出可接受與不可接受的異音。 When the training system calculates each sub-time of the training object with acceptable defects, the feature quantization result of the spectrogram V= , Will build and train a single-class support vector machine (one-class SVM, OCSVM) classifier for judging acceptable abnormal sounds based on conventional machine learning or deep learning models. After that, this classifier will be able to distinguish acceptable and unacceptable abnormal sounds.
請再回到圖10,應明瞭的是,S1010中有關於根據時頻譜圖,視覺化判斷待測物件T是否在預先制定的聽覺標準中具有不可接受的缺陷的細節將會對應到訓練OCSVM分類器的步驟。詳細來說,當處理裝置940接收到時頻譜圖,將會自時頻譜圖中擷取感興趣區域,並且依不同頻率等級劃分感興趣區域,以產生多個子時頻譜圖。接著,處理裝置940會將所有子時頻譜圖分別轉換為一維的投影曲線,並且依不同時間區間,更進一步地將所有投影曲線劃分為多個區段。處理裝置940將計算並且輸入各個子時頻譜圖的特徵量化結果至OCSVM分類器。處理裝置940將取得輸出結果的信心水準(以下稱為「缺陷信心水準」),並且判斷缺陷信心水準是否大於預設缺陷信心水準,其中預設缺陷信心水準可以是0。在此的預設缺陷信心水準可以是根據實際應用來進行調整。當判斷結果為肯定時,則處理裝置940將會判定待測物件T具有可接受的異音。當判斷結果為否定時,則處理裝置940將會判定待測物件T具有不可接受的異音。Please go back to Figure 10, it should be clear that S1010 has details about visually judging whether the object T under test has unacceptable defects in the pre-established auditory standard based on the time-spectrogram and will correspond to the training OCSVM classification. Steps. In detail, when the
舉例來說,圖13為根據本發明一實施例所繪示的異音分級檢測的數據圖,其中每個資料點代表一個待測物件。點1301所對應的待測物件的缺陷信心水準為0.1,因此具有可接受的異音。事實上,群集1300中的所有點所對應的待測物件具有可接受的異音。點1303所對應的待測物件的缺陷信心水準為-0.38,點1304所對應的待測物件的缺陷信心水準為-0.04,因此皆具有不可接受的異音。點1302所對應的待測物件為離群值(outlier),因此將會被重新測試。For example, FIG. 13 is a data diagram of abnormal sound classification detection according to an embodiment of the present invention, wherein each data point represents an object to be tested. The defect confidence level of the object to be tested corresponding to point 1301 is 0.1, so it has an acceptable abnormal sound. In fact, the objects to be tested corresponding to all points in the
表1總結出利用無導入(例如圖2)以及有導入(例如圖10)基於機器學習量化機制的缺陷檢測視覺化方法以判別可接受與不可接受的異音的實驗結果。在無導入量化機制的方式下,1361個待測物件中,有941個待測物件將會歸類為「OK」待測物件(OK率為0.691),而有421個待測物件將會歸類為「NG」待測物件(NG率為0.309)。在有導入量化機制的方式下,將會在預先制定的聽覺標準下根據嚴重程度來額外進行異音分類。421個「NG」待測物件中,有177個待測物件具有可接受的異音(整體的OK率為0.821),而有244個待測物件具有不可接受的異音(整體的NG率為0.179)。顯然地,表1反應出導入量化機制可讓整體NG率下降13%。以產品製造以及管理方面來說,檢測以及重新測試的成本將會顯著下降,而較低的過度逃汰將會提升產品良率。在特定的應用中,可以將NG的待測物件以異音的嚴重程度來進行品質分級,以做為未來產品市場規劃。
綜上所述,本發明所提出的缺陷檢測方法及其系統,其可從時頻譜圖中以電腦視覺技術來檢測待測物件是否在預先制定的聽覺標準中具有不可接受的缺陷。如此一來,本發明除了可提供比人耳主觀判定更為精確的缺陷檢測,更可以降低相關的職業傷害。In summary, the defect detection method and system proposed by the present invention can use computer vision technology to detect whether the object under test has unacceptable defects in the pre-established auditory standard from the time-spectrogram. In this way, the present invention can not only provide more accurate defect detection than the subjective judgment of human ears, but also reduce related occupational injuries.
100、900:缺陷檢測系統
110、910:訊號輸出裝置
120、920:麥克風
130、930:類比數位轉換器
140、940:處理裝置
T:待測物件
S202~S210、S1002~S1010:步驟
310、320、710、720、810、820、1100:時頻譜圖
315、325:檢測區域
RB:異音特徵
402~414、602~614:流程
H:影像金字塔
T1、T0:影像
T11、T01:子區塊
R1、R0:參考模型
R11、R01:參考子區塊
FE:特徵擷取
M:分類器
1115:感興趣區域
R1~R3:子時頻譜圖
CR1~CR3:投影曲線
1300:群集
1301~13014:點100, 900:
圖1為根據本發明一實施例所繪示的缺陷檢測系統的方塊圖。 圖2為根據本發明一實施例所繪示的缺陷檢測視覺化方法的流程圖。 圖3為根據本發明一實施例所繪示的時頻譜圖的示意圖。 圖4為根據本發明一實施例所繪示的建構分類器的功能方塊流程圖。 圖5為根據本發明一實施例所繪示的空間特徵的取得方法的功能方塊流程圖。 圖6為根據本發明一實施例所繪示的缺陷檢測視覺化方法的功能方塊流程圖。 圖7為根據本發明一實施例所繪示的時頻譜圖的示意圖。 圖8為根據本發明一實施例所繪示的具有可接受的異音的時頻譜圖以及具有不可接受的異音的時頻譜圖的示意圖。 圖9為根據本發明一實施例所繪示的缺陷檢測系統的方塊圖。 圖10為根據本發明一實施例所繪示的缺陷檢測視覺化方法的流程圖。 圖11為根據本發明一實施例所繪示的時頻譜圖轉換為投影曲線的功能圖。 圖12為根據本發明一實施例所繪示的劃分投影曲線的示意圖。 圖13為根據本發明一實施例所繪示的異音的分級檢測的數據圖。 FIG. 1 is a block diagram of a defect detection system according to an embodiment of the invention. FIG. 2 is a flowchart of a method for visualizing defect detection according to an embodiment of the present invention. FIG. 3 is a schematic diagram of a time-frequency spectrum diagram according to an embodiment of the present invention. FIG. 4 is a functional block flowchart of constructing a classifier according to an embodiment of the invention. FIG. 5 is a functional block flowchart of a method for obtaining spatial features according to an embodiment of the present invention. FIG. 6 is a functional block flowchart of a defect detection visualization method according to an embodiment of the present invention. FIG. 7 is a schematic diagram of a time-frequency spectrum diagram according to an embodiment of the present invention. FIG. 8 is a schematic diagram illustrating a time-spectrogram with acceptable abnormal sounds and a time-spectrogram with unacceptable abnormal sounds according to an embodiment of the present invention. FIG. 9 is a block diagram of a defect detection system according to an embodiment of the invention. FIG. 10 is a flowchart of a defect detection visualization method according to an embodiment of the present invention. FIG. 11 is a functional diagram of converting a time-spectrogram into a projection curve according to an embodiment of the present invention. FIG. 12 is a schematic diagram of dividing projection curves according to an embodiment of the present invention. FIG. 13 is a data diagram of the hierarchical detection of abnormal sounds according to an embodiment of the present invention.
S1002~S1010:步驟 S1002~S1010: steps
Claims (19)
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
US17/088,591 | 2020-11-04 | ||
US17/088,591 US11326935B2 (en) | 2019-10-21 | 2020-11-04 | Method and system for vision-based defect detection |
Publications (2)
Publication Number | Publication Date |
---|---|
TWI744177B true TWI744177B (en) | 2021-10-21 |
TW202219503A TW202219503A (en) | 2022-05-16 |
Family
ID=80782786
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
TW110102498A TWI744177B (en) | 2020-11-04 | 2021-01-22 | Method and system for vision-based defect detection |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN114519691A (en) |
TW (1) | TWI744177B (en) |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20140278151A1 (en) * | 2013-03-15 | 2014-09-18 | Digital Wind Systems, Inc. | Nondestructive acoustic doppler testing of wind turbine blades from the ground during operation |
US20160247533A1 (en) * | 2015-02-25 | 2016-08-25 | Casio Computer Co., Ltd. | Audio recording apparatus, audio recording method, and non-transitory recording medium |
US20170289717A1 (en) * | 2016-03-31 | 2017-10-05 | Sonos, Inc. | Defect Detection via Audio Playback |
CN111103354A (en) * | 2019-12-18 | 2020-05-05 | 广电计量检测(沈阳)有限公司 | Tree worm hole-boring detection device and method |
-
2021
- 2021-01-22 TW TW110102498A patent/TWI744177B/en active
- 2021-05-07 CN CN202110495711.0A patent/CN114519691A/en active Pending
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20140278151A1 (en) * | 2013-03-15 | 2014-09-18 | Digital Wind Systems, Inc. | Nondestructive acoustic doppler testing of wind turbine blades from the ground during operation |
US20160247533A1 (en) * | 2015-02-25 | 2016-08-25 | Casio Computer Co., Ltd. | Audio recording apparatus, audio recording method, and non-transitory recording medium |
US20170289717A1 (en) * | 2016-03-31 | 2017-10-05 | Sonos, Inc. | Defect Detection via Audio Playback |
CN111103354A (en) * | 2019-12-18 | 2020-05-05 | 广电计量检测(沈阳)有限公司 | Tree worm hole-boring detection device and method |
Also Published As
Publication number | Publication date |
---|---|
TW202219503A (en) | 2022-05-16 |
CN114519691A (en) | 2022-05-20 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11636583B2 (en) | Method and system for vision-based defect detection | |
TWI761715B (en) | Method and system for vision-based defect detection | |
Castellana et al. | Discriminating pathological voice from healthy voice using cepstral peak prominence smoothed distribution in sustained vowel | |
CN103546853A (en) | Speaker abnormal sound detecting method based on short-time Fourier transformation | |
TWI684366B (en) | Isolation, extraction and evaluation of transient distortions from a composite signal | |
CN104807540B (en) | Noise check method and system | |
JP6790086B2 (en) | Leakage determination device and leak determination method | |
TWI774472B (en) | Abnormal sound detection method and apparatus | |
KR102316671B1 (en) | Method for treating sound using cnn | |
CN109903775B (en) | Audio popping detection method and device | |
CN113259832A (en) | Microphone array detection method and device, electronic equipment and storage medium | |
CN114515782A (en) | Stamping quality detection system and stamping quality detection method | |
TWI744177B (en) | Method and system for vision-based defect detection | |
KR101290928B1 (en) | Equipment and method for diagnosing malfunction using sound quality parameter | |
KR20210125366A (en) | Method for detecting recording device failure using neural network classifier, server and smart device implementing the same | |
JP2021071586A (en) | Sound extraction system and sound extraction method | |
JP7000757B2 (en) | Speech processing program, speech processing method and speech processing device | |
EP4409155A1 (en) | Method for identifying and characterizing, by using artificial intelligence, noises generated by a vehicle braking system | |
TWI778437B (en) | Defect-detecting device and defect-detecting method for an audio device | |
CN113155271B (en) | Acoustic vibration detection method, system, terminal and medium | |
JP7334457B2 (en) | Anomaly detection system, anomaly detection device, anomaly detection method and program | |
CN115103285B (en) | Speaker abnormality detection method, device apparatus and storage medium | |
Wenhua et al. | A method of loudspeaker’s pure tone fault detection based on time-frequency image fractal | |
CN117392131B (en) | Method and system for detecting defects of inner wall of die casting | |
JP7431372B1 (en) | Anomaly detection device and anomaly detection method |