TWI274908B - A method for interpolating the color of color filter array - Google Patents

A method for interpolating the color of color filter array Download PDF

Info

Publication number
TWI274908B
TWI274908B TW94140979A TW94140979A TWI274908B TW I274908 B TWI274908 B TW I274908B TW 94140979 A TW94140979 A TW 94140979A TW 94140979 A TW94140979 A TW 94140979A TW I274908 B TWI274908 B TW I274908B
Authority
TW
Taiwan
Prior art keywords
color
pixel
pixels
value
interpolation
Prior art date
Application number
TW94140979A
Other languages
Chinese (zh)
Other versions
TW200720716A (en
Inventor
Jhing-Fa Wang
Han-Jen Hsu
Chien-Shun Wang
Original Assignee
Univ Nat Cheng Kung
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 Univ Nat Cheng Kung filed Critical Univ Nat Cheng Kung
Priority to TW94140979A priority Critical patent/TWI274908B/en
Application granted granted Critical
Publication of TWI274908B publication Critical patent/TWI274908B/en
Publication of TW200720716A publication Critical patent/TW200720716A/en

Links

Landscapes

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

Abstract

A color interpolation method for color filter array (CFA) is disclosed. After sampling the image through the color filter array, this method introduces pre-estimation the minimum square error (MSE) to address the color interpolation for color filter array. In order to estimate the missing pixels in color filter array pattern, the weights of adjacent color pattern pairs are decided by the matrix computation. In the operating, this method also adopts the one color model to achieve better human visual effect.

Description

1274908 九、發明說明 【發明所屬之技術領域】 本發明是有關於一種影像色彩内插之方法,且特別是有 關於利用預先估算最小平方誤差(Mean Squafe麻瓜⑽; MSE)來内插彩色遽光器陣列所得到之影像之—種色彩内插 的方法。 Φ 【先前技術】 ,近年來,數位相機(Digitalst出cameras;DSCS)成為非 常受歡迎的消費性電子產品。數位相機—般係利用電荷耗人 元件(Charge C〇Uple Device; CCD)或互補式金氧半導: (CMOS)感側器將所感測到之入射光轉化成電氣信號,铁後 這些電氣信號經類比/數位的轉換,成為數位影像信號。' 為了節省取樣的色彩像素及感測器的尺寸,一般最常扩 用彩色遽光片陣列(Color Filter Array;⑽)來作為一種: _樣格式,因此鍍一層彩色濾光片陣列於CCD或cm〇s感側 器上。一般常使用之彩色濾光片陣列係採用貝爾(Βπα £ .以㈣所發表之CFA ’如第i圖所示’ #中r係為紅色、g 係為綠色以及B係為藍色。 當採用CFA時,每一個取樣點只有一個顏色,即全色 系(即紅、綠、藍三色)的三分之―,又因人類視覺對亮度 (Luimnance)即綠色(Green channel)較敏感,因此整個[FA 中,一半的濾光片係為綠色。接著藉由適當的處理運算,將 所要内插之像素所含之基本色素成分,藉由内插的方式加以 5 1274908 處理,得到最佳之真實影像結果。 -般習知之内插方法,是指決定函數中位在一些已知 取樣點中的未知值。傳統的内插方法非常多,例如最鄰近 點(Nearest Neighbor)内插、雙線性(BUinear)内插、三次 • B-SPHne (Cubic B-spHne)内插和三次迴旋(a- • C_ — )内插等内插方法。但這些傳統内插方法各有其 缺點,例如,最鄰近點内插法和雙線性内插法的運算速度 鲁雖快’但内插補償的品質普遍偏低,内插後的影像常出現 嚴重的模糊,且在邊界影像區域上出現很嚴重的瑕疲(即鑛 齒制小故未能提供良好的影像品質,在視訊影像日漸講 未高解析度、高對比度的現今,最鄰近點内插法和雙線性 内插法已經不太適用。 而三次B-spline内插法和三次迴旋内插法的運算,由 於需要眾多參數進行多重運算,故運算過程過於複雜,於 影像信號處理系絲中,絲A匕# Μ ,士山 示、、兄〒,雖忐提供精確且品質良好的内插 參,’但由於運异複雜且耗時,在實施時將造成產品的成本 提高’且亦不適用於即時的數位彩色取像系統。而且,於 應用CCD和CFA取樣格式的數位彩色取像系統中,應用 、傳統内插方法時,内插後的影像容易出現彩色雜點和邊緣 ,模糊,it匕為傳統内插方法最主要的缺點。 因此有必要提供一種新式的影像色彩内插技術,可使一 種數位影像處理系統内(例如:數位相機或數位攝影機)之彩 色肩光片陣列之色彩内插成較高品質之影像,且提供一 規則f生之决算法,有利於數位信號處理器或積體電路之實 6 1274908 現。 【發明内容】 因此根據上述之目的,本發明的目的之一就是在提供一 種影像色彩内插之方法,此影像色彩内插之方法係利用預先 估异最小平方誤差(Mean Square Minimum; MSE)來内插、還 原彩色慮光片陣列(Color Filter Array; CFA)的彩色影像。過 •程中亦採用一種色彩模型(KR,KB),使還原之色彩更接近於 人類的視覺反應。因此,本發明比習知技術具有較高的影像 品質,且於藍色像素之效果表現上更突出。 / 本發明之另一目的係在提供一種影像色彩内插之方 法,此影像色彩内插之方法係利用由矩陣運算所求出之鄰近 色彩像素權重值(Weights)。因為本發明之矩陣運算較規則 性,所以適合於將本發明之演算法實現於硬體上。。 振據本發明之上述目的,提出一種影像色彩内 _ 包含: 徒供棋盤陣列,具有交錯排列之複數個奇數列和複數個 偶數列’其中祺盤陣列上設置右 °又直百禝數個弟一像素、複數個第 一像素、和複數個第三像辛,筮_ 苐二像素之一部分與第一像素 係父錯排列在奇數列上,第伤 六料〇 素之另一部分與第二像素係 乂錯排列在偶數列上,其中第r 弟—像素之母四者係分別水平且 £直地緊相鄰於第一傻夸夕甘 者,每自“ 者或第二像素之其中- 者,母一苐一像素具有第一原色 一楚一f巳值弟一第二色内插值和第 弟二色内插值,每一第-祿|曰丄 母弟一像素具有第二原色值、第二第一 7 1274908 色内插值和第-笛_ Λ βπ 4:^ 一弟一色内插值,每一第三像素具有第三原色 值、弟二弟-色内插值和第三第二色内插值; 利用一内插步驟,以針對第-像素之第-標的像素, i Λ 中與第一標的像素最相鄰之十二個第三像 备主 、弟 的像素水平或垂直相鄰之四個第 •μ :、二士計算出第一標的像素之第一第三色内插值; 利用内插步驟’以針對第二像素之第二標的像素, 利用第二像素中愈第— 〃二 ,'弟一私的像素最相鄰之十二個第三像 ':庶冬弟像▲素:與第二標的像素水平或垂直相鄰之四個第 :、一來:异出第二標的像素之第二第三色内插值; 音φ 二一内插步驟’以針對第-標的像素,利用第二像 夕/二::標的像素對角線相鄰之四個第二像素、第一像素 4a& ^ ^ , γ興弟一標的像素對角線相鄰和位於第 一標的像素位置之五個 ^ 個弟一像素之第一第三内插值、及第一 像素中與弟一標的傻夸 狄山々 豕素對角線最相鄰之四個第一像素,來計 异出第一標的像夸夕键 豕f之弟—第二色内插值; 進行第四内插舟 利用第二像素二目:,?情第三像素之第三標的像素’ .^ 娜於第二標的像素之六個第二像素、第 «像素之第一第 一 徊筮屈主i —色内插值中最相鄰於第三標的像素之六 個第一像素中之第一繁一 Λ^. ^ 弟二色内插值、第一像素之第一第三色 内插值中與第三樟 楚一 Α Λ ,、的像素水平相鄰之二個第一像素之第一 弟二色内插值、第二 你主丰士 1 — 1家素之第二第三色内插值中與第三標的 像素垂直相鄰之二個 ^ 始本^ , 第二像素之第二第三色内插值、及第三 像素中水平與垂直如 ^ 邮於第三標的像素之四個第三像素,來 1274908 计算出第三標的像素 — |之第二第一色内插值; 仃弟五内插步騍,以針對第二 素中與第二標的像素”的像素,利用第-像 之第二第:内插值線相…個第-像素、第二像素 二標的像素位置之五個第二像素之第角線相鄰和位於第 像专中盥笛昂一弟二内插值、及第二 ’、’、一軚的像素對角線最相鄰之w ^ $ 算出第-庐μ#古 州心四個弟二像素,來計 弟-私的像素之第二第-色内插值;以及 辛中插步驟,以針對第三標的像素,利用第-像 ::標的像素之六個第-像素、第二像素之第 一弟二色内插值中最相鄰於第二 則目郇於弟—私的像素之六個第二像素 二-弟三色内插值、第二像素之第二第三色内插值中與 :二私的像素水平相鄰之二個第二像素之第二第三色内插 ,、第-像素之第一第三色内插值中與第三標的像素垂直相 4之二個第-像素之第—第三色内插值、及第三像素中水平 與垂直相鄰於第三標的像素之四個第三像素,來計算出第三 標的像素之第三第一色内插值。 【實施方式】 本發明係有關於一種影像色彩内插之方法,且特別是有 關於利用預先估异最小平方誤差(Meail Square Minimum; MSE)來内插彩色濾光器陣列中所得到之影像之一種色彩内 插的方法。以下將詳細討論本發明之較佳實施例的操作。然 而’在此所揭示的實施例並非本發明僅能思及的應用與使 用。所討論之特定實施例只是用來描述使用本發明的特定方 9 1274908 式,並非用以限定本發明之範圍或後附之申請專利範圍。 請再參照第1圖,本發明之影像色彩内插演算法係由下 述式(1)推導開始,其中尺㈠係為中心點實際值、尤,»為中心 點像素的估算值,而κ,(χ)是鄰近像素χ的實際值,其中i、· 係為鄰近像素之索引值(Index),Wi、Wj係為鄰近像素之權 重值(Weights),η係為鄰近像素點數。 = (1) 經由中心點實際值^和估算值^"(χ)之間的最小 差定義如式(2): " k{xyK(x)j) η η η 1 7-1 /=1 (2) η η η =Σ Σ wiwjc{x^ ^ 2Χ wtc(x, xt) + C(〇) )=1 ζ=1 方誤差,將 步推導出式 其中¢:(^7.)= ^(χ,)·尺(Ά,為了得到最小化平 式(2)偏微分如式(3)所示並令結果等於零,進— (4): (3) (4) 4,並將式(4) = 2^wJc(xi,Xj)- 2C(x,xi),i = 1,...,η f C(X丨·,X)) = C(X,Xy ),/ 1 f...yf7 在本發明之實施例中,將式(4)中的n設為 展開成式(5): 1274908 其中係為c(x〃x)),Q係為),最後鄰近色彩像素的 值可A 忘妨;π击二笛哲. ~w{ W2 W3 = w4 _ A _ CH c12 c13 C14 i C21 C22 C23 C24 1 C31 C32 C33 c34 i C41 C42 C43 C44 i ~ 1 1 1 l〇 γ-1 'c10~ C2〇 C30 C40 - 1 (6) 其中%請參照第2圖、第3圖,此个。叫· ,_ ..........讯%員 %例之一種影像色彩内插方法的流程圖、第3圖係繪示依照 本發明實施例之一種影像色彩内插方法的實施步驟流程圖 百先步驟10 :擷取彩色濾光片陣列之像素,然後送3 步驟20來進行。請再參照第1圖,設藍色像素(Bi,j)為中< ”、占像素,接著進行第2圖中之步驟20 ··内插綠色於此藍爸 像素上,内插方法之流程圖如第3圖所示,實施方法如下 步驟U0 :計算平均像素,如式(8)所示: 〇α ^ + G/+UJ" 〇iJ~l + )/4 ⑺ 第2圖係繪示依照本發明實 〜 :+2 J-l + ^/+2,7+1, ru+2 = fe-U+2 + GiJ+l + Gi+lJ+2)/3G·…-1,卜2 +G/+1 上2)/3 K、j “2,y G··」也u+G“2j+1)/3 G, (8) 其中此平均像素(G,)之計算係利用與中心點像素(Bi :鄰之 Gi-2,川、Gm,[2、G…、GM,j+2、Gi j i、 Gm,j-2、Gi+1,j、Gi+l j+2、Gi+2 j i 及 Gi+2,…的像素值。 接著如式(9)所示,進行步驟12(^計算不同位置的像 色差值,以求出十組的像素色差值後,其中計算像素 1274908 差值之計算係利用%o,2Ag,J B;+2;j"^^ 和’接著代回式(6),即進;;2 :;、:叫’ 此些權重值係為位 ·“權重值’ ΠΓ 士“、 …占像素(Bi,j)之四個鄰近位置(上、 下、左及右)的權重值(Wi,W2, W3, D。 接著步驟14G:進行色彩模型轉換,以求出於中心 素(BU)相鄰之四組不同像素位置(上、下、左及右)的轉換值 (KB ),轉換值(κΒ )係定義為Kb = g_b。轉換值之計算係利用 Gi.1J、^,卜1、Gi’j + 1、G…,j、B%·、Bi,j-2、BU、Βί+2,』及 Bi j+2。 而色彩轉換過程如式(10)所示。 C30 =1^/+2,7 ~5/,>HG/+2J C40 =“j+2 -'」+|G/j+2 ’12 =1^-2,厂 5/J-2| 啦一 2 j C13 =(|尽-2,厂尽+2 2,y C14 APi-2J ^BiJ^+\Gi-lJ [j-2^K2j\+\Gu_2 ^24 APiJ-l 和/+2,厂尽"+2丨啦+2,7· -0,^)/256+1 _G/j 1)/256+1 Ί产6+1 〜-2,|)/512+1 ,()/512+1 -G, -G,y+2()/512+l ))/512+1 {/512+1 -G, 、+2j \j^2 JU+2 丨/512+1 (9)BACKGROUND OF THE INVENTION 1. Field of the Invention This invention relates to a method of image color interpolation, and more particularly to interpolating color 利用 using a pre-estimated least square error (Mean Squafe Muggle (10); MSE). A method of color interpolation of an image obtained by an array of optics. Φ [Prior Art] In recent years, digital cameras (Digitalst out cameras; DSCS) have become very popular consumer electronics products. Digital cameras generally use a Charge C〇Uple Device (CCD) or a complementary MOS semiconductor: (CMOS) sensor to convert the sensed incident light into an electrical signal. The analog/digital conversion becomes a digital image signal. In order to save the size of the sampled color pixels and sensors, it is common to use a color filter array (Color Filter Array; (10)) as a type: _-like format, so a color filter array is coated on the CCD or Cm〇s on the side sensor. The commonly used color filter arrays are Bell (Βπα £. The CFA published by (4) is shown in Figure i. # 中中r is red, g is green, and B is blue. In CFA, each sampling point has only one color, that is, the full color system (ie, the three colors of red, green, and blue), and because human vision is sensitive to Luimnance or Green channel. In the whole [FA, half of the filters are green. Then, by appropriate processing, the basic pigment components contained in the pixels to be interpolated are processed by interpolation to 5 1274908. Real image results. - The conventional interpolation method refers to determining the unknown value of the function in some known sampling points. Traditional interpolation methods are very many, such as nearest neighbor (Nearest Neighbor) interpolation, double line Interpolation methods such as BUinear interpolation, cubic • B-SPHne (Cubic B-spHne) interpolation and cubic convolution (a- • C_ — ) interpolation, but these traditional interpolation methods have their own disadvantages, for example, Nearest point interpolation and bilinear interpolation Although the speed is fast, but the quality of the interpolation compensation is generally low, the image after interpolation often appears severely blurred, and there is a serious fatigue in the boundary image area (ie, the mineral tooth system is not good enough). Image quality, in the current video image is not high resolution, high contrast, the nearest neighbor interpolation and bilinear interpolation is not suitable. And three B-spline interpolation and three cyclotron interpolation The calculation of the method requires too many parameters for multiple operations, so the calculation process is too complicated. In the image signal processing system, silk A匕# Μ, Shishan, and Xiong, although providing accurate and good quality interpolation Participation, 'But because of the complexity and time-consuming operation, the cost of the product will increase when implemented' and it is not suitable for the instant digital color image acquisition system. Moreover, the digital color image acquisition system using the CCD and CFA sampling formats In the application, traditional interpolation method, the interpolated image is prone to color noise and edges, and blur, which is the main disadvantage of the traditional interpolation method. Therefore, it is necessary to provide a new type of Like color interpolation technology, the color of a color shoulder array in a digital image processing system (for example, a digital camera or a digital camera) can be interpolated into a higher quality image, and a rule algorithm is provided. It is advantageous for a digital signal processor or an integrated circuit. 6 1274908. [Invention] Therefore, in accordance with the above object, one of the objects of the present invention is to provide a method for image color interpolation, which is a color interpolation method. The color image of the Color Filter Array (CFA) is interpolated and restored using a pre-estimated least square error (MSE). A color model (KR, KB) is also used in the process to make the restored color closer to the human visual response. Therefore, the present invention has higher image quality than the prior art, and is more prominent in the effect of blue pixels. Another object of the present invention is to provide a method of image color interpolation which utilizes adjacent color pixel weights (Weights) as determined by matrix operations. Since the matrix operation of the present invention is relatively regular, it is suitable to implement the algorithm of the present invention on a hardware. . According to the above object of the present invention, an image color _ is included: Included: an array of chessboards having a plurality of odd-numbered columns and a plurality of even-numbered columns arranged in a staggered manner. One pixel, a plurality of first pixels, and a plurality of third pixels, one of the two pixels of the first pixel and the first pixel are arranged in an odd column, and the other part of the first pixel and the second pixel of the first pixel The system is arranged in an even column, where the second brother-pixel mother is horizontally and immediately adjacent to the first silly, each of the "or" or the second pixel. The mother has a first primary color, a first color, a second color interpolation value, and a second color interpolation value, and each of the first and second mothers has a second primary color value, a first 7 1274908 color interpolation value and a first - flute _ Λ βπ 4: ^ a color interpolated value, each third pixel has a third primary color value, a second color-interpolation value and a third second color interpolation; Using an interpolation step to target the first-target pixel of the first pixel, i Λ The first and third color interpolated values of the pixels of the first target are calculated by four pixels of the twelve third image masters and the younger brothers adjacent to the first target pixel horizontally or vertically adjacent to each other. Using the interpolation step 'to target the second target pixel of the second pixel, using the second pixel in the second - second, 'different private pixel's nearest twelve twelve images': 庶冬弟像▲ prime: four horizontally or vertically adjacent to the second target pixel: one, one: the second third color interpolated value of the second target pixel; the sound φ two one interpolation step 'for the first target a pixel, using the second pixel of the second image of the second/second::: the second pixel adjacent to the diagonal of the pixel, the first pixel 4a & ^ ^, the diagonal of the pixel of the first pixel and the pixel of the first target The first and third interpolated values of the five pixels of the position, and the four first pixels adjacent to the diagonal of the silly Quaidine in the first pixel, A standard like the quaint 豕f brother - the second color interpolation; the fourth interpolation boat uses the second pixel two: The third target pixel of the third pixel '.^ is the second pixel of the second target pixel, the first pixel of the first pixel is the most adjacent to the third interpolated value. The first one of the six first pixels of the target pixel is ^. ^ The second color interpolated value, the first third color interpolated value of the first pixel, and the pixel level of the third one. The first two-color interpolated value of the two adjacent first pixels, and the second second color interpolated value of the second main color of the second main pixel of the second main pixel are perpendicularly adjacent to the third target pixel. ^, the second third color interpolated value of the second pixel, and the third pixel in the third pixel horizontally and vertically as the third target pixel, to calculate the third target pixel - 2 of the second pixel Interpolating the first color; inserting the step by the fifth, with the second pixel of the first image: interpolating the value of the pixel of the second pixel and the pixel of the second pixel. The diagonal lines of the five second pixels of the pixel position of the pixel are adjacent to each other and are interpolated in the first image of the image. And the second ', ', and the next diagonal of the pixel diagonally the nearest w ^ $ to calculate the first - 庐μ# Guzhou heart four brothers two pixels, to count the younger-private pixels in the second - color Interpolating; and symplectic interpolation step, for the third target pixel, using the first pixel of the first-image::pixel, and the first two-color interpolated value of the second pixel being the most adjacent to the second target In the second pixel of the private-private pixel, the second-third-color interpolated value, and the second-third interpolated value of the second pixel are The third color interpolation, the first third color interpolating value of the first pixel, the third color interpolating value of the two first pixels of the vertical phase 4 of the third target pixel, and the horizontal sum of the third pixel The third first color interpolated value of the third target pixel is calculated by vertically adjacent to the fourth third pixel of the third target pixel. [Embodiment] The present invention relates to a method for image color interpolation, and in particular to interpolating an image obtained in a color filter array by using a Meail Square Minimum (MSE). A method of color interpolation. The operation of the preferred embodiment of the present invention will be discussed in detail below. However, the embodiments disclosed herein are not intended to be used and utilized in the present invention. The specific embodiments discussed are merely illustrative of the specific aspects of the invention, and are not intended to limit the scope of the invention or the scope of the appended claims. Referring to FIG. 1 again, the image color interpolation algorithm of the present invention is started by the following formula (1), wherein the ruler (1) is the actual value of the center point, especially, the value of the pixel is the center point, and κ (χ) is the actual value of the neighboring pixel ,, where i, · is the index value (Index) of the neighboring pixel, Wi, Wj is the weight value of the neighboring pixels, and η is the number of neighboring pixels. = (1) The minimum difference between the actual value of the center point ^ and the estimated value ^"(χ) is defined as (2): " k{xyK(x)j) η η η 1 7-1 /= 1 (2) η η η =Σ Σ wiwjc{x^ ^ 2Χ wtc(x, xt) + C(〇) )=1 ζ=1 square error, the step is derived from where ¢:(^7.)= ^(χ,)·尺(Ά, in order to get the minimum flat (2) partial differential as shown in equation (3) and let the result be equal to zero, enter - (4): (3) (4) 4, and (4) = 2^wJc(xi,Xj)- 2C(x,xi),i = 1,...,η f C(X丨·,X)) = C(X,Xy ), / 1 f ...yf7 In an embodiment of the present invention, n in equation (4) is set to expand into equation (5): 1274908 where c(x〃x)), Q system is), and finally adjacent color pixels The value of A can be forgotten; π 击二笛哲. ~w{ W2 W3 = w4 _ A _ CH c12 c13 C14 i C21 C22 C23 C24 1 C31 C32 C33 c34 i C41 C42 C43 C44 i ~ 1 1 1 l〇γ -1 'c10~ C2〇C30 C40 - 1 (6) For %, please refer to Fig. 2 and Fig. 3 for this one. A flowchart of an image color interpolation method of the example of the %, and a third figure illustrates the implementation of an image color interpolation method according to an embodiment of the present invention. Step Flow Chart Step 10: Capture the pixels of the color filter array and send 3 steps 20 to perform. Referring to FIG. 1 again, the blue pixel (Bi, j) is set to middle < ”, and the pixel is occupied, and then step 20 in FIG. 2 is performed. · Interpolating green on the blue dad pixel, the interpolation method is The flow chart is as shown in Fig. 3. The implementation method is as follows. Step U0: Calculate the average pixel as shown in equation (8): 〇α ^ + G/+UJ" 〇iJ~l + )/4 (7) Figure 2 Show in accordance with the present invention ~ : +2 Jl + ^ / + 2, 7 + +, ru + 2 = fe-U + 2 + GiJ + l + Gi + lJ + 2) / 3G · ... -1, Bu 2 + G/+1 2)/3 K, j “2, y G··” also u+G “2j+1)/3 G, (8) where the calculation of the average pixel (G,) is utilized and centered Point pixel (Bi: neighboring Gi-2, Sichuan, Gm, [2, G..., GM, j+2, Gi ji, Gm, j-2, Gi+1, j, Gi+l j+2, Gi +2 ji and the pixel value of Gi+2, .... Then, as shown in equation (9), step 12 is performed (^ calculates the color difference values of different positions to obtain ten groups of pixel color difference values, wherein Pixel 1274908 The difference is calculated by using %o, 2Ag, JB; +2; j"^^ and 'subsequently returning (6), ie;; 2:;,: called 'the weight values are in bits · "weight value" “士", ... occupies pixels (B i, j) the weight values of the four adjacent positions (up, down, left, and right) (Wi, W2, W3, D. Next step 14G: performing color model conversion to find the center (BU) adjacent The conversion values (KB) of the four different pixel positions (up, down, left, and right), and the conversion value (κΒ) are defined as Kb = g_b. The calculation of the conversion value is performed using Gi.1J, ^, Bu 1, Gi 'j + 1, G..., j, B%·, Bi, j-2, BU, Βί+2, 』 and Bi j+2. The color conversion process is as shown in equation (10). C30 =1^/ +2,7 ~5/,>HG/+2J C40 ="j+2 -'"+|G/j+2 '12 =1^-2,厂5/J-2| 啦一2 j C13 =(|Do as well-2, the factory does +2 2,y C14 APi-2J ^BiJ^+\Gi-lJ [j-2^K2j\+\Gu_2 ^24 APiJ-l and /+2, the factory is done" +2丨啦+2,7· -0,^)/256+1 _G/j 1)/256+1 Ί6+1 ~2,|)/512+1 ,()/512+1 - G, -G,y+2()/512+l ))/512+1 {/512+1 -G, , +2j \j^2 JU+2 丨/512+1 (9)

Cj! =C22 =〔33 =C44 =〇 ,iVu) = GU,r((t2J+t)/2)^ ^ B(i,j-l) ~ ~ ((^i,y-2 + ^i,j-(fe+2,y + A" V 2) (10)IW".+i) = A+i - ((尽"+2 + 尽"·)/ 2) 接著,由式(6)求出之權重值與式(10)求出之轉換值(Kb, 值,經由式(11)即步驟150 :計算色彩估算值。接著進行步 12 1274908 驟1 60 :計算内插值(Gi,j ),此内插值係利用中心點像素與 色彩估算值之計算,如式(12)所示。此内插值(Gij,,)係為在 藍色像素位置之藍色綠色内插值。 = ><K:B{ijA)+W, x^B(i+lj)+W4 xiCB(ij+l) WBij+Bid (12) 重覆進行本步驟20,直到CFA中所有藍色像素處理完 成,才進行下一步驟。Cj! =C22 =[33 =C44 =〇,iVu) = GU,r((t2J+t)/2)^ ^ B(i,jl) ~ ~ ((^i,y-2 + ^i,j -(fe+2,y + A" V 2) (10)IW".+i) = A+i - ((to do "+2 + do "·)/ 2) Next, by equation (6) Calculate the weight value and the conversion value (Kb, value obtained by equation (10), and calculate the color estimation value via equation (11), step 150. Then proceed to step 12 1274908, step 1 60: calculate the interpolation value (Gi,j) The interpolated value is calculated using the center point pixel and the color estimate, as shown in equation (12). This interpolated value (Gij,,) is the blue-green interpolated value at the blue pixel position. = ><K:B{ijA)+W, x^B(i+lj)+W4 xiCB(ij+l) WBij+Bid (12) Repeat step 20 until all blue pixels in the CFA are processed. Go to the next step.

^請參照第4圖,設一紅色像素(Ru)為中心點像素,接 著進行第2圖中之步驟30 :内插綠色於此紅色像素上,此 步驟30類似於步驟20,惟中心點像素不相同。内插方法亦 如第3圖之流程圖所示,實施方法如下: 步驟110 :計算平均像素,如式(8)所示: 八中此平均像素(G )之計异係利用與中心點像素(心』) 相郴之 Gw,』」、Gi_2J + 1、Gmj-2、Gm,』、Gi'j+2、Gi’p、Gi j + 1、 、Gi+1,j、Gi+1,j+2、Gi+2,w 及 Gi+2J + 1 之像素值。 接著如式(13)所示,以進行步驟12〇 :計算不同位置的 像素色差值,以求出十組的像素色差值(Cij)後,其中計算像 素色差值之計算係利用Ri 2 j、Ri j 2、Ri j、&,卜2及U j之 像素值及式(8)所計算之平均像素(G,),接著代回式(6),’即 進仃步驟130 :計算權重值,此些權重值係為位於中心點像 素(Ri,』)之四個鄰近位置(上、下、左及右)的權重值 W3, W4)。 , 接著步驟 素d,j)相鄰之 140 :進行色彩模型轉換,以求出於中心點像 四組不同像素位置(上、下、左及右)的轉換值 13 1274908 (KR’),轉換值(KR’)係定義為kr=G-R。轉換值之外瞀 DT异係利用^Please refer to FIG. 4, set a red pixel (Ru) as the center pixel, and then proceed to step 30 in FIG. 2: interpolate the green pixel on the red pixel, this step 30 is similar to step 20, but the center pixel Not the same. The interpolation method is also shown in the flowchart of FIG. 3, and the implementation method is as follows: Step 110: Calculate the average pixel, as shown in the formula (8): The average pixel (G) of the eight is used and the center point pixel (heart)) Gw, 』", Gi_2J + 1, Gmj-2, Gm, 』, Gi'j+2, Gi'p, Gi j + 1, Gi+1, j, Gi+1, The pixel values of j+2, Gi+2, w and Gi+2J + 1. Then, as shown in the formula (13), to perform step 12: calculating pixel color difference values at different positions to obtain ten sets of pixel color difference values (Cij), wherein calculating the pixel color difference values is performed by using Ri 2 j, Ri j 2, Ri j, &, the pixel values of Bu 2 and U j and the average pixel (G,) calculated by equation (8), and then returning to (6), 'that is, step 130 : Calculate the weight value, which is the weight value W3, W4) of the four adjacent positions (up, down, left, and right) of the center point pixel (Ri, 』). Then, the step element d, j) adjacent 140: performs color model conversion to obtain a conversion value 13 1274908 (KR') at a central point image of four different pixel positions (up, down, left, and right), and converts The value (KR') is defined as kr=GR. Outside the conversion value 瞀 DT heterogeneous use

Gi-ij - Gij.! ' Gijj + 1 - Gi + 1J > Ri.2,j ' Rij-2 " Rij - Ri + 2 . ^ R ’ J ^ i, j -f 2 0 而色彩轉換過程如式(14)所示。 c川十一2 〜卜丨。一2,产 十 ^如,/-,-Gz·,/丨)/2 漏 C3〇=(^+2j*-^ji^/+2j--G/,yj)/255+7 C^+z.J>2-/?〇.|+|(^J+2f—Gz.,/|)/z^+7 。/2+/-,)-'7-2丨+丨。/-2,产%—2,|)/犯+/Gi-ij - Gij.! ' Gijj + 1 - Gi + 1J > Ri.2,j ' Rij-2 " Rij - Ri + 2 . ^ R ' J ^ i, j -f 2 0 and the color conversion process As shown in formula (14). c Chuan eleven 2 ~ divination. One 2, production ten ^, /-, -Gz·, /丨)/2 leak C3〇=(^+2j*-^ji^/+2j--G/,yj)/255+7 C^+ z.J>2-/?〇.|+|(^J+2f—Gz.,/|)/z^+7. /2+/-,)-'7-2丨+丨. /-2, production % - 2, |) / commit + /

。"=卜._以-〜+2|+卜2,)%">2||/5/2+/ c23 ^\Ri,j-2-Ri+2j\+\GiJ-~2,-Gi+2,j,^l^^+i C 一 〜_2 -/^2|+|G/,^LGi J+y|j/5/2+/ 04=^+2,)-^+21+6+2,/-(^+/1)/5/2+/ 、CU 二C22 33 =C44 =0 , ( 1 3 ) ^fR(i-l,j) = ^i-lj ~ ((^/-2J + ^/j)/ ^ ^R(ij-i) = ^ij-i - ((^/,;-2 + ^/j)/ ^ R(i+l,j) = ^i+JJ ^{{Ri+2j+Rij)/2) (14) K’R(U+” = GiJ+】 — ((RiJ+2 + Ru)/ 2) 接著,由上述求出之權重值與轉換值(KR,)值,經由式 (15)即步驟150 :計算色彩估算值。接著進行步驟16〇 · ^十 算内插值(Gi,j ),此内插值係利用中心點像素與色彩估曾值 之計算,如式(16)所示。此内插值(Gi,」’’)係為在紅色像素位 置之紅色綠色内插值。 ^r,R〇J) = X^R〇-lJ)+W2 ^RO+Jj)'^ R(. } (15) (16) 直到CFA中所有紅色像素處理完. "=卜._以-~+2|+卜2,)%">2||/5/2+/ c23 ^\Ri,j-2-Ri+2j\+\GiJ-~2 ,-Gi+2,j,^l^^+i C~~_2 -/^2|+|G/,^LGi J+y|j/5/2+/ 04=^+2,)-^ +21+6+2, /-(^+/1)/5/2+/ , CU II C22 33 =C44 =0 , ( 1 3 ) ^fR(il,j) = ^i-lj ~ (( ^/-2J + ^/j)/ ^ ^R(ij-i) = ^ij-i - ((^/,;-2 + ^/j)/ ^ R(i+l,j) = ^i +JJ ^{{Ri+2j+Rij)/2) (14) K'R(U+" = GiJ+] — ((RiJ+2 + Ru)/ 2) Next, the weight value and conversion value obtained from the above (KR,) value, via equation (15), step 150: Calculate the color estimate. Then proceed to step 16〇·^10 to calculate the interpolation value (Gi,j), which uses the center point pixel and the color estimate. The calculation is as shown in equation (16). This interpolated value (Gi, "'') is the red-green interpolated value at the red pixel position. ^r,R〇J) = X^R〇-lJ)+W2 ^RO+Jj)'^ R(. } (15) (16) Until all red pixels in CFA have been processed

GUn=K、,RU 重覆進行本步驟30, 成,才進行下一步驟。 14 1274908 請再參照第1圖,設一藍色像素(Bi,〗)為中心點像素, 接著進行第2圖中之步驟40 :内插紅色於此藍色像素上, 内插方法之流程圖如第5圖所示,第5圖係繪示依照本發明 實施例之一種影像色彩内插方法的第二實施步驟流程圖,實 施方法如下:GUn=K,, RU Repeat this step 30, and then proceed to the next step. 14 1274908 Please refer to Fig. 1 again, set a blue pixel (Bi, 〗) as the center point pixel, then proceed to step 40 in Fig. 2: interpolate the red pixel on the blue pixel, the flow chart of the interpolation method As shown in FIG. 5, FIG. 5 is a flow chart showing a second implementation step of an image color interpolation method according to an embodiment of the present invention, and the implementation method is as follows:

Bi-2j-2 ^ BiJ + C60=( BU2j-2 - Bu + 。吨卜!、'-Gq' C7。=( + C80 == \ Bi~2j+2 - Bij + Gi-2,j+2”-GJ’ 1/256 + 1 )/256 + 1 )/256 + 1 步騍,210:計算不同位置的像素色差值,如式〇7)所示: ' Λ , "、/256 + 1 ’ (17) ^ ^/+2,7-2 + ^/-2J-2 ~^/+2j-2M )/256 + 1 - h,J、2 + ^/-2J-2 ~^/+2j+2M )/256 + 1 -尽一2,_/+2 + ^/-2,7-2 ~^/-2j+2f, )/256 + 1 一 β Ui+2J+2 + ^/+2,7-2 ~^/+2j+2M )/256 + 1 -A-2,y+2 + ^;+2J-2 -^/-2,7+2 ' )/256 + 1 -尽-2 J+2 + ^/+2,y+2 J+2M )/256 + 1 C55 = C66 = C77 = C88 = 0Bi-2j-2 ^ BiJ + C60=( BU2j-2 - Bu + . Ton!!, '-Gq' C7.=( + C80 == \ Bi~2j+2 - Bij + Gi-2,j+2 "-GJ' 1/256 + 1 )/256 + 1 )/256 + 1 Step 210, 210: Calculate the pixel color difference at different positions, as shown in 〇7): ' Λ , ", /256 + 1 ' (17) ^ ^/+2,7-2 + ^/-2J-2 ~^/+2j-2M )/256 + 1 - h,J,2 + ^/-2J-2 ~^/+ 2j+2M )/256 + 1 - do one 2, _/+2 + ^/-2,7-2 ~^/-2j+2f, )/256 + 1 -β Ui+2J+2 + ^/+ 2,7-2 ~^/+2j+2M )/256 + 1 -A-2,y+2 + ^;+2J-2 -^/-2,7+2 ' )/256 + 1 -End - 2 J+2 + ^/+2, y+2 J+2M )/256 + 1 C55 = C66 = C77 = C88 = 0

• 其中計算像素色差值之計算係利用Bi.m、Bi_2 j 2、• The calculation of the pixel color difference is calculated using Bi.m, Bi_2 j 2

Bi’j、Bi+2,j.2& Bi+2,j + 2之像素值及式(12)所獲得之藍色綠色 •内插值 Gi-2’j-2、Gi-2.j.2,,、Gu,’、Gi+mi Gi+2 j + 2,,。求出 •:組不同位置的像素色差值(cy後,接著代回式(6),以進 行步驟220 :計算權重值,此些權重值係為位於中心點像素 (U之四個鄰近位置(右上、右下、左上及左下)的權重值(Wi W2, w3, w4)。 步驟230:接著進行色彩轉換,以求出於中心點像素(B. · 相鄰之四組不同像素位置(右上、右τ、左上及左下)的轉換j 15 1274908Bi'j, Bi+2, j.2& Bi+2, j + 2 pixel values and blue green obtained by equation (12) • Interpolated values Gi-2'j-2, Gi-2.j. 2,,,Gu,', Gi+mi Gi+2 j + 2,,. Find the color difference of the pixel at different positions in the group (after cy, then return to equation (6) to perform step 220: calculate the weight value, which is the pixel at the center point (four adjacent positions of U) Weight values (Wi W2, w3, w4) (upper right, lower right, upper left, and lower left) Step 230: Next, perform color conversion to find the pixel at the center point (B. · four adjacent sets of different pixel positions ( Conversion of upper right, right τ, upper left and lower left) j 15 1274908

相鄰之 R 、R i+! 、R 值(KR)。轉換值(KR)之計料心與中心點像素…)對角 M,j + 1、R i + + i 與式(16)所獲得 1 小i’’、Gi+j + Γ及 Gi + l j_ (18) 之紅色綠色内插值GmjY’、 色彩轉換過程係如式(1 8)所示 K = G 丨、! H 一 h K = Gi+JJ.j - Ri+J j_j K Hi一!,j+〇= Gm 川'一 Ri j 川Adjacent R, R i+! , R value (KR). The conversion value (KR) of the billing center and the center point pixel...) diagonal M, j + 1, R i + + i and the formula (16) obtained 1 small i'', Gi+j + Γ and Gi + l J_ (18) The red and green interpolated value GmjY', the color conversion process is as shown in equation (18) K = G 丨, ! H a h K = Gi+JJ.j - Ri+J j_j K Hi one!, j+〇= Gm 川'一Ri j 川

K R(i+I'j+〇 - G - Ri+J J+J • 接著,由上述求出之權重值與轉換值(κό,經由計曾 式(i9)之步驟2你求出色彩估算值(Kr,,),然後進行如式 中心點像素(Bu)與色彩估算值之計算,以進行步驟25〇:求 出内插值(Ru ),此内插值(Ri j’’)係為在紅色像素位置之紅 色藍色内插值。 KR(iJ) =^x^(M,-1)+^x^(,lj_I)+^ ) (20) 重覆進行本步驟40,直到CFA中所有藍色像素處理完 φ 成,才進行下一步驟。 来請參照第6圖,本發明並不限於此圖,綠色像素水平相 .郇亦可為紅色像素,請再參照第6圖,設綠色像素(Gj j)為 ^心點像素,接著進行第2圖中之步驟5〇:内插紅色於此 •綠色像素上,内插方法之流程圖如第3圖所示,實施方法如 下: 步驟110 :計算平均像素,如式(25)所示: 16 (25)1274908KR(i+I'j+〇- G - Ri+J J+J • Next, from the above-mentioned weight value and conversion value (κό, you can find the color estimate by step 2 of the equation (i9) ( Kr,,), then perform the calculation of the pixel (Bu) and color estimation values of the center point to perform step 25: find the interpolation value (Ru ), and the interpolation value (Ri j'') is in the red pixel. The red and blue interpolation values of the position. KR(iJ) =^x^(M,-1)+^x^(,lj_I)+^ ) (20) Repeat step 40 until all blue pixels in the CFA After the processing is completed, the next step is performed. Referring to Figure 6, the present invention is not limited to this figure, and the green pixel horizontal phase may also be a red pixel. Please refer to FIG. 6 again, and set a green pixel (Gj). j) is the pixel of the heart point, and then proceeds to step 5 in FIG. 2: interpolating the red color on the green pixel, the flow chart of the interpolation method is as shown in FIG. 3, and the implementation method is as follows: Step 110: Calculating The average pixel, as shown in equation (25): 16 (25) 1274908

+^7+lj· 4 .\J+^i-2J+\ V ) ,)/3 n '/+2J~1 +i?/+ij+-Kz+2j+lf,)/3 ')+2、fc-U+2+AJ+1”+〜u+2)/3+^7+lj· 4 .\J+^i-2J+\ V ) ,)/3 n '/+2J~1 +i?/+ij+-Kz+2j+lf,)/3 ')+2, fc -U+2+AJ+1”+~u+2)/3

其中此平均像素(R’)之計算係利用與中心點像素( 相郴之 R“l j-2、Ri i j、Ri i j + 2、R ,J 2 八1 + 1 j、Ki+i i + 2 和 $ ⑽中獲得之、Ri.2,j+i,,、Lw,、^ 及Ri + 2,j + 2之像素值。 1)J + 1 接著如式(26)所示,步驟120 :計瞀τ门,职 ΐπ不同位置的像素色 差值=求出十組的像素色差值(Cij)。其中計算像素色差值 之什异係利用 Gi.2,j、Gu.2、Gi j、& . & p .,, .. : ,J 2 及 Gi+2,j 之像素值及 式(25)所计异之平均像素Ri2j、 Ri + 2j,、 R , , 及Ru,接著代回式(6),即進行步驟13〇 :計瞀 1,J+2 些權重值係為位於中心點像素(Gi j)之四個‘位重=此 下、左及右)的權重值(Wh W2, w3, w4)。 、 C2HGU-2-G/,j+j〜-2u〜j)/256fl 〜如,厂 °4〇=^+2-〜|+丨〜+2’一 Μσ,-πσ。·一 糾〜-'』)/25“1The calculation of the average pixel (R') utilizes the pixel with the center point (R"l j-2, Ri ij, Ri ij + 2, R, J 2 八 1 + 1 j, Ki+ii + 2 And the pixel values of Ri.2, j+i,, Lw, ^ and Ri + 2, j + 2 obtained in $10. 1) J + 1 Then, as shown in equation (26), step 120: Calculate the pixel color difference at different positions of the job ΐ = find the pixel color difference value (Cij) of the ten groups. The calculation of the pixel color difference is the use of Gi.2, j, Gu.2, Gi j, & . & p .,, .. : , the pixel values of J 2 and Gi+2,j and the average pixels Ri2j, Ri + 2j, R , , and Ru calculated by equation (25), Then, return to equation (6), that is, proceed to step 13: calculate 瞀1, and the weight values of J+2 are the weights of the four 'bit weights=the bottom, the left and the right at the center point pixel (Gi j). Value (Wh W2, w3, w4)., C2HGU-2-G/, j+j~-2u~j)/256fl ~, such as factory °4〇=^+2-~|+丨~+2' Μσ, -πσ.·一纠~-'』))/25"1

Cl永2,厂 c14 如 〜+2jy2洲 〔24=“;_2-〜+2丨松^^ (26) cx! =C22 =C33 =〇44 =0 接著步驟140 ··進行色彩模型轉換, 八®於中心點像 17Cl Yong 2, factory c14 such as ~+2jy2 continent [24=";_2-~+2丨松^^ (26) cx! =C22 =C33 =〇44 =0 Then step 140 ··Color model conversion, eight ® at the center point like 17

1274908 素(GU)相鄰之四組不同像素位置(上、下、左及右)的轉換值 (Kr’)。轉換值之計算係利用由式(16)中獲得之Gm/和 Gi屮u、與由式(12)中獲得之Gu + 1’’和Gi j i,,、與中心點像 素(Gi’j)相鄰之Rkj、Ri+1』、與由式(2〇)中獲得之心」丨,,及 RU + 1 。而色彩轉換過程如式(2 7)所示。 k'r{mj) = Gi+lJ^Ri+{j (27) 、尺、(,,"ι) = G/,川"-及。+1’’ 接著,由上述求出之權重值與轉換值(Kr,)值,經由式 (28)即步驟150:計算色彩估算值(Kr”),然後進行如式(2^) 中心點像素(Gu)與色彩估算值(Kr’’)之計算,接著進行步驟 160 ·•計算内插值(Xij )。此内插值(Xu’’)係為在綠色像素位 置之綠色紅色内插值。。 (28) xu’:Gu-K\ (29) 重覆進行本步驟50,直到CFA中所有綠色像素處理完 成0 請參照第4圖,設一紅色像素(Ri j)為中心點像素,接 著進行第2圖中之步驟60 :内插藍色於此紅色像素上,内 插方法之流程圖如第5圖所示,實施方法如下: 步驟210:計算不同位置的像素色差值,如式(3〇)所示: 18 (30)1274908 0^ 0 0 6 7 8 7 8 8 C5C6C7C8 Q Q C5 Q a C7 -2,7- V+2J-2 /+2J+2 /-2,y+2 -Ri,j + -Ri,j + -Ru + G,•…Ά,, "RiJ + - GJ /256 + 1 /256 + 1 /256 + 1 /256 + 1 ^/-2,7-2 ^/-2,7-2 -2j-2 /+2,y-2 :+2,)-2 /+2J+2 Ri+2j-2 + Gi-lJ-Ί -GiVl,卜Ί )/256 + 1 ^+2j+2 + Gi-2,j-2”-Gi+2J+2 )/256 + 1 ^/-2,7+2 + ^/-2,y-2 -^/-2,7+2 )/256 + 1 ^i+2,j+2 + ^i+2J-2 -^/+2,7+2 )/256 + 1 ^/-2,y+2 + Gi+2j-2'- Gi-2J+2 )/256 + 1 及,-2"+2 + ^/+2,7+2 ·~^/-2,;+2 )/256 + 1 "66 "77 "88 55 c 其中計算像素色差值之計算係利用Ri-2j-2、Ri2j2、 、Ri+2,j-2及Ri+2,j+2之像素值及式(16)所獲得之紅色綠色 内插值 0“2小2”、0“2小2’,、Gi,j”、Gi+2,j-2’,及 Gi+2 j+2’,。求出 十組不同位置的像素色差值(Cij)後,接著代回式(6),以進 行步驟220 :計算權重值,此些權重值係為位於中心點像素 (U之四個鄰近位置(右上、右下、左上及左下)的權重值(W】 w2, w3, w4) 〇 步驟230:接著進行色彩轉換,以求出於中心點像素(1 相鄰之四組不同像素位置(右上、右下、左上及左下)的轉換 值(Kb’)。轉換值(Kb’)之計算係利用與中心點像素(r i + i,W、d M,j + 1、B i+i j + i 與式(12)所獲得 相鄰之 + ’ ’ GM,j + 1 及 Gi + l j + 1’’ 之藍色綠色内插值Gi-uj-Γ、Gi+1 · 1小1 色彩轉換過程係如式(31)所示: 19 (31) 1274908 K R{i-l,j~l) = G ^ K,Hi^j~〇= Gi+1J^ K = G^J j+jK = G/+yy+;1274908 The conversion value (Kr') of four different pixel positions (up, down, left, and right) adjacent to the prime (GU). The conversion value is calculated by using Gm/ and Gi屮u obtained in the equation (16), Gu + 1'' and Gi ji obtained from the equation (12), and the center point pixel (Gi'j). Adjacent Rkj, Ri+1′′, and the heart obtained by the formula (2〇), and RU + 1 . The color conversion process is shown in equation (27). K'r{mj) = Gi+lJ^Ri+{j (27) , ruler, (,, "ι) = G/, Chuan "- and. +1'' Next, from the weight value and the converted value (Kr,) value obtained above, the color estimation value (Kr" is calculated via the equation (28), that is, step 150: and then the center point of the equation (2^) is performed. The calculation of the pixel (Gu) and the color estimate (Kr'' is followed by step 160. • Calculating the interpolated value (Xij). This interpolated value (Xu'') is the interpolated value of the green red at the green pixel position. (28) xu':Gu-K\ (29) Repeat this step 50 until all green pixels in the CFA are processed. 0 Refer to Figure 4, set a red pixel (Ri j) as the center pixel, and then proceed. Step 60 in FIG. 2: Interpolating blue on the red pixel, the flowchart of the interpolation method is as shown in FIG. 5, and the implementation method is as follows: Step 210: Calculate pixel color difference values at different positions, such as 3〇) shown: 18 (30) 1274908 0^ 0 0 6 7 8 7 8 8 C5C6C7C8 QQ C5 Q a C7 -2,7- V+2J-2 /+2J+2 /-2,y+2 - Ri,j + -Ri,j + -Ru + G,•...Ά,, "RiJ + - GJ /256 + 1 /256 + 1 /256 + 1 /256 + 1 ^/-2,7-2 ^ /-2,7-2 -2j-2 /+2,y-2 :+2,)-2 /+2J+2 Ri+2j-2 + Gi-lJ-Ί -GiVl,卜Ί ) /256 + 1 ^+2j+2 + Gi-2,j-2"-Gi+2J+2 )/256 + 1 ^/-2,7+2 + ^/-2,y-2 - ^/-2,7+2 )/256 + 1 ^i+2,j+2 + ^i+2J-2 -^/+2,7+2 )/256 + 1 ^/-2,y+2 + Gi+2j-2'- Gi-2J+2 )/256 + 1 and,-2"+2 + ^/+2,7+2 ·~^/-2,;+2 )/256 + 1 &quot ;66 "77 "88 55 c The calculation of the pixel color difference is based on the pixel values and expressions of Ri-2j-2, Ri2j2, Ri+2, j-2 and Ri+2, j+2 ( 16) The obtained red-green interpolated values are 0 "2 small 2", 0 "2 small 2', Gi, j", Gi+2, j-2', and Gi+2 j+2'. After finding the pixel color difference values (Cij) of ten different positions, then returning to equation (6) to perform step 220: calculating the weight values, which are located at the central point pixels (four adjacent positions of U) Weight values (W], w2, w3, w4) 〇Step 230: Then perform color conversion to find the pixel at the center point (1 adjacent four different pixel positions (upper right) , bottom right, top left, and bottom left) conversion values (Kb'). The calculation of the conversion value (Kb') is based on the center point pixels (ri + i, W, d M, j + 1, B i+ij + i The blue-green interpolated value Gi-uj-Γ, Gi+1 · 1 small 1 color conversion process adjacent to + ' ' GM, j + 1 and Gi + lj + 1'' obtained by equation (12) Equation (31): 19 (31) 1274908 KR{il,j~l) = G ^ K, Hi^j~〇= Gi+1J^ K = G^J j+jK = G/+yy+;

—R —R—R —R

R -i,H ,j-i ~i,j+l 者’由上述求出之權重值與轉換 式(32)之步驟240••求出色彩估算值(Kb,,),缺 、、二由汁τ 中心點像素(U與色彩估算值 仃如式(33) 出内插值Ο,此内插值(Bij,,)係為在^丁/驟25〇:求 色紅色内插值。 ',"係為在藍色像素位置之藍 K\id, =^x^,_w_1)^2 ΧΙ0Β(Μ.^ xKB(iAJ+l)+W4 χΚβ(^ (32) v 鳴,' (33) 重覆進行本步驟60,直到CFA中所有紅色像素處理完 成’才進行下一步驟。 請參照第7圖,本發明並不限於此圖,綠色像素水平相 鄰亦可為藍色像素,請再參照第7圖,設綠色像素為 中心點像素,接著進行第2圖中之步驟7〇 :内插藍色^此 綠色像素上,内插方法之流程圖如第3圖所示,實施方法如 下: 步驟110 :計算平均像素,如式(34)所示: 飞,/今,)/4 5/-2,y. J-1"+尽一1 j + Bi -2J+1 丨,)/3 (34) < 5,+2j’=(A+2,/+A+U+5,+2j+l")/3R -i, H , ji ~ i, j + l 'from the above-mentioned weight value and conversion formula (32) step 240 • • find the color estimate (Kb,,), lack, and two by juice τ center point pixel (U and color estimation value, for example, (33) out of interpolation value, this interpolation value (Bij,,) is in the ^ □ / 〇 25 〇: color red interpolation value. ', " For the blue pixel position, the blue K\id, =^x^, _w_1)^2 ΧΙ0Β(Μ.^ xKB(iAJ+l)+W4 χΚβ(^ (32) v 鸣,' (33) repeat In this step 60, until the processing of all the red pixels in the CFA is completed, the next step is performed. Referring to FIG. 7, the present invention is not limited to this figure, and the green pixels may be horizontally adjacent to the blue pixel, please refer to the seventh. In the figure, the green pixel is set as the center pixel, and then the step 7 in FIG. 2 is performed: the blue pixel is interpolated, and the flow chart of the interpolation method is as shown in FIG. 3, and the implementation method is as follows: Step 110 : Calculate the average pixel, as shown in equation (34): fly, /, now,) /4 5/-2, y. J-1"+1:1 j + Bi -2J+1 丨,)/3 (34 ) <5,+2j'=(A+2,/+A+U+5,+2j+l")/3

BiJ+2 f==fe-i5y+2 + Bij+\ ^BMj+2 )/ 3 ; 1274908BiJ+2 f==fe-i5y+2 + Bij+\ ^BMj+2 )/ 3 ; 1274908

其中此平均像素(B’)之計算利 相鄰之Bi-丨i.2、R. Ώ 不〗用興Τ。點像素(Gu) ’ 卜1’·1、Βμ,·ϊ + 2、Bi + 1 j-2、Bi + 1 j、B (33)中獲得之、Bi2M, ’ ’ ,j+2和式 及Bi+2j + 2之像素值。 i,j + i差值接=;3:)所示’步驟12。:計算不同位置的像素色 之計算係利用G—i”、。·、:),及中广像素色差值4 、糾社曾i f M Gi,的及Gi + 2,j之像素值及 式(34)所計算之平均像素Bi 2 j,The calculation of the average pixel (B') is advantageous for the adjacent Bi-丨i.2, R. Ώ not used. Point pixel (Gu) 'Bu 1'·1, Βμ,·ϊ + 2, Bi + 1 j-2, Bi + 1 j, B (33), Bi2M, ' ' , j+2 and The pixel value of Bi+2j + 2. i, j + i difference = = 3:) shown in step 12. : Calculate the pixel color of different positions by using G—i”, .·, :), and the pixel value of the medium-wide pixel color difference 4, the correction of the if M Gi, and the pixel value of Gi + 2,j (34) The calculated average pixel Bi 2 j,

B i + 2,jB i + 2,j

B i J-2B i J-2

B ,j + 2B, j + 2

, ,J -L /,」接著代回式(6),即進行步驟130 ··計算權重值,此 些權重值係為位於中心點像素(Gy)之四個鄰近位置(上、 -ΤΓ、去 丄、^ V 下 左,f )的權重值(1,W2, W3, W4) 1+1^/+2,/-5^/1)/256 +1 C2〇 = Ip; y_2 -g c3。=φ,.+2 r G/ C4〇=fG,.+2-GΗ、"-。。·-: …'G i C,4 =f〇^2 .-G,.y+2 C ' c, , J - L /," and then return to equation (6), that is, step 130 is performed. · Calculate the weight value, which is the four adjacent positions of the center point pixel (Gy) (upper, -ΤΓ, Weight value of (1, W2, W3, W4) 1+1^/+2, /-5^/1)/256 +1 C2〇= Ip; y_2 -g c3 . =φ,.+2 r G/ C4〇=fG,.+2-GΗ,"-. . ·-: ...'G i C,4 =f〇^2 .-G,.y+2 C ' c

C C13 =φ,、2,广(ii+2 )· 卜i、j+‘‘ i,y-2 -^/ + 2,C C13 = φ, 2, wide (ii + 2 ) · i, j + ‘ ii, y-2 -^/ + 2,

iG C 34 = ^1+1^/,^2^5,/1)/256 +1 十,-2,/-^:2.1)/256 +1 卜卜Όί+2 /丨)/256 +1 + \B»-2,J'-Bi j+2^256 +1 |5,·.;ϋ + 2"·|)/256 +1 \B^j-2-Bitj+2^/256 +1 + \Bi^i,j-Bi J+2^/256 +1 (35) C11 =c22 =c33 =c44 =〇 接著步驟140 :進行色彩模型轉換,以求出於中心點像 素(Gu)相鄰之四組不同像素位置(上、下、左及右)的轉換值 (κΒ)。轉換值之計算係利用由式(12)中獲得之Gi l j’’和 Gi + 1,j’’、與由式(16)中獲得之GiJ + 1’’和Gi,】·〗,,、與中心點像 素(Gu)相鄰之BM,j、Bi+1,j、與由式(34)中獲得之Bij-1,,及 Bi,j + i 。而色彩轉換過程如式(36)所示。 21 (36) 1274908iG C 34 = ^1+1^/,^2^5,/1)/256 +1 Ten,-2,/-^:2.1)/256 +1 BubΌί+2 /丨)/256 +1 + \B»-2,J'-Bi j+2^256 +1 |5,·.;ϋ + 2"·|)/256 +1 \B^j-2-Bitj+2^/256 +1 + \Bi^i,j-Bi J+2^/256 +1 (35) C11 =c22 =c33 =c44 =〇Next step 140: Perform color model conversion to find the pixel adjacent to the center point (Gu) The conversion values (κΒ) of the four different pixel positions (up, down, left, and right). The conversion value is calculated by using Gi l j'' and Gi + 1, j'' obtained in the equation (12), and GiJ + 1'' and Gi obtained from the equation (16), BM, j, Bi+1, j adjacent to the center point pixel (Gu), and Bij-1, and Bi, j + i obtained from the equation (34). The color conversion process is as shown in equation (36). 21 (36) 1274908

= Gi-lJ Ίζ I B. -i,y 接著,由上述求出之權重值與轉換值(Kb’)值,妙由弋 (37)即步驟150:計算色彩估算值(Kb’,),然後進行如 中心點像素队)與色彩估算值(Kb”)之計算,接著進^步驟 ’計算内插值(Xi j”)。此内插值(〜Γ)係為在綠色料位 置之綠色藍色内插值。。 μ Κ、 财哨㈣年‘〜綱 (37) xid =GK「KBiJ (38) 成 重覆進行本步驟7〇,直到CFA中所有綠色像素處理完 =上述本發明較佳實施例可知,本發明之特徵係利用預 先估算最小平#誤差來内插還原彩色濾、光片P車列的彩色今 像。為了估算在彩色濾光片陣列影像中所失去的影像值,: •近色彩像素的權重值是由矩陣演算所決定。過程中亦採用一 色彩模型(KR ’ κΒ)來達到較佳的影像效果。 . 雖然本發明已以一較佳實施例揭露如上,然其並非用以 限定本發明’任何熟習此技藝者,在不脫離本發明之 圍内’當可作各種之更動與潤飾,因此本發明之保護範圍 §視後附之申請專利範圍所界定者為準。 【圖式簡單說明】 為讓本發明之上述和其他目的、特徵、和優點能更明顯 22 Ϊ274908 易懂,下文特舉一較佳實施例,並配合所附圖式,作詳細說 明如下·· 、W 圖第1圖係繪示習知之彩色濾光片陣列的—種平面示意 第2圖係繪示依照本發明實施例之一種影像色彩内插 万法的流程圖。 第2圖係繪示依照本發明實施例之一種影像色彩内插 万法的第一實施步驟流程圖。 第4圖係繪示依照本發明實施例之一種之第二平 面示意圖。 一 第5圖係繪示依照本發明實施例之一種影像色彩内插 万法的第二實施步驟流程圖。 第6圖係繪示依照本發明實施例之一種之第三平 面示意圖。 一 第7圖係繪示依照本發明實施例之一種CFA之第四平 面示意圖。 【主要元件符號說明】 步驟1 〇 :擷取彩色濾光片陣列之像素 步驟20 ··内插綠色於藍色像素上 步驟30 :内插綠色於紅色像素上 步驟40 :内插紅色於藍色像素上 步驟50 ··内插紅色於綠色像素上 23 1274908 步驟60 :内插藍色於紅色像素上 步驟70 ··内插藍色於綠色像素上 步驟11 0 :計算平均像素 步驟120、210 :計算不同位置的像素色差值 步驟130、220 :計算權重值 步驟140、230 :進行色彩模型轉換 步驟150、240 :計算色彩估算值 步驟160、250 :計算内插值 5 :彩色濾光片陣列= Gi-lJ Ίζ I B. -i,y Next, from the weight value and the converted value (Kb') value obtained above, by (37) step 150: calculating the color estimate (Kb',), Then, calculations such as the center point pixel group and the color estimation value (Kb" are performed, and then the step 'calculate the interpolation value (Xi j)). This interpolated value (~Γ) is interpolated in green blue at the green level. . μ Κ, 财 哨(四)年 '~纲(37) xid =GK"KBiJ (38) Repeat this step 7〇 until all green pixels in the CFA have been processed = the preferred embodiment of the present invention described above, the present invention The feature is to interpolate and restore the color image of the color filter and the light P train by estimating the minimum flat error. In order to estimate the image value lost in the color filter array image, the weight of the near color pixel is: The value is determined by the matrix calculus. A color model (KR ' κ Β ) is also used in the process to achieve a better image effect. Although the invention has been disclosed above in a preferred embodiment, it is not intended to limit the invention. 'Anyone skilled in the art can make various changes and refinements without departing from the scope of the invention. Therefore, the scope of protection of the present invention is defined by the scope of the appended patent application. The above and other objects, features, and advantages of the present invention will become more apparent from the description of the appended claims. Diagram A schematic diagram of a color filter array is shown in FIG. 2 is a flow chart showing an image color interpolation method according to an embodiment of the present invention. FIG. 2 is a diagram showing an image color according to an embodiment of the present invention. FIG. 4 is a second plan view showing an image color interpolation method according to an embodiment of the present invention. FIG. 5 is a second plan view showing an image color interpolation method according to an embodiment of the present invention. FIG. 6 is a third plan view showing a CFA according to an embodiment of the present invention. FIG. 7 is a fourth plan view showing a CFA according to an embodiment of the present invention. Component Symbol Description Step 1 〇: Capture the pixels of the color filter array Step 20 · Interpolate the green on the blue pixel Step 30: Interpolate the green on the red pixel Step 40: Interpolate the red on the blue pixel Step 50 ··Insert red on green pixels 23 1274908 Step 60: Interpolate blue on red pixels Step 70 · Interpolate blue on green pixels Step 11 0: Calculate average pixels Steps 120, 210: Calculating pixel color difference values at different positions Steps 130, 220: Calculating weight values Steps 140, 230: Performing color model conversion Steps 150, 240: Calculating color estimation values Steps 160, 250: Calculating interpolation values 5: Color filter array

24twenty four

Claims (1)

1274908 十、申請專利範圍 1. 一種影像色彩内插方法,包含: 提供一棋盤陣列,具有交錯排列之複數個奇數列和複 數個偶數列,其中該棋盤陣列上設置有複數個第一像素、 複數個第二像素、和複數個第三像素,該些第三像素之一 部分與該些第一像素係交錯排列在該些奇數列上,該些第 三像素之另一部分與該些第二像素係交錯排列在該些偶 數列上,其中該些第三像素之每四者係分別水平且垂直地 緊相鄰於該些第一像素之其中一者或該些第二像素之其 中一者,每一該些第一像素具有一第一原色值、一第一第 二色内插值和一第一第三色内插值,每一該些第二像素具 有一第二原色值、一第二第一色内插值和一第二第一色内 插值,每一該些第三像素具有一第三原色值、一第三第一 色内插值和一第三第二色内插值; 進行一第一内插步驟,以針對該些第一像素之一第一 標的像素,利用該些第三像素中與該第一標的像素最相鄰 之十二個第三像素、及該些第一像素中與該第一標的像素 水平或垂直相鄰之四個第一像素,來計算出該第一標的像 素之一第一第三色内插值; 進行一第二内插步驟,以針對該些第二像素之一第二 標的像素,利用該些第三像素中與該第二標的像素最相鄰 之十二個第三像素、及該些第二像素中與該第二標的像素 水平或垂直相鄰之四個第二像素,來計算出該第二標的像 素之一第二第三色内插值; 25 v/4908 進行一第三内插步驟,以 §亥些第二像素中*㈣一對㈣—標的像素,利用 二像素、該些第-推1払的像素對角線相鄰之四個第 的像素對角%# ,、之該第二第三内插值中與該第一標 值、該些Γ-t 個第二像素之該第二第三内插 素對角線相鄰、<該第—第三内插值中與該第-標的像 素之該第一第=由Γ 的像素位置之五個第一像 弟—内插值、及兮此哲 . 像素對角線最相鄰之四個第二一:素中與該第-標的 像素之—第-第二色内插I 來計算出該第一標的 標的::二第,内插步驟’以針對該些第三像素之-第三 之’用5亥些第二像素中最相鄰於該第三標的像素 之六個第二像素、該些第一 ^扦的俅素 最相鄰於該第:样的一傻去 第一弟二色内插值中 第—‘的像素之六個第一像素中之該第一第 一色内插值、該虺篥一饴I ^ 一弟像素之該弟一弟三色内插值中與該 第二払的像素水平相鄰之二個第一像素之該第一第三色 内插值、該些第二像素之該第二第三色内插值中與該第三 標的像素垂直相鄰之二個第二像素之該第二第三色内插 值及該些第二像素中水平與垂直相鄰於該第三標的像素 之四個第三像素’來計算出該第三標的像素之—第三第二 色内插值; 進仃一第五内插步驟,以針對該第二標的像素,利用 該些第一像素中與該第二標的像素對角線相鄰之四個第 像素4些第一像素之該第一第三内插值中與該第二標 的像素對角線相鄰之四個第一像素之該第一第三内插 26 1274908 值、該些第二像素之該第二第三内插值中與該第二標的像 素對角線相鄰和位於該第二標的像素位置之五個第二像 素之該第二第三内插值、及該些第二像素中與該第二標的 像素對角線最相鄰之四個第二像素,來計算出該第二標的 像素之一第二第一色内插值;以及1274908 X. Patent Application Range 1. An image color interpolation method, comprising: providing a checkerboard array having a plurality of odd-numbered columns and a plurality of even-numbered columns arranged in a staggered manner, wherein the checkerboard array is provided with a plurality of first pixels, plural numbers a second pixel and a plurality of third pixels, wherein one of the third pixels is staggered with the first pixels on the odd columns, and the other of the third pixels and the second pixels Arranged on the even columns, wherein each of the third pixels is horizontally and vertically adjacent to one of the first pixels or one of the second pixels, respectively The first pixels have a first primary color value, a first second color interpolation value, and a first third color interpolation value, each of the second pixels having a second primary color value and a second first color a color interpolated value and a second first color interpolated value, each of the third pixels having a third primary color value, a third first color interpolated value, and a third second color interpolated value; performing a first interpolation Steps to target these a first target pixel of a pixel, using twelve third pixels of the third pixels that are most adjacent to the first target pixel, and horizontal or vertical phase of the first pixel with the first target pixel Having four first pixels adjacent to calculate a first third color interpolation of the first target pixel; performing a second interpolation step to utilize the second target pixel for the second pixels Calculating the twelve third pixels of the third pixels that are most adjacent to the second target pixel, and the four second pixels of the second pixels that are horizontally or vertically adjacent to the second target pixel. One of the second target pixels is interpolated by a second third color; 25 v/4908 performs a third interpolation step to align some of the second pixels with *(four) pairs of (four)-target pixels, using two pixels, The first pixel value %# adjacent to the pixel diagonally adjacent to the first pixel, and the second third interpolation value and the first value, the Γ-t second pixels The second third interpolation is diagonally adjacent to the <the first to third interpolated values and the first target The first of the pixels = the first pixel of the pixel position of the — - the interpolated value, and the philosophical. The pixel is the most adjacent four of the second one: the pixel in the prime and the first target The first-second color interpolation I is used to calculate the first target:: two, the interpolation step 'for the third pixel-the third one' is the most common among the second pixels Six pixels adjacent to the pixel of the third target, and the pixels of the first one are most adjacent to the pixel of the first pixel of the first singular diom interpolated value The first first color interpolated value in the first pixel, the two first color interpolated values of the first one color of the first pixel, and the two first pixels adjacent to the second horizontal pixel The second third color interpolated value of the second second pixel of the pixel, the second third color interpolation of the second pixel, and the second second color of the second pixel vertically adjacent to the third target pixel And the fourth pixel of the second pixel that is horizontally and vertically adjacent to the third target pixel to calculate the third target pixel - a second second color interpolation value; a fifth interpolation step, for the second target pixel, using the fourth pixel adjacent to the diagonal of the second target pixel in the first pixel The first third interpolation 26 1274908 value of the four first pixels adjacent to the second target pixel diagonal line of the first third interpolation value of one pixel, and the second second of the second pixels The second interpolated value of the five second pixels in the three interpolated values adjacent to the second target pixel and the second second pixel in the second target pixel position, and the second target and the second target Calculating a second first color interpolated value of one of the second target pixels; and a fourth second pixel adjacent to the diagonal of the pixel; ^ ―仃一弟六内插步驟,以針對該第三標的像素,利用 =些第-像素中最相鄰於該第三標的像素之六個第一像 :二些弟二像素之該第二第-色内插值中最相鄰於該第 之六,第二像素中之該第二第-色内插值、該 水平相鄰。,該:_二第三色内插值中與該第三標的像素 —像夸之一個第一像素之該第二第三色内插值、該些第 相鄰之二個第_像素之弟—^的像素垂直 像素中走巫彳,、μ第一弟二色内插值、及該些第三 素:、:出、垂直相鄰於該第三標的像素之四個第三像 十异出該第三標的像素之-第三第-色内插值。 法,复中=青_專利範圍第1項所述之影像色彩内插之方 該第—桿的一内=步驟中之該第一標的像素為^,與 Γ. IsJ'2 Gi-l,j ' Gi.l j + 2 > G. ^ 1 + 1,j、Gi + 1,j+2、G 1,J + 1 丨+ 1 小2 第一標的像 小丨及Gw,』+〗,該些第一像素中與該 的像素水平或垂直相鄰之 M·2、及β.. —弟像素為艮_2,广 插值為G.,, /+2該第一標的像素之該第一第三色内 I,J ,該第一内插步驟至少包含·· 27 1274908 進行一平均運算,以獲得複數個平均像素(g,) 該平均運算係根據一公式: 其中 G'-d,-丨 (G/-i,y+2 + 川 + G/+u+2)/3 (GMj-2 +^,y-i +G/+1j_2)/3 丨-u iJ+\ / 進行一色差值運算,以獲得複數個像素色差值(Ci ) 其中,色差值運算係根據一公式: ] C1。十/彳厂尽仲“" cHv2 -〜丨+|心2 C30 =([5/+2,厂'」啦+2" C4〇=ky+2-^|H-|G/J+2 CiH5/-2 " ~Ί|(^_2,; Cl4 Ηαή,. j+2|+|g,'G+odjI+h -2,y U~2 C24=(b,.^^5..+2|+|G.._2 C34=|B,+ Λ/256+1 -^()/256+1 /256+1 /256+1 JUj /512+1 -G,.j+2,|)/512+1 -G/+2j|)/512+1 J/j+2 ?/J+2 丨)/512+1 ,丨)/512+1 ^2j-^.j+2|+|g/+2j 1Ch=C22=:C33=C44=0進行一反矩陣運算,以求出四個權重值W1、W2、^和W4,且其中該反矩陣運算係根據 一公式: ~Wf W2 W3 = w4 ^ λ C11 c12 c13 c14 ί -1 cl(i C21 C22 c23 c24 1 c20 C31 c32 c33 c34 1 c30 C41 c42 c43 c44 1 c40 1 1 1 1 0_ 1 進行一色彩模型轉換,以計算出複數個轉換值 28 1274908 (Κ B),其中該色,模型轉換之計算係根據一公式: Ά('-υ) = - (卜1 + 方,")/2) BUJ-D GU-\ - + Bi,j)l2); BU 5(/,y + l) 色彩估算值 進行 (,其中該估算值之運算係根據一公式: 進行一内插值之計算,以求出該第一標的像素之該第 一第三色内插值,其計算係根據一公式: 。 3_如申請專利範圍第1項所述之影像色彩内插之方 法,其中該第二内插步驟中之該第二標的像素為Ri ,與 該第二標的像素最相鄰之該些第三像素為G Gw’w、km、、Gi_l j+2、Gi j i、Gi j + i、^+二、 Gi + i,j、Gi +丨,j + 2、Gi + 2,】.!及 Gi+2,j + 1,與該第二標 平或垂直之該些第二像素〜Ri,一 該第二標的像素之該第二第三色内插值Gy,,且該第二 内插步驟至少包含: 進行一平均運算,以獲得複數個平均像素(G,),其中 該平均運算係根據一公式: 29 1274908 ?/7u+g/〇+gu-i+gu、)/4 =\pi-2J-l + Gi-lJ + G/-2J+i)/3 GW= ={Gi+lJ + G/+2,y_i + Gi+2J+l )/3 ϋ ={g^ij+2 + GiJ+l + Gi+lJ+2)/ 3 .GU-2Z =ipi-U-2 + GiJ-\ + GMj-2 V 3^ 仃一弟六 interpolation step, for the pixel of the third target, using the six first images of the pixels adjacent to the third target of the first pixel: the second of the two pixels The first color interpolated value is the most adjacent to the sixth, and the second first color interpolated value in the second pixel is adjacent to the horizontal. , the _ two third color interpolated values and the third target pixel - like the second third color interpolated value of a first pixel, the two adjacent _th pixels - ^ The pixels in the vertical pixel, the μ first interpolated value, and the third element:,: the four third images that are perpendicular to the third target pixel are different from the third The third-numbered pixel-third third-color interpolated value. Method, complex medium = green _ patent range of the image color interpolation described in item 1 of the first rod of the first rod = the first target pixel is ^, and Γ. IsJ'2 Gi-l, j ' Gi.lj + 2 > G. ^ 1 + 1,j, Gi + 1,j+2, G 1,J + 1 丨+ 1 small 2 The first target is like Xiao Xiao and Gw, 』+〗, The first pixel is horizontally or vertically adjacent to the pixel, and the second pixel is 艮_2, and the wide interpolation value is G., /+2. a third color I, J, the first interpolation step includes at least 27 27 274 908 to perform an averaging operation to obtain a plurality of average pixels (g,). The averaging operation is based on a formula: where G'-d, -丨(G/-i,y+2 +川+ G/+u+2)/3 (GMj-2 +^, yi +G/+1j_2)/3 丨-u iJ+\ / Perform a color difference calculation To obtain a plurality of pixel color difference values (Ci), wherein the color difference calculation is based on a formula: C1. Ten / 彳 factory to the end "" cHv2 - ~ 丨 + | heart 2 C30 = ([5 / + 2, factory '" + 2 " C4 〇 = ky + 2-^ | H-| G / J + 2 CiH5/-2 "~Ί|(^_2,; Cl4 Ηαή,. j+2|+|g,'G+odjI+h -2,y U~2 C24=(b,.^^5.. +2|+|G.._2 C34=|B,+ Λ/256+1 -^()/256+1 /256+1 /256+1 JUj /512+1 -G,.j+2,| ) /512+1 -G/+2j|)/512+1 J/j+2 ?/J+2 丨)/512+1 ,丨)/512+1 ^2j-^.j+2|+| g/+2j 1Ch=C22=:C33=C44=0 performs an inverse matrix operation to find four weight values W1, W2, ^ and W4, and the inverse matrix operation is based on a formula: ~Wf W2 W3 = w4 ^ λ C11 c12 c13 c14 ί -1 cl(i C21 C22 c23 c24 1 c20 C31 c32 c33 c34 1 c30 C41 c42 c43 c44 1 c40 1 1 1 1 0_ 1 Perform a color model conversion to calculate the complex conversion The value 28 1274908 (Κ B), where the color, the model conversion is calculated according to a formula: Ά('-υ) = - (Bu 1 + square, ")/2) BUJ-D GU-\ - + Bi , j) l2); BU 5 (/, y + l) color estimation value is performed (where the calculation of the estimated value is based on a formula: performing an interpolation value calculation to find the pixel of the first target The first third color interpolated value is calculated according to the formula: 3. The image color interpolation method according to claim 1, wherein the second target pixel in the second interpolation step is Ri, the third pixels most adjacent to the second target pixel are G Gw'w, km, Gi_l j+2, Gi ji, Gi j + i, ^+ two, Gi + i, j, Gi +丨, j + 2, Gi + 2, 】.! and Gi+2, j + 1, the second pixels ~Ri with the second level or perpendicular, and the second of the second target pixels The third color interpolating value Gy, and the second interpolation step comprises at least: performing an averaging operation to obtain a plurality of average pixels (G,), wherein the averaging operation is according to a formula: 29 1274908 ?/7u+g /〇+gu-i+gu,)/4 =\pi-2J-l + Gi-lJ + G/-2J+i)/3 GW= ={Gi+lJ + G/+2,y_i + Gi+ 2J+l )/3 ϋ ={g^ij+2 + GiJ+l + Gi+lJ+2)/ 3 .GU-2Z =ipi-U-2 + GiJ-\ + GMj-2 V 3 進行一色差值運算,以獲得複數個像素色差值(Cij), 其中該色差值運算係根據一公式: 2-〜|如,7一2’-〜'|)/況+/ C3〇=\Ri+2J-RiM〇M C,f〜+2 -'別〜.+2’- ,以+卜2,厂知巧|+b_2,/-G/+2,/|)/5/2+/ 厂及 υ+2|+|θ-2,/-〜·+/|)/仍+i C23=h)-2-A+2』+| 〜-〜巧’|)/仍+/ Q 一〜-2-及 O.+d+l%—2’-G^+2’|)/5/2+i C3f| 知 2,广及 〇.+2|如+又/-6^+/|)/5/2+/ Cu=C22=C3s=C44=〇 ; 進行一反矩陣運算,以求出四個權重值W!、W2、W3 和W4,且%+%+%+% =i,其中該反矩陣運算係根據一公 式: w{ 'Cn Cl2 Cl3 c14 ί -1 ~cl〇' W2 C21 C22 C23 。24 1 c20 w3 二 C31 C32 ^33 c34 1 C30 w4 C41 c42 c43 c44 1 c40 又 1 1 1 1 0 1 進行一色彩模型轉換,以計算出複數個轉換值 (K’R),其中該色彩模型轉換之計算係根據一公式: 30 1274908 ,广二叫卜+'j/2) ^=g^A{k2j+ru)/2); h ",洲=广(few + i〇/2) 色彩估算值之運算,以獲得一 巴衫怙鼻值 (心)’其中該估算值之遠瞀 开沮 < 運异係根攄一公.·Performing a color difference operation to obtain a plurality of pixel color difference values (Cij), wherein the color difference value operation is based on a formula: 2-~|, for example, 7-2'-~'|)/condition +/C3〇 =\Ri+2J-RiM〇MC,f~+2 -' Don't ~.+2'- , to +Bu 2, Factory Zhiqiao|+b_2,/-G/+2,/|)/5/2 +/ Factory and υ+2|+|θ-2,/-~·+/|)/still +i C23=h)-2-A+2』+| ~-~巧'|)/ still +/ Q 一~-2- and O.+d+l%—2'-G^+2'|)/5/2+i C3f| Know 2, Guanghe 〇.+2|如+和/-6^ +/|)/5/2+/ Cu=C22=C3s=C44=〇; Perform an inverse matrix operation to find four weight values W!, W2, W3, and W4, and %+%+%+% =i, where the inverse matrix operation is based on a formula: w{ 'Cn Cl2 Cl3 c14 ί -1 ~cl〇' W2 C21 C22 C23 . 24 1 c20 w3 two C31 C32 ^33 c34 1 C30 w4 C41 c42 c43 c44 1 c40 1 1 1 1 0 1 Perform a color model conversion to calculate a complex conversion value (K'R), where the color model is converted The calculation is based on a formula: 30 1274908, Guang Er called Bu + 'j/2) ^=g^A{k2j+ru)/2); h ", continent = wide (few + i〇/2) color Estimate the value of the operation to obtain a pontoon value (heart)' where the estimate is far from the openness < 進仃一内插值之計瞀 二第二开以永出該弟二標的像素之該第 弟一色内插值,盆古+曾及> 八冲异係根據一公式: G心Ά 。 4.如申請專利範圍第1 法,其中誃第…干止 項所述之影像色彩内插之方 H 人—插ッ驟中之該第一標的像素為B..,盘 該弟一標的像素對角 、、' 1,j 亨t角線相鄰之該些第二像素為 i+i,j-i、R μ i + 1 及 r u.j-i R 和位於該第-標的= 二内插值為G ,, 一 素之该苐一第 Gi,j,與該第一標的像辛對 0+2 ^ “2,j+2及 第- t % 4 素對角線相鄰之四個第二像 弟一苐二内插值GM,jY,、Gi + i ,,、g.,,像素之该 與該第一標的像素對 Ν〇ί+1^+ι ? Bi……2、Β·角/最相鄰之該些第-像素為 第一第-备1+2小2及Bi+2,j+2,該第一標的像专之1 ㈣值為〜'且該第三内插步驟至少=該 订I差值運异,以獲得複數個像匕卜 其中該色差值運算係根據一公式: 素色差值(Cij), 31 1274908 C50=( Bi-2j-2 - BiJ + ”广” G/—2上2 七/J Qo ~ ( ^/+2 J-2 ~ + ”广" Gi+2J一2 Q〇 = ( BMJ+2 - Bid + 广 π π G/+2j+2 - Q〇 =( Bi 一 2j+2 - Bu + 。卜2,卜2 -hj 11 11 11 11 + + + + 6 6 6 6 5 5 5 5 "56 ^57 "58 "67 ^68 ^78 \^i-2J-2 ^'+2,7-2 + ‘_2,,-‘女2” \^i-2J-2 ^i+2,j+2 + 一2,j-2 -Gi+2,j+2 一2 - B卜2j+2 + [Bi+2j-2 - Bi+2j+2 + Gi+2J.2^Gl+2J^ [Bi+2J-2 - Bj-2J+2 + -gu,;+2” {Bi+2J+2 - A一2J+2 + A2,y+2”-‘+2” /256 + 1 /256 + 1 /256 + 1 /256 + 1 /256 + 1 /256 + 1 C55 = C66 = C77 = C88 = 0 進行一反矩陣運算,以求出四個權重值Wi、w2、w3 和w4,且%+%+%+% = /,其中該反矩陣運算係根據一公 式: Wf _cn Cl2 c13 Cl4 1 一 -1 -c10- W2 C21 C22 C23 C24 1 C20 W3 = C31 C32 ^33 C34 1 c30 w4 C41 C42 c43 c44 1 c40 _ λ _ 1 1 1 1 0_ 1 急行 一色 彩 模型 轉換 9 以計 (K’R),其中該色彩模型轉換之計算係根據一公式: K t R{i-l,j-l)= // G " ~ Ri-u-l K t R(i + ],j-j)= gw/’- -/? K t R(i-l,j+l)= -R K 9 R 0+^J+O ~ Gi+u+i - _ R 進行一色彩估算值之運算,以獲得一色彩估算值 (<),其中該估算值之運算係根據一公式: 32 1274908 ‘)=_1)+❿乂㈣)+心_ ^進仃一内插值之計算,以求出第一標的像素之該第一 第二色内插值,其計算係根據一公女· H/-K,,Ri … A 式. 5.如中晴專利圍s i項所述之影像色彩内插之方 法,其中該第四内插步驟中之該第三標的像素為叫,最 ^目鄰於該S三標的像素之六個第二像素為 1,J 2 Rl+1,j-2、R“i,j+2和Ri+1,j+2 ’最相鄰於該第三標的 1 象素之六個第一像素中之該第-第二色内插值為 :η·2,… 一亥弟三#的像素水平相鄰之二個第—I素之該 =色:插乂‘,’和Gi,j+1'與該第三標的像素垂直相鄰 -,,固弟二像素之該第二第三色内插值為和 :’水平與垂直相鄰於該第三標的像素之四個第 ! t:2’j、Gi,j-2、Gi+2,j ’及Gi,』+2,該第三標的像素之# 弟一弟—色内插值為Xij”,且該第四内插步驟至少二人: 進行一平均運算,以獲得複數個平均 i3. 該平均運算係根據一公式: ,、()’其中 7?.. i,J +rmj+Rij^+Riy ψ”)/ /? · ^ .= 1 - 狀―2,1 ”+及—i"· + 及/—2,州1 ή/3 ^/+2,7 = ")/3 卜 2’= )/3 (^/-l,y+2 +^/,y+l ?'+^/+l,y+2 . )/3 33 1274908 進行一色差值運算,以獲得複數個像素色差值(Cij) 其中該色差值運算係根據一公式: 。10十,一 2,厂 為妒56+1 C40=(Gu+2-Gj 啦"+2,-i^;|/256+l -12 =|^/-2j_^/,y-2|+|^-2j,~^J-21)/^56+1 。13+_2,厂 0/+2,』啦_2,产尺句.|)/256+1 C14 =ί^_2,) -(3^.+21+17^2/-^+2 j)/256+l ^23=i^j-2 ~^/+2,y |+|^·,/-2 ~^r+2j· j)/^56+l · C24=j〜-2-、2|+|A_2,-〜.+21)/256+1 ’ C34+,+2,厂〜2|啦+2,/-1+2|)/256+1 q j =C22 =C33 =C44=0 進行一反矩陣運算,以求出四個權重值(Weights) W!、W2、W3和W4,且%+%+%+%=/,其中該反矩陣運 算係根據一公式: wf ~cll Cl2 c13 c14 f —1 -cw W2 C21 。22 C23 C24 1 C20 w3 = C31 ^32 ^33 。34 1 C30 w4 C41 C42 。43 c44 1 c40 A _ 1 1 1 1 0_ 1 隻行 一色 彩 模型 轉換 > 以計 (K’R),其中該色彩模型轉換之計算係根據一公式: K G丨心 ,-lu K' 丨 一 一 Gu-r K R{i + Kj)= G,_+w K{ ^(/,7 + 1)= 〜+r 進行一色彩估算值之運算,以獲得一色彩估算值 (〇,其中該估算值之運算係根據一公式: 34 1274908 進行-内插值之計算,以求出該第三 1及 第二色内插值,其計算係根據-公式: 素之該1 厂Κ 法,苴中嗲筮X允私止 丨 < 本巴彩内插之 r 弟内插步驟中之該第二標的像素為R δ亥弟二標的後去盤& Μ二^ 、為Rlsj ’ 」二::1 ’與該第^標的像素對角線相 :‘的像素位置之該些第二像素之該第二 ^ G i+2,j·2、G i+2,j+2,’、G i 2 . 2,, 第二標的像素對角線相鄰之四個第-像素 内插值G i ,.,,,、r ,, 豕常· 十 十·*·1、G …’·Μ、GMj + 1’,、 弟-標的像素對角線最相鄰之該些第二像 Ri+2,j·2及Ri+2,j+2 ’該第二標的像素二 j值為Bij’’’且該第五内插步驟至少^ 運算’以獲得複數個像素色差值(Cij) L運异係根據一公式: i+l,j-l、Β μ,」 和位於該第 二内插值為 Gi,j ,與該 該第一第三 i+l,j + l ,與該 A R“2,j-2、R 該第二第一爸 含: έ 值-2,;;?2,72j 一差^ 行色50===60==0==0== 進該ic丨 C1C7C8 Φ— 其In addition, the second interpolation is to interpolate the first color of the second parent to the pixel of the second division of the younger brother. The pottery + Zenghe > eight impulses are based on a formula: G heart Ά. 4. If the patent application scope method is the first method, in which the image color interpolation described in the first dry stop item is H-the first target pixel in the interpolation step is B.. The second pixels adjacent to the diagonal, '1, j heng t-angle are i+i, ji, R μ i + 1 and r uj-i R and the second interpolation at the first target is G , a prime of the first Gi, j, and the first target like the symplectic pair 0 + 2 ^ "2, j + 2 and the - t % 4 diagonal adjacent to the fourth second brother The interpolation value of GM, jY, Gi + i , , , g., and the pixels of the first target are Ν〇ί+1^+ι ? Bi...2, Β·角/最相The adjacent -th pixels are first first-prepared 1+2 small 2 and Bi+2, j+2, and the first target image has a value of 1 (four) of ~' and the third interpolation step is at least = The I difference is assigned to obtain a plurality of images, wherein the color difference operation is based on a formula: plain color difference (Cij), 31 1274908 C50=( Bi-2j-2 - BiJ + "wide" G /—2上2 七/J Qo ~ ( ^/+2 J-2 ~ + 『广" Gi+2J-2 Q〇= ( BMJ+2 - Bid + wide π π G/+2j+2 - Q 〇 =( Bi a 2j+2 - Bu + . Bu 2, Bu 2 -hj 11 11 11 11 + + + + 6 6 6 6 5 5 5 5 "56 ^57 "58 "67 ^68 ^78 \ ^i-2J-2 ^'+2,7-2 + '_2,,-'female 2" \^i-2J-2 ^i+2,j+2 + one 2,j-2 -Gi+2 , j+2 one 2 - B Bu 2j+2 + [Bi+2j-2 - Bi+2j+2 + Gi+2J.2^Gl+2J^ [Bi+2J-2 - Bj-2J+2 + - Gu,;+2" {Bi+2J+2 - A-2J+2 + A2,y+2"-'+2" /256 + 1 /256 + 1 /256 + 1 /256 + 1 /256 + 1 /256 + 1 C55 = C66 = C77 = C88 = 0 Perform an inverse matrix operation to find four weight values Wi, w2, w3, and w4, and %+%+%+% = /, where the inverse matrix operation According to a formula: Wf_cn Cl2 c13 Cl4 1 -1 -c10- W2 C21 C22 C23 C24 1 C20 W3 = C31 C32 ^33 C34 1 c30 w4 C41 C42 c43 c44 1 c40 _ λ _ 1 1 1 1 0_ 1 A color model is converted to 9 (K'R), where the calculation of the color model is based on a formula: K t R{il,jl)= // G " ~ Ri-ul K t R(i + ] ,jj)= gw/'- -/? K t R(il,j+l)= -RK 9 R 0+^J+O ~ Gi+u+i - _ R Perform a color estimation calculation to Get a color estimate ( <), wherein the calculation of the estimated value is based on a formula: 32 1274908 ') =_1) + ❿乂 (four)) + heart _ ^ into the calculation of an interpolation value to find the first pixel of the first target The second color interpolated value is calculated according to a method of a female female H/-K, and Ri ... A. 5. The method of image color interpolation according to the middle of the patent, wherein the fourth interpolation The third target pixel in the step is called, and the second pixel corresponding to the pixel of the S triple mark is 1, J 2 Rl+1, j-2, R "i, j+2, and Ri+ 1, j+2 'the first-second color interpolated value among the six first pixels adjacent to the first pixel of the third target is: η·2,... The second color of the first-color is: the interpolation ', ' and Gi, j+1' are vertically adjacent to the pixel of the third target -, and the second third color interpolation of the two pixels of the Gudi And: 'fourth horizontally and vertically adjacent to the third target pixel! t: 2'j, Gi, j-2, Gi+2, j ' and Gi, 』 + 2, the third target pixel #弟一弟—The color interpolation value is Xij”, and the fourth interpolation step is at least two people: An averaging operation to obtain a plurality of averages i3. The averaging operation is based on a formula: ,, ()' where 7?.. i, J + rmj+Rij^+Riy ψ") / /? · ^ .= 1 - Shape - 2,1 "+ and -i"· + and /—2, State 1 ή/3 ^/+2,7 = ")/3 Bu 2'= )/3 (^/-l,y +2 +^/,y+l ?'+^/+l,y+2 . )/3 33 1274908 Perform a one-color difference operation to obtain a plurality of pixel color difference values (Cij), where the color difference calculation system According to a formula: . 10 10, 1 2, the factory is 妒56+1 C40=(Gu+2-Gj 啦"+2,-i^;|/256+l -12 =|^/-2j_^/, y-2| +|^-2j,~^J-21)/^56+1. 13+_2, factory 0/+2, 』啦_2, production rule..)/256+1 C14 =ί^_2,) -(3^.+21+17^2/-^+2 j) /256+l ^23=i^j-2 ~^/+2,y |+|^·,/-2 ~^r+2j· j)/^56+l · C24=j~-2-, 2|+|A_2,-~.+21)/256+1 'C34+,+2,factor~2|啦+2,/-1+2|)/256+1 qj =C22 =C33 =C44=0 Perform an inverse matrix operation to find four weights (Weights) W!, W2, W3, and W4, and %+%+%+%=/, where the inverse matrix operation is based on a formula: wf ~cll Cl2 C13 c14 f —1 -cw W2 C21. 22 C23 C24 1 C20 w3 = C31 ^32 ^33 . 34 1 C30 w4 C41 C42. 43 c44 1 c40 A _ 1 1 1 1 0_ 1 Only one color model conversion > to calculate (K'R), where the calculation of the color model conversion is based on a formula: KG丨心, -lu K' 丨一a Gu-r KR{i + Kj)= G, _+w K{ ^(/,7 + 1)= 〜+r Perform a color estimation operation to obtain a color estimate (〇, where the estimate The calculation of the value is based on a formula: 34 1274908. The calculation of the interpolated value is performed to obtain the third 1st and second color interpolated values, and the calculation is based on the formula: the 1 factory method of the prime, the middle 嗲筮X 私私止丨< The second target pixel in the r-interpolation step of the sakura interpolation is the R δ hai ji two-labeled back disk & Μ二^, which is Rlsj ' ” two::1 ' The second ^ G i+2, j·2, G i+2, j+2, ', G i 2 of the second pixels of the pixel position of the pixel: 2, the four pixels of the second target diagonally adjacent to the first pixel-interpolated value G i , .,,,, r,, 豕常·十十·*·1, G ...'·Μ, GMj + 1 ',, brother-labeled pixel diagonals are the most adjacent to the first Like Ri+2, j·2 and Ri+2, j+2 'the second target pixel two j value is Bij''' and the fifth interpolation step is at least ^ operation 'to obtain a plurality of pixel color difference values ( Cij) L transports according to a formula: i+l, jl, Β μ," and the second interpolated value Gi,j, and the first third i+l,j + l , and the AR "2, j-2, R The second first dad contains: έ value -2,;;? 2,72j a difference ^ line color 50===60==0==0== into the ic丨C1C7C8 Φ—its -2-R 1 1 . 丨 + g-2,^2m-g. + °W2" 乂·” + hG:,/ 35 1274908 C56=( ^/-2,7-2 - ^/+2,7-2 + Gi-2j-2 -Gi+2J_2 C57 =( Ri-2,j-2 _ Ri+2,j+2 + G/_2,/_2’’-G/+2j+2” C58 =( ^/-2 J-2 ~ ^/-2,y+2 + < C67 =( ^/+2,7-2 ~ ^i+2J+2 + ^/+2J-2 ~^i+2,j+2 Qs =( ^i+2J-2 ~ ^/-2,y+2 + C78=( ^/+2,;+2 — ^/-2,7+2 + Gi+2J+l -Gi-2,j+2 C55 = C66 = C77 = C88 = 0 lx IX 11 11 11 1Χ + + + + + + 6 6 6 6 6 6 5 5 5 5 5 5 進行一反矩陣運算,以求出 個權重值Wi、w2、w3 和W4,且,其中該反矩陣運算係根據一公 式·· Ί一7 _cw C20 C30 c40 l Wj Cn cn cl3 cl4 l W2 C21 C22 。23 。24 l W3 = C31 C32 c33 C34 l w4 c4l c42 c43 c44 l λ l l l l 0 進行一色彩模型轉換,以計算出複數個轉換值 (Κ’β),其中該色彩模型轉換之計算係根據一公式: r 丨 " K = G » " K = Gi+l J_{ — Bi+l j_x , K B(i-i,j+\) = G(_1υ+ι -» " K 5(/+1,y + l) = G i+lJ + l — Bi+lj + l 進行一色彩估算值之運算,以獲得一色彩估算值 (〇,其中該估算值之運算係根據一公式: 進行一内插值之計算,以求出第二標的像素之該第二 第一色内插值,其計算係根據一公式: 一〜。 36 ^274908 7·如申請專利範圍第〗項 法,其中該第丄肉括芈_ ^ 、述之衫像色彩内插之方 你罘,、内插步騾申之誃 相鄰於該第:r 一7^的像素為Gj j ,最 z乐一私的像素之六個第一 B— W^B,1J+2^Bi+i. 像素之六個第二像素中之該;最於該第三標的 Bi^,,、Β ,, ,, 弟一第一色内插值為 與該第=押的德 I u ,j+1 、Bi + 2,_M 和 Bi + 2,j + 1’’, 弟-軚的像素水平相鄰之二 三色内插值Gi_ ,’,和Γ ,,办 料之該第一苐 Μ·丨和G…,與該第三標的像素垂直相鄰 之一個弟一像辛之琴笛 锋一知 豕京之該弟一弟二色内插值為Gi•丨,厂和 1+1’j ’水平與垂直相鄰於該第三標的像素之四個第三像 素為,2,j、Gi,j-2、Gi+2,j及Gu+2,該第三標的像素之該 第一第色内插值為Xi,j ,且該第四内插步驟至少包含: 進行一平均運算,以獲得複數個平均像素(B、,其中 該平均運算係根據一公式: )/3 進行一色差值運算,以獲得複數個像素色差值(CJ, 其中該色差值運算係根據一公式: 37 1274908 c.Ag^j-g^ 〜丨)/25^1 Q〇=|G/+2j_G/j|+|^/ +2J ,為1)/256+1 M〜2|+一^ C^G^j-G^ Ch+^-g^I+I^ C23 =^"_2 -0/+2"|+|尽"_2’-5/+2」j/256+1 C2,4pij-2-GiJ+^^^^^^ Q j =C22 =C33 =C44 =0 進行一反矩陣運算,以求出四個權重值(Weights) Wi、W2、W3和W4,且)= 7,其中該反矩陣運 算係根據一公式: wf _。11 c12 c13 c14 1 一 1 _Cw w2 C21 C22 c23 。24 1 c20 w3 = C31 C32 C33 c34 1 C30 w4 C41 c42 c43 c44 1 C40 又 1 1 1 1 0 1-2-R 1 1 . 丨+ g-2,^2m-g. + °W2" 乂·” + hG:, / 35 1274908 C56=( ^/-2,7-2 - ^/+2,7 -2 + Gi-2j-2 -Gi+2J_2 C57 =( Ri-2,j-2 _ Ri+2,j+2 + G/_2,/_2''-G/+2j+2” C58 =( ^/-2 J-2 ~ ^/-2,y+2 + < C67 =( ^/+2,7-2 ~ ^i+2J+2 + ^/+2J-2 ~^i+2, j+2 Qs =( ^i+2J-2 ~ ^/-2, y+2 + C78=( ^/+2,;+2 — ^/-2,7+2 + Gi+2J+l -Gi -2,j+2 C55 = C66 = C77 = C88 = 0 lx IX 11 11 11 1Χ + + + + + + 6 6 6 6 6 6 5 5 5 5 5 5 Perform an inverse matrix operation to find the weights The values Wi, w2, w3, and W4, and wherein the inverse matrix operation is based on a formula: Ί7 _cw C20 C30 c40 l Wj Cn cn cl3 cl4 l W2 C21 C22 . 23 . 24 l W3 = C31 C32 c33 C34 l w4 c4l c42 c43 c44 l λ llll 0 Perform a color model conversion to calculate a plurality of conversion values (Κ'β), where the calculation of the color model conversion is based on a formula: r 丨" K = G » &quot ; K = Gi+l J_{ — Bi+l j_x , KB(ii,j+\) = G(_1υ+ι -» " K 5(/+1,y + l) = G i+lJ + l — Bi+lj + l for a color estimate Computing to obtain a color estimate (wherein the calculation of the estimate is based on a formula: performing an interpolation calculation to determine the second first color interpolated value of the second target pixel, the calculation is based on A formula: a ~. 36 ^ 274908 7 · If you apply for the scope of the patent, the law of the first paragraph, in which the first 丄 芈 芈 _ ^, the description of the shirt like the color of the interpolation you, 内, insert step 申申誃The pixel adjacent to the first:r_7^ is Gj j , and the six first B-W^B, 1J+2^Bi+i. pixels of the pixel of the most z-one private pixel are in the second pixel of the pixel. The first color interpolated value of Bi^,, Β, , ,, and the third target is the same as the first I, j+1, Bi + 2, _M, and Bi + 2 , j + 1'', the pixel-level adjacent two-color interpolated values Gi_, ', and Γ, the first 苐Μ·丨 and G... of the material, perpendicular to the third target pixel One of the neighboring brothers like Xin Zhiqin Feng Feng knows that the brother of the brother-in-law is a two-color interpolated value of Gi•丨, the factory and 1+1'j′ are horizontally and vertically adjacent to the third target pixel. First The pixels are 2, j, Gi, j-2, Gi+2, j and Gu+2, the first color interpolation of the third target pixel is Xi, j, and the fourth interpolation step includes at least : performing an averaging operation to obtain a plurality of average pixels (B, wherein the averaging operation performs a color difference operation according to a formula: )/3 to obtain a plurality of pixel color difference values (CJ, wherein the color difference value The calculation system is based on a formula: 37 1274908 c.Ag^jg^ ~丨)/25^1 Q〇=|G/+2j_G/j|+|^/ +2J , for 1)/256+1 M~2| +一^ C^G^jG^ Ch+^-g^I+I^ C23 =^"_2 -0/+2"|+|Do"_2'-5/+2"j/256+1 C2 , 4pij-2-GiJ+^^^^^^ Q j =C22 =C33 =C44 =0 Perform an inverse matrix operation to find four weights (Weights) Wi, W2, W3, and W4, and) = 7 , wherein the inverse matrix operation is based on a formula: wf _. 11 c12 c13 c14 1 a 1 _Cw w2 C21 C22 c23 . 24 1 c20 w3 = C31 C32 C33 c34 1 C30 w4 C41 c42 c43 c44 1 C40 again 1 1 1 1 0 1 進行一色彩模型轉換,以計算出複數個轉換值 (K’b),其中該色彩模型轉換之計算係根據一公式: JT» - =G λ n- - β . ' ϊ-1,7 Y 1 一 ^ 一 A〆- -B . /1 Ή · fC1 - -B、' ·, ϊ+1,7 Y 1 一 Λ B(i,j+l) 一 -Β χ1π ϊ,7 + 1 進行一色彩估算值之運算,以獲得一色彩估算值 (〇,其中該估算值之運算係根據一公式: 38 1274908 進行-内插值之計算,以求出該第三標的像素之該第 三第一色内插值,其計算係根據一公式: XUJ 。 項所述之影像色彩内插之方 為弟一色彩係為紅色,該 8·如申請專利範圍第i 法,其中該第一色彩係為藍色 第三色彩為綠色。 9·如申請專利範園第 法,其中該第一色彩係為鮫項所述之影像色彩内插之方 第三色彩為綠色。 …w亥弟一色彩係為藍色,該 39Perform a color model conversion to calculate a plurality of conversion values (K'b), wherein the calculation of the color model conversion is based on a formula: JT» - = G λ n- - β . ' ϊ-1,7 Y 1一^一一〆- -B . /1 Ή · fC1 - -B, ' ·, ϊ+1,7 Y 1 Λ B(i,j+l) one-Β χ1π ϊ,7 + 1 for a color Estimating the value to obtain a color estimate (〇, wherein the operation of the estimate is based on a formula: 38 1274908 - calculation of the interpolated value to find the third first color of the third target pixel Interpolation, the calculation is based on a formula: XUJ. The color interpolation of the image is the color of the color of the younger brother. The color is the red color. The first color is the third color of the blue color. 9. For example, if the patent is applied to the Fan Garden Law, the first color is the third color of the image color interpolation described in the item. The color is blue, and the color is blue.
TW94140979A 2005-11-22 2005-11-22 A method for interpolating the color of color filter array TWI274908B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
TW94140979A TWI274908B (en) 2005-11-22 2005-11-22 A method for interpolating the color of color filter array

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW94140979A TWI274908B (en) 2005-11-22 2005-11-22 A method for interpolating the color of color filter array

Publications (2)

Publication Number Publication Date
TWI274908B true TWI274908B (en) 2007-03-01
TW200720716A TW200720716A (en) 2007-06-01

Family

ID=38624206

Family Applications (1)

Application Number Title Priority Date Filing Date
TW94140979A TWI274908B (en) 2005-11-22 2005-11-22 A method for interpolating the color of color filter array

Country Status (1)

Country Link
TW (1) TWI274908B (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI455063B (en) * 2011-08-12 2014-10-01 Univ Nat Cheng Kung Color interpolation device and method thereof
TWI463430B (en) * 2011-08-12 2014-12-01 Univ Nat Cheng Kung Color interpolation and image magnifying device and method thereof
US11076139B2 (en) 2018-08-16 2021-07-27 Realtek Semiconductor Corporation Color reconstruction device and method
US11645734B2 (en) 2019-05-15 2023-05-09 Realtek Semiconductor Corp. Circuitry for image demosaicing and contrast enhancement and image-processing method

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI455063B (en) * 2011-08-12 2014-10-01 Univ Nat Cheng Kung Color interpolation device and method thereof
TWI463430B (en) * 2011-08-12 2014-12-01 Univ Nat Cheng Kung Color interpolation and image magnifying device and method thereof
US11076139B2 (en) 2018-08-16 2021-07-27 Realtek Semiconductor Corporation Color reconstruction device and method
US11645734B2 (en) 2019-05-15 2023-05-09 Realtek Semiconductor Corp. Circuitry for image demosaicing and contrast enhancement and image-processing method

Also Published As

Publication number Publication date
TW200720716A (en) 2007-06-01

Similar Documents

Publication Publication Date Title
US7577315B2 (en) Method and apparatus for processing image data of a color filter array
JP6584131B2 (en) Imaging apparatus, imaging system, and signal processing method
US7982781B2 (en) Image processing device, image processing method, and imaging apparatus
EP2728545B1 (en) Image processing method and device based on bayer format
CN107018395A (en) Image processing apparatus, image processing method and camera device
WO2008001629A1 (en) Image processing device, image processing program, and image processing method
JP4232086B2 (en) Digital image sensor including an array of two-color photodetectors and method for demosaicing of an array of two-color photodetectors
TWI274908B (en) A method for interpolating the color of color filter array
JP2016219977A (en) Imaging device, imaging system and image processing system
US20090027525A1 (en) Techniques For Reducing Color Artifacts In Digital Images
WO2007071194A1 (en) Method for realizing color interpolation of value correction of exceptional points
JP2008015946A5 (en)
TW200915861A (en) Method and apparatus for improving low-light performance for small pixel image sensors
CN105993169A (en) System and method for image demosaicing
TWI547169B (en) Image processing method and module
TW201003566A (en) Interpolation system and method
US20200382728A1 (en) High-dynamic image sensor
CN101998127B (en) Signal processing device, imaging device, and signal processing method
JP2010130686A (en) Image data processing method, image sensor, and integrated circuit
TWI282519B (en) Color interpolation method with directed weights
CN116503259B (en) Mosaic interpolation method and system
JP3609606B2 (en) Single plate color camera
JPH0313192A (en) Solid-state image pickup device
Lee et al. High quality image interpolation for color filter arrays
Lee et al. An Effective Demosaicking and Zooming Algorithm for CFA Images

Legal Events

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