Claims (10)
一種移動光源偵測方法,應用於一保全系統,包括:應用一監控攝影機擷取一連續影像;建立一影像背景模型;由該連續影像分離出一背景影像與連續的前景影像;利用一二值化演算法在各前景影像中得出一像素值較高的區域;利用一門檻判斷該像素值較高的區域為一光源;或判斷非光源,則重複該移動光源偵測方法之步驟;以及紀錄並追蹤該光源之位置;其中,於該保全系統中,根據該光源的軌跡行為判斷是否為一入侵事件。
A moving light source detecting method is applied to a security system, comprising: applying a monitoring camera to capture a continuous image; establishing an image background model; separating a background image and a continuous foreground image from the continuous image; using a binary value The algorithm performs a region with a higher pixel value in each foreground image; using a threshold to determine that the region having a higher pixel value is a light source; or determining a non-light source, repeating the steps of the moving light source detecting method; Recording and tracking the position of the light source; wherein, in the security system, determining whether an intrusion event is based on the trajectory behavior of the light source.
如申請專利範圍第1項所述移動光源偵測方法,其中係由一定時間內的影像中取得無變動的背景影像,建立該影像背景模型,且該影像背景模型為動態更新。
For example, in the method of detecting a moving light source according to claim 1, wherein the image background model is created by acquiring a background image without change in the image in a certain period of time, and the image background model is dynamically updated.
如申請專利範圍第1項所述移動光源偵測方法,其中係透過一減法運算,將該連續影像減去該影像背景模型所描繪的背景影像,得出該連續的前景影像。
The mobile light source detecting method according to claim 1, wherein the continuous foreground image is obtained by subtracting the background image drawn by the image background model by a subtraction operation.
一種移動光源偵測方法,應用於一保全系統,包括:(a)擷取出由一攝影機拍攝的影像,產生一輸入影像,暫存於一記憶媒體中;(b)取得複數張相同或接近的背景但不同時間的影像;(c)執行一色度空間轉換,轉換該影像為一灰階的色度空間;(d)將轉換後以矩陣表達的灰階影像轉變為一列的行向
量;(e)計算該複數張影像的一平均值;(f)不同時間的影像減去該平均值;(g)計算一共變異數矩陣;(h)對該共變異數矩陣作奇異值分解,計算出一特徵值與一特徵向量;(i)選取小於該影像的張數的複數個最大的特徵向量;(j)得到一背景影像特徵;(k)將該背景影像特徵影回到原來的影像空間,建立一影像背景模型;(l)以該輸入影像減去該影像背景模型的一背景影像,取得複數個前景影像;(m)將各個前景影像的灰階度分成兩個不同的灰度值;(n)根據該兩個不同的灰度值分佈的平均值與變異數得出一門檻值;(o)消除各前景影像雜訊;(p)對各前景影像作連通元件,利用該前景影像中像素值較高的位置判斷一光源的一候選區域;(q)利用該候選區域的屬性判斷該光源的位置;(r)得出每個時間片段的複數個光源位置;以及(s)描繪該光源的移動軌跡;其中,於該保全系統中,根據該光源的軌跡行為判斷是否為一入侵事件。
A mobile light source detecting method is applied to a security system, comprising: (a) taking an image taken by a camera, generating an input image, temporarily storing it in a memory medium; (b) obtaining a plurality of identical or close Background: images at different times; (c) performing a chromaticity space conversion, converting the image into a grayscale chromaticity space; (d) converting the grayscale image expressed in a matrix after conversion into a column of directions
(e) calculating an average of the plurality of images; (f) subtracting the average from images at different times; (g) calculating a matrix of common variances; (h) performing singular value decomposition on the matrix of the common variance Calculating an eigenvalue and a eigenvector; (i) selecting a plurality of largest eigenvectors that are smaller than the number of images of the image; (j) obtaining a background image feature; (k) rendering the background image feature back to the original Image space, establishing an image background model; (1) subtracting a background image of the image background model from the input image to obtain a plurality of foreground images; (m) dividing the gray scale of each foreground image into two different Gray value; (n) according to the average value and the variance of the two different gray value distributions to obtain a threshold; (o) eliminate each foreground image noise; (p) connect components to each foreground image, Determining a candidate region of a light source by using a position of the foreground image having a higher pixel value; (q) determining a position of the light source by using an attribute of the candidate region; (r) obtaining a plurality of light source positions of each time segment; (s) depicting a movement trajectory of the light source; wherein, the preservation System, the behavior from the trajectory of the light source determines whether an intrusion event.
如申請專利範圍第4項所述移動光源偵測方法,其中在建立該影像背景模型時,擷取一定時間內複數個相同背景
的影像,縮小該不同時間的影像,經步驟(b)至(j),定時動態更新該影像背景模型。
The method for detecting a moving light source according to claim 4, wherein when the image background model is established, a plurality of identical backgrounds are acquired for a certain period of time.
The image is reduced by the image at different times, and the image background model is dynamically updated periodically through steps (b) to (j).
如申請專利範圍第4項所述移動光源偵測方法,其中該消除各前景影像雜訊的步驟是利用一膨脹運算與一侵蝕運算。
The method for detecting a moving light source according to claim 4, wherein the step of eliminating each foreground image noise is to utilize an expansion operation and an erosion operation.
如申請專利範圍第4項所述移動光源偵測方法,其中該候選區域的屬性包括該候選區域的面積與一重心座標,該重心座標為該光源的位置。
The method for detecting a moving light source according to claim 4, wherein the attribute of the candidate area includes an area of the candidate area and a center of gravity coordinate, and the center of gravity is a position of the light source.
如申請專利範圍第4項所述移動光源偵測方法,其中利用一卡爾曼濾波器、隱藏馬可夫模型或蒙地卡羅粒子濾波器追蹤該光源位置。
The moving light source detecting method according to claim 4, wherein the position of the light source is tracked by using a Kalman filter, a hidden Markov model or a Monte Carlo particle filter.
一種應用如申請專利範圍第1項或第4項所述之移動光源偵測方法的保全系統,該保全系統包括有:一或複數個監控攝影機;以及一保全主機,連接於該一或複數個監控攝影機,並連線於一監控中心,該保全主機具有一數據處理單元與一記憶媒體,該記憶媒體儲存有執行該移動光源偵測方法之程式碼,該數據處理單元經載入該移動光源偵測方法之程式碼後,執行該移動光源偵測方法。
A security system for applying the mobile light source detecting method according to claim 1 or 4, wherein the security system comprises: one or a plurality of surveillance cameras; and a security host connected to the one or more Monitoring the camera and connecting to a monitoring center, the security host has a data processing unit and a memory medium, wherein the memory medium stores a code for executing the moving light source detecting method, and the data processing unit loads the moving light source After detecting the code of the method, the moving light source detecting method is executed.
一種應用如申請專利範圍第1項或第4項所述之移動光源偵測方法的保全系統,該保全系統包括有:一監控攝影機,該監控攝影機具有一數據處理單元與一記憶媒體,該記憶媒體儲存有執行該移動光源偵測方法之程式碼,該數據處理單元經載入該移動光源偵測方法之程式碼後,執行該移動光源偵測方法;以及一保全主機,連接於該一或複數個監控攝影機,並
連線於一監控中心。
A security system for applying the mobile light source detecting method according to claim 1 or 4, wherein the security system comprises: a surveillance camera having a data processing unit and a memory medium, the memory The media storage device has a code for executing the moving light source detecting method, and the data processing unit executes the moving light source detecting method after loading the code of the moving light source detecting method; and a security host connected to the one or Multiple surveillance cameras, and
Connect to a monitoring center.