TWI820430B - Device and method for detecting movement of objects in images - Google Patents
Device and method for detecting movement of objects in images Download PDFInfo
- Publication number
- TWI820430B TWI820430B TW110120646A TW110120646A TWI820430B TW I820430 B TWI820430 B TW I820430B TW 110120646 A TW110120646 A TW 110120646A TW 110120646 A TW110120646 A TW 110120646A TW I820430 B TWI820430 B TW I820430B
- Authority
- TW
- Taiwan
- Prior art keywords
- weight
- circuit
- background image
- image
- threshold
- Prior art date
Links
- 238000000034 method Methods 0.000 title claims abstract description 34
- 238000001514 detection method Methods 0.000 claims abstract description 40
- 238000002156 mixing Methods 0.000 claims abstract description 12
- 230000000877 morphologic effect Effects 0.000 claims description 2
- 238000010586 diagram Methods 0.000 description 10
- 238000012544 monitoring process Methods 0.000 description 3
- 230000000694 effects Effects 0.000 description 2
- 230000007812 deficiency Effects 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 230000035945 sensitivity Effects 0.000 description 1
Images
Landscapes
- Length Measuring Devices By Optical Means (AREA)
- Image Analysis (AREA)
Abstract
Description
本發明是關於影像處理,尤其是關於影像中物件移動的偵測方法與裝置。The present invention relates to image processing, and in particular to methods and devices for detecting movement of objects in images.
以安防監控系統來說,能夠準確偵測判斷影像中是否有物件移動是非常重要的功能。由於安防監控系統通常藉由比對目前的影像與先前的影像來找出移動物件,所以先前的影像的產生方式及移動物件的判斷方法大大地影響安防監控系統的效能及靈敏度。習知的安防監控系統常常因為未能對先前的影像做適當的處理,或是移動物件的判斷方法不夠準確,而造成誤判(誤發警報或漏發警報)。因此,有需要提出一種偵測影像中物件移動的方法與裝置,來提升安防監控系統的可靠度。For security surveillance systems, it is a very important function to accurately detect and determine whether objects in the image are moving. Since security surveillance systems usually find moving objects by comparing the current image with previous images, the way the previous images are generated and the method of judging moving objects greatly affect the performance and sensitivity of the security surveillance system. Conventional security monitoring systems often cause misjudgments (false alarms or missed alarms) because they fail to properly process previous images or the judgment method of moving objects is not accurate enough. Therefore, it is necessary to propose a method and device for detecting the movement of objects in images to improve the reliability of the security monitoring system.
本發明之一目的在於提供一種偵測影像中物件移動的裝置與方法,以改善先前技術的不足。One purpose of the present invention is to provide a device and method for detecting movement of objects in images to improve the deficiencies of the prior art.
本發明之一實施例提供一種偵測影像中物件移動的裝置,包含一權重決定電路、一影像混合電路以及一物件移動偵測電路。權重決定電路用來根據一輸入影像及一背景影像決定複數個權重,每一權重對應於一像素位置。影像混合電路耦接該權重決定電路,用來基於該些權重混合該輸入影像與該背景影像以產生一更新後的背景影像。物件移動偵測電路耦接該影像混合電路,用來逐區塊對該輸入影像與該背景影像或該更新後的背景影像進行一絕對偏差總和運算,並產生一移動物件指示資料,以及根據該移動物件指示資料及至少一閥值產生一物件移動訊號。每一區塊包含複數個像素。An embodiment of the present invention provides a device for detecting movement of objects in an image, including a weighting circuit, an image mixing circuit and an object movement detection circuit. The weight determination circuit is used to determine a plurality of weights based on an input image and a background image, and each weight corresponds to a pixel position. The image mixing circuit is coupled to the weight determination circuit and used to mix the input image and the background image based on the weights to generate an updated background image. The object motion detection circuit is coupled to the image mixing circuit and is used to perform an absolute deviation sum calculation on the input image and the background image or the updated background image block by block, and generate a moving object indication data, and according to the The moving object indication data and at least one threshold generate an object moving signal. Each block contains a plurality of pixels.
本發明之另一實施例提供一種偵測影像中物件移動的方法,包含:根據一輸入影像及一背景影像決定複數個權重,每一權重對應於一像素位置;基於該些權重混合該輸入影像與該背景影像以產生一更新後的背景影像;逐區塊對該輸入影像與該背景影像或該更新後的背景影像進行一絕對偏差總和運算,並產生一移動物件指示資料;以及根據該移動物件指示資料及至少一閥值產生一物件移動訊號。每一區塊包含複數個像素。Another embodiment of the present invention provides a method for detecting movement of objects in an image, including: determining a plurality of weights based on an input image and a background image, each weight corresponding to a pixel position; and mixing the input image based on the weights. and the background image to generate an updated background image; perform an absolute deviation sum calculation on the input image and the background image or the updated background image block by block, and generate a moving object indication data; and based on the movement The object indication data and at least one threshold generate an object movement signal. Each block contains a plurality of pixels.
有關本發明的特徵、實作與功效,茲配合圖式作實施例詳細說明如下。The features, implementation and effects of the present invention are described in detail below with reference to the drawings and examples.
以下說明內容之技術用語係參照本技術領域之習慣用語,如本說明書對部分用語有加以說明或定義,該部分用語之解釋係以本說明書之說明或定義為準。The technical terms used in the following description refer to the idioms in the technical field. If some terms are explained or defined in this specification, the explanation or definition of these terms shall prevail.
本發明之揭露內容包含偵測影像中物件移動的裝置與方法。由於本發明之偵測影像中物件移動的裝置所包含之部分元件單獨而言可能為已知元件,因此在不影響該裝置發明之充分揭露及可實施性的前提下,以下說明對於已知元件的細節將予以節略。此外,本發明之偵測影像中物件移動的方法的部分或全部流程可以是軟體及/或韌體之形式,並且可藉由本發明之偵測影像中物件移動的裝置或其等效裝置來執行,在不影響該方法發明之充分揭露及可實施性的前提下,以下方法發明之說明將著重於步驟內容而非硬體。The disclosure of the present invention includes an apparatus and method for detecting movement of objects in an image. Since some of the components included in the device for detecting movement of objects in images of the present invention may be known components individually, the following description of the known components will not affect the full disclosure and implementability of the device invention. details will be omitted. In addition, part or all of the process of the method for detecting movement of objects in images of the present invention may be in the form of software and/or firmware, and may be executed by the device for detecting movement of objects in images of the present invention or its equivalent device. , without affecting the full disclosure and implementability of the method invention, the following description of the method invention will focus on the step content rather than the hardware.
圖1為本發明偵測影像中物件移動的裝置之一實施例的功能方塊圖。偵測影像中物件移動的裝置100包含背景影像更新電路110、物件移動偵測電路120及儲存電路130。儲存電路130可以包含暫存器、隨機存取記憶體及/或緩衝器。背景影像更新電路110包含權重決定電路112及影像混合電路116。圖2是本發明偵測影像中物件移動的方法之一實施例的流程圖,包含以下步驟。FIG. 1 is a functional block diagram of an embodiment of a device for detecting movement of objects in an image according to the present invention. The
步驟S210:權重決定電路112根據輸入影像IM及背景影像BG決定複數個權重w(x,y)(「(x,y)」代表像素的坐標),每一權重對應於一像素位置。步驟S210的細節將在圖5詳細說明。Step S210: The
步驟S220:影像混合電路116逐像素基於該些權重混合背景影像BG與輸入影像IM以產生更新後的背景影像BG'。所產生的更新後的背景影像BG'存入儲存電路130中,將作為下一回合(當有新進的輸入影像IM時)的背景影像BG。更明確地說,影像混合電路116根據下式來產生更新後的背景影像BG'(
):
(1)
Step S220: The
其中,IM(x,y)是輸入影像IM在像素位置(x,y)的像素值,BG(x,y)是背景影像BG在像素位置(x,y)的像素值。在實作中,如果每個像素值以8位元表示,則IM(x,y)、BG(x,y)、w(x,y)及BG'(x,y)的數值皆介於0~255,且方程式(1)可以調整成方程式(2): (2) Among them, IM(x,y) is the pixel value of the input image IM at the pixel position (x,y), and BG(x,y) is the pixel value of the background image BG at the pixel position (x,y). In practice, if each pixel value is represented by 8 bits, the values of IM(x,y), BG(x,y), w(x,y) and BG'(x,y) are all between 0~255, and equation (1) can be adjusted to equation (2): (2)
其中,加上 再位移8個位元代表四捨五入運算。本技術領域具有通常知識者可以了解方程式(2)的實作細節,以及了解如何將方程式(1)應用於像素值不等於8位元的情況中,故不再贅述。 Among them, plus Shifting by another 8 bits represents the rounding operation. A person with ordinary knowledge in the art can understand the implementation details of equation (2) and how to apply equation (1) to the case where the pixel value is not equal to 8 bits, so the details will not be described again.
步驟S230:物件移動偵測電路120逐區塊對輸入影像及背景影像(可以是背景影像BG或更新後的背景影像BG')進行絕對偏差總和(sum of absolute difference, SAD)運算,並產生一移動物件指示資料。此步驟是以區塊為單位進行運算。請參閱圖3,圖3顯示輸入影像IM及背景影像BG(或更新後的背景影像BG')的示意圖。一個影像可以是一個畫面(picture)或一張圖幀(frame)。在圖3的例子中,一個影像包含64個像素((x,y),
,
)及16個區塊((m,n),
,
),一個區塊包含4個像素。也就是說,物件移動偵測電路120根據方程式(3)(背景影像為背景影像BG)或方程式(4)(背景影像為更新後的背景影像BG')對每一區塊進行SAD運算,因此共產生16個SAD值(SAD(m,n),
,
)。
(3)
(4)
Step S230: The object
其中,bs_x代表一個區塊在x軸上的像素個數,bs_y代表一個區塊在y軸上的像素個數,也就是說,一個區塊的大小為bs_x*bs_y。在圖3的例子中,bs_x=bs_y=2。Among them, bs_x represents the number of pixels of a block on the x-axis, and bs_y represents the number of pixels of a block on the y-axis. That is to say, the size of a block is bs_x*bs_y. In the example of Figure 3, bs_x=bs_y=2.
接著,物件移動偵測電路120根據影像中的所有SAD值與第一閥值sad_thd產生移動物件指示資料MOI。更明確地說,物件移動偵測電路120根據方程式(5)逐區塊比對SAD(m,n)及第一閥值sad_thd,來得到比較結果CR,所有區塊的比較結果CR形成移動物件指示資料MOI。
(5)
Then, the object
請參閱圖4A,圖4A顯示移動物件指示資料MOI的一個例子,其中區塊(2,1)、(3,1)、(2,2)、(3,2)及(2,3)的比較結果CR為1,代表影像中的該區域可能有移動物件。Please refer to Figure 4A. Figure 4A shows an example of the moving object indication data MOI, in which blocks (2,1), (3,1), (2,2), (3,2) and (2,3) The comparison result CR is 1, which means there may be moving objects in this area of the image.
步驟S240:物件移動偵測電路120根據移動物件指示資料MOI及至少一閥值產生一物件移動訊號Sig_alm。舉例來說,物件移動偵測電路120可以根據方程式(6)或方程式(7)來決定物件移動訊號Sig_alm的值。
(6)
(7)
Step S240: The object
其中,N_moi是比較結果CR為1的區塊個數(在圖4A的例子中,N_moi=5),alm_thd1及alm_thd2為閥值。在此,使用者可以利用設定閥值alm_thd1的大小來代表比較結果是具有顯著差異,這樣才代表有移動物件發生,而可以避免只是雜訊造成的偽陽性。進一步地,使用者可以利用設定閥值alm_thd2的大小來排除可能因為開關燈產生亮度大幅度變化而造成的錯誤訊息,以避免誤判。物件移動訊號Sig_alm為1代表物件移動偵測電路120偵測到輸入影像IM中有移動物件,且移動物件的特性(例如大小)符合使用者的設定條件。Among them, N_moi is the number of blocks with a comparison result CR of 1 (in the example of Figure 4A, N_moi=5), and alm_thd1 and alm_thd2 are thresholds. Here, the user can use the size of the set threshold alm_thd1 to indicate that the comparison results are significantly different. This means that a moving object has occurred, and false positives caused by noise can be avoided. Furthermore, the user can use the value of the set threshold alm_thd2 to exclude error messages that may be caused by large changes in brightness caused by switching lights to avoid misjudgments. The object movement signal Sig_alm is 1, which means that the object
圖5是步驟S210的一實施例的流程圖,包含步驟S510~S590。權重決定電路112計算對應於一個目標像素位置的兩個像素(一者為目標輸入像素,另一者為目標背景像素)的像素值絕對偏差(步驟S580),並且根據像素值絕對偏差及權重閥值w_thd來將該目標像素位置分類為A類(其權重w(x,y)為A類權重w_a)或B類(其權重w(x,y)為B類權重w_b)(步驟S590)。權重決定電路112根據其本身是否操作於權重調整模式(步驟S520)以及輸入影像IM是否更新(步驟S510)來決定是否調整A類權重w_a(步驟S530~S570)。請參閱圖3,目標像素位置是指一組(x,y)值(例如,圖3中黑色標記之像素位置(4,1)),目標輸入像素是輸入影像IM在該位置的像素(其像素值為IM(x,y),圖3所示之例子為IM(4,1)),而目標背景像素是背景影像BG在該位置的像素(其像素值為BG(x,y),圖3所示之例子為BG(4,1))。Figure 5 is a flowchart of an embodiment of step S210, including steps S510~S590. The
步驟S510~S590的細節如下。The details of steps S510~S590 are as follows.
步驟S510:權重決定電路112判斷輸入影像IM是否為新進的輸入影像。詳細來說,權重決定電路112藉由判斷當前輸入的像素資料是否屬於一新進的輸入影像,進而判斷當前輸入的像素資料是否對應到輸入影像IM的第一個像素。在一些實施例中,權重決定電路112藉由計數像素個數來得知是否已達前一個輸入影像IM的結尾及/或新的輸入影像IM的起始。如果步驟S510的結果為是(即,輸入影像已更新),權重決定電路112執行步驟S520;否則,權重決定電路112執行步驟S580。Step S510: The
步驟S520:權重決定電路112判斷背景影像更新電路110或其本身是否操作於權重調整模式。如果步驟S520的結果為是(即,在權重調整模式下),權重決定電路112根據預設值w_a_dft以及是否收到重置訊號w_rst來調整A類權重w_a(步驟S530~S570);否則,權重決定電路112執行步驟S570。Step S520: The
步驟S530:權重決定電路112判斷是否收到重置訊號w_rst。如果步驟S530的結果為是,權重決定電路112執行步驟S540;否則,權重決定電路112執行步驟S550。何時以及如何產生重置訊號w_rst將於下方配合圖10詳述。Step S530: The
步驟S540:權重決定電路112重置A類權重w_a為初始值w_a_ini,然後執行步驟S580。Step S540: The
步驟S550:權重決定電路112調整A類權重。例如,權重決定電路112每次執行步驟S550時,將A類權重w_a減去一個步進值(step value)。Step S550: The
步驟S560:權重決定電路112判斷調整後的A類權重w_a是否小於預設值w_a_dft。預設值w_a_dft可以儲存於儲存電路130。如果步驟S560的結果為是,則權重決定電路112執行步驟S570;否則,權重決定電路112執行步驟S580。Step S560: The
步驟S570:權重決定電路112以預設值w_a_dft作為A類權重w_a。Step S570: The
步驟S580:權重決定電路112計算目標輸入像素與目標背景像素之間的像素值絕對偏差Px_d(
)。
Step S580: The
步驟S590:權重決定電路112根據像素值絕對偏差Px_d及權重閥值w_thd選擇A類權重w_a或B類權重w_b作為對應於該目標像素位置之該權重w(x,y)。在一些實施例中,當像素值絕對偏差Px_d大於權重閥值w_thd時,目標像素位置被歸為A類,代表輸入影像IM及背景影像BG之間在目標像素位置的變化相對較大(可能是由移動物件造成);當像素值絕對偏差Px_d不大於權重閥值w_thd時,目標像素位置被歸為B類,代表輸入影像IM及背景影像BG之間在目標像素位置的變化相對較小。Step S590: The
在一些實施例中,預設值w_a_dft小於B類權重w_b。舉例來說,預設值w_a_dft可以是0.25(或是64,當像素值以8位元表示時),而B類權重w_b可以是0.5(或是128,當像素值以8位元表示時)。In some embodiments, the preset value w_a_dft is smaller than the class B weight w_b. For example, the default value w_a_dft can be 0.25 (or 64, when the pixel value is expressed in 8 bits), and the type B weight w_b can be 0.5 (or 128, when the pixel value is expressed in 8 bits) .
在一些情況中,當偵測影像中物件移動的裝置100啟動後的第一張輸入影像IM(將成為第一張背景影像BG)包含移動物件時,該第一張輸入影像IM在背景中的權重應該設為較低(即,新進的輸入影像IM的權重應該設為較高),以避免移動物件一直留存在背景中(可能會造成偵測影像中物件移動的裝置100誤判)。權重調整模式(即步驟S530~S570)的目的便是在處理上述的情況。步驟S540的初始值w_a_ini大於步驟S560及S570的預設值w_a_dft。舉例來說,初始值w_a_ini可以是128,而預設值w_a_dft可以是32;在此情況下,於偵測影像中物件移動的裝置100啟動或權重決定電路112收到重置訊號w_rst之後,權重決定電路112指定給A類像素位置的權重(即,A類權重w_a)最初會等於128(即初始值w_a_ini),然後漸漸變小,直到等於32(即預設值w_a_dft)。在另一實施例中,在權重調整模式開啟的情況下,對於裝置100啟動後的第一張輸入影像IM或收到重置訊號w_rst後的第一張輸入影像IM,A類權重w_a可以設定為初始值w_a_ini,之後每當更新一張輸入影像IM(即新進一張輸入影像IM),係以當前A類權重w_a扣除一固定數值(例如16)做為調整後的A類權重w_a,經過特定次數(例如6次)的調整後,A類權重w_a即維持固定不變。前面實施例中係以A類權重w_a逐漸變小來說明權重調整模式的操作,實施上亦可以逐漸增大B類權重w_b來達成相近的效果。整體而言,於偵測影像中物件移動的裝置100啟動或權重決定電路112收到重置訊號w_rst之後,在權重調整模式開啟的情況下,會具有一段時間由權重決定電路112調整A類權重w_a或B類權重w_b。In some cases, when the first input image IM (which will become the first background image BG) after the
圖6為物件移動偵測電路120之一實施例的功能方塊圖。物件移動偵測電路120包含計算電路610、比較電路620以及判斷電路630。圖7顯示步驟S230的子步驟S710及S720,以及顯示步驟S240的子步驟S730。FIG. 6 is a functional block diagram of an embodiment of the object
步驟S710:計算電路610逐區塊計算輸入影像IM與背景影像之間的絕對偏差總和SAD(m,n)。請參考方程式(3)或(4)以及步驟S230的說明。Step S710: The
步驟S720:比較電路620根據絕對偏差總和與第一閥值sad_thd產生移動物件指示資料MOI。請參考方程式(5)、圖4A以及相關的說明。Step S720: The
步驟S730:判斷電路630處理該移動物件指示資料以產生一統計值,並基於該統計值與第二閥值alm_thd1及/或第三閥值alm_thd2之比較結果產生物件移動訊號Sig_alm。更明確地說,判斷電路630統計移動物件指示資料MOI中比較結果CR為1的區塊個數。以圖4A為例,判斷電路630得到統計值為5。接著,判斷電路630將統計值與第二閥值alm_thd1做比較,或是將統計值與第二閥值alm_thd1及第三閥值alm_thd2做比較,細節請參考方程式(6)或(7)以及步驟S240的說明。Step S730: The
圖8為物件移動偵測電路120之另一實施例的功能方塊圖。物件移動偵測電路120包含計算電路610、比較電路620、判斷電路630、運算電路810、區域選取電路820以及燈光切換偵測電路830。圖9顯示步驟S240的子步驟S910~S930。FIG. 8 is a functional block diagram of another embodiment of the object
步驟S910:運算電路810對移動物件指示資料MOI進行形態學開啟運算(morphology opening operation)。形態學開啟運算除了可以使移動物件指示資料MOI的邊緣部分變得較為平滑之外,也可以去除移動物件指示資料MOI中較小的移動物件及/或使移動物件與移動物件之間的邊界更為明確。Step S910: The
步驟S920:區域選取電路820基於一感興趣的區域(Region Of Interest, ROI)選取移動物件指示資料MOI的一部分。更明確地說,區域選取電路820使用一遮罩來與移動物件指示資料MOI做交集,來取得移動物件指示資料MOI的一部分。舉例來說,請參閱圖4B,圖4B顯示遮罩的一實施例的示意圖。如圖4B所示,感興趣的區域以1表示(即,區塊(1,1)、區塊(2,1)、區塊(1,2)及區塊(2,2)的值為1,其他區塊的值為0);換言之,感興趣的區域為影像的中間部分。如圖4A及4B所示,區域選取電路820是以區塊為單位對移動物件指示資料MOI進行處理。Step S920: The
步驟S930:判斷電路630處理移動物件指示資料的該部分以產生一統計值,並基於該統計值與第二閥值alm_thd1及/或第三閥值alm_thd2之比較結果產生物件移動訊號Sig_alm。此步驟與步驟S730類似,差別在於判斷電路630在步驟S930中只處理移動物件指示資料MOI中對應於感興趣的區域的部分。Step S930: The
燈光切換偵測電路830將配合圖10做說明。圖10為本發明偵測影像之燈光切換之一實施例的流程圖,包含以下步驟。The light
步驟S1010:燈光切換偵測電路830基於該些絕對偏差總和(即,SAD(m,n))計算當前的燈光切換指示值LSD(LSD(q)),如方程式(8)所示。
(8)
Step S1010: The light
其中,bn_x為x軸上的區塊個數,bn_y為y軸上的區塊個數。對圖4A的例子而言,bn_x=bn_y=4。在一些實施例中,k=1代表區塊(0,0)、k=2代表區塊(1,0)、k=3代表區塊(2,0)、k=4代表區塊(3,0)、k=5代表區塊(0,1),以此類推。Among them, bn_x is the number of blocks on the x-axis, and bn_y is the number of blocks on the y-axis. For the example of Figure 4A, bn_x=bn_y=4. In some embodiments, k=1 represents block (0,0), k=2 represents block (1,0), k=3 represents block (2,0), and k=4 represents block (3 ,0), k=5 represents block (0,1), and so on.
步驟S1020:於產生LSD(q)之後,燈光切換偵測電路830將LSD(q)儲存至儲存電路130。Step S1020: After generating LSD(q), the light switching
步驟S1030:燈光切換偵測電路830比較當前的燈光切換指示值(LSD(q))與前次的燈光切換指示值(LSD(q-1),儲存於儲存電路130中)來產生燈光切換指示訊號L_ind。更明確地說,燈光切換偵測電路830根據方程式(9)來決定燈光切換指示訊號L_ind,其中lsd_thd為閥值。
(9)
Step S1030: The light
由方程式(8)可知,燈光切換指示值LSD代表一個影像的全域(即,整個影像)SAD。當影像中的燈光突然發生明顯的變化時(例如,受監控區域的燈光開啟/關閉),LSD(q)與LSD(q-1)之間會有較大的差異。換言之,燈光切換指示訊號L_ind的其中一種用途是指示燈光的開啟/關閉。It can be seen from equation (8) that the light switching indication value LSD represents the global SAD of an image (ie, the entire image). When the light in the image suddenly changes significantly (for example, the lights in the monitored area are turned on/off), there will be a large difference between LSD(q) and LSD(q-1). In other words, one of the uses of the light switching indication signal L_ind is to indicate the on/off of the light.
請參閱圖8,判斷電路630可以更依據燈光切換指示訊號L_ind來決定是否發出物件移動訊號Sig_alm。在一些實施例中,當燈光切換指示訊號L_ind為1時,判斷電路630不發出物件移動訊號Sig_alm或是使物件移動訊號Sig_alm等於0,以避免將燈光切換誤認為有移動物件。Referring to FIG. 8 , the
在一些實施例中,燈光切換指示訊號L_ind可以作為或是用以產生前述的重置訊號w_rst。也就是說,當燈光切換時,權重決定電路112重置A類權重w_a(步驟S540)。In some embodiments, the light switching indication signal L_ind can be used as or used to generate the aforementioned reset signal w_rst. That is, when the light is switched, the
在一些實施例中,燈光切換指示訊號L_ind亦可用以重設背景影像BG。詳細來說,當燈光切換時,裝置100基於燈光切換偵測電路830所產生的燈光切換指示訊號L_ind刪除儲存電路130中的背景影像BG(即,刪除歷史背景影像),並可重置系統中對應輸入影像IM的計數值,以使裝置100以目前的輸入影像IM作為第一張背景影像BG(即,類似於重新啟動)。刪除歷史背景影像可以避免裝置100因為燈光切換而造成誤判。In some embodiments, the light switching indication signal L_ind can also be used to reset the background image BG. Specifically, when the light is switched, the
在一些實施例中,前述的方程式(8)可以修飾為方程式(10),以減小數據量(降低儲存電路130的用量),其中 。 (10) In some embodiments, the aforementioned equation (8) can be modified into equation (10) to reduce the amount of data (reduce the usage of the storage circuit 130), where . (10)
本技術領域具有通常知識者可以根據以上的揭露內容來設計判斷電路630、運算電路810及燈光切換偵測電路830,也就是說,判斷電路630、運算電路810及燈光切換偵測電路830可以是特殊應用積體電路(Application Specific Integrated Circuit, ASIC)或是由可程式化邏輯裝置(Programmable Logic Device, PLD)等電路或硬體實作。Those with ordinary skill in the art can design the
本發明之偵測影像中物件移動的裝置與方法對影像做逐像素的運算來更新背景影像,以及對影像做逐區塊的運算來判斷是否有移動物件。相較於傳統技術,本發明較不會造成誤判。此外,隨著時間調整權重可以使實作本發明之安防監控系統有更高的可靠度。The device and method for detecting movement of objects in an image of the present invention perform pixel-by-pixel operations on the image to update the background image, and perform block-by-block operations on the image to determine whether there are moving objects. Compared with traditional technology, the present invention is less likely to cause misjudgment. In addition, adjusting the weights over time can make the security monitoring system implementing the present invention have higher reliability.
在一些實施例中,前揭的流程圖中所提及的步驟可依實際操作調整其前後順序,甚至可同時或部分同時執行。In some embodiments, the order of the steps mentioned in the above-mentioned flow chart can be adjusted according to the actual operation, and can even be executed simultaneously or partially simultaneously.
雖然本發明之實施例如上所述,然而該些實施例並非用來限定本發明,本技術領域具有通常知識者可依據本發明之明示或隱含之內容對本發明之技術特徵施以變化,凡此種種變化均可能屬於本發明所尋求之專利保護範疇,換言之,本發明之專利保護範圍須視本說明書之申請專利範圍所界定者為準。Although the embodiments of the present invention are described above, these embodiments are not intended to limit the present invention. Those skilled in the art may make changes to the technical features of the present invention based on the explicit or implicit contents of the present invention. All these changes may fall within the scope of patent protection sought by the present invention. In other words, the patent protection scope of the present invention must be determined by the patent application scope of this specification.
100:偵測影像中物件移動的裝置 110:背景影像更新電路 112:權重決定電路 116:影像混合電路 120:物件移動偵測電路 130:儲存電路 IM:輸入影像 BG:背景影像 BG':更新後的背景影像 SAD(m,n):SAD值 sad_thd:第一閥值 MOI:移動物件指示資料 CR:比較結果 Sig_alm:物件移動訊號 w_thd:權重閥值 w_a:A類權重 w_a_dft:預設值 w_a_ini:初始值 w_b:B類權重 w_rst:重置訊號 610:計算電路 620:比較電路 630:判斷電路 alm_thd1:第二閥值 alm_thd2:第三閥值 810:運算電路 820:區域選取電路 830:燈光切換偵測電路 LSD(q),LSD(q-1):燈光切換指示值 lsd_thd:閥值 L_ind:燈光切換指示訊號 S210,S220,S230,S240,S510,S520,S530,S540,S550,S560,S570,S580,S590,S710,S720,S730,S910,S920,S930,S1010,S1020,S1030:步驟 100: Device for detecting movement of objects in images 110: Background image update circuit 112: Weight decision circuit 116:Image hybrid circuit 120: Object motion detection circuit 130:Storage circuit IM: input image BG: background image BG':Updated background image SAD(m,n):SAD value sad_thd: first threshold MOI: moving object indication data CR: comparison result Sig_alm: object movement signal w_thd: weight threshold w_a: Class A weight w_a_dft:Default value w_a_ini: initial value w_b: Class B weight w_rst: reset signal 610: Calculation circuit 620: Comparison circuit 630: Judgment circuit alm_thd1: second threshold alm_thd2: third threshold 810: Arithmetic circuit 820: Area selection circuit 830: Light switching detection circuit LSD(q), LSD(q-1): light switching indication value lsd_thd:threshold L_ind: light switching indicator signal step
圖1為本發明偵測影像中物件移動的裝置之一實施例的功能方塊圖;
圖2是本發明偵測影像中物件移動的方法之一實施例的流程圖;
圖3顯示輸入影像IM及背景影像BG(或更新後的背景影像BG')的示意圖;
圖4A顯示移動物件指示資料MOI的一個例子;
圖4B顯示遮罩的一實施例的示意圖;
圖5是圖2之步驟S210的一實施例的流程圖;
圖6為物件移動偵測電路120之一實施例的功能方塊圖;
圖7顯示步驟S230的子步驟,以及步驟S240的子步驟;
圖8為物件移動偵測電路120之另一實施例的功能方塊圖;
圖9顯示步驟S240的子步驟;以及
圖10為本發明偵測影像之燈光切換之一實施例的流程圖。
Figure 1 is a functional block diagram of an embodiment of a device for detecting movement of objects in an image according to the present invention;
Figure 2 is a flow chart of one embodiment of a method for detecting movement of objects in an image according to the present invention;
Figure 3 shows a schematic diagram of the input image IM and the background image BG (or the updated background image BG');
Figure 4A shows an example of moving object indication data MOI;
Figure 4B shows a schematic diagram of an embodiment of the mask;
Figure 5 is a flow chart of an embodiment of step S210 in Figure 2;
Figure 6 is a functional block diagram of an embodiment of the object
100:偵測影像中物件移動的裝置 100: Device for detecting movement of objects in images
110:背景影像更新電路 110: Background image update circuit
112:權重決定電路 112: Weight determination circuit
116:影像混合電路 116:Image hybrid circuit
120:物件移動偵測電路 120: Object motion detection circuit
130:儲存電路 130:Storage circuit
BG:背景影像 BG: background image
BG':更新後的背景影像 BG':Updated background image
IM:輸入影像 IM: input image
Sig_alm:物件移動訊號 Sig_alm: object movement signal
w_a_dft:預設值 w_a_dft:Default value
w_a_ini:初始值 w_a_ini: initial value
w_b:B類權重 w_b: Class B weight
w_rst:重置訊號 w_rst: reset signal
w_thd:權重閥值 w_thd: weight threshold
Claims (18)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
TW110120646A TWI820430B (en) | 2021-06-07 | 2021-06-07 | Device and method for detecting movement of objects in images |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
TW110120646A TWI820430B (en) | 2021-06-07 | 2021-06-07 | Device and method for detecting movement of objects in images |
Publications (2)
Publication Number | Publication Date |
---|---|
TW202249474A TW202249474A (en) | 2022-12-16 |
TWI820430B true TWI820430B (en) | 2023-11-01 |
Family
ID=85793628
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
TW110120646A TWI820430B (en) | 2021-06-07 | 2021-06-07 | Device and method for detecting movement of objects in images |
Country Status (1)
Country | Link |
---|---|
TW (1) | TWI820430B (en) |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20090161911A1 (en) * | 2007-12-21 | 2009-06-25 | Ming-Yu Shih | Moving Object Detection Apparatus And Method |
US20120093361A1 (en) * | 2010-10-13 | 2012-04-19 | Industrial Technology Research Institute | Tracking system and method for regions of interest and computer program product thereof |
TW201416644A (en) * | 2012-10-31 | 2014-05-01 | Pixart Imaging Inc | Detection system |
TW201521425A (en) * | 2013-11-27 | 2015-06-01 | Taiwan Secom Co Ltd | Detecting method for abnormal camera images |
US20200250836A1 (en) * | 2019-02-01 | 2020-08-06 | Sony Corporation | Moving object detection in image frames based on optical flow maps |
-
2021
- 2021-06-07 TW TW110120646A patent/TWI820430B/en active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20090161911A1 (en) * | 2007-12-21 | 2009-06-25 | Ming-Yu Shih | Moving Object Detection Apparatus And Method |
US20120093361A1 (en) * | 2010-10-13 | 2012-04-19 | Industrial Technology Research Institute | Tracking system and method for regions of interest and computer program product thereof |
TW201416644A (en) * | 2012-10-31 | 2014-05-01 | Pixart Imaging Inc | Detection system |
TW201521425A (en) * | 2013-11-27 | 2015-06-01 | Taiwan Secom Co Ltd | Detecting method for abnormal camera images |
US20200250836A1 (en) * | 2019-02-01 | 2020-08-06 | Sony Corporation | Moving object detection in image frames based on optical flow maps |
Also Published As
Publication number | Publication date |
---|---|
TW202249474A (en) | 2022-12-16 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
TWI504248B (en) | Image processing apparatus and image processing method | |
US8270756B2 (en) | Method for estimating noise | |
US20080118163A1 (en) | Methods and apparatuses for motion detection | |
US20120019667A1 (en) | Method and device for adaptive noise measurement of a video signal | |
WO2017206444A1 (en) | Method and device for detecting imaging difference, and computer storage medium | |
TWI323605B (en) | Apparatus and method for reducing temporal noise | |
TWI557691B (en) | Monitoring Camera Device and Related Region-based Motion Detection Method | |
JP5676956B2 (en) | Image processing apparatus, image processing method, and program | |
CN107784281B (en) | Method for detecting human face, device, equipment and computer-readable medium | |
US10469812B2 (en) | Projection display system, information processing apparatus, information processing method, and storage medium therefor | |
WO2019120018A1 (en) | Photograph processing method and apparatus, and storage medium and electronic device | |
KR20100026499A (en) | Digital photographing apparatus, method for controlling the same, and recording medium storing program to implement the method | |
JP4732068B2 (en) | Pull-down detection apparatus and pull-down detection method | |
TWI820430B (en) | Device and method for detecting movement of objects in images | |
US10965858B2 (en) | Image processing apparatus, control method thereof, and non-transitory computer-readable storage medium for detecting moving object in captured image | |
JP2006237695A (en) | Pull-down detection apparatus and pull-down detection method | |
CN113542531B (en) | Device and method for detecting object movement in image | |
WO2024001345A1 (en) | Image processing method, electronic device, and computer storage medium | |
JP7251425B2 (en) | Attached matter detection device and attached matter detection method | |
CN112351271A (en) | Camera shielding detection method and device, storage medium and electronic equipment | |
TWI404408B (en) | Image processing apparatus and image processing method | |
US20190098216A1 (en) | Image processing method, image processing apparatus, imaging apparatus, and storage medium | |
TWI441516B (en) | Image processing apparatus and method thereof | |
CN111754410B (en) | Image processing method and device, electronic equipment and readable storage medium | |
US10015521B2 (en) | Error detection in a motion estimation system |