1290306 玖、發明說明: 【發明所屬之技術領域】 本發明是有關於一種彈簧檢測系統及其方法,特別是 一種利用視覺檢測(visual inspection)來進行彈簧檢測之系統 及其方法。 【先前技術】 彈簣乃是基本機件之一,舉凡拉伸彈簧、壓縮彈簧或 者螺旋彈簧等,皆已被廣泛地應用於各式機械中。在彈簧 製造上,現皆採用自動化、省力化之電腦控制式彈簧成型 機來產出各式彈簧,由於製造時各操作參數的微小差異, 往往導致成品略有差異,為達高精度之要求,因此需要檢 知彈簧之良劣,以求彈簧成品能在可容許之公差範圍内。 以往彈簧之檢測,係在彈簧成型後,利用選別機來各 別辨別彈簧之線徑、自由長等是否位於可容許之公差範圍 内,若是,則移入良品側,若否,則移入不良品側,藉此 檢知成品之良莠,然而,由於檢測過程之快慢取決於選別 機之治具移動速度,以及其本身機械精度之高低,故無法 在極短的時間内完成檢測動作,造成生產過程之延宕。 【發明内容】 因此,本發明之目的在於提供一種利用視覺檢測,即 利用非接觸式之檢測方式來達到精確、快速地進行彈簧檢 測之彈簧檢測系統及其方法。 於疋,在一較佳實施例中,本發明彈簧檢測系統是用 來檢測-生產線上之-彈簧是否具有缺陷,該彈簧檢測系 l29〇3〇6 包含有一影像_取單元、一影像處理單元、一影像分析單 元,以及一數據比較單元。 該影像擷取單元是用來擷取該彈簧之一影像,該影像 5 處理單元是用來接收該影像並對該影像進行編碼,該影像 刀析單元是用來對該編碼後之影像進行分析,以獲得該彈 簧之一參數’該數據比較單元是用來將該參數與一預定值 進行比較,以決定該彈簧之良劣。 此外,在該較佳實施例中,本發明亦提供一種彈簧檢 1〇 測方法,其步驟為·· A)擷取該彈簧之一影像;B)對該影像 進行編碼;C)分析該編碼後之影像,以獲得該彈簧之一參 數,以及D)將該參數與一預定值作比較,以決定該彈簧之 良劣。即以上述之視覺檢測方式,能夠迅速地檢知出所產 出之彈簧的良劣。 【實施方式】 15 有關本發明之前述及其他技術内容、特點與功效,在 以下配合參考圖式之一較佳實施例的詳細說明中,將可清 楚的明白。 參閱圖1,本發明彈簧檢測系統1〇〇之一較佳實施例是 設置在一生產線,即一彈簧成型機2〇〇旁,能在彈簧2〇產 20 出時,即時地以視覺檢測方式快速選別出彈簧20為一良品 或一不良品。 本實施例中,彈簧檢測系統1〇〇實體上包含一影像擷 取單元1、一影像處理單元2、一記憶體3、一顯示器4、 一輸入單兀5以及一驅動控制單元6。影像擷取單元丨於本 5 1290306 實轭例中疋私一數位攝影機,其係以光電耦合元件(ccd)擷 取彈簧20戶斤反射之光訊號後,再將之轉換為電訊號,當然 ,若以類比式之攝像裝1來處s,則應再進行類比/數位轉 換後,方便後續之影像處理、數據分析等動作。此外,光 源的提供亦甚為重要,為提高所擷取影像之明亮清晰度, 亦可以長:供一辅助光源(圖未示)照射於彈簧通過處。 影像處理單元2是指一數位處理器(DSp),除了能驅動 影像擷取單元1外,亦能在接收到影像擷取單元1所傳來 之電訊號後,對影像進行編碼動作,例如轉換為副檔名為 BMP等之非壓縮性圖形格式,或者壓縮為副檔名為吓EG、 GIF等圖形格式’或者是以灰p皆方式去除掉顏色部分後,储 存於一儲存單元10或者暫存於記憶體3中。儲存單元1〇 疋指一快閃記憶體3(flash)、硬碟或其它相類似之磁性或光 學儲存媒體中。 、記憶體3是指一唯讀記憶體,其中儲存有複數電腦程 式碼,可供影像處理單元2在開機後加以載入至一動態隨 機存取圮憶體(dram,圖未示)或快取記憶體(圖未示)中, 以備受使用者控制後能執行其特定功能,本發明中,電腦 程式碼主要分兩個模組··一影像分析單元31與一數據比較 單元32。 衫像分析單元3 1,是用來對影像處理單元2所處理過 後之影像進行分析,以獲得彈簧20之相關參數,例如自由 長度、線徑、節距,以及其公差大小等。數據比較單元32 是用來將影像分析單元31所獲得之參數與儲存單元ι〇中 5 10 15 20 1290306 的動作彈簧成型機200在接收到數攄八j — (―的結果,_整其自Γ二:::: 成之彈簧尺寸超出並所預定之其么參數’例如說製 :=Γ成型機2°°即縮小次一個所產出之彈菁尺寸 、'正所產出之彈簧,確保所產出之良率。 /閱圖3 ’在本系統開始進行第—次 :=設定的動作,如步驟—在進: 接=影像:取單元1與彈簧生產線之距離,或者直 ,確仵所摄之光學變焦能力’並同時調整其攝像之焦距等 由輸入單 影像清晰度。其次,如步驟则〜襄,藉 個^元,2 透過影像處理單元2進—步驅動與控制各 見圏2)/如設定其影像擁取範圍與彈簧尺寸之基準線50( 分規移動^負公差線(正負公差線是以基準線為準,用千 需的正、負公差距離,所得到的影像來設定為 ^口線)’以及其它相關參數,或者是設定檢測之數 定等。“口之數量、色調之調整、待測物生產時之方向設 參,在進行完硬體與軟體上之相關參數設 it行彈簧生產時之檢測動作,如步驟術,當彈 ,4衫像擷取單元丨所攝像之範圍 1即掘取彈簧20之影像。 〜像擷取早兀 數位㈣20之影像後,影像處理單元2即對於此 入影ί分^編碼的動作’同時顯示在顯示器4上,並載 早疋31與數據比較單元32之程式碼,以便進 8 !29〇3〇6 仃步驟403〜404。本例中,是驗證彈簧2〇之自由長度,因 此在分析彈簧20之影像後,即能知道目前所產出之彈簧 的自由長度,並將此一參數與儲存單元1〇中所預存之標準 值加以比較,此一標準預定值可以是已預存在儲存單元1〇 中,或疋由使用者直接設定正、負公差線來進行比較,因 此就能知道彈簧20是否超出所能容許之誤差範圍内,如步 驟 40 5 〇 接著,因上述步驟已能判斷出彈簧20為一良品或一不 良品’因此影像處理H單元2即發送信號至驅動控制單元6 上,使其進一步發送信號至選別機300與彈簧成型機200 上。如步驟406,若為良品,則選別機3〇〇會將彈簧2〇篩 選至良品側’同時影像處理單元2會將此相關資料加以儲 存備份至儲存單元10中,相同地,如步驟4〇7,若為不良 品,選別機會將彈簧2G筛選至不良品側,而影像處理 單元2亦會進行資料儲存的動作。 如步驟408,特別在產出不良品時,影像處理單元2會 透過驅動控制單元6,傳送信號至彈簧成型機2〇〇上,以便 於告知彈簧成型機200進行參數之調整,確保下一次所產 出之彈簧20會在公差範圍内。 最後,如步驟409及41〇,由於先前已設定了所生產之 數目與不良品數目的上限值,因此當彈簧·的產出未達此限 制時,前述的檢測步驟會持續進行,直至良品已屆所需之 生產數目或者不良品數目已屆設定值時才會停止檢測動作 。另或當本系統發生問題時,因本發明附有讓接頭(圖未 9 1290306 不)及TCP/IP驅動元件(圖未示)等,亦可利用網際網路自一 遠端進行維護的工作。 · 綜合上述,本發明彈簧檢測系統1〇〇利用了視覺檢測 方式來進行彈簧20的良劣驗證,因此能夠迅速地檢知出結 果,再供選別機300來篩選至良品側或不良品側,確實= 到本發明之目的。 惟以上所述者,僅為本發明之較佳實施例而已,當不 能以此限定本發明實施之範圍,即大凡依本發明申請^利 範圍及發明說明書内容所作之簡單的等效變化與修飾,皆鲁 應仍屬本發明專利涵蓋之範圍内。 【圓式簡單說明】 圖1是一示意圖,說明本發明彈簧檢測系統之一較佳 · 實施例; 圖2是一示意圖,說明該較佳實施例之一顯示單元所 見之一晝面; 圖3疋一流程圖,說明該較佳實施例之硬體及軟體設 定步驟;以及 馨 圖4是一流程圖,說明本發明彈簧檢測方法之步驟。 10 1290306 【圖式之主要元件代表符號說明】BACKGROUND OF THE INVENTION 1. Field of the Invention This invention relates to a spring detecting system and method thereof, and more particularly to a system and method for performing spring detection using visual inspection. [Prior Art] The magazine is one of the basic parts, and various extension springs, compression springs, or coil springs have been widely used in various types of machinery. In the manufacture of springs, automatic and labor-saving computer-controlled spring forming machines are used to produce all kinds of springs. Due to the small differences in the operating parameters during manufacturing, the finished products are often slightly different, so as to meet the requirements of high precision. Therefore, it is necessary to detect the goodness of the spring so that the finished spring product can be within the tolerance range. In the past, the spring is detected by the sorting machine to determine whether the wire diameter and free length of the spring are within the allowable tolerance range. If yes, move to the good side. If not, move to the defective side. In this way, the quality of the finished product is detected. However, since the speed of the detection process depends on the moving speed of the fixture of the sorting machine and the level of its own mechanical precision, the detection operation cannot be completed in a very short time, resulting in a production process. Delay. SUMMARY OF THE INVENTION Accordingly, it is an object of the present invention to provide a spring detecting system and method thereof that utilizes visual inspection, that is, a non-contact detection method to achieve accurate and rapid spring detection. In a preferred embodiment, the spring detecting system of the present invention is used to detect whether a spring on a production line has a defect, and the spring detecting system l29〇3〇6 includes an image capturing unit and an image processing unit. , an image analysis unit, and a data comparison unit. The image capturing unit is configured to capture an image of the spring, the image processing unit is configured to receive the image and encode the image, and the image analyzing unit is configured to analyze the encoded image. To obtain one of the parameters of the spring 'the data comparison unit is used to compare the parameter with a predetermined value to determine the goodness of the spring. In addition, in the preferred embodiment, the present invention also provides a spring detection method, the steps of which are: A) capturing an image of the spring; B) encoding the image; C) analyzing the code The latter image is obtained to obtain one of the parameters of the spring, and D) the parameter is compared with a predetermined value to determine the goodness of the spring. That is, in the above-described visual inspection method, it is possible to quickly detect the quality of the spring produced. The above and other technical contents, features, and advantages of the present invention will become apparent from the following detailed description of the preferred embodiments. Referring to Figure 1, a preferred embodiment of the spring detecting system 1 of the present invention is disposed on a production line, i.e., a spring forming machine 2, which can be visually detected in a timely manner when the spring 2 is produced. Quickly select the spring 20 as a good or a bad product. In this embodiment, the spring detecting system 1 〇〇 physically includes an image capturing unit 1, an image processing unit 2, a memory 3, a display 4, an input unit 5, and a driving control unit 6. The image capturing unit is a self-contained digital camera in the embodiment of the present invention, which uses a photoelectric coupling element (ccd) to capture the optical signal reflected by the spring 20, and then converts it into an electrical signal. If the analog camera is installed in the s, then the analog/digital conversion should be performed to facilitate subsequent image processing and data analysis. In addition, the provision of the light source is also very important. In order to improve the brightness of the captured image, it can also be long: an auxiliary light source (not shown) is irradiated to the spring. The image processing unit 2 refers to a digital processor (DSp). In addition to driving the image capturing unit 1, the image processing unit 2 can also perform encoding operations on the image after receiving the electrical signal transmitted by the image capturing unit 1. It is an uncompressed graphic format called BMP or the like, or compressed into a graphic format called "Fright EG, GIF, etc." or after removing the color portion in the form of gray p, stored in a storage unit 10 or temporarily Stored in memory 3. The storage unit 1 疋 refers to a flash memory 3, a hard disk or other similar magnetic or optical storage medium. The memory 3 refers to a read-only memory in which a plurality of computer program codes are stored, which can be loaded into a dynamic random access memory (dram, not shown) or fast after the image processing unit 2 is turned on. In the memory (not shown), the user can perform its specific functions after being controlled by the user. In the present invention, the computer program code is mainly divided into two modules: an image analyzing unit 31 and a data comparing unit 32. The shirt image analyzing unit 31 is used to analyze the image processed by the image processing unit 2 to obtain parameters related to the spring 20, such as free length, wire diameter, pitch, and tolerance thereof. The data comparison unit 32 is configured to receive the parameters obtained by the image analyzing unit 31 and the action spring forming machine 200 of the storage unit ι 5 5 10 15 20 1290306 in the received number eight — (the result of the _ Γ二:::: The size of the spring is beyond the predetermined parameters. For example, the system: = Γ molding machine 2 ° ° is to reduce the size of the output of the next one, 'the spring that is being produced, Ensure the yield of the output. / Read Figure 3 'In the system to start the first time: = set the action, such as the step - in the: connect = image: take the distance between unit 1 and the spring production line, or straight, indeed仵The optical zoom capability of the camera is taken 'and the focus of the camera is adjusted at the same time. The image is sharpened by the input image. Secondly, if the step is ~襄, borrow a ^ yuan, 2 through the image processing unit 2 step-by-step drive and control圏 2) / If you set the image capture range and the spring size of the baseline 50 (segment movement ^ negative tolerance line (the positive and negative tolerance line is based on the reference line, using thousands of positive and negative tolerance distances, the resulting The image is set to ^口线)' and other related parameters, or is set The number of tests is determined. “The number of mouths, the adjustment of the hue, the direction of the production of the object to be tested, and the detection of the relevant parameters on the hardware and software. When the bomb is used, the image of the spring 20 is captured by the 4 shirts, and the image processing unit 2 is imaged by the image processing unit 2 after capturing the image of the early digits (4) 20 . The action 'is simultaneously displayed on the display 4, and carries the code of the early 31 and the data comparison unit 32, so as to enter 8! 29 〇 3 〇 6 仃 steps 403 404 404. In this example, it is to verify the free length of the spring 2 〇 Therefore, after analyzing the image of the spring 20, the free length of the currently produced spring can be known, and this parameter is compared with the standard value prestored in the storage unit 1 ,, the standard predetermined value can be Pre-existing in the storage unit 1〇, or the user directly sets the positive and negative tolerance lines for comparison, so that it can be known whether the spring 20 is beyond the allowable error range, as in step 40 5 〇, because of the above steps Already judged The spring 20 is a good product or a defective product. Therefore, the image processing unit H sends a signal to the drive control unit 6 to further transmit a signal to the sorter 300 and the spring forming machine 200. If step 406, if it is a good product, Then, the sorting machine 3〇〇 will filter the spring 2〇 to the good side', and the image processing unit 2 will store and store the relevant data to the storage unit 10, similarly, as in step 4〇7, if it is a defective product, the sorting is performed. The opportunity to filter the spring 2G to the defective side, and the image processing unit 2 also performs the data storage operation. In step 408, especially when the defective product is produced, the image processing unit 2 transmits a signal to the drive control unit 6 to The spring former 2 is mounted to facilitate the adjustment of the parameters of the spring forming machine 200 to ensure that the spring 20 produced next time will be within tolerance. Finally, as in steps 409 and 41, since the number of produced and the upper limit of the number of defective products have been previously set, when the output of the spring does not reach this limit, the aforementioned detecting step will continue until the good product The detection action will be stopped when the number of productions required or the number of defective products has been set. In addition, when there is a problem in the system, the present invention is also provided with a connector (not shown in FIG. 9 1290306) and a TCP/IP driving component (not shown), and the Internet can also be used for maintenance from a remote end. . In summary, the spring detecting system 1 of the present invention utilizes the visual inspection method to verify the quality of the spring 20, so that the result can be quickly detected and then used by the sorting machine 300 to screen to the good side or the defective side. Indeed = to the purpose of the present invention. However, the above is only the preferred embodiment of the present invention, and the scope of the present invention is not limited thereto, that is, the simple equivalent change and modification according to the scope of the present invention and the contents of the invention description. , All Lu should remain within the scope of the invention patent. BRIEF DESCRIPTION OF THE DRAWINGS FIG. 1 is a schematic view showing a preferred embodiment of the spring detecting system of the present invention; FIG. 2 is a schematic view showing one of the faces of the display unit of the preferred embodiment; The first embodiment shows the hardware and software setting steps of the preferred embodiment; and the stencil 4 is a flow chart illustrating the steps of the spring detecting method of the present invention. 10 1290306 [Description of the main components of the diagram]
100 彈簧檢測系統 10 儲存單元 200 彈簧成型機 31 影像分析單元 300 選別機 32 數據比較單元 1 影像擷取單元 20 彈簧 2 影像處理單元 50 基準線 3 記憶體 301 〜306 步驟 4 顯示器 401 〜41 步驟 5 輸入單元 6 驅動控制單元100 spring detection system 10 storage unit 200 spring forming machine 31 image analysis unit 300 sorter 32 data comparison unit 1 image capture unit 20 spring 2 image processing unit 50 reference line 3 memory 301 ~ 306 step 4 display 401 ~ 41 step 5 Input unit 6 drive control unit
1111