TWI602156B - Moving foreground detection system and method thereof - Google Patents

Moving foreground detection system and method thereof Download PDF

Info

Publication number
TWI602156B
TWI602156B TW102121143A TW102121143A TWI602156B TW I602156 B TWI602156 B TW I602156B TW 102121143 A TW102121143 A TW 102121143A TW 102121143 A TW102121143 A TW 102121143A TW I602156 B TWI602156 B TW I602156B
Authority
TW
Taiwan
Prior art keywords
binary image
image
binary
texture
moving
Prior art date
Application number
TW102121143A
Other languages
Chinese (zh)
Other versions
TW201447819A (en
Inventor
林智揚
賴向二
葉家宏
Original Assignee
亞洲大學
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 亞洲大學 filed Critical 亞洲大學
Priority to TW102121143A priority Critical patent/TWI602156B/en
Publication of TW201447819A publication Critical patent/TW201447819A/en
Application granted granted Critical
Publication of TWI602156B publication Critical patent/TWI602156B/en

Links

Landscapes

  • Image Analysis (AREA)

Description

偵測移動前景之系統及其方法 System and method for detecting moving foreground

本發明係有關於一種偵測移動前景之系統及其方法,特別係一種依據遲滯閾值及高斯混合模式來建立出一偵測移動前景之系統及其方法。 The present invention relates to a system for detecting a moving foreground and a method thereof, and more particularly to a system and method for detecting a moving foreground based on a hysteresis threshold and a Gaussian mixture mode.

近年來,由於人們對於居家安全的重視,使得視訊影像的偵測系統成為一個熱門的研究領域,因為影像偵測系統可以廣泛的被使用來保障民眾的人身安全,例如在社區建置監視器以記錄意外事故或留意可疑人士。 In recent years, due to the emphasis on home security, video image detection systems have become a hot research field, because image detection systems can be widely used to protect people's personal safety, such as building monitors in the community. Record accidents or pay attention to suspicious persons.

傳統的影像偵測系統,如監控系統,須以人力方式不間斷地注視監控螢幕,以免遺漏重要資訊,故目前有相當多的研究專注於如何利用電腦系統進行偵測並輸出移動前景之影像以節省人力成本。在習知技藝中,偵測移動前景之系統必須先建立一背景模型以分離出移動前景和固定背景之影像,然而建立此背景模型時往往會遇到許多考驗,如光線變化的雜訊、移動前景陰影的干擾或是誤判動作緩慢的移動前景成為固定背景的一部份。 Traditional image detection systems, such as surveillance systems, must constantly watch the surveillance screens in a human-powered manner so as not to miss important information. Therefore, there are quite a few studies focusing on how to use the computer system to detect and output images of moving foregrounds. Save labor costs. In the prior art, the system for detecting the foreground of the movement must first establish a background model to separate the image of the moving foreground and the fixed background. However, when establishing the background model, many challenges, such as noise and movement of light changes, are often encountered. The interference of the foreground shadows or the slow moving motion of the moving motion becomes part of the fixed background.

有鑒於止,本發明之發明人思索並設計一種偵測移動前景之系統及其方法,針對現有技術之缺失加以改進,以呈現出一結果更為 精細之偵測影像。 In view of the above, the inventors of the present invention contemplate and design a system and method for detecting the foreground of the mobile, and improve the lack of the prior art to present a more Fine detection of images.

本發明實施例之態樣係針對一種偵測移動前景之系統,能夠改善以往偵測移動前景之系統中光線變化所帶來的雜訊問題以及有效消除移動前景之陰影,更可以透過移動前景之歷史位置修正移動前景因動作緩慢所造成之誤判,進而提供使用者一準確且完善之偵測移動前景之系統。 The embodiment of the present invention is directed to a system for detecting a moving foreground, which can improve the noise problem caused by the light change in the system for detecting the moving foreground in the past and effectively eliminate the shadow of the moving foreground, and can also move through the foreground. The historical position corrects the misjudgment caused by the slow movement of the moving foreground, thereby providing the user with an accurate and complete system for detecting the foreground of the movement.

本發明提出一種偵測移動前景之系統,其包含一攝像模組、一處理模組及一儲存模組。攝像模組對一場景擷取一原始影像,並將此原始影像傳送至一處理模組;處理模組自原始影像中擷取一紋理資訊(Texture),於高斯混合模型(Gaussian Mixture Model)中應用遲滯閾值(Hysteresis thresholding)根據原始影像產生一主色(Dominated Color,DC)二元影像及一輔助色(Adjunct Color,AC)二元影像,並於高斯混合模型中應用遲滯閾值根據紋理資訊產生一主紋理(Dominated Texture,DT)二元影像及一輔助紋理(Adjunct Texture,AT)二元影像;利用主紋理二元影像比對主色二元影像以產生一移除移動前景之陰影之一第一二元影像;再利用第一二元影像比對主色二元影像以萃取移動前景之框架並產生一第二二元影像;接著,利用第二二元影像比對輔助色二元影像與輔助紋理二元影像修補此第二二元影像之移動前景框架內之遺失細小區塊以產生一第三二元影像;最後利用第三二元影像比對含有移動前景之歷史位置之複數張二元影像以修正第三二元影像中之移動前景之移動軌跡,產生並輸出一第四二元影像至儲存模組。 The invention provides a system for detecting a moving foreground, which comprises a camera module, a processing module and a storage module. The camera module captures an original image from a scene and transmits the original image to a processing module. The processing module extracts a texture information from the original image in a Gaussian Mixture Model. Hysteresis thresholding is used to generate a Dominated Color (DC) binary image and an Adjunct Color (AC) binary image according to the original image, and the hysteresis threshold is applied to the Gaussian mixture model according to the texture information. A primary image (Dominated Texture, DT) binary image and an auxiliary texture (AT) binary image; the primary texture binary image is used to compare the primary color binary image to generate a shadow for removing the moving foreground a first binary image; the first binary image is used to compare the primary color binary image to extract a frame of the moving foreground and generate a second binary image; and then, the second binary image is used to compare the auxiliary color binary image And the auxiliary texture binary image repairing the lost fine cell block in the moving foreground frame of the second binary image to generate a third binary image; finally using the third binary image comparison Zhang two yuan has a plurality of position history image to the moving foreground movement locus of the foreground image of the corrected third two yuan, two yuan generates and outputs a fourth image to the storage module.

較佳地,攝像模組、處理模組以及儲存模組可整合同一裝 置中,或者,攝像模組係安裝在遠端,而處理模組及儲存模組係安裝在伺服端,攝像模組與伺服端之間係透過網路連接。 Preferably, the camera module, the processing module and the storage module can be integrated into the same package In the middle, or the camera module is installed at the remote end, and the processing module and the storage module are installed on the servo end, and the camera module and the servo end are connected through the network.

其中,遲滯閾值可包含第一門檻值和第二門檻值且第一門檻值大於第二門檻值;處理單元利用第一門檻值在高斯混合模型中將原始影像分離為一第一移動前景影像及一第一背景影像以產生一主色二元影像;利用第二門檻值在高斯混合模型中將原始影像分離為一第二移動前景影像及一第二背景影像之輔助色二元影像。 The hysteresis threshold may include a first threshold value and a second threshold value and the first threshold value is greater than the second threshold value; the processing unit separates the original image into a first moving foreground image in the Gaussian mixture model by using the first threshold value and A first background image is used to generate a primary color binary image; the second threshold is used to separate the original image into a second moving foreground image and a second background image auxiliary color binary image in the Gaussian mixture model.

其中,遲滯閾值可包含第一門檻值和第二門檻值且第一門檻值大於第二門檻值;處理單元利用第一門檻值在高斯混合模型中將紋理資訊分離為一第三移動前景影像及一第三背景影像之主紋理二元影像;以及利用第二門檻值在高斯混合模型中將紋理資訊分離為一第四移動前景影像及一第四背景影像之輔助紋理二元影像。 The hysteresis threshold may include a first threshold value and a second threshold value and the first threshold value is greater than the second threshold value; the processing unit uses the first threshold value to separate the texture information into a third moving foreground image in the Gaussian mixture model and a primary texture binary image of the third background image; and separating the texture information into a fourth moving foreground image and a fourth background image auxiliary texture binary image in the Gaussian mixture model by using the second threshold value.

再者,本發明更提出一種偵測移動前景之方法,包含使用一攝像模組對一場景擷取一原始影像及使用一處理模組自原始影像中擷取一紋理資訊,於一高斯混合模型中應用一遲滯閾值根據原始影像產生一主色二元影像及一輔助色二元影像,並於高斯混合模型中應用遲滯閾值根據紋理資訊之二元影像產生一主紋理二元影像及一輔助紋理二元影像;依據主紋理二元影像比對主色二元影像以產生一移除移動前景之陰影之一第一二元影像;接著萃取第一二元影像中之移動前景框架並產生一第二二元影像;利用第二二元影像分別比對輔助色二元影像及輔助紋理二元影像以修補第二二元影像中移動前景框架內之遺失區塊,產生一第三二元影像;利用第三二元影像比對含有移動前景之歷史位置之複數張二元影像以修正此第三二元影像,產生並輸出一第四二元影像至一儲存模組。 Furthermore, the present invention further provides a method for detecting a moving foreground, comprising: capturing an original image from a scene using a camera module and extracting a texture information from the original image using a processing module in a Gaussian mixture model Applying a hysteresis threshold to generate a primary color binary image and an auxiliary color binary image according to the original image, and applying a hysteresis threshold in the Gaussian mixture model to generate a primary texture binary image and an auxiliary texture according to the binary image of the texture information. Binary image; comparing the primary color binary image with the primary color binary image to generate a first binary image that removes the shadow of the moving foreground; and then extracting the moving foreground frame in the first binary image and generating a first a binary image; the second binary image is used to compare the auxiliary color binary image and the auxiliary texture binary image to repair the missing block in the moving foreground frame in the second binary image to generate a third binary image; Using the third binary image to compare a plurality of binary images containing the historical position of the moving foreground to correct the third binary image, generating and outputting a fourth binary image to Storage module.

較佳地,遲滯閾值包含一第一門檻值和一第二門檻值,高斯混合模型中應用遲滯閾值對原始影像產生主色二元影像及輔助色二元影像之方法包括利用第一門檻值在高斯混合模型中將原始影像分離為一第一移動前景影像及一第一背景影像之主色二元影像;以及利用第二門檻值在高斯混合模型中將原始影像分離為一第二移動前景影像及一第二背景影像之輔助色二元影像。 Preferably, the hysteresis threshold includes a first threshold value and a second threshold value, and the method for generating a dominant color binary image and an auxiliary color binary image by applying a hysteresis threshold to the original image in the Gaussian mixture model comprises using the first threshold value The Gaussian mixture model separates the original image into a first moving foreground image and a primary background binary image of the first background image; and uses the second threshold value to separate the original image into a second moving foreground image in the Gaussian mixture model. And an auxiliary color binary image of the second background image.

較佳地,遲滯閾值包含一第一門檻值和一第二門檻值,高斯混合模型中應用遲滯閾值對紋理資訊產生主紋理二元影像及輔助紋理二元影像之方法包括利用該第一門檻值在高斯混合模型中將紋理資訊中分離為一第三移動前景影像及一第三背景影像之主紋理二元影像;以及利用第二門檻值在高斯混合模型中將紋理資訊中分離為一第四移動前景影像及一第四背景影像之輔助紋理二元影像。 Preferably, the hysteresis threshold includes a first threshold value and a second threshold value, and the method for applying the hysteresis threshold to the texture information to generate the main texture binary image and the auxiliary texture binary image in the Gaussian mixture model comprises using the first threshold value Separating the texture information into a third moving foreground image and a third texture image in the Gaussian mixture model; and separating the texture information into a fourth in the Gaussian mixture model by using the second threshold value An auxiliary texture binary image that moves the foreground image and a fourth background image.

承上所述,本發明之偵測移動前景之系統及其方法,係於高斯混合模型中應用遲滯閾值依據原始影像及紋理資訊進行影像處理以產生一分離移動前景及背景之二元影像,此二元影像包含一完整之移動前景影像,並可消除移動前景之陰影及光線變化所帶來之雜訊,甚至可偵測移動前景之動向以解決移動前景誤判成背景之問題,達到一完善且準確偵測移動前景之功能。 As described above, the system and method for detecting a moving foreground of the present invention is based on a Gaussian mixture model in which a hysteresis threshold is applied to image processing based on original image and texture information to generate a binary image of a separated moving foreground and background. The binary image contains a complete moving foreground image, and can eliminate the noise caused by the shadow of the moving foreground and the change of the light, and even detect the moving direction of the moving foreground to solve the problem that the moving foreground is misjudged into the background, achieving a perfect and The ability to accurately detect the foreground of the move.

1‧‧‧偵測移動前景之系統 1‧‧‧System for detecting mobile prospects

11‧‧‧攝像模組 11‧‧‧ camera module

111‧‧‧原始影像 111‧‧‧ original image

111-1‧‧‧主色二元影像 111-1‧‧‧Main color binary image

111-2‧‧‧輔助色二元影像 111-2‧‧‧Auxiliary color binary image

12‧‧‧處理模組 12‧‧‧Processing module

121‧‧‧遲滯閾值 121‧‧‧hysteresis threshold

122‧‧‧高斯混合模型 122‧‧‧ Gaussian mixture model

112‧‧‧紋理資訊 112‧‧‧Texture Information

112-1‧‧‧主紋理二元影像 112-1‧‧‧Main texture binary image

112-2‧‧‧輔助紋理二元影像 112-2‧‧‧Auxiliary Texture Binary Image

124‧‧‧二元影像 124‧‧‧ binary image

13‧‧‧儲存模組 13‧‧‧ Storage Module

22‧‧‧攝影機 22‧‧‧ camera

23‧‧‧電腦主機 23‧‧‧Computer host

i43‧‧‧第一二元影像 I43‧‧‧ first binary image

i51‧‧‧第二二元影像 I51‧‧‧ second binary image

i63‧‧‧第三二元影像 I63‧‧‧ third binary image

i71‧‧‧移動歷史之複數張二元影像 I71‧‧‧Multiple binary images of mobile history

i72‧‧‧第四二元影像 I72‧‧‧ fourth binary image

本發明之上述及其他特徵及優勢將藉由參照附圖詳細說明其例示性實施例而變得更顯而易知,其中:第1圖係為根據本發明之偵測移動前景之系統之實施例之方塊圖; 第2圖係為根據本發明之偵測移動前景之系統之較佳實施例之示意圖;第3圖係為根據本發明之偵測移動前景之方法之步驟流程圖;第4圖係為根據本發明之偵測移動前景之方法之第一實施例示意圖;第5圖係為根據本發明之偵測移動前景之方法之第二實施例示意圖;第6圖係為根據本發明之偵測移動前景之方法之第三實施例示意圖;以及第7圖係為根據本發明之偵測移動前景之方法之第四實施例示意圖。 The above and other features and advantages of the present invention will become more apparent from the detailed description of the exemplary embodiments of the invention in which a block diagram of an example; 2 is a schematic diagram of a preferred embodiment of a system for detecting a moving foreground according to the present invention; FIG. 3 is a flow chart of a method for detecting a moving foreground according to the present invention; FIG. 4 is a flowchart according to the present invention; A schematic diagram of a first embodiment of a method for detecting a moving foreground of the invention; a fifth embodiment of the method for detecting a moving foreground according to the present invention; and a sixth embodiment for detecting a moving foreground according to the present invention A schematic diagram of a third embodiment of the method; and FIG. 7 is a schematic diagram of a fourth embodiment of a method for detecting a moving foreground according to the present invention.

於此使用,詞彙“與/或”包含一或多個相關條列項目之任何或所有組合。當“至少其一”之敘述前綴於一元件清單前時,係修飾整個清單元件而非修飾清單中之個別元件。 As used herein, the term "and/or" includes any and all combinations of one or more of the associated listed items. When the phrase "at least one of" is preceded by a list of elements, the entire list of elements is modified instead of the individual elements in the list.

第1圖係顯示本發明之依據偵測移動前景之系統之實施例之方塊圖。請參閱第1圖,此偵測移動前景系統1包含一攝像模組11、一處理模組12以及一儲存模組13。攝像模組11對場景作影像擷取以形成一原始影像111後,處理模組12先自原始影像111中擷取一紋理資訊112,其中紋理資訊112之擷取係先將原始影像111切割成複數塊不重疊之區塊,每個區塊含有n*n個像素,利用公式(1)將區塊中位於(i,j)之一像素bij轉換成一二元值,其中m為原始影像之平均像素值,xij為區塊中位於(i,j)之一像素,Threshold為使用者自定之預設門檻值,其中1≦i≦n,1≦j≦n。 1 is a block diagram showing an embodiment of a system for detecting a moving foreground according to the present invention. Referring to FIG. 1 , the mobile foreground system 1 includes a camera module 11 , a processing module 12 , and a storage module 13 . After the camera module 11 images the scene to form an original image 111, the processing module 12 first extracts a texture information 112 from the original image 111. The texture information 112 is firstly cut into the original image 111. A block of non-overlapping blocks, each block containing n*n pixels, using equation (1) to convert a pixel bij located in (i, j) of the block into a binary value, where m is the original image The average pixel value, x ij is one of the (i, j) pixels in the block, and Threshold is the user-defined preset threshold, where 1≦i≦n, 1≦j≦n.

接著,處理模組12於高斯混合模型122中應用遲滯閾值121之第一門檻值及第二門檻值根據原始影像111產生一主色(Dominated Color,DC)二元影像111-1及一輔助色(Adjunct Color,AC)二元影像111-2,並於高斯混合模型122中應用遲滯閾值121之第一門檻值及第二門檻值根據紋理資訊112產生一主紋理二元影像112-1及一輔助紋理二元影像112-2,利用主紋理二元影像112-1比對主色二元影像111-1以產生一移除移動前景之陰影之一第一二元影像。 Then, the processing module 12 applies a first threshold value and a second threshold value of the hysteresis threshold 121 in the Gaussian mixture model 122 to generate a dominant color (DC) binary image 111-1 and an auxiliary color according to the original image 111. (Adjunct Color, AC) binary image 111-2, and applying a first threshold value and a second threshold value of the hysteresis threshold 121 in the Gaussian mixture model 122 to generate a main texture binary image 112-1 and a texture according to the texture information 112. The auxiliary texture binary image 112-2 uses the main texture binary image 112-1 to compare the main color binary image 111-1 to generate a first binary image that removes the shadow of the moving foreground.

其中,產生輔助紋理二元影像及主紋理二元影像之方法如下,紋理資訊之每個像素各自預設有K個不同權重值w之二元位圖(binary bitmap),{BM1,BM2,…,BMK},其中w為介於0跟1之間之實數且每一二元位圖大小為p*p。當產生紋理資訊中一像素之二元值時,處理單元利用公式(2)產生一相似距離值Dist(BMnew,BMm),l≦m≦K,遲滯閾值包含第一門檻值和第二門檻值且第一門檻值大於第二門檻值,若此相似距離值小於第一門檻值,判斷此像素為背景,反之則判斷為移動前景,其中BMnew為以此像素為中心之紋理資訊所形成之p*p二元位圖。分別以第一門檻值及第二門檻值判斷出之二元影像即為主紋理二元影像及輔助紋理二元影像。 The method for generating the auxiliary texture binary image and the main texture binary image is as follows: each pixel of the texture information is pre-set with a binary bitmap of K different weight values w, {BM1, BM2,... , BMK}, where w is a real number between 0 and 1 and each binary bitmap size is p*p. When a binary value of one pixel in the texture information is generated, the processing unit generates a similar distance value Dist(BMnew,BMm), l≦m≦K, using the formula (2), and the hysteresis threshold includes the first threshold value and the second threshold value. And the first threshold is greater than the second threshold. If the similar distance value is less than the first threshold, the pixel is determined to be the background, and the opposite is determined to be the moving foreground, where BM new is formed by the texture information centered on the pixel. p*p binary bitmap. The binary image determined by the first threshold and the second threshold is the primary texture binary image and the auxiliary texture binary image.

接著利用第一二元影像比對主色二元影像111-1以萃取第一二元影像中之移動前景框架並產生一第二二元影像;利用此第二二元 影像分別比對輔助色二元影像111-2及輔助紋理二元影像112-2以修補該第二二元影像中移動前景框架內之遺失細小區塊並產生一第三二元影像;最後,利用第三二元影像比對一移動歷史以修正第三二元影像中移動前景之移動軌跡,產生並輸出一二元影像124至一儲存模組13。 And then using the first binary image to compare the primary color binary image 111-1 to extract the moving foreground frame in the first binary image and generate a second binary image; using the second binary The images respectively compare the auxiliary color binary image 111-2 and the auxiliary texture binary image 112-2 to repair the missing fine cell block in the moving foreground frame in the second binary image and generate a third binary image; finally, The third binary image is compared with a movement history to correct the moving trajectory of the moving foreground in the third binary image, and a binary image 124 is generated and outputted to the storage module 13.

其中,攝像模組11、處理模組12以及儲存模組13可整合同一裝置中,或者,攝像模組11係安裝在遠端,而處理模組12以及儲存模組13係安裝在伺服端,攝像模組11與伺服端之間係透過網路連接。 The camera module 11, the processing module 12, and the storage module 13 can be integrated into the same device, or the camera module 11 is installed at the remote end, and the processing module 12 and the storage module 13 are installed at the server. The camera module 11 and the servo end are connected through a network.

第2圖係顯示本發明之偵測移動前景之系統之較佳實施例之示意圖。請參閱第2圖,攝影機22擷取原始影像111之後,電腦主機23依據高斯混合模型及遲滯閾值將原始影像111處理成一移動前景及一背景分離之二元影像124。 Figure 2 is a schematic diagram showing a preferred embodiment of the system for detecting a moving foreground of the present invention. Referring to FIG. 2, after the camera 22 captures the original image 111, the host computer 23 processes the original image 111 into a moving foreground and a background separated binary image 124 according to the Gaussian mixture model and the hysteresis threshold.

第3圖係顯示本發明之偵測移動前景之方法之步驟流程圖。請參閱第3圖,在步驟S30,一攝像模組對一場景作影像擷取並將原始影像傳送至一處理模組。在步驟S31,處理模組擷取此原始影像之紋理資訊。在步驟S32,處理模組應用高斯混合模式及遲滯閾值根據原始影像產生一主色二元影像及一輔助色二元影像。在此,如何產生主色二元影像及輔助色二元影像已經在前述內容說明過,故在此不再贅述。 Figure 3 is a flow chart showing the steps of the method for detecting a moving foreground of the present invention. Referring to FIG. 3, in step S30, a camera module performs image capture on a scene and transmits the original image to a processing module. In step S31, the processing module captures the texture information of the original image. In step S32, the processing module applies a Gaussian mixture mode and a hysteresis threshold to generate a primary color binary image and an auxiliary color binary image according to the original image. Here, how to generate the primary color binary image and the auxiliary color binary image has been described in the foregoing, and therefore will not be described herein.

在步驟S33,處理模組應用高斯混合模型及遲滯閾值根據紋理資訊產生一主紋理二元影像及一輔助紋理二元影像。在步驟S34,利用主紋理二元影像比對主色二元影像以產生一移除移動前景陰影之第一二元影像。在步驟S35,利用第一二元影像比對主色二元影像以萃取第一二元影像中包含移動前景之框架,並產生一第二二元影像。在步驟S36,利用第二二元影像比對輔助色二元影像與輔助紋理二元影像以修補第二二元影像中移動前景之框架內之遺失細小區塊並產生第三二元影 像。在步驟S37,利用第三二元影像比對移動歷史以修正此第三二元影像之移動前景移動軌跡,產生並輸出一第四二元影像至一儲存模組。 In step S33, the processing module applies a Gaussian mixture model and a hysteresis threshold to generate a main texture binary image and an auxiliary texture binary image according to the texture information. In step S34, the primary color binary image is compared with the primary color binary image to generate a first binary image that removes the moving foreground shadow. In step S35, the primary binary image is compared with the first binary image to extract a frame containing the moving foreground in the first binary image, and a second binary image is generated. In step S36, the second binary image is used to compare the auxiliary color binary image and the auxiliary texture binary image to repair the missing fine block in the frame of the moving foreground in the second binary image and generate a third binary image. image. In step S37, the third binary image is used to compare the movement history to correct the moving foreground moving track of the third binary image, and generate and output a fourth binary image to a storage module.

其中,透過高斯混合模型代入遲滯閾值之第一門檻值可產生主色二元影像,透過高斯混合模型代入遲滯閾值之第二門檻值可產生輔助色二元影像。 The primary threshold of the hysteresis threshold is generated by the Gaussian mixture model, and the primary color binary image is generated. The second threshold of the hysteresis threshold is substituted by the Gaussian mixture model to generate the auxiliary color binary image.

第4圖係顯示本發明之偵測移動前景之方法之第一實施例。請參閱第4圖,利用主紋理二元影像112-1比對主色二元影像111-1以產生一消除移動前景陰影及背景雜訊之第一二元影像i43,其中,主紋理二元影像112-1之每一個像素在主色二元影像111-1中對應之像素點之周圍8個鄰近點若不包含一移動前景點時,則轉換主紋理二元影像112-1中之此像素為一背景點,反之,則轉換此像素為一移動前景點;比對完主色二元影像111-1中所有像素即可產生一消除移動前景陰影及背景雜訊之第一二元影像i43。 Figure 4 is a view showing a first embodiment of the method of detecting a moving foreground of the present invention. Referring to FIG. 4, the primary texture binary image 112-1 is used to compare the primary color binary image 111-1 to generate a first binary image i43 that eliminates moving foreground shadows and background noise, wherein the primary texture binary Each of the pixels of the image 112-1 converts the eight neighboring points around the corresponding pixel in the primary color binary image 111-1, if it does not include a pre-moving attraction, converts the main texture binary image 112-1 The pixel is a background point, and conversely, the pixel is converted into a pre-moving attraction; the first binary image of the moving foreground shadow and the background noise is generated by comparing all the pixels in the main color binary image 111-1. I43.

第5圖係顯示本發明之偵測移動前景之方法之第二實施例。請參閱第5圖,利用第一二元影像i43比對主色二元影像111-1以萃取第一二元影像i43中之移動前景框架之第二二元影像i51。其中,第一二元影像i43中每一個像素在主色二元影像111-1中對應之像素點之周圍8個鄰近點若不包含一移動前景點時,則轉換第一二元影像i43中之此像素為一背景點,反之,則轉換此像素為一移動前景點;比對完主色二元影像111-1中所有像素後接著利用此移動前景之高度及寬度萃取出含移動前景之框架以形成第二二元影像i51。 Figure 5 is a diagram showing a second embodiment of the method of detecting a moving foreground of the present invention. Referring to FIG. 5, the first binary image i43 is used to compare the primary color binary image 111-1 to extract the second binary image i51 of the moving foreground frame in the first binary image i43. The first binary image i43 is converted into the first binary image i43 if the eight adjacent points around the corresponding pixel in the primary color binary image 111-1 do not include a pre-moving attraction. The pixel is a background point. Otherwise, the pixel is converted into a pre-moving point of view; after comparing all the pixels in the main color binary image 111-1, the height and width of the moving foreground are used to extract the foreground with the moving foreground. The frame forms a second binary image i51.

第6圖係顯示本發明之偵測移動前景之方法之第三實施例。請參閱第6圖,在第二二元影像i51中比對輔助色二元影像111-2及輔助紋理二元影像112-2以修補第二二元影像i51中移動前景之框架 內之遺失區塊,產生第三二元影像i63。其中,第二二元影像i51中每一個像素在輔助色二元影像112-2及輔助紋理二元影像112-2中對應之像素點之周圍8個鄰近點若不包含一移動前景點時,則轉換第二二元影像i51中之此像素為一背景點,反之,則轉換此像素為一移動前景點;比對完主色輔助色二元影像111-2及輔助紋理二元影像112-2中所有像素後即可修補第二二元影像i51中移動前景內缺少之微小區塊,並將此結果輸出成第三二元影像i63。 Figure 6 is a view showing a third embodiment of the method of detecting a moving foreground of the present invention. Referring to FIG. 6, the auxiliary binary image 111-2 and the auxiliary texture binary image 112-2 are compared in the second binary image i51 to repair the frame of the moving foreground in the second binary image i51. The missing block within the block produces a third binary image i63. Wherein, in the second binary image i51, if the eight neighboring points around the corresponding pixel points in the auxiliary color binary image 112-2 and the auxiliary texture binary image 112-2 do not include a pre-moving attraction, Then converting the pixel in the second binary image i51 to a background point; otherwise, converting the pixel to a pre-moving attraction; comparing the main color auxiliary color binary image 111-2 and the auxiliary texture binary image 112- After all the pixels in 2, the microblocks missing in the moving foreground of the second binary image i51 can be repaired, and the result is output as the third binary image i63.

第7圖係顯示本發明之偵測移動前景之方法之第四實施例。請參閱第7圖,移動歷史(Motion history)係含有移動前景之歷史位置之複數張二元影像,利用第三二元影像i63比對移動歷史i71以修正第三二元影像中之移動前景之移動軌跡,進而產生並輸出第四二元影像i72。若第三二元影像i63拍攝時間為t,且含有移動前景之歷史位置之二元影像有2張且此2張二元影像之拍攝時間分別為t-1及t-2,搜尋第三二元影像i63中之一背景點在第t-1時間之二元影像中對應之像素之周圍是否不少於a個前景點並同時搜尋此背景點在第t-2時間之二元影像中對應之像素之周圍是否不少於b個前景點,其中a>=b,若是,則將此背景點設定為一前景點,更改完第三二元影像i63所有背景點後將此結果輸出成第四二元影像i72。 Fig. 7 is a view showing a fourth embodiment of the method of detecting a moving foreground of the present invention. Referring to FIG. 7, the movement history is a plurality of binary images including the historical position of the moving foreground, and the third binary image i63 is used to compare the moving history i71 to correct the moving trajectory of the moving foreground in the third binary image. And generating and outputting a fourth binary image i72. If the third binary image i63 has a shooting time t, and there are two binary images containing the historical position of the moving foreground, and the shooting time of the two binary images is t-1 and t-2, respectively, searching for the third binary image One of the background points in i63 is not less than a front sight around the corresponding pixel in the binary image at time t-1 and simultaneously searches for the corresponding pixel in the binary image of the background point at time t-2. Is there no less than b front spots around, where a>=b, if yes, set this background point as a front spot, and after changing all the background points of the third binary image i63, output the result as the fourth two. Meta image i72.

雖然本發明已參照其例示性實施例而特別地顯示及描述,將為所屬技術領域具通常知識者所理解的是,於不脫離以下申請專利範圍及其等效物所定義之本發明之精神與範疇下可對其進行形式與細節上之各種變更。 The present invention has been particularly shown and described with reference to the exemplary embodiments thereof, and it is understood by those of ordinary skill in the art Various changes in form and detail can be made in the context of the category.

1‧‧‧偵測移動前景之系統 1‧‧‧System for detecting mobile prospects

11‧‧‧攝像模組 11‧‧‧ camera module

111‧‧‧原始影像 111‧‧‧ original image

111-1‧‧‧主色二元影像 111-1‧‧‧Main color binary image

111-2‧‧‧輔助色二元影像 111-2‧‧‧Auxiliary color binary image

12‧‧‧處理模組 12‧‧‧Processing module

121‧‧‧遲滯閾值 121‧‧‧hysteresis threshold

122‧‧‧高斯混合模型 122‧‧‧ Gaussian mixture model

112‧‧‧紋理資訊 112‧‧‧Texture Information

112-1‧‧‧主紋理二元影像 112-1‧‧‧Main texture binary image

112-2‧‧‧輔助紋理二元影像 112-2‧‧‧Auxiliary Texture Binary Image

124‧‧‧二元影像 124‧‧‧ binary image

13‧‧‧儲存模組 13‧‧‧ Storage Module

Claims (2)

一種偵測移動前景之方法,其包含:a. 使用一攝像模組對一場景擷取一原始影像;以及b. 使用一處理模組自該原始影像中擷取一紋理資訊(Texture),於一高斯混合模型(Gaussian Mixture Model)中應用一遲滯閾值(Hysteresis thresholding)根據該原始影像產生一主色(Dominated Color,DC)二元影像及一輔助色(Adjunct Color,AC)二元影像,並於該高斯混合模型中應用該遲滯閾值根據該紋理資訊之二元影像產生一主紋理(Dominated Texture,DT)二元影像及一輔助紋理(Adjunct Texture,AT)二元影像;依據該主紋理二元影像比對該主色二元影像以產生一移除移動前景之陰影之一第一二元影像;萃取該第一二元影像中之移動前景框架並產生一第二二元影像;利用該第二二元影像分別比對該輔助色二元影像及該輔助紋理二元影像以修補該第二二元影像中移動前景框架內之遺失區塊,產生一第三二元影像;利用該第三二元影像比對一移動歷史(Motion history)以修正該第三二元影像,產生並輸出一第四二元影像至一儲存模組;其中,該主紋理二元影像之每一個像素在該主色二元影像中對應之像素點之周圍複數個鄰近點若不包含一移動前景點時,則轉換該主紋理二元影像中之此像素為一背景點,反之,則轉換此像素為一移動前景點;並且,該第一二元影像中每一個像素在該主色二元影像中對應之像素點之周圍複數個鄰近點若不包含一移動前景點時,則 轉換該第一二元影像中之此像素為一背景點,反之,則轉換此像素為一移動前景點;其中,在該第三二元影像拍攝時間為t,且含有移動前景之歷史位置之該二元影像有複數張且該複數張二元影像之拍攝時間分別為t-1及t-2時,搜尋該第三二元影像中之一背景點在第t-1時間之二元影像中對應之像素之周圍是否不少於a個前景點,並同時搜尋此背景點在第t-2時間之二元影像中對應之像素之周圍是否不少於b個前景點,其中a≧b,若是,則將此背景點設定為一前景點,更改完該第三二元影像所有背景點後將此結果輸出成該第四二元影像;其中,該遲滯閾值包含一第一門檻值和一第二門檻值,該高斯混合模型中應用該遲滯閾值對該原始影像產生該主色二元影像及該輔助色二元影像之方法包括:(b1)利用該第一門檻值在該高斯混合模型中將該原始影像分離為一第一移動前景影像及一第一背景影像之該主色二元影像;以及(b2)利用該第二門檻值在該高斯混合模型中將該原始影像分離為一第二移動前景影像及一第二背景影像之該輔助色二元影像;其中,該高斯混合模型中應用該遲滯閾值對該紋理資訊產生該主紋理二元影像及該輔助紋理二元影像之方法包括: (b3)利用該第一門檻值在該高斯混合模型中將該紋理資訊中分離為一第三移動前景影像及一第三背景影像之該主紋理二元影像;以及(b4)利用該第二門檻值在該高斯混合模型中將該紋理資訊中分離為一第四移動前景影像及一第四背景影像之該輔助紋理二元影像;其中,該移動歷史係利用含有移動前景之歷史位置之複數張二元影像以修正該第三二元影像之移動前景之移動軌跡。 A method for detecting a moving foreground, comprising: a. capturing a raw image from a scene using a camera module; and b. using a processing module to extract a texture information from the original image, A Gaussian Mixture Model uses a Hysteresis thresholding to generate a Dominated Color (DC) binary image and an Adjunct Color (AC) binary image based on the original image. Applying the hysteresis threshold to the Gaussian mixture model to generate a Dominated Texture (DT) binary image and an Adjunct Texture (AT) binary image according to the binary image of the texture information; The meta-image is compared to the primary color binary image to generate a first binary image that removes the shadow of the moving foreground; extracting the moving foreground frame in the first binary image and generating a second binary image; The second binary image respectively compares the auxiliary color binary image and the auxiliary texture binary image to repair the lost block in the moving foreground frame in the second binary image, and generates a third binary Using the third binary image to compare a motion history (Motion history) to correct the third binary image, generating and outputting a fourth binary image to a storage module; wherein the primary texture binary image Each pixel in the main color binary image surrounds a plurality of neighboring points, if the neighboring point does not include a pre-moving point of view, the pixel in the main texture binary image is converted into a background point, and vice versa. Converting the pixel to a pre-movement attraction; and each pixel in the first binary image, if a plurality of neighboring points around the corresponding pixel in the binary image of the main color does not include a pre-moving attraction, Converting the pixel in the first binary image to a background point; otherwise, converting the pixel to a pre-movement attraction; wherein, the third binary image capturing time is t, and the historical position of the moving foreground is included When the binary image has a plurality of images and the shooting time of the plurality of binary images is t-1 and t-2, respectively, searching for a background point of the third binary image corresponds to the binary image at the t-1th time Is there no less than a front spot around the pixel, and at the same time searching for whether the background point is not less than b front spots around the corresponding pixel in the binary image of time t-2, where a≧b, if And setting the background point as a front point, and outputting the result to the fourth binary image after changing all the background points of the third binary image; wherein the hysteresis threshold includes a first threshold and a first a threshold value, the method for generating the primary color binary image and the secondary color binary image for the original image by using the hysteresis threshold in the Gaussian mixture model comprises: (b1) using the first threshold value in the Gaussian mixture model Separating the original image into a first Moving the foreground image and the primary color binary image of the first background image; and (b2) separating the original image into a second moving foreground image and a second background in the Gaussian mixture model by using the second threshold value The auxiliary color binary image of the image; wherein the method for generating the main texture binary image and the auxiliary texture binary image by applying the hysteresis threshold to the texture information in the Gaussian mixture model comprises: (b3) separating the texture information into a third moving foreground image and a third background image of the main texture binary image in the Gaussian mixture model by using the first threshold value; and (b4) utilizing the second The threshold value is separated into the auxiliary texture binary image of the fourth moving foreground image and the fourth background image in the Gaussian mixture model; wherein the movement history utilizes a plurality of historical positions including the moving foreground The binary image is used to correct the moving trajectory of the moving foreground of the third binary image. 一種偵測移動前景之系統,其包含:一攝像模組,係對一場景擷取一原始影像,以形成一原始影像;一儲存模組;一處理模組,係對該原始影像中擷取一紋理資訊,該處理模組於一高斯混合模型應用一遲滯閾值根據該原始影像產生一主色二元影像及一輔助色二元影像,該處理模組並於該高斯混合模型中應用該遲滯閾值根據該紋理資訊產生一主紋理二元影像及一輔助紋理二元影像;該處理模組係利用該主紋理二元影像比對該主色二元影像以產生一移除移動前景之陰影之第一二元影像;該處理模組萃取該第一二元影像中之一移動前景框架並產生一第二二元影像;該處理模組依據該第二二元影像分別比對該輔助色二元影像及該輔助紋理二元影像以修補該第二二元影像中該移動前景框架內之遺失區塊,該處理模組並產生一第三二元影像;該處理模組利用一移動歷史修正 該第三二元影像以產生一第四二元影像,該處理模組輸出該第四二元影像至該儲存模組儲存;以及一傳輸模組,係將該原始影像傳送至該處理模組;其中,該主紋理二元影像之每一個像素在該主色二元影像中對應之像素點之周圍複數個鄰近點若不包含一移動前景點時,則轉換該主紋理二元影像中之此像素為一背景點,反之,則轉換此像素為一移動前景點;並且,該第一二元影像中每一個像素在該主色二元影像中對應之像素點之周圍複數個鄰近點若不包含一移動前景點時,則轉換該第一二元影像中之此像素為一背景點,反之,則轉換此像素為一移動前景點;其中,在該第三二元影像拍攝時間為t,且含有移動前景之歷史位置之該二元影像有複數張且該複數張二元影像之拍攝時間分別為t-1及t-2時,搜尋該第三二元影像中之一背景點在第t-1時間之二元影像中對應之像素之周圍是否不少於a個前景點,並同時搜尋此背景點在第t-2時間之二元影像中對應之像素之周圍是否不少於b個前景點,其中a≧b,若是,則將此背景點設定為一前景點,更改完該第三二元影像所有背景點後將此結果輸出成該第四二元影像;其中,該遲滯閾值係包含一第一門檻值和一第二門檻值,而該處理模組係利用該第一門檻值在該高斯混合模型中將該原始影像分離為一第一移動前景影像及一第一背景影像之該主色二元影像,以及利用該第二門檻值在該高斯混合模型中將該原始影像分離為一第二移動前景影像 及一第二背景影像之該輔助色二元影像;且,該處理模組係利用該第一門檻值在該高斯混合模型中將該紋理資訊分離為一第三移動前景影像及一第三背景影像之該主紋理二元影像,以及利用該第二門檻值在該高斯混合模型中將該紋理資訊分離為一第四移動前景影像及一第四背景影像之該輔助紋理二元影像;其中,該移動歷史係該處理模組利用含有移動前景之歷史位置之複數張二元影像以修正該第三二元影像之移動前景之移動軌跡。 A system for detecting a moving foreground, comprising: a camera module for capturing an original image from a scene to form an original image; a storage module; and a processing module for capturing the original image a texture information, the processing module applies a hysteresis threshold to a Gaussian mixture model to generate a primary color binary image and an auxiliary color binary image according to the original image, and the processing module applies the hysteresis to the Gaussian mixture model The threshold generates a primary texture binary image and a secondary texture binary image according to the texture information; the processing module uses the primary texture binary image to generate a shadow for removing the foreground color of the primary color binary image. a first binary image; the processing module extracts one of the first binary images to move the foreground frame and generates a second binary image; and the processing module compares the auxiliary color according to the second binary image The meta-image and the auxiliary texture binary image are used to repair the missing block in the moving foreground frame in the second binary image, and the processing module generates a third binary image; the processing module utilizes a Dynamic correction history The third binary image is used to generate a fourth binary image, the processing module outputs the fourth binary image to the storage module for storage; and a transmission module transmits the original image to the processing module Wherein, each pixel of the main texture binary image is converted into the main texture binary image if a plurality of neighboring points around the corresponding pixel point in the main color binary image do not include a pre-moving attraction point; The pixel is a background point, and conversely, the pixel is converted into a pre-movement attraction; and each pixel in the first binary image is in a plurality of neighboring points around the corresponding pixel in the main color binary image. When the pre-moving attraction is not included, the pixel in the first binary image is converted to a background point, and vice versa, the pixel is converted into a pre-moving attraction; wherein, the third binary image capturing time is t And if the binary image containing the historical position of the moving foreground has a plurality of images and the shooting time of the plurality of binary images is t-1 and t-2, respectively, searching for one of the third binary images is at the t -1 time binary image Whether there is no less than a front sight around the corresponding pixel, and at the same time, searching for whether the background point is not less than b front sights in the binary image of the binary image at time t-2, where a≧b If yes, the background point is set as a front point, and after the background point of the third binary image is changed, the result is output as the fourth binary image; wherein the hysteresis threshold includes a first threshold And a second threshold value, wherein the processing module separates the original image into a first moving foreground image and a first background image of the primary color binary image in the Gaussian mixture model by using the first threshold value And using the second threshold to separate the original image into a second moving foreground image in the Gaussian mixture model And the auxiliary color binary image of the second background image; and the processing module separates the texture information into a third moving foreground image and a third background in the Gaussian mixture model by using the first threshold value The main texture binary image of the image, and the texture information is separated into the auxiliary texture binary image of the fourth moving foreground image and the fourth background image by using the second threshold value in the Gaussian mixture model; wherein The movement history is that the processing module uses a plurality of binary images including a historical position of the moving foreground to correct a moving trajectory of the moving foreground of the third binary image.
TW102121143A 2013-06-14 2013-06-14 Moving foreground detection system and method thereof TWI602156B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
TW102121143A TWI602156B (en) 2013-06-14 2013-06-14 Moving foreground detection system and method thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW102121143A TWI602156B (en) 2013-06-14 2013-06-14 Moving foreground detection system and method thereof

Publications (2)

Publication Number Publication Date
TW201447819A TW201447819A (en) 2014-12-16
TWI602156B true TWI602156B (en) 2017-10-11

Family

ID=52707553

Family Applications (1)

Application Number Title Priority Date Filing Date
TW102121143A TWI602156B (en) 2013-06-14 2013-06-14 Moving foreground detection system and method thereof

Country Status (1)

Country Link
TW (1) TWI602156B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104680787B (en) * 2015-02-04 2017-08-01 上海依图网络科技有限公司 A kind of congestion in road detection method

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TW201118804A (en) * 2009-11-19 2011-06-01 Ind Tech Res Inst Method and system for object detection

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TW201118804A (en) * 2009-11-19 2011-06-01 Ind Tech Res Inst Method and system for object detection

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
C.-Y. Lin, W.-W. Chang, P. Prangjarote, C.-H. Yen, G.-S. Lin, "Alleviating Cavity Problems in Moving Object Detection based on Hysteresis Thresholding and Multi-Models", International Symposium on Consumer Electronics, pp.191-192, 3-6 JUNE 2013 *

Also Published As

Publication number Publication date
TW201447819A (en) 2014-12-16

Similar Documents

Publication Publication Date Title
CN107273822B (en) Privacy protection method based on surveillance video multi-target tracking and face recognition
US10349003B2 (en) Video recording system, server, system, and storage medium
JP5213105B2 (en) Video network system and video data management method
JP4700477B2 (en) MOBILE BODY MONITORING SYSTEM AND MOBILE BODY FEATURE CALCULATION DEVICE
CN109426785B (en) Human body target identity recognition method and device
JPWO2017221643A1 (en) Image processing apparatus, image processing system, image processing method, and program
CN104361327A (en) Pedestrian detection method and system
JPWO2017221644A1 (en) Image processing apparatus, image processing system, image processing method, and program
Gálai et al. Feature selection for Lidar-based gait recognition
De Oliveira et al. People reidentification in a camera network
CN109948474A (en) AI thermal imaging all-weather intelligent monitoring method
Senan et al. CCTV quality assessment for forensics facial recognition analysis
CN105989363A (en) Establishing method for multi-angle face image library
CN110633648A (en) Face recognition method and system in natural walking state
Cheng et al. Matching of objects moving across disjoint cameras
CN112818854B (en) All-weather video person searching method applied to campus security
CN104539875A (en) Video monitoring method and system
JP5865584B2 (en) Specific person detection system and detection method
TWI733616B (en) Reconition system of human body posture, reconition method of human body posture, and non-transitory computer readable storage medium
TWI602156B (en) Moving foreground detection system and method thereof
Supangkat et al. Moving Image Interpretation Models to Support City Analysis
CN114863337A (en) Novel screen anti-photographing recognition method
KR102614895B1 (en) Real-time object tracking system and method in moving camera video
CN102314612B (en) The recognition methods of a kind of smiling face's image, identification device and image acquisition equipment
Park et al. Depth image-based object segmentation scheme for improving human action recognition

Legal Events

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