TWI645373B - Auto exposure control method and electronic device using the same - Google Patents

Auto exposure control method and electronic device using the same Download PDF

Info

Publication number
TWI645373B
TWI645373B TW106139155A TW106139155A TWI645373B TW I645373 B TWI645373 B TW I645373B TW 106139155 A TW106139155 A TW 106139155A TW 106139155 A TW106139155 A TW 106139155A TW I645373 B TWI645373 B TW I645373B
Authority
TW
Taiwan
Prior art keywords
automatic exposure
weight array
brightness
ratio
overexposure
Prior art date
Application number
TW106139155A
Other languages
Chinese (zh)
Other versions
TW201918996A (en
Inventor
紀雅文
陳世澤
Original Assignee
瑞昱半導體股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 瑞昱半導體股份有限公司 filed Critical 瑞昱半導體股份有限公司
Priority to TW106139155A priority Critical patent/TWI645373B/en
Application granted granted Critical
Publication of TWI645373B publication Critical patent/TWI645373B/en
Publication of TW201918996A publication Critical patent/TW201918996A/en

Links

Abstract

本發明之電子裝置依照由一自動曝光控制方法產生之動態變動的權重陣列進行攝影。此自動曝光控制方法包括:步驟a:取得切割預視畫面為複數個區塊;步驟b:依亮度排序該些區塊,並根據該些區塊的排序與預設權重陣列計算預視畫面的加權平均亮度,以進行自動曝光來得到自動曝光畫面;步驟c:判斷自動曝光畫面之亮度直方圖中的過曝比例或過暗比例是否落入期望區間,以決定是否產生校正權重陣列;步驟d:根據預設權重陣列或校正權重陣列以及該些區塊的排序,計算該預視畫面的該加權平均亮度,以進行自動曝光來得到一目標自動曝光畫面;以及步驟e:判斷目標自動曝光畫面之總體亮度是否落入期望亮度區間,以決定控制電子裝置進行攝影,或者繼續微調預設權重陣列或校正權重陣列。 The electronic device of the present invention performs photography in accordance with a dynamically varying weight array generated by an automatic exposure control method. The automatic exposure control method includes: step a: obtaining a cut preview picture into a plurality of blocks; step b: sorting the blocks according to brightness, and calculating a preview image according to the order of the blocks and the preset weight array; Weighting the average brightness for automatic exposure to obtain an automatic exposure picture; Step c: determining whether the over-exposure ratio or the over-dark ratio in the luminance histogram of the automatic exposure picture falls within a desired interval to determine whether to generate a correction weight array; : calculating the weighted average brightness of the preview picture according to the preset weight array or the correction weight array and the order of the blocks, to perform automatic exposure to obtain a target automatic exposure screen; and step e: determining the target automatic exposure screen Whether the overall brightness falls within the desired brightness interval determines whether the control electronics is to take a picture, or continues to fine tune the preset weight array or correct the weight array.

Description

自動曝光控制方法與使用其之電子裝置 Automatic exposure control method and electronic device using same

本發明乃是關於一種自動曝光控制方法與使用其之電子裝置,特別是指一種能夠動態地調整亮度權重值的自動曝光控制方法與使用其之電子裝置。 The present invention relates to an automatic exposure control method and an electronic device using the same, and more particularly to an automatic exposure control method capable of dynamically adjusting a brightness weight value and an electronic device using the same.

就目前常見的自動曝光控制方法而言,在計算畫面區塊的亮度時,設定亮度權重的常見作法有:使各畫面區塊的權重皆相等、使畫面中間位置區塊被配給的權重最大、按照亮度對區塊排序後再配給不同的權重。然而,於這些作法中,權重值均為固定值。 In the current common automatic exposure control method, when calculating the brightness of a picture block, a common practice of setting the brightness weight is to make the weights of each picture block equal, and to maximize the weight of the picture in the middle position block. The blocks are sorted according to the brightness and then assigned different weights. However, in these practices, the weight values are all fixed values.

在所有區塊給定一個權重且該權重值為固定之預設值的情況下,當有過亮或過暗物體出現於畫面且占畫面比例不大時,較無法及時收斂亮度或增加曝光以提高物體能見度。在根據不同亮度門檻區間給予不同區塊不同權重且該些權重值為固定之預設值的情況下,不同亮度門檻區間對應的該些權重值於設定上是有限制的。此限制在於,不同亮度門檻區間對應的該些權重值間差異不可太大,不然容易因為亮度的來回調整而使畫面出現閃爍。 In the case where all the blocks are given a weight and the weight value is a fixed preset value, when an over-bright or too dark object appears on the screen and the proportion of the image is not large, it is impossible to converge the brightness or increase the exposure in time. Improve object visibility. In the case that different blocks are given different weights according to different brightness thresholds and the weight values are fixed preset values, the weight values corresponding to different brightness threshold intervals are limited in setting. The limitation is that the difference between the weight values corresponding to different brightness threshold intervals may not be too large, or the screen may flicker due to the adjustment of the brightness.

為了能及時收斂亮度或增加曝光以提高物體能見度,且為了避免畫面因亮度的來回調整而出現閃爍的情形,本發明提供了一種能動態地調節預視畫面之亮度的自動曝光控制方法。 In order to be able to converge the brightness in time or increase the exposure to improve the visibility of the object, and to avoid flickering due to the adjustment of the brightness of the picture, the present invention provides an automatic exposure control method capable of dynamically adjusting the brightness of the preview picture.

本發明所提供之自動曝光控制方法適用於一電子裝置。此電子裝置包括攝影模組與控制器,其中控制器執行此自動曝光控制方法以控制攝影模組根據動態變動之一權重陣列進行攝影。此自動曝光控制方法包括:步驟a:取得攝影模組的預視畫面,並將預視畫面切割為複數個區塊;步驟b:根據亮度將該些區塊進行排序,並根據該些區塊的排序與預設權重陣列計算預視畫面的加權平均亮度,以進行自動曝光來得到自動曝光畫面;步驟c:判斷自動曝光畫面之亮度直方圖中的過曝比例是否落入期望過曝區間或過暗比例是否落入期望過暗區間,以決定是否校正攝影模組之預設權重陣列來獲得校正權重陣列;步驟d:根據預設權重陣列或校正權重陣列以及該些區塊的排序,計算預視畫面的加權平均亮度,以進行自動曝光來得到目標自動曝光畫面;以及步驟e:判斷攝影模組的目標自動曝光畫面之總體亮度是否落入期望亮度區間,以決定控制攝影模組根據預設權重陣列或校正權重陣列進行攝影,或者進一步微調預設權重陣列或校正權重陣列。 The automatic exposure control method provided by the present invention is applicable to an electronic device. The electronic device includes a photography module and a controller, wherein the controller performs the automatic exposure control method to control the photography module to perform photography according to one of the dynamic arrays of weights. The automatic exposure control method includes: step a: obtaining a preview image of the photography module, and cutting the preview image into a plurality of blocks; and step b: sorting the blocks according to the brightness, and according to the blocks Sorting and preset weight arrays to calculate the weighted average brightness of the preview image for automatic exposure to obtain an automatic exposure screen; Step c: determining whether the overexposure ratio in the luminance histogram of the automatic exposure screen falls within a desired overexposure interval or Whether the over dark ratio falls within the desired dark interval to determine whether to correct the preset weight array of the photographic module to obtain the correction weight array; Step d: calculate according to the preset weight array or the correction weight array and the order of the blocks Pre-viewing the weighted average brightness of the picture for automatic exposure to obtain the target automatic exposure picture; and step e: determining whether the overall brightness of the target automatic exposure picture of the photography module falls within the desired brightness interval, to determine the control photography module according to the pre- Set the weight array or correction weight array for photography, or further fine tune the preset weight array or correct the weight array.

另外,本發明也提供了一種電子裝置,此電子裝置包括攝影模組、記憶體與控制器。記憶體設置以儲存一自動曝光控制程式。控制器連接於攝影模組與記憶體,且設置以執行該自動曝光控制程式來控制攝影模組根據動態變動之一權重陣列進行攝影。於此電子裝置中,控制器運行自動曝光控制程式以執行前述之自動曝光控制方法。 In addition, the present invention also provides an electronic device including a photographic module, a memory and a controller. The memory is set to store an automatic exposure control program. The controller is coupled to the camera module and the memory, and is configured to execute the automatic exposure control program to control the camera module to perform photography according to one of the dynamic arrays of weights. In this electronic device, the controller runs an automatic exposure control program to perform the aforementioned automatic exposure control method.

1‧‧‧電子裝置 1‧‧‧Electronic device

10‧‧‧攝影模組 10‧‧‧Photography module

20‧‧‧記憶體 20‧‧‧ memory

20a‧‧‧自動曝光程式 20a‧‧‧Auto Exposure Program

30‧‧‧控制器 30‧‧‧ Controller

a~e‧‧‧步驟 a~e‧‧‧step

c1、c2、c3‧‧‧步驟 C1, c2, c3‧‧‧ steps

c3-1、c3-2、c3-3、c3-4、c3-5、c3-6‧‧‧步驟 Steps c3-1, c3-2, c3-3, c3-4, c3-5, c3-6‧‧

e1、e2、e3‧‧‧步驟 E1, e2, e3‧‧‧ steps

IM‧‧‧預視畫面 IM‧‧‧ preview screen

T0、T1~T24‧‧‧區塊 T0, T1~T24‧‧‧ blocks

D1、D2‧‧‧過暗比例 D1, D2‧‧‧ too dark ratio

N1‧‧‧預設曝光調整指數 N1‧‧‧Preset Exposure Adjustment Index

N2、N3‧‧‧校正曝光調整指數 N2, N3‧‧‧corrected exposure adjustment index

B1、B2、B3‧‧‧過曝比例 B1, B2, B3‧‧‧ overexposure ratio

BT‧‧‧目標過曝比例 BT‧‧‧ target overexposure ratio

圖1A為根據本發明一例示性實施例繪示之自動曝光控制方法的流程圖。 FIG. 1A is a flow chart of an automatic exposure control method according to an exemplary embodiment of the invention.

圖1B為根據本發明一例示性實施例繪示之自動曝光控制方法中步驟c的流程圖。 FIG. 1B is a flow chart of step c in the automatic exposure control method according to an exemplary embodiment of the invention.

圖1C為根據本發明一例示性實施例繪示之自動曝光控制方法中步驟c3的流程圖。 1C is a flow chart of step c3 in the automatic exposure control method according to an exemplary embodiment of the invention.

圖1D為根據本發明一例示性實施例繪示之自動曝光控制方法中步驟e的流程圖。 FIG. 1D is a flow chart of step e in the automatic exposure control method according to an exemplary embodiment of the invention.

圖2為根據本發明一例示性實施例繪示之自動曝光控制方法中執行步驟a與步驟b的示意圖。 2 is a schematic diagram of performing steps a and b in an automatic exposure control method according to an exemplary embodiment of the invention.

圖3為根據本發明一例示性實施例繪示之自動曝光控制方法中執行步驟c的示意圖。 FIG. 3 is a schematic diagram of performing step c in an automatic exposure control method according to an exemplary embodiment of the invention.

圖4A與圖4B為根據本發明一例示性實施例繪示之自動曝光控制方法中亮度直方圖的示意圖。 4A and 4B are schematic diagrams showing a luminance histogram in an automatic exposure control method according to an exemplary embodiment of the invention.

圖5A、圖5B與圖5C分別為根據本發明一例示性實施例繪示之自動曝光控制方法中低光優先權重陣列、平均權重陣列與高光優先權重陣列的示意圖。 5A, 5B, and 5C are schematic diagrams of a low light priority re-array, an average weighted array, and a high-light priority re-array, respectively, in an automatic exposure control method according to an exemplary embodiment of the present invention.

圖6為根據本發明一例示性實施例繪示之電子裝置的流程圖。 FIG. 6 is a flow chart of an electronic device according to an exemplary embodiment of the invention.

在下文將參看隨附圖式更充分地描述各種例示性實施例,在隨附圖式中展示一些例示性實施例。然而,本發明概念可能以許多不同形式來體現,且不應解釋為限於本文中所闡述之例示性實施例。確切而言,提供此等例示性實施例使得本發明將為詳盡且完整,且將向熟習此項技術者充分傳達本發明概念的範疇。在諸圖式中,類似數字始終指示類似元件。 Various illustrative embodiments are described more fully hereinafter with reference to the accompanying drawings. However, the inventive concept may be embodied in many different forms and should not be construed as being limited to the illustrative embodiments set forth herein. Rather, these exemplary embodiments are provided so that this invention will be in the In the figures, like numerals are used to indicate like elements.

[自動曝光控制方法的一實施例] [An embodiment of an automatic exposure control method]

本實施例所提供之自動曝光控制方法適用於具有攝影功能的電子裝置,如:手機、平板電腦、監視裝置…等。大體而言,利 用本實施例所提供之自動曝光控制方法,能夠動態地提供用以調節電子裝置之拍攝畫面亮度的權重陣列。 The automatic exposure control method provided in this embodiment is applicable to an electronic device having a photographing function, such as a mobile phone, a tablet computer, a monitoring device, and the like. In general, Lee With the automatic exposure control method provided in this embodiment, it is possible to dynamically provide a weight array for adjusting the brightness of the captured picture of the electronic device.

請參照圖1A,圖1A為根據本發明一例示性實施例繪示之自動曝光控制方法的流程圖。 Please refer to FIG. 1A. FIG. 1A is a flowchart of an automatic exposure control method according to an exemplary embodiment of the present invention.

如圖1A所示,本實施例所提供之自動曝光控制方法大致包括以下步驟:步驟a:取得攝影模組的預視畫面,並將預視畫面切割為複數個區塊;步驟b:根據亮度將該些區塊進行排序,並根據一預設權重陣列計算預視畫面的加權平均亮度以進行自動曝光,得到自動曝光畫面;步驟c:判斷自動曝光畫面之亮度直方圖中的過曝比例是否落入期望過曝區間或過暗比例是否落入期望過暗區間,以決定是否校正攝影模組之預設權重陣列來獲得校正權重陣列;步驟d:根據步驟c決定的預設權重陣列或校正權重陣列以及該些區塊的排序,計算預視畫面的加權平均亮度以進行自動曝光,得到目標自動曝光畫面;以及步驟e:判斷目標自動曝光畫面之總體亮度是否落入期望亮度區間,以決定控制攝影模組根據步驟c決定的預設權重陣列或校正權重陣列進行攝影,或者進一步微調預設權重陣列或校正權重陣列。 As shown in FIG. 1A, the automatic exposure control method provided in this embodiment generally includes the following steps: Step a: Obtain a preview image of the camera module, and cut the preview image into a plurality of blocks; Step b: According to the brightness Sorting the blocks, and calculating a weighted average brightness of the preview image according to a preset weight array for automatic exposure to obtain an automatic exposure screen; Step c: determining whether the overexposure ratio in the luminance histogram of the automatic exposure screen is Whether the desired overexposure interval or the over dark ratio falls within the desired over dark interval to determine whether to correct the preset weight array of the photographic module to obtain the correction weight array; step d: the preset weight array or correction determined according to step c The weight array and the ordering of the blocks, calculating the weighted average brightness of the preview picture for automatic exposure to obtain the target automatic exposure picture; and step e: determining whether the overall brightness of the target automatic exposure picture falls within the desired brightness interval to determine The control photography module performs photography according to the preset weight array or the correction weight array determined in step c, or further Correcting the preset weight or the weight array weight array.

接下來,將進一步說明本實施例所提供之自動曝光控制方法中各步驟的細節。 Next, the details of the respective steps in the automatic exposure control method provided by the present embodiment will be further explained.

首先請參照圖2,圖2為根據本發明一例示性實施例繪示之自動曝光控制方法中執行步驟a與步驟b的示意圖。 Referring first to FIG. 2, FIG. 2 is a schematic diagram of performing steps a and b in an automatic exposure control method according to an exemplary embodiment of the invention.

如圖2所示,於步驟a中,先取得電子裝置的預視畫面IM,並將預視畫面IM切割為複數個區塊。為便於說明,於本實施例中,預視畫面IM被設定切割為25個區塊T0~T24。接著於步驟b中,會根據亮度將預視畫面IM的25個區塊T0~T24進行排序。為便於說明,於本實施例中,區塊T0的亮度最低而區塊T24的亮度最高。接著,將根據一預設權重陣列計算預視畫面的加權平均亮度,並據 以進行自動曝光,以得到自動曝光畫面。須說明的是,此預設權重陣列對應有一預設曝光調整指數N。 As shown in FIG. 2, in step a, the preview screen IM of the electronic device is first acquired, and the preview screen IM is cut into a plurality of blocks. For convenience of explanation, in the present embodiment, the preview screen IM is set to be cut into 25 blocks T0 to T24. Next, in step b, the 25 blocks T0 to T24 of the preview screen IM are sorted according to the brightness. For convenience of explanation, in the present embodiment, the luminance of the block T0 is the lowest and the luminance of the block T24 is the highest. Then, the weighted average brightness of the preview image is calculated according to a preset weight array, and For automatic exposure to get an automatic exposure screen. It should be noted that the preset weight array corresponds to a preset exposure adjustment index N.

請同時參照圖5A~圖5C以了解權重陣列的細節,圖5A、圖5B與圖5C分別為根據本發明一例示性實施例繪示之自動曝光控制方法中低光優先權重陣列、平均權重陣列與高光優先權重陣列的示意圖。圖5A、圖5B與圖5C中的低光優先權重陣列、平均權重陣列與高光優先權重陣列為三種用以計算預視畫面的加權平均亮度但權重分布不同的權重陣列。於低光優先權重陣列中,低亮度區塊被分配到的權重較大,計算出的加權平均亮度較低,以此低估的加權平均亮度經自動曝光後,會得到較大的曝光效果,故在本實施例中,將此低光優先權重陣列對應的曝光調整指數N定為100;反之,於高光優先權重陣列中,高亮度區塊被分配到的權重較大,經自動曝光後,會得到較小的曝光效果,所對應的曝光調整指數N定為0。此外,於平均權重陣列中,亮度居中的區塊被分配到的權重較大,亮度偏高或偏低的區塊被分配到的權重較小,所對應的曝光調整指數N定為50。本實施例中,可藉由內插低光優先權重陣列、平均權重陣列與高光優先權重陣列其中二陣列,以得到其他曝光調整指數N所對應的權重陣列。 Please refer to FIG. 5A to FIG. 5C for details of the weight array. FIG. 5A, FIG. 5B and FIG. 5C are respectively a low light priority re-array and an average weight array in the automatic exposure control method according to an exemplary embodiment of the present invention. Schematic diagram of a heavy array with high light priority. The low-light priority re-array, the average weighted array, and the high-light priority re-array in FIGS. 5A, 5B, and 5C are three weighting arrays for calculating the weighted average luminance of the preview picture but having different weight distributions. In the low-light priority re-array, the low-luminance block is assigned a larger weight, and the calculated weighted average brightness is lower, so that the underestimated weighted average brightness is automatically exposed, and a larger exposure effect is obtained. In this embodiment, the exposure adjustment index N corresponding to the low-light priority re-array is set to 100; conversely, in the high-light priority re-array, the high-luminance block is assigned a larger weight, and after automatic exposure, A smaller exposure effect is obtained, and the corresponding exposure adjustment index N is set to zero. In addition, in the average weight array, the block in which the brightness is centered is assigned a larger weight, and the block in which the brightness is higher or lower is assigned a smaller weight, and the corresponding exposure adjustment index N is set to 50. In this embodiment, the weight array corresponding to the other exposure adjustment index N can be obtained by interpolating the low-light priority re-array, the average weight array, and the two arrays of the high-light priority re-array.

接下來,將說明的是本實施例所提供之自動曝光控制方法中步驟c的細節。 Next, the details of the step c in the automatic exposure control method provided by the present embodiment will be explained.

首先請參照圖1B,圖1B為根據本發明一例示性實施例繪示之自動曝光控制方法中步驟c的流程圖。 First, please refer to FIG. 1B. FIG. 1B is a flowchart of step c in the automatic exposure control method according to an exemplary embodiment of the present invention.

如圖1B所示,本實施例所提供之自動曝光控制方法中的步驟c是以以下步驟來實現:判斷自動曝光畫面之亮度直方圖中的過曝比例是否落入期望過曝區間或過暗比例是否落入該期望過暗區間(步驟c1);若自動曝光畫面之亮度直方圖中的過曝比例落入期望過曝區間或過暗比例落入該期望過暗區間,則不校正預設權重陣列(步驟c2);以及若自動曝光畫面之亮度直方圖中的過曝比例未落入 期望過曝區間或過暗比例未落入期望過暗區間,則校正預設權重陣列以獲得校正權重陣列(步驟c3)。 As shown in FIG. 1B, step c in the automatic exposure control method provided in this embodiment is implemented by determining whether the overexposure ratio in the luminance histogram of the automatic exposure screen falls within a desired overexposure interval or is too dark. Whether the ratio falls within the expected over dark interval (step c1); if the overexposure ratio in the luminance histogram of the auto exposure screen falls within the desired overexposure interval or the over dark ratio falls within the desired over dark interval, the preset is not corrected Weight array (step c2); and if the overexposure ratio in the luminance histogram of the auto exposure screen does not fall If it is desired that the overexposure interval or the over dark ratio does not fall within the desired over dark interval, the preset weight array is corrected to obtain a correction weight array (step c3).

接著請參照圖3、圖4A與圖4B,圖3為根據本發明一例示性實施例繪示之自動曝光控制方法中執行步驟c的示意圖。另外,圖4A與圖4B為根據本發明一例示性實施例繪示之自動曝光控制方法中亮度直方圖的示意圖。 Referring to FIG. 3, FIG. 4A and FIG. 4B, FIG. 3 is a schematic diagram of performing step c in the automatic exposure control method according to an exemplary embodiment of the invention. In addition, FIG. 4A and FIG. 4B are schematic diagrams showing a luminance histogram in an automatic exposure control method according to an exemplary embodiment of the invention.

於本實施例中,根據電子裝置之當前運作模式的不同,步驟c的執行細節會略有差異。一般而言,於環境光線較強時,電子裝置中具有攝影功能的模組可選擇工作於白天模式,而於環境光線較弱時,電子裝置中具有攝影功能的模組可選擇工作於夜晚模式。 In this embodiment, the execution details of step c may be slightly different depending on the current mode of operation of the electronic device. In general, when the ambient light is strong, the module with the photographic function in the electronic device can choose to work in the day mode, and when the ambient light is weak, the module with the photographic function in the electronic device can choose to work in the night mode. .

在白天模式下,由於環境光線較充足,若基於預視畫面未經加權的平均亮度進行自動曝光,容易誤導使曝光補償不足,造成部分景物過暗的情形,因此執行本實施例所提供之自動曝光控制方法,將以適當的權重陣列計算預視畫面的加權平均亮度,以進行自動曝光,目的主要是要將白天模式下畫面的過暗比例調整到適當值。在夜晚模式下,由於環境光線較不足容易誤導補償而造成部分景物過曝的情形,因此執行本實施例所提供之自動曝光控制方法的目的主要是要將夜晚模式下畫面的過曝比例調整到適當值。 In the daytime mode, since the ambient light is sufficient, if the automatic exposure is performed based on the unweighted average brightness of the preview image, it is easy to mislead to make the exposure compensation insufficient, causing some scenes to be too dark, so the automatic provided by the embodiment is executed. In the exposure control method, the weighted average brightness of the preview picture is calculated with an appropriate weight array for automatic exposure, and the main purpose is to adjust the over-dark ratio of the picture in the day mode to an appropriate value. In the night mode, the situation of the automatic exposure control method provided by the embodiment is mainly to adjust the overexposure ratio of the screen in the night mode to the situation that the partial scene is overexposed due to the lack of ambient light and the misleading compensation. Appropriate value.

須說明的是,該發明所屬技術領域中具有通常知識者對於畫面的亮度直方圖、亮度直方圖中的過曝比例與過暗比例應能理解,故於此不針對該些名詞作說明。 It should be noted that those having ordinary knowledge in the technical field of the invention should understand the brightness histogram of the picture, the overexposure ratio and the over dark ratio in the luminance histogram, and therefore, the terms are not described herein.

以下將舉例說明在夜晚模式下步驟c的執行細節。 The details of the execution of step c in the night mode will be exemplified below.

在夜晚模式下,於步驟c1中,會判斷自動曝光畫面之亮度直方圖中的過曝比例是否落入期望過曝區間。須說明的是,於步驟c中,最理想的方式是將自動曝光畫面之亮度直方圖中的過曝比例調整到如圖3所示之目標過曝比例BT。然而,考量到自動曝光畫面的亮度直方圖可能會因為雜訊產生微幅的變動,因此只要自動曝 光畫面IM之亮度直方圖中的過曝比例能落入一期望過曝區間,即可視為達到目標過曝比例BT。也就是說,此期望過曝區間可視為以目標過曝比例BT為中心的一容忍區間。 In the night mode, in step c1, it is determined whether the overexposure ratio in the luminance histogram of the auto exposure screen falls within the desired overexposure interval. It should be noted that, in step c, the most ideal way is to adjust the overexposure ratio in the luminance histogram of the auto exposure screen to the target overexposure ratio BT as shown in FIG. However, considering the brightness histogram of the auto exposure screen may cause slight fluctuations due to noise, so as long as the automatic exposure The overexposure ratio in the luminance histogram of the light picture IM can fall within a desired overexposure interval, and can be regarded as reaching the target overexposure ratio BT. That is to say, this expected overexposure interval can be regarded as a tolerance interval centered on the target overexposure ratio BT.

假設在夜晚模式下目標過曝比例BT為30%,且假設期望過曝區間為目標過曝比例BT±3%,即,期望過曝區間為27%~33%。此時,若自動曝光畫面之亮度直方圖中的過曝比例為31%,則進入步驟c2,不校正預設權重陣列。然此時,若自動曝光畫面之亮度直方圖中的過曝比例為60%,則進入步驟c3,校正預設權重陣列以獲得校正權重陣列。 Assume that the target overexposure ratio BT is 30% in the night mode, and assume that the expected overexposure interval is the target overexposure ratio BT ± 3%, that is, the expected overexposure interval is 27% to 33%. At this time, if the overexposure ratio in the luminance histogram of the automatic exposure screen is 31%, the process proceeds to step c2, and the preset weight array is not corrected. At this time, if the overexposure ratio in the luminance histogram of the auto exposure screen is 60%, the process proceeds to step c3, and the preset weight array is corrected to obtain a correction weight array.

於以下的敘述中,將同時參照圖1C與圖3來說明校正預設權重陣列獲得校正權重陣列的細節(即,步驟c3的細節);然而,須先說明地是,由於此例係用以說明夜晚模式下步驟c3的細節,而於本實施例中,夜晚模式下是針對目標過曝比例來進行設定,因此於步驟c3之下的各步驟中均僅須針對過曝比例進行計算,而不須針對過暗比例進行計算。 In the following description, the details of correcting the preset weight array to obtain the correction weight array (ie, the details of step c3) will be explained with reference to FIG. 1C and FIG. 3 simultaneously; however, it should be explained that, since this example is used The details of the step c3 in the night mode are explained, and in the embodiment, the night mode is set for the target overexposure ratio, so in each step below the step c3, only the overexposure ratio is calculated, and It is not necessary to calculate for a dark ratio.

圖1C為根據本發明一例示性實施例繪示之自動曝光控制方法中步驟c3的流程圖。如圖1C所示,步驟c3包括:計算過曝比例與目標過曝比例的差值(步驟c3-1);根據過曝比例與目標過曝比例的差值或過暗比例與目標過暗比例的差值,估算校正曝光調整指數(步驟c3-2);根據校正曝光調整指數,計算校正權重陣列(步驟c3-3);根據校正權重陣列以及與些區塊的排序,計算預視畫面的加權平均亮度並據以進行自動曝光,得到校正自動曝光畫面(步驟c3-4);判斷校正自動曝光畫面之亮度直方圖中的過曝比例是否落入期望過曝區間(步驟c3-5);以及若校正自動曝光畫面之亮度直方圖中的過曝比例落入期望過曝區間,則不調整校正權重陣列(步驟c3-6)。須說明的是,於步驟c3-5中,若校正自動曝光畫面之該亮度直方圖中的過曝比例未落入期望過曝區間,則再次由步驟c3-1開始執行,以繼續調整校正權重陣列。 1C is a flow chart of step c3 in the automatic exposure control method according to an exemplary embodiment of the invention. As shown in FIG. 1C, step c3 includes: calculating a difference between the overexposure ratio and the target overexposure ratio (step c3-1); according to the difference between the overexposure ratio and the target overexposure ratio or the ratio of over darkness to the target over dark ratio The difference is estimated, the corrected exposure adjustment index is estimated (step c3-2); the correction weight array is calculated according to the corrected exposure adjustment index (step c3-3); and the preview image is calculated according to the correction weight array and the ordering of the blocks Weighting the average brightness and performing automatic exposure according to the result, obtaining a corrected automatic exposure picture (step c3-4); determining whether the over-exposure ratio in the brightness histogram of the corrected automatic exposure picture falls within a desired over-exposure interval (step c3-5); And if the overexposure ratio in the luminance histogram of the corrected auto exposure screen falls within the desired overexposure interval, the correction weight array is not adjusted (step c3-6). It should be noted that, in step c3-5, if the overexposure ratio in the luminance histogram of the corrected auto exposure screen does not fall within the expected overexposure interval, execution is again performed by step c3-1 to continue to adjust the correction weight. Array.

如圖3所示,假設電子裝置中具有攝影功能的模組具有預設權重陣列,且此預設權重陣列對應的預設曝光調整指數N1為70。再者,假設預設權重陣列所產生的自動曝光畫面的亮度直方圖如圖4A所示,且其過曝比例B1(對應於圖3中之過曝比例B1)為60%;此外,假設目標過曝比例BT為30%。 As shown in FIG. 3, it is assumed that the module having the photographing function in the electronic device has a preset weight array, and the preset exposure adjustment index N1 corresponding to the preset weight array is 70. Furthermore, it is assumed that the luminance histogram of the auto exposure screen generated by the preset weight array is as shown in FIG. 4A, and the overexposure ratio B1 (corresponding to the overexposure ratio B1 in FIG. 3) is 60%; The overexposure ratio BT is 30%.

於步驟c3-1中,會先計算過曝比例B1與目標過曝比例BT的差值,即-30%。接著,於步驟c3-2中,再根據過曝比例B1與目標過曝比例BT的差值,估算校正曝光調整指數N2。進一步說明,由於過曝比例B1與目標過曝比例BT之間存在差值-30%,依此差值將估算出較預設曝光調整指數N1小的校正曝光調整指數N2(如圖3所示,假設校正曝光調整指數N2為60)。最後,於步驟c3-3中,將根據校正曝光調整指數N2,計算校正權重陣列。須說明的是,於步驟c3-2中,根據過曝比例B1與目標過曝比例BT的差值,將先估算出一曝光調整指數偏移量,接著將此曝光調整指數偏移量加上預設權重陣列之預設曝光調整指數N1來獲得校正曝光調整指數N2。也就是說,校正曝光調整指數N2為曝光調整指數偏移量與預設權重陣列之預設曝光調整指數N1的和。值得注意地是,估算曝光調整指數偏移量的方法有很多種,於本實施例中,是以「過曝比例B1與目標過曝比例BT的差值」的k倍做為曝光調整指數偏移量(其中k>0),但本發明並不以此為限。 In step c3-1, the difference between the overexposure ratio B1 and the target overexposure ratio BT, that is, -30%, is first calculated. Next, in step c3-2, the corrected exposure adjustment index N2 is estimated based on the difference between the overexposure ratio B1 and the target overexposure ratio BT. Further, since there is a difference of -30% between the overexposure ratio B1 and the target overexposure ratio BT, the corrected exposure adjustment index N2 smaller than the preset exposure adjustment index N1 is estimated according to the difference (as shown in FIG. 3). , assuming that the corrected exposure adjustment index N2 is 60). Finally, in step c3-3, the correction weight array will be calculated based on the corrected exposure adjustment index N2. It should be noted that, in step c3-2, according to the difference between the overexposure ratio B1 and the target overexposure ratio BT, an exposure adjustment index offset is first estimated, and then the exposure adjustment index offset is added. The preset exposure adjustment index N1 is preset by the preset exposure adjustment index N1 of the weight array. That is, the corrected exposure adjustment index N2 is the sum of the exposure adjustment index offset and the preset exposure adjustment index N1 of the preset weight array. It is worth noting that there are many methods for estimating the exposure adjustment index offset. In this embodiment, the k times the difference between the overexposed ratio B1 and the target overexposure ratio BT is used as the exposure adjustment index. The amount of shift (where k > 0), but the invention is not limited thereto.

於步驟c3-3中,校正權重陣列是利用前述低光優先權重陣列、平均權重陣列與高光優先權重陣列的其中兩個內插所得到的。承上例,由於在步驟c3-2中所估算出的校正曝光調整指數N2為60,故此時於步驟c3-3中是由低光優先權重陣列(對應N=100)與平均權重陣列(對應N=50)內插計算出曝光調整指數為60的校正權重陣列。 In step c3-3, the correction weight array is obtained by using two of the aforementioned low light priority re-array, average weight array, and high light priority re-array. In the above example, since the corrected exposure adjustment index N2 estimated in step c3-2 is 60, at this time, in step c3-3, the low light priority re-array (corresponding to N=100) and the average weight array (corresponding to N=50) Interpolation calculates a correction weight array with an exposure adjustment index of 60.

接下來,於步驟c3-4中,會根據步驟c-3中所計算出之曝光調整指數為60的校正權重陣列來計算預視畫面的加權平均亮度並據以進行自動曝光,得到校正自動曝光畫面。值得注意地是,此時由於權重陣列被重新設定,因此校正自動曝光畫面之亮度直方圖也會跟著變化。於此,假設預設權重陣列經過第一次校正後,校正自動曝光畫面的亮度直方圖如圖4B所示,且根據此亮度直方圖所得到之校正自動曝光畫面的過曝比例B2為53%(對應圖3中的過曝比例B2)。 Next, in step c3-4, the weighted average brightness of the preview image is calculated according to the correction weight array whose exposure adjustment index is 60 calculated in step c-3, and the automatic exposure is performed according to the automatic exposure. Picture. Notably, at this time, since the weight array is reset, the luminance histogram of the corrected auto exposure screen will also change. Here, assuming that the preset weight array is subjected to the first correction, the brightness histogram of the corrected automatic exposure picture is as shown in FIG. 4B, and the overexposure ratio B2 of the corrected automatic exposure picture obtained according to the brightness histogram is 53%. (corresponding to the overexposure ratio B2 in Fig. 3).

為了確認經過第一次校正後所產生的校正權重陣列能否使得校正自動曝光畫面的過曝比例B2達到目標過曝比例BT(即,30%),於步驟c3-5中,會根據校正自動曝光畫面之亮度直方圖判斷校正自動曝光畫面的過曝比例B2是否落入一期望過曝區間。假設期望過曝區間為目標過曝比例BT±3%,則於此例中,期望過曝區間為27%~33%,故校正自動曝光畫面的過曝比例B2顯然未落入27%~33%。於是,便再次由步驟c3-1開始執行,以繼續調整校正權重陣列。 In order to confirm whether the correction weight array generated after the first correction can make the overexposure ratio B2 of the corrected auto exposure screen reach the target overexposure ratio BT (ie, 30%), in step c3-5, the correction is automatically performed according to the correction. The brightness histogram of the exposure screen determines whether the overexposure ratio B2 of the corrected auto exposure screen falls within a desired overexposure interval. Assume that the overexposure interval is expected to be BT±3% of the target overexposure ratio. In this case, the overexposure interval is expected to be 27%~33%, so the overexposure ratio B2 of the corrected auto exposure screen does not fall into 27%~33. %. Thus, execution is again performed by step c3-1 to continue adjusting the correction weight array.

再次執行前述步驟c3-1與步驟c3-2後將獲得另一個校正曝光調整指數N3。此校正曝光調整指數N3為估算之一曝光調整指數偏移量與當前之校正權重陣列之校正曝光調整指數N2的和。假設,所估算出之曝光調整指數偏移量與當前之校正權重陣列之校正曝光調整指數N2的和為40(即,校正曝光調整指數N3=40)。於是,在步驟c3-3中會由高光優先權重陣列(對應N=0)與平均權重陣列(對應N=50)內插計算出曝光調整指數為40的校正權重陣列。接著於步驟c3-4中,會根據步驟c3-3中所計算出之曝光調整指數為40的校正權重陣列來再次計算預視畫面的加權平均亮度並據以進行自動曝光,得到新的校正自動曝光畫面。此時,由於權重陣列再次被重新設定,因此校正自動曝光畫面之亮度直方圖也會跟著變 化。於此,假設預設權重陣列經過第二次校正後,根據校正自動曝光畫面的亮度直方圖所得到的過曝比例B3為32%。 Another corrected exposure adjustment index N3 will be obtained after performing the aforementioned steps c3-1 and c3-2 again. The corrected exposure adjustment index N3 is a sum of the estimated exposure adjustment index offset and the corrected exposure adjustment index N2 of the current correction weight array. It is assumed that the sum of the estimated exposure adjustment index offset and the corrected exposure adjustment index N2 of the current correction weight array is 40 (i.e., the corrected exposure adjustment index N3 = 40). Thus, in step c3-3, a correction weight array having an exposure adjustment index of 40 is calculated by interpolating the highlight priority array (corresponding to N=0) and the average weight array (corresponding to N=50). Then, in step c3-4, the weighted average brightness of the preview image is calculated again according to the correction weight array whose exposure adjustment index is 40 calculated in step c3-3, and the automatic exposure is performed according to the automatic exposure, and a new correction automatic is obtained. Exposure screen. At this time, since the weight array is reset again, the brightness histogram of the corrected auto exposure screen will also change. Chemical. Here, assuming that the preset weight array is subjected to the second correction, the overexposure ratio B3 obtained by correcting the luminance histogram of the automatic exposure screen is 32%.

為了再次確認經過第二次校正後所產生的校正權重陣列能否使得校正自動曝光畫面的過曝比例B3達到目標過曝比例BT(即,30%),於步驟c3-5中,會根據校正自動曝光畫面之亮度直方圖再次判斷其過曝比例B3是否落入期望過曝區間(即,27%~33%)。此時,由於校正自動曝光畫面的過曝比例B3為32%,故可視為其已達到目標過曝比例BT,於是於步驟c3-6中便停止調整校正權重陣列。 In order to reconfirm whether the correction weight array generated after the second correction can make the overexposure ratio B3 of the corrected auto exposure screen reach the target overexposure ratio BT (ie, 30%), in step c3-5, according to the correction The brightness histogram of the auto exposure screen again determines whether the overexposure ratio B3 falls within the desired overexposure interval (ie, 27% to 33%). At this time, since the overexposure ratio B3 of the corrected auto exposure screen is 32%, it can be regarded as having reached the target overexposure ratio BT, and then the adjustment of the correction weight array is stopped in step c3-6.

值得注意地是,於本實施例中,在白天模式下自動曝光控制方法之步驟c3-1至步驟c3-6的執行細節類似於在夜晚模式下自動曝光控制方法之步驟c3-1至步驟c3-6的執行細節,惟兩者差別在於,在白天模式下,於步驟c3-1至步驟c3-3中,將根據自動曝光畫面之亮度直方圖中的過暗比例,計算出校正權重陣列。舉例來說,可以「過暗比例與目標過暗比例的差值」的k倍做為曝光調整指數偏移量(其中k<0),但本發明並不以此為限。另外,於步驟c3-5至步驟c3-6中,將判斷校正自動曝光畫面之亮度直方圖中的過暗比例是否落入期望過暗區間,以決定是否調整校正權重陣列。因此,關於在白天模式下自動曝光控制方法之步驟c3-1至步驟c3-6的執行細節可參照前述說明,且關於此處所述之自動曝光畫面之亮度直方圖中的過暗比例可參照圖4A與圖4B之亮度直方圖中所標示的過暗比例D1及D2。 Notably, in the present embodiment, the execution details of steps c3-1 to c3-6 of the automatic exposure control method in the day mode are similar to steps c3-1 to c3 of the automatic exposure control method in the night mode. The execution details of -6, but the difference between the two is that in the day mode, in steps c3-1 to c3-3, the correction weight array is calculated according to the darkness ratio in the luminance histogram of the automatic exposure screen. For example, k times the difference between the ratio of the darkness ratio and the target darkness ratio may be used as the exposure adjustment index offset (where k<0), but the invention is not limited thereto. In addition, in step c3-5 to step c3-6, it is judged whether or not the over-dark ratio in the luminance histogram of the corrected auto-exposure picture falls within the desired over-dark interval to decide whether to adjust the correction weight array. Therefore, regarding the execution details of the steps c3-1 to c3-6 of the automatic exposure control method in the day mode, reference may be made to the foregoing description, and the darkness ratio in the luminance histogram of the automatic exposure screen described herein may be referred to. The over-dark ratios D1 and D2 indicated in the luminance histograms of Figures 4A and 4B.

另外也值得注意地是,圖4A與圖4B中的亮度直方圖、圖5A至圖5C中的權重陣列,以及圖3中曝光調整指數、過曝比例與過暗比例的數值均僅用以描述步驟c至步驟e的執行細節,而不用以限制本發明。 It is also worth noting that the luminance histograms in FIGS. 4A and 4B, the weight arrays in FIGS. 5A to 5C, and the exposure adjustment index, overexposure ratio, and over-dark ratio values in FIG. 3 are only used to describe The details of the execution of steps c to e are not intended to limit the invention.

在完成校正權重陣列的調整後,進入步驟d,以根據校正權重陣列以及該些區塊的排序,計算預視畫面的加權平均亮度並據以 進行自動曝光,得到目標自動曝光畫面。須說明的是,若於步驟c中預設權重陣列不須校正,則於步驟d便根據預設權重陣列以及該些區塊的排序,計算預視畫面的加權平均亮度並據以進行自動曝光,得到目標自動曝光畫面。 After the adjustment of the correction weight array is completed, the process proceeds to step d to calculate the weighted average brightness of the preview picture according to the correction weight array and the order of the blocks. Perform automatic exposure to get the target auto exposure screen. It should be noted that if the preset weight array does not need to be corrected in step c, then in step d, the weighted average brightness of the preview picture is calculated according to the preset weight array and the order of the blocks, and the automatic exposure is performed accordingly. , get the target auto exposure screen.

最後,經過步驟a至步驟d之處理後,目標自動曝光畫面之過曝比例或過暗比例已滿足要求,但仍需檢視其總體亮度是否適當,因此將執行步驟e。於步驟e中,將判斷目標自動曝光畫面之總體亮度是否落入一期望亮度區間,以決定控制攝影模組根據步驟c決定的預設權重陣列或校正權重陣列進行攝影,或者進一步微調步驟c決定的預設權重陣列或校正權重陣列。 Finally, after the processing from step a to step d, the overexposure ratio or the over dark ratio of the target auto exposure screen has met the requirements, but it is still necessary to check whether the overall brightness is appropriate, so step e will be performed. In step e, it is determined whether the overall brightness of the target auto-exposure screen falls within a desired brightness interval, to determine whether the control photography module performs photography according to the preset weight array or the correction weight array determined in step c, or further fine-tunes step c. Preset weight array or correction weight array.

請參照圖1D,圖1D為根據本發明一例示性實施例繪示之自動曝光控制方法中步驟e的流程圖。 Please refer to FIG. 1D. FIG. 1D is a flowchart of step e in the automatic exposure control method according to an exemplary embodiment of the present invention.

如圖1D所示,於本實施例中,步驟e包括:判斷目標自動曝光畫面之總體亮度是否落入期望亮度區間(步驟e1);若目標自動曝光畫面之總體亮度落入期望亮度區間,則控制攝影模組根據步驟c決定的預設權重陣列或校正權重陣列進行攝影(步驟e2);以及若目標自動曝光畫面之總體亮度未落入期望亮度區間,則調整攝影模組之至少一亮度控制參數,並再次由步驟b開始執行,以微調步驟c決定的預設權重陣列或校正權重陣列(步驟e3)。 As shown in FIG. 1D, in the embodiment, step e includes: determining whether the overall brightness of the target auto exposure screen falls within a desired brightness interval (step e1); if the overall brightness of the target auto exposure screen falls within a desired brightness interval, Controlling the photography module to perform photography according to the preset weight array or the correction weight array determined in step c (step e2); and adjusting at least one brightness control of the photography module if the overall brightness of the target automatic exposure screen does not fall within the desired brightness interval The parameters are again executed by step b to fine tune the preset weight array or the correction weight array determined in step c (step e3).

須說明的是,於步驟e3中,會先調整攝影模組之至少一亮度控制參數,如:感光元件感光值、曝光時間…等。然而,一旦攝影模組之感光元件感光值或曝光時間經調整,其預視畫面中各區塊的亮度也會跟著變動,於是,便需要再次由步驟b開始執行,以達到微調步驟c決定的預設權重陣列或校正權重陣列的目的。 It should be noted that, in step e3, at least one brightness control parameter of the camera module, such as the photosensitive element photosensitive value, exposure time, etc., is first adjusted. However, once the photosensitive element or exposure time of the photosensitive element of the photographic module is adjusted, the brightness of each block in the preview picture will also change accordingly, so that it needs to be executed again by step b to achieve the fine adjustment step c. Preset the weight array or correct the purpose of the weight array.

須說明的是,此處再次由步驟b開始執行以進一步微調步驟c決定的預設權重陣列或校正權重陣列的細節同於前述調整預設權重陣列或校正權重陣列的細節,故於此不另贅述。 It should be noted that the details of the preset weight array or the correction weight array determined by the step b again to further fine tune the step c are the same as the details of adjusting the preset weight array or the correction weight array, so there is no other difference. Narration.

[電子裝置的一實施例] [An embodiment of an electronic device]

請參照圖6,圖6為根據本發明一例示性實施例繪示之電子裝置的流程圖。 Please refer to FIG. 6. FIG. 6 is a flow chart of an electronic device according to an exemplary embodiment of the invention.

如圖6所示,本實施例所提供之電子裝置1包括攝影模組10、記憶體20與控制器30。記憶體20設置以儲存一自動曝光控制程式20a。控制器30連接於攝影模組10與記憶體20,且設置以執行該自動曝光控制程式20a來控制攝影模組10根據其執行該自動曝光控制程式20a後所產生的一動態權重陣列進行攝影。 As shown in FIG. 6, the electronic device 1 provided in this embodiment includes a camera module 10, a memory 20, and a controller 30. The memory 20 is arranged to store an automatic exposure control program 20a. The controller 30 is connected to the camera module 10 and the memory 20, and is configured to execute the automatic exposure control program 20a to control the camera module 10 to perform photography according to a dynamic weight array generated after the automatic exposure control program 20a is executed.

舉例來說,本實施例所提供之電子裝置1可以任何具有攝影功能的電子裝置,如:手機、平板電腦、監視裝置…等來實現,而攝影模組10可為任何具有攝影功能的電子裝置中的攝影裝置,如:手機、平板電腦、監視裝置…等的攝影裝置。值得注意地是,於本實施例中,控制器30執行該自動曝光控制程式20a所進行的操作即為前述實施例所提供之自動曝光控制程式方法中的各步驟。 For example, the electronic device 1 provided in this embodiment can be implemented by any electronic device having a photographic function, such as a mobile phone, a tablet computer, a monitoring device, etc., and the camera module 10 can be any electronic device having a photographic function. A photographic device such as a mobile phone, a tablet computer, a monitoring device, or the like. It should be noted that, in this embodiment, the operation performed by the controller 30 to execute the automatic exposure control program 20a is the steps in the automatic exposure control program method provided by the foregoing embodiment.

[實施例的可能功效] [Possible efficacy of the embodiment]

綜上所述,利用本發明之自動曝光控制方法,一旦電子裝置的攝影模組被啟動,其用於計算預視畫面之加權平均亮度的權重陣列就能夠被動態地調節。 In summary, with the automatic exposure control method of the present invention, once the camera module of the electronic device is activated, the weight array for calculating the weighted average brightness of the preview image can be dynamically adjusted.

與傳統上設定一個固定的亮度權重值給畫面中所有區塊的作法以及傳統上根據不同亮度門檻區間給予畫面中不同區塊不同亮度權重值的作法不同之處在於,不論在電子裝置的攝影模組運作於白天模式與夜晚模式下,本發明之自動曝光控制方法都能夠動態地將預視畫面中各區塊的亮度權重值重複地調整,直到其達到適當的數值(即,使自動曝光畫面達到目標過暗比例或目標過曝比例)。 Different from traditionally setting a fixed luminance weight value to all the blocks in the picture and traditionally giving different brightness weight values to different blocks in the picture according to different brightness threshold intervals, regardless of the photography mode of the electronic device. The group operates in day mode and night mode, and the automatic exposure control method of the present invention can dynamically adjust the brightness weight value of each block in the preview picture until it reaches an appropriate value (ie, makes the automatic exposure picture Achieve the target too dark ratio or target overexposure ratio).

此外,於本發明之自動曝光控制方法中,只要判斷出自動曝光畫面的過暗比例落入期望過暗區間或過曝比例落入期望過曝區間,便不再校正動態權重陣列。此作法能夠避免預視畫面中各區塊的亮度權重值過於頻繁地被來回調整而造成畫面閃爍的現象。 Further, in the automatic exposure control method of the present invention, the dynamic weight array is no longer corrected as long as it is judged that the excessive darkness ratio of the automatic exposure screen falls within the desired over dark interval or the overexposure ratio falls within the desired overexposure interval. This method can avoid the phenomenon that the brightness weight value of each block in the preview picture is adjusted too frequently to cause the picture to flicker.

以上所述僅為本發明之實施例,其並非用以侷限本發明之專利範圍。 The above description is only an embodiment of the present invention, and is not intended to limit the scope of the invention.

Claims (9)

一種自動曝光控制方法,適用於一電子裝置,該電子裝置包括一攝影模組與一控制器,該控制器執行該自動曝光控制方法以控制該攝影模組根據動態變動之一權重陣列進行攝影,該自動曝光控制方法包括:步驟a:取得一預視畫面,並將該預視畫面切割為複數個區塊;步驟b:根據亮度將該些區塊進行排序,並根據該些區塊的排序與一預設權重陣列計算該預視畫面的一加權平均亮度,以進行自動曝光來得到一自動曝光畫面;步驟c:判斷該自動曝光畫面之一亮度直方圖中的一過曝比例是否落入一期望過曝區間或一過暗比例是否落入一期望過暗區間,以決定是否校正該攝影模組之該預設權重陣列來獲得一校正權重陣列;步驟d:根據該預設權重陣列或該校正權重陣列以及該些區塊的排序,計算該預視畫面的該加權平均亮度,以進行自動曝光來得到一目標自動曝光畫面;以及步驟e:判斷該目標自動曝光畫面之一總體亮度是否落入一期望亮度區間,以決定控制該攝影模組根據該預設權重陣列或該校正權重陣列進行攝影,或者微調該預設權重陣列或該校正權重陣列;其中,該校正權重陣列是由一高光優先權重陣列與一平均權重陣列內插計算所獲得,或者由一低光優先權重陣列與該平均權重陣列內插計算所獲得。 An automatic exposure control method is applicable to an electronic device, the electronic device includes a camera module and a controller, and the controller executes the automatic exposure control method to control the camera module to perform photography according to a weight array of dynamic changes. The automatic exposure control method includes: step a: obtaining a preview picture, and cutting the preview picture into a plurality of blocks; and step b: sorting the blocks according to the brightness, and sorting according to the blocks Calculating a weighted average brightness of the preview picture with a preset weight array to perform automatic exposure to obtain an automatic exposure picture; and step c: determining whether an over-exposure ratio in one of the brightness histograms of the automatic exposure picture falls within Whether a desired overexposure interval or an over dark ratio falls within an expected over dark interval to determine whether to correct the preset weight array of the photographic module to obtain a correction weight array; step d: according to the preset weight array or The correction weight array and the ordering of the blocks, calculating the weighted average brightness of the preview picture for automatic exposure to obtain a target And exposing the screen; and step e: determining whether an overall brightness of the target auto exposure screen falls within a desired brightness interval, to determine to control the camera module to perform photography according to the preset weight array or the correction weight array, or fine tune the Predetermining a weight array or the correction weight array; wherein the correction weight array is obtained by a high light priority re-array and an average weight array interpolation calculation, or is calculated by interpolating a low-light priority re-array and the average weight array Obtained. 如請求項1所述之自動曝光控制方法,其中於步驟b中,該些區塊是由最高亮度之該區塊排序至最低亮度之該區塊,或由最低亮度之該區塊排序至最高亮度之該區塊。 The automatic exposure control method according to claim 1, wherein in the step b, the blocks are sorted by the block of the highest brightness to the block of the lowest brightness, or the block of the lowest brightness is sorted to the highest. The block of brightness. 如請求項1所述之自動曝光控制方法,其中步驟c包括:步驟c1:判斷該自動曝光畫面之該亮度直方圖中的該過曝比例是否落入該期望過曝區間或該過暗比例是否落入該期望過暗區間;步驟c2:若該自動曝光畫面之該亮度直方圖中的該過曝比例落入該期望過曝區間或該過暗比例落入該期望過暗區間,則不校正該預設權重陣列;以及步驟c3:若該自動曝光畫面之該亮度直方圖中的該過曝比例未落入該期望過曝區間或該過暗比例未落入該期望過暗區間,則校正該預設權重陣列以獲得該校正權重陣列。 The automatic exposure control method of claim 1, wherein the step c comprises: step c1: determining whether the overexposure ratio in the luminance histogram of the auto exposure screen falls within the expected overexposure interval or whether the over dark ratio is Falling into the desired over dark interval; step c2: if the overexposure ratio in the luminance histogram of the auto exposure screen falls within the expected overexposure interval or the over dark ratio falls within the expected over dark interval, then no correction The preset weight array; and step c3: if the overexposure ratio in the luminance histogram of the auto exposure screen does not fall within the expected overexposure interval or the over dark ratio does not fall within the expected over dark interval, then the correction The preset weight array obtains the correction weight array. 如請求項1所述之自動曝光控制方法,其中該電子裝置之該攝影模組運作於一白天模式與一夜晚模式,於步驟c中,在該白天模式下,判斷該自動曝光畫面之該亮度直方圖中的該過暗比例是否落入該期望過暗區間,以決定是否校正該攝影模組之該預設權重陣列來獲得該校正權重陣列,而在該夜晚模式下,判斷該自動曝光畫面之該亮度直方圖中的該過曝比例是否落入該期望過曝區間,以決定是否校正該攝影模組之該預設權重陣列來獲得該校正權重陣列。 The automatic exposure control method of claim 1, wherein the camera module of the electronic device operates in a day mode and a night mode, and in step c, determining the brightness of the automatic exposure screen in the day mode Whether the over-dark ratio in the histogram falls within the desired over-dark interval to determine whether to correct the preset weight array of the photographic module to obtain the correction weight array, and in the night mode, determine the automatic exposure screen Whether the overexposure ratio in the luminance histogram falls within the desired overexposure interval to determine whether to correct the preset weight array of the photographic module to obtain the correction weight array. 如請求項3所述之自動曝光控制方法,其中步驟c3包括:步驟c3-1:計算該過曝比例與一目標過曝比例的差值或該過暗比例與一目標過暗比例的差值;步驟c3-2:根據該過曝比例與該目標過曝比例的差值或該過暗比例與該目標過暗比例的差值,估算一曝光調整指數偏移量,且將該曝光調整指數偏移量加上該預設權重陣列之一預設曝光調整指數,以獲得一校正曝光調整指數;以及步驟c3-3:根據該校正曝光調整指數,計算該校正權重陣 列。 The automatic exposure control method of claim 3, wherein the step c3 comprises: step c3-1: calculating a difference between the overexposure ratio and a target overexposure ratio or a difference between the over dark ratio and a target over dark ratio Step c3-2: estimating an exposure adjustment index offset according to a difference between the overexposure ratio and the target overexposure ratio or a difference between the over dark ratio and the target over dark ratio, and the exposure adjustment index Offset plus one preset exposure adjustment index of the preset weight array to obtain a corrected exposure adjustment index; and step c3-3: calculating the correction weight matrix according to the corrected exposure adjustment index Column. 如請求項5所述之自動曝光控制方法,其中該目標過曝比例落於該期望過曝區間內,以及該目標過暗比例落於該期望過暗區間內。 The automatic exposure control method of claim 5, wherein the target overexposure ratio falls within the desired overexposure interval, and the target overexposure ratio falls within the desired over dark interval. 如請求項5所述之自動曝光控制方法,其中步驟c3更包括;步驟c3-4:根據該校正權重陣列以及與該些區塊的排序,計算該預視畫面的該加權平均亮度並據以進行自動曝光,以得到一校正自動曝光畫面;步驟c3-5:判斷該校正自動曝光畫面之該亮度直方圖中的該過曝比例是否落入該期望過曝區間或該過暗比例是否落入該期望過暗區間;以及步驟c3-6:若該校正自動曝光畫面之該亮度直方圖中的該過曝比例落入該期望過曝區間或該過暗比例落入該期望過暗區間,則不調整該校正權重陣列;其中,於步驟c3-5中,若該校正自動曝光畫面之該亮度直方圖中的該過曝比例未落入該期望過曝區間或該過暗比例未落入該期望過暗區間,則再次由步驟c3-1開始執行,以調整該校正權重陣列;其中,於步驟c3-2中,該校正曝光調整指數為該曝光調整指數偏移量與該預設權重陣列之該預設曝光調整指數的和,或為該曝光調整指數偏移量與當前之該校正權重陣列之該校正曝光調整指數的和。 The automatic exposure control method of claim 5, wherein the step c3 further comprises: step c3-4: calculating the weighted average brightness of the preview picture according to the correction weight array and the ordering of the blocks Performing automatic exposure to obtain a corrected automatic exposure screen; step c3-5: determining whether the overexposure ratio in the brightness histogram of the corrected automatic exposure screen falls within the desired overexposure interval or whether the over dark ratio falls The expected dark interval; and the step c3-6: if the overexposure ratio in the luminance histogram of the corrected auto exposure screen falls within the desired overexposure interval or the over dark ratio falls within the desired over dark interval, then The correction weight array is not adjusted; wherein, in step c3-5, if the overexposure ratio in the brightness histogram of the corrected auto exposure screen does not fall within the expected overexposure interval or the over dark ratio does not fall into the The dark interval is expected to be performed again by step c3-1 to adjust the correction weight array; wherein, in step c3-2, the corrected exposure adjustment index is the exposure adjustment index offset and the preset weight matrix Of the predetermined index and the exposure adjustment, index or adjusting the current offset correction of the correction weight of a positive weight n array indices and exposure adjustment for the exposure. 如請求項1所述之自動曝光控制方法,其中步驟e包括:步驟e1:判斷該目標自動曝光畫面之該總體亮度是否落入該期望亮度區間;步驟e2:若該目標自動曝光畫面之該總體亮度落入該期望亮度區間,則控制該攝影模組根據該預設權重陣列或該校正權 重陣列進行攝影;以及步驟e3:若該目標自動曝光畫面之該總體亮度未落入該期望亮度區間,則調整該攝影模組之至少一亮度控制參數,並再次由步驟b開始執行,以微調該預設權重陣列或該校正權重陣列,其中該亮度控制參數包括曝光度與感光時間。 The automatic exposure control method of claim 1, wherein the step e comprises: step e1: determining whether the overall brightness of the target automatic exposure screen falls within the desired brightness interval; step e2: if the target automatically exposes the image The brightness falls within the desired brightness interval, and then the camera module is controlled according to the preset weight array or the correction right Performing photography by the re-array; and step e3: if the overall brightness of the target auto-exposure screen does not fall within the desired brightness interval, adjusting at least one brightness control parameter of the camera module, and starting again by step b, to fine-tune The preset weight array or the correction weight array, wherein the brightness control parameter includes an exposure degree and a light sensing time. 一種電子裝置,包括:一攝影模組;以及一記憶體,設置以儲存一自動曝光控制程式;一控制器,連接於該攝影模組與該記憶體,且設置以執行該自動曝光控制程式來控制該攝影模組根據一動態權重陣列進行攝影,其中該控制器運作該自動曝光控制程式以執行如請求項1至8任一項所述之自動曝光控制方法。 An electronic device comprising: a camera module; and a memory configured to store an automatic exposure control program; a controller coupled to the camera module and the memory, and configured to execute the automatic exposure control program The camera module is controlled to perform photography according to a dynamic weight array, wherein the controller operates the automatic exposure control program to perform the automatic exposure control method according to any one of claims 1 to 8.
TW106139155A 2017-11-13 2017-11-13 Auto exposure control method and electronic device using the same TWI645373B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
TW106139155A TWI645373B (en) 2017-11-13 2017-11-13 Auto exposure control method and electronic device using the same

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW106139155A TWI645373B (en) 2017-11-13 2017-11-13 Auto exposure control method and electronic device using the same

Publications (2)

Publication Number Publication Date
TWI645373B true TWI645373B (en) 2018-12-21
TW201918996A TW201918996A (en) 2019-05-16

Family

ID=65431738

Family Applications (1)

Application Number Title Priority Date Filing Date
TW106139155A TWI645373B (en) 2017-11-13 2017-11-13 Auto exposure control method and electronic device using the same

Country Status (1)

Country Link
TW (1) TWI645373B (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109978833A (en) * 2019-03-05 2019-07-05 上海扩博智能技术有限公司 Picture quality automatic testing method, system, equipment and storage medium
CN112492224A (en) * 2020-11-16 2021-03-12 广州博冠智能科技有限公司 Adaptive scene light supplement method and device for video camera
CN113038109A (en) * 2019-12-25 2021-06-25 瑞昱半导体股份有限公司 Image overexposure correction method and circuit system
CN116074633A (en) * 2023-03-06 2023-05-05 宜科(天津)电子有限公司 Automatic multiple exposure method

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111131721B (en) * 2019-12-30 2022-04-15 深圳市道通智能航空技术股份有限公司 Image exposure method and device and unmanned aerial vehicle

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TW201325225A (en) * 2011-12-09 2013-06-16 Htc Corp Portable electronic device with a camera function, and image capturing method with auto exposure control
TW201512701A (en) * 2013-09-24 2015-04-01 Senao Networks Inc Image capturing apparatus and the control method thereof
CN106454145A (en) * 2016-09-28 2017-02-22 湖南优象科技有限公司 Automatic exposure method with scene self-adaptivity
CN107343156A (en) * 2017-07-10 2017-11-10 广东欧珀移动通信有限公司 The method of adjustment and device of human face region auto-exposure control

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TW201325225A (en) * 2011-12-09 2013-06-16 Htc Corp Portable electronic device with a camera function, and image capturing method with auto exposure control
TW201512701A (en) * 2013-09-24 2015-04-01 Senao Networks Inc Image capturing apparatus and the control method thereof
CN106454145A (en) * 2016-09-28 2017-02-22 湖南优象科技有限公司 Automatic exposure method with scene self-adaptivity
CN107343156A (en) * 2017-07-10 2017-11-10 广东欧珀移动通信有限公司 The method of adjustment and device of human face region auto-exposure control

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109978833A (en) * 2019-03-05 2019-07-05 上海扩博智能技术有限公司 Picture quality automatic testing method, system, equipment and storage medium
CN113038109A (en) * 2019-12-25 2021-06-25 瑞昱半导体股份有限公司 Image overexposure correction method and circuit system
CN112492224A (en) * 2020-11-16 2021-03-12 广州博冠智能科技有限公司 Adaptive scene light supplement method and device for video camera
CN116074633A (en) * 2023-03-06 2023-05-05 宜科(天津)电子有限公司 Automatic multiple exposure method
CN116074633B (en) * 2023-03-06 2023-08-01 天津宜科自动化股份有限公司 Automatic multiple exposure method

Also Published As

Publication number Publication date
TW201918996A (en) 2019-05-16

Similar Documents

Publication Publication Date Title
TWI645373B (en) Auto exposure control method and electronic device using the same
US9554059B1 (en) Exposure control system and associated exposure control method
US9912875B2 (en) Imaging device and imaging method capable of generating a bulb exposure image derived from relatively bright image combination#data and relatively dark image combination data
CN107734225B (en) A kind of image pickup method and device
US20150181102A1 (en) Control device, control method, and control system
CN100553301C (en) The modification method of brightness
CN111935413B (en) Aperture control method and camera
CN101529891A (en) Dynamic automatic exposure compensation for image capture devices
CN108681182B (en) Aperture control method and terminal equipment
US9736386B2 (en) Control device, control method, and exposure control system
TWI646838B (en) Method and device for image capturing
US20160182840A1 (en) Imaging device, image processing device, and imaging method
US20120008040A1 (en) Exposure control device and electronic camera having the same
JP2015014647A (en) Camera
CN112351218A (en) Automatic exposure method, device, electronic equipment and computer readable storage medium
CN109788206B (en) Photometry method, photometry device, photographing apparatus, and storage medium
CN109819155B (en) Automatic exposure control method and electronic device using same
TWI493968B (en) Method for capturing image
JP4841582B2 (en) Image correction program and image correction apparatus
CN114449175A (en) Automatic exposure adjusting method, automatic exposure adjusting device, image acquisition method, medium and equipment
CN112738411B (en) Exposure adjusting method, exposure adjusting device, electronic equipment and storage medium
US10972676B2 (en) Image processing method and electronic device capable of optimizing hdr image by using depth information
CN115633258A (en) Brightness adjusting method, equipment, storage medium and product
CN112532889B (en) Method and device for determining aperture value of image acquisition equipment
CN113347352A (en) Shooting parameter adjusting method and device, electronic equipment and computer storage medium