TW201624418A - A color temperature estimation algorithm - Google Patents

A color temperature estimation algorithm Download PDF

Info

Publication number
TW201624418A
TW201624418A TW103145884A TW103145884A TW201624418A TW 201624418 A TW201624418 A TW 201624418A TW 103145884 A TW103145884 A TW 103145884A TW 103145884 A TW103145884 A TW 103145884A TW 201624418 A TW201624418 A TW 201624418A
Authority
TW
Taiwan
Prior art keywords
color temperature
color
pixel
layer
original image
Prior art date
Application number
TW103145884A
Other languages
Chinese (zh)
Other versions
TWI552112B (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 TW103145884A priority Critical patent/TWI552112B/en
Publication of TW201624418A publication Critical patent/TW201624418A/en
Application granted granted Critical
Publication of TWI552112B publication Critical patent/TWI552112B/en

Links

Landscapes

  • Processing Of Color Television Signals (AREA)
  • Facsimile Image Signal Circuits (AREA)
  • Color Image Communication Systems (AREA)

Abstract

A color temperature estimation algorithm establishes fuzzy inference rules from a set of known illuminants. According to the inference rules, the algorithm produces a color temperature estimation corresponding to each pixel of an image with unknown illuminant. The algorithm consists of the following steps: 1. Input an image with unknown illuminant; 2. Pass the image through a fuzzy inference system; 3. Conduct data filtering and comparing to acquire the color temperature. The major merits of this invention is: 1. An color temperature can be estimated solely based on the contents of the original image with unknown illuminant; 2. The algorithm can be applied to different digital image capturing devices; 3. The accuracy of the estimation can be improved by adjusting the parameters of the fuzzy inference system.

Description

色溫估測演算法 Color temperature estimation algorithm

一種估測演算法,尤其是一種色溫估測演算法。 An estimation algorithm, especially a color temperature estimation algorithm.

色彩平衡(color balance)便是為了補償光照影響而被發展出來之一類影像處理演算法則。通常未經過色彩平衡之影像會呈現整體色彩偏向某種顏色,即所謂該影像有色偏(color cast)。而色彩平衡演算法可透過調整影像的紅、綠、藍三個基本色彩特徵的值以使得有色偏之影像中的各種顏色回復正常,即所謂去除色偏。一般演算法基本上包含兩大步驟:(1)估測擷取影像之光照條件;(2)調整影像。 Color balance is a kind of image processing algorithm developed to compensate for the effects of illumination. An image that is usually not color-balanced will exhibit an overall color bias toward a certain color, that is, the image has a color cast. The color balance algorithm can adjust the values of the three basic color features of the image, such as red, green, and blue, so that the colors in the color-biased image return to normal, that is, the color shift is removed. The general algorithm basically consists of two major steps: (1) estimating the lighting conditions of the captured image; and (2) adjusting the image.

典型之色彩平衡只考慮補償光源對影像之影響,而不考慮感測器動態響應不同於人類視覺系統響應之問題,然而現有相關之演算法不一定有對這兩種補償目的做明顯區分。許多高階之數位相機與攝影機內建光源感測器可以即時測量光照條件並根據所獲得之影像色溫做對應之修正,但如前所述,為了打入一般消費者市場,大部分有成本限制之中低階相機或攝影機只能依據欲拍攝之影像內容來估測色溫並針對中性顏色(例如白色)進行修正。大部分相機均有內建數個預設光源,讓使用者根據欲拍攝之影像之光源條件自行選擇對應之光源設定。另外常見相機中自 訂白平衡估測光源之方式尚有提供使用者將相機對準內含參考顏色之參考物體(例如色階或灰階卡),再依據擷取之顏色值設計調整法則。且許多現有方法之共同問題在於其效能好壞極度仰賴景物內容以及光源種類,許多方法之過程均牽涉須對影像內容進行推理與判斷,但卻少有方法使用模糊推論系統(fuzzy system)來輔助定義與解決問題,使演算法適應不同光源與景物之能力均十分有限。 The typical color balance only considers the effect of compensating the light source on the image, regardless of the difference between the dynamic response of the sensor and the response of the human visual system. However, the existing related algorithms do not necessarily have a clear distinction between the two compensation purposes. Many high-end digital cameras and camera built-in light source sensors can instantly measure lighting conditions and make corresponding corrections based on the obtained image color temperature. However, as mentioned above, in order to break into the general consumer market, most of them have cost constraints. The low-end camera or camera can only estimate the color temperature based on the image content to be captured and correct it for neutral colors such as white. Most cameras have built-in preset light sources, allowing the user to select the corresponding light source settings according to the light source conditions of the image to be captured. Another common camera The method of whitening the estimated light source also provides the user to align the camera with a reference object (such as a gradation or grayscale card) containing the reference color, and then design a adjustment rule according to the color value of the captured color. The common problem with many existing methods is that their performance depends heavily on the content of the scene and the type of light source. Many methods involve the reasoning and judgment of the image content, but there are few ways to use the fuzzy inference system to assist. The ability to define and solve problems and adapt the algorithm to different light sources and scenes is very limited.

為了得到未知光源下影像的色溫資訊,本發明提出一種色溫估測演算法,其包含下列步驟:輸入一原始影像,該原始影像之像素以一種顏色空間之格式輸入;執行一模糊推論演算,該模糊推論演算包含複數條模糊推論規則,使輸入之該原始影像所有像素以該模糊推論規則產生每一該原始影像之像素所對應的一估測色溫;及執行一資料過濾及比對運算,該資料過濾及比對運算依照色溫值大小進行分欄,並於分欄中設定一估測色溫門檻,取分欄大於該估測色溫門檻的該估測色溫之平均值,該平均值定義為該代表影像色溫。 In order to obtain the color temperature information of the image under the unknown light source, the present invention provides a color temperature estimation algorithm, which comprises the steps of: inputting an original image, the pixel of the original image is input in a color space format; performing a fuzzy inference calculation, The fuzzy inference calculus includes a plurality of fuzzy inference rules, such that all pixels of the original image input are generated by the fuzzy inference rule to generate an estimated color temperature corresponding to each pixel of the original image; and performing a data filtering and comparison operation, The data filtering and the comparison operation are performed according to the color temperature value, and an estimated color temperature threshold is set in the column, and the average value of the estimated color temperature is greater than the estimated color temperature threshold, and the average value is defined as the Represents the image color temperature.

進一步的,前述的色溫估測演算法,建立該模糊推論規則其包含下列步驟:依據該白平衡標準影像之像素以色彩相近程度進行一色彩分群,依該色彩分群之數量決定該模糊推論規則之數量;選定某一色溫,並依據色溫進一步分類該色彩分群之分類結果,依據該色溫分群所挑選之分群於該顏色空間之向量值計算出 一規則中心及一規則寬度;該色彩分群之色溫為後鑑部色溫參數。 Further, the foregoing color temperature estimation algorithm establishes the fuzzy inference rule, which comprises the following steps: performing color clustering according to the color of the standard image of the white balance standard image, and determining the fuzzy inference rule according to the number of the color grouping Quantity; a certain color temperature is selected, and the classification result of the color group is further classified according to the color temperature, and the vector value of the color group selected by the color temperature group is calculated according to the vector value of the color space. A rule center and a rule width; the color temperature of the color group is a color temperature parameter of the back portion.

其中,該資料過濾與比對係以一直方圖系統進行分欄及統計來定義該代表影像色溫。 The data filtering and comparison system is divided into columns and statistics by a histogram system to define the representative image color temperature.

其中,該原始影像之像素輸入該模糊推論前,預先進行一過飽和前置處理,其中該過飽和前置處理的判斷式為,在該原始影像之像素值大於該上界門檻時,該像素判定為過飽和;及在該原始影像之像素值小於該下界門檻時,該像素判定為過飽和。 Before the pixel of the original image is input to the fuzzy inference, an over-saturation pre-processing is performed in advance, wherein the super-saturation pre-processing is determined by: when the pixel value of the original image is greater than the upper threshold, the pixel is determined as Supersaturated; and when the pixel value of the original image is less than the lower threshold, the pixel is determined to be supersaturated.

其中,該顏色空間為RGB顏色空間或YCbCr顏色空間。 Wherein, the color space is an RGB color space or a YCbCr color space.

其中,其預先捨棄該顏色空間中對光源改變不敏感的顏色層,針對其餘的顏色層進行該基於估測修正色溫的色彩平衡演算。 Wherein, the color layer in the color space that is insensitive to the light source change is discarded in advance, and the color balance calculation based on the estimated corrected color temperature is performed for the remaining color layers.

其中,該直方圖系統之分欄及統計方法為對該直方圖系統取算數平均、幾何平均或選擇數目最多的分欄資料取算數平均。 The column and statistical method of the histogram system is to calculate the average of the number of the average, geometric average or the number of selected columns of the histogram system.

進一步的,該模糊推論規則由一類神經網路架構建立,其包含一輸入層、模糊化層、規則層及一輸出層,其中:由該輸入層分別輸入該原始影像之像素,並將該像素傳送至該模糊化層;該模糊化層對輸入之該原始影像之像素進行一模糊化運算,該模糊化運算係以一高斯歸屬函數進行運算,運算每一像素與該模糊推論規則的符合程度;該規則層對該模糊化層的結果進行一AND運算;及該輸出層進行一解模糊運算,輸出該原始影像中 各像素應對應的該估測色溫。 Further, the fuzzy inference rule is established by a neural network architecture, and includes an input layer, a fuzzification layer, a rule layer, and an output layer, wherein: the pixel of the original image is input by the input layer, and the pixel is Transmitting to the fuzzification layer; the fuzzification layer performs a fuzzification operation on the input pixel of the original image, the fuzzification operation is performed by a Gaussian attribution function, and the degree of compliance between each pixel and the fuzzy inference rule is calculated. The rule layer performs an AND operation on the result of the fuzzification layer; and the output layer performs a defuzzification operation to output the original image The estimated color temperature corresponding to each pixel.

其中,以該代表影像色溫對該原始影像進行白平衡、不同色溫轉換、其他顏色之影像補償等延伸後續影像處理。 Wherein, the original image is subjected to white balance, different color temperature conversion, image compensation of other colors, and the like, and the subsequent image processing is extended by the representative image color temperature.

其中,該高斯歸屬函數以一查表法替代;及該AND運算以取一最小值之演算方法替代。 Wherein, the Gaussian attribution function is replaced by a look-up table method; and the AND operation is replaced by a calculation method of taking a minimum value.

由上述說明可知本發明具有下列優點: From the above description, the present invention has the following advantages:

1. 直接透過該原始影像的資訊估測出影像色溫。 1. Estimate the image color temperature directly from the information of the original image.

2. 可應用於各種數位影像擷取工具(如數位相機、攝影機......等),亦可用於離線作業(後製影像)。 2. It can be applied to various digital image capture tools (such as digital cameras, cameras, etc.), and can also be used for offline operations (post-production images).

3. 可透過參數調整,規則增加等提升估測準確度。 3. It can improve the estimation accuracy through parameter adjustment and rule increase.

圖1為本發明較佳實施例之系統架構圖。 1 is a system architecture diagram of a preferred embodiment of the present invention.

圖2為本發明較佳實施例之模糊推論演算架構示意圖。 2 is a schematic diagram of a fuzzy inference calculation architecture according to a preferred embodiment of the present invention.

圖3為本發明較佳實施例之資料過濾及比對運算示意圖 3 is a schematic diagram of data filtering and comparison operation according to a preferred embodiment of the present invention;

本發明為一種色溫估測演算法,將需要進行一色溫估測的一原始影像以一種顏色空間的格式逐一輸入其像素至該色溫估測演算法中,由該色溫估測演算法中所包含的一模糊推論演算及一資料過濾及比對運算估算出一代表影像色溫,即為影像色溫。 The present invention is a color temperature estimation algorithm, which converts an original image that needs to be subjected to a color temperature estimation into a pixel in a color space format to the color temperature estimation algorithm, and is included in the color temperature estimation algorithm. A fuzzy inference calculation and a data filtering and comparison operation estimate a representative image color temperature, which is the image color temperature.

於執行該色溫估測演算法前於一標準空間內以一已知光源投射於一被測物體上,建立一白平衡標準影像。該被測物體反射該已知光源,透過一數位影像擷取裝置截取該被測物體受該已知光源照射所形成的影像,該影像定義為該白平衡標準影像。其 中,該標準空間為一排除該已知光源之外的光源的拍攝空間,該被測物體可為一單色物體,而該已知光源可為D50或D65,其中D65之光源最接近正常白天室外之陽光,本發明以其照射下之影像作為該白平衡標準影像。進一步的,估測之色溫資訊除了一般用在白平衡外,也可以針對其他顏色進行補償。 Before performing the color temperature estimation algorithm, a known light source is projected onto an object to be measured in a standard space to establish a white balance standard image. The object to be measured reflects the known light source, and the image formed by the known light source is intercepted by a digital image capturing device, and the image is defined as the white balance standard image. its The standard space is a shooting space for removing a light source other than the known light source, and the measured object may be a monochrome object, and the known light source may be D50 or D65, wherein the light source of D65 is closest to normal daytime. In the outdoor sunlight, the present invention uses the image under illumination as the white balance standard image. Further, the estimated color temperature information can be compensated for other colors in addition to the white balance.

進一步的,於本發明中該顏色空間的採用不限定於RGB顏色空間,也可為其他顏色空間,例如:YCbCr顏色空間或L*a*b*顏色空間。 Further, in the present invention, the use of the color space is not limited to the RGB color space, and may be other color spaces, such as a YCbCr color space or an L*a*b* color space.

如圖1所示,該色溫估測演算法包含下列步驟: As shown in Figure 1, the color temperature estimation algorithm includes the following steps:

步驟一、輸入該原始影像 Step 1: Enter the original image

步驟二、執行該模糊推論演算,該模糊推論演算包含複數條模糊推論規則,由該白平衡標準影像之像素建立該模糊推論演算判斷的依據,其中,該模糊推論規則建立步驟如下:模糊推論規則建立步驟一、將該白平衡標準影像之像素以色彩相近程度進行一色彩分群,依該色彩分群之數量決定該模糊推論規則之數量。 Step 2: Performing the fuzzy inference calculus, the fuzzy inference calculus includes a plurality of fuzzy inference rules, and the basis of the fuzzy inference calculation judgment is established by the pixels of the white balance standard image, wherein the fuzzy inference rule is established as follows: the fuzzy inference rule The first step is to perform color clustering on the pixels of the white balance standard image by color similarity, and determine the number of the fuzzy inference rules according to the number of the color clusters.

模糊推論規則建立步驟二、選定某一色溫,並依據色溫進一步分類該色彩分群之分類結果,依據該色溫分群所挑選之分群於該顏色空間之向量值計算出一規則中心(m k )及一規則寬度(σ),其中,該規則寬度為依據該規則中心及該顏色空間之向量值計算而得的一標準差。 The fuzzy inference rule is established in step 2. The color temperature is selected, and the classification result of the color group is further classified according to the color temperature, and a rule center ( m k ) and a vector are calculated according to the vector value of the color group selected by the color temperature group. The rule width (σ), wherein the rule width is a standard deviation calculated from the center of the rule and the vector value of the color space.

模糊推論規則建立步驟三、另該分群的色溫為後鑑部色溫參數(w k )。 The fuzzy inference rule is established in step 3. The color temperature of the group is the color temperature parameter (w k ) of the posterior portion.

重複上述該模糊推論規則建立步驟建立複數條該模糊推論 規則,而該模糊推論規則如下所示:Rule-1:If(R,G,B)is(m R1,m G1,m B1),then T est is T 1 Repeating the fuzzy inference rule establishing step to establish a plurality of fuzzy inference rules, and the fuzzy inference rule is as follows: Rule-1: If ( R , G , B ) is ( m R 1 , m G 1 , m B 1 ), t hen T est is T 1

Rule-2:If(R,G,B)is(m R2,m G2,m B2),then T est is T 2 Rule-2: If ( R , G , B ) is ( m R 2 , m G 2 , m B 2 ), t hen T est is T 2

...... ......

Rule-k:If(R,G,B)is(m Rk ,m Gk ,m Bk ),then T est is T k Rule-k: If ( R , G , B ) is ( m Rk , m Gk , m Bk ), t hen T est is T k

透過複數條該模糊推論規則判斷輸入的該原始影像之每一像素(R,G,B)應對應的一估測色溫(T est ) k ,k=1,...,NThe estimated color temperature ( T est ) k , k =1, . . . , N corresponding to each pixel (R, G, B) of the input original image is determined by a plurality of fuzzy inference rules.

該原始影像之像素輸入該模糊推論演算前為降低該模糊推論演算的運算時間,預先進行一過飽和前置處理,經由該過飽和前置處理判定為過飽和之像素則不輸入該模糊推論演算。該過飽和前置處理中包含一上界門檻及一下界門檻,透過該上界門檻及該下界門檻篩選由該原始影像輸入之像素。其中該過飽和前置處理的判斷式為,在該原始影像之像素值大於該上界門檻時,該像素判定為過飽和;在該原始影像之像素值小於該下界門檻時,該像素判定為過飽和。於本發明實施例中,該上界門檻、該下界門檻及其組成之判斷式如下:R>Sat upper & G>Sat upper & B>Sat upper 或R<Sat bottom & G<Sat bottom & B<Sat bottom Before the pixel of the original image is input to the fuzzy inference calculation, in order to reduce the operation time of the fuzzy inference calculation, a supersaturation pre-processing is performed in advance, and the pixel that is supersaturated by the supersaturation pre-processing is not input to the fuzzy inference calculation. The supersaturated pre-processing includes an upper threshold and a lower threshold, and the pixels input by the original image are filtered through the upper threshold and the lower threshold. The super-saturation pre-processing method is that when the pixel value of the original image is greater than the upper threshold, the pixel is determined to be supersaturated; when the pixel value of the original image is smaller than the lower threshold, the pixel is determined to be super-saturated. In the embodiment of the present invention, the upper threshold, the lower threshold, and the composition thereof are determined as follows: R> Sat upper &G> Sat upper &B> Sat upper or R< Sat bottom &G< Sat bottom &B< Sat bottom

其中,該上界門檻為:Sat upper 及該下界門檻為:Sat bottom The upper threshold is: Sat upper and the lower threshold is: Sat bottom .

該模糊推論規則由一類神經網路架構建立,如圖2所示,其中包含一輸入層(Layer1)、模糊化層模糊化層(Layer2)、規則層規則層(Layer3)及一輸出層(Layer4),其中各層之運算過程如下所示。 The fuzzy inference rule is established by a neural network architecture, as shown in FIG. 2, which includes an input layer (Layer1), a fuzzy layer fuzzification layer (Layer2), a rule layer rule layer (Layer3), and an output layer (Layer4). ), the operation process of each layer is as follows.

一、輸入層 First, the input layer

由該輸入層分別輸入該原始影像之像素,並將該像素傳送至該模糊化層模糊化層。 The pixels of the original image are respectively input by the input layer, and the pixels are transmitted to the blur layer fuzzification layer.

二、模糊化層 Second, the fuzzification layer

由該模糊化層對輸入之該原始影像之像素進行一模糊化運算,而於本發明實施例中該模糊化運算係以一高斯歸屬函數進行運算,運算每一像素與該模糊推論規則的符合程度,運算結果輸入至該規則層。該高斯歸屬函數之數學模式為: The fuzzification layer performs a fuzzification operation on the input pixel of the original image, and in the embodiment of the invention, the fuzzification operation performs a Gaussian attribution function to calculate the correspondence between each pixel and the fuzzy inference rule. Degree, the result of the operation is input to the rule layer. The mathematical mode of the Gaussian attribution function is:

其中:m k 為依據該色溫分群所挑選之分群於該顏色空間之向量值計算出該規則中心;σ k 為該規則重心之標準差;及μ(x)為該模糊化層運算之結果。 Where: m k is the center of the rule calculated according to the vector value of the color space group selected by the color temperature group; σ k is the standard deviation of the center of gravity of the rule; and μ( x ) is the result of the operation of the fuzzy layer.

進一步的,該高斯歸屬函數可以一查表法替代,以簡化整體運算。 Further, the Gaussian attribution function can be replaced by a look-up table method to simplify the overall operation.

三、規則層 Third, the rule layer

由該規則層對該模糊化層運算後的結果進行一AND運算,而於本發明實施例中,該集合運算之運算式如下所示: The result of the operation of the fuzzification layer is performed by the rule layer, and in the embodiment of the present invention, the operation formula of the set operation is as follows:

其中:「~」為規則層運算之結果。 among them:" ~ The result of the rule layer operation.

進一步的,該AND運算可透過取一最小值的演算方法替代,以簡化整體運算。 Further, the AND operation can be replaced by a calculation method that takes a minimum value to simplify the overall operation.

四、輸出層 Fourth, the output layer

由該輸出層進行一解模糊運算,輸出該原始影像中各像素應對應的該估測色溫。 A deblurring operation is performed by the output layer, and the estimated color temperature corresponding to each pixel in the original image is output.

其中本發明實施例中,該解模糊運算之運算方法如下所示: In the embodiment of the present invention, the operation method of the defuzzification operation is as follows:

其中:W為該後鑑部色溫參數;及T est 為該像素的估測色溫。 Where: W is the color temperature parameter of the back portion; and T est is the estimated color temperature of the pixel.

步驟三、如圖3所示,執行該資料過濾及比對運算,該資料過濾及比對運算於複數筆該像素之估測色溫中篩選出該代表影像色溫。 Step 3: As shown in FIG. 3, the data filtering and the comparison operation are performed, and the data filtering and the comparison operation are used to filter the representative image color temperature in the estimated color temperature of the pixel of the plurality of pens.

該資料過濾及比對運算依據該顏色空間中的色彩特徵分類並統計該原始影像中每一像素所對應的該估測色溫。並設定一估測色溫門檻。將分欄正規化後,取每一色溫值中大於該估測門檻的分欄之該色溫之平均值,該平均定義為該代表影像色溫。 The data filtering and comparison operation classifies and counts the estimated color temperature corresponding to each pixel in the original image according to the color features in the color space. And set an estimated color temperature threshold. After the column is normalized, an average value of the color temperature of each of the color temperature values greater than the estimated threshold is taken, and the average is defined as the representative image color temperature.

於本發明實施例中,該資料過濾與比對係以一直方圖系統 進行分欄及統計來定義該代表影像色溫,其中,前述之分欄及統計之方法可為對該直方圖系統取算數平均、幾何平均或選擇數目最多的分欄資料取算數平均。 In the embodiment of the present invention, the data filtering and comparison system is a histogram system. The column color and the statistics are used to define the color temperature of the representative image, wherein the foregoing method of column and statistics may be an arithmetic mean of the number of columns, the geometric mean or the number of selected columns of the histogram system.

步驟四、估測出該代表影像色溫後可對該原始影像進行白平衡、不同色溫轉換等延伸後續影像處理。 Step 4: After estimating the color temperature of the representative image, the original image may be subjected to white balance, different color temperature conversion, and the like, and the subsequent image processing is extended.

進一步的,於本發明實施例中,前述的色溫估測演算法可預先捨棄該顏色空間中對光源改變不敏感的顏色層,針對其餘的顏色層進行該色溫估測演算法的運算,以簡化整體運算。 Further, in the embodiment of the present invention, the foregoing color temperature estimation algorithm may pre-empt the color layer in the color space that is insensitive to the light source change, and perform the operation of the color temperature estimation algorithm for the remaining color layers to simplify Overall operation.

由上述說明可知本發明具有下列優點: From the above description, the present invention has the following advantages:

1. 直接透過該原始影像的資訊將未知光源的影像補償還原至已知光源的影像。 1. Restore the image compensation of the unknown source to the image of the known source directly through the information of the original image.

2. 可應用於各種數位影像擷取工具(如數位相機、攝影機......等),亦可用於離線作業(後製影像)。 2. It can be applied to various digital image capture tools (such as digital cameras, cameras, etc.), and can also be used for offline operations (post-production images).

3. 可透過參數調整,規則增加等提升估測準確度。 3. It can improve the estimation accuracy through parameter adjustment and rule increase.

Claims (10)

一種色溫估測演算法,其包含下列步驟:輸入一原始影像,該原始影像之像素以一種顏色空間之格式輸入;執行一模糊推論演算,該模糊推論演算包含複數條模糊推論規則,使輸入之該原始影像所有像素以該模糊推論規則產生每一該原始影像之像素所對應的一估測色溫;及執行一資料過濾及比對運算,該資料過濾及比對運算依照色溫值大小進行分欄,並於分欄中設定一估測色溫門檻,取分欄大於該估測色溫門檻的該估測色溫之平均值,該平均值定義為該代表影像色溫。 A color temperature estimation algorithm includes the steps of: inputting an original image, the pixels of the original image being input in a color space format; performing a fuzzy inference calculation, the fuzzy inference calculation comprising a plurality of fuzzy inference rules to enable input All pixels of the original image generate an estimated color temperature corresponding to each pixel of the original image by using the fuzzy inference rule; and perform a data filtering and comparison operation, and the data filtering and the comparison operation are performed according to the color temperature value. And setting an estimated color temperature threshold in the sub-column, the sub-column is greater than the average value of the estimated color temperature threshold of the estimated color temperature threshold, and the average value is defined as the representative image color temperature. 如請求項第1項所述的色溫估測演算法,建立該模糊推論規則包含下列步驟:依據該白平衡標準影像之像素以色彩相近程度進行一色彩分群,依該色彩分群之數量決定該模糊推論規則之數量;選定某一色溫,並依據色溫進一步分類該色彩分群之分類結果,依據該色溫分群所挑選之分群於該顏色空間之向量值計算出一規則中心及一規則寬度;該色彩分群之色溫為後鑑部色溫參數。 According to the color temperature estimation algorithm described in Item 1 of the claim, the fuzzy inference rule is established to include the following steps: performing color grouping according to the color of the standard image of the white balance standard image, and determining the blur according to the number of the color grouping. Inferring the number of rules; selecting a color temperature, and further classifying the classification result of the color group according to the color temperature, and calculating a rule center and a rule width according to the vector value of the color group selected by the color temperature group; the color grouping The color temperature is the color temperature parameter of the rear section. 如請求項第2項所述的色溫估測演算法,該資料過濾與比對係以一直方圖系統進行分欄及統計來定義該代表影像色溫。 According to the color temperature estimation algorithm described in Item 2 of the claim, the data filtering and comparison system is divided into columns and statistics by the histogram system to define the representative image color temperature. 如請求項第3項所述的基於估測修正色溫的色彩平衡演 算法,該原始影像之像素輸入該模糊推論前,預先進行一過飽和前置處理,其中該過飽和前置處理的判斷式為,在該原始影像之像素值大於該上界門檻時,該像素判定為過飽和;及在該原始影像之像素值小於該下界門檻時,該像素判定為過飽和。 Color balance based on estimated corrected color temperature as described in item 3 of the claim The algorithm, before the pixel of the original image is input to the fuzzy inference, pre-saturation pre-processing is performed, wherein the super-saturation pre-processing is determined by: when the pixel value of the original image is greater than the upper threshold, the pixel is determined as Supersaturated; and when the pixel value of the original image is less than the lower threshold, the pixel is determined to be supersaturated. 如請求項第4項所述的基於估測修正色溫的色彩平衡演算法,該顏色空間為RGB顏色空間或YCbCr顏色空間。 The color balance algorithm based on the estimated corrected color temperature according to item 4 of claim 4, wherein the color space is an RGB color space or a YCbCr color space. 如請求項第4項所述的基於估測修正色溫的色彩平衡演算法,其預先捨棄該顏色空間中對光源改變不敏感的顏色層,針對其餘的顏色層進行該基於估測修正色溫的色彩平衡演算。 The color balance algorithm based on the estimated corrected color temperature according to item 4 of claim 4, which pre-empts the color layer in the color space that is insensitive to the light source change, and performs the color based on the estimated corrected color temperature for the remaining color layers. Balance calculus. 如請求項第4項所述的基於估測修正色溫的色彩平衡演算法,其中,該直方圖系統之分欄及統計方法為對該直方圖系統取算數平均、幾何平均或選擇數目最多的分欄資料取算數平均。 The color balance algorithm based on the estimated corrected color temperature according to Item 4 of the claim, wherein the histogram system is divided into columns, and the statistical method is to calculate the average number, the geometric average, or the number of selected points in the histogram system. Column data is averaged. 如請求項第4項所述的色溫估測演算法,其中,以該代表影像色溫對該原始影像進行白平衡、不同色溫轉換、其他顏色之影像補償等延伸後續影像處理。 The color temperature estimation algorithm according to claim 4, wherein the original image is subjected to white balance, different color temperature conversion, image compensation of other colors, and the like, and the subsequent image processing is extended by the representative image color temperature. 如請求項第1、2、3、4、5、6、7或8項所述的色溫估測演算法,該模糊推論規則由一類神經網路架構建立,其包含一輸入層、模糊化層、規則層及一輸出層,其中:由該輸入層分別輸入該原始影像之像素,並將該像素傳送至該模糊化層;該模糊化層對輸入之該原始影像之像素進行一模糊化運 算,該模糊化運算係以一高斯歸屬函數進行運算,運算每一像素與該模糊推論規則的符合程度;該規則層對該模糊化層的結果進行一AND運算;及該輸出層進行一解模糊運算,輸出該原始影像中各像素應對應的該估測色溫。 The color temperature estimation algorithm described in claim 1, 2, 3, 4, 5, 6, 7, or 8 is constructed by a neural network architecture including an input layer and a fuzzification layer. a rule layer and an output layer, wherein: the pixel of the original image is input by the input layer, and the pixel is transmitted to the blur layer; the blur layer performs a blurring operation on the pixel of the original image input Calculating, the fuzzification operation is performed by a Gaussian attribution function, and the degree of conformity between each pixel and the fuzzy inference rule is calculated; the rule layer performs an AND operation on the result of the fuzzification layer; and the output layer performs a solution The fuzzy operation outputs the estimated color temperature corresponding to each pixel in the original image. 如請求項第1、2、3、4、5、6、7或8項所述的色溫估測演算法,該模糊推論規則由一類神經網路架構建立,其包含一輸入層、模糊化層、規則層及一輸出層,其中:由該輸入層分別輸入該原始影像之像素,並將該像素傳送至該模糊化層;該模糊化層對輸入之該原始影像之像素進行一模糊化運算,該模糊化運算係以一查表法進行運算,運算每一像素與該模糊推論規則的符合程度;該規則層對該模糊化層的結果進行一最小值運算;及該輸出層進行一解模糊運算,輸出該原始影像中各像素應對應的該估測色溫。 The color temperature estimation algorithm described in claim 1, 2, 3, 4, 5, 6, 7, or 8 is constructed by a neural network architecture including an input layer and a fuzzification layer. a rule layer and an output layer, wherein: the pixel of the original image is input by the input layer, and the pixel is transmitted to the blur layer; the blur layer performs a blurring operation on the pixel of the original image input The fuzzification operation is performed by a look-up table method to calculate the degree of conformity between each pixel and the fuzzy inference rule; the rule layer performs a minimum operation on the result of the fuzzification layer; and the output layer performs a solution The fuzzy operation outputs the estimated color temperature corresponding to each pixel in the original image.
TW103145884A 2014-12-27 2014-12-27 A color temperature estimation algorithm TWI552112B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
TW103145884A TWI552112B (en) 2014-12-27 2014-12-27 A color temperature estimation algorithm

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW103145884A TWI552112B (en) 2014-12-27 2014-12-27 A color temperature estimation algorithm

Publications (2)

Publication Number Publication Date
TW201624418A true TW201624418A (en) 2016-07-01
TWI552112B TWI552112B (en) 2016-10-01

Family

ID=56984795

Family Applications (1)

Application Number Title Priority Date Filing Date
TW103145884A TWI552112B (en) 2014-12-27 2014-12-27 A color temperature estimation algorithm

Country Status (1)

Country Link
TW (1) TWI552112B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107505836A (en) * 2017-08-31 2017-12-22 合肥京东方显示光源有限公司 A kind of method and device based on fuzzy control regulation colour temperature

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1694543A (en) * 2004-05-09 2005-11-09 天瀚科技股份有限公司 Method of automatic detection and processing main colour system of white balance
TWI281084B (en) * 2005-01-27 2007-05-11 Arima Computer Corp White balance method
CN1941923B (en) * 2005-09-30 2011-03-23 义晶科技股份有限公司 Automatic white balance method for color digital image
JP2010011441A (en) * 2008-05-26 2010-01-14 Sanyo Electric Co Ltd Imaging apparatus and image playback device

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107505836A (en) * 2017-08-31 2017-12-22 合肥京东方显示光源有限公司 A kind of method and device based on fuzzy control regulation colour temperature

Also Published As

Publication number Publication date
TWI552112B (en) 2016-10-01

Similar Documents

Publication Publication Date Title
EP3477931B1 (en) Image processing method and device, readable storage medium and electronic device
US9491440B2 (en) Depth-sensing camera system
EP2107814B1 (en) Image sensing apparatus and image processing method
JP4702635B2 (en) AUTO WHITE BALANCE CORRECTION VALUE CALCULATION DEVICE, METHOD, PROGRAM, AND IMAGING DEVICE
TWI389559B (en) Foreground image separation method
TWI293742B (en)
JP2019012426A (en) Image recognition device, learning device, image recognition method, learning method and program
JP4346634B2 (en) Target detection device
US20150278996A1 (en) Image processing apparatus, method, and medium for generating color image data
JP6613697B2 (en) Image processing apparatus, program, and recording medium
US10796418B2 (en) Image processing apparatus, image processing method, and program
Faridul et al. Approximate cross channel color mapping from sparse color correspondences
EP3745348B1 (en) Image processing for removing fog or haze in images
JP2016126750A (en) Image processing system, image processing device, imaging device, image processing method, program, and recording medium
WO2018116972A1 (en) Image processing method, image processing device, and recording medium
JP5395650B2 (en) Subject area extraction device and control method thereof, subject tracking device, and program
US10834370B2 (en) Image processing apparatus, image processing method, and non-transitory computer readable medium for color conversion
TWI543115B (en) A color balance algorithm based on estimation of adjusting ratios
WO2013114803A1 (en) Image processing device, image processing method therefor, computer program, and image processing system
JP6235168B2 (en) Image conversion based on classification
TWI552112B (en) A color temperature estimation algorithm
JP2007258923A (en) Image processing apparatus, image processing method, image processing program
WO2013114802A1 (en) Image processing device, image processing method therefor, computer program, and image processing system
KR101722969B1 (en) Apparatus for detecting moving object and method for controlling the same
JP6314281B1 (en) Image processing method and foreground region acquisition method

Legal Events

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