TWI449902B - Apparatus and method for detecting defective hole - Google Patents

Apparatus and method for detecting defective hole Download PDF

Info

Publication number
TWI449902B
TWI449902B TW099112547A TW99112547A TWI449902B TW I449902 B TWI449902 B TW I449902B TW 099112547 A TW099112547 A TW 099112547A TW 99112547 A TW99112547 A TW 99112547A TW I449902 B TWI449902 B TW I449902B
Authority
TW
Taiwan
Prior art keywords
value
area
image
statistical
opening
Prior art date
Application number
TW099112547A
Other languages
Chinese (zh)
Other versions
TW201137344A (en
Inventor
Pei Chong Tang
Original Assignee
Hon Hai Prec Ind Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hon Hai Prec Ind Co Ltd filed Critical Hon Hai Prec Ind Co Ltd
Priority to TW099112547A priority Critical patent/TWI449902B/en
Publication of TW201137344A publication Critical patent/TW201137344A/en
Application granted granted Critical
Publication of TWI449902B publication Critical patent/TWI449902B/en

Links

Landscapes

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

Description

開孔不良檢測裝置及開孔不良檢測方法 Opening failure detecting device and opening failure detecting method

本發明涉及產品檢測領域,特別涉及一種檢測鋼板上的開孔不良的開孔不良檢測裝置及開孔不良檢測方法。 The invention relates to the field of product detection, in particular to an open hole failure detecting device for detecting poor opening on a steel plate and a method for detecting poor opening.

在表面貼裝技術(Surface Mounted Technology,SMT)的制程中需要使用具有開孔的鋼板,將錫膏藉由開孔印製在印刷電路板(Printed Circuit Board,PCB)上。在鋼板的制程和使用中都需要對其上面的開孔的尺寸參數進行檢測,避免因開孔不良而導致印刷電路板的印刷不良,繼而增加額外返修工時的產生,造成製造成本的增加。 In the process of Surface Mounted Technology (SMT), it is necessary to use a steel plate with an opening, and the solder paste is printed on a printed circuit board (PCB) by opening. In the process and use of the steel sheet, it is necessary to detect the dimensional parameters of the openings on the upper surface to avoid poor printing of the printed circuit board due to poor opening, which in turn increases the extra repair work time, resulting in an increase in manufacturing cost.

現有檢測鋼板上開孔的不良的方式主要為人工目檢,然而,通常情況下每張鋼板上開孔的數量有數千個,如此使得檢測人員的工作量加大,不利於現代化流水線作業。 The existing methods for detecting the opening of the steel plate are mainly manual visual inspection. However, in general, the number of openings in each steel plate is several thousand, which makes the workload of the inspection personnel increase, which is not conducive to modern assembly line operations.

鑒於此,有必要提供一種能夠自動檢測出鋼板開孔不良的開孔不良檢測裝置。 In view of this, it is necessary to provide an opening failure detecting device capable of automatically detecting a defective opening of a steel sheet.

還有必要提供一種能夠自動檢測出鋼板開孔不良的開孔不良檢測方法。 It is also necessary to provide an open hole failure detecting method capable of automatically detecting a defective opening of a steel sheet.

一種開孔不良檢測裝置,用於檢測鋼板是否發生開孔不良,包括 :處理模組及輸出模組。處理模組用於根據預存的用於描述鋼板上開孔位置的定位資訊從預設的與鋼板相對應的目標區域圖像上確定一檢測區域,並按照預設統計規則統計檢測區域內圖像圖元的顏色值為目標值的圖像圖元數量以產生統計值,將統計值與預設的基準值比較,並在比較出統計值不等於預設的基準值時,判定與該目標區域圖像對應的鋼板開孔不良,並輸出提示資訊給輸出模組。輸出模組用於將提示資訊輸出。 An opening failure detecting device for detecting whether a steel plate has poor opening, including : Processing module and output module. The processing module is configured to determine a detection area from the preset target area image corresponding to the steel plate according to the pre-stored positioning information for describing the position of the opening on the steel plate, and statistically detect the image in the area according to a preset statistical rule. The color value of the primitive is the number of image primitives of the target value to generate a statistical value, the statistical value is compared with the preset reference value, and when the statistical value is not equal to the preset reference value, the target region is determined. The plate corresponding to the image is poorly opened, and the prompt information is output to the output module. The output module is used to output prompt information.

一種開孔不良檢測方法,該方法包括如下步驟:根據預存的用於描述鋼板上開孔位置的定位資訊從預設的與鋼板相對應的目標區域圖像確定一檢測區域;按照預定掃描規則在檢測區域內進行掃描,並按照預設統計規則統計檢測區域內圖像圖元的顏色值為目標值的圖像圖元數量以產生統計值;將統計值與預設的基準值比較,並在比較出統計值不等於預設的基準值時判定與該目標區域圖像對應的鋼板開孔不良,並輸出提示資訊。 A method for detecting poor opening, the method comprising the steps of: determining a detection area from a preset image of a target area corresponding to a steel plate according to pre-stored positioning information for describing an opening position on the steel sheet; Scanning is performed in the detection area, and the number of image elements of the image element in the detection area is counted according to a preset statistical rule to generate a statistical value; the statistical value is compared with the preset reference value, and When comparing the statistical value not equal to the preset reference value, it is determined that the steel plate opening defect corresponding to the target area image is bad, and the prompt information is output.

藉由上述開孔不良檢測裝置及開孔不良檢測方法,處理模組根據預定掃描規則在檢測區域內進行掃描,並按照預設統計規則統計檢測區域內圖像圖元的顏色值為目標值的圖像圖元數量以產生統計值,將統計值與預設的基準值比較,並在比較出統計值不等於預設的基準值時判定與該目標區域圖像對應的鋼板開孔不良,並輸出提示資訊給輸出模組。如此,開孔不良檢測裝置不需要人工參與便可自動的完成對鋼板上開孔的檢測操作,減少了檢測人員 的工作量,有利於現代化流水線作業。 The processing module performs scanning in the detection area according to the predetermined scanning rule by using the hole defect detecting device and the hole defect detecting method, and statistically detects the color value of the image element in the detection area as a target value according to a preset statistical rule. The number of image primitives is used to generate a statistical value, the statistical value is compared with a preset reference value, and when the comparison statistical value is not equal to the preset reference value, it is determined that the steel plate opening corresponding to the image of the target area is defective, and Output prompt information to the output module. In this way, the hole defect detecting device can automatically complete the detecting operation on the steel plate opening without manual participation, thereby reducing the detecting personnel. The workload is conducive to modern assembly line operations.

20‧‧‧開孔不良檢測裝置 20‧‧‧Drilling failure detection device

21‧‧‧圖像獲取模組 21‧‧‧Image acquisition module

22‧‧‧處理模組 22‧‧‧Processing module

23‧‧‧輸出模組 23‧‧‧Output module

222‧‧‧記憶體 222‧‧‧ memory

100‧‧‧目標區域圖像 100‧‧‧ Target area image

101、102、103、104‧‧‧開孔 101, 102, 103, 104‧‧‧ openings

400‧‧‧現場可編程閘陣列 400‧‧‧Field Programmable Gate Array

401‧‧‧位置生成電路 401‧‧‧ position generation circuit

402‧‧‧資料處理電路 402‧‧‧Data processing circuit

403‧‧‧資料轉換電路 403‧‧‧Data Conversion Circuit

405‧‧‧判斷電路 405‧‧‧Judgement circuit

406‧‧‧座標運算電路 406‧‧‧ coordinate computing circuit

407‧‧‧比較值產生電路 407‧‧‧Comparative value generating circuit

408‧‧‧比較電路 408‧‧‧Comparative circuit

409‧‧‧輸出電路 409‧‧‧Output circuit

S600~S608‧‧‧開孔不良檢測方法流程圖 S600~S608‧‧‧ Flow chart of bad hole detection method

圖1為一較佳實施方式的開孔不良檢測裝置的功能模組圖。 1 is a functional block diagram of a poor aperture detecting device according to a preferred embodiment.

圖2為目標區域圖像的示意圖。 2 is a schematic diagram of an image of a target area.

圖3為圖1所示的處理模組的功能模組圖。 3 is a functional block diagram of the processing module shown in FIG. 1.

圖4為一較佳實施方式的開孔不良檢測方法流程圖。 4 is a flow chart of a method for detecting poor opening of a preferred embodiment.

請參閱圖1,開孔不良檢測裝置20包括圖像獲取模組21、處理模組22及輸出模組23。 Referring to FIG. 1 , the aperture failure detecting apparatus 20 includes an image acquiring module 21 , a processing module 22 , and an output module 23 .

圖像獲取模組21用於根據預存檔案中的用於描述鋼板中開孔位置的座標及預設區域獲取規則攝取目標區域圖像。其中,目標區域圖像採用一組二進位資料進行表示。二進位資料可存儲在處理模組22中。該預存檔案用於描述鋼板的資訊,例如鋼板的尺寸、鋼板上開孔的數量、鋼板上開孔對應的座標及鋼板上開孔的尺寸等。該預設區域獲取規則為根據鋼板上的開孔的尺寸確定目標區域的大小。例如,目標區域一般要比鋼板開口上的尺寸略大。 The image acquisition module 21 is configured to acquire a regular image of the target area according to the coordinates and the preset area in the pre-stored file for describing the position of the opening in the steel plate. The target area image is represented by a set of binary data. The binary data can be stored in the processing module 22. The pre-stored file is used to describe the information of the steel plate, such as the size of the steel plate, the number of openings in the steel plate, the coordinates corresponding to the opening on the steel plate, and the size of the opening on the steel plate. The preset area acquisition rule is to determine the size of the target area according to the size of the opening on the steel plate. For example, the target area is generally slightly larger than the size on the steel plate opening.

處理模組22用於根據預存的用於描述鋼板上開孔位置的定位資訊從獲得的目標區域圖像上確定一檢測區域,並按照預設統計規則統計檢測區域內圖像圖元的顏色值為目標值的圖像圖元數量以產生統計值,將統計值與預設的基準值比較,並在比較出統計值不等於預設的基準值時判定與該目標區域圖像對應的鋼板開孔不良,並輸出提示資訊給輸出模組23。其中,該目標值用於表示目標區域圖像顯示的開孔所具有的顏色。在本實施方式中,目標區域 圖像顯示的開孔用白色來表示,則目標值為用於表示白色的顏色值。例如,該目標區域圖像經過灰度處理後,圖像圖元的顏色值用0、1分別表示該目標區域圖像中黑色和白色,則該目標值為1。可以理解地,上述統計值則是根據檢測區域內的白色圖元的數量來產生的。例如,檢測區域內的白色圖元的數量可以得到的檢測區域內開孔的面積值、重心座標值及開孔的長、寬值等統計值。相應的該預設的基準值可為鋼板上開孔的標準面積、標準重心座標、標準長寬值。如此將產生的面積值、重心座標及長寬值分別與預設的標準面積、標準重心座標、標準長寬值對應的比較,在比較出計算得到的面積值、重心座標及長寬值與預設的標準面積、標準重心座標、標準長寬值不相等時,說明開孔的尺寸不符合生產要求以及開孔的位置偏位。 The processing module 22 is configured to determine a detection area from the obtained target area image according to the pre-stored positioning information for describing the position of the opening on the steel plate, and statistically detect the color value of the image element in the area according to a preset statistical rule. The number of image primitives as the target value is used to generate a statistical value, the statistical value is compared with the preset reference value, and when the comparison statistical value is not equal to the preset reference value, the steel plate corresponding to the image of the target area is determined to be opened. The hole is defective, and the prompt information is output to the output module 23. Wherein, the target value is used to indicate the color of the opening displayed by the image of the target area. In the present embodiment, the target area The opening of the image display is indicated by white, and the target value is the color value used to represent white. For example, after the image of the target area is subjected to gradation processing, the color value of the image element indicates black and white in the image of the target area by 0 and 1, respectively, and the target value is 1. It can be understood that the above statistical values are generated according to the number of white primitives in the detection area. For example, the number of white primitives in the detection area can be obtained as a statistical value of the area value of the opening in the detection area, the coordinate value of the center of gravity, and the length and width of the opening. The corresponding reference value of the preset may be a standard area of the opening on the steel plate, a standard gravity center coordinate, and a standard length and width value. In this way, the area value, the center of gravity coordinate and the length and width values are respectively compared with the preset standard area, the standard gravity center coordinate, and the standard length and width values, and the calculated area value, the center of gravity coordinate, the length and width values, and the pre-comparison are compared. If the standard area, standard center of gravity coordinates, and standard length and width values are not equal, the size of the opening does not meet the production requirements and the positional deviation of the opening.

輸出模組23用於將提示資訊輸出。例如,輸出模組23可以為液晶顯示器,輸出模組23將提示資訊顯示給檢測人員。 The output module 23 is used to output the prompt information. For example, the output module 23 can be a liquid crystal display, and the output module 23 displays the prompt information to the inspector.

以下舉例說明開孔不良檢測裝置20檢測鋼板開孔的面積、重心及長寬的過程,請同時參看圖2,圖像獲取模組21獲取目標區域圖像100,該目標區域圖像100中包括開孔101、102、103;處理模組22根據與開孔101相對應的定位資訊(例如,開孔101在二維空間的座標點)在目標區域圖像100上確定一檢測區域104,處理模組22按照如下方式計算開孔101的面積、重心座標及開孔101的長和寬。 The following describes an example of the process of detecting the area, the center of gravity, and the length and width of the opening of the steel plate by the hole defect detecting device 20. Referring to FIG. 2, the image acquiring module 21 acquires the image of the target area 100, which is included in the image 100 of the target area. Openings 101, 102, 103; the processing module 22 determines a detection area 104 on the target area image 100 according to the positioning information corresponding to the opening 101 (for example, the coordinate point of the opening 101 in the two-dimensional space), and processes The module 22 calculates the area of the opening 101, the coordinates of the center of gravity, and the length and width of the opening 101 as follows.

處理模組22統計檢測區域104內的圖像圖元為白色的數量,亦即,統計顏色值為1的圖像圖元的數量,並按照如下計算公式計算開孔101的面積: sumN=sum(1)其中,sumN表示開孔101的面積值,sum(1)為顏色值為1的圖像圖元的數量,亦即,將統計出的顏色值為1的白色圖像圖元的數量值作為開孔101的面積值。 The processing module 22 counts the number of image primitives in the detection area 104 as white, that is, the number of image primitives whose statistical color value is 1, and calculates the area of the aperture 101 according to the following calculation formula: sumN=sum(1) where sumN represents the area value of the aperture 101, and sum(1) is the number of image primitives having a color value of 1, that is, a white image map in which the calculated color value is 1. The quantity value of the element is taken as the area value of the opening 101.

處理模組22還記錄白色圖元所對應的座標點,並利用如下計算公式計算開孔101的重心座標:sumX=sum(X)其中,sumX為與顏色值為1的圖像圖元相對應的座標點中X座標的和值。 The processing module 22 also records the coordinate points corresponding to the white primitives, and calculates the centroid coordinates of the opening 101 by using the following formula: sumX=sum(X), where sumX is corresponding to the image primitive with the color value of 1. The sum of the X coordinates in the coordinate point.

sumY=sum(Y)其中,sumN為與顏色值為1的圖像圖元相對應的座標點中Y座標的和值。 sumY=sum(Y) where sumN is the sum of the Y coordinates in the coordinate point corresponding to the image element having the color value of 1.

xc=sumX/sumN其中,xc為開孔的重心的X座標。 Xc=sumX/sumN where xc is the X coordinate of the center of gravity of the aperture.

yc=sumY/sumN其中,yc為開孔的重心的Y座標。 Yc=sumY/sumN where yc is the Y coordinate of the center of gravity of the aperture.

處理模組22還利用如下計算公式計算開孔101的長、寬值:dx=sum(abs(X-xc))/sumN其中,dx為開孔X方向的長,abs(X-xc)為取X-xc所得值的絕對值。 The processing module 22 also calculates the length and width of the opening 101 by using the following formula: dx=sum(abs(X-xc))/sumN where dx is the length of the opening X direction, and abs(X-xc) is Take the absolute value of the value obtained by X-xc.

dy=sum(abs(Y-yc))/sumN其中,dy為開孔Y方向的長,abs(Y-yc)為取Y-yc所得值的絕對值。 Dy=sum(abs(Y-yc))/sumN where dy is the length of the opening Y direction, and abs(Y-yc) is the absolute value of the value obtained by taking Y-yc.

處理模組22將計算得到的面積值、重心座標及長寬值分別與預設的標準面積、標準重心座標、標準長寬值對應的比較,在比較出計算得到的面積值、重心座標及長寬值與預設的標準面積、標準重心座標、標準長寬值不相等時,輸出提示資訊給輸出模組23,以使輸出模組23將提示資訊顯示給檢測人員。 The processing module 22 compares the calculated area value, the center of gravity coordinate, and the length and width values with a preset standard area, a standard gravity center coordinate, and a standard length and width value, and compares the calculated area value, the center of gravity coordinate, and the length. When the width value is different from the preset standard area, the standard gravity center coordinate, and the standard length and width values, the prompt information is output to the output module 23, so that the output module 23 displays the prompt information to the detecting personnel.

進一步的,請同時參閱圖3,處理模組22包括記憶體222、一編程 後的現場可編程閘陣列400(Field-Programmable Gate Array,FPGA)。該記憶體222用於存儲圖像獲取模組21拍攝的目標區域圖像。該編程後的現場可編程閘陣列400產生對應的電路以實現開孔不良檢測功能,請同時參看圖3,該現場可編程閘陣列400包括位置生成電路401、資料處理電路402、資料轉換電路403、判斷電路405、座標運算電路406、比較值產生電路407、比較電路408及輸出電路409。 Further, please refer to FIG. 3 at the same time, the processing module 22 includes a memory 222, a programming Field-Programmable Gate Array (FPGA). The memory 222 is configured to store a target area image captured by the image acquisition module 21. The programmed field programmable gate array 400 generates a corresponding circuit to implement the hole defect detection function. Referring to FIG. 3 at the same time, the field programmable gate array 400 includes a position generation circuit 401, a data processing circuit 402, and a data conversion circuit 403. The determination circuit 405, the coordinate operation circuit 406, the comparison value generation circuit 407, the comparison circuit 408, and the output circuit 409.

位置生成電路401用於根據預存檔案中的用於描述鋼板中開孔位置的座標產生對應的位址資料,並將位址資料提供給記憶體222。 The position generating circuit 401 is configured to generate corresponding address data according to the coordinates in the pre-stored file for describing the position of the opening in the steel plate, and provide the address data to the memory 222.

資料處理電路402用於接收記憶體222響應位置生成電路401提供的位址資料而輸出的目標區域圖像資料,並將接收的目標區域圖像資料以圖元為單位輸出及產生與圖元對應的座標。 The data processing circuit 402 is configured to receive the target area image data output by the memory 222 in response to the address data provided by the position generating circuit 401, and output the received target area image data in units of primitives and generate corresponding to the primitive. The coordinates of the coordinates.

資料轉換電路403用於接收資料處理電路402輸出的目標區域圖像資料,並對接收的目標區域圖像資料進行資料灰度處理,以獲得對應的二進位資料,並將獲得的二進位資料提供給判斷電路405。 The data conversion circuit 403 is configured to receive the image data of the target area output by the data processing circuit 402, and perform data gray processing on the received image data of the target area to obtain corresponding binary data, and provide the obtained binary data. A decision circuit 405 is provided.

判斷電路405用於判斷接收的由資料轉換電路403提供的二進位資料是否等於目標值,並在判斷出由資料轉換電路403提供的二進位資料等於目標值時產生判斷信號,並將產生的判斷信號提供給座標運算電路406。 The determining circuit 405 is configured to determine whether the received binary data provided by the data conversion circuit 403 is equal to the target value, and generate a determination signal when it is determined that the binary data provided by the data conversion circuit 403 is equal to the target value, and the generated judgment is generated. The signal is supplied to the coordinate operation circuit 406.

座標運算電路406用於接收資料處理電路402提供的座標,並在接收到判斷信號時記錄對應的座標並計數以產生計數值。 The coordinate operation circuit 406 is configured to receive the coordinates provided by the data processing circuit 402, and record the corresponding coordinates and count to generate a count value upon receiving the determination signal.

比較值產生電路407用於根據座標運算電路406記錄的座標、產生的計數值及預設統計規則產生統計值。其中,統計值可以為開孔的面積、重心座標或開孔的長和寬等。 The comparison value generating circuit 407 is configured to generate a statistical value based on the coordinates recorded by the coordinate operation circuit 406, the generated count value, and a preset statistical rule. The statistical value may be the area of the opening, the coordinates of the center of gravity or the length and width of the opening.

比較電路408用於將比較值產生電路407產生的統計值與預設的基準值比較,並在比較出統計值不等於預設的基準值時產生比較信號,並將比較信號提供給輸出電路409。 The comparison circuit 408 is configured to compare the statistical value generated by the comparison value generating circuit 407 with a preset reference value, and generate a comparison signal when comparing the statistical value not equal to the preset reference value, and provide the comparison signal to the output circuit 409. .

輸出電路409用於根據比較信號產生提示資訊,並將產生的提示資訊傳送給輸出模組23。 The output circuit 409 is configured to generate prompt information according to the comparison signal, and transmit the generated prompt information to the output module 23.

在其他實施方式中,開孔不良檢測裝置20包括處理模組22及輸出模組23。處理模組22從預存的目標區域圖像上確定一檢測區域。預存的目標區域圖像是由其他圖像獲取裝置根據預存檔案中的用於描述鋼板中開孔位置的座標及預設區域獲取規則而攝取的。 In other embodiments, the aperture failure detecting device 20 includes a processing module 22 and an output module 23. The processing module 22 determines a detection area from the pre-stored target area image. The pre-stored target area image is taken by other image acquisition means according to the coordinates and the preset area acquisition rule for describing the position of the opening in the steel plate in the pre-stored file.

如圖4所示,其為一較佳實施方式的開孔不良檢測方法的流程圖。該方法應用於開孔不良檢測裝置中,以使開孔不良檢測裝置能夠完成對鋼板上開孔的檢測,該方法包括如下步驟:步驟S600,根據預存檔案中的用於描述鋼板中開孔位置的座標及預設區域獲取規則攝取目標區域圖像。目標區域圖像可以採用一組二進位進行表示,並存儲在開孔不良檢測裝置的記憶體中。該預存檔案用於描述鋼板的資訊,該資訊包括鋼板的尺寸、鋼板上開孔的數量、鋼板上開孔的尺寸及鋼板上開孔對應的座標等。該預設區域獲取規則為根據鋼板上的開孔的大小確定目標區域圖像的大小。 As shown in FIG. 4, it is a flowchart of a method for detecting poor opening of a preferred embodiment. The method is applied to the hole defect detecting device, so that the hole hole detecting device can complete the detecting of the opening in the steel plate, and the method comprises the following steps: Step S600, according to the pre-stored file for describing the opening position of the steel plate The coordinates and preset area acquisition rules capture the target area image. The target area image can be represented by a set of binary bits and stored in the memory of the aperture defect detecting apparatus. The pre-stored file is used to describe the information of the steel plate, and the information includes the size of the steel plate, the number of openings in the steel plate, the size of the opening on the steel plate, and the coordinates corresponding to the opening on the steel plate. The preset area acquisition rule is to determine the size of the target area image according to the size of the opening on the steel plate.

步驟S602,根據預存的用於描述鋼板上開孔位置的定位資訊在目 標區域圖像中確定一檢測區域。 Step S602, according to the pre-stored positioning information for describing the position of the opening on the steel plate A detection area is determined in the target area image.

步驟S604,按照預定掃描規則在檢測區域內進行掃描,並按照預設統計規則統計檢測區域內圖像圖元的顏色值為目標值的圖像圖元數量以產生統計值。例如,在本實施方式中本步驟具體為:將存儲的目標區域圖像資料以圖元為單位輸出及產生與圖元對應的座標;對輸出的目標區域圖像資料進行資料灰度處理,以獲得對應的二進位資料;判斷二進位資料是否等於目標值,並在判斷出二進位資料等於目標值時記錄對應的座標,並計數以產生計數值;根據記錄的座標、產生的計數值及預設統計規則產生統計值。其中,預設統計規則可為統計檢測區域內的圖像圖元為目標值的數量,將統計出的數量值作為面積值,以及記錄圖像圖元為目標值所對應的座標點,並統計座標點中X座標的和值及Y座標的和值,根據面積值及和值計算出重心座標值,以及根據面積值、重心座標值及記錄的座標點的座標值計算出開孔的長、寬值;該二進位資料用於表示圖像圖元的顏色值。 Step S604, scanning is performed in the detection area according to a predetermined scanning rule, and the number of image primitives of the image element in the detection area is detected according to a preset statistical rule to generate a statistical value. For example, in this embodiment, the step is specifically: outputting the stored target area image data in units of primitives and generating coordinates corresponding to the primitives; and performing grayscale processing on the output target area image data to Obtain corresponding binary data; determine whether the binary data is equal to the target value, and record the corresponding coordinates when determining that the binary data is equal to the target value, and count to generate a count value; according to the recorded coordinates, the generated count value and the pre- Let statistical rules produce statistical values. The preset statistical rule may be that the image primitive in the statistical detection area is the target value, the statistical quantity value is taken as the area value, and the image image element is used as the coordinate point corresponding to the target value, and the statistics are collected. The sum value of the X coordinate and the Y coordinate in the coordinate point, calculate the center of gravity coordinate value according to the area value and the sum value, and calculate the length of the opening hole according to the area value, the center of gravity coordinate value, and the coordinate value of the recorded coordinate point. Wide value; the binary data is used to represent the color value of the image element.

步驟S606,將統計值與預設的基準值比較。該統計值可為在步驟S604中計算得到的開孔的面積值、重心座標值及開孔的長、寬值。該預設的基準值可為鋼板上開孔的標準面積、標準重心座標及開孔的長寬。 Step S606, comparing the statistical value with a preset reference value. The statistical value may be the area value of the aperture calculated in step S604, the center of gravity coordinate value, and the length and width values of the opening. The preset reference value may be a standard area of the opening in the steel plate, a standard center of gravity coordinate, and a length and width of the opening.

步驟S608,在比較出統計值不等於預設的基準值時判定與該目標區域圖像對應的鋼板開孔不良,並輸出提示資訊。該提示資訊可以藉由液晶顯示幕顯示,以供檢測人員參考。 In step S608, when the comparison statistical value is not equal to the preset reference value, it is determined that the steel plate opening defect corresponding to the target area image is output, and the prompt information is output. The prompt information can be displayed by the liquid crystal display screen for the reference of the tester.

藉由上述開孔不良檢測裝置20及開孔不良檢測方法,處理模組22根據預定掃描規則在檢測區域內進行掃描,並按照預設統計規則 統計檢測區域內圖像圖元的顏色值為目標值的圖像圖元數量以產生統計值,將統計值與預設的基準值比較,並在比較出統計值不等於預設的基準值時判定與該目標區域圖像對應的鋼板開孔不良,並輸出提示資訊給輸出模組23。如此,開孔不良檢測裝置20不需要人工參與便可自動的完成對鋼板上開孔的檢測操作,減少了檢測人員的工作量,有利於現代化流水線作業。 With the above-described aperture failure detecting device 20 and the aperture defect detecting method, the processing module 22 performs scanning in the detection area according to a predetermined scanning rule, and according to preset statistical rules. The number of image primitives of the image primitive in the statistical detection area is the number of image primitives of the target value to generate a statistical value, and the statistical value is compared with the preset reference value, and when the statistical value is not equal to the preset reference value It is determined that the steel plate opening corresponding to the image of the target area is defective, and the prompt information is output to the output module 23. In this way, the hole defect detecting device 20 can automatically complete the detecting operation on the steel plate without manual intervention, thereby reducing the workload of the detecting personnel and facilitating the modern assembly line operation.

S600~S608‧‧‧開孔不良檢測方法流程圖 S600~S608‧‧‧ Flow chart of bad hole detection method

Claims (11)

一種開孔不良檢測裝置,用於檢測鋼板是否發生開孔不良,其改良在於:該開孔不良檢測裝置包括處理模組及輸出模組;該處理模組用於根據預存的用於描述鋼板上開孔位置的定位資訊,從預設的與鋼板相對應的目標區域圖像上確定一檢測區域,並按照預設統計規則統計檢測區域內圖像圖元的顏色值為目標值的圖像圖元數量,以產生統計值,該處理模組還用於將統計值與預設的基準值比較,並在比較出統計值不等於預設的基準值時,判定與該目標區域圖像對應的鋼板開孔不良,並輸出提示資訊給輸出模組;該輸出模組用於將提示資訊輸出;其中該預設的基準值為鋼板上開孔的標準面積;預設統計規則為統計檢測區域內的圖像圖元的顏色值為目標值的圖像圖元數量,該處理模組將統計出的數量值作為面積值,以與標準面積進行比較。 An opening failure detecting device for detecting whether a steel plate has poor opening, the improvement is that the opening failure detecting device comprises a processing module and an output module; and the processing module is configured to describe the steel plate according to the pre-existing Positioning information of the opening position, determining a detection area from the preset image of the target area corresponding to the steel plate, and statistically detecting the image value of the image element in the detection area according to a preset statistical rule The number of elements is used to generate a statistical value, and the processing module is further configured to compare the statistical value with a preset reference value, and determine, when comparing the statistical value that is not equal to the preset reference value, the image corresponding to the target area image. The steel plate has poor opening, and outputs prompt information to the output module; the output module is used for outputting the prompt information; wherein the preset reference value is a standard area of the opening on the steel plate; the preset statistical rule is within the statistical detection area The color value of the image primitive is the number of image primitives of the target value, and the processing module compares the counted value as an area value to compare with the standard area. 如申請專利範圍第1項所述之開孔不良檢測裝置,其中該目標值用於表示目標區域圖像所顯示的開孔所具有的顏色值。 The aperture defect detecting apparatus according to claim 1, wherein the target value is used to indicate a color value of an opening displayed by the image of the target area. 如申請專利範圍第1項所述之開孔不良檢測裝置,其中該開孔不良檢測裝置還包括圖像獲取模組,圖像獲取模組用於根據預存檔案中的用於描述鋼板中開孔位置的定位資訊及預設區域獲取規則攝取目標區域圖像;該預設區域獲取規則為根據鋼板上的開孔的尺寸確定目標區域圖像的大小。 The aperture detecting apparatus according to claim 1, wherein the aperture detecting apparatus further comprises an image acquiring module, and the image obtaining module is configured to describe the opening in the steel plate according to the pre-stored file. The positioning information of the position and the preset area acquiring rule capture the image of the target area; the preset area obtaining rule is to determine the size of the image of the target area according to the size of the opening on the steel plate. 如申請專利範圍第1項所述之開孔不良檢測裝置,其中該預設的基準值為鋼板上開孔的標準重心座標;預設統計規則為統計檢測區域內的圖像圖元的顏色值為目標值的數量,將統計出的數量值作為面積值,以及記錄顏色值為目標值的圖像圖元所對應的座標點,並統計座標點中X座標的和 值及Y座標的和值,根據面積值及和值計算出重心座標,以與標準重心座標進行比較。 The aperture defect detecting apparatus according to claim 1, wherein the preset reference value is a standard gravity center coordinate of the opening on the steel plate; the preset statistical rule is a color value of the image primitive in the statistical detection area. For the number of target values, the calculated quantity value is taken as the area value, and the coordinate point corresponding to the image element in which the color value is the target value is recorded, and the sum of the X coordinates in the coordinate point is counted. The value and the sum of the Y coordinates are calculated based on the area value and the sum value to compare with the standard center of gravity coordinates. 如申請專利範圍第1項所述之開孔不良檢測裝置,其中該預設的基準值為鋼板上開孔的標準長寬值;預設統計規則為統計檢測區域內的圖像圖元的顏色值為目標值的數量,將統計出的數量值作為面積值,以及記錄顏色值為目標值的圖像圖元所對應的座標點,並統計座標點中X座標的和值及Y座標的和值,根據面積值及和值計算出重心座標,根據面積值、和值及記錄的座標點的座標值計算出長寬值,以與標準長寬值進行比較。 The aperture defect detecting apparatus according to claim 1, wherein the preset reference value is a standard length and width value of the opening on the steel plate; the preset statistical rule is a color of the image element in the statistical detection area. The value is the number of target values, the calculated quantity value is taken as the area value, and the coordinate point corresponding to the image element whose recording color value is the target value is recorded, and the sum of the X coordinate and the Y coordinate in the coordinate point is counted. The value is calculated according to the area value and the sum value, and the length and width values are calculated according to the area value, the sum value, and the coordinates of the recorded coordinate points to be compared with the standard length and width values. 如申請專利範圍第1項所述之開孔不良檢測裝置,其中該處理模組包括記憶體、一編程後的現場可編程閘陣列;該記憶體用於存儲目標區域圖像;該編程後的現場可編程閘陣列產生對應的電路以實現開孔不良檢測功能,該處理模組包括位置生成電路、資料處理電路、資料轉換電路、判斷電路、座標運算電路、比較值產生電路、比較電路及輸出電路;位置生成電路用於根據預存檔案中的用於描述鋼板中開孔位置的座標產生對應的位址資料,並將位址資料提供給記憶體;資料處理電路用於接收記憶體響應位置生成電路提供的位址資料而輸出的目標區域圖像資料,並將接收的目標區域圖像資料以圖元為單位輸出及產生與圖元對應的座標;資料轉換電路用於接收資料處理電路輸出的目標區域圖像資料,並對接收的目標區域圖像資料進行資料灰度處理,以獲得對應的二進位資料,並將獲得的二進位資料提供給判斷電路;判斷電路用於判斷接收的由資料處理電路提供的二進位資料是否等於目標值,並在判斷出由資料處理電路提供的二進位資料等於目標值時產生判斷信號,並將產生的判斷信號提供給座標運算電路; 座標運算電路用於接收資料處理電路提供的座標,並在接收到判斷信號時記錄對應的座標並計數以產生計數值;比較值產生電路用於根據座標運算電路記錄的座標、產生的計數值及預設統計規則產生統計值;比較電路用於將比較值產生電路產生的統計值與預設的基準值比較,並在比較出統計值不等於預設的基準值時產生比較信號,並將比較信號提供給輸出電路;輸出電路用於根據比較信號產生提示資訊,並將產生的提示資訊傳送給輸出模組。 The device for detecting a hole defect according to claim 1, wherein the processing module comprises a memory and a programmed field programmable gate array; the memory is configured to store an image of the target area; the programmed The field programmable gate array generates a corresponding circuit to implement the hole defect detection function, and the processing module includes a position generation circuit, a data processing circuit, a data conversion circuit, a judgment circuit, a coordinate operation circuit, a comparison value generation circuit, a comparison circuit, and an output. a circuit; the position generating circuit is configured to generate corresponding address data according to coordinates used to describe the position of the opening in the steel plate in the pre-stored file, and provide the address data to the memory; and the data processing circuit is configured to receive the memory response position generation a target area image data outputted by the address data provided by the circuit, and outputting the received target area image data in units of primitives and generating coordinates corresponding to the primitive; the data conversion circuit is configured to receive the output of the data processing circuit Target area image data, and grayscale processing of the received target area image data to obtain Corresponding binary data, and the obtained binary data is provided to the judging circuit; the judging circuit is configured to judge whether the received binary data provided by the data processing circuit is equal to the target value, and determine the second data provided by the data processing circuit The judgment signal is generated when the carry data is equal to the target value, and the generated judgment signal is supplied to the coordinate operation circuit; The coordinate operation circuit is configured to receive a coordinate provided by the data processing circuit, and record a corresponding coordinate when the determination signal is received and count to generate a count value; the comparison value generation circuit is configured to calculate a coordinate value, a generated count value, and the coordinate value according to the coordinate calculation circuit. The preset statistical rule generates a statistical value; the comparison circuit is configured to compare the statistical value generated by the comparison value generating circuit with a preset reference value, and generate a comparison signal when comparing the statistical value not equal to the preset reference value, and compare The signal is provided to the output circuit; the output circuit is configured to generate prompt information according to the comparison signal, and transmit the generated prompt information to the output module. 一種開孔不良檢測方法,該方法包括如下步驟:根據預存的用於描述鋼板上開孔位置的定位資訊從預設的與鋼板相對應的目標區域圖像確定一檢測區域;按照預定掃描規則在檢測區域內進行掃描,並按照預設統計規則統計檢測區域內圖像圖元的顏色值為目標值的圖像圖元數量以產生統計值;將統計值與預設的基準值比較,並在比較出統計值不等於預設的基準值時判定與該目標區域圖像對應的鋼板開孔不良,並輸出提示資訊,該預設的基準值為鋼板上開孔的標準面積;該預設統計規則為統計檢測區域內的圖像圖元的顏色值為目標值的圖像圖元數量,將統計出的數量值作為面積值。 A method for detecting poor opening, the method comprising the steps of: determining a detection area from a preset image of a target area corresponding to a steel plate according to pre-stored positioning information for describing an opening position on the steel sheet; Scanning is performed in the detection area, and the number of image elements of the image element in the detection area is counted according to a preset statistical rule to generate a statistical value; the statistical value is compared with the preset reference value, and Comparing that the statistical value is not equal to the preset reference value, determining that the steel plate opening fault corresponding to the image of the target area is poor, and outputting prompt information, the preset reference value is a standard area of the opening on the steel plate; the preset statistics The rule is to count the number of image primitives whose image color values in the detection area are the target value, and use the counted quantity value as the area value. 如申請專利範圍第7項所述之開孔不良檢測方法,其中該預設的基準值為鋼板上開孔的標準重心座標;預設統計規則為統計檢測區域內的圖像圖元的顏色值為目標值的數量,將統計出的數量值作為面積值,以及記錄顏色值為目標值的圖像圖元所對應的座標點,並統計座標點中X座標的和值及Y座標的和值,根據面積值及和值計算出重心座標,以與標準重心座標進行比較。 The method for detecting a hole defect according to claim 7, wherein the preset reference value is a standard gravity center coordinate of the hole in the steel plate; the preset statistical rule is a color value of the image element in the statistical detection area. For the number of target values, the calculated quantity value is taken as the area value, and the coordinate point corresponding to the image element whose recording color value is the target value is recorded, and the sum value of the X coordinate and the sum value of the Y coordinate in the coordinate point are counted. Calculate the center of gravity coordinates based on the area value and the sum value to compare with the standard center of gravity coordinates. 如申請專利範圍第7項所述之開孔不良檢測方法,其中該預設的基準值為鋼板上開孔的標準長寬值;預設統計規則為統計檢測區域內的圖像圖元的顏色值為目標值的數量,將統計出的數量值作為面積值,以及記錄顏色值為目標值的圖像圖元所對應的座標點,並統計座標點中X座標的和值及Y座標的和值,根據面積值及和值計算出重心座標,根據面積值、和值及記錄的座標點的座標值計算出長寬值,以與標準長寬值進行比較。 The method for detecting a hole defect according to claim 7, wherein the preset reference value is a standard length and width value of the opening on the steel plate; the preset statistical rule is a color of the image element in the statistical detection area. The value is the number of target values, the calculated quantity value is taken as the area value, and the coordinate point corresponding to the image element whose recording color value is the target value is recorded, and the sum of the X coordinate and the Y coordinate in the coordinate point is counted. The value is calculated according to the area value and the sum value, and the length and width values are calculated according to the area value, the sum value, and the coordinates of the recorded coordinate points to be compared with the standard length and width values. 如申請專利範圍第7項所述之開孔不良檢測方法,其中還包括以下步驟:根據預存檔案中的用於描述鋼板中開孔位置的定位資訊及預設區域獲取規則攝取與鋼板上開孔相對應的目標區域圖像;其中,該預設區域獲取規則為根據鋼板上的開孔的尺寸確定目標區域圖像的大小。 The method for detecting the poor opening of the hole according to Item 7 of the patent application, further comprising the steps of: taking in the positioning information according to the pre-stored file for describing the position of the opening in the steel plate and the preset area acquisition rule and the opening on the steel plate. Corresponding target area image; wherein the preset area acquisition rule is to determine the size of the target area image according to the size of the opening on the steel plate. 如申請專利範圍第7項所述之開孔不良檢測方法,其中按照預定掃描規則在檢測區域內進行掃描,並按照預設統計規則統計檢測區域內圖像圖元的顏色值為目標值的圖像圖元數量以產生統計值的步驟具體為將存儲的目標區域圖像資料以圖元為單位輸出及產生與圖元對應的座標;對輸出的目標區域圖像資料進行資料灰度處理,以獲得對應的二進位資料;判斷二進位資料是否等於目標值;在判斷出二進位資料等於目標值時時記錄對應的座標,並計數以產生計數值;根據記錄的座標、產生的計數值及預設統計規則產生統計值。 The method for detecting a hole defect according to claim 7, wherein the scanning is performed in the detection area according to a predetermined scanning rule, and the color value of the image element in the detection area is statistically determined according to a preset statistical rule. The step of generating a statistical value like the number of primitives is specifically outputting the stored target area image data in units of primitives and generating coordinates corresponding to the primitives; performing grayscale processing on the output target image data to Obtaining corresponding binary data; determining whether the binary data is equal to the target value; recording the corresponding coordinates when determining that the binary data is equal to the target value, and counting to generate a count value; according to the recorded coordinates, the generated count value and the pre- Let statistical rules produce statistical values.
TW099112547A 2010-04-21 2010-04-21 Apparatus and method for detecting defective hole TWI449902B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
TW099112547A TWI449902B (en) 2010-04-21 2010-04-21 Apparatus and method for detecting defective hole

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW099112547A TWI449902B (en) 2010-04-21 2010-04-21 Apparatus and method for detecting defective hole

Publications (2)

Publication Number Publication Date
TW201137344A TW201137344A (en) 2011-11-01
TWI449902B true TWI449902B (en) 2014-08-21

Family

ID=46759489

Family Applications (1)

Application Number Title Priority Date Filing Date
TW099112547A TWI449902B (en) 2010-04-21 2010-04-21 Apparatus and method for detecting defective hole

Country Status (1)

Country Link
TW (1) TWI449902B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI719499B (en) * 2019-05-31 2021-02-21 鴻齡科技股份有限公司 Pcb printing system and pcb printing method

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI630383B (en) * 2017-10-17 2018-07-21 亞亞科技股份有限公司 Positioning method for detecting perforated steel plate

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI719499B (en) * 2019-05-31 2021-02-21 鴻齡科技股份有限公司 Pcb printing system and pcb printing method

Also Published As

Publication number Publication date
TW201137344A (en) 2011-11-01

Similar Documents

Publication Publication Date Title
JP6922168B2 (en) Surface mount line quality control system and its control method
TWI585398B (en) Projection-type printed circuit board re-inspection system and methods, and marking the location of the defect
CN111289538B (en) PCB element detection system and detection method based on machine vision
CN103389309B (en) Method and apparatus for checking via
TWI618940B (en) Device and method for detecting blind hole of printed circuit board
CN102213586B (en) Bad hole detection device and bad hole detection method
CN102927903A (en) Method and device for checking surface-mounted-technology (SMT)-based printed circuit board (PCB)
CN113030123B (en) AOI detection feedback system based on Internet of things
JP2020169680A (en) Device, method and program for detecting bolt fastening condition
JP5919212B2 (en) Visual verification support device and control method thereof
CN101487934B (en) Optical detection apparatus and method
TW201917692A (en) A method of evaluating the quality of images
TWI449902B (en) Apparatus and method for detecting defective hole
CN115375608A (en) Detection method and device, detection equipment and storage medium
CN105136818A (en) Printing substrate image detecting method
CN115546140A (en) Display panel detection method and system and electronic device
JP2006251561A (en) Defective pixel repairing method
TW201445458A (en) Testing device and method for camera
TW201522949A (en) Inspection method for image data
JP2008185395A (en) Mounting substrate visual inspection method
CN112858331A (en) VR screen detection method and detection system
KR101017332B1 (en) Method for Optical Test of PCB
TWI445948B (en) Apparatus for detecting burr and method for detecting burr
TW201416664A (en) Detecting system for electronic components on circuit board and method thereof
TW201538947A (en) Detecting method and detecting system for distinguishing the difference of two workpieces

Legal Events

Date Code Title Description
MM4A Annulment or lapse of patent due to non-payment of fees