TW201032602A - Method for automatic white-balance calibration - Google Patents

Method for automatic white-balance calibration Download PDF

Info

Publication number
TW201032602A
TW201032602A TW98105380A TW98105380A TW201032602A TW 201032602 A TW201032602 A TW 201032602A TW 98105380 A TW98105380 A TW 98105380A TW 98105380 A TW98105380 A TW 98105380A TW 201032602 A TW201032602 A TW 201032602A
Authority
TW
Taiwan
Prior art keywords
value
gray
color space
area
white balance
Prior art date
Application number
TW98105380A
Other languages
Chinese (zh)
Inventor
zhong-hao Zhang
Original Assignee
Service & Quality Technology 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 Service & Quality Technology Co Ltd filed Critical Service & Quality Technology Co Ltd
Priority to TW98105380A priority Critical patent/TW201032602A/en
Publication of TW201032602A publication Critical patent/TW201032602A/en

Links

Abstract

A method for automatic white-balance calibration is provided. The method firstly uses a predefined gain. Each color value for pixels of an inputted image is calculated. A number of the points representing the pixels within each gray region of a color space is then obtained. Next, a new gain is obtained by linearly combining those points. Further, in order to overcome a possible color deviation on account of the overlapped color regions in the color space, the method introduces a specific deletion ratio to cancel partial points whose positions located on the overlapped regions. Therefore the method provides a more proper image. Furthermore, users may decide the level of the color deviation by adjusting the predefined gain.

Description

201032602 四、指定代表圖: (一) 本案指定代表圖為:第(四)圖。 (二) 本代表圖之元件符號簡單說明: S401輸入影像 S403引入一色度空間及預設增益值 S4〇5分析影像 S407計算色彩空間中的落點 S4〇9累加灰色區塊的點的數量201032602 IV. Designated representative map: (1) The representative representative of the case is: (4). (2) Simple description of the symbol of the representative figure: S401 Input image S403 introduces a chromaticity space and preset gain value S4〇5 analyzes the image S407 calculates the drop point in the color space S4〇9 counts the number of points of the gray block

S411利用落點區域及相對增益值得出新的增益值 五、本案若有化學式時’請揭示最能顯示發明特徵的化學式 六、發明說明: 【發明所屬之技術領域】 本發明為一種自動白平衡校正方法,特別是利用色彩 空間中各灰色區域的個數,經線性組合得出一新的白$ 增益值,輪出更正確的影像。 、_ 【先前技術】 人眼在不同的光源下,能適應光源而自動校正,讓白 色的物仍呈現白色,但是數位攝錄裝置,如數位相機、 數位攝影機’只是忠實地呈現物體反射光的比例,所以在 201032602 偏綠的螢光燈下’白色的物體會帶有綠色,而在偏黃的路 燈下’則會帶有黃色。雖然人眼也不是在所有的光源能完 全校正白色物體看為白色,但是數位攝錄裝置更是會產生 嚴重的色差問題’自動白平衡(automatic white balance, AWB)即是為了解決這個問題而發展。 一般以灰世界(Gray World )假設為基礎而發展的自動 白平衡,是以達到平均的R (紅色值)等於平均的G (綠 色值)等於平均的B (藍色值)為目的,而得到rGB的增 益值(gain )。 舉例來說’請參考第一圖所示在rg色彩空間(c〇l〇r space diagram,r=R/(R+G+B) ’ g=G/(R+G+B))下的各種光 源的灰色或白色區域,其中色溫約為3〇0〇K至6500K。在 習知得出增益值的方法中,先得出一特定光源,包括圖中 顯示的D65、D50、CW、A、FL等光源,接著在圖式中rg 色彩空間(其他還有RGB、YCbCr,HIS,HSV等)中,選 擇可能的灰色區域,在這灰色區域中計算累加的R、G、b 值’並根據G/R、G/B等值得出增益值。 請參閱習知技術美國專利第7,423,779號所揭露的自 動白平衡的方法,此案提出的自動白平衡機制目的是透過 分析在一色彩空間的預設區域中的白色晝素數目,來確定 影像的光源,比如影像各晝素的G/R與g/Β值畫在色彩空 中,會有落在一個光源區域的趨勢(個數最多的),藉此判 斷哪些是白晝素與光源,接著再比對白晝素的R、G、B 各值的平均值,藉以調整用於白平衡的增益值。 請參閱第二圖所示習知技術利用R、G、B的平均值執 行自動白平衡的系統示意圖,圖中顯示一色彩處理單元 4 201032602 207接收各色畫素值原來的增益值(2〇1,2〇3,2〇5),經過上 述各值平均值的比對,找出各色應調整的增益值,之後再 以調整後的增益值騎自動自平衡,接著儲存或是顯示該 影像經修正的R、G、B值(儲存/顯示單元2〇9)。此系統 可應用於各種光源下的影像,而各光源所呈現的RGB值不 同,因而此增益變化也會不同。此習知技術是去選取每個 白色/灰色區或中最多個數的區域,然後採用此區域累加 RGB值去計算增益值。 然而,因為不同光源的色域會有重疊的部份,因此仍 =容易造成誤判的現象’比如在拍攝綠草、膚色、黃昏、 藍天等畫面時,會因為判斷成別的光源而產生色偏。 【發明内容】 法係二本發明所提出的自動白平衡校正方 全部色彩空間分或者 增益值,並且數再去作雜組合得出新的 題,使輸出色域重疊而可能誤判色域的問 用落【:组預設的增益值’再利 這些區域的⑽ ΐ灰㈣域m彡像晝素中落於 益值計算,根據權重和預設的增 值間的比例得出二)'G(綠)、B(藍) 在色彩增益值’用於自動白平衡。 些重聂芦诚的^不同光源的色域間有重疊的問題,在這 偏,:發明則接::落點將造成誤判成別的光源而產生色 、J接者針對重疊區域的落點調整適當權重,以 5 201032602 解決可能色偏的問題。 本發明特色包括: ⑴=職增益值,採⑽性組合產生新的增益 ()值可以讓使用者控制想要呈現的 呑周, ° (3)避免容易判斷錯誤的顏色。 先钤發:月,較佳實施例’自動白平衡校正方法包括 (^二一^著透過分析影像擷取各晝素的“紅)… /你丨則五if值,再計算於特定色彩空間的落點,此實 ;份而:曾色彩空間中的落點如果有落於色域間重叠的 根據落點,找出可能誤心 定可纟接考引人—扣除關值,藉著消除特 '生色偏的點來消除部份可能誤判的比例的數量。 以姑之後’仵出落點在色域重疊部份的點後,依照扣除比 :值:刪去部份落點於重疊區域的點,產生一組新的增益 值,以利執行自動白平衡。 【實施方式】 ,發明同樣是以一般灰世界(吻⑷假設為基礎 n:的自動白平衡’係先針對所有光源提出預先設定好 t二皿值’ k預設好的光源增益值和預設好的白色(灰色) 利料性組合成新的增益值。從—般使用的色彩空 f曰圖可知’不同光源的色域會有重疊的部份,因此容易造 =源誤判㈣題,使經之後制的增益值驢顏色時產 偏故本發明同時能透過權重比例的調整來修正光源 6 201032602 重疊誤判的區域,使得在一些容易出錯的部^八 1 . 习以校正回 來。 請參閱第三圖本發明之一實施例所利用的色彩空 考圖,色彩空間顯示一輸入影像之各晝素中紅、 色比例的關係,其中縱軸顯示為b=B/G,也就是各景< =查 素的藍色值與綠色值的比例,橫轴則顯示r==^yQ,也^尤θ 各影像晝素的紅色值與綠色值的比例。圖中各方塊則顯^ 各種光源,包括D65、D50、FL、CW、Α與H〇r,的灰$S411 uses the drop point area and relative gain to derive a new gain value. 5. If there is a chemical formula in this case, please disclose the chemical formula which best shows the characteristics of the invention. 6. Description of the invention: [Technical field of the invention] The present invention is an automatic white balance The correction method, especially by using the number of gray areas in the color space, linearly combines to obtain a new white $ gain value, and rotates a more correct image. _ [Prior Art] The human eye can automatically adjust to the light source under different light sources, so that the white objects still appear white, but the digital recording devices, such as digital cameras and digital cameras, just faithfully present the reflected light of the object. Proportion, so under the green light of 201032602, 'white objects will have green, and under yellowish street lights' will have yellow. Although the human eye does not see white objects as white when all the light sources are completely corrected, the digital recording device will cause serious chromatic aberration problems. Automatic white balance (AWB) is developed to solve this problem. . The automatic white balance that is generally developed on the basis of the Gray World assumption is that the average R (red value) is equal to the average G (green value) equal to the average B (blue value). The gain value of rGB (gain). For example, please refer to the first figure in the rg color space (c〇l〇r space diagram, r=R/(R+G+B) ' g=G/(R+G+B)) Gray or white areas of various light sources, where the color temperature is approximately 3〇0〇K to 6500K. In the conventional method of obtaining the gain value, a specific light source is first obtained, including D65, D50, CW, A, FL, etc. shown in the figure, followed by rg color space in the figure (others also have RGB, YCbCr , HIS, HSV, etc., select a possible gray area, calculate the accumulated R, G, b values in this gray area' and derive the gain value according to G/R, G/B, etc. The method of automatic white balance disclosed in the prior art is disclosed in U.S. Patent No. 7,423,779. The purpose of the automatic white balance mechanism is to determine the image by analyzing the number of white pixels in a predetermined area of a color space. Light sources, such as the G/R and g/Β values of the various elements of the image, are drawn in the color space, and there is a tendency to fall in a light source area (the largest number), thereby judging which are the white pigment and the light source, and then comparing The average value of the R, G, and B values of the white pigment to adjust the gain value for the white balance. Please refer to the schematic diagram of the prior art shown in FIG. 2 for performing automatic white balance using the average values of R, G, and B. The figure shows that a color processing unit 4 201032602 207 receives the original gain value of each color pixel value (2〇1). , 2〇3,2〇5), after the comparison of the average values of the above values, find the gain value that should be adjusted for each color, then ride the self-balancing with the adjusted gain value, and then store or display the image. Corrected R, G, B values (storage/display unit 2〇9). This system can be applied to images under a variety of light sources, and the RGB values exhibited by each source are different, so the gain variation will be different. This prior art technique is to select the area of each of the white/grey areas or the most numerous numbers, and then use this area to accumulate RGB values to calculate the gain value. However, because the color gamut of different light sources will have overlapping parts, it is still a phenomenon that is easy to cause misjudgment. For example, when shooting green grass, skin color, dusk, blue sky, etc., it will cause color shift due to judgment of other light sources. . SUMMARY OF THE INVENTION The second white balance correction method proposed by the present invention has all the color space points or gain values, and the number is combined to make a new problem, so that the output color gamut overlaps and the color gamut may be misjudged. Use the falling [: group preset gain value] and then calculate the (10) ash (four) domain m 彡 这些 in these areas, and calculate the value according to the weight and the preset value added. 2) 'G ( Green), B (blue) at the color gain value 'for automatic white balance. Some of Nie Lucheng's ^ different light sources have overlapping problems in the color gamut. In this case, the invention is connected: the falling point will cause misjudgment into other light sources to produce color, and J will adjust the placement of the overlapping areas. With appropriate weights, solve the problem of possible color cast with 5 201032602. The features of the invention include: (1) = job gain value, the (10) combination produces a new gain () value allows the user to control the desired week, ° (3) to avoid easy to judge the wrong color. First burst: Month, the preferred embodiment of the 'automatic white balance correction method includes (^2 ^ ^ through the analysis of the image to capture the "red" of each element ... / you then five if value, then calculate in a specific color space The point of falling, this is true; the part of the color space has fallen according to the point of overlap between the color gamut, find out that it may be mistaken to take the test - deduct the value, by eliminating Special 'color-shifted points to eliminate the number of proportions that may be misjudged. After the point of the 仵 仵 仵 在 point in the gamut overlap part of the point, according to the deduction ratio: value: delete part of the point of overlap The point of the region produces a new set of gain values for the purpose of performing automatic white balance. [Embodiment] The invention is also based on the general gray world (the automatic white balance of n: based on the assumption of the kiss (4)) Pre-set the value of the two-plate value 'k preset light source gain value and the preset white (gray) materiality to form a new gain value. From the general use of the color space map, you can know that 'different light source' The gamut will have overlapping parts, so it is easy to make = source misjudgment (four) questions, so that After the gain value 驴 color is produced, the present invention can correct the area where the light source 6 201032602 overlaps the misjudgment by adjusting the weight ratio, so that it is corrected in some error-prone parts. See the third A color space test chart used in an embodiment of the present invention, the color space displays a relationship between red and color ratios of each element of an input image, wherein the vertical axis is displayed as b=B/G, that is, each scene< = The ratio of the blue value of the checker to the green value, and the horizontal axis shows r==^yQ, and also the ratio of the red value of the image element to the green value. Grey$ including D65, D50, FL, CW, Α and H〇r

(或白色)區域’可依據圖中不同的灰色區域計算出屬於 特定光源的增益值, 在此使用D65、D50、CW、A、Hor、FL等光源建立 預設的灰色區域中得出屬於特定光源的預設增益值,以此 圖所示的各光源’共可得出六組預設增益值,可以陣列表 示為以下方程式(1)、(2)與(3):The (or white) area can calculate the gain value belonging to a specific light source according to different gray areas in the figure. Here, D65, D50, CW, A, Hor, FL, etc. are used to establish a preset gray area to obtain a specific gray area. The preset gain value of the light source, and the six sets of preset gain values can be obtained from the light sources shown in the figure, which can be represented by the following equations (1), (2) and (3):

PreDefGain—R[i](紅色增益值,卜1-6)⑴PreDefGain—R[i] (red gain value, 1-6) (1)

PreDefGain—G[i](綠色增益值,i=l-6)…一⑺PreDefGain—G[i] (green gain value, i=l-6)... one (7)

PreDefGain_B[i](藍色增益值,i=i_6)…一⑶ 如果光源愈多,涵蓋的色溫範圍愈大,則得出的增益 值也會愈多。 付出預設增益值後,接著分析輸入影像,得出影像中 的R、G、B值,把各色晝素(pixei)轉換至如第三圖所 示的rb色彩空間上,接著分析各點落在哪一個預設的灰色 區域中。舉例來說’如果有落在D65光源的灰色區域上的 點,則累計D65灰色區域中的個數(第一累計值c〇unt[1]); 如果有落在D50光源灰色區域上的點,則累計此區域中的 個數(第二累計值c〇unt[2]),依此類推,可能產生更多的 7 201032602 累計值。上述累計值可採用全部灰色區域落點個數的值, 亦可使用部分色彩空間中的灰色區域的落點個數,比如, 累計個數量較多的幾個灰色區域的值。 根據各區域累計值,乘上各區域的預設增益值,可得 到此影像的增益值,如以下方程式(4):PreDefGain_B[i] (blue gain value, i=i_6)... One (3) If the more light sources, the larger the range of color temperatures covered, the more gain values will be obtained. After paying the preset gain value, the input image is analyzed, and the R, G, and B values in the image are obtained, and the pixei is converted to the rb color space as shown in the third figure, and then each point is analyzed. In which preset gray area. For example, 'If there is a point falling on the gray area of the D65 light source, the number of D65 gray areas is accumulated (the first accumulated value c〇unt[1]); if there is a point falling on the gray area of the D50 light source , then the number of the area is accumulated (the second accumulated value c〇unt[2]), and so on, may generate more 7 201032602 cumulative value. The above accumulated value may use the value of the number of points in all the gray areas, and may also use the number of points of the gray area in the partial color space, for example, the value of a plurality of gray areas with a larger number of accumulated. The gain value of this image can be obtained by multiplying the cumulative value of each region by the preset gain value of each region, as shown in the following equation (4):

Gain—new= (Xcount[i]*PreDefGain[i])/(Zcount[i]) .....(4) 其中i表示色彩空間中的灰色區域,如第三圖所示之色彩空 ❹ 間,其中共有六個灰色區域,則i範圍由1至6,另外也可以 只挑選count[i]值為前幾大的來作線性組合,也就是可使用所 有灰色區域的值,也可採用部份數量較多的值;count[i]表示 各灰色區域的累計值;PreDefGain[i]為各灰色區域預設之增 益值,由以上方程式(1)、(2)與(3)組成。 經過色彩空間中一個灰色區域的數量(如第一累計值 count[l])乘上該區域的預設增益值(preDefGain[l]),再 累計第二個灰色區域的數罝(如第二累計值count[2])乘 • 上該區域的預設增益值(PreDefGain[2]),累計完成此色彩 空間中各灰色區域後,除以全部的落於各灰色區域的點的 數量,即得到一新的增益值。 上述步驟如第四圖所示本發明所提供的自動白平衡校 正方法流程圖。 步驟開始之初,執行本發明自動白平衡校正方法的系 統(包括裝置或是電路)接收一輸入影像(步驟S401 ), 接著引入一預設的色彩空間(如第三圖)與相對各灰色區 域的預設增益值(步驟S403) ’之後分析影像,包括賴取 影像中各晝素中的R (紅)、G (綠)、B (藍)值,並計算 8 201032602 各值之間的比例,如B/G、R/G等(步驟S405)。 之後’經過在色彩空間中描繪出各點座標後,可得到 落於一或多個灰色區域的點,此時計算色彩空間中各灰色 區域的點的數量(步驟S407),累加出各灰色區域中的數 罝’也就是計算方程式(4)的count[i](步驟S409),接著利 用上述方程式(4)計算新的增益值(步驟S411)。最後依據 此新的增益值執行自動白平衡程序(步驟S413)。 值得一提的是,如果最先所設定的預設增益值是使得 • 色彩空間中各區域為標準灰色,透過上述方程式(4)得出的 新的增益值則等同於習知技術利用各色值的比例得出的增 益值,也就是由G—sum/R_sum,G—sum/B_sum得到的增益 值,其中G—sum為綠色值的總和、R—sum為紅色值的總 和、B_sum為藍色值的總和。 但本發明由於使用一預設增益值來決定新的增益值, 此提供使用者能購自行決定所需色偏的彈性,如果使用者 透過設定預設增益值產生特定色偏效果(如偏藍或是偏 紅),此時由使用者設定的增益值經過方程式(4)計算出新 的增益值,透過此增益值調整的白平衡則會使整個影像有 色偏(包括偏冷色調或是暖色調)的效果,這效果讓使用 者更有調整白平衡的彈性。 另外,由色彩空間中各灰色(或白色)區域之間的關 係來看’有部份重疊的現象,經過上述影像分析後,落在 這些色域重豐部份將會導致誤判光源的問題,也常常是導 致光源誤判的情形。然而,本發明所揭露的自動白平衡方 法引入利用各光源區域的權重觀念,可解決因為色域重疊 導致的光源誤判的產生的問題。 9 201032602 色域重疊的部份常常是導致色偏的主要因素,請參閱 第五圖所示在色彩空間中色域重疊的示意圖。其中顯示在 色彩空間中綠色區域(A1)與FL光源區域(A2)的灰色 區域重疊。在分析時,並無法判斷落於FL光源區域(A2) 的點是否是FL光源還是綠色物(如綠草)。如果所有的書 素經轉換後,都落於FL光源區域(A2)中,在本發明中 則是判斷是FL光源。但是,如果有落於綠色區域(Al ) 中,但是是FL光源區域(A2)以外的點,也就是落在區 域A3中,本發明則將落在FL光源區域(A2)的點的數 量和落在區域A3的數量依照適當的比例扣除,即如方程 式(5),如此可以處理部份可能產生的色偏問題。 FL_count-Green_count*p% ..................(5) 其中FL一count為落於FL光源區域(A2 )的點的數量,Gain_new= (Xcount[i]*PreDefGain[i])/(Zcount[i]) .....(4) where i represents the gray area in the color space, as shown in the third figure. In the case where there are six gray areas, the range of i ranges from 1 to 6. Alternatively, only the count[i] value can be selected as the first few for linear combination, that is, the values of all gray areas can be used. A part of the number is larger; count[i] represents the cumulative value of each gray area; PreDefGain[i] is the preset gain value of each gray area, and is composed of the above equations (1), (2) and (3). Multiply the number of gray areas in the color space (such as the first accumulated value count[l]) by the preset gain value of the area (preDefGain[l]), and then accumulate the number of the second gray area (such as the second The accumulated value count[2]) is multiplied by the preset gain value of the area (PreDefGain[2]), and after the gray areas in the color space are accumulated, the number of points falling in each gray area is divided, that is, Get a new gain value. The above steps are as shown in the fourth figure, which is a flow chart of the automatic white balance correction method provided by the present invention. At the beginning of the step, the system (including the device or the circuit) for performing the automatic white balance correction method of the present invention receives an input image (step S401), and then introduces a preset color space (such as the third image) and the corresponding gray regions. The preset gain value (step S403) 'After analyzing the image, including the R (red), G (green), B (blue) values in each element in the image, and calculating the ratio between the values of 8 201032602 , such as B/G, R/G, etc. (step S405). Then, after the coordinates of each point are drawn in the color space, points falling in one or more gray areas can be obtained, and at this time, the number of points of each gray area in the color space is calculated (step S407), and each gray area is accumulated. The number 中 in the equation 'i' is the count[i] of the equation (4) (step S409), and then the new gain value is calculated using the above equation (4) (step S411). Finally, an automatic white balance program is executed in accordance with this new gain value (step S413). It is worth mentioning that if the preset preset gain value is such that the areas in the color space are standard gray, the new gain value obtained by the above equation (4) is equivalent to the conventional technique using the color values. The gain value obtained by the ratio, that is, the gain value obtained by G_sum/R_sum, G_sum/B_sum, where G_sum is the sum of the green values, R-sum is the sum of the red values, and B_sum is the blue The sum of the values. However, the present invention uses a preset gain value to determine a new gain value, which provides the user with the flexibility to determine the desired color shift. If the user sets a preset gain value to generate a specific color shift effect (such as bluish Or reddish), at this time, the gain value set by the user calculates a new gain value through equation (4), and the white balance adjusted by the gain value causes the entire image to have a color shift (including a cold color or a warm color). The effect of the hue), which gives the user more flexibility in adjusting the white balance. In addition, from the relationship between the gray (or white) regions in the color space, there is a phenomenon of partial overlap. After the above image analysis, falling on the heavy parts of these color gamuts will lead to the problem of misjudging the light source. It is also often the case that the light source is misjudged. However, the automatic white balance method disclosed in the present invention introduces the concept of weighting using each light source region, and can solve the problem of false positive judgment of the light source due to color gamut overlap. 9 201032602 The overlapping of gamuts is often the main cause of color cast. See the schematic of gamut overlap in color space as shown in Figure 5. It shows that the green area (A1) in the color space overlaps with the gray area of the FL light source area (A2). During the analysis, it is impossible to judge whether the point falling in the FL light source area (A2) is a FL light source or a green object (such as a green grass). If all the books are converted, they fall in the FL light source region (A2), and in the present invention, it is judged to be the FL light source. However, if there is a point falling in the green area (Al) but being outside the FL light source area (A2), that is, falling in the area A3, the present invention will count the number of points falling in the FL light source area (A2). The number of areas falling in the area A3 is deducted according to an appropriate ratio, that is, as in equation (5), so that some possible color shift problems can be handled. FL_count-Green_count*p% ..................(5) where FL_count is the number of points falling in the FL light source area (A2),

Green—count則是落於扣除FL光源區域(A2 )的綠色區域 (A3)的點的數量,p%為一可調整的扣除比例,係為一小 於100%的值,不用100%是因為仍要避免扣除可能 光源的點。Green-count is the number of points falling in the green area (A3) minus the FL light source area (A2), p% is an adjustable deduction ratio, which is a value less than 100%, not 100% because still Avoid points that deduct possible light sources.

在此列舉FL光源,亦可應用在不同的光 制於此。 7尤源,並非限 藉此色域重疊的現象的調整,方程式( (4)的c〇um[i]值,符合一個或以上的灰色區、》成方種式 形。根據此方式,同樣可以處理膚色、藍天、i的色偏情 產生色偏的問題。 、育昏等可能 第六圖則顯示考慮色域重疊產生光源誤 動白平衡校正方法流程圖。 、3形的自 開始時’如步驟麗,輸入一影像至執行本發明方法 201032602 的系統中,接著引入一色彩办p弓R α 預設增錄(步驟s6〇3),接著3對其中各灰色區域的 各畫素的R⑻、G (綠)接以:像:包括操取當中 比例(步,驟S605 ),如B/G、r/G識A + ’並依照各值間的 點。t彳纟,β再計算色彩空間中的落 點^在色々工間中描綠出各點位置後,可得到落於 一或多個灰色區域的點(步驟8607)。 、 ,實齡Η祕考慮色彩”巾的落點如果有落 間重疊的部份而可能導致色偏的問題(與預設色偏的效Ϊ 不同)’即針對這些區域作適當的權重調整,如步驟s6〇9, 本發明引h扣除比例值,用於扣除部份各灰色區域間重 豐區域中的點,能夠透過消除部份可能誤判的比例的 來克服色偏的可能。 接著如步驟S6U ’判斷各在色彩空間中的落點,找出 可能誤判的落點,也就是得出落點在色域重#區域的點, 依照扣除關值,删切份落點於”區域賴,而累加 經刪除部份落點之後各灰色區域的落點個數。此例即於扣 除可能誤判的點後,產生對應各灰色區域的新的累計值, 取代方程式(4)的count[i] ’如方程式(6):The FL light source is listed here and can also be applied to different light sources. 7 Youyuan, not limited to the adjustment of the phenomenon of color gamut overlap, the equation (c〇um[i] value of (4), conforms to one or more gray areas," into a square shape. According to this method, the same It can deal with the problem of color shift of skin color, blue sky and i color eccentricity. The sixth picture of fainting, etc. shows the flow chart of the method of correcting the white balance of the light source by considering the color gamut overlap. In step 丽, input an image into the system performing the method 201032602 of the present invention, and then introduce a color office p arch R α preset addition (step s6 〇 3), followed by 3 pairs of R (8) of each pixel in each gray region. , G (green) followed by: like: including the proportion of the operation (step, step S605), such as B / G, r / G know A + ' and according to the points between the values. t 彳纟, β then calculate the color Falling points in the space ^ After the positions of the green dots are drawn in the color chamber, the points falling in one or more gray areas can be obtained (step 8607). There is a problem that the overlap between the overlaps may result in a color shift (different from the effect of the preset color shift). These areas are appropriately weighted. For example, in step s6〇9, the present invention deducts the ratio value for deducting the point in the heavy area between the gray areas, which can be overcome by eliminating the proportion of possible misjudgments. The color shift is possible. Then, as in step S6U', the falling points in the color space are judged, and the falling point which may be misjudged is found, that is, the point where the falling point is in the color region ##, according to the deduction of the closing value, the cutting is performed. The share points are in the area, and the number of points in each gray area after the deletion is deleted. In this case, after deducting the points that may be misjudged, a new cumulative value corresponding to each gray area is generated instead of the equation. (4) of count[i] ' as in equation (6):

Gain_new= (Icount_new[i]*PreDefGain[i])/(lcount_new[i]) …―⑹ 其中count—new[i]為刪除部份落點於重疊區域的點後 的新的累計值。 接著利用上述方程式(6) ’利用落點區域及相對增益值 得出新的增益值(步驟S613),最後依據此新的增益值執 行自動白平衡程序(步驟S615)。 11 201032602 —“在色T工間中不同光源的色域間有重疊區域的問題, &ίΐ重ft域的部份的落點將造成誤判成別的光源而產 色偏,本U則接著針對重疊區域㈣點調整適當權 重,以解決可能色偏的問題。 本發明除了能夠採用線性產 益值,更能避免容易判斷权為羊確的新的增 捭兴伯禮你土』所錯块的顏色,並能透過調整預設 曰皿’讓使用者控制想要呈現的色調。 要日發明提供—種自動白平衡校正方法,主 增益值,再根據預先定義好的==二出= 域的個數來當作權重分配 4 °十异洛於1^區 外,更能排除可能造成色偏的誤差達lj良好的白平衡效果 惟以上所述僅為本發明之較佳 馨 侷限本發明之專利範圍,故舉凡運用:1β例,非因此即 内容所為之等效結構變化 ^^明書及圖示 内,合予陳明。 1门里包含於本發明之範圍 【圖式簡單說明】 第-圖顯示習知技術rg色彩空間示意圖; 弟二圖顯示為習知技術利用r、g、 動白平衡的系統示意圖; 、千句值執仃自 ί三圖所示為本發明所利用的色彩空間參考圖· 程圖弟四圖所示為本發明所提供的自動白平衡校正方法流 ,五圖所示為色彩㈣中色域重疊的示意圖; 弟六圖顯示考慮色域重疊產生光源誤判的情形的自動 12 201032602 白平衡校正方法流程圖。 【主要元件符號說明】 區域 Al,A2, A3 色彩處理單元207 增益值 201, 203, 205 儲存/顯示單元209 綠色區域A1 φ FL光源區域A2 區域A3 13Gain_new = (Icount_new[i]*PreDefGain[i])/(lcount_new[i]) ... - (6) where count_new[i] is the new accumulated value after deleting the point where the partial point falls on the overlapping area. Then, using the above-mentioned equation (6)', the new gain value is obtained using the falling point area and the relative gain value (step S613), and finally the automatic white balance program is executed in accordance with the new gain value (step S615). 11 201032602 — “There is a problem of overlapping areas between the gamuts of different light sources in the color T. The falling points of the parts of the ft field will cause misjudgment to other sources and the color will be biased. The overlapping area (4) points adjust the appropriate weights to solve the problem of possible color shift. In addition to the linear profit and loss value, the present invention can avoid the error of the new one that is easy to judge. Color, and can adjust the preset dish to let the user control the color tone that you want to present. To provide an automatic white balance correction method, the main gain value, according to the predefined == two out = domain The number is used as the weight distribution 4 ° ten different from the 1 ^ area, and the error that may cause the color shift is better than the good white balance effect. However, the above is only the preferred limitation of the present invention. The scope of the patent, so the use of: 1β case, not the content of the equivalent structural changes ^ ^ Mingshu and the picture, combined with Chen Ming. 1 door is included in the scope of the invention [simple description of the chart] - Figure shows the conventional technology rg color empty Schematic diagram; the second diagram shows the schematic diagram of the system using r, g, and dynamic white balance for the prior art; and the value of the thousands of sentences is shown in the figure of the color space reference map of the present invention. Shown is the flow of the automatic white balance correction method provided by the present invention, and the fifth figure shows the schematic diagram of the color gamut overlap in the color (4); the sixth figure shows the automatic 12 201032602 white balance correction method considering the case where the color gamut overlap produces the light source misjudgment Flowchart [Description of main component symbols] Area Al, A2, A3 Color processing unit 207 Gain value 201, 203, 205 Storage/display unit 209 Green area A1 φ FL source area A2 Area A3 13

Claims (1)

201032602 七、申請專利範圍: 1. 一種自動白平衡校正方法,包括有: 輸入一影像; 引入一色彩空間及該色彩空間中複數個灰色區域的預 設增益值; 分析該影像’包括擷取當中各畫素的紅、綠、藍值; s十鼻3亥衫像中各晝素在該色彩空間中的落點,包括判 斷出各灰色區域的落點; Φ 累加各灰色區域中的落點個數; 利用各灰色區域中的落點個數與預設增益值計算出一 新的增益值;以及 最後依據該新的增益值執行自動白平衡程序。 2. 如申請專利範圍第1項所述之自動白平衡校正方法, 其中該新的增益值由以下方程式得出: (Ecount[i]*PreDefGain[i])/(Xcount[i]),其中 i 表示色彩 空間中的灰色區域,count[i]表示各灰色區域的累計 春值’ PreDefGain[i]為各灰色區域預設之增益值。 3. 如申e青專利範圍第2項所述之自動白平衡校正方法, 其中δ亥累汁值為累計所有灰色區域中落點個數的值, 或是累計落點個數較多的部份灰色區域的值。 4. 如申請專利範圍第丨項所述之自動白平衡校正方法, 其中忒自動平衡校正方法更於計算各晝素在該色彩空 間中的落點時,判斷落在各灰色區域間重疊區域的點。 5. 如申請專利範圍第4項所述之自動白平衡校正方法, 其中3亥自動平衡校正方法更引入一扣除比例值,以刪 14 201032602 去部伤落點於該重疊區域的點。 6.如申請專利範圍第5項所述之自動白平衡校正方法, 其中該新的增益值由以下方程式得出: (Ecount—new[i]*preDefGain[i])/(Ecount_new[i]),其中 i 表示色彩空間中的灰色區域,count一new[i]表示各灰色 區域的累计值依該扣除比例值刪去部份落點於該重疊 區域的點之後的一新的累計值,PreDefGain[i]為各灰 色區域預設之增益值。 • 7.如申請專利範園第1項所述之自動白平衡校正方法, 其中該色彩空間顯示該影像之各晝素中紅、綠、藍各 色比例的關係。 8·如申請專利範園第i項所述之自動白平衡校正方法, 其中針對該色彩空間中所有光源引入該複數個灰色區 域的預設增益值。 °° 9· 一種自動白平衡校正方法,包括有: 輸入一影像; 鲁 引入一色彩空間及該色彩空間中複數個灰色區域 設增益值; # 分析該影像,包括擷取當中各晝素的紅、、綠、藍值; 計算該影像中各晝素在該色彩空間中的落點,包 斷出各灰色區域的落點; 引入用於扣除部份各灰色區域間一重疊區域中的點的 一扣除比例值; 得出該影像中晝素落點在該重疊區域的點; 依照該扣除比例值删去部份落點於該重曼區域的點; 15 201032602 累加經刪除部份落點之後各灰色區域中的落點個數, 得出對應複數個灰色區域之複數個累計值; 利用該複數個累計值與該複數個預設增益值計算出一 新的增益值;以及 最後依據該新的增益值執行自動白平衡程序。201032602 VII. Patent application scope: 1. An automatic white balance correction method, comprising: inputting an image; introducing a color space and a preset gain value of a plurality of gray regions in the color space; analyzing the image 'including extracting The red, green, and blue values of each pixel; the falling points of each element in the color space of the s10 nose 3 jersey image, including judging the falling points of each gray area; Φ accumulating the falling points in each gray area The number is calculated by using the number of falling points in each gray area and the preset gain value; and finally, the automatic white balance program is executed according to the new gain value. 2. The automatic white balance correction method according to claim 1, wherein the new gain value is obtained by the following equation: (Ecount[i]*PreDefGain[i])/(Xcount[i]), wherein i represents the gray area in the color space, and count[i] represents the cumulative spring value of each gray area ' PreDefGain[i] is the preset gain value for each gray area. 3. The automatic white balance correction method according to item 2 of the application scope of Shen Qing, wherein the value of δHai juice is the cumulative value of the number of points in all gray areas, or the part with a large number of accumulated points. The value of the gray area. 4. The automatic white balance correction method according to the application scope of the patent application, wherein the 忒 automatic balance correction method is more suitable for calculating the overlap point of each element in the color space, and determining the overlapping area between the gray areas. point. 5. The automatic white balance correction method according to item 4 of the patent application scope, wherein the 3H automatic balance correction method further introduces a deduction ratio value to delete the point where the resection point is at the overlapping area. 6. The automatic white balance correction method according to claim 5, wherein the new gain value is obtained by the following equation: (Ecount_new[i]*preDefGain[i])/(Ecount_new[i]) Where i represents the gray area in the color space, and count_new[i] indicates that the cumulative value of each gray area is a new cumulative value after the point of the overlap area is deleted according to the deduction value, PreDefGain [i] The gain value preset for each gray area. • 7. The automatic white balance correction method described in claim 1, wherein the color space displays the relationship of the ratios of red, green, and blue among the elements of the image. 8. The automatic white balance correction method as described in claim i, wherein the preset gain values of the plurality of gray regions are introduced for all light sources in the color space. °° 9· An automatic white balance correction method, comprising: inputting an image; introducing a color space and setting a plurality of gray regions in the color space to set a gain value; # analyzing the image, including extracting red of each element , green, blue value; calculate the falling point of each element in the color space in the image, and break the falling point of each gray area; introduce a point for deducting a point in an overlapping area between each gray area Deducting the ratio value; obtaining a point in the image where the pixel is in the overlapping area; deleting a part of the point falling on the weight region according to the deduction ratio value; 15 201032602 accumulating the deleted part after the point of falling a number of falling points in each gray area, and a plurality of integrated values corresponding to the plurality of gray areas are obtained; a new gain value is calculated by using the plurality of accumulated values and the plurality of preset gain values; and finally according to the new The gain value performs an automatic white balance procedure. 10.如申請專利範圍第9項所述之自動白平衡校正方法, 其中該新的增益值由以下方程式得出: (ScounUiewWPreDefGain^/^ount一職⑴),其中 i 表示色彩空間中的灰色區域,eGunt_new[i]表示各灰色 區域的累計值依該扣除比例值刪去部份落點於該 區域的點之後的該累計值,PreDefGain⑴為 P 媸子頁設之增器佶。 &(2£ U•如申請專利範圍第9項所述之自動白平衡校 其中該色彩空間顯示該影像之各晝素中紅、綠、^ 色比例的關係。 $ 髮各 12.如^請專職圍第9項_之自_ 其中該扣除比例值係為—小於綱%的值。方法, 中,該累計值為累計所有h 個累计值之步驟 或是累計落點個數較多的部份灰色區數的值,10. The automatic white balance correction method according to claim 9, wherein the new gain value is obtained by the following equation: (ScounUiewWPreDefGain^/^ount job (1)), where i represents a gray area in the color space , eGunt_new[i] indicates that the accumulated value of each gray area is deleted according to the deduction ratio value, and the accumulated value after the point of falling in the area is PreDefGain(1) is the incrementer of the P-page. & (2 £ U • The automatic white balance school as described in claim 9 wherein the color space displays the relationship of the ratios of red, green, and color in each element of the image. $ each 12. Please refer to the 9th item of the full-time _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ The value of the number of gray areas,
TW98105380A 2009-02-20 2009-02-20 Method for automatic white-balance calibration TW201032602A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
TW98105380A TW201032602A (en) 2009-02-20 2009-02-20 Method for automatic white-balance calibration

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW98105380A TW201032602A (en) 2009-02-20 2009-02-20 Method for automatic white-balance calibration

Publications (1)

Publication Number Publication Date
TW201032602A true TW201032602A (en) 2010-09-01

Family

ID=44854943

Family Applications (1)

Application Number Title Priority Date Filing Date
TW98105380A TW201032602A (en) 2009-02-20 2009-02-20 Method for automatic white-balance calibration

Country Status (1)

Country Link
TW (1) TW201032602A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI548284B (en) * 2012-10-18 2016-09-01 鴻海精密工業股份有限公司 Method for regulating white balancing
CN103780891B (en) * 2012-10-19 2017-02-08 鸿富锦精密工业(深圳)有限公司 White balance adjustment method
CN108259877A (en) * 2018-03-07 2018-07-06 浙江大华技术股份有限公司 A kind of white balancing treatment method and device
TWI660633B (en) * 2018-04-13 2019-05-21 瑞昱半導體股份有限公司 White balance calibration method based on skin color data and image processing apparatus thereof

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI548284B (en) * 2012-10-18 2016-09-01 鴻海精密工業股份有限公司 Method for regulating white balancing
CN103780891B (en) * 2012-10-19 2017-02-08 鸿富锦精密工业(深圳)有限公司 White balance adjustment method
CN108259877A (en) * 2018-03-07 2018-07-06 浙江大华技术股份有限公司 A kind of white balancing treatment method and device
CN108259877B (en) * 2018-03-07 2019-09-17 浙江大华技术股份有限公司 A kind of white balancing treatment method and device
TWI660633B (en) * 2018-04-13 2019-05-21 瑞昱半導體股份有限公司 White balance calibration method based on skin color data and image processing apparatus thereof

Similar Documents

Publication Publication Date Title
JP4214154B2 (en) Video device for automatically adjusting white balance and white balance adjusting method thereof
CN101282489B (en) Light source detection apparatus and method as well as image processing method
CN105959662B (en) Self-adapted white balance method of adjustment and device
TWI245557B (en) Image compensation apparatus and method for the same
US8493514B2 (en) Apparatus for controlling color temperature
CN107483908A (en) White balance calibration method and electronic equipment
TW200521888A (en) Image processing apparatus and method, recording medium and program
US20100165137A1 (en) Image processing method, image processing program, image processing device and camera
CN109166555A (en) Gamma-curve correction method and device
CN105282531B (en) Control the method and device of low gray level white balance
JP5195430B2 (en) Image processing method, image processing program, image processing apparatus, camera
TWI549511B (en) Image sensing apparatus and color-correction matrix correcting method and look-up table establishing method
KR101685887B1 (en) Image processing device, image processing method, and computer-readable storage medium having image processing program
CN105245863A (en) Image processing device that performs white balance control, method of controlling the same, and image pickup apparatus
US9307213B2 (en) Robust selection and weighting for gray patch automatic white balancing
CN104954772B (en) Image adjacent-grey pixel selection algorithm applied to automatic white balance algorithm
CN105915816A (en) Method and equipment for determining brightness of given scene
JP4181625B1 (en) Luminance information display apparatus and method
TW201032602A (en) Method for automatic white-balance calibration
US10777151B2 (en) Driving method of display device and display device
US20090256928A1 (en) Method and device for detecting color temperature
CN101088278A (en) Apparatus, system, and method for optimizing gamma curves for digital image devices
TW200823860A (en) Gain-determining method and apparatus for grayscale white balance for display apparatus
CN108063934B (en) Image processing method and device, computer readable storage medium and computer device
CN101088297A (en) Automatic white balance control