TWI556642B - Day and night mode switching method for image capture device - Google Patents
Day and night mode switching method for image capture device Download PDFInfo
- Publication number
- TWI556642B TWI556642B TW104105817A TW104105817A TWI556642B TW I556642 B TWI556642 B TW I556642B TW 104105817 A TW104105817 A TW 104105817A TW 104105817 A TW104105817 A TW 104105817A TW I556642 B TWI556642 B TW I556642B
- Authority
- TW
- Taiwan
- Prior art keywords
- value
- image
- interval
- capturing device
- image capturing
- Prior art date
Links
Description
本發明是有關於一種影像擷取裝置的運行模式切換方法,特別是指一種在日間模式與夜間模式之間切換的方法。 The invention relates to a method for switching an operation mode of an image capturing device, in particular to a method for switching between a day mode and a night mode.
隨著多媒體與網路技術的快速發展,影像擷取裝置已經廣泛地應用於生活當中。例如,因應近年來安全監控需求的提升,網路攝影機已經廣泛地應用於道路監視、老人照護、門禁與保全等等。 With the rapid development of multimedia and network technologies, image capture devices have been widely used in life. For example, in response to the increasing demand for security surveillance in recent years, network cameras have been widely used in road surveillance, elderly care, access control and security.
在現有的網路攝影機中,一般都會配置感光模組來偵測當前環境的亮度,並將環境的亮度與系統預設值比對,然後根據比對結果決定是否由日間的彩色影像模式切換到夜間的灰階影像模式。然而,現有的網路攝影機需要配置偵測當前環境亮度的感光模組,所以,需要較高的硬體成本。 In the existing network camera, the photosensitive module is generally configured to detect the brightness of the current environment, and compare the brightness of the environment with the preset value of the system, and then according to the comparison result, whether to switch from the daytime color image mode to Grayscale image mode at night. However, existing network cameras need to be equipped with a photosensitive module that detects the brightness of the current environment, so a high hardware cost is required.
因此,本發明之目的,即在提供一種影像擷取裝置的日夜模式切換方法。 Accordingly, it is an object of the present invention to provide a day and night mode switching method for an image capture device.
於是本發明影像擷取裝置的日夜模式切換方法由一影像擷取裝置執行,該影像擷取裝置的一當前運行模 式為一日間模式及一夜間模式二者其中之一。該影像擷取裝置的日夜模式切換方法包含以下四步驟: Therefore, the day and night mode switching method of the image capturing device of the present invention is performed by an image capturing device, and a current running mode of the image capturing device The formula is one of a day mode and a night mode. The day/night mode switching method of the image capturing device comprises the following four steps:
在步驟(a),該影像擷取裝置擷取多張連續的相關於該當前運行模式的影像,其中,每一影像包含多個畫素,且每一畫素具有一亮度值。 In step (a), the image capturing device captures a plurality of consecutive images related to the current operating mode, wherein each image includes a plurality of pixels, and each pixel has a brightness value.
在步驟(b),該影像擷取裝置計算每一影像的一全域亮度平均值,其中,該全域亮度平均值為該影像的所有畫素的亮度值的平均值。 In step (b), the image capturing device calculates a global luminance average value of each image, wherein the global luminance average value is an average value of luminance values of all pixels of the image.
在步驟(c),對於每一影像,該影像擷取裝置依據該影像的所有畫素的亮度值的一累積分佈函數的一值域決定出多個包含於該值域且相異的函數值區間,並計算出每一函數值區間的一區間亮度平均值,其中,該區間亮度平均值為該函數值區間對應的所有亮度值的平均值。 In step (c), for each image, the image capturing device determines a plurality of different function values included in the range according to a value range of a cumulative distribution function of luminance values of all pixels of the image. The interval is calculated, and an interval luminance average value of each function value interval is calculated, wherein the interval luminance average value is an average value of all luminance values corresponding to the function value interval.
在步驟(d),該影像擷取裝置根據該等影像的該全域亮度平均值及該等區間亮度平均值將該當前運行模式在該日間模式與該夜間模式之間進行切換。 In step (d), the image capturing device switches the current operating mode between the day mode and the night mode according to the global brightness average of the images and the interval brightness averages.
本發明之功效在於:藉由計算出連續影像的全域亮度平均值及該等區間亮度平均值,該影像擷取裝置能據以將該當前運行模式在該日間模式與該夜間模式之間進行切換。 The effect of the present invention is that the image capturing device can switch the current operating mode between the day mode and the night mode by calculating the global brightness average of the continuous image and the average brightness of the intervals. .
10~19‧‧‧步驟 10~19‧‧‧Steps
本發明之其他的特徵及功效,將於參照圖式的實施方式中清楚地呈現,其中:圖1是一流程圖,說明本發明影像擷取裝置的日夜模 式切換方法的步驟流程;及圖2是一示意圖,例示一影像畫素亮度值的累積分佈函數及相關於該累積分佈函數的多個函數值區間。 Other features and effects of the present invention will be apparent from the following description of the drawings. FIG. 1 is a flow chart illustrating the day and night mode of the image capturing device of the present invention. Step flow of the switching method; and FIG. 2 is a schematic diagram illustrating a cumulative distribution function of image pixel luminance values and a plurality of function value intervals associated with the cumulative distribution function.
參閱圖1,本發明影像擷取裝置的日夜模式切換方法由一例如為網路攝影機的影像擷取裝置執行。該影像擷取裝置的一當前運行模式為一日間模式及一夜間模式二者其中之一。以下詳述該方法的步驟流程。 Referring to FIG. 1, the day/night mode switching method of the image capturing device of the present invention is performed by an image capturing device such as a webcam. A current operating mode of the image capturing device is one of a day mode and a night mode. The step flow of the method is detailed below.
首先,在步驟10,該影像擷取裝置擷取一影像,其中,該影像包含多個畫素,且每一畫素具有一亮度值(Luminance Value)。 First, in step 10, the image capturing device captures an image, wherein the image includes a plurality of pixels, and each pixel has a Luminance Value.
接著,在步驟11,該影像擷取裝置計算該影像的一全域亮度平均值,其中,該全域亮度平均值為該影像的所有畫素的亮度值的平均值。 Next, in step 11, the image capturing device calculates a global brightness average of the image, wherein the global brightness average is an average of the brightness values of all pixels of the image.
接著,在步驟12,該影像擷取裝置判斷是否該當前運行模式為該日間模式,當判斷結果為肯定時進行步驟13;否則,該影像擷取裝置判斷該當前運行模式為該夜間模式,並進行步驟15。 Next, in step 12, the image capturing device determines whether the current operating mode is the day mode, and when the determination result is positive, proceeds to step 13; otherwise, the image capturing device determines that the current operating mode is the night mode, and Go to step 15.
在步驟13,該影像擷取裝置判斷是否已有連續WC張影像滿足該影像的全域亮度平均值小於一預定的亮度平均門檻值,其中,WC為整數且不小於1。當判斷結果為肯定時,該影像擷取裝置進行步驟14,也就是將該當前運行模式由該日間模式切換為該夜間模式;否則,返回進行步驟10以擷取下一影像。 In step 13, the image capturing device determines whether there is a continuous W C image that satisfies the global brightness average of the image is less than a predetermined brightness average threshold, where W C is an integer and not less than 1. When the judgment result is affirmative, the image capturing device performs step 14, that is, switches the current operation mode from the day mode to the night mode; otherwise, returns to step 10 to capture the next image.
在步驟15,參閱圖2,該影像擷取裝置依據該影像的所有畫素的亮度值的一累積分佈函數(Cumulative Distribution Function)的一值域決定出包含於該值域且相異的一第一函數值區間、一第二函數值區間、一第三函數值區間,及一第四函數值區間,並計算出每一函數值區間的一區間亮度平均值。其中,該值域為[0,1];該區間亮度平均值為該函數值區間對應的所有亮度值的平均值;該第一函數值區間的上界與下界分別為1-T1與0,該第二函數值區間的上界與下界分別為T2與0,該第三函數值區間的上界與下界分別為1與T1,該第四函數值區間的上界與下界分別為1與1-T2,其中,較佳地,T1在0.05到0.35的範圍內,且T2在0.4到0.6的範圍內。 In step 15, referring to FIG. 2, the image capturing device determines, according to a value range of a Cumulative Distribution Function of the luminance values of all the pixels of the image, a different one included in the value range. A function value interval, a second function value interval, a third function value interval, and a fourth function value interval, and calculate an interval luminance average value of each function value interval. Wherein, the value range is [0, 1]; the average value of the interval brightness is an average value of all the brightness values corresponding to the function value interval; the upper and lower bounds of the first function value interval are 1-T 1 and 0 respectively The upper and lower bounds of the second function value interval are respectively T 2 and 0, and the upper and lower bounds of the third function value interval are 1 and T 1 , respectively, and the upper and lower bounds of the fourth function value interval are respectively 1 and 1-T 2 , wherein, preferably, T 1 is in the range of 0.05 to 0.35, and T 2 is in the range of 0.4 to 0.6.
舉例來說,如圖2所示,該第四函數值區間為[0.5,1],且累積分佈函數值分別為0.5與1時所對應的亮度值分別為M與N,其中M<N,所以,該第四函數值區間的區間亮度平均值為該等畫素的亮度值中在M到N的範圍內的所有亮度值的平均值;例如,若該影像有100個畫素的亮度值在M到N的範圍內,則該第四函數值區間的區間亮度平均值為該100個畫素的亮度值的平均值。 For example, as shown in FIG. 2, the fourth function value interval is [0.5, 1], and the luminance values corresponding to the cumulative distribution function values of 0.5 and 1 are respectively M and N, where M < N, Therefore, the interval luminance average value of the fourth function value interval is an average value of all luminance values in the range of M to N among the luminance values of the pixels; for example, if the image has a luminance value of 100 pixels In the range of M to N, the average value of the interval luminance of the fourth function value interval is the average value of the luminance values of the 100 pixels.
接著,在步驟16,令該第一函數值區間的區間亮度平均值為YD1,該第二函數值區間的區間亮度平均值為YD2,該第三函數值區間的區間亮度平均值為YB1,且該第四函數值區間的區間亮度平均值為YB2,該影像擷取裝置計算該影像的一第一亮度差值S1、一第二亮度差值S2,及一 第三亮度差值S3,其中,S1=|YD1-YB1|,S2=|YD2-YB2|,且S3=|S1-S2|。 Next, in step 16, the interval luminance average value of the first function value interval is Y D1 , and the interval luminance average value of the second function value interval is Y D2 , and the interval luminance average value of the third function value interval is Y B1 , and the average brightness of the interval of the fourth function value interval is Y B2 , the image capturing device calculates a first brightness difference S 1 , a second brightness difference S 2 , and a third brightness of the image. The difference S 3 , where S 1 =|Y D1 -Y B1 |, S 2 =|Y D2 -Y B2 |, and S 3 =|S 1 -S 2 |.
接著,在步驟17,該影像擷取裝置根據該第三亮度差值計算出一對應該影像的個別門檻值。其中,較佳的實施方式為:預先準備多個在環境照度為8~10勒克斯(Lux)的不同場景下所擷取的具有不同第三亮度差值的參考影像,且其中該等第三亮度差值包含了該第三亮度差值的所有可能的值;例如,若以八個位元(bit)表示一畫素的亮度值,則該第三亮度差值的所有可能的值為0至255。而該個別門檻值被設定為與該影像有相同的第三亮度差值的參考影像的全域亮度平均值。 Next, in step 17, the image capturing device calculates an individual threshold value of the pair of image images based on the third brightness difference value. Preferably, the preferred embodiment is: preparing a plurality of reference images having different third brightness difference values in different scenes with an ambient illuminance of 8 to 10 lux (Lux), and wherein the third brightness is The difference value includes all possible values of the third luminance difference value; for example, if the luminance value of one pixel is represented by eight bits, all possible values of the third luminance difference value are 0 to 255. The individual threshold value is set to the global luminance average of the reference image having the same third luminance difference value as the image.
接著,在步驟18,該影像擷取裝置判斷是否該等影像中已有連續WC張影像滿足「該影像的全域亮度平均值不小於該影像對應的個別門檻值」及「該影像的第三亮度差值小於一預定的亮度差異門檻值」二者其中之一。當判斷結果為肯定時,該影像擷取裝置進行步驟19,也就是將該當前運行模式由該夜間模式切換為該日間模式;否則,返回進行步驟10以擷取下一影像。 Then, in step 18, the image capturing device determines whether there are consecutive W C images in the images that satisfy the "the average brightness of the image is not less than the individual threshold value corresponding to the image" and "the third of the image." The brightness difference is less than a predetermined brightness difference threshold value. When the judgment result is affirmative, the image capturing device performs step 19, that is, switches the current operation mode from the night mode to the day mode; otherwise, returns to step 10 to capture the next image.
綜上所述,本發明影像擷取裝置的日夜模式切換方法,藉由計算出連續影像的該全域亮度平均值,及根據每一影像的畫素亮度值的累積分佈函數計算出該第三亮度差值,該影像擷取裝置能據以判斷是否應將當前運行模式由日間模式切換至夜間模式,或由夜間模式切換至日間模式;且該方法不需配置用於偵測當前環境亮度的感光模 組,所以能有效降低硬體成本,故確實能達成本發明之目的。 In summary, the day and night mode switching method of the image capturing device of the present invention calculates the global brightness average value of the continuous image and calculates the third brightness according to the cumulative distribution function of the pixel brightness value of each image. The difference, the image capturing device can determine whether the current operating mode should be switched from the day mode to the night mode, or the night mode to the day mode; and the method does not need to be configured to detect the current ambient brightness mold Therefore, the cost of the hardware can be effectively reduced, so that the object of the present invention can be achieved.
惟以上所述者,僅為本發明之實施例而已,當不能以此限定本發明實施之範圍,即大凡依本發明申請專利範圍及專利說明書內容所作之簡單的等效變化與修飾,皆仍屬本發明專利涵蓋之範圍內。 However, the above is only the embodiment of the present invention, and the scope of the present invention is not limited thereto, that is, the simple equivalent changes and modifications made by the patent application scope and the patent specification of the present invention are still It is within the scope of the patent of the present invention.
10~19‧‧‧步驟 10~19‧‧‧Steps
Claims (5)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
TW104105817A TWI556642B (en) | 2015-02-24 | 2015-02-24 | Day and night mode switching method for image capture device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
TW104105817A TWI556642B (en) | 2015-02-24 | 2015-02-24 | Day and night mode switching method for image capture device |
Publications (2)
Publication Number | Publication Date |
---|---|
TW201631952A TW201631952A (en) | 2016-09-01 |
TWI556642B true TWI556642B (en) | 2016-11-01 |
Family
ID=57443053
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
TW104105817A TWI556642B (en) | 2015-02-24 | 2015-02-24 | Day and night mode switching method for image capture device |
Country Status (1)
Country | Link |
---|---|
TW (1) | TWI556642B (en) |
Families Citing this family (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110557549A (en) * | 2018-05-31 | 2019-12-10 | 晨星半导体股份有限公司 | Circuit for controlling image capturing equipment and related control method |
CN112055151A (en) * | 2019-06-06 | 2020-12-08 | Tcl新技术(惠州)有限公司 | Law enforcement instrument mode switching method and system and readable storage medium |
CN113468970A (en) * | 2021-06-03 | 2021-10-01 | 杭州魔点科技有限公司 | Face recognition access control day and night state switching method, system, equipment and storage medium |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
TW200915240A (en) * | 2007-09-27 | 2009-04-01 | Univ Nat Yunlin Sci & Tech | Intelligent vehicle surveillance, video recording and search system |
TW201218122A (en) * | 2010-10-29 | 2012-05-01 | Univ Nat Chiao Tung | A method for object detection system in day-and-night environment |
-
2015
- 2015-02-24 TW TW104105817A patent/TWI556642B/en active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
TW200915240A (en) * | 2007-09-27 | 2009-04-01 | Univ Nat Yunlin Sci & Tech | Intelligent vehicle surveillance, video recording and search system |
TW201218122A (en) * | 2010-10-29 | 2012-05-01 | Univ Nat Chiao Tung | A method for object detection system in day-and-night environment |
Also Published As
Publication number | Publication date |
---|---|
TW201631952A (en) | 2016-09-01 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN105122794B (en) | Camera occlusion detection | |
CN104036490B (en) | Foreground segmentation method suitable for mobile communications network transmission | |
US20160301832A1 (en) | Electronic Device and Method for Controlling Cameras Thereof | |
EP2815568B1 (en) | Method and apparatus for enhanced automatic adjustment of focus in digital photography | |
TWI556642B (en) | Day and night mode switching method for image capture device | |
JP2018201189A5 (en) | ||
WO2006072925A3 (en) | Method for estimating motion and occlusion | |
WO2007067722A3 (en) | System and method for detecting an invalid camera in video surveillance | |
JP2008085996A (en) | Illuminant estimation method and apparatus | |
CN104299188B (en) | Image correcting method and system | |
JP5352859B2 (en) | Method and apparatus for maintaining video background using multiple Gaussian distribution models | |
TW201725875A (en) | A bit rate controller and a method for limiting output bit rate | |
JP2008236353A (en) | Camera abnormality detection device | |
US10142664B2 (en) | Method and device for determining properties of a graphical overlay for a video stream | |
CN100505870C (en) | A device and method to automatically regulate monitoring image according to video change | |
JP2012099940A (en) | Photographic obstruction detection method, obstruction detection device, and monitoring camera system | |
JP2003308041A (en) | Plasma display device | |
JP6513309B2 (en) | Image synthesizing device, image synthesizing method, and image synthesizing program | |
TWI712318B (en) | A method for reducing intensity variations in a video image stream depicting a scene | |
CN105704363B (en) | Image data processing method and device | |
US20220122294A1 (en) | Method of encoding an image including a privacy mask | |
JP4508043B2 (en) | Video surveillance device and video surveillance program | |
CN105187803B (en) | A kind of safe video signal monitoring method based on TV | |
US10165200B2 (en) | Processing multiple image frames | |
US20140176766A1 (en) | Brightness-adjusting system and method thereof and electronic device using same |