TWI485634B - System and method for identifying difference of two images - Google Patents

System and method for identifying difference of two images Download PDF

Info

Publication number
TWI485634B
TWI485634B TW099141378A TW99141378A TWI485634B TW I485634 B TWI485634 B TW I485634B TW 099141378 A TW099141378 A TW 099141378A TW 99141378 A TW99141378 A TW 99141378A TW I485634 B TWI485634 B TW I485634B
Authority
TW
Taiwan
Prior art keywords
image
difference
primitive
primitive block
iaed
Prior art date
Application number
TW099141378A
Other languages
Chinese (zh)
Other versions
TW201222434A (en
Inventor
Guang-Jian Wang
xiao-jun Fu
Meng-Zhou Liu
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 TW099141378A priority Critical patent/TWI485634B/en
Publication of TW201222434A publication Critical patent/TW201222434A/en
Application granted granted Critical
Publication of TWI485634B publication Critical patent/TWI485634B/en

Links

Landscapes

  • Image Analysis (AREA)

Description

差異影像自動識別系統及方法Differential image automatic recognition system and method

本發明涉及一種影像處理系統及方法,尤其係關於一種自動識別差異影像之系統及方法。The present invention relates to an image processing system and method, and more particularly to a system and method for automatically identifying a difference image.

於一般外界光源照射條件下拍攝被測物件(例如主板)之影像時,由於光源可能由一盞日光燈變為兩盞燈造成光線亮度變化干擾而導致拍攝影像與實際影像產生差異。因此,工業上需要利用光學自動檢測(Automatic Optic Inspection,AOI)設備對被測物件之拍攝影像進行光學自動檢測,來保證於自然光下拍攝中亮度之變化與週圍光影之干擾,達到定光源拍攝物件影像之效果。When shooting an image of an object under test (such as a main board) under normal external light source illumination, the difference between the captured image and the actual image may be caused by the change in the brightness of the light caused by the change of the light source from one fluorescent lamp to two lamps. Therefore, the industry needs to use optical automatic detection (AOI) equipment to automatically detect the captured image of the object under test to ensure the change of brightness and the surrounding light and shadow in the natural light shooting, to achieve the fixed light source shooting object. The effect of the image.

於光學自動檢測中,取得被測物影像並且與樣本影像進行比對係常用手法。現於光學自動檢測之實際應用中,通常需要產線AOI測試工程師輸入很多閥值算子(Threshold)來完成被測物影像不良位置之自動識別。然而,當檢測一張主板影像與樣本影像是否相同時,需要手工輸入一張主板影像所有閥值,大約有3000至4000個。因此,手工輸入目標影像及樣本影像之差異閥值算子來完成影像比對,其準確度不高,且需要耗費較高之人力成本。In optical automatic detection, it is common to obtain an image of the object to be measured and compare it with the sample image. In practical applications of optical automatic detection, it is usually required that the production line AOI test engineer inputs a number of threshold operators (Threshold) to automatically identify the bad position of the image to be tested. However, when detecting whether a motherboard image is the same as the sample image, you need to manually input all the thresholds of the motherboard image, which is about 3,000 to 4,000. Therefore, manually inputting the difference threshold operator of the target image and the sample image to complete the image comparison, the accuracy is not high, and the labor cost is high.

鑒於以上內容,有必要提供一種差異影像自動識別系統及方法,能夠自動產生比對兩張影像時所需之閥值算子,並藉由比對被測物影像與實際影像來識別該兩張影像之差異影像。In view of the above, it is necessary to provide a differential image automatic recognition system and method, which can automatically generate a threshold operator required for comparing two images, and identify the two images by comparing the image of the object to be measured with the actual image. The difference image.

所述之差異影像自動識別系統,安裝並運行於電腦中,該電腦連接影像攝取設備。該系統包括:影像獲取模組,用於藉由影像攝取設備攝取待測物件之拍攝影像,並從電腦之記憶體中獲取待測物件之標準影像;影像計算模組,用於根據拍攝影像之解析度與圖元RGB計算拍攝影像與標準影像於R通道上IAED平均差值之絕對值,G通道上IAED平均差值之絕對值及B通道上IAED平均差值之絕對值,將拍攝影像分割成N個圖元塊及將標準影像分割成N個圖元塊,及計算拍攝影像中每一圖元塊對應於標準影像中之圖元塊於RGB三通道上IAED之差異值,其中IAED表示影像平均能量密度;閥值產生模組,用於產生一個於比對拍攝影像與標準影像時所需之閥值算子;影像比對模組,用於根據拍攝影像中每一圖元塊與標準影像中對應之圖元塊於RGB三通道上IAED差異值之絕對值、拍攝影像與標準影像於RGB三通道上IAED之平均差值之絕對值及產生之閥值算子來判斷拍攝影像之每一圖元塊與標準影像中對應之圖元塊是否相同;影像產生模組,用於當拍攝影像之圖元塊與標準影像中對應之圖元塊相同時,從拍攝影像中清除該圖元塊,及根據拍攝影像中剩餘之圖元塊產生一幅差異影像,並將該差異影像輸出至電腦之顯示器上顯示。The differential image automatic identification system is installed and operated in a computer, and the computer is connected to the image capturing device. The system includes: an image acquisition module, configured to capture a captured image of the object to be tested by the image capturing device, and obtain a standard image of the object to be tested from a memory of the computer; and an image computing module for capturing the image according to the image Resolution and primitive RGB Calculate the absolute value of the IAED average difference between the captured image and the standard image on the R channel, the absolute value of the IAED average difference on the G channel and the absolute value of the IAED average difference on the B channel, and segment the captured image. N N primitive blocks and dividing the standard image into N primitive blocks, and calculating the difference value of each primitive block in the captured image corresponding to the IAED of the primitive block in the standard image on the RGB three channels, wherein IAED represents Image average energy density; threshold generation module for generating a threshold operator required for comparing captured images with standard images; image comparison module for each primitive block in the captured image The absolute value of the IAED difference value of the corresponding primitive block in the standard image on the RGB three-channel, the absolute value of the average difference between the captured image and the standard image on the RGB three-channel IAED, and the threshold value generated to determine the captured image Whether each primitive block is the same as the corresponding primitive block in the standard image; the image generation module is configured to clear the image from the captured image when the primitive block of the captured image is the same as the corresponding primitive block in the standard image The metablock generates a difference image according to the remaining primitive blocks in the captured image, and outputs the difference image to a display on the computer.

所述之差異影像自動識別方法,藉由電腦對待測物件之拍攝影像中之差異圖元塊進行識別,該電腦連接影像攝取設備。該方法包括步驟:藉由影像攝取設備攝取待測物件之拍攝影像,並從電腦之記憶體中獲取待測物件之標準影像;根據拍攝影像之解析度與圖元RGB計算拍攝影像與標準影像於R通道上IAED平均差值之絕對值,G通道上IAED平均差值之絕對值及B通道上IAED平均差值之絕對值,其中IAED表示影像平均能量密度;將拍攝影像分割成N個圖元塊及將標準影像分割成N個圖元塊;計算拍攝影像中每一圖元塊對應於標準影像中之圖元塊於RGB三通道上IAED之差異值;產生一個比對拍攝影像與標準影像時所需之閥值算子;根據拍攝影像中每一圖元塊與標準影像中對應之圖元塊於RGB三通道上IAED差異值之絕對值、拍攝影像與標準影像於RGB三通道上IAED之平均差值之絕對值及產生之閥值算子來判斷拍攝影像之每一圖元塊與標準影像中對應之圖元塊是否相同;若拍攝影像之圖元塊與標準影像中對應之圖元塊相同,則從拍攝影像中清除該圖元塊;若拍攝影像之圖元塊與標準影像中對應之圖元塊不同,則於拍攝影像中保留該圖元塊;根據拍攝影像中剩餘之圖元塊產生一幅差異影像,並將該差異影像輸出至電腦之顯示器上顯示。The differential image automatic identification method identifies the difference primitive block in the captured image of the object to be detected by the computer, and the computer is connected to the image capturing device. The method includes the steps of: taking a captured image of the object to be tested by the image capturing device, and obtaining a standard image of the object to be tested from the memory of the computer; calculating the captured image and the standard image according to the resolution of the captured image and the primitive RGB The absolute value of the IAED average difference on the R channel, the absolute value of the IAED average difference on the G channel and the absolute value of the IAED average difference on the B channel, where IAED represents the average energy density of the image; the captured image is segmented into N primitives Blocking and dividing the standard image into N primitive blocks; calculating the difference value of each primitive block in the captured image corresponding to the IAED of the primitive block in the standard image on the RGB three channels; generating a comparison image and standard image Threshold operator required for the time; according to the image element in each image block and the corresponding image block in the standard image, the absolute value of the IAED difference value on the RGB three channels, the captured image and the standard image on the RGB three-channel IAED The absolute value of the average difference value and the generated threshold operator determine whether each primitive block of the captured image is identical to the corresponding primitive block in the standard image; if the image element block and the standard image are captured If the corresponding primitive block is the same, the primitive block is cleared from the captured image; if the primitive block of the captured image is different from the corresponding primitive block in the standard image, the primitive block is retained in the captured image; The remaining primitive block in the image produces a difference image and outputs the difference image to a display on a computer.

相較於習知技術,本發明所述之差異影像自動識別系統及方法,能夠自動產生比對兩張影像時所需之閥值算子,藉由比對被測物影像與實際影像來識別該兩張影像之差異影像,可以省略手工建立閥值算子之過程,從而提高準確度及節省人力成本。Compared with the prior art, the differential image automatic identification system and method of the present invention can automatically generate a threshold operator required for comparing two images, and identify the image by comparing the image of the object to be measured with the actual image. The difference image between the two images can omit the process of manually creating the threshold operator, thereby improving accuracy and saving labor costs.

如圖1所示,係本發明差異影像自動識別系統11較佳實施例之架構圖。於本實施例中,所述之差異影像自動識別系統11安裝並運行於電腦1中,能夠自動產生比對兩張影像時所需之閥值算子(Threshold),識別被測物影像與實際影像之差異圖元塊,並根據該差異圖元塊產生兩張影像之差異影像。所述之電腦1連接有影像攝取設備2,該影像攝取設備2用於攝取待測物件3之拍攝影像,如圖4所示之拍攝影像a。於一般外界光源照射之條件下拍攝待測物件3(例如主板)之影像時,由於光源可能由一盞日光燈變為兩盞燈造成光線亮度變化而導致拍攝影像與實際影像產生差異。As shown in FIG. 1, it is an architectural diagram of a preferred embodiment of the differential image automatic recognition system 11 of the present invention. In the embodiment, the differential image automatic identification system 11 is installed and operated in the computer 1, and can automatically generate a threshold operator (Threshold) required to compare two images, and identify the image and actual object to be tested. The image difference primitive block, and the difference image of the two images is generated according to the difference primitive block. The computer 1 is connected to an image capturing device 2 for taking a captured image of the object to be tested 3, as shown in FIG. When the image of the object to be tested 3 (for example, the main board) is photographed under the condition that the external light source is irradiated, the light source may change from one fluorescent lamp to two lamps, and the brightness of the light is changed to cause a difference between the captured image and the actual image.

所述之電腦1包括記憶體12、中央處理器13及顯示器14。記憶體12儲存有與拍攝影像作比對之標準影像,如圖4所示之標準影像b。中央處理器13用於執行差異影像自動識別系統11,藉由比對拍攝影像與標準影像之差異圖元塊來自動識別拍攝影像之差異影像,並將該差異影像顯示於顯示器14上。The computer 1 includes a memory 12, a central processing unit 13, and a display 14. The memory 12 stores a standard image that is compared with the captured image, such as the standard image b shown in FIG. The central processing unit 13 is configured to execute the difference image automatic recognition system 11 to automatically recognize the difference image of the captured image by comparing the difference primitive block between the captured image and the standard image, and display the difference image on the display 14.

所述之差異影像自動識別系統11包括影像獲取模組111、影像計算模組112、影像比對模組113,閥值產生模組114及影像產生模組115。本發明所稱之模組係由一系列計算指令組成之電腦程式段。於本實施例中,所述之模組係一種能夠被中央處理器13所執行並且能夠完成固定功能之電腦程式段,其儲存於所述之記憶體12中。The difference image automatic recognition system 11 includes an image acquisition module 111, an image calculation module 112, an image comparison module 113, a threshold generation module 114, and an image generation module 115. The module referred to in the present invention is a computer program segment composed of a series of calculation instructions. In the embodiment, the module is a computer program segment that can be executed by the central processing unit 13 and can perform a fixed function, and is stored in the memory 12.

所述之影像獲取模組111用於藉由影像攝取設備2攝取待測物件3之拍攝影像a,並從記憶體12中獲取待測物件3之標準影像b。該拍攝影像a係一種於外界光源變化造成光影干擾時所拍攝待測物件3之待測影像,該標準影像b係一種於無外界光影干擾時所拍攝待測物件3之樣本影像。The image capturing module 111 is configured to capture the captured image a of the object to be tested 3 by the image capturing device 2 and obtain the standard image b of the object to be tested 3 from the memory 12 . The captured image a is an image to be tested of the object to be tested 3 when the light source is disturbed by the change of the external light source. The standard image b is a sample image of the object 3 to be tested when there is no external light interference.

所述之影像計算模組112用於分別計算拍攝影像a與標準影像b之RGB三通道上之影像平均能量密度(Image Average Energy Density,IAED)值。所述之RGB三通道包括影像之R灰度通道、G灰度通道及B灰度通道。所述之影像平均能量密度IAED係指解析度為N×N影像中每一個圖元之平均能量密度,用於衡量影像之圖元能量之基準,其按照公式IAED=(R+G+B)/N/N來計算該影像之圖元平均能量密度,於這個公式中之R代表所述影像中所有圖元之R值之總和,G代表所述影像中所有圖元之G值之總和,及B代表所述影像中所有圖元之B值之總和。The image calculation module 112 is configured to calculate an Image Average Energy Density (IAED) value on the RGB three channels of the captured image a and the standard image b, respectively. The RGB three channels include an R grayscale channel, a G grayscale channel, and a B grayscale channel of an image. The image average energy density IAED refers to the average energy density of each primitive in the N×N image, and is used to measure the reference energy of the image element according to the formula IAED=(R+G+B). /N/N to calculate the average energy density of the primitive of the image. In this formula, R represents the sum of the R values of all the primitives in the image, and G represents the sum of the G values of all the primitives in the image. And B represents the sum of the B values of all the primitives in the image.

於本實施例中,假設拍攝影像a之圖元為32×32,其中需要處理之圖元塊(例如A1)之RGB三個通道之亮度值總和R=147248、G=147760、B=144176,則該圖元塊A1之平均IAED值=(R+G+B)/32/32=428.89。影像計算模組112計算拍攝影像a之R通道IAED_a_R=R/32/32= 147248/32/32=143.80、G通道IAED_a_G=G/32/32=144760/32/32=141.37,B通道IAED_a_B=B/32/32=144176/32/32=140.80。假設標準影像b之圖元為32×32,其中RGB三個通道之亮度值總和R=152179、G=135539、B=31091,影像計算模組112計算標準影像b之R通道IAED_b_R =R/32/32=152179/32/32=148.61、G通道IAED_b_G=G/32/32=135539/32/32 =132.36,B通道IAED_b_B值=31091/32/32=30.36。In this embodiment, it is assumed that the picture element of the captured image a is 32×32, and the sum of the luminance values of the RGB three channels of the primitive block (for example, A1) to be processed is R=147248, G=147760, B=144176, Then, the average IAED value of the primitive block A1 = (R + G + B) / 32 / 32 = 428.89. The image calculation module 112 calculates the R channel IAED_a_R=R/32/32=147248/32/32=143.80 of the captured image a, G channel IAED_a_G=G/32/32=144760/32/32=141.37, B channel IAED_a_B= B/32/32=144176/32/32=140.80. Assume that the primitive of the standard image b is 32×32, wherein the sum of the luminance values of the three channels of RGB is R=152179, G=135539, B=31091, and the image calculation module 112 calculates the R channel IAED_b_R=R/32 of the standard image b. /32=152179/32/32=148.61, G channel IAED_b_G=G/32/32=135539/32/32 = 132.36, B channel IAED_b_B value = 31091/32/32 = 30.36.

所述之影像計算模組112還用於計算拍攝影像a與標準影像b之R通道上IAED之平均差值D_R之絕對值,G通道上IAED之平均差值D_G之絕對值,及B通道上IAED之平均差值D_B之絕對值。於本實施例中,拍攝影像a與標準影像b之R通道上IAED之平均差值D_R等於IAED_a_R值減去IAED_b_R值之絕對值,G通道上IAED之平均差值D_G等於IAED_a_G值減去IAED_b_G值之絕對值,及B通道上IAED之平均差值D_B等於IAED_a_B值減去IAED_b_B值之絕對值。例如,平均差值D_R=IAED_a_R-IAED_b_R=143.80-148.61=-4.81,取四捨五入之絕對值為5;平均差值D_G=IAED_a_G-IAED_b_G=141.37-132.36=9.01,取四捨五入之絕對值為9;平均差值D_B=IAED_a_B-IAED_b_B=140.80–30.36=110.44,取四捨五入之絕對值為110。The image calculation module 112 is further configured to calculate an absolute value of the average difference D_R of the IAED on the R channel of the captured image a and the standard image b, an absolute value of the average difference D_G of the IAED on the G channel, and the B channel. The absolute value of the average difference D_B of IAED. In this embodiment, the average difference D_R of the IAED on the R channel of the captured image a and the standard image b is equal to the IAED_a_R value minus the absolute value of the IAED_b_R value, and the average difference D_G of the IAED on the G channel is equal to the IAED_a_G value minus the IAED_b_G value. The absolute value, and the average difference D_B of the IAED on the B channel is equal to the IAED_a_B value minus the absolute value of the IAED_b_B value. For example, the average difference D_R=IAED_a_R-IAED_b_R=143.80-148.61=-4.81, the absolute value of rounding is 5; the average difference D_G=IAED_a_G-IAED_b_G=141.37-132.36=9.01, and the absolute value of rounding is 9; The difference D_B=IAED_a_B-IAED_b_B=140.80–30.36=110.44, and the absolute value of rounding is 110.

所述之影像計算模組112用於將拍攝影像a分割成N個圖元塊,如圖4所示之圖元塊A1, A2, ... An,及將標準影像b分割成N個圖元塊,如圖4所示之圖元塊B1, B2, ... Bn。影像計算模組112還用於分別計算拍攝影像a中之每一圖元塊An對應於標準影像b中之每一圖元塊Bn於RGB三通道上IAED之差異值。於本實施例中,影像計算模組112為每一圖元塊建立圖元塊索引n_Index,並令n_Index=1,開始計算圖元塊An與圖元塊Bn於R通道上IAED之差異值D_Rn之絕對值,於G通道上IAED之差異值D_Gn之絕對值,及於B通道上IAED之差異值D_Bn之絕對值。於本實施例中,每一圖元塊An對應之每一圖元塊Bn於RGB三通道上IAED之差異值D_Rn、D_Gn及D_Bn之計算方法與上述計算拍攝影像a與標準影像b於RGB三通道上IAED之IAED之平均差值D_R、D_G及D_B之方法相同,而此處所取之R、G、B之值只限於每個圖元塊上之所有點RGB之總和。The image calculation module 112 is configured to divide the captured image a into N primitive blocks, such as the primitive blocks A1, A2, ... An shown in FIG. 4, and divide the standard image b into N maps. The metablock, such as the primitive blocks B1, B2, ... Bn shown in FIG. The image calculation module 112 is further configured to calculate, respectively, a difference value of each primitive block An in the captured image a corresponding to the IAED of each primitive block Bn in the standard image b on the RGB three channels. In this embodiment, the image computing module 112 establishes a primitive block index n_Index for each primitive block, and makes n_Index=1, and starts to calculate a difference value D_Rn between the primitive block An and the primitive block Bn on the R channel IAED. The absolute value, the absolute value of the difference value D_Gn of the IAED on the G channel, and the absolute value of the difference value D_Bn of the IAED on the B channel. In this embodiment, the calculation method of the difference values D_Rn, D_Gn, and D_Bn of each IAED of each primitive block Bn corresponding to each primitive block Bn on the RGB three-channel is compared with the above-mentioned calculation of the captured image a and the standard image b in RGB three. The average difference between the IAED of the IAED on the channel is D_R, D_G, and D_B, and the values of R, G, and B taken here are limited to the sum of all the points RGB on each primitive block.

所述之影像比對模組113用於根據每一圖元塊An與對應之圖元塊Bn於RGB三通道上IAED之差異值、影像比對之閥值算子及拍攝影像a與標準影像b於RGB三通道上IAED之平均差值來判斷圖元塊An與圖元塊Bn中之影像資料是否相同。於本實施例中,影像比對模組113判斷差異值D_Rn之絕對值是否大於閥值算子與平均差值D_R之絕對值之乘積,差異值D_Gn之絕對值是否大於閥值算子與平均差值D_G之絕對值之乘積,及差異值D_Bn之絕對值是否大於閥值算子與平均差值D_B之絕對值之乘積。亦即,影像比對模組113判斷不等式D_Rn>T×D_R、不等式D_Gn>T×D_G與不等式D_Gn>T×D_G中兩個或以上不等式是否成立,其中T為閥值算子。The image comparison module 113 is configured to use the difference value of the IAED on each of the RGB three channels according to each primitive block An and the corresponding primitive block Bn, the threshold value of the image comparison, and the captured image a and the standard image. b Determine whether the image data in the primitive block An and the primitive block Bn are the same by the average difference of the IAED on the RGB three channels. In this embodiment, the image comparison module 113 determines whether the absolute value of the difference value D_Rn is greater than the product of the absolute value of the threshold operator and the average difference value D_R, and whether the absolute value of the difference value D_Gn is greater than the threshold operator and the average value. The product of the absolute value of the difference D_G, and the absolute value of the difference value D_Bn is greater than the product of the absolute value of the threshold operator and the average difference value D_B. That is, the image matching module 113 determines whether two or more inequalities in the inequality D_Rn>T×D_R, the inequality D_Gn>T×D_G, and the inequality D_Gn>T×D_G are satisfied, where T is a threshold operator.

所述之閥值產生模組114用於自動產生一個比對拍攝影像a與標準影像b時所需之閥值算子T,該閥值算子T之產生方法將於圖3中描述。The threshold generating module 114 is configured to automatically generate a threshold operator T required for comparing the captured image a with the standard image b. The method for generating the threshold operator T will be described in FIG.

所述之影像產生模組115用於當圖元塊An與圖元塊Bn中之影像資料相同時,從拍攝影像a中清除該圖元塊An。當圖元塊An與圖元塊Bn中之影像資料不同時,於拍攝影像a中保留該圖元塊An。當拍攝影像a中所有圖元塊An與圖元塊Bn比對完畢後,影像產生模組115根據所有保留之圖元塊An產生一幅差異影像,並將該差異影像輸出至顯示器14上進行顯示,或將該差異影像儲存於記憶體12中。The image generation module 115 is configured to clear the primitive block An from the captured image a when the image data in the primitive block An and the primitive block Bn are the same. When the image block An and the image data in the primitive block Bn are different, the primitive block An is retained in the captured image a. After all the primitive blocks An in the captured image a are compared with the primitive block Bn, the image generation module 115 generates a difference image according to all the retained primitive blocks An, and outputs the difference image to the display 14. Displaying, or storing the difference image in the memory 12.

如圖2所示,係本發明差異影像自動識別方法較佳實施例之流程圖。於本實施例中,該方法能夠自動產生兩張影像比對時所需之閥值算子,藉由比對被測影像與實際影像來識別差異圖元塊,並根據差異圖元塊產生兩張影像之差異影像。As shown in FIG. 2, it is a flowchart of a preferred embodiment of the differential image automatic identification method of the present invention. In this embodiment, the method can automatically generate a threshold operator required for two image comparisons, identify the difference primitive block by comparing the measured image with the actual image, and generate two pieces according to the difference primitive block. The difference image of the image.

步驟S20,影像獲取模組111藉由影像攝取設備2攝取待測物件3之拍攝影像a,並從記憶體12中獲取待測物件3之標準影像b。該拍攝影像a係一種於外界光源變化造成光影干擾時所拍攝待測物件3之待測影像,該標準影像b係一種於無外界光影干擾時所拍攝待測物件3之樣本影像。In step S20, the image capturing module 111 captures the captured image a of the object to be tested 3 by the image capturing device 2, and acquires the standard image b of the object to be tested 3 from the memory 12. The captured image a is an image to be tested of the object to be tested 3 when the light source is disturbed by the change of the external light source. The standard image b is a sample image of the object 3 to be tested when there is no external light interference.

步驟S21,影像計算模組112計算拍攝影像a與標準影像b之RGB三通道上之IAED值,並分別計算拍攝影像a與標準影像b於R通道上IAED值之平均差值D_R之絕對值,於G通道上IAED值之平均差值D_G之絕對值,及於B通道上IAED值之平均差值D_B之絕對值。所述之IAED係指解析度為N×N影像中每一個圖元之平均能量密度,用於衡量影像之圖元能量之基準,其按照公式IAED=(R+G+B)/N/N來計算該影像之圖元平均能量密度。In step S21, the image calculation module 112 calculates the IAED values on the RGB three channels of the captured image a and the standard image b, and calculates the absolute value of the average difference D_R of the IAED values of the captured image a and the standard image b on the R channel, respectively. The absolute value of the average difference D_G of the IAED value on the G channel, and the absolute value of the average difference D_B of the IAED value on the B channel. The IAED refers to the average energy density of each primitive in the resolution of the N×N image, and is used to measure the reference energy of the image element of the image according to the formula IAED=(R+G+B)/N/N. To calculate the average energy density of the image of the image.

步驟S22,影像計算模組112將拍攝影像a分割成N個圖元塊,如圖4所示之圖元塊A1, A2, ... An,及將標準影像b分割成N個圖元塊,如圖4所示之圖元塊B1, B2, ... Bn。In step S22, the image computing module 112 divides the captured image a into N primitive blocks, such as the primitive blocks A1, A2, ... An shown in FIG. 4, and divides the standard image b into N primitive blocks. , as shown in Figure 4, the primitive blocks B1, B2, ... Bn.

步驟S23,影像計算模組112為每一圖元塊An與每一圖元塊Bn建立圖元塊索引n_Index,並令n_Index=1。In step S23, the image computing module 112 creates a primitive block index n_Index for each primitive block An and each primitive block Bn, and makes n_Index=1.

步驟S24,影像計算模組112分別計算圖元塊An與圖元塊Bn於R通道上IAED之差異值D_Rn之絕對值,於G通道上IAED之差異值D_Gn之絕對值,及於B通道上IAED之差異值D_Bn之絕對值。In step S24, the image computing module 112 calculates the absolute value of the difference value D_Rn between the primitive block An and the primitive block Bn on the R channel, and the absolute value of the difference value D_Gn of the IAED on the G channel, and on the B channel. The absolute value of the difference value D_Bn of IAED.

步驟S25,影像比對模組113根據圖元塊An與圖元塊Bn於RGB三通道上IAED之差異值、影像比對之閥值算子及拍攝影像a與標準影像b於RGB三通道上IAED之平均差值來判斷圖元塊An與圖元塊Bn中之影像資料是否相同。於本實施例中,影像比對模組113判斷不等式D_Rn>T×D_R、不等式D_Gn>T×D_G與不等式D_Gn>T×D_G中兩個或以上是否成立,其中T為閥值算子,該閥值算子T之產生方法將於圖3描述。In step S25, the image comparison module 113 is based on the difference value between the primitive block An and the primitive block Bn on the RGB three channels, the threshold value of the image comparison, and the captured image a and the standard image b on the RGB three channels. The average difference of the IAED is used to determine whether the image data in the primitive block An and the primitive block Bn are the same. In this embodiment, the image matching module 113 determines whether two or more of the inequality D_Rn>T×D_R, the inequality D_Gn>T×D_G, and the inequality D_Gn>T×D_G are satisfied, where T is a threshold operator, The method of generating the threshold operator T will be described in FIG.

若圖元塊An與圖元塊Bn中之影像資料不同,步驟S26,影像產生模組115則於拍攝影像a中保留該圖元塊An。若圖元塊An與圖元塊Bn中之影像資料相同,步驟S27,影像產生模組115則從拍攝影像a中清除該圖元塊An。If the image data in the primitive block An and the primitive block Bn are different, the image generation module 115 retains the primitive block An in the captured image a in step S26. If the image data in the primitive block An and the primitive block Bn are the same, in step S27, the image generation module 115 clears the primitive block An from the captured image a.

步驟S28,影像比對模組113判斷圖元索引n_Index值是否小於拍攝影像a之圖元塊數N,亦即判斷拍攝影像a中每一圖元塊An是否與圖元塊Bn已比對完畢。若還有圖元塊An與圖元塊Bn未作比對,則執行步驟S29;若所有圖元塊An與圖元塊Bn已比對完畢,則執行步驟S30。In step S28, the image comparison module 113 determines whether the value of the primitive index n_Index is smaller than the number N of the primitive blocks of the captured image a, that is, whether each primitive block An in the captured image a has been compared with the primitive block Bn. . If there is still no comparison between the primitive block An and the primitive block Bn, step S29 is performed; if all the primitive blocks An and the primitive block Bn have been compared, step S30 is performed.

步驟S29,影像比對模組113將圖元索引n_Index值做n_Index= n_Index+1運算,而後執行步驟S24。步驟S30,影像產生模組115計算拍攝影像a中保留之圖元塊An之總數D_n,根據所有保留之圖元塊An產生一幅差異影像,並將該差異影像輸出至顯示器14上進行顯示,或將該差異影像儲存於記憶體12中。In step S29, the image matching module 113 performs the n_Index=n_Index+1 operation on the primitive index n_Index value, and then executes step S24. In step S30, the image generation module 115 calculates the total number D_n of the primitive blocks An retained in the captured image a, generates a difference image according to all the reserved primitive blocks An, and outputs the difference image to the display 14 for display. Or storing the difference image in the memory 12.

如圖3所示,係圖2中步驟S25所需閥值算子產生方法之流程圖。步驟S31,閥值產生模組114設置閥值參量Tn,設置Tn之最小閥值x及最大閥值y,並於Tn之最小閥值x及最大閥值y範圍內將Tn以預定步長劃分為具有S個閥值之閥值序列(Tn1,Tn2,…,Tni,…,Tns)。於本實施例中,最小閥值x設置為2.0,最大閥值y設置為30,預定步長設置為0.1。As shown in FIG. 3, it is a flowchart of the threshold value generating method required in step S25 in FIG. In step S31, the threshold value generating module 114 sets the threshold value Tn, sets the minimum threshold x and the maximum threshold y of Tn, and divides Tn by a predetermined step in the range of the minimum threshold x and the maximum threshold y of Tn. It is a sequence of thresholds with T thresholds (Tn1, Tn2, ..., Tni, ..., Tns). In the present embodiment, the minimum threshold x is set to 2.0, the maximum threshold y is set to 30, and the predetermined step is set to 0.1.

步驟S32,閥值產生模組114利用閥值序列中之每一閥值參量Tni計算拍攝影像a被劃分為M個圖元塊之差異圖元塊數目D_mi,並構造第一差異圖元值序列(Pm1, Pm2,…Pmi,…, Pms),其中Pmi=D_mi×M×M,i=1,2, …, S。In step S32, the threshold value generating module 114 calculates, by using each of the threshold values Tni of the threshold sequence, the number of difference primitive blocks D_mi of the captured image a divided into M primitive blocks, and constructs a sequence of first difference primitive values. (Pm1, Pm2, ... Pmi, ..., Pms), where Pmi = D_mi × M × M, i = 1, 2, ..., S.

步驟S33,閥值產生模組114利用閥值序列中之每一閥值參量Tni計算拍攝影像a被劃分為N個圖元塊之差異圖元塊數目D_ni,並構造第二差異圖元值序列(Pn1, Pn2, …Pni,…, Pns),其中Pni=D_ni×N×N,i=1,2, …, S。In step S33, the threshold value generating module 114 calculates, by using each of the threshold values Tni of the threshold sequence, the number of difference primitive blocks D_ni of the captured image a divided into N primitive blocks, and constructs a sequence of second difference primitive values. (Pn1, Pn2, ... Pni, ..., Pns), where Pni = D_ni × N × N, i = 1, 2, ..., S.

步驟S34,閥值產生模組114逐步比對第一差異圖元值序列(Pm1, Pm2, …Pmi,…, Pms)中之每一元素與第二差異圖元值序列(Pn1, Pn2, …Pni,…, Pns)中之每一元素來找出差異圖元最小值D_p=Pmi-Pni所對應之i值。Step S34, the threshold generation module 114 gradually compares each of the first difference primitive value sequence (Pm1, Pm2, ... Pmi, ..., Pms) with the second difference primitive value sequence (Pn1, Pn2, ... Each element of Pni,..., Pns) finds the value of i corresponding to the minimum value of the difference primitive D_p=Pmi-Pni.

步驟S35,閥值產生模組114將i值於閥值序列(Tn1,Tn2,…,Tni,…,Tns)中所對應之閥值Tni作為最佳閥值T。假如閥值產生模組114找出差異圖元最小值D_p對應之i值為10,則閥值序列(Tn1、Tn2、...Tns)中之Tn10=2.0+0.1×10=3.0,即閥值產生模組114產生之最佳閥值T為3.0。In step S35, the threshold value generation module 114 takes the threshold value Tni corresponding to the i value in the threshold sequence (Tn1, Tn2, ..., Tni, ..., Tns) as the optimal threshold T. If the threshold generation module 114 finds that the difference value of the difference primitive D_p corresponds to 10, the Tn10=2.0+0.1×10=3.0 in the threshold sequence (Tn1, Tn2, ...Tns), that is, the valve The value generation module 114 produces an optimal threshold T of 3.0.

以上所述僅為本發明之較佳實施例而已,且已達廣泛之使用功效,凡其他未脫離本發明所揭示之精神下所完成之均等變化或修飾,均應包含於下述之申請專利範圍內。The above is only the preferred embodiment of the present invention, and has been used in a wide range of applications. Any other equivalent changes or modifications that are not departing from the spirit of the present invention should be included in the following patent application. Within the scope.

1...電腦1. . . computer

11...差異影像自動識別系統11. . . Differential image automatic recognition system

111...影像獲取模組111. . . Image acquisition module

112...影像計算模組112. . . Image computing module

113...影像比對模組113. . . Image comparison module

114...閥值產生模組114. . . Threshold generation module

115...影像產生模組115. . . Image generation module

12...記憶體12. . . Memory

13...中央處理器13. . . CPU

14...顯示器14. . . monitor

2...影像攝取設備2. . . Image capture device

3...待測物件3. . . Object to be tested

圖1係本發明差異影像自動識別系統較佳實施例之架構圖。1 is a block diagram of a preferred embodiment of the differential image automatic recognition system of the present invention.

圖2係本發明差異影像自動識別方法較佳實施例之流程圖。2 is a flow chart of a preferred embodiment of the differential image automatic recognition method of the present invention.

圖3係圖2中步驟S25所需閥值算子產生方法之流程圖。FIG. 3 is a flow chart of a method for generating a threshold operator required in step S25 of FIG. 2.

圖4係拍攝影像與標準影像被劃分為N個圖元塊之示意圖。FIG. 4 is a schematic diagram of a captured image and a standard image divided into N primitive blocks.

1...電腦1. . . computer

11...差異影像自動識別系統11. . . Differential image automatic recognition system

111...影像獲取模組111. . . Image acquisition module

112...影像計算模組112. . . Image computing module

113...影像比對模組113. . . Image comparison module

114...閥值產生模組114. . . Threshold generation module

115...影像產生模組115. . . Image generation module

12...記憶體12. . . Memory

13...中央處理器13. . . CPU

14...顯示器14. . . monitor

2...影像攝取設備2. . . Image capture device

3...待測物件3. . . Object to be tested

Claims (10)

一種差異影像自動識別系統,安裝並運行於電腦中,該電腦連接有影像攝取設備,該系統包括:
影像獲取模組,用於藉由影像攝取設備攝取待測物件之拍攝影像,並從電腦之記憶體中獲取待測物件之標準影像;
影像計算模組,用於根據拍攝影像之解析度與圖元RGB計算拍攝影像與標準影像於R通道上IAED平均差值之絕對值,G通道上IAED平均差值之絕對值及B通道上IAED平均差值之絕對值,將拍攝影像分割成N個圖元塊及將標準影像分割成N個圖元塊,及計算拍攝影像中每一圖元塊對應於標準影像中之圖元塊於RGB三通道上IAED之差異值,其中IAED表示影像平均能量密度;
閥值產生模組,用於產生一個於比對拍攝影像與標準影像時所需之閥值算子;
影像比對模組,用於根據拍攝影像中每一圖元塊與標準影像中對應之圖元塊於RGB三通道上IAED差異值之絕對值、拍攝影像與標準影像於RGB三通道上IAED平均差值之絕對值及產生之閥值算子來判斷拍攝影像之每一圖元塊與標準影像中對應之圖元塊是否相同;
影像產生模組,用於當拍攝影像之圖元塊與標準影像中對應之圖元塊相同時從拍攝影像中清除該圖元塊,及根據拍攝影像中剩餘之圖元塊產生一幅差異影像,並將該差異影像輸出至電腦之顯示器上顯示。
A differential image automatic identification system installed and operated in a computer connected to an image capturing device, the system comprising:
The image acquisition module is configured to capture a captured image of the object to be tested by the image capturing device, and obtain a standard image of the object to be tested from the memory of the computer;
The image calculation module is configured to calculate the absolute value of the average difference of the IAED between the captured image and the standard image on the R channel according to the resolution of the captured image and the primitive RGB, the absolute value of the average difference of the IAED on the G channel, and the IAED on the B channel. The absolute value of the average difference is divided into N primitive blocks and the standard image is divided into N primitive blocks, and each primitive block in the captured image is calculated corresponding to the primitive block in the standard image in RGB. The difference value of IAED on the three channels, where IAED represents the average energy density of the image;
Threshold generation module for generating a threshold operator required for comparing images and standard images;
The image comparison module is configured to determine the absolute value of the IAED difference value on the RGB three channels according to the primitive block in the captured image and the corresponding image block in the standard image, and the IAED average of the captured image and the standard image on the RGB three channels. The absolute value of the difference and the generated threshold operator determine whether each primitive block of the captured image is identical to the corresponding primitive block in the standard image;
The image generation module is configured to: when the primitive block of the captured image is the same as the corresponding primitive block in the standard image, clear the primitive block from the captured image, and generate a difference image according to the remaining primitive block in the captured image. And output the difference image to the display on the computer.
如申請專利範圍第1項所述之差異影像自動識別系統,其中,所述之IAED係指解析度為N×N影像中每一個圖元之平均能量密度,其按照公式IAED=(R+G+B)/N/N來計算該影像之圖元平均能量密度。The differential image automatic identification system according to claim 1, wherein the IAED refers to an average energy density of each primitive in the N×N image, which is according to the formula IAED=(R+G). +B)/N/N to calculate the average energy density of the image of the image. 如申請專利範圍第1項所述之差異影像自動識別系統,其中,所述之影像計算模組還用於為拍攝影像中每一圖元塊與標準影像中每一圖元塊建立圖元塊索引。The difference image automatic identification system of claim 1, wherein the image calculation module is further configured to create a primitive block for each primitive block in the captured image and each primitive block in the standard image. index. 如申請專利範圍第1項所述之差異影像自動識別系統,其中,所述之影像比對模組判斷拍攝影像之每一圖元塊與標準影像中對應之圖元塊是否相同包括步驟:
判斷拍攝影像中每一圖元塊與標準影像中對應之圖元塊於R通道上IAED差異值之絕對值是否大於閥值算子與拍攝影像與標準影像於R通道上IAED平均差值之絕對值之乘積;
判斷拍攝影像中每一圖元塊與標準影像中對應之圖元塊於G通道上IAED差異值之絕對值是否大於閥值算子與拍攝影像與標準影像於G通道上IAED平均差值之絕對值之乘積;
判斷拍攝影像中每一圖元塊與標準影像中對應之圖元塊於G通道上IAED差異值之絕對值是否大於閥值算子與拍攝影像與標準影像於G通道上IAED平均差值之絕對值之乘積;
若滿足上述三個判斷條件之兩個或兩個以上,則所述拍攝影像之每一圖元塊與標準影像中對應之圖元塊相同。
The difference image automatic identification system of claim 1, wherein the image comparison module determines whether each primitive block of the captured image is identical to the corresponding primitive block in the standard image, and includes the steps of:
Determining whether the absolute value of the IAED difference value between the primitive block in the captured image and the corresponding primitive block in the standard image on the R channel is greater than the absolute difference between the threshold operator and the average difference of the IAED between the captured image and the standard image on the R channel Product of values;
Determining whether the absolute value of the IAED difference value of each primitive block in the captured image and the corresponding primitive block in the standard image on the G channel is greater than the absolute difference between the threshold operator and the average difference of the IAED between the captured image and the standard image on the G channel. Product of values;
Determining whether the absolute value of the IAED difference value of each primitive block in the captured image and the corresponding primitive block in the standard image on the G channel is greater than the absolute difference between the threshold operator and the average difference of the IAED between the captured image and the standard image on the G channel. Product of values;
If two or more of the above three determination conditions are satisfied, each primitive block of the captured image is the same as the corresponding primitive block in the standard image.
如申請專利範圍第1項所述之差異影像自動識別系統,其中,所述之閥值產生模組產生閥值算子之包括步驟:
構造一個具有S個閥值之閥值序列;
利用閥值序列中每一閥值計算拍攝影像被劃分為M個圖元塊之差第一異圖元塊數目,並根據第一差異圖元塊數目構造第一差異圖元值序列;
利用閥值序列中每一閥值計算拍攝影像被劃分為N個圖元塊之第二差異圖元塊數目,並根據第二差異圖元塊數目構造第二差異圖元值序列;
逐步比對第一差異圖元值序列中每一元素與第二差異圖元值序列中每一元素來找出差異圖元最小值所對應之差異圖元塊編號i值,其中i=1,2, …, S;
將i值於閥值序列中所對應之閥值作為最佳之閥值算子。
The differential image automatic identification system of claim 1, wherein the threshold generating module generates a threshold operator comprises the following steps:
Constructing a sequence of thresholds having S thresholds;
Calculating, by using each threshold value in the threshold sequence, a number of difference first meta-blocks of the captured image that is divided into M primitive blocks, and constructing a first difference primitive value sequence according to the first difference primitive block number;
Calculating, by using each threshold value in the threshold sequence, the number of second difference primitive blocks in which the captured image is divided into N primitive blocks, and constructing a second differential primitive value sequence according to the second difference primitive block number;
Gradually comparing each element in the first difference primitive value sequence with each element in the second difference primitive value sequence to find a difference primitive block number i value corresponding to the minimum value of the difference primitive, where i=1, 2, ..., S;
The threshold value corresponding to the value of i in the threshold sequence is taken as the optimal threshold operator.
一種差異影像自動識別方法,藉由電腦對待測物件之拍攝影像中之差異圖元塊進行識別,該電腦連接有影像攝取設備,該方法包括步驟:
藉由影像攝取設備攝取待測物件之拍攝影像,並從電腦之記憶體中獲取待測物件之標準影像;
根據拍攝影像之解析度與圖元RGB計算拍攝影像與標準影像於R通道上IAED平均差值之絕對值,G通道上IAED平均差值之絕對值及B通道上IAED平均差值之絕對值,其中IAED表示影像平均能量密度;
將拍攝影像分割成N個圖元塊及將標準影像分割成N個圖元塊;
計算拍攝影像中每一圖元塊對應於標準影像中之圖元塊於RGB三通道上IAED之差異值;
產生一個比對拍攝影像與標準影像時所需之閥值算子;
根據拍攝影像中每一圖元塊與標準影像中對應之圖元塊於RGB三通道上IAED差異值之絕對值、拍攝影像與標準影像於RGB三通道上IAED平均差值之絕對值及產生之閥值算子來判斷拍攝影像之每一圖元塊與標準影像中對應之圖元塊是否相同;
若拍攝影像之圖元塊與標準影像中對應之圖元塊相同,則從拍攝影像中清除該圖元塊;
若拍攝影像之圖元塊與標準影像中對應之圖元塊不同,則於拍攝影像中保留該圖元塊;
根據拍攝影像中剩餘之圖元塊產生一幅差異影像,並將該差異影像輸出至電腦之顯示器上顯示。
A method for automatically identifying a difference image, wherein a computer detects an image of a difference element in a captured image of the object to be detected, and the computer is connected with an image capturing device, the method comprising the steps of:
Taking a captured image of the object to be tested by the image capturing device, and obtaining a standard image of the object to be tested from the memory of the computer;
Calculate the absolute value of the average IAED difference between the captured image and the standard image on the R channel according to the resolution of the captured image and the primitive RGB, the absolute value of the average difference of the IAED on the G channel, and the absolute value of the average difference of the IAED on the B channel. Where IAED represents the average energy density of the image;
Dividing the captured image into N primitive blocks and dividing the standard image into N primitive blocks;
Calculating the difference value of each primitive block in the captured image corresponding to the IAED of the primitive block in the standard image on the RGB three channels;
Produce a threshold operator required to compare images and standard images;
According to the absolute value of the IAED difference value on the RGB three channels of each primitive block in the captured image and the corresponding primitive block in the standard image, the absolute value of the IAED average difference between the captured image and the standard image on the RGB three channels and the generated value The threshold operator determines whether each primitive block of the captured image is identical to the corresponding primitive block in the standard image;
If the primitive block of the captured image is the same as the corresponding primitive block in the standard image, the primitive block is cleared from the captured image;
If the primitive block of the captured image is different from the corresponding primitive block in the standard image, the primitive block is retained in the captured image;
A difference image is generated according to the remaining primitive blocks in the captured image, and the difference image is output to a display on a computer.
如申請專利範圍第6項所述之差異影像自動識別方法,其中,所述之IAED係指解析度為N×N影像中每一個圖元之平均能量密度,其按照公式IAED=(R+G+B)/N/N來計算該影像之圖元平均能量密度。The method for automatically identifying a difference image according to claim 6, wherein the IAED refers to an average energy density of each primitive in the N×N image, which is according to the formula IAED=(R+G). +B)/N/N to calculate the average energy density of the image of the image. 如申請專利範圍第6項所述之差異影像自動識別方法,還包括分別為拍攝影像中每一圖元塊與標準影像中每一圖元塊建立圖元塊索引之步驟。The method for automatically identifying a difference image according to claim 6 of the patent application scope, further comprising the steps of establishing a primitive block index for each primitive block in the captured image and each primitive block in the standard image. 如申請專利範圍第6項所述之差異影像自動識別方法,其中,所述之判斷拍攝影像之每一圖元塊與標準影像中對應之圖元塊是否相同之步驟包括:
判斷拍攝影像中每一圖元塊與標準影像中對應之圖元塊於R通道上IAED差異值之絕對值是否大於閥值算子與拍攝影像與標準影像於R通道上IAED平均差值之絕對值之乘積;
判斷拍攝影像中每一圖元塊與標準影像中對應之圖元塊於G通道上IAED差異值之絕對值是否大於閥值算子與拍攝影像與標準影像於G通道上IAED平均差值之絕對值之乘積;
判斷拍攝影像中每一圖元塊與標準影像中對應之圖元塊於G通道上IAED差異值之絕對值是否大於閥值算子與拍攝影像與標準影像於G通道上IAED平均差值之絕對值之乘積;
若滿足上述三個判斷條件之兩個或兩個以上,則所述拍攝影像之每一圖元塊與標準影像中對應之圖元塊相同。
The method for automatically distinguishing the difference image according to the sixth aspect of the invention, wherein the step of determining whether each primitive block of the captured image is identical to the corresponding primitive block in the standard image comprises:
Determining whether the absolute value of the IAED difference value between the primitive block in the captured image and the corresponding primitive block in the standard image on the R channel is greater than the absolute difference between the threshold operator and the average difference of the IAED between the captured image and the standard image on the R channel Product of values;
Determining whether the absolute value of the IAED difference value of each primitive block in the captured image and the corresponding primitive block in the standard image on the G channel is greater than the absolute difference between the threshold operator and the average difference of the IAED between the captured image and the standard image on the G channel. Product of values;
Determining whether the absolute value of the IAED difference value of each primitive block in the captured image and the corresponding primitive block in the standard image on the G channel is greater than the absolute difference between the threshold operator and the average difference of the IAED between the captured image and the standard image on the G channel. Product of values;
If two or more of the above three determination conditions are satisfied, each primitive block of the captured image is the same as the corresponding primitive block in the standard image.
如申請專利範圍第6項所述之差異影像自動識別方法,其中,所述之產生閥值算子之步驟包括:
構造一個具有S個閥值之閥值序列;
利用閥值序列中每一閥值計算拍攝影像被劃分為M個圖元塊之差第一異圖元塊數目,並根據第一差異圖元塊數目構造第一差異圖元值序列;
利用閥值序列中每一閥值計算拍攝影像被劃分為N個圖元塊之第二差異圖元塊數目,並根據第二差異圖元塊數目構造第二差異圖元值序列;
逐步比對第一差異圖元值序列中每一元素與第二差異圖元值序列中每一元素來找出差異圖元最小值所對應之差異圖元塊編號i值,其中i=1,2, …, S;
將i值於閥值序列中所對應之閥值作為最佳之閥值算子。
The method for automatically identifying a difference image according to claim 6, wherein the step of generating a threshold operator comprises:
Constructing a sequence of thresholds having S thresholds;
Calculating, by using each threshold value in the threshold sequence, a number of difference first meta-blocks of the captured image that is divided into M primitive blocks, and constructing a first difference primitive value sequence according to the first difference primitive block number;
Calculating, by using each threshold value in the threshold sequence, the number of second difference primitive blocks in which the captured image is divided into N primitive blocks, and constructing a second differential primitive value sequence according to the second difference primitive block number;
Gradually comparing each element in the first difference primitive value sequence with each element in the second difference primitive value sequence to find a difference primitive block number i value corresponding to the minimum value of the difference primitive, where i=1, 2, ..., S;
The threshold value corresponding to the value of i in the threshold sequence is taken as the optimal threshold operator.
TW099141378A 2010-11-30 2010-11-30 System and method for identifying difference of two images TWI485634B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
TW099141378A TWI485634B (en) 2010-11-30 2010-11-30 System and method for identifying difference of two images

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW099141378A TWI485634B (en) 2010-11-30 2010-11-30 System and method for identifying difference of two images

Publications (2)

Publication Number Publication Date
TW201222434A TW201222434A (en) 2012-06-01
TWI485634B true TWI485634B (en) 2015-05-21

Family

ID=46725240

Family Applications (1)

Application Number Title Priority Date Filing Date
TW099141378A TWI485634B (en) 2010-11-30 2010-11-30 System and method for identifying difference of two images

Country Status (1)

Country Link
TW (1) TWI485634B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6307963B1 (en) * 1997-06-02 2001-10-23 Matsushita Electric Industrial Co., Ltd. Image detection method, image detection apparatus, image processing method, image processing apparatus, and medium
US20050091072A1 (en) * 2003-10-23 2005-04-28 Microsoft Corporation Information picker
US20070040929A1 (en) * 2002-04-23 2007-02-22 Olympus Corporation Image combination device
TW201008289A (en) * 2008-06-25 2010-02-16 Qualcomm Inc Fragmented reference in temporal compression for video coding

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6307963B1 (en) * 1997-06-02 2001-10-23 Matsushita Electric Industrial Co., Ltd. Image detection method, image detection apparatus, image processing method, image processing apparatus, and medium
US20070040929A1 (en) * 2002-04-23 2007-02-22 Olympus Corporation Image combination device
US20050091072A1 (en) * 2003-10-23 2005-04-28 Microsoft Corporation Information picker
TW201008289A (en) * 2008-06-25 2010-02-16 Qualcomm Inc Fragmented reference in temporal compression for video coding

Also Published As

Publication number Publication date
TW201222434A (en) 2012-06-01

Similar Documents

Publication Publication Date Title
CN102479321B (en) Difference image automatic recognition system and method
TWI787296B (en) Optical inspection method, optical inspection device and optical inspection system
CN104737202B (en) fire detection method and device
US9571817B2 (en) Inspection apparatus, inspection method, and program
JP6765791B2 (en) A method for creating a reference image set for pattern matching, a device for creating a reference image set for pattern matching, a work recognition method, a program, and a recording medium.
TWI614483B (en) Method and system for detecting luminance of a light source
JP2010071782A (en) Three-dimensional measurement apparatus and method thereof
KR20200014438A (en) Apparatus and method for optimizing examination outside of the subject
CN108520514A (en) Printed circuit board electronics member device consistency detecting method based on computer vision
WO2007004517A1 (en) Surface inspecting apparatus
CN108645354A (en) The structured light three-dimensional imaging method and system of high reflective subject surface
WO2017071406A1 (en) Method and system for detecting pin of gold needle element
JP2015232482A (en) Inspection equipment, inspection method and program
JP2011058926A (en) Method and device for inspecting image
CN109712115B (en) Automatic PCB detection method and system
KR101757240B1 (en) Method for generating reference pattern of 3D shape measuring device
KR20140121068A (en) Method and apparatus of inspecting mura of flat display
TWI485634B (en) System and method for identifying difference of two images
JP2017096625A (en) Pattern measurement device and computer program
US10062155B2 (en) Apparatus and method for detecting defect of image having periodic pattern
CN103630547B (en) There is flaw detection method and the pick-up unit thereof of the optical thin film of periodic structure
WO2023105856A1 (en) Gas concentration measuring device, gas concentration measuring method, and program
WO2022172469A1 (en) Image inspection device, image inspection method, and trained model generation device
TWI493177B (en) Method of detecting defect on optical film with periodic structure and device thereof
TWI414768B (en) Detecting method and system for 3d micro-retardation film

Legal Events

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