TW201522951A - Optical detection system for central process unit socket and method thereof - Google Patents
Optical detection system for central process unit socket and method thereof Download PDFInfo
- Publication number
- TW201522951A TW201522951A TW102144621A TW102144621A TW201522951A TW 201522951 A TW201522951 A TW 201522951A TW 102144621 A TW102144621 A TW 102144621A TW 102144621 A TW102144621 A TW 102144621A TW 201522951 A TW201522951 A TW 201522951A
- Authority
- TW
- Taiwan
- Prior art keywords
- image
- region
- foot
- value
- grayscale
- Prior art date
Links
Landscapes
- Image Analysis (AREA)
- Image Processing (AREA)
- Length Measuring Devices By Optical Means (AREA)
Abstract
Description
一種光學檢測系統及其方法,尤其是指一種中央處理器腳座的光學檢測系統及其方法。 An optical detection system and method thereof, in particular, an optical detection system of a central processor foot and a method thereof.
現有進行中央處理器腳座的光學檢測,一般是在擷取到包含有中央處理器腳座的擷取圖像後,對擷取圖像進行二值化處理時,往往會受到嚴重的光線干擾而造成擷取圖像轉換為二催化圖像時,二值化圖像與擷取圖像產生過大的失真,進一步造成在中央處理器腳座的檢測出現不精確的問題,而需要再依靠人力進行二次檢測,導致中央處理器腳座的光學檢測效率不彰。 The existing optical detection of the central processing unit foot is generally subjected to severe light interference when the captured image is binarized after capturing the captured image including the central processing unit socket. When the captured image is converted into a two-catalytic image, the binarized image and the captured image are excessively distorted, further causing inaccuracies in the detection of the central processor socket, and it is necessary to rely on human resources. Performing a second test results in inefficient optical inspection of the central processor's foot.
綜上所述,可知先前技術中長期以來一直存在現有中央處理器腳座的光學檢測效率不彰的問題,因此有必要提出改進的技術手段,來解決此一問題。 In summary, it has been known in the prior art that the optical detection efficiency of the existing central processing unit has been inconsistent for a long time, and therefore it is necessary to propose an improved technical means to solve this problem.
有鑒於先前技術存在現有中央處理器腳座的光學檢測效率不彰的問題,本發明遂揭露一種中央處理器腳座的光學檢測系統及其方法,其中:本發明所揭露的中央處理器腳座的光學檢測系統,其包含:圖像擷取模組、圖像轉換模組、分析模組、圖像處理模組、腳位模組及檢測模組。 In view of the prior art, there is a problem that the optical detection efficiency of the existing central processing unit foot is inconspicuous, and the present invention discloses an optical detection system for a central processing unit foot and a method thereof, wherein the central processing unit of the present invention is disclosed. The optical detection system comprises: an image capture module, an image conversion module, an analysis module, an image processing module, a pin module and a detection module.
圖像擷取模組是用以擷取包含中央處理器腳座的擷取圖像;圖像轉換模組是用以將擷取圖像轉換為灰階圖像;分析模組是用以取得灰階圖像中中央處理器腳座預先劃分的多個區域,並對每一個區域的灰階值分佈進行分析,以分析出區域的灰階值分佈是否為雙區域值分佈;圖像處理模組是依據分析模組的分析結果進行下列圖像處理:當區域的灰階值分佈為雙區域值分佈時,則將高灰階值區域的像素點設定為255以及將低灰階值區域的像素點設定為0的二值化處理;當區域的灰階值分佈為非雙區域值分佈時,則取出區域的比例值,以依據 區域的灰階值分佈範圍與比例值計算出門檻值,並將大於以及等於門檻值的像素點設定為255以及將小於門檻值的像素點設定為0的二值化處理;及將每一個區域的二值化處理結果整合為二值化圖像;腳位模組是用以自二值化圖像中找出每一個頂點與每一個頂點對應的腳位本體,再依據頂點與腳位本體找出每一個腳位的基準線;檢測模組是用以將二值化圖像中每一個腳位的基準線與標準圖像中每一個腳位的基準線進行下列比對:當二值化圖像中腳位的基準線與標準圖像中腳位的基準線的偏移距離大於預設值,則檢測出腳位異常,並將異常腳位標示於擷取圖像上;及當二值化圖像中腳位的基準線與標準圖像中腳位的基準線的夾角大於預設值,則檢測出腳位異常,並將異常腳位標示於擷取圖像上。 The image capturing module is configured to capture a captured image including a CPU processor socket; the image conversion module is configured to convert the captured image into a grayscale image; and the analysis module is configured to obtain A plurality of pre-divided regions of the central processor socket in the grayscale image, and analyzing the grayscale value distribution of each region to analyze whether the grayscale value distribution of the region is a dual region value distribution; the image processing module The group performs the following image processing according to the analysis result of the analysis module: when the grayscale value distribution of the region is a two-region value distribution, the pixel of the high grayscale value region is set to 255 and the low grayscale value region is The binarization of the pixel is set to 0; when the grayscale value distribution of the region is a non-dual region value distribution, the scale value of the region is taken out to The grayscale value distribution range and the scale value of the region calculate a threshold value, and a pixel point larger than and equal to the threshold value is set to 255 and a binarization process in which a pixel point smaller than the threshold value is set to 0; and each region is set The binarization processing result is integrated into a binarized image; the pin module is used to find the foot body corresponding to each vertex and each vertex from the binarized image, and then according to the vertex and the foot body Find the reference line of each foot; the detection module is used to compare the reference line of each pin in the binarized image with the reference line of each pin in the standard image: when the value is If the offset distance between the reference line of the foot in the image and the reference line of the foot in the standard image is greater than a preset value, the abnormal position of the foot is detected, and the abnormal foot is marked on the captured image; If the angle between the reference line of the pin in the binarized image and the reference line of the pin in the standard image is greater than the preset value, the pin abnormality is detected, and the abnormal pin is marked on the captured image.
本發明所揭露的中央處理器腳座的光學檢測方法,其包含下列步驟:首先,擷取包含中央處理器腳座的擷取圖像;接著,將擷取圖像轉換為灰階圖像;接著,取得灰階圖像中中央處理器腳座預先劃份的多個區域,並對每的個區域的灰階值分佈進行分,以分析出區域的灰階值分佈是否為雙區域值分佈;接著,當區域的灰階值分佈為雙區域值分佈時,則將高灰階值區域的像素點設定為255以及將低灰階值區域的像素點設定為0的二值化處理;接著,當區域的灰階值分佈為非雙區域值分佈時,則取出區域的比例值,以依據區域的灰階值分佈範圍與比例值計算出門檻值,並將大於以及等於門檻值的像素點設定為255以及將小於門檻值的像素點設定為0的二值化處理;接著,將每一個區域的二值化處理結果整合為二值化圖像;接著,自二值化圖像中找出每一個頂點與每一個頂點對應的腳位本體,再依據頂點與腳位本體找出每一個腳位的基準線;接著,將二值化圖像中每一個腳位的基準線與標準圖像中每一個腳位的基準線進行比對;接著,當二值化圖像中腳位的基準線與標準圖像中腳位的基準線的偏移距離大於預設值,則檢測出腳位異常,並將異常腳位標示於擷取圖像上;最後,當二值化圖像中腳位的基準線與標準圖像中腳位的基準線的夾角大於預設值,則檢測出腳位異常,並將異常腳位標示於擷取圖像上。 The optical detection method of the central processor socket disclosed in the present invention comprises the following steps: first, capturing a captured image including a central processor socket; and then converting the captured image into a grayscale image; Then, a plurality of regions in which the central processor feet are pre-scorched in the grayscale image are obtained, and the grayscale value distribution of each region is divided to analyze whether the grayscale value distribution of the region is a dual region value distribution. Then, when the grayscale value distribution of the region is a two-region value distribution, the pixel of the high grayscale value region is set to 255 and the binarization of the pixel of the low grayscale value region is set to 0; When the grayscale value distribution of the region is a non-dual region value distribution, the scale value of the region is taken out, and the threshold value is calculated according to the grayscale value distribution range and the proportional value of the region, and the pixel points larger than and equal to the threshold value are calculated. a binarization process set to 255 and a pixel point smaller than the threshold value is set to 0; then, the binarization processing result of each region is integrated into a binarized image; then, the binarized image is found Every vertex The foot body corresponding to each vertex, and then find the reference line of each foot according to the vertex and the foot body; then, the reference line of each pin in the binarized image and each foot in the standard image The reference line of the bit is compared; then, when the offset distance of the reference line of the pin in the binarized image and the reference line of the pin in the standard image is greater than a preset value, the pin abnormality is detected, and The abnormal pin is marked on the captured image; finally, when the angle between the reference line of the pin in the binarized image and the reference line of the pin in the standard image is greater than a preset value, the pin abnormality is detected, and Mark the abnormal foot on the captured image.
本發明所揭露的裝置與操作方法如上,與先前技術之間的差異在於本發明將擷取圖像轉換為灰階圖像後,依據不同的區域進行灰階值分佈進行分析,當區域的灰階值分佈為雙區域值分佈時,則將高灰階值區域的像素點設定為255以及將低灰階值區域的像素點設定為0的二值化處理,當區域的灰階值分 佈為非雙區域值分佈時,則取出區域的比例值,以依據區域的灰階值分佈範圍與比例值計算出門檻值,並將大於以及等於門檻值的像素點設定為255以及將小於門檻值的像素點設定為0的二值化處理,以將每一個區域的二值化處理結果整合為二值化圖像,可以有效的避免外在光線的影響,以清楚且準確的分離中央處理腳座的腳位以及中央處理腳座的其餘部份,藉以提高後續中央處理器腳座的光學檢測精確度。 The device and the operation method disclosed in the present invention are as above, and the difference from the prior art is that the present invention converts the captured image into a grayscale image, and performs grayscale value distribution analysis according to different regions, when the gray of the region When the order value distribution is a two-region value distribution, the pixel of the high gray-scale value region is set to 255 and the pixel of the low gray-scale value region is set to 0, and the grayscale value of the region is divided. When the cloth is a non-dual area value distribution, the scale value of the area is taken out, and the threshold value is calculated according to the grayscale value distribution range and the scale value of the area, and the pixel points larger than and equal to the threshold value are set to 255 and will be less than the threshold. The binarization processing of the pixel of the value is set to 0, so as to integrate the binarization processing result of each region into the binarized image, the influence of the external light can be effectively avoided, and the central processing is clearly and accurately separated. The foot of the foot and the rest of the central handle are used to improve the optical detection accuracy of the subsequent CPU handle.
透過上述的技術手段,本發明可以達成提高中央處理器腳座的光學檢測效率的技術功效。 Through the above technical means, the present invention can achieve the technical effect of improving the optical detection efficiency of the central processing unit foot.
11‧‧‧圖像擷取模組 11‧‧‧Image capture module
12‧‧‧圖像轉換模組 12‧‧‧Image Conversion Module
13‧‧‧分析模組 13‧‧‧Analysis module
14‧‧‧圖像處理模組 14‧‧‧Image Processing Module
15‧‧‧腳位模組 15‧‧‧Foot module
16‧‧‧檢測模組 16‧‧‧Test module
17‧‧‧顯示模組 17‧‧‧Display module
18‧‧‧儲存模組 18‧‧‧ storage module
21‧‧‧灰階圖像 21‧‧‧ grayscale image
22‧‧‧二值化圖像 22‧‧‧ Binarized image
221‧‧‧第1腳位 221‧‧‧1st position
222‧‧‧第2腳位 222‧‧‧2nd pin
23‧‧‧標準圖像 23‧‧‧Standard image
231‧‧‧第1腳位 231‧‧‧1st pin
232‧‧‧第2腳位 232‧‧‧2nd pin
24‧‧‧擷取圖像 24‧‧‧ Capture images
31‧‧‧高灰階值區域 31‧‧‧High gray scale area
32‧‧‧低灰階值區域 32‧‧‧Low grayscale value area
33‧‧‧灰階值區域 33‧‧‧ Grayscale value area
41‧‧‧基準線 41‧‧‧ baseline
42‧‧‧基準線 42‧‧‧ baseline
步驟101‧‧‧擷取包含中央處理器腳座的擷取圖像 Step 101‧‧‧ Capture the captured image containing the central processor socket
步驟102‧‧‧將擷取圖像轉換為灰階圖像 Step 102‧‧‧ Convert captured images to grayscale images
步驟103‧‧‧取得灰階圖像中中央處理器腳座預先劃分的多個區域,並對每一個區域的灰階值分佈進行分析,以分析出區域的灰階值分佈是否為雙區域值分佈 Step 103‧‧‧ obtain a plurality of pre-divided regions of the central processor socket in the grayscale image, and analyze the grayscale value distribution of each region to analyze whether the grayscale value distribution of the region is a dual region value distributed
步驟104‧‧‧當區域的灰階值分佈為雙區域值分佈時,則將高灰階值區域的像素點設定為255以及將低灰階值區域的像素點設定為0的二值化處理 Step 104‧‧‧ When the grayscale value distribution of the region is a two-region value distribution, the pixel of the high grayscale value region is set to 255 and the pixel of the low grayscale value region is set to 0.
步驟105‧‧‧當區域的灰階值分佈為非雙區域值分佈時,則取出區域的比例值,以依據區域的灰階值分佈範圍與比例值計算出門檻值,並將大於以及等於門檻值的像素點設定為255以及將小於門檻值的像素點設定為0的二值化處理 Step 105‧‧‧ When the grayscale value distribution of the region is a non-dual region value distribution, the scale value of the region is taken out to calculate the threshold value according to the grayscale value distribution range and the proportional value of the region, and will be greater than and equal to the threshold The pixel value of the value is set to 255 and the binarization of the pixel point smaller than the threshold value is set to 0.
步驟106‧‧‧將每一個區域的二值化處理結果整合為二值化圖像 Step 106‧‧‧ Integrate the binarization result of each region into a binarized image
步驟107‧‧‧自二值化圖像中找出每一個頂點與每一個頂點對應的腳位本體,再依據頂點與腳位本體找出每一個腳位的基準線 Step 107‧‧‧ Find the foot body corresponding to each vertex and each vertex from the binarized image, and find the reference line of each foot according to the vertex and the foot body
步驟108‧‧‧將二值化圖像中每一個腳位的基準線與標準圖像中每一個腳位的基準線進行比對 Step 108‧‧‧ Align the reference line of each pin in the binarized image with the reference line of each pin in the standard image
步驟109‧‧‧當二值化圖像中腳位的基準線與標準圖像中腳位的基準線的偏移距離大於預設值,則檢測出腳位異常,並將異常腳位標示於擷取圖像上 Step 109‧‧‧ When the offset distance between the reference line of the pin in the binarized image and the reference line of the pin in the standard image is greater than the preset value, the pin abnormality is detected, and the abnormal pin is marked on Capture image
步驟110‧‧‧當二值化圖像中腳位的基準線與標準圖像中腳位的基準線的夾角大於預設值,則檢測出腳位異常,並將異常腳位標示於擷取圖像上 Step 110‧‧‧ When the angle between the reference line of the foot in the binarized image and the reference line of the foot in the standard image is greater than the preset value, the abnormal position is detected, and the abnormal foot is marked for capture On the image
第1圖繪示為本發明中央處理器腳座的光學檢測系統的系統方塊圖。 FIG. 1 is a system block diagram of an optical detection system of a CPU stand of the present invention.
第2A圖以及第2B圖繪示為本發明中央處理器腳座的光學檢測方法的方法流程圖。 2A and 2B are flow charts showing the method of optical detection of the CPU processor foot of the present invention.
第3圖繪示為本發明中央處理器腳座的光學檢測中灰階圖像部份內容示意圖。 FIG. 3 is a schematic diagram showing the content of a grayscale image in the optical detection of the CPU of the CPU of the present invention.
第4A圖繪示為本發明中央處理器腳座的光學檢測中第1區域灰階值分佈示意圖。 FIG. 4A is a schematic diagram showing the distribution of the grayscale value of the first region in the optical detection of the CPU of the CPU of the present invention.
第4B圖繪示為本發明中央處理器腳座的光學檢測中第2區域灰階值分佈示意圖。 FIG. 4B is a schematic diagram showing the distribution of the grayscale value of the second region in the optical detection of the CPU handle of the present invention.
第5圖繪示為本發明中央處理器腳座的光學檢測中二值化圖像部份內容示意圖。 FIG. 5 is a schematic diagram showing a part of the content of the binarized image in the optical detection of the CPU of the CPU of the present invention.
第6A圖繪示為本發明中央處理器腳座的光學檢測中二值化圖像的基準線示意圖。 FIG. 6A is a schematic diagram showing a reference line of a binarized image in optical detection of the central processor socket of the present invention.
第6B圖繪示為本發明中央處理器腳座的光學檢測中標準圖像的基準線示意圖。 FIG. 6B is a schematic diagram showing a reference line of a standard image in optical detection of the CPU processor foot of the present invention.
第7圖繪示為本發明中央處理器腳座的光學檢測中擷取圖像的標示結果示意圖。 FIG. 7 is a schematic diagram showing the marking result of the captured image in the optical detection of the CPU handle of the present invention.
以下將配合圖式及實施例來詳細說明本發明的實施方式,藉此對本發明如何應用技術手段來解決技術問題並達成技術功效的實現過程能充分理解並據以實施。 The embodiments of the present invention will be described in detail below with reference to the drawings and embodiments, so that the application of the technical means to solve the technical problems and achieve the technical effects can be fully understood and implemented.
以下首先要說明本發明所揭露的中央處理器腳座的光學檢測系統,並請參考「第1圖」所示,「第1圖」繪示為本發明中央處理器腳座的光學檢測系層的系統方塊圖。 In the following, the optical detection system of the CPU handle of the present invention is first described. Please refer to FIG. 1 and FIG. 1 is an optical detection system layer of the CPU handle of the present invention. System block diagram.
本發明所揭露的中央處理器腳座的光學檢測系統,其包含:圖像擷取模組11、圖像轉換模組12、分析模組13、圖像處理模組14、腳位模組15及檢測模組16。 The optical detection system of the CPU handle of the present invention comprises: an image capture module 11, an image conversion module 12, an analysis module 13, an image processing module 14, and a pin module 15. And detecting module 16.
在進行中央處理器腳座的光學檢測時,先由圖像擷取模組11擷取包含中央處理器腳座的擷取圖像,且已知中央處理器腳座的腳位數量,接著,圖像轉換模組12即可將擷取圖像轉換為灰階圖像,圖像轉換模組12更包含對擷取圖像進行旋轉以及偏移的交正後,再將擷取圖像轉換為灰階圖像。 In the optical detection of the central processor socket, the image capturing module 11 first captures the captured image including the central processing unit socket, and the number of pins of the central processing unit foot is known, and then, The image conversion module 12 can convert the captured image into a grayscale image, and the image conversion module 12 further includes rotating and offsetting the captured image, and then converting the captured image. It is a grayscale image.
接著,由於不同腳位數量的中央處理器其對應的中央處理器腳座不相同,故需要依據不同腳位數量的中央處理器腳座預先劃分多個區域,每一個區域的大小以及形狀會有相同或是不相同的情況,並且每一個區域會對應有一個比例值,比例值即是區域中所有頂點與所有腳位本體所佔區域的面積比例,其中一個頂點對應一個腳位本體即為一個腳位。 Then, since the central processor of the different number of pins has different CPU pins, it is necessary to pre-divide a plurality of regions according to the number of different pin positions, and the size and shape of each region may be The same or different situation, and each area will have a scale value, the scale value is the area ratio of all the vertices in the area and the area occupied by all the foot bodies, one of the vertices corresponding to one foot body is one Feet.
圖像轉換模組12將擷取圖像轉換為灰階圖像後,即可由分析模組13依據已知中央處理器腳座的腳位數量取得預先劃分的多個區域,並對每一個區域的灰階值分佈進行分析,以分析出區域的灰階值分佈是否為雙區域值分佈。 After the image conversion module 12 converts the captured image into a grayscale image, the analysis module 13 can obtain a plurality of pre-divided regions according to the number of pins of the known central processor socket, and each region is The gray scale value distribution is analyzed to analyze whether the gray scale value distribution of the region is a two-region value distribution.
而圖像處理模組14即可依據分析模組13的分析結果進行下列圖像處理:當區域的灰階值分佈為雙區域值分佈時,則將高灰階值區域設定為255以及將低灰階值區域設定為0的二值化處理。 The image processing module 14 can perform the following image processing according to the analysis result of the analysis module 13: when the grayscale value distribution of the region is a two-region value distribution, the high grayscale value region is set to 255 and will be low. The grayscale value area is set to a binarization process of zero.
舉例來說,假設區域的灰階值分佈為灰階值範圍為“180至220”的高灰階值區域以及灰階值範圍為“80至120”的低灰階值區域,圖像處理模組14即可將灰階值範圍為“180至220”的高灰階值區域所有像素點設定為255,以及圖像處理模組14即可將灰階值範圍為“180至220”的低灰階值區域所有像素點設定為0。 For example, assume that the grayscale value distribution of the region is a high grayscale value region with a grayscale value range of "180 to 220" and a low grayscale value region with a grayscale value range of "80 to 120", image processing mode. The group 14 can set all the pixels of the high grayscale value region with the grayscale value range of "180 to 220" to 255, and the image processing module 14 can set the grayscale value range to "180 to 220". All pixels in the grayscale value area are set to 0.
當區域的灰階值分佈為非雙區域值分佈時,則取出區域的比例值,以依據區域的灰階值分佈範圍與比例值計算出門檻值,並將大於以及等於門檻值的灰階值設定為255以及將小於門檻值的灰階值設定為0的二值化處理。 When the grayscale value distribution of the region is a non-dual region value distribution, the scale value of the region is taken out, and the threshold value is calculated according to the grayscale value distribution range and the proportional value of the region, and the grayscale value greater than and equal to the threshold value is calculated. Set to 255 and binarization processing to set the grayscale value smaller than the threshold value to zero.
舉例來說,假設區域的灰階值分佈為灰階值範圍為“81至220”的區域,圖像處理模組14即可取得區域的比例值為“20%”,區域的灰階值分佈範圍即為“140”,即可由最高灰階值減去灰階值分佈範圍乘以比例值以計算出門檻值,門檻值即為“192”(即220-140×20%=192),而圖像處理模組14即可將大於以及等於門檻值為“192”的像素點設定為255以及將小於門檻值的像素點設定為0的二值化處理。 For example, if the grayscale value distribution of the region is an area with a grayscale value range of “81 to 220”, the image processing module 14 can obtain the ratio of the region to “20%”, and the grayscale value distribution of the region. The range is "140", which can be calculated by multiplying the grayscale value distribution range by the highest grayscale value and multiplying the scale value to calculate the threshold value. The threshold value is "192" (ie 220-140×20%=192), and The image processing module 14 can set a pixel point larger than and equal to the threshold value of "192" to 255 and a binarization process of setting the pixel point smaller than the threshold value to zero.
最後圖像處理模組14會將每一個區域的二值化處理結果整合為二值化圖像,上述對於灰階圖像轉換為二值化圖像的轉換過程可以有效的避免外在光線的影響,以清楚且準確的分離中央處理腳座的腳位以及中央處理腳座的其餘部份。 Finally, the image processing module 14 integrates the binarization processing result of each region into a binarized image, and the above conversion process for converting the grayscale image into the binarized image can effectively avoid the external light. The effect is to clearly and accurately separate the foot of the central processing foot and the rest of the central processing foot.
接著,腳位模組15即可自二值化圖像中找出每一個頂點與每一個頂點對應的腳位本體,再依據頂點與腳位本體找出每一個腳位的基準線,腳位模組15可以透過近似外形以找出每一個頂點以及每一個腳位本體,再透過特定方向以使一個頂點與一個腳位本體相互對應,再由頂點中心至腳位本體底部中點的連線設定為基準線。 Then, the pin module 15 can find the pin body corresponding to each vertex and each vertex from the binarized image, and then find the reference line of each pin according to the vertex and the pin body, the pin position The module 15 can obtain an approximate shape to find each vertex and each foot body, and then pass through a specific direction to make a vertex and a foot body correspond to each other, and then connect the line from the vertex center to the bottom point of the foot body. Set as the baseline.
接著,檢測模組16將二值化圖像中每一個腳位的基準線與標準圖像中每一個腳位的基準線進行下列比對:當二值化圖像中腳位的基準線與標準圖像中腳位的基準線的偏移距離大於偏移預設值,則檢測出腳位異常,並將異常腳位標示於擷取圖像上。 Next, the detection module 16 compares the reference line of each pin in the binarized image with the reference line of each pin in the standard image: when the reference line of the pin in the binarized image is If the offset distance of the reference line of the pin in the standard image is greater than the offset preset value, the pin abnormality is detected, and the abnormal pin is marked on the captured image.
當二值化圖像中腳位的基準線與標準圖像中腳位的基準線的夾角大於夾角預設值,則檢測出腳位異常,並將異常腳位標示於擷取圖像上。 When the angle between the reference line of the foot in the binarized image and the reference line of the foot in the standard image is greater than the preset value of the angle, the abnormal position is detected, and the abnormal foot is marked on the captured image.
在檢測模組16將異常腳位標示於擷取圖像上後,即可再透過顯 示模組17對檢測後的所述擷取圖像進行顯示,並且可由儲存模組18儲存檢測後的所述擷取圖像,藉以進一步進行再次的檢測。 After the detection module 16 marks the abnormal foot on the captured image, it can then pass through the display. The display module 17 displays the captured image after the detection, and the captured image can be stored by the storage module 18 for further detection.
接著,以下將以一個實施例來解說本發明的運作方式及流程,以下的實施例說明將同步配合「第1圖」、「第2A圖」以及「第2B圖」所示進行說明,「第2A圖」與「第2B圖」繪示為本發明中央處理器腳座的光學檢測方法的方法流程圖。 Next, the operation mode and flow of the present invention will be described below by way of an embodiment. The following embodiments will be described with reference to "1st drawing", "2A drawing", and "2B drawing". 2A and 2B show a flow chart of a method for optically detecting a CPU socket of the present invention.
請參考「第3圖」所示,「第3圖」繪示為本發明中央處理器腳座的光學檢測中灰階圖像部份內容示意圖。 Please refer to FIG. 3, and FIG. 3 is a schematic diagram showing part of the grayscale image in the optical detection of the CPU of the CPU of the present invention.
在進行中央處理器腳座的光學檢測時,先由圖像擷取模組11擷取包含中央處理器腳座的擷取圖像(步驟101),且已知中央處理器腳座的腳位數量,接著,圖像轉換模組12即可將擷取圖像轉換為灰階圖像21,圖像轉換模組12更包含對擷取圖像進行旋轉以及偏移的校正後,再將擷取圖像轉換為灰階圖像21(步驟102),在「第3圖」中僅繪示出中央處理器腳座中的部份內容,在此僅為示意說明,並不以此局限本發明的應用範疇。 In the optical detection of the central processor socket, the captured image including the central processor socket is first captured by the image capturing module 11 (step 101), and the pin of the central processor socket is known. The number, then, the image conversion module 12 can convert the captured image into a grayscale image 21, and the image conversion module 12 further includes the rotation and offset correction of the captured image, and then The image is converted into a grayscale image 21 (step 102), and only part of the contents of the central processing unit socket is shown in "Fig. 3", which is merely illustrative and not limited thereto. The scope of application of the invention.
接著,由於不同腳位數量的中央處理器其對應的中央處理器腳座不相同,故需要依據不同腳位數量的中央處理器腳座預先劃分8個區域,每一個區域的大小以及形狀會有相同或是不相同的情況,並且每一個區域會對應有一個比例值,比例值即是區域中所有頂點與所有腳位本體所佔區域的面積比例,其中一個頂點對應一個腳位本體即為一個腳位。 Then, since the central processor of the different number of pins has different CPU pins, it is necessary to pre-divide 8 regions according to the number of different pin positions, and the size and shape of each region will be The same or different situation, and each area will have a scale value, the scale value is the area ratio of all the vertices in the area and the area occupied by all the foot bodies, one of the vertices corresponding to one foot body is one Feet.
圖像轉換模組12將擷取圖像轉換為灰階圖像21後,即可由分析模組13依據已知中央處理器腳座的腳位數量取得預先劃分的8區域,並對每一個區域的灰階值分佈進行分析,以分析出區域的灰階值分佈是否為雙區域值分佈(步驟103)。 After the image conversion module 12 converts the captured image into the grayscale image 21, the analysis module 13 can obtain the pre-divided 8 regions according to the number of pins of the known central processor socket, and each region is The grayscale value distribution is analyzed to analyze whether the grayscale value distribution of the region is a two-region value distribution (step 103).
請參考「第4A圖」所示,「第4A圖」繪示為本發明中央處理器腳座的光學檢測中第1區域灰階值分佈示意圖。 Please refer to FIG. 4A, and FIG. 4A is a schematic diagram showing the distribution of the grayscale value of the first region in the optical detection of the CPU handle of the present invention.
如「第4A圖」所示,可以看出第1區域的灰階值分佈為雙區域值,並且第1區域的灰階值分佈為灰階值範圍為“180至220”的高灰階值區域31以及灰階值範圍為“80至120”的低灰階值區域32,圖像處理模組14即可將灰階值範圍為“180至220”的高灰階值區域31所有像素點設定為255,以及圖像處理模組14即可將灰階值範圍為“180至220”的低灰階值區域32所有 像素點設定為0的二值化處理(步驟104)。 As shown in Fig. 4A, it can be seen that the grayscale value distribution of the first region is a two-region value, and the grayscale value distribution of the first region is a high grayscale value with a grayscale value range of "180 to 220". The area 31 and the low gray scale value area 32 with the gray scale value range of “80 to 120”, the image processing module 14 can set all the pixel points of the high gray scale value area 31 with the gray scale value range of “180 to 220”. Set to 255, and the image processing module 14 can set the grayscale value range to "low to gray value range 32 of "180 to 220". The binning processing in which the pixel is set to 0 (step 104).
請參考「第4B圖」所示,「第4B圖」繪示為本發明中央處理器腳座的光學檢測中第2區域灰階值分佈示意圖。 Please refer to FIG. 4B, and FIG. 4B is a schematic diagram showing the distribution of the grayscale value of the second region in the optical detection of the CPU handle of the present invention.
如「第4B圖」所示,可以看出第2區域的灰階值分佈為非雙區域值分佈,第2區域的灰階值分佈為灰階值範圍為“81至220”的灰階值區域33,圖像處理模組14即可取得區域的比例值為“20%”,灰階值區域33的灰階值分佈範圍即為“140”,即可由最高灰階值減去灰階值分佈範圍乘以比例值以計算出門檻值,門檻值即為“192”(即220-140×20%=192),而圖像處理模組14即可將大於以及等於門檻值為“192”的像素點設定為255以及將小於門檻值的像素點設定為0的二值化處理(步驟105)。 As shown in Figure 4B, it can be seen that the grayscale value distribution of the second region is a non-dual region value distribution, and the grayscale value distribution of the second region is a grayscale value with a grayscale value range of "81 to 220". In the area 33, the image processing module 14 can obtain the ratio of the region as "20%", and the grayscale value region 33 has the grayscale value distribution range of "140", that is, the grayscale value can be subtracted from the highest grayscale value. The distribution range is multiplied by the scale value to calculate the threshold. The threshold is “192” (ie 220-140×20%=192), and the image processing module 14 can be greater than and equal to the threshold value of “192”. The pixel is set to 255 and a binarization process of setting a pixel point smaller than the threshold value to 0 (step 105).
其於第3區域至第8區域的灰階值分析可以參考上述說明,在此不再進行贅述,以由圖像處理模組14會將每一個區域的二值化處理結果整合為二值化圖像22(步驟106),二值化圖像22的示意請參考「第5圖」所示,「第5圖」繪示為本發明中央處理器腳座的光學檢測中二值化圖像部份內容示意圖,在「第5圖」中僅繪示出中央處理器腳座中的部份內容,在此僅為示意說明,並不以此局限本發明的應用範疇,上述對於灰階圖像轉換為二值化圖像的轉換過程可以有效的避免外在光線的影響,以清楚且準確的分離中央處理腳座的腳位以及中央處理腳座的其餘部份。 For the grayscale value analysis of the third region to the eighth region, reference may be made to the above description, and no further description is made here, so that the image processing module 14 integrates the binarization processing result of each region into binarization. Image 22 (step 106), the illustration of the binarized image 22 is shown in "figure 5", and "figure 5" shows the binarized image in the optical detection of the CPU handle of the present invention. In the "figure 5", only a part of the content of the central processing unit is shown in the figure, which is merely illustrative, and is not limited to the application scope of the present invention. The conversion process like conversion to binarized image can effectively avoid the influence of external light to clearly and accurately separate the foot of the central processing foot and the rest of the central processing foot.
接著,請參考「第6A圖」以及「第6B圖」所示,「第6A圖」繪示為本發明中央處理器腳座的光學檢測中二值化圖像的基準線示意圖;「第6B圖」繪示為本發明中央處理器腳座的光學檢測中標準圖像的基準線示意圖。 Next, please refer to "6A" and "6B", and "6A" is a schematic diagram of the reference line of the binarized image in the optical detection of the CPU handle of the present invention; "6B The figure is a schematic diagram of a reference line of a standard image in the optical detection of the CPU processor foot of the present invention.
腳位模組15即可自二值化圖像22中找出每一個頂點與每一個頂點對應的腳位本體,再依據頂點與腳位本體找出每一個腳位的基準線41(步驟107),腳位模組15可以透過近似外形以找出每一個頂點以及每一個腳位本體,再透過特定方向以使一個頂點與一個腳位本體相互對應,再由頂點中心至腳位本體底部中點的連線設定為基準線41,在「第6A圖」中僅繪示出中央處理器腳座中的部份內容,在此僅為示意說明,並不以此局限本發明的應用範疇。 The pin module 15 can find the pin body corresponding to each vertex and each vertex from the binarized image 22, and then find the reference line 41 of each pin according to the vertex and the foot body (step 107). The foot module 15 can obtain an approximate shape to find each vertex and each foot body, and then pass through a specific direction to make a vertex and a foot body correspond to each other, and then from the vertex center to the bottom of the foot body. The connection of the point is set to the reference line 41. Only part of the contents of the central processing unit socket is shown in "FIG. 6A", which is merely illustrative and is not intended to limit the scope of application of the present invention.
接著,檢測模組16將二值化圖像22中每一個腳位的基準線41與標準圖像23中每一個腳位的基準線42進行比對(步驟108),在「第6B圖」中僅繪示出中央處理器腳座中的部份內容,在此僅為示意說明,並不以此局限本 發明的應用範疇,即可比對出二值化圖像22中第1腳位221的基準線41與標準圖像23中第1腳位231的基準線42的偏移距離大於偏移預設值,則檢測出第1腳位221異常,並將異常的第1腳位標示於擷取圖像24上(步驟109),擷取圖像24請參考「第7圖」所示,「第7圖」繪示為本發明中央處理器腳座的光學檢測中擷取圖像的標示結果示意圖,在「第7圖」中僅繪示出中央處理器腳座中的部份內容,在此僅為示意說明,並不以此局限本發明的應用範疇。 Next, the detection module 16 compares the reference line 41 of each of the binarized images 22 with the reference line 42 of each of the standard images 23 (step 108), in "Section 6B" Only some of the contents of the central processor socket are shown in the figure, which is only for illustrative purposes, and is not limited thereto. In the application range of the invention, the offset distance between the reference line 41 of the first pin 221 in the binarized image 22 and the reference line 42 of the first pin 231 in the standard image 23 is greater than the offset preset value. Then, the first pin 221 is detected to be abnormal, and the abnormal first pin is indicated on the captured image 24 (step 109), and the captured image 24 is referred to as "Fig. 7", "7th. The figure is a schematic diagram showing the result of capturing images in the optical detection of the CPU of the CPU of the present invention. In the "Fig. 7", only part of the contents of the CPU handle is shown. For illustrative purposes, this application is not intended to limit the scope of the invention.
檢測模組16將二值化圖像22中每一個腳位的基準線41與標準圖像23中每一個腳位的基準線42進行比對(步驟108),即可比對出二值化圖像22中第2腳位222的基準線41與標準圖像23中第2腳位232的基準線43的夾角大於夾角預設值,則檢測出第2腳位222異常,並將異常的第2腳位222標示於擷取圖24像上(步驟110)。 The detecting module 16 compares the reference line 41 of each of the binarized images 22 with the reference line 42 of each of the standard images 23 (step 108), thereby comparing the binarized maps. If the angle between the reference line 41 of the second pin 222 in 22 and the reference line 43 of the second pin 232 in the standard image 23 is greater than the preset value of the included angle, the second pin 222 is detected to be abnormal, and the abnormality is detected. The 2 pin position 222 is indicated on the captured image of Fig. 24 (step 110).
在模測模組16將異常腳位標示於擷取圖像24上後,即可再透過顯示模組17對檢測後的擷取圖24像進行顯示,並且可由儲存模組18儲存檢測後的擷取圖像24,藉以進一步進行再次的檢測。 After the analog module 16 marks the abnormal pin on the captured image 24, the detected image of the captured image 24 can be displayed through the display module 17, and the detected module 18 can be stored by the storage module 18. The image 24 is captured for further detection.
綜上所述,可知本發明與先前技術之間的差異在於本發明將擷取圖像轉換為灰階圖像後,依據不同的區域進行灰階值分佈進行分析,當區域的灰階值分佈為雙區域值分佈時,則將高灰階值區域的像素點設定為255以及將低灰階值區域的像素點設定為0的二值化處理,當區域的灰階值分佈為非雙區域值分佈時,則取出區域的比例值,以依據區域的灰階值分佈範圍與比例值計算出門檻值,並將大於以及等於門檻值的像素點設定為255以及將小於門檻值的像素點設定為0的二值化處理,以將每一個區域的二值化處理結果整合為二值化圖像,可以有效的避免外在光線的影響,以清楚且準確的分離中央處理腳座的腳位以及中央處理腳座的其餘部份,藉以提高後續中央處理器腳座的光學檢測精確度。 In summary, it can be seen that the difference between the present invention and the prior art is that the present invention converts the captured image into a grayscale image, and then analyzes the grayscale value distribution according to different regions, and when the grayscale value distribution of the region is distributed. For the two-region value distribution, the pixel of the high grayscale value region is set to 255 and the pixel of the low grayscale value region is set to 0, and the grayscale value distribution of the region is non-dual region. When the value is distributed, the scale value of the region is taken out, the threshold value is calculated according to the grayscale value distribution range and the scale value of the region, and the pixel point larger than and equal to the threshold value is set to 255 and the pixel point smaller than the threshold value is set. The binarization process of 0, in order to integrate the binarization processing result of each region into a binarized image, can effectively avoid the influence of external light, and clearly and accurately separate the pin of the central processing foot. And the rest of the central processing foot, in order to improve the optical detection accuracy of the subsequent CPU handle.
藉由此一技術手段落以來解決先前技術所存在現有中央處理器腳座的光學檢測效率不彰的問題,進而達成提高中央處理器腳座的光學檢測效率的技術功效。 By this technical means, the problem of inefficiency in the optical detection of the existing central processing unit foot in the prior art is solved, and the technical effect of improving the optical detection efficiency of the central processing unit foot is achieved.
雖然本發明所揭露的實施方式如上,惟所述的內容並非用以直接限定本發明的專利保護範圍。任何本發明所屬技術領域中具有通常知識者,在不脫離本發明所揭露的精神和範圍的前提下,可以在實施的形式上及細節上作些許的更動。本發明的專利保護範圍,仍須以所附的申請專利範圍所界定者為準。 While the embodiments of the present invention have been described above, the above description is not intended to limit the scope of the invention. Any changes in the form and details of the embodiments may be made without departing from the spirit and scope of the invention. The scope of the invention is to be determined by the scope of the appended claims.
11‧‧‧圖像擷取模組 11‧‧‧Image capture module
12‧‧‧圖像轉換模組 12‧‧‧Image Conversion Module
13‧‧‧分析模組 13‧‧‧Analysis module
14‧‧‧圖像處理模組 14‧‧‧Image Processing Module
15‧‧‧腳位模組 15‧‧‧Foot module
16‧‧‧檢測模組 16‧‧‧Test module
17‧‧‧顯示模組 17‧‧‧Display module
18‧‧‧儲存模組 18‧‧‧ storage module
Claims (10)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
TW102144621A TWI497062B (en) | 2013-12-05 | 2013-12-05 | Optical detection system for central process unit socket and method thereof |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
TW102144621A TWI497062B (en) | 2013-12-05 | 2013-12-05 | Optical detection system for central process unit socket and method thereof |
Publications (2)
Publication Number | Publication Date |
---|---|
TW201522951A true TW201522951A (en) | 2015-06-16 |
TWI497062B TWI497062B (en) | 2015-08-21 |
Family
ID=53935552
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
TW102144621A TWI497062B (en) | 2013-12-05 | 2013-12-05 | Optical detection system for central process unit socket and method thereof |
Country Status (1)
Country | Link |
---|---|
TW (1) | TWI497062B (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
TWI704630B (en) * | 2018-11-06 | 2020-09-11 | 亦立科技有限公司 | Semiconductor apparatus and detection method thereof |
CN112840383A (en) * | 2018-10-24 | 2021-05-25 | 富士通先端科技株式会社 | Banknote inspection device, banknote inspection method, and banknote inspection program |
Family Cites Families (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
GB2358098A (en) * | 2000-01-06 | 2001-07-11 | Sharp Kk | Method of segmenting a pixelled image |
TWI310084B (en) * | 2006-07-27 | 2009-05-21 | Asustek Comp Inc | Automatic inspecting method for inspecting the polar direction of the polar element |
US20080258704A1 (en) * | 2007-04-23 | 2008-10-23 | Ryskoski Matthew S | Method and apparatus for identifying broken pins in a test socket |
CN101509870B (en) * | 2009-01-19 | 2011-05-18 | 高铁检测仪器(东莞)有限公司 | Carbon black content grade analysis method in rubber goods |
TWM437456U (en) * | 2012-04-23 | 2012-09-11 | Kinik Co | Defect determination equipment of polishing pad trimmer |
-
2013
- 2013-12-05 TW TW102144621A patent/TWI497062B/en not_active IP Right Cessation
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112840383A (en) * | 2018-10-24 | 2021-05-25 | 富士通先端科技株式会社 | Banknote inspection device, banknote inspection method, and banknote inspection program |
CN112840383B (en) * | 2018-10-24 | 2024-03-08 | 富士通先端科技株式会社 | Banknote checking device, banknote checking method, and banknote checking program |
TWI704630B (en) * | 2018-11-06 | 2020-09-11 | 亦立科技有限公司 | Semiconductor apparatus and detection method thereof |
Also Published As
Publication number | Publication date |
---|---|
TWI497062B (en) | 2015-08-21 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
KR101590831B1 (en) | Method of inspecting foreign substance on a board | |
EP2339292A1 (en) | Three-dimensional measurement apparatus and method thereof | |
US20110069892A1 (en) | Method of comparing similarity of 3d visual objects | |
TWI514326B (en) | System and method for measuring special boundaries | |
CN108520514B (en) | Consistency detection method for electronic elements of printed circuit board based on computer vision | |
JP6256249B2 (en) | Measuring device, substrate inspection device, and control method thereof | |
TWI759669B (en) | Method and system for inspecting display image | |
JP2011220823A (en) | Color measuring device and color measuring method | |
JP6303867B2 (en) | Substrate inspection apparatus and control method thereof | |
TW201520508A (en) | System and method for interpolating points using contact probe | |
CN107271445B (en) | Defect detection method and device | |
TWI497062B (en) | Optical detection system for central process unit socket and method thereof | |
TW201326735A (en) | Method and system for measuring width | |
JP2007155405A (en) | Visual inspection method and visual inspection device | |
TWI450155B (en) | Method and system for calculating calibration information for an optical touch apparatus | |
JP2016217989A (en) | Defect inspection device and defect inspection method | |
CN112419390A (en) | Method and system for measuring height of human body | |
JP2012185030A (en) | Color unevenness determination device, color unevenness determination method and display device | |
US10062155B2 (en) | Apparatus and method for detecting defect of image having periodic pattern | |
CN109084721B (en) | Method and apparatus for determining a topographical parameter of a target structure in a semiconductor device | |
JP2019120644A (en) | Surface inspection device and surface inspection method | |
KR101659309B1 (en) | Vision inspection apparatus and method using the same | |
TWI677231B (en) | Method and system for inspecting display apparatus | |
TW201518695A (en) | System and method for testing stability of light source | |
TW201514474A (en) | Method of detecting defect on optical film with periodic structure and device thereof |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
MM4A | Annulment or lapse of patent due to non-payment of fees |