TWI479432B - Abnormal detection method for a video camera - Google Patents

Abnormal detection method for a video camera Download PDF

Info

Publication number
TWI479432B
TWI479432B TW101137302A TW101137302A TWI479432B TW I479432 B TWI479432 B TW I479432B TW 101137302 A TW101137302 A TW 101137302A TW 101137302 A TW101137302 A TW 101137302A TW I479432 B TWI479432 B TW I479432B
Authority
TW
Taiwan
Prior art keywords
camera
captured image
model
shooting mode
abnormality
Prior art date
Application number
TW101137302A
Other languages
Chinese (zh)
Other versions
TW201415381A (en
Inventor
Shen Chi Chen
Jen Chi Wu
Hung Su
Original Assignee
Taiwan Secom 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 Taiwan Secom Co Ltd filed Critical Taiwan Secom Co Ltd
Priority to TW101137302A priority Critical patent/TWI479432B/en
Publication of TW201415381A publication Critical patent/TW201415381A/en
Application granted granted Critical
Publication of TWI479432B publication Critical patent/TWI479432B/en

Links

Landscapes

  • Closed-Circuit Television Systems (AREA)
  • Image Analysis (AREA)

Description

攝影機的異常偵測方法Camera anomaly detection method

本發明與監視攝影系統有關,特別是一種攝影機的異常偵測方法。The invention relates to a surveillance photography system, and more particularly to a camera anomaly detection method.

目前市面上的監視攝影系統,可擷取監視場景之影像,並同步地顯示於顯示器,以供人員即時由顯示器觀看一個或多個場景之影像。監視攝影系統所擷取之影像可以進一步記錄於錄影帶或電腦硬碟等儲存媒體,以在特定事件(如竊盜事件)發生之後,重新播放該影像以確認事件發生過程。At present, the surveillance photography system on the market can capture images of the surveillance scene and display them synchronously on the display, so that the person can immediately view the image of one or more scenes by the display. The image captured by the surveillance camera system can be further recorded on a storage medium such as a video tape or a computer hard disk to replay the image after a specific event (such as a theft event) to confirm the event.

然而,為了避免宵小在為犯罪行為之前先對攝影機施以斷線/轉向/失焦/噴漆/以物遮蔽等手法,造成監視系統錄下無效的影像。現有防範方式之一是對攝影機加裝偵測回路,以偵測攝影機是否與監視系統之間保持連線。但此偵測回路只能達成攝影機與錄影機之影像傳輸線遭剪斷的警示。However, in order to avoid being small, the camera was given a broken line/steering/defocus/painting/shadowing before the crime was committed, causing the surveillance system to record an invalid image. One of the existing prevention methods is to install a detection loop on the camera to detect whether the camera is connected to the monitoring system. However, this detection loop can only achieve the warning that the image transmission line of the camera and the video recorder is cut.

為了偵測攝影機是否被轉向,另一種防範方式是將位移感應器(如三軸陀螺儀或三軸加速規)裝設於攝影機,藉由位移感應器偵測攝影機是否有位移的情形。然而,此種方法只能支援攝影機轉向,若攝影機遭受遮蔽、失焦等情況,此方法將無法偵測出此異常狀態。In order to detect whether the camera is turned or not, another prevention method is to install a displacement sensor (such as a three-axis gyroscope or a three-axis accelerometer) on the camera, and the displacement sensor detects whether the camera has displacement. However, this method can only support camera steering. If the camera is blocked or out of focus, this method will not detect this abnormal state.

因此,還有一種防範方式是針對攝影機所擷取的影像與背景 基圖進行比對,偵測是否攝影機有遮蔽、失焦等異常事件發生。然而,當環境燈光或光線有重大改變時(如瞬間關燈或開燈),為避免偵測錯誤而發生誤報,需由人員手動設定新的背景模型樣本,這樣不便的流程將對人員產生額外的負擔,使得影像偵測無實質效益。Therefore, there is also a way to prevent images and backgrounds captured by the camera. The base map is compared to detect whether the camera has an abnormal event such as shadowing or out-of-focus. However, when there is a major change in ambient light or light (such as turning off the lights or turning on the lights), in order to avoid false positives caused by detection errors, it is necessary for the personnel to manually set a new background model sample, so that the inconvenient process will generate additional personnel. The burden of making images has no real benefit.

鑒於以上的問題,本發明提供一種攝影機的異常偵測方法,藉以解決先前技術所存在針對光線變化人員需手動設定新的背景模型樣本的問題。In view of the above problems, the present invention provides a camera anomaly detection method, which solves the problem that the prior art has to manually set a new background model sample for a light change person.

本發明之一實施例提供一種攝影機的異常偵測方法。其中,攝影機具有一日間拍攝模式及一夜間拍攝模式。異常偵測方法包含:取得該攝影機所拍攝的一擷取影像;偵測該擷取影像的色彩飽和度;當該擷取影像的色彩飽和度低於一第一門檻值時,判定該攝影機進入夜間拍攝模式或日間拍攝模式;根據該攝影機的拍攝模式選擇對應的一背景模型;及根據該背景模型判定該擷取影像是否異常。An embodiment of the present invention provides a method for detecting an abnormality of a camera. Among them, the camera has a daytime shooting mode and a nighttime shooting mode. The abnormality detecting method comprises: obtaining a captured image captured by the camera; detecting a color saturation of the captured image; determining that the camera enters when the color saturation of the captured image is lower than a first threshold a night shooting mode or a daytime shooting mode; selecting a corresponding background model according to the shooting mode of the camera; and determining whether the captured image is abnormal according to the background model.

根據本發明之攝影機的異常偵測方法,可結合邊緣特徵及場景結構,做為偵測異常事件的背景模型(即邊緣特徵模型與場景結構模型)。由於邊緣特徵在不同光源下具有強健性,即使在低光源環境下,透過紅外線影像仍可保有邊緣特徵,因此本發明之攝影機的異常偵測方法可適用於任何光強度的環境,並可抵抗劇烈 光線變化,避免誤報情形。再者,本發明之攝影機的異常偵測方法進一步根據邊緣特徵模型與場景結構模型分析異常事件的類型,而可區分出失焦事件、遮蔽事件、轉向事件及震動事件(微幅轉向)等。According to the abnormality detecting method of the camera of the present invention, the edge feature and the scene structure can be combined as a background model for detecting an abnormal event (ie, an edge feature model and a scene structure model). Since the edge features are robust under different light sources, the edge features can be preserved through the infrared image even in a low light source environment. Therefore, the abnormality detecting method of the camera of the present invention can be applied to any light intensity environment and can resist severe Light changes to avoid false positives. Furthermore, the abnormality detecting method of the camera of the present invention further analyzes the types of abnormal events according to the edge feature model and the scene structure model, and can distinguish out of the out-of-focus event, the shadowing event, the steering event, and the shock event (micro-turn).

第1圖為根據本發明一實施例之監視攝影系統100的架構示意圖。1 is a block diagram showing the structure of a surveillance photography system 100 in accordance with an embodiment of the present invention.

如第1圖所示,監視攝影系統100可包含監視主機110、攝影機130、錄影機150及顯示器170。監視主機110實質可為電腦主機(如基於x86架構之電腦系統)或嵌入式主機(如基於ARM、SoC或DSP架構之嵌入式系統),用以運行一影像分析軟體,並可接收來自攝影機130及錄影機150的影像訊號,而將此些影像訊號輸出至顯示器170顯示。As shown in FIG. 1, the surveillance camera system 100 can include a monitoring host 110, a camera 130, a video recorder 150, and a display 170. The monitoring host 110 can be substantially a computer host (such as an x86-based computer system) or an embedded host (such as an embedded system based on an ARM, SoC or DSP architecture) for running an image analysis software and can receive images from the camera 130. And the video signals of the video recorder 150, and the video signals are output to the display 170 for display.

攝影機130可設置於監視區域而朝特定方向攝影,視使用需求可設置一個或多個攝影機130。於此,攝影機130可為數位式攝影機,而可經由監視主機110的影像擷取卡或網路卡等介面與監視主機110訊號連接,使監視主機110可接收攝影機130拍攝的影像,並於顯示器170顯示擷取影像。攝影機130亦可為類比式攝影機,將擷取的影像以類比訊號方式輸出至錄影機150(如經由同軸電纜線訊號連接於攝影機130與錄影機150之間)。錄影機150可為數位視訊錄放影機(Digital video recorder,DVR),用以即時 備份所連接的攝影機130的擷取影像,並將此擷取影像進一步轉換為數位訊號後傳送至監視主機110以於顯示器170顯示。顯示器170可為陰極射線管顯示器或液晶顯示器等。The camera 130 can be placed in the surveillance area and photographed in a specific direction, and one or more cameras 130 can be provided depending on the needs of use. The camera 130 can be a digital camera, and can be connected to the monitoring host 110 via an interface such as an image capture card or a network card of the monitoring host 110, so that the monitoring host 110 can receive the image captured by the camera 130 and display the image on the display. 170 shows the captured image. The camera 130 can also be an analog camera, and the captured image is output to the video recorder 150 by analog signal (for example, connected between the camera 130 and the video recorder 150 via a coaxial cable signal). The video recorder 150 can be a digital video recorder (DVR) for instant use. The captured image of the connected camera 130 is backed up, and the captured image is further converted into a digital signal and transmitted to the monitoring host 110 for display on the display 170. The display 170 can be a cathode ray tube display or a liquid crystal display or the like.

於此,本發明實施例所指之攝影機130可為紅外線攝影機,係具有紅外線攝影功能。透過紅外線攝影功能的啟用與否,可獲得紅外線攝影影像或彩色攝影影像。並且,攝影機130具有光偵測器,可偵測環境光強度,以於環境亮度不足時,自動啟用紅外線攝影功能,藉以克服亮度不足造成擷取影像不清晰的問題。Here, the camera 130 referred to in the embodiment of the present invention may be an infrared camera and has an infrared photography function. Infrared photographic images or color photographic images can be obtained by enabling the infrared photography function. Moreover, the camera 130 has a photodetector that can detect the ambient light intensity to automatically enable the infrared photography function when the ambient brightness is insufficient, thereby overcoming the problem that the captured image is unclear due to insufficient brightness.

換言之,本發明實施例所指之攝影機130具有日間拍攝模式及夜間拍攝模式,於日間拍攝模式可擷取彩色影像,當進入夜間拍攝模式時,攝影機130將開啟其內的紅外線裝置而拍攝紅外線影像。In other words, the camera 130 according to the embodiment of the present invention has a daytime shooting mode and a nighttime shooting mode, and can capture color images in the daytime shooting mode. When entering the nighttime shooting mode, the camera 130 will turn on the infrared device therein to shoot infrared images. .

第2圖為根據本發明一實施例之攝影機130的異常偵測方法流程圖。藉由監視主機110運行的影像分析軟體及攝影機130,執行第2圖所示的攝影機130的異常偵測方法。FIG. 2 is a flow chart of an abnormality detecting method of the camera 130 according to an embodiment of the invention. The image detecting software run by the host 110 and the camera 130 are executed to execute the abnormality detecting method of the camera 130 shown in FIG.

請參照第2圖。首先,取得攝影機130所拍攝的擷取影像(步驟S210)。接著,偵測擷取影像的色彩飽和度(步驟S220)。當擷取影像的色彩飽和度低於第一門檻值時,判定攝影機130進入夜間拍攝模式或日間拍攝模式(步驟S230)。續而,根據攝影機130的拍攝模式選擇對應的背景模型(步驟S240)。若攝影機130處於日間拍攝模式,則選擇對應日間拍攝模式的背景模型;若攝影機130處於夜間拍攝模式,則選擇對應夜間拍攝模式的背景模 型。最後,根據所選擇的背景模型判定擷取影像是否異常(步驟S250),即可知悉攝影機130是否異常。Please refer to Figure 2. First, the captured image captured by the camera 130 is acquired (step S210). Next, the color saturation of the captured image is detected (step S220). When the color saturation of the captured image is lower than the first threshold, it is determined that the camera 130 enters the night shooting mode or the day shooting mode (step S230). Continuing, the corresponding background model is selected in accordance with the shooting mode of the camera 130 (step S240). If the camera 130 is in the daytime shooting mode, the background model corresponding to the daytime shooting mode is selected; if the camera 130 is in the nighttime shooting mode, the background mode corresponding to the nighttime shooting mode is selected. type. Finally, it is determined whether the captured image is abnormal according to the selected background model (step S250), and it is known whether the camera 130 is abnormal.

於此,如前所述,攝影機130可為紅外線攝影機,而可自動偵測環境光強度。當攝影機130於日間拍攝模式偵測到環境光強度低於第二門檻值(如10勒克司(Lux))時,攝影機130自動切換至紅外線攝影模式(即夜間拍攝模式),以取得為紅外線影像的擷取影像。反之,則自夜間拍攝模式切換至日間拍攝模式。Here, as described above, the camera 130 can be an infrared camera, and can automatically detect the ambient light intensity. When the camera 130 detects that the ambient light intensity is lower than the second threshold value (such as 10 lux) in the daytime shooting mode, the camera 130 automatically switches to the infrared photography mode (ie, the night shooting mode) to obtain the infrared image. Capture images. Conversely, the night shooting mode is switched to the day shooting mode.

也就是說,當監視區域光線不足時(如關燈時),攝影機130切換至紅外線攝影模式,攝影機130的擷取影像因此為紅外線影像,擷取影像的色彩飽和度也隨之降低。為了進一步區別攝影機日間與夜間之切換或鏡頭失焦、遮蔽等異常事件,除了色彩飽和度必須低於第一門檻值,場景結構與邊緣資訊也需要符合特定條件,才能正確區分攝影機日間與夜間之切換或鏡頭失焦、遮蔽等異常事件。That is to say, when the light in the surveillance area is insufficient (such as when the light is turned off), the camera 130 switches to the infrared photography mode, and the captured image of the camera 130 is therefore an infrared image, and the color saturation of the captured image is also reduced. In order to further distinguish between camera daytime and nighttime switching or lens out of focus, shadowing and other anomalous events, in addition to the color saturation must be lower than the first threshold, the scene structure and edge information also need to meet certain conditions, in order to correctly distinguish the camera day and night Switch or lens out of focus, shadowing and other abnormal events.

在一些實施例中,前述步驟S240可包含下列步驟:首先,根據攝影機130分別於日間拍攝模式或夜間拍攝模式所拍攝的背景影像,建立背景模型。接著,當攝影機130進入日間拍攝模式時,選擇對應日間拍攝模式的背景模型;當攝影機130進入夜間拍攝模式時,選擇對應夜間拍攝模式的背景模型。In some embodiments, the foregoing step S240 may include the following steps: First, the background model is established according to the background image captured by the camera 130 in the daytime shooting mode or the nighttime shooting mode, respectively. Next, when the camera 130 enters the daytime shooting mode, the background model corresponding to the daytime shooting mode is selected; when the camera 130 enters the nighttime shooting mode, the background model corresponding to the nighttime shooting mode is selected.

第3圖為根據本發明一實施例之攝影機130的異常偵測方法之初始化流程圖。在執行本實施例之攝影機130的異常偵測方法之初(即在步驟S210與步驟S220之間),需先利用邊緣資訊建立 場景結構模型並採用混合式高斯模型(Gaussian mixture model)建立邊緣特徵模型,如第3圖所示,其步驟包含: 步驟S301:於攝影機130擷取的一背景影像(即背景場景影像)中平均選取複數取樣點410,以此些取樣點410的邊緣強度建立各取樣點410之混合式高斯模型成為邊緣特徵模型,如第4A圖所示。第4A圖為根據本發明一實施例之邊緣特徵模型的示意圖。第4A圖所示之取樣點410數量及分布僅為示意,本發明之實施例非以此為限。混合式高斯模型僅更新平均選取之取樣點410,藉此可減少運算量,而可加速獲得運算結果。FIG. 3 is an initialization flow chart of the abnormality detecting method of the camera 130 according to an embodiment of the present invention. At the beginning of the abnormality detecting method of the camera 130 of the embodiment (ie, between step S210 and step S220), the edge information needs to be established first. The scene structure model and the hybrid Gaussian mixture model are used to establish the edge feature model. As shown in Figure 3, the steps include: Step S301: The plurality of sample points 410 are selected on a background image captured by the camera 130 (ie, the background scene image), and the mixed Gaussian model of each sample point 410 is established as the edge feature model by using the edge intensity of the sample points 410. As shown in Figure 4A. 4A is a schematic diagram of an edge feature model in accordance with an embodiment of the present invention. The number and distribution of the sampling points 410 shown in FIG. 4A are only schematic, and the embodiment of the present invention is not limited thereto. The hybrid Gaussian model only updates the average selected sampling point 410, thereby reducing the amount of computation and accelerating the computational results.

於此,取樣點410的邊緣強度的偵測可以使用索貝爾(Sobel)影像邊緣偵測法實現,但本發明之實施例非以此為限,亦可由其他邊緣偵測法(如Robert算子、Prewitt算子或Laplacian算子等)實現。在執行影像邊緣偵測法之後,還可對背景影像中各點之邊緣強度進行二值化(如Otsu演算法)演算,以判定哪些取樣點410屬於邊緣點。也就是說,經由二值化,可將該些取樣點410中邊緣強度大於特定值的點視為邊緣點。Herein, the detection of the edge intensity of the sampling point 410 can be implemented by using the Sobel image edge detection method, but the embodiment of the present invention is not limited thereto, and may be other edge detection methods (such as the Robert operator). , Prewitt operator or Laplacian operator, etc.). After performing the image edge detection method, the edge intensity of each point in the background image may be binarized (such as Otsu algorithm) to determine which sample points 410 belong to the edge point. That is to say, via binarization, points in the sample points 410 where the edge intensity is greater than a specific value may be regarded as edge points.

步驟S302:將背景影像400切割為二維分佈的複數場景區塊420而形成一場景結構模型,其中各場景區塊420與鄰近的場景區塊420部分重疊,如第4B圖所示。第4B圖為根據本發明一實施例之場景結構模型的示意圖。背景影像可分割為m×n個場景區塊420(m、n為正整數),第4B圖所示之場景區塊420數量僅為示意,本發明之實施例非以此為限。於此,由於相鄰的場景區塊420 彼此部分重疊,因此可減低攝影機130晃動所造成的誤報。Step S302: The background image 400 is cut into two-dimensionally distributed complex scene blocks 420 to form a scene structure model, wherein each scene block 420 partially overlaps with the adjacent scene block 420, as shown in FIG. 4B. 4B is a schematic diagram of a scene structure model in accordance with an embodiment of the present invention. The background image can be divided into m×n scene blocks 420 (m, n are positive integers), and the number of scene blocks 420 shown in FIG. 4B is only illustrative, and the embodiment of the present invention is not limited thereto. Here, due to the adjacent scene block 420 They overlap partially with each other, so that false alarms caused by shaking of the camera 130 can be reduced.

將背景影像400切割為複數個場景區塊420之後,可進一步建立各場景區塊420的區域性特徵,區域性特徵可為此場景區塊420中的邊緣分布與數量,利用場景區塊420的區域性特徵可組成前述的場景結構模型。After the background image 400 is cut into a plurality of scene blocks 420, the regional features of each scene block 420 may be further established. The regional features may be the edge distribution and number in the scene block 420, and the scene block 420 is utilized. The regional features may constitute the aforementioned scene structure model.

步驟S303:合併邊緣特徵模型及場景結構模型為背景模型。也就是說,背景模型包含前述的邊緣特徵模型及場景結構模型。意即,背景模型係以自背景影像400中選取複數取樣點410的邊緣特徵及將背景影像400切割為複數場景區塊420所建立而成,藉以透過邊緣特徵及場景區塊420辨別異常事件為攝影機轉向、受遮蔽、失焦等情形。Step S303: Combine the edge feature model and the scene structure model into a background model. That is to say, the background model includes the aforementioned edge feature model and scene structure model. That is, the background model is formed by selecting the edge feature of the plurality of sample points 410 from the background image 400 and cutting the background image 400 into the plurality of scene blocks 420, thereby identifying the abnormal event through the edge feature and the scene block 420. The camera is turned, blocked, out of focus, etc.

參照第5A圖,係為根據本發明一實施例之影像分析軟體500的架構示意圖。影像分析軟體500可包含影像擷取模組510、光變化偵測模組530、攝影機異常偵測模組550及異常發報模組570。Referring to FIG. 5A, it is a schematic structural diagram of an image analysis software 500 according to an embodiment of the present invention. The image analysis software 500 can include an image capture module 510, a light change detection module 530, a camera anomaly detection module 550, and an abnormality reporting module 570.

影像擷取模組510接收攝影機130的擷取影像(如背景影像或當前影像),並對其進行影像處理。影像擷取模組510包含色彩轉換單元512、邊緣演算單元514及二值化單元516。色彩轉換單元512用以將三原色光(RGB)色彩空間的擷取影像轉換為亮度與色彩分離的色彩空間(如HSV)的擷取影像,以獲得擷取影像的色彩飽和度參數。邊緣演算單元514可利用索貝爾(Sobel)算子運算圖像亮度函數的梯度近似值,以檢測出取樣點410的邊緣強度。二值化單元516可利用如前述Otsu演算法對取樣點410的 邊緣強度進行二值化,以找出邊緣點。The image capturing module 510 receives the captured image (such as the background image or the current image) of the camera 130 and performs image processing thereon. The image capturing module 510 includes a color conversion unit 512, an edge calculation unit 514, and a binarization unit 516. The color conversion unit 512 is configured to convert the captured image of the three primary color light (RGB) color space into a captured image of a color space (eg, HSV) separated by color and brightness to obtain a color saturation parameter of the captured image. The edge calculation unit 514 can calculate the gradient approximation of the image brightness function using a Sobel operator to detect the edge intensity of the sample point 410. The binarization unit 516 can utilize the Otsu algorithm as described above for the sampling point 410 The edge intensity is binarized to find the edge points.

光變化偵測模組530及攝影機異常偵測模組550接收經影像擷取模組510處理後的擷取影像,並分別進行光變化偵測與攝影機異常偵測。當攝影機130的紅外線攝影功能未啟用時(即環境光線充足時),直接以攝影機異常偵測模組550進行異常偵測,當攝影機130的紅外線攝影功能啟用時(即環境光線不充足時),由光變化偵測模組530根據擷取影像偵測到光線變化並進行異常偵測。如此,本發明實施例之攝影機130的異常偵測方法,不論光線充足與否均可適用。特別是,在此兩種不同環境亮度條件下,可分別建立前述之邊緣模型與場景結構模型。The optical change detection module 530 and the camera abnormality detection module 550 receive the captured images processed by the image capturing module 510, and respectively perform light change detection and camera abnormality detection. When the infrared photography function of the camera 130 is not enabled (that is, when the ambient light is sufficient), the abnormality detection is directly performed by the camera abnormality detecting module 550. When the infrared photography function of the camera 130 is enabled (that is, when the ambient light is insufficient), The light change detection module 530 detects light changes according to the captured image and performs anomaly detection. As such, the abnormality detecting method of the camera 130 according to the embodiment of the present invention can be applied regardless of whether the light is sufficient or not. In particular, under the two different ambient brightness conditions, the aforementioned edge model and scene structure model can be separately established.

光變化偵測模組530包含色彩飽和度偵測單元532、邊緣數量偵測單元534、場景結構模型偵測單元536及連續區塊遮蔽偵測單元538。The optical change detection module 530 includes a color saturation detection unit 532, an edge number detection unit 534, a scene structure model detection unit 536, and a continuous block shadow detection unit 538.

色彩飽和度偵測單元532用以根據前述色彩轉換單元512所取得的色彩飽和度參數,偵測擷取影像的色彩飽和度是否低於第一門檻值,即偵測攝影機130由日間拍攝模式轉換至夜間拍攝模式。另一方面,色彩飽和度偵測單元532亦可偵測色彩飽和度自低於第一門檻值時而大幅上升至高於第一門檻值的情形,即偵測攝影機130由夜間拍攝模式轉換至日間拍攝模式。The color saturation detecting unit 532 is configured to detect, according to the color saturation parameter obtained by the color converting unit 512, whether the color saturation of the captured image is lower than the first threshold, that is, the detecting camera 130 is converted by the daytime shooting mode. To night shooting mode. On the other hand, the color saturation detecting unit 532 can also detect that the color saturation is greatly increased from below the first threshold to a value higher than the first threshold, that is, the detecting camera 130 is switched from the night shooting mode to the daytime. Shooting mode.

邊緣數量偵測單元534用以根據邊緣演算單元514的演算結果識別邊緣特徵的數量。場景結構模型偵測單元536用以將擷取影像切割為前述複數個場景區塊420,並偵測當前擷取影像的各場 景區塊420是否與背景影像400所對應的各場景區塊420相似。The edge number detecting unit 534 is configured to identify the number of edge features according to the calculation result of the edge calculating unit 514. The scene structure model detecting unit 536 is configured to cut the captured image into the plurality of scene blocks 420, and detect each field of the currently captured image. Whether the scenic block 420 is similar to each of the scene blocks 420 corresponding to the background image 400.

連續區塊遮蔽偵測單元538用以分辨不相似的場景區塊420是否在連續訊框(frame)內沿著相鄰的場景區塊420變化,以判定是否為遮蔽物遮蔽鏡頭所造成的遮蔽事件。換言之,連續區塊遮蔽偵測單元538用以檢測是否有連續的場景區塊420的相似性低於一第三門檻值。The contiguous block occlusion detecting unit 538 is configured to determine whether the dissimilar scene block 420 changes along the adjacent scene block 420 in a continuous frame to determine whether the mask is blocked by the mask. event. In other words, the contiguous block occlusion detecting unit 538 is configured to detect whether the similarity of the consecutive scene blocks 420 is lower than a third threshold.

攝影機異常偵測模組550包含場景結構模型偵測單元552及邊緣取樣模型偵測單元554。前述場景結構模型偵測單元536及攝影機異常偵測模組550的場景結構模型偵測單元552與邊緣取樣模型偵測單元554將於後述。The camera abnormality detecting module 550 includes a scene structure model detecting unit 552 and an edge sampling model detecting unit 554. The scene structure model detecting unit 552 and the edge sampling model detecting unit 554 of the scene structure model detecting unit 536 and the camera anomaly detecting module 550 will be described later.

在此,先行說明異常發報模組570包含異常判斷單元572、異常計數單元574及異常發報單元576。異常判斷單元572用以根據光變化偵測模組530及攝影機異常偵測模組550的偵測結果判斷是否發生異常事件,並判斷異常事件為何者。異常計數單元574根據異常判斷單元572判斷為異常事件之結果累計發生次數,當累計至特定次數時,通知異常發報單元576發出警報。藉以避免短暫非刻意而導致影像畫面發生巨大的改變造成誤報的情形,如行駛車輛的頭燈、閃電等。Here, the abnormality reporting module 570 includes an abnormality determining unit 572, an abnormality counting unit 574, and an abnormality reporting unit 576. The abnormality determining unit 572 is configured to determine whether an abnormal event occurs according to the detection result of the light change detecting module 530 and the camera abnormality detecting module 550, and determine the abnormal event. The abnormality counting unit 574 determines the cumulative number of occurrences as a result of the abnormality event based on the abnormality determining unit 572, and notifies the abnormality transmitting unit 576 to issue an alarm when it is accumulated to a specific number of times. By avoiding short-term unintentional changes that result in a huge change in the image, causing false alarms, such as headlights, lightning, etc. of the moving vehicle.

第5B圖為根據本發明一實施例之場景結構模型偵測單元552/536的架構示意圖。FIG. 5B is a schematic structural diagram of a scene structure model detecting unit 552/536 according to an embodiment of the invention.

如第5B圖所示,場景結構模型偵測單元552/536包含背景區塊切割子單元5521、模糊比對子單元5523及場景結構比對子單元 5525。As shown in FIG. 5B, the scene structure model detecting unit 552/536 includes a background block cutting subunit 5521, a fuzzy comparison subunit 5523, and a scene structure comparison subunit. 5525.

背景區塊切割子單元5521用以將擷取影像(如背景影像400或當前影像)切割為前述複數場景區塊420。於此,當前的擷取影像同樣分割為m×n個場景區塊420(m、n為正整數),即場景區塊420的數量與場景結構模型的場景區塊420的數量相同。The background block cutting subunit 5521 is configured to cut the captured image (such as the background image 400 or the current image) into the foregoing plurality of scene blocks 420. Here, the current captured image is also divided into m×n scene blocks 420 (m, n are positive integers), that is, the number of scene blocks 420 is the same as the number of scene blocks 420 of the scene structure model.

模糊比對子單元5523利用模糊相似性(Fuzzy-similarity)演算法計算分別於場景結構模型與擷取影像中對應的各場景區塊420之間的相似度,藉以供場景結構比對子單元5524辨識擷取影像的場景區塊420中與場景結構模型中所對應的場景區塊420不相似者。於此,可視場景區塊420的重要程度設定權重參數,而以前述相似度與權重參數的乘積做為辨識相似與否的依據。藉此,可避免因經常性變動的區域(如走廊)而造成誤報。The fuzzy comparison sub-unit 5523 uses the fuzzy-similarity algorithm to calculate the similarity between the scene structure model and each scene block 420 corresponding to the captured image, so that the scene structure comparison sub-unit 5524 The scene block 420 that identifies the captured image is not similar to the scene block 420 corresponding to the scene structure model. Here, the weight parameter is set according to the importance degree of the visual scene block 420, and the product of the similarity degree and the weight parameter is used as the basis for identifying the similarity or not. In this way, false positives can be avoided due to frequently changing areas such as corridors.

第5C圖為根據本發明一實施例之邊緣取樣模型偵測單元554的架構示意圖。FIG. 5C is a schematic diagram of the architecture of the edge sampling model detecting unit 554 according to an embodiment of the invention.

如第5C圖所示,邊緣取樣模型偵測單元554包含前景偵測子單元5541、不穩定取樣點分析子單元5543及高斯模型建置子單元5545。As shown in FIG. 5C, the edge sampling model detecting unit 554 includes a foreground detecting subunit 5541, an unstable sampling point analyzing subunit 5543, and a Gaussian model building subunit 5545.

前景偵測子單元5541用以根據邊緣演算單元514的演算結果識別與邊緣特徵模型中的邊緣特徵相異的邊緣,並將其認定為前景邊緣。不穩定取樣點分析子單元5543係分析邊緣穩定程度,例如:可藉由各取樣點410於不同時間的邊緣強度分析其熵值(Entopy)是否為最小值(因取樣點410的熵值愈小,表示該取 樣點愈穩定),以確認此邊緣點屬於穩定邊緣。高斯模型建置子單元5545用以執行前述步驟S301至步驟S303,而於初始時建立前述之邊緣特徵模型。The foreground detection sub-unit 5541 is configured to identify an edge different from the edge feature in the edge feature model according to the calculation result of the edge calculation unit 514, and identify it as a foreground edge. The unstable sampling point analysis sub-unit 5543 analyzes the degree of edge stability. For example, whether the entropy value (Entopy) is the minimum value by the edge intensity of each sampling point 410 at different times (since the entropy value of the sampling point 410 is smaller) , indicating that the fetch The more stable the sample is, to confirm that this edge point is a stable edge. The Gaussian model building sub-unit 5554 is configured to perform the foregoing steps S301 to S303, and initially establish the aforementioned edge feature model.

第6圖為第2圖所示之流程圖中步驟S250的細部流程圖,用以說明偵測到色彩飽和度低於第一門檻值後,如何進一步區分是否發生異常事件及異常事件為何者。如第6圖所示,步驟S250包含:步驟S251:比較擷取影像的色彩飽和度是否低於第一門檻值。若擷取影像的色彩飽和度低於第一門檻值,表示該擷取影像可能為紅外線影像或發生失焦、遮蔽、開關燈或轉向等異常事件,因此進入步驟S2511,以根據夜間拍攝模式的背景模型判斷是否發生異常事件,若否,則表示該擷取影像可能為日間拍攝的彩色影像或發生失焦、遮蔽、開關燈或轉向等異常事件,而進入步驟S2512。關於如何判定是否發生異常,將於第7圖詳加說明。FIG. 6 is a detailed flow chart of step S250 in the flowchart shown in FIG. 2, which is used to explain how to further distinguish whether an abnormal event or an abnormal event occurs after the color saturation is detected to be lower than the first threshold. As shown in FIG. 6, step S250 includes: step S251: comparing whether the color saturation of the captured image is lower than the first threshold. If the color saturation of the captured image is lower than the first threshold, it indicates that the captured image may be an infrared image or an abnormal event such as out-of-focus, shadowing, switching light or steering occurs, so the process proceeds to step S2511 to follow the night shooting mode. The background model determines whether an abnormal event has occurred. If not, it indicates that the captured image may be a color image captured during the day or an abnormal event such as out-of-focus, shadowing, switching lights, or steering occurs, and the process proceeds to step S2512. How to determine whether an abnormality has occurred will be explained in detail in Figure 7.

於步驟S2511中,若偵測到異常事件,則進入步驟S252,若否,則進入步驟S260,以更新背景模型。In step S2511, if an abnormal event is detected, the process proceeds to step S252, and if no, the process proceeds to step S260 to update the background model.

相似地,在步驟S2512中,若偵測到異常事件,則進入步驟S252,若否,則進入步驟S260,以更新背景模型。若未偵測到異常而進入步驟S260時,係將背景模型中背景影像的取樣點410的邊緣特徵及場景區塊420更新為當前的擷取影像中的取樣點410的邊緣特徵及場景區塊420。因此,邊緣特徵模型與場景結構模型(即背景模型)在偵測過程時也會漸進式學習,以適應場景變化 (如:家具移位、光線緩慢改變等)。Similarly, in step S2512, if an abnormal event is detected, the process proceeds to step S252, and if not, the process proceeds to step S260 to update the background model. If the abnormality is not detected and the process proceeds to step S260, the edge feature of the sample point 410 of the background image in the background model and the scene block 420 are updated to the edge feature and the scene block of the sample point 410 in the current captured image. 420. Therefore, the edge feature model and the scene structure model (ie, the background model) will also gradually learn during the detection process to adapt to the scene change. (eg furniture shifting, slow light changes, etc.).

步驟S252:根據場景結構模型判定擷取影像的場景結構是否改變,若是,則判定為轉向事件;若否,則進入步驟S253,繼續判斷是否發生其他異常事件(步驟S254)。Step S252: determining whether the scene structure of the captured image is changed according to the scene structure model, and if so, determining that the steering event is; if not, proceeding to step S253 to continue determining whether another abnormal event has occurred (step S254).

步驟S253:根據邊緣取樣模型判定擷取影像的取樣點的邊緣特徵是否存在。若取樣點的邊緣特徵均不存在,則可認定發生失焦事件,因若發生關燈事件,紅外線影像的所有邊緣特徵仍會存在(步驟S255)。若部分取樣點的邊緣特徵不存在,則可認定可能發生遮蔽事件(步驟S256)。若取樣點的邊緣特徵均存在,則可認定可能發生開燈/關燈事件(步驟S257)。於偵測到開關燈事件之後(即步驟S257之後),進入步驟S260,以更新背景模型。Step S253: Determine whether an edge feature of the sampling point of the captured image exists according to the edge sampling model. If the edge features of the sampling point are not present, it can be determined that an out-of-focus event occurs, because if a light-off event occurs, all edge features of the infrared image will still exist (step S255). If the edge feature of the partial sampling point does not exist, it may be determined that a shadowing event may occur (step S256). If the edge features of the sampling points are present, it can be determined that a light-on/off event may occur (step S257). After detecting the switch light event (ie, after step S257), the process proceeds to step S260 to update the background model.

在步驟S260中,若偵測到為關燈事件,則將對應日間拍攝模式的背景模型更換為對應夜間拍攝模式的背景模型;反之,則由對應夜間拍攝模式的背景模型更換為對應日間拍攝模式的背景模型。於偵測到發生遮蔽事件、失焦事件或轉向事件後(即於步驟S254、S255及S256之後),將進入步驟S270,以發出警報。In step S260, if the light-off event is detected, the background model corresponding to the daytime shooting mode is replaced with the background model corresponding to the nighttime shooting mode; otherwise, the background model corresponding to the nighttime shooting mode is replaced with the corresponding daytime shooting mode. Background model. After detecting the occurrence of the occlusion event, the out-of-focus event or the steering event (ie, after steps S254, S255, and S256), the process proceeds to step S270 to issue an alarm.

於此,為了進一步確認是否確實發生遮蔽事件,步驟S256還可包含下列步驟:首先,比對擷取影像的複數個連續訊框中分別對應的場景區塊420是否相似。接著,當不相似的場景區塊420於各連續訊框中的對應位置為連續變化,則判定發生遮蔽事件。In order to further confirm whether the occlusion event does occur, step S256 may further include the following steps: First, whether the scene blocks 420 corresponding to the plurality of consecutive frames of the captured image are similar. Then, when the corresponding positions of the dissimilar scene blocks 420 in the consecutive frames are continuously changed, it is determined that the shading event occurs.

為了進一步區分確認攝影機之轉向,步驟S254還可包含下列步驟:首先,比對擷取影像的一訊框中的場景區塊420與其連續 訊框中對應與該場景區塊420相鄰的場景區塊420是否相似。接著,根據此些相鄰區塊中之相似者,判定攝影機的轉向。例如,若於當前的擷取影像中的各場景區塊420,相較於前一訊框中相似且相鄰的各場景區塊420,為向左位移,則可判定攝影機130朝相反方向(即向右)轉向。In order to further distinguish the confirmation of the steering of the camera, step S254 may further comprise the following steps: first, comparing the scene block 420 in the frame of the captured image with the continuous Whether the scene block 420 adjacent to the scene block 420 is similar in the frame. Then, based on the similarity among the adjacent blocks, the steering of the camera is determined. For example, if each scene block 420 in the current captured image is displaced to the left compared to the similar and adjacent scene blocks 420 in the previous frame, the camera 130 may be determined to be in the opposite direction ( That is, turn to the right).

第7圖為根據本發明一實施例之攝影機130的另一異常偵測方法流程圖,係用以說明如何利用監視主機110運行的影像分析軟體及攝影機130,偵測異常事件並更新已建置的背景模型。於此,本流程圖將省略初始建置背景模型的流程及區分異常事件的流程,其相關流程請參照第3圖及第6圖。FIG. 7 is a flow chart of another abnormality detecting method of the camera 130 according to an embodiment of the present invention, which is used to explain how to use the image analyzing software and the camera 130 operated by the monitoring host 110 to detect an abnormal event and update the built-in device. Background model. Here, this flowchart omits the flow of initial construction of the background model and the process of distinguishing abnormal events. For the related flow, please refer to FIG. 3 and FIG.

如第7圖所示,首先,使用者只要先將攝影機130的紅外線功能是否開啟的狀態輸入至監視主機110(步驟S710),其後監視攝影系統100將開始進行全自動學習與判斷,無需針對環境光線明暗與否而手動更換背景模型樣本。於此,本步驟之輸入除使用者輸入之紅外線功能開啟狀態外,亦包含攝影機130的擷取影像。As shown in FIG. 7, first, the user first inputs the state in which the infrared function of the camera 130 is turned on to the monitoring host 110 (step S710), and thereafter the monitoring photographing system 100 starts the automatic learning and determination, and does not need to be targeted. Manually change the background model sample if the ambient light is dim or not. Herein, the input of this step includes the captured image of the camera 130 in addition to the infrared function enabled state input by the user.

於步驟S710之後,進入步驟S720,偵測擷取影像的色彩飽和度,以判斷攝影機130的紅外線功能的啟用狀態是否改變,即環境光線是否產生明暗變化(步驟S730)。藉此,可根據紅外線啟用狀態是否改變,進行不同的偵測程序。也就是說,若改變(即由紅外線未啟用的狀態轉變為紅外線啟用的狀態,或由紅外線啟用的狀態轉變為紅外線未啟用的狀態),則進入步驟S740;若否, 則進入步驟S750。After step S710, the process proceeds to step S720, and the color saturation of the captured image is detected to determine whether the enabled state of the infrared function of the camera 130 is changed, that is, whether the ambient light produces a change in brightness or darkness (step S730). Thereby, different detection procedures can be performed according to whether the infrared activation state is changed. That is, if the state is changed (i.e., the state in which the infrared ray is not activated is changed to the state in which the infrared ray is enabled, or the state in which the infrared ray is enabled is changed to the state in which the infrared ray is not activated), the process proceeds to step S740; if not, Then, the process proceeds to step S750.

在步驟S740中,分別進行連續區塊相異度分析(步驟S741)、邊緣數量偵測(步驟S743)及背景結構比對(步驟S745)。In step S740, continuous block dissimilarity analysis (step S741), edge number detection (step S743), and background structure comparison are performed (step S745).

在步驟S741中,進行連續區塊相異度分析,意即如前述之分辨不相似的場景區塊420是否在連續訊框內沿著相鄰的場景區塊420變化。續而,於步驟S742中,判斷連續相異的場景區塊420的數量是否小於一第四門檻值,並輸出邏輯判斷結果(即True(是/真)或False(否/假))。若邏輯判斷結果為假,代表可能發生遮蔽事件或轉向事件。In step S741, a continuous block dissimilarity analysis is performed, that is, whether the dissimilar dissimilar scene block 420 is changed along the adjacent scene block 420 in the continuous frame as described above. Further, in step S742, it is determined whether the number of consecutively different scene blocks 420 is less than a fourth threshold value, and a logical judgment result (ie, True/Yes or False) is output. If the logical judgment result is false, it means that a shadowing event or a steering event may occur.

在步驟S743後,進入步驟S744,以判斷邊緣數量是否小於一第五門檻值,並輸出邏輯判斷結果。若邏輯判斷結果為假,代表可能發生遮蔽事件或失焦事件。After step S743, the process proceeds to step S744 to determine whether the number of edges is less than a fifth threshold value, and output a logical determination result. If the logical judgment result is false, it means that a shadowing event or an out-of-focus event may occur.

在步驟S745後,進入步驟S746,以判斷擷取影像的背景結構與光線變化後的場景結構模型間的相似度是否大於一第六門檻值,並輸出邏輯判斷結果。若邏輯判斷結果為假,代表可能發生遮蔽事件、失焦事件或轉向事件。After step S745, the process proceeds to step S746 to determine whether the similarity between the background structure of the captured image and the scene structure model after the light change is greater than a sixth threshold, and output a logical determination result. If the logical judgment result is false, it means that a shadowing event, a defocusing event or a turning event may occur.

於此,如欲進一步判定異常事件為遮蔽事件、失焦事件或轉向事件,可透過前述第6圖所示的流程進行判斷。Here, if it is further determined that the abnormal event is a shadowing event, a defocusing event, or a turning event, the determination can be made through the flow shown in FIG. 6 described above.

在步驟S742、步驟S744及步驟S746之後,對所輸出之結果進行“AND”邏輯運算,若運算結果為真(Ture),即步驟S742、步驟S744及步驟S746所輸出之結果均為真,代表偵測到攝影機之紅外線裝置切換且未發生異常事件,則進入步驟S761;若運算 結果為假(False),代表發生異常事件,則進入步驟S762。After step S742, step S744 and step S746, the output result is subjected to "AND" logic operation. If the operation result is true (Ture), the results output in step S742, step S744 and step S746 are all true, representing When it is detected that the infrared device of the camera is switched and no abnormal event occurs, the process proceeds to step S761; The result is False, which indicates that an abnormal event has occurred, and proceeds to step S762.

於步驟S761中,更新背景模型,意即將背景模型中背景影像的取樣點410的邊緣特徵及場景區塊420更新為當前的擷取影像中的取樣點410的邊緣特徵及場景區塊420,並重新取樣所有取樣點410的邊緣特徵,而回到步驟S710,對下一擷取影像進行分析。In step S761, the background model is updated, that is, the edge feature of the sampling point 410 of the background image in the background model and the scene block 420 are updated to the edge feature of the sampling point 410 and the scene block 420 in the current captured image, and The edge features of all the sample points 410 are resampled, and the process returns to step S710 to analyze the next captured image.

於步驟S762中,累計異常事件次數,並判斷異常事件次數是否超過預定次數(步驟S771),若是,則發送警報(步驟S772)。藉以避免短暫非刻意而導致影像畫面發生巨大的改變造成誤報的情形,如行駛車輛的頭燈、閃電等。In step S762, the number of abnormal events is accumulated, and it is determined whether the number of abnormal events exceeds a predetermined number of times (step S771), and if so, an alarm is transmitted (step S772). By avoiding short-term unintentional changes that result in a huge change in the image, causing false alarms, such as headlights, lightning, etc. of the moving vehicle.

在步驟S750中,判斷前述重新取樣是否完成,若完成則分別進入步驟S781與步驟S745(虛線);若否,則僅進入步驟S745(點虛線)。In step S750, it is judged whether or not the resampling is completed. If yes, the process proceeds to step S781 and step S745 (dashed line); if not, the process proceeds to step S745 (dotted line).

於此,說明重新取樣未完成時的流程(點虛線)。當執行完步驟S745後,進入步驟S747,以判斷擷取影像的背景結構與相同光線狀態的場景結構模型間的相似度是否大於一第七門檻值,並輸出邏輯判斷結果。若是,則進入步驟S748,以更新背景模型,意即將背景模型中背景影像的取樣點410的邊緣特徵及場景區塊420更新為當前的擷取影像中的取樣點410的邊緣特徵及場景區塊420;若否,代表可能發生遮蔽事件、失焦事件或轉向事件,則進入步驟S762,累計異常事件次數,並判斷異常事件次數是否超過預定次數(步驟S771),若超過預定次數,則發送警報(步驟S772)。Here, the flow when the resampling is not completed (dotted line) is explained. After step S745 is performed, the process proceeds to step S747 to determine whether the similarity between the background structure of the captured image and the scene structure model of the same ray state is greater than a seventh threshold value, and output a logical determination result. If yes, proceed to step S748 to update the background model, that is, to update the edge feature of the sample point 410 of the background image in the background model and the scene block 420 to the edge feature and the scene block of the sample point 410 in the current captured image. 420; if no, indicating that a shadowing event, a defocusing event, or a turning event may occur, proceeding to step S762, accumulating the number of abnormal events, and determining whether the number of abnormal events exceeds a predetermined number of times (step S771), and if the predetermined number of times is exceeded, sending an alarm (Step S772).

接著,說明重新取樣完成時的流程(虛線),係同時執行步驟S745及步驟S781。步驟S745及其後續的步驟S747請參考前述,於此不再重複贅述。在步驟S781中,根據取樣點410進行前景邊緣偵測,並進入步驟S782。於步驟S782中,判斷前景比例是否小於一第八門檻值,意即部分邊緣特徵是否消失(如遮蔽事件所造成)。Next, the flow (dotted line) at the time of completion of resampling will be described, and step S745 and step S781 are simultaneously performed. For the step S745 and the subsequent step S747, please refer to the foregoing, and the detailed description is not repeated here. In step S781, foreground edge detection is performed based on the sampling point 410, and the flow proceeds to step S782. In step S782, it is determined whether the foreground ratio is less than an eighth threshold value, that is, whether part of the edge features disappear (as caused by a shadowing event).

根據步驟S747及步驟S782的邏輯判斷結果進行“AND”邏輯運算,若運算結果為真(Ture),即步驟S747及步驟S782所輸出之結果均為真,代表未發生異常事件,則進入步驟S748,而更新背景模型;若運算結果為假(False),代表發生異常事件(步驟S748),則進入步驟S762,累計異常事件次數,並於超出預定次數時發出警報(步驟S772)。According to the logical determination result of step S747 and step S782, an "AND" logic operation is performed. If the operation result is true (Ture), that is, the results output in steps S747 and S782 are all true, indicating that no abnormal event has occurred, then the process proceeds to step S748. If the result of the operation is false (False), it means that an abnormal event has occurred (step S748), then the process proceeds to step S762, the number of abnormal events is accumulated, and an alarm is issued when the predetermined number of times is exceeded (step S772).

在一些實施例中,可結合如前述第6圖及第7圖所示之流程,於步驟S772中,對特定異常事件發出警報,以使使用者得知何異常事件(如遮蔽事件、失焦事件或轉向事件)發生。In some embodiments, in combination with the processes shown in FIG. 6 and FIG. 7 above, in step S772, an alarm is issued for a specific abnormal event to enable the user to know what an abnormal event (such as a shadowing event or a defocus). An event or a turn event occurs.

根據本發明之攝影機130的異常偵測方法,可依輸入影像自動判定攝影機130的紅外線模式是否開啟,進而比對日間或夜間之邊緣特徵及場景結構,做為偵測異常事件的背景模型(即邊緣特徵模型與場景結構模型)。由於邊緣特徵在不同光源下具有強健性,即使在低光源環境下,透過紅外線影像仍可保有邊緣特徵,因此本發明之攝影機130的異常偵測方法可適用於任何光強度的環境,並可抵抗劇烈光線變化,避免誤報情形。再者,本發明之 攝影機130的異常偵測方法進一步根據邊緣特徵模型與場景結構模型分析異常事件的類型,而可區分出失焦事件、遮蔽事件、轉向事件及震動事件(微幅轉向)等。According to the abnormality detecting method of the camera 130 of the present invention, it is automatically determined whether the infrared mode of the camera 130 is turned on according to the input image, and then the edge feature and the scene structure of the daytime or nighttime are compared as a background model for detecting an abnormal event (ie, Edge feature model and scene structure model). Since the edge features are robust under different light sources, the edge features can be preserved through the infrared image even in a low light source environment. Therefore, the abnormality detecting method of the camera 130 of the present invention can be applied to any light intensity environment and can resist Violent light changes to avoid false positives. Furthermore, the present invention The abnormality detecting method of the camera 130 further analyzes the types of abnormal events according to the edge feature model and the scene structure model, and can distinguish out of the out-of-focus event, the shadowing event, the steering event, and the shock event (micro-turn).

雖然本發明以前述之實施例揭露如上,然其並非用以限定本發明,任何熟習相像技藝者,在不脫離本發明之精神和範圍內,當可作些許之更動與潤飾,因此本發明之專利保護範圍須視本說明書所附之申請專利範圍所界定者為準。While the present invention has been described above in the foregoing embodiments, it is not intended to limit the invention, and the invention may be modified and modified without departing from the spirit and scope of the invention. The scope of patent protection shall be subject to the definition of the scope of the patent application attached to this specification.

100‧‧‧監視攝影系統100‧‧‧ surveillance photography system

110‧‧‧監視主機110‧‧‧Monitoring host

130‧‧‧攝影機130‧‧‧ camera

150‧‧‧錄影機150‧‧‧Video recorder

170‧‧‧顯示器170‧‧‧ display

400‧‧‧背景影像400‧‧‧ background image

410‧‧‧取樣點410‧‧‧ sampling points

420‧‧‧場景區塊420‧‧‧ Scene Blocks

500‧‧‧影像分析軟體500‧‧‧Image Analysis Software

510‧‧‧影像擷取模組510‧‧‧Image capture module

512‧‧‧色彩轉換單元512‧‧‧Color Conversion Unit

514‧‧‧邊緣演算單元514‧‧‧Edge calculation unit

516‧‧‧二值化單元516‧‧‧ Binarization unit

530‧‧‧光變化偵測模組530‧‧‧Light Change Detection Module

532‧‧‧色彩飽和度偵測單元532‧‧‧Color saturation detection unit

534‧‧‧邊緣數量偵測單元534‧‧‧Edge number detection unit

536‧‧‧場景結構模型偵測單元536‧‧‧Scenario structure model detection unit

538‧‧‧連續區塊遮蔽偵測單元538‧‧‧Continuous block mask detection unit

550‧‧‧攝影機異常偵測模組550‧‧‧Camera Anomaly Detection Module

552‧‧‧場景結構模型偵測單元552‧‧‧Scenario structure model detection unit

5521‧‧‧背景區塊切割子單元5521‧‧‧Background block cutting subunit

5523‧‧‧模糊比對子單元5523‧‧‧Fuzzy comparison subunit

5524‧‧‧場景結構比對子單元5524‧‧‧Scenario structure comparison subunit

554‧‧‧邊緣取樣模型偵測單元554‧‧‧Edge sampling model detection unit

5541‧‧‧前景偵測子單元5541‧‧‧ foreground detection subunit

5543‧‧‧不穩定取樣點分析子單元5543‧‧‧Unstable sampling point analysis subunit

5545‧‧‧高斯模型建置子單元5545‧‧‧Gaussian model subunit

570‧‧‧異常發報模組570‧‧‧Abnormal reporting module

572‧‧‧異常判斷單元572‧‧‧Abnormal judgment unit

574‧‧‧異常計數單元574‧‧‧Abnormal counting unit

576‧‧‧異常發報單元576‧‧‧Abnormal reporting unit

第1圖為根據本發明一實施例之監視攝影系統的架構示意圖。1 is a block diagram showing the structure of a surveillance photography system in accordance with an embodiment of the present invention.

第2圖為根據本發明一實施例之攝影機的異常偵測方法流程圖。FIG. 2 is a flow chart of an abnormality detecting method of a camera according to an embodiment of the invention.

第3圖為根據本發明一實施例之攝影機的異常偵測方法之初始化流程圖。FIG. 3 is an initial flowchart of an abnormality detecting method of a camera according to an embodiment of the invention.

第4A圖為根據本發明一實施例之邊緣特徵模型的示意圖。4A is a schematic diagram of an edge feature model in accordance with an embodiment of the present invention.

第4B圖為根據本發明一實施例之場景結構模型的示意圖。4B is a schematic diagram of a scene structure model in accordance with an embodiment of the present invention.

第5A圖為根據本發明一實施例之影像分析軟體的架構示意圖。FIG. 5A is a schematic structural diagram of an image analysis software according to an embodiment of the invention.

第5B圖為根據本發明一實施例之場景結構模型偵測單元的架構示意圖。FIG. 5B is a schematic structural diagram of a scene structure model detecting unit according to an embodiment of the invention.

第5C圖為根據本發明一實施例之邊緣取樣模型偵測單元的架構示意圖。FIG. 5C is a schematic structural diagram of an edge sampling model detecting unit according to an embodiment of the invention.

第6圖為第2圖所示之流程圖中步驟S250的細部流程圖。Fig. 6 is a detailed flow chart of step S250 in the flowchart shown in Fig. 2.

第7圖為根據本發明一實施例之攝影機的另一異常偵測方法流程圖。FIG. 7 is a flow chart of another abnormality detecting method of the camera according to an embodiment of the invention.

Claims (10)

一種攝影機的異常偵測方法,該攝影機具有一日間拍攝模式及一夜間拍攝模式,該異常偵測方法包含:取得該攝影機所拍攝的一擷取影像;偵測該擷取影像的色彩飽和度;當該擷取影像的色彩飽和度低於一第一門檻值時,判定該攝影機進入夜間拍攝模式或日間拍攝模式;根據該攝影機的拍攝模式選擇對應的一背景模型;及根據該背景模型判定該擷取影像是否異常。 A camera abnormality detecting method, the camera has a daytime shooting mode and a nighttime shooting mode, the abnormality detecting method includes: obtaining a captured image captured by the camera; and detecting a color saturation of the captured image; When the color saturation of the captured image is lower than a first threshold, determining that the camera enters a night shooting mode or a daytime shooting mode; selecting a corresponding background model according to the shooting mode of the camera; and determining the background model according to the background model Whether the image is abnormal. 如請求項1所述之攝影機的異常偵測方法,其中根據該攝影機的拍攝模式選擇對應的該背景模型包含:根據該攝影機分別於該日間拍攝模式或該夜間拍攝模式所拍攝的一背景影像,建立該背景模型;當該攝影機進入日間拍攝模式時,選擇對應該日間拍攝模式的該背景模型;及當該攝影機進入夜間拍攝模式時,選擇對應該夜間拍攝模式的該背景模型。 The method for detecting an abnormality of the camera according to claim 1, wherein the selecting the corresponding background model according to the shooting mode of the camera comprises: according to a background image captured by the camera in the daytime shooting mode or the nighttime shooting mode, The background model is established; when the camera enters the daytime shooting mode, the background model corresponding to the daytime shooting mode is selected; and when the camera enters the nighttime shooting mode, the background model corresponding to the nighttime shooting mode is selected. 如請求項1所述之攝影機的異常偵測方法,更包含:於一背景影像中平均選取複數取樣點,以該些取樣點的邊緣強度建立一邊緣特徵模型;將該背景影像切割為二維分佈的複數場景區塊而形成一場景結構模型;及 合併該邊緣特徵模型及該場景結構模型為該背景模型。 The method for detecting an abnormality of the camera according to claim 1, further comprising: selecting a plurality of sampling points on a background image, and establishing an edge feature model by using the edge intensity of the sampling points; and cutting the background image into two dimensions. a plurality of scene blocks distributed to form a scene structure model; and The edge feature model and the scene structure model are merged into the background model. 如請求項3所述之攝影機的異常偵測方法,其中各該場景區塊與鄰近的該場景區塊部分重疊。 The camera abnormality detecting method of claim 3, wherein each of the scene blocks partially overlaps the adjacent scene block. 如請求項3所述之攝影機的異常偵測方法,其中根據該背景模型判定該擷取影像是否異常,包含:根據該邊緣特徵模型判定該擷取影像的該些取樣點的邊緣特徵是否存在;及若該些取樣點的邊緣特徵均不存在,則判定發生失焦事件。 The method for detecting an abnormality of the camera according to claim 3, wherein determining whether the captured image is abnormal according to the background model comprises: determining, according to the edge feature model, whether an edge feature of the sampling points of the captured image exists; And if none of the edge features of the sampling points exist, it is determined that an out-of-focus event occurs. 如請求項3所述之攝影機的異常偵測方法,其中根據該背景模型判定該擷取影像是否異常,包含:根據該邊緣特徵模型判定該擷取影像的該些取樣點的邊緣特徵是否存在;及若部分該些取樣點的邊緣特徵不存在,則判定發生遮蔽事件。 The method for detecting an abnormality of the camera according to claim 3, wherein determining whether the captured image is abnormal according to the background model comprises: determining, according to the edge feature model, whether an edge feature of the sampling points of the captured image exists; And if some of the edge features of the sampling points do not exist, it is determined that a shadowing event occurs. 如請求項6所述之攝影機的異常偵測方法,其中若部分該些取樣點的邊緣特徵不存在,則判定發生遮蔽事件,包含:比對該擷取影像的複數個連續訊框中分別對應的該些場景區塊是否相似;及當不相似的該些場景區塊於各連續訊框中的對應位置為連續變化,則判定發生遮蔽事件。 The method for detecting an abnormality of the camera according to claim 6, wherein if the edge features of the sampling points do not exist, determining that the masking event occurs comprises: respectively corresponding to the plurality of consecutive frames of the captured image Whether the scene blocks are similar; and when the corresponding positions of the scene blocks in the different consecutive frames are continuously changed, it is determined that a shadow event occurs. 如請求項3所述之攝影機的異常偵測方法,其中根據該背景模型判定該擷取影像是否異常,包含:根據該邊緣特徵模型判定該擷取影像的該些取樣點的邊緣特 徵是否存在;及若該些取樣點的邊緣特徵均存在,則判定發生開關燈事件。The method for detecting an abnormality of the camera according to claim 3, wherein determining whether the captured image is abnormal according to the background model comprises: determining, according to the edge feature model, an edge of the sampling points of the captured image Whether the levy exists; and if the edge features of the sampling points are present, it is determined that a switching light event occurs. 如請求項8所述之攝影機的異常偵測方法,其中根據該背景模型判定該擷取影像是否異常,包含:根據該場景結構模型判定該擷取影像的場景結構是否改變;若該擷取影像的場景結構改變,則判定發生轉向事件。The method for detecting an abnormality of the camera according to claim 8, wherein determining whether the captured image is abnormal according to the background model comprises: determining, according to the scene structure model, whether a scene structure of the captured image is changed; if the captured image is captured If the scene structure changes, it is determined that a turn event has occurred. 如請求項3所述之攝影機的異常偵測方法,更包含:若該擷取影像無異常,將該背景模型中該背景影像的該些取樣點的邊緣特徵及該些場景區塊更新為當前的該擷取影像中的該些取樣點的邊緣特徵及該些場景區塊。The method for detecting an abnormality of the camera according to claim 3, further comprising: if the captured image has no abnormality, updating the edge features of the sampling points of the background image in the background model and the scene blocks to the current The edge features of the sample points in the image and the scene blocks are captured.
TW101137302A 2012-10-09 2012-10-09 Abnormal detection method for a video camera TWI479432B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
TW101137302A TWI479432B (en) 2012-10-09 2012-10-09 Abnormal detection method for a video camera

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW101137302A TWI479432B (en) 2012-10-09 2012-10-09 Abnormal detection method for a video camera

Publications (2)

Publication Number Publication Date
TW201415381A TW201415381A (en) 2014-04-16
TWI479432B true TWI479432B (en) 2015-04-01

Family

ID=53441501

Family Applications (1)

Application Number Title Priority Date Filing Date
TW101137302A TWI479432B (en) 2012-10-09 2012-10-09 Abnormal detection method for a video camera

Country Status (1)

Country Link
TW (1) TWI479432B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI561090B (en) * 2015-04-14 2016-12-01 Synology Inc Method for managing video recording storage space in a surveillance system, and associated apparatus
TWI643497B (en) * 2017-12-01 2018-12-01 中興保全股份有限公司 Self-maintenance system for image monitoring

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI616086B (en) 2016-10-20 2018-02-21 Detection method of abnormal type of photographing device screen
CN113132718B (en) * 2021-04-20 2022-05-24 深圳市多酷科技有限公司 Day and night type image pickup device switching abnormality detection method, device, equipment and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWM334584U (en) * 2008-01-10 2008-06-11 Appro Technology Inc Dual-lens video camera for day and night identification
TW201113835A (en) * 2009-10-07 2011-04-16 Taiwan Secom Co Ltd Intelligent image detecting method, intelligent image detecting system and intelligent image detecting software
TW201218122A (en) * 2010-10-29 2012-05-01 Univ Nat Chiao Tung A method for object detection system in day-and-night environment

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWM334584U (en) * 2008-01-10 2008-06-11 Appro Technology Inc Dual-lens video camera for day and night identification
TW201113835A (en) * 2009-10-07 2011-04-16 Taiwan Secom Co Ltd Intelligent image detecting method, intelligent image detecting system and intelligent image detecting software
TW201218122A (en) * 2010-10-29 2012-05-01 Univ Nat Chiao Tung A method for object detection system in day-and-night environment

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI561090B (en) * 2015-04-14 2016-12-01 Synology Inc Method for managing video recording storage space in a surveillance system, and associated apparatus
TWI643497B (en) * 2017-12-01 2018-12-01 中興保全股份有限公司 Self-maintenance system for image monitoring

Also Published As

Publication number Publication date
TW201415381A (en) 2014-04-16

Similar Documents

Publication Publication Date Title
US10070053B2 (en) Method and camera for determining an image adjustment parameter
US8964030B2 (en) Surveillance camera system having camera malfunction detection function to detect types of failure via block and entire image processing
JP2010009134A (en) Image processing system, image processing method, and program
JP5437855B2 (en) Obstacle detection device, obstacle detection system including the same, and obstacle detection method
US10255683B1 (en) Discontinuity detection in video data
JP2001357484A (en) Road abnormality detector
US20200355627A1 (en) Method for detecting display screen peripheral circuit, apparatus, electronic device and storage medium
TWI479432B (en) Abnormal detection method for a video camera
WO2022237591A1 (en) Moving object identification method and apparatus, electronic device, and readable storage medium
JP2006261761A (en) Image signal processing apparatus
CN112668636A (en) Camera shielding detection method and system, electronic equipment and storage medium
TWI476735B (en) Abnormal classification detection method for a video camera and a monitering host with video image abnormal detection
JP4025007B2 (en) Railroad crossing obstacle detection device
CN103716618A (en) Abnormity detecting method of camera
CN111460949B (en) Real-time monitoring method and system for preventing external damage of power transmission line
JP2001245284A (en) Method and system for supervising intruding object
JP5710230B2 (en) Monitoring system and monitoring method
CN116342642A (en) Target tracking method, device, electronic equipment and readable storage medium
JPH0337356B2 (en)
JP3502468B2 (en) Distributed monitoring equipment
JP2011061651A (en) Suspicious object detection system
JPH09331519A (en) Automatic monitor equipment
JP6299630B2 (en) Warning device, warning method and warning program
JP2013090063A (en) Monitoring device, monitoring method, and monitoring program
CN113132645B (en) Image acquisition method, device, equipment and storage medium

Legal Events

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