201137344 六、發明說明: 【發明所屬之技術領域】 [0001] 本發明涉及產品檢測領域,特別涉及一種檢測鋼板上的 開孔不良的開孔不良檢測裝置及開孔不良檢測方法。 【先前技術】 [0002] 在表面貼裝技術(Surface M〇Unted Teehn()lQgy, SMT)的制程中需要使用具有開孔的鋼板,將錫膏藉由開 孔印製在印刷電路板(Printed Cirxuit BQaFd, PCB)上。在鋼板的制程和使甩中都需要對其上面的開孔 的尺寸參數進行檢測,避免因開孔不良而導致印刷電路 板的印刷不良,繼而增加額外返修工時的產生,造成製 造成本的增加。 [_3] 現有檢測鋼板上開孔的不良的方式主要為人工目檢,然 而,通常情況下每張鋼板上開孔的數量有數千個,如此 使得檢測人員的工作量加大,不利於現代化流水線作業 〇 【發明内容】 [0004] 鑒於此,有必要提供一種能夠自動檢測出鋼板開孔不良 的開孔不良檢測裝置。 [0005] 還有必要提供一種能夠自動檢測出鋼板開孔不良的開孔 不良檢測方法。 [0006] —種開孔不良檢測裝置,用於檢測鋼板是否發生開孔不 良,包括:處理模組及輸出模組。處理模組用於根據預 存的用於描述鋼板上開孔位置的定位資訊從預設的與鋼 099112547 表單編號A0101 第4頁/共22頁 0992022229-0 201137344 板相對應的目標區域圖像上確定一檢測區域,益按照預 設統計規則統計檢測區域内圖像圖元的顏色值為目標值 的圖像圖元數量以產生統計值,將統計值與預設的基準 值比較,並在比較出統計值不等於預設的基準值時,判 定與該目標區域圖像對應的鋼板開孔不良,並輸出提示 資訊給輸出模組。輸出模組用於將提示資訊輸出。 [0007] [0008] Ο [0009] [0010] 〇 [_ 一種開孔不良檢測方法,該方法包括如下步驟: 根據預存的用於描述鋼板上開孔位置的定位資訊從預設 的與鋼板相對應的目標區域圖像確定一檢測區域; 按照預疋掃描規則在檢測區域内進行掃描,並按照預設 統計規則純計檢測區域内圖像圖元的顏色值為目標值的 圖像圖元數量以產生統計值; 將統計值與預設的基準值比較,並在比較出統計值不等 於預設的基準值時判定與該目標區域圖像對應的鋼板開 孔不良5並輪出提示資訊。 藉由上述開孔不良檢測裝置及開孔不良檢測方法,處理 模組根據預定掃描規則在檢測區域内進行掃描,並按照 預設統計規則統計檢測區域内圖像圖元的顏色值為目標 值的圖像I數量Μ生料值,將統龍與預設的基 準值比較,並在比較域計值不等於預設的基準值時判 定與該目襟區域圖像對應的鋼板開孔不良,並輸出提示 資訊給輸出模組。如此,開孔不良檢測裝置不需要人工 參與便可自動的完成對鋼板上開孔的檢卿作,減少了 檢測人員的工作4,麵於現代化流水線作業。 099112547 表單編號Α0101 第5頁/共22頁 0992022229-0 201137344 【實施方式】 [_請參閲圖1,開孔不良檢測農置20包括圖像獲取模組21 處理模組22及輸出模組23。 [0013] 圖像獲取模組21用於根據預存檔案中的用於描述鋼板中 開孔位置的座標及職區域獲取規則攝取目標區域圖像 。其中,目標區域圖像採用一組二進位資料進行表示 二進位資料可存儲在處理模組22中。該預存檔案用於描 述鋼板的資訊,例如鋼板的尺寸、鋼板上開孔的數量、 鋼板上開孔對應的座標及鋼板上開孔的尺寸等。兮預μ 區域獲取規則為根據鋼板上的開孔的尺寸確定目找區域 的大小。例如,目標區域一般要比辦板開口上的尺寸略 大。 [0014] 處理模組22用於根據預存的用於描迷麵板 上開孔位置的 定位資訊從獲得的目標區域圖像上確定—檢測區域,並 元的顏色值為 按照預設統計規則統計檢測區域内圖像圖 目標值的®像圖元數#以產生統計值’將統計值與預設 的基準值_ m㈣統替料於職的基準值 時判定與該目標區域圖像對應的鋼板開孔不良並輸出 提示資訊給輸出模組23。其中,該目標值用於表示目標 區域圖像顯示的開孔所具有的顏色。在本實施方式中, 目標區域圖像顯示的開孔用白色來表示,則目標值為用 於表示白色的顏色值。例如,該目榡―圖像經過灰度 處理後,圖像圖元的顏色值用0 Μ分别表示該目標區域 圖像中黑色和白色,則該目標值為!。可以理解地,上述 統計值則是根據檢測區域内的白色圖元的數量來產生的 099112547 表單編號Α0101 第6頁/共22頁 201137344 。例如,檢測區域内的白色圖元的數量可以得到的檢測 區域内開孔的面積值、重心座標值及開孔的長、寬值等 統計值。相應的該預設的基準值可為鋼板上開孔的標準 面積、標準重心座標、標準長寬值。如此將產生的面積 值、重心座標及長寬值分別與預設的標準面積、標準重 心座標、標準長寬值對應的比較,在比較出計算得到的 面積值、重心座標及長寬值與預設的標準面積、標準重 心座標、標準長寬值不相等時,說明開孔的尺寸不符合 生產要求以及開孔的位置偏位。 [0015] 輸出模組23用於將提不資訊輪出:》例如,::輪出模組2 3可 以為液晶顯示器,輸出模組23將提示資訊顯示給檢測人 員。 ,一 [0016] 以下舉例說明開孔不良檢測裝置20檢測鋼板開孔的面積 、重心及長寬的過程,請同時參看圖2,圖像獲取模組21 獲取目標區域圖像100,該目標區域圖像丨00中包括開孔 101、102、103 ;處理模組22根據與間孔101相對應的定 位資訊(例如’開孔1 〇 1在二維空間的座標點)在目標區 域圖像100上確定一檢測區域1〇4 ’處理模組22按照如下 方式計算開孔1〇1的面積、重心座標及開孔1〇1的長和寬 〇 [0017] 處理模組22統計檢測區域1〇4内的圖像圖元為白色的數量 ’亦即,統計顏色值為1的圖像圖元的數量,並按照如下 計算公式計算開孔1 〇 1的面積: [0018] sumN = sum(l)其中,sumN表示開孔1〇1的面積值, 099112547 表單編號A0101 第7頁/共22頁 0992022229-0 201137344 sum(l)為顏色值為1的圖像圖元的數量,亦即,將統計出 的顏色值為1的白色圖像圖元的數量值作為開孔101的面 積值。 [0019] 處理模組22還記錄白色圖元所對應的座標點,並利用如 下計算公式計算開孔101的重心座標: [0020] sumX = sum(X)其中,sumX為與顏色值為1的圖像圖元相 對應的座標點中X座標的和值。 [0021] sumY=sum(Y)其中,sumN為與顏色值為1的圖像圖元相 對應的座標點中Y座標的和值。 11 [0022] xc = sumX/sumN其中,xc為開孔的重心的X座標。 [0〇23] yc = sumY/sumN其中,yc為開孔的重心的Y座標。 [0024] 處理模組22還利用如下計算公式計算開孔101的長、寬值 [00251 dx = sum(abs(X-xc))/sumN 其中,dx為開孔X方向的長 ,abs(X-xc)為取X-xc所得值的絕對值。 [0026] dy = sum(abs(Y-yc))/sumN 其中,dy為開孔Y方向的長 ’ abs(Y-yc)為取Y-yc所得值的絕對值。 [0027] 處理模組22將計算得到的面積值、重心座標及長寬值分 別與預設的標準面積、標準重心座標、標準長寬值對應 的比較,在比較出計算得到的面積值、重心座標及長寬 值與預設的標準面積、標準重心座標、標準長寬值不相 等時,輸出提示資訊給輸出模組23,以使輸出模組23將 提示資訊顯示給檢測人員。 099112547 表單編號A0101 第8頁/共22頁 0992022229-0 201137344 [0028]進一步的’請同時參閱圖3,處理模組22包括記憶體222 、—編程後的現場可編程閘陣列400 (Field-Programmable Gate Array ’ FPGA)。該記憶體222用於 存儲圖像獲取模組21拍攝的目標區域圖像。該編程後的 現場可編程閘陣列4 0 0產生對應的電路以實現開孔不良檢 測功能’請同時參看圖3,該現場可編程閘陣列400包括 位置生成電路4〇1、資料處理電路4〇2、資料轉換電路 403、判斷電路4〇5、座標運算電路4〇6、比較值產生電 路407、比較電路4〇8及輸出電路4〇9。 ❹ [0029]位置生成電路401用於根據預存檔案中的洗於描述鋼板中 » 開孔位置的座標產生對應的位址資料,並將位址資料提 供給記憶體222。 ' [0〇3〇]資料處理電路402用於接收記憶體222響應位置生成電路 401提供的位址資料而輸出的目標區域圖像資料,並將接 收的目標區域圖像資料以圖元為單位輪出及產生與圖元 對應的座標。 〇 [0031]資料轉換電路403用於接收資料處理電路4〇2輸出的目標 區域圖像資料,並對接收的目標區域圖像資料進行資料 灰度處理,以獲得對應的二進位資料,並將獲得的二進 位資料提供給判斷電路405。 [0032]判斷電路405用於判斷接收的由資料轉換電路4〇3提供的 一進位Ϊ料是否等於目標值,並在判斷出由資料轉換電 路403提供的二進位資料等於目標值時產生判斷信號,並 將產生的判斷信號提供給座標運算電路4〇6。 0992022229-0 099112547 表單編號A0101 第9頁/共22頁 201137344 [0033] [0034] [0035] [0036] [0037] [0038] 099112547 座標運算電路406用於接收資料處理電路4〇2提供的座標 ,並在接收到判斷信號時記錄對應的座標並計數以產生 計數值。 比較值產生電路407用於根據座標運算電路4〇6記錄的座 標、產生的計數值及預設統計規則產生統計值。其中, 統計值可以為開孔的面積、重心座標或開孔的長和寬等 〇 比較電路408用於將比較值產生電路4〇7產生的統計值與 預設的基準值比較,並在比較出統計值不等於預設的基 準值時產生比較信號,並將比較信號提供給輸出電路4〇9 〇 輸出電路409用於根據比較信號產生提示資訊,並將產生 的提示資訊傳送給輸出模組23。 在其他實施方式中,開孔不良檢測裝置2〇包括處理模組 22及輸出模組23。處理模組22從痏存的目標區域圖像上 確定一檢測區域。預存的目標區域圖像是由其他圖像獲 取裝置根據預存檔案中的用於描述鋼板中開孔位置的座 標及預設區域獲取規則而攝取的。 如圖4所示,其為一較佳實施方式的開孔不良檢測方法的 流程圖。該方法應用于開孔不良檢測裝置中,以使開孔 不良檢測裝置能夠完成對鋼板上開孔的檢測,該方法包 括如下步驟: 步驟S600,根據預存檔案中的用於描述鋼板中開孔位置 的座標及預設區域獲取規則攝取目標區域圖像❶目標區 表單編號A0101 第10頁/共22頁 0992022229-0 [0039] 201137344 域圖像可以採用n位進行表示,並存儲在開孔不 良檢測裝置的記憶體中。該預存檔案用於描述鋼板的資 訊,該資訊包括鋼板的尺寸、鋼板上開孔的數量 、鋼板 上開孔的尺寸及鋼板上開㈣應的座财。該預設區域 獲取規則為根據鋼板上的開孔的大小確定目標區域圖像 的大小。 [0040] #驟S602根據預存的用於描述鋼板上開孔位置的定位 資訊在目標區域圖像中確定一檢測區域。 [0041] 〇 步驟S604,按照預定掃描,則在檢測區域内進行掃描, 〇 並按照預設統計規則統計檢測區勢圖像圖元的顏色值 為目標值的圖像圖元數量以產生統計值。例如,在本實 施方式中本步驟具體為:將存儲丨的目標區;域圖像資料以 圖元為單位輪出及產生與圖元對應的瘴樣;對輸出的目 標區域圖像資料進行資料灰度處理,以獲得對應的二進 位資料;判斷二進位資料是否等於目標值》並在判斷出 二進位資料等於目標值時轉辱魏条轉鼻標,並計數以產 生計數值;根據記錄的座標、產生的計數值及預設統計 規則產生統計值。其中,預設統計規則可為統計檢測區 域内的圖像圖元為目標值的數量,將統計出的數量值作 為面積值,以及記錄圖像圖元為目標值所對應的座標點 ,並統計座標點中X座標的和值及Y座標的和值,根據面 積值及和值計算出重心座標值,以及根據面積值、重心 座標值及記錄的座標點的座標值計算出開孔的長、寬值 ;該二進位資料用於表示圖像圖元的顏色值》 [0042] 步棘S606,將統計值與預設的基準值比較。該統計值可 099112547 表單編號 A0101 第 11 頁/共 22 頁 0992022229-0 201137344 為在步驟S604中計算得到的開孔的面積值、重心座標值 及開孔的長、寬值。該預設的基準值可為鋼板上開孔的 標準面積、標準重心座標及開孔的長寬。 [0043] 步驟S608,在比較出統計值不等於預設的基準值時判定 與該目標區域圖像對應的鋼板開孔不良,並輸出提示資 訊。該提示資訊可以藉由液晶顯示幕顯示,以供檢測人 員參考。 [0044] 藉由上述開孔不良檢測裝置20及開孔不良檢測方法,處 理模組22根據預定掃描規則在檢測區域内進行掃描,並 按照預設統計規則統計檢測區域内圖像圖元的顏色值為 目標值的圖像圖元數量以產生統計值,將統計值與預設 的基準值比較,並在比較出統計值不等於預設的基準值 時判定與該目標區域圖像對應的鋼板開孔不良,並輸出 提示資訊給輸出模組23。如此,開孔不良檢測裝置20不 需要人工參與便可自動的完成對鋼板上開孔的檢測操作 ,減少了檢測人員的工作量,有利於現代化流水線作業 〇 【圖式簡單說明】 [0045] 圖1為一較佳實施方式的開孔不良檢測裝置的功能模組圖 〇 [0046] 圖2為目標區域圖像的示意圖。 [0047] 圖3為圖1所示的處理模組的功能模組圖。 [0048] 圖4為一較佳實施方式的開孔不良檢測方法流程圖。 【主要元件符號說明】 099112547 表單編號A0101 第12頁/共22頁 0992022229-0 201137344 [0049] 開孔不良檢測裝置20 [0050] 圖像獲取模組21 [0051] 處理模組22 [0052] 輸出模組2 3 [0053] 記憶體222 [0054] 目標區域圖像100 [0055] 開孔 101、102、103、104 〇 U [0056] 現場可編程閘陣列400 [0057] 位置生成電路401 - [0058] 資料處理電路402 - [0059] 資料轉換電路403 [0060] 判斷電路405 [0061] 座標運算電路406 〇 [0062] 比較值產生電路407 [0063] 比較電路408 [0064] 輸出電路409 [0065] 開孔不良檢測方法流程圖S600〜S608 099112547 表單編號A0101 第13頁/共22頁 0992022229-0[Technical Field] [0001] The present invention relates to the field of product inspection, and more particularly to an aperture failure detecting device and a method for detecting poor opening of a hole in detecting a poor opening in a steel plate. [Prior Art] [0002] In the process of surface mount technology (Surface M〇Unted Teehn () lQgy, SMT), it is necessary to use a steel plate with an opening, and the solder paste is printed on the printed circuit board by opening the hole (Printed Cirxuit BQaFd, PCB). In the process of the steel plate and in the crucible, 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, and then increase the extra repair work time, resulting in an increase in manufacturing cost. . [_3] The existing methods for detecting the opening of the steel plate are mainly manual visual inspection. However, in general, there are thousands of holes in each steel plate, which makes the workload of the inspection personnel increase, which is not conducive to modernization. Pipeline Operation 〇 [Summary of the Invention] [0004] In view of the above, it is necessary to provide an aperture failure detecting device capable of automatically detecting a defective opening of a steel plate. It is also necessary to provide a method for detecting an open hole defect capable of automatically detecting a defective opening of a steel sheet. [0006] A hole opening detecting device for detecting whether a steel plate has poor opening, comprising: a processing module and an output module. The processing module is configured to determine from the pre-stored positioning information for describing the position of the opening on the steel plate from the preset target area image corresponding to the steel 099112547 Form No. A0101 Page 4 / Total 22 Page 0992022229-0 201137344 In a detection area, the number of image elements of the image element in the detection area is statistically determined according to a preset statistical rule to generate a statistical value, and the statistical value is compared with a preset reference value, and compared 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. The output module is used to output prompt information. [0008] [0009] [0009] [0010] 〇 [_ A method for detecting poor opening, the method comprising the following steps: according to pre-stored positioning information for describing the position of the opening on the steel plate from the preset Corresponding target area image determines a detection area; scans in the detection area according to the pre-scanning rule, and automatically checks the number of image elements of the image element in the area according to a preset statistical rule as the target value The statistical value is generated; 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 opening defect 5 corresponding to the target area image is determined and the prompt information is rotated. 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 image I quantity is a raw material value, and the system is compared with a preset reference value, and when the comparison domain 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 poor, and Output prompt information to the output module. In this way, the perforation failure detecting device can automatically complete the inspection of the opening on the steel plate without manual participation, thereby reducing the work of the inspection personnel 4 and facing the modern assembly line operation. 099112547 Form No. 1010101 Page 5 / Total 22 Page 0992022229-0 201137344 [Embodiment] [_Please refer to FIG. 1 , the hole defect detection farm 20 includes an image acquisition module 21 processing module 22 and an output module 23 . [0013] The image acquisition module 21 is configured to capture a target area image according to a coordinate and a job area acquisition rule 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 openings in the steel plate, and the size of the openings in the steel plate. The 兮 pre-μ area acquisition rule determines the size of the target area based on the size of the opening on the steel plate. For example, the target area is generally slightly larger than the size on the opening of the board. [0014] The processing module 22 is configured to determine, according to the pre-stored positioning information for describing the position of the opening on the panel, the detected area from the obtained target area image, and the color value of the element is counted according to a preset statistical rule. The number of the image element number # of the image map target value in the detection area is determined by the generation of the statistical value 'the statistical value and the preset reference value _ m (four) are used to substitute the reference value of the job, and the steel plate corresponding to the image of the target area is determined. The hole is poor and the prompt information is output to the output module 23. 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 opening of the image of the target area image is indicated by white, and the target value is a color value for indicating white. For example, if the image is grayscale processed, the color value of the image element is 0 Μ to indicate black and white in the image of the target area, then the target value is ! . It can be understood that the above statistical value is generated according to the number of white primitives in the detection area. 099112547 Form number Α0101 Page 6 of 22 201137344 . For example, the number of white primitives in the detection area can be obtained as the 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 for the preset may be the standard area of the opening in the steel plate, the standard center of gravity coordinate, and the standard length and width values. 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. [0015] The output module 23 is configured to rotate the information: "For example, the: the rounding module 2 3 can be a liquid crystal display, and the output module 23 displays the prompt information to the detecting personnel. [0016] The following is an example of the process of detecting the area, center of gravity, and length and width of the opening of the steel plate by the hole failure detecting device 20. Referring to FIG. 2, the image acquiring module 21 acquires the image of the target area 100, which is the target area. The image 丨00 includes openings 101, 102, 103; the processing module 22 is based on the positioning information corresponding to the inter-hole 101 (for example, 'the opening point 〇1 in the coordinate point of the two-dimensional space) in the target area image 100 The processing unit 22 determines that the area of the opening 1〇1, the center of gravity coordinate, and the length and width of the opening 1〇1 are calculated as follows [0017] The processing module 22 statistically detects the area 1〇 The image element in 4 is the number of white', that is, the number of image primitives whose statistical color value is 1, and the area of the opening 1 〇1 is calculated according to the following formula: [0018] sumN = sum(l Where sumN represents the area value of the opening 1〇1, 099112547 Form number A0101 Page 7 / Total 22 page 0992022229-0 201137344 sum(l) is the number of image elements with a color value of 1, that is, The number of white image primitives whose color value is 1 is counted as the face of the opening 101 Value. [0019] 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: [0020] sumX = sum(X), where sumX is a color value of 1 The sum of the X coordinates in the coordinate points corresponding to the image primitive. [0021] 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. 11 [0022] xc = sumX/sumN where xc is the X coordinate of the center of gravity of the aperture. [0〇23] yc = sumY/sumN where yc is the Y coordinate of the center of gravity of the aperture. [0024] The processing module 22 also calculates the length and width of the opening 101 by using the following formula [00251 dx = sum(abs(X-xc))/sumN where dx is the length of the opening X direction, abs (X) -xc) is the absolute value of the value obtained by taking X-xc. Dy = sum(abs(Y-yc))/sumN where dy is the length of the opening Y direction, 'apos-yc) is the absolute value of the value obtained by taking Y-yc. [0027] 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 and the center of gravity. When the coordinates and the length and width values are not equal to 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. 099112547 Form No. A0101 Page 8 of 22 0992022229-0 201137344 [0028] Further, please refer to FIG. 3, the processing module 22 includes a memory 222, and a field-programmable gate array 400 after programming (Field-Programmable) Gate Array 'FPGA). The memory 222 is used 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. Please refer to FIG. 3 simultaneously. The field programmable gate array 400 includes a position generating circuit 4 and a data processing circuit. 2. Data conversion circuit 403, determination circuit 4〇5, coordinate operation circuit 4〇6, comparison value generation circuit 407, comparison circuit 4〇8, and output circuit 4〇9.位置 [0029] The position generating circuit 401 is configured to generate corresponding address data according to the coordinates in the pre-stored file, which are described in the description of the opening position of the steel plate, and provide the address data to the memory 222. '[0〇3〇] 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 to receive the target area image data in units of pixels. Round out and produce coordinates corresponding to the primitives.资料[0031] The data conversion circuit 403 is configured to receive the target area image data output by the data processing circuit 4〇2, and perform data gradation processing on the received target area image data to obtain corresponding binary data, and The obtained binary data is supplied to the judging circuit 405. The determining circuit 405 is configured to determine whether the received carry data provided by the data conversion circuit 4〇3 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 generating the generated judgment signal to the coordinate operation circuit 4〇6. 0992022229-0 099112547 Form No. A0101 Page 9 / Total 22 Page 201137344 [0034] [0038] [0038] 099112547 The coordinate operation circuit 406 is used to receive the coordinates provided by the data processing circuit 4〇2 And when the judgment signal is received, the corresponding coordinates are recorded and counted to generate a count value. The comparison value generating circuit 407 is for generating a statistical value based on the coordinates recorded by the coordinate operation circuit 4〇6, the generated count value, and the preset statistical rule. The statistical value may be the area of the opening, the center of gravity or the length and width of the opening, etc. The comparison circuit 408 is configured to compare the statistical value generated by the comparison value generating circuit 4〇7 with a preset reference value, and compare The comparison signal is generated when the statistical value is not equal to the preset reference value, and the comparison signal is supplied to the output circuit 4〇9. 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. twenty three. In other embodiments, the aperture failure detecting device 2 includes a processing module 22 and an output module 23. The processing module 22 determines a detection area from the image of the cached target area. The pre-stored target area image is taken by other image acquisition means based on coordinates and preset area acquisition rules for describing the position of the opening in the steel plate in the pre-stored file. As shown in Fig. 4, it is a flow chart 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, used to describe the opening position of the steel plate Coordinate and Preset Area Acquisition Rule Intake Target Area Image ❶ Target Area Form No. A0101 Page 10 of 22 0992022229-0 [0039] 201137344 The domain image can be represented by n bits and stored in the poor hole detection In the memory of the device. The pre-stored file is used to describe the information of the steel plate. The information includes the size of the steel plate, the number of openings in the steel plate, the size of the opening in the steel plate, and the wealth of the steel plate. The preset area acquisition rule is to determine the size of the image of the target area based on the size of the opening on the steel plate. [0040] #STEP S602 determines a detection area in the target area image based on the pre-stored positioning information for describing the position of the opening on the steel sheet. [0041] 〇 step S604, according to the predetermined scan, scanning is performed in the detection area, and the number of image primitives for detecting the color value of the image image element is the target value according to a preset statistical rule to generate a statistical value. . For example, in this embodiment, the step is specifically: storing the target area of the UI; the domain image data is rotated in the unit of the picture element and generating a sample corresponding to the picture element; and the data of the output target area image data is performed. Gray processing to obtain corresponding binary data; determining whether the binary data is equal to the target value" and transcribing the Wei strip to the nose when determining that the binary data is equal to the target value, and counting to generate a count value; Coordinates, generated count values, and preset 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. The wide value; the binary data is used to represent the color value of the image primitive. [0042] Step S606, the statistical value is compared with the preset reference value. The statistical value can be 099112547 Form No. A0101 Page 11 of 22 0992022229-0 201137344 is the area value of the aperture, the coordinate value of the center of gravity, and the length and width of the aperture calculated in step S604. The preset reference value can be the standard area of the opening in the steel plate, the standard center of gravity coordinates, and the length and width of the opening. [0043] Step S608, when comparing the statistical value not equal to the preset reference value, determining that the steel plate opening defect corresponding to the target area image is bad, and outputting the prompt information. The prompt information can be displayed by the liquid crystal display screen for the reference of the tester. [0044] The aperture module 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 statistically detects the color of the image element in the area according to a preset statistical rule. The number of image primitives whose value is the target value to generate a statistical value, compares the statistical value with a preset reference value, and determines a steel plate corresponding to the image of the target area when the statistical value is not equal to the preset reference value The opening is poor, 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 of the opening on the steel plate without manual participation, thereby reducing the workload of the detecting personnel and facilitating the modern assembly line operation [Simplified drawing] [0045] 1 is a functional block diagram of a poor aperture detecting device according to a preferred embodiment. [0046] FIG. 2 is a schematic diagram of an image of a target area. 3 is a functional block diagram of the processing module shown in FIG. 1. 4 is a flow chart of a method for detecting poor opening of a preferred embodiment. [Main component symbol description] 099112547 Form No. A0101 Page 12/Total 22 Page 0992022229-0 201137344 [0049] Aperture failure detecting device 20 [0050] Image acquisition module 21 [0051] Processing module 22 [0052] Output Module 2 3 [0053] Memory 222 [0054] Target Area Image 100 [0055] Openings 101, 102, 103, 104 〇 U [0056] Field Programmable Gate Array 400 [0057] Position Generation Circuit 401 - [ 0058] Data Processing Circuit 402 - [0059] Data Conversion Circuit 403 [0060] Decision Circuit 405 [0061] Coordinate Operation Circuit 406 〇 [0062] Comparison Value Generation Circuit 407 [0063] Comparison Circuit 408 [0064] Output Circuit 409 [0065] Flow chart of poor hole detection method S600~S608 099112547 Form No. A0101 Page 13 of 22 0992022229-0