TWI265726B - Method for heterogeneity-projection hard-decision - Google Patents

Method for heterogeneity-projection hard-decision Download PDF

Info

Publication number
TWI265726B
TWI265726B TW94119320A TW94119320A TWI265726B TW I265726 B TWI265726 B TW I265726B TW 94119320 A TW94119320 A TW 94119320A TW 94119320 A TW94119320 A TW 94119320A TW I265726 B TWI265726 B TW I265726B
Authority
TW
Taiwan
Prior art keywords
color
plane
pixels
green
red
Prior art date
Application number
TW94119320A
Other languages
Chinese (zh)
Other versions
TW200644613A (en
Inventor
Chi-Shr Tsai
Kai-Tai Sung
Original Assignee
Univ Nat Chiao Tung
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 Chiao Tung filed Critical Univ Nat Chiao Tung
Priority to TW94119320A priority Critical patent/TWI265726B/en
Application granted granted Critical
Publication of TWI265726B publication Critical patent/TWI265726B/en
Publication of TW200644613A publication Critical patent/TW200644613A/en

Links

Landscapes

  • Testing Of Individual Semiconductor Devices (AREA)
  • Image Processing (AREA)

Abstract

The present invention provides a heterogeneity-projection hard-decision (HPHD), allowing to estimate the optimal edge direction with heterogeneity-projection, and also decide the optimal interpolation direction with hard-decision rule. So, it's possible to obtain the information of green elements. By adding the red and blue element surface treatment process into the high-frequency information of green element surface, the rebuilding error of red and blue element surface can be reduced. Thus, the present invention may reduce the error of interpolation direction, while obtaining better effect on PSNR (peak signal to noise ratio) and visual comparison.

Description

1265726 九、發明說明: 【發明所屬之技術領域】 本發明係有關一種色彩内插法,特別是有關一種異次投影硬性決定色 彩内插法。 【先前技術】 數位照相機利用鏡頭將影像投射到電荷耦合元件(Charge c〇upled Device,CCD)上,藉電荷耦合元件將相機鏡頭所採取到的畫面,轉換成數 位影像訊號,透過電子線路的處理,把數位影像訊號儲存在儲存媒體中。 不過由於電荷耦合元件只能感受到光線的強弱,並不能感受到顏色的變 化,因此當進行數位取樣時,必須在感光原件的前面加上一分色濾色片, 通常分色慮色片是採用RGB三原色分色法,然後將三個電荷偶合元件所操 取到的三色練混合成全娜像。由於數位相機在考慮侧三個電荷偶合 元件的成本高以及所佔體積大的因素下,—般只會使用單—電荷偶合元 件,而使得每-個像素只有R、G、B其中-種色彩元素的灰度值,造成其 他的兩個色彩元素遺失,因此我們必須將感光元件所得_結果進行内插 法的數學處理,藉以重建每一個像素所遺失的色彩元素。 -般的影像内插法可分為兩類:第—類是固定式影像内插法,此類内 插法在内插遺落的色彩元素所取的鄰近像素之權重值是蚊的,内插法本 身並沒有偵測邊緣的能力,因此會造成邊緣模糊的現象,且細節紋理部份 並不能有效復原;第二類為個定式影像_法,此_插法在内插遺落 的色彩元素所取_近像素之權重值是不蚊的,内餘本身具有侦測邊 1265726 緣的能力,因此可以降低邊緣模糊的現象,其所内插出來的影像在水平和 垂直兩方向邊緣部份能有效降低邊緣模糊的現象,但是在細節紋理部份不 能完全復原的現象依然存在。 ' 另一習知之技術如中華民國專利__「-種應用於數位影像的色 、 彩内插法」,其色彩内插技術除了會造成重建後的數位影像存有色彩失真 外,在數位影像中的細節紋理部份並不能有效復原。 有鑑於此,本發明係針對上述之問題,提出一種異次投影硬性決定色 一彩内插法,對數位影像邊緣的部份做有效_插,並靈敏的_到邊緣的 通過,以有效復原影像細節紋理部份。 【發明内容】 ^ 本發明之主要目的,係在提供—種異次投影雌蚁色彩内插法,其 -係糊異缝雜誠魏決定酬以歧λ最佳_财向,可降低内 插方向錯誤的情況。 本發明之另-目的,係在提供_種異次投影硬性決定色軸插法,其 係可有效降低色形重雜的數位影像巾存有的邊緣模糊效應,能有效回復 •數位影像中的細節紋理部份。 ' 本毛月之再目的’係在提供-種異次投影硬性決定色彩内插法,其 、係可重建透過色_、抑_後之數位影像所遺失的色彩元素,使數位影 像的色彩重建效果能更為逼真。 又月之又目的’係在提供一種異次投影硬性決定色彩内插法,其 可”目⑴現有之固疋式及非固定式影像内插法結合,藉以提升現有之内插 1265726 法的性能。 根據本發明,其係一種異次投影硬性決定色彩内插法,包括下列步驟·· -進仃影細取並制—貞賴狀触影像,貞關紅數位影像係為數 個像素所組成,包括數個紅色像素、數個藍色像素、以及數個綠色像素; ' _異次投影方法,分別對原始數位影像進行水平方向投影及垂直方向投 影,求得水平異次映射圖(Horiz〇ntal Heterogeneity Map)及垂直異次映 射圖(Vertical Heterogeneity Map),再利用影像復原(Image Rest〇rati〇n) 技術求传最佳水平異次映棚及最佳垂直異:欠映棚;湘求得的最佳水 平異次映射圖及最佳垂直異次映射圖,以硬性決定(Hard-Decision)規則分 離出水平集合、垂絲合及平滑集合;重建所有遺失的色彩元素,係在水 、平齡巾進行水平方向内插,在《集合巾進行垂直方向_,在平滑集 .合中進行平均利麟有像素上紅色色彩元素ϋ差平面及藍色 色彩元素之第-色差平研財像素上綠色色彩元素之第—色差平面做色 練正’並得到綠色色彩元素之第二色差平面;利用所有像素上綠色色彩 #元素之第二色差平研所有像素上紅色色彩元素之第—色差平面及藍色色 -彩元素之第-色差平面分別做色彩修正,得到紅色色彩元素之第二色差平 面及藍色色㈣素之第—色差平面;以及重複執行前兩個步概次,最後 、 得到一影像校正後之數位影像。 底下藉由具體實施例配合所附的圖式詳加說明,當更容易瞭解本發明 之目的、技術内容、特點及其所達成之功效。 1265726 【實施方式】 本發明係-„次投影硬性蚊色_插法,其_職次投影技術 .及硬性蚊規則,決定出最佳的内插方向,達到執行内插時能降低内插方 、 向發生錯誤的情況。 , 本發明可重建—貝隨式之數《彡像上每-個像相遺失的色彩元 素,請參閱第-圖為本發明之方法流程圖,其步驟包括:步驟si進行影像 擷取並得到-貝爾模式之數位影像,步驟S2求得最佳水平異次映射圖及最 一佳垂直異次映射圖,步驟S3以硬性決定規則分離出水平集合、垂直集合及 平滑集合,步驟S4重建所有遺失的色彩元素,步驟%對目前的綠色色彩 元素平面做色彩修正,步驟S6#目前的紅色色彩元素平面及藍色色彩元素 平面分職色彩修正,步驟S7重複執行步驟S5及步驟S6 一至三次。以下 、 就各步驟實施方式做詳細之說明。 - 步則1進行影像擷取並得到一貝爾模式之數位影像,係以單一個電荷 搞合元件搭配貝爾模式(Bayer pattern)彩色濾光片陣列進行影像擷取後的 φ 數位影像,此數位影像為數個像素所組成,包括紅色像素、藍色像素、以 及綠色像素,母一個像素只具有單一個色彩元素之灰度值如第二圖所示為 • 貝爾(Bayer)模式色彩濾光片陣列示意圖。 • 步驟S2求得最佳水平異次映射及最佳垂直異次映射,令尺χΐ為一個#xl 大小之異次投影(Heterogeneity-Projection)向量,其依據式(1)求得: ΡΝχ\= Η純 ............................................. / 1 \ 其中iVxM之矩陣ζ^χΛ/依據式(2)求得: ^nxm - [l -1 -1 if ®eye{M)........... (2) (3) 1265726 Μχΐ之向量fMx1依據式(3)求得: M-\ ^Mxl =立 1 [l — l]7^ ® eye{M — /) /=1 其中,為-個至少大於或等於5之整數,⑭代表二維旋積 (C〇nv〇lution)運算子,雜)則為大的單位矩陣。利用異次投影 向里八X1 ’依據式⑷及⑸分別求得水平異次映射圖及垂直異次映射圖:</ RTI> </ RTI> </ RTI> </ RTI> </ RTI> <RTIgt; </ RTI> <RTIgt; </ RTI> <RTIgt; </ RTI> <RTIgt; </ RTI> <RTIgt; [Prior Art] The digital camera uses a lens to project an image onto a Charge Coupled Device (CCD), and the charge-coupled component converts the image taken by the camera lens into a digital image signal for processing through the electronic circuit. , the digital image signal is stored in the storage medium. However, since the charge-coupled component can only sense the intensity of light and cannot sense the change of color, when performing digital sampling, a color separation filter must be added in front of the photosensitive element. Usually, the color separation is The RGB three primary color separation method is adopted, and then the three colors obtained by the three charge coupling elements are mixed into a full image. Since the digital camera considers the high cost and the large volume of the three charge-coupled components, only the single-charge coupling component is used, so that each pixel has only R, G, and B colors. The gray value of the element causes the other two color elements to be lost, so we must mathematically interpolate the resulting result of the photosensitive element to reconstruct the color elements lost by each pixel. The general image interpolation method can be divided into two categories: the first type is a fixed image interpolation method, and the interpolation method adds the weight value of the adjacent pixels taken by the missing color elements to the mosquito. The interpolation itself does not have the ability to detect edges, so it will cause edge blurring, and the detail texture part can not be effectively restored; the second type is a fixed image _ method, this _ interpolation method interpolates the missing color The weight value of the near-pixel taken by the element is not mosquitoes, and the inner space itself has the ability to detect the edge of 1265726, so the edge blurring phenomenon can be reduced, and the image inserted therein can be in the horizontal and vertical edge portions. Effectively reduce the phenomenon of edge blur, but the phenomenon that the detail texture cannot be completely restored still exists. 'Another known technology such as the Republic of China patent __ "--color interpolation method for digital imagery", its color interpolation technology will not only cause the reconstructed digital image to have color distortion, in the digital image The detail texture part of the detail cannot be effectively restored. In view of the above, the present invention is directed to the above problem, and proposes a multi-projection hard deterministic color-color interpolation method, which effectively _ inserts the edge of the digital image and passes the sensitive _ to the edge to effectively recover Image detail texture part. SUMMARY OF THE INVENTION The main object of the present invention is to provide a kind of hetero-projection female ant color interpolation method, which is to determine the best ambiguity, and to reduce the interpolation. The wrong direction. Another object of the present invention is to provide a multi-projection hard decision color axis interpolation method, which can effectively reduce the edge blur effect of the color image and heavy digital image towel, and can effectively recover the image in the digital image. Detail texture part. 'The re-purpose of the month of the month' is to provide a multi-projection hard decision color interpolation method, which can reconstruct the color elements lost by the digital image after the color _, _ _, and the color reconstruction of the digital image The effect can be more realistic. The purpose of the month is to provide a hetero-projection hard decision color interpolation method, which can combine the existing solid-state and non-fixed image interpolation methods to improve the performance of the existing interpolated 1265726 method. According to the present invention, it is a hetero-projection hard decision color interpolation method, which includes the following steps: - 仃 仃 细 细 贞 贞 贞 贞 贞 贞 贞 贞 贞 贞 贞 贞 红 红 红 红 红 红 红 红 红 红 红 红 红 红 红 红 红 红 红 红 红 红 红Including a plurality of red pixels, a plurality of blue pixels, and a plurality of green pixels; ' _ different projection method, respectively, horizontal projection and vertical projection of the original digital image, to obtain a horizontal different map (Horiz〇ntal Heterogeneity Map) and Vertical Heterogeneity Map, and then use image restoration (Image Rest〇rati〇n) technology to find the best level of different sub-images and the best vertical difference: under-reflection; The best horizontal different map and the best vertical different map, separated by horizontal decision, horizontal combination, vertical and smooth set; reconstruct all missing color elements In the water, the flat towel is inserted horizontally, in the "collection towel in the vertical direction _, in the smooth set. In the average, the lining has the red color element ϋ difference plane and the blue color element on the pixel - The color difference is on the pixel of the green color element - the color difference plane is coloring and correcting 'and getting the second color difference plane of the green color element; using the second color difference of all the pixels on the green color # element to flatten the red color element on all pixels The color-correction plane of the color-difference plane and the blue-color element respectively performs color correction, obtaining the second color difference plane of the red color element and the first-color difference plane of the blue color (four); and repeating the first two steps of the first step Finally, an image-corrected digital image is obtained. The purpose of the present invention, the technical content, the features, and the effects achieved by the present invention are more readily understood by the specific embodiments in conjunction with the accompanying drawings. 1265726 [ MODE FOR CARRYING OUT THE INVENTION The present invention is a sub-projection hard mosquito color _ insertion method, its _ job projection technology, and a hard mosquito rule, which determines the optimal interpolation direction. When interpolation is performed, the interpolation can be reduced and an error occurs. The present invention can be reconstructed - the number of shells is "the color element of each image phase lost on the key image. Please refer to the first figure for the flow chart of the method of the present invention, and the steps include: step si for image capturing and obtaining - the digital image of the Bell mode, the optimal horizontal different map and the best vertical vertical map are obtained in step S2, and the horizontal set, the vertical set and the smooth set are separated by the hard decision rule in step S3, and all the missing are reconstructed in step S4. The color element, step % performs color correction on the current green color element plane, step S6# current red color element plane and blue color element plane division color correction, step S7 repeats step S5 and step S6 one to three times. The following is a detailed description of each step implementation. - Step 1 performs image capture and obtains a digital image of a Bell mode, which is a φ digital image obtained by image capture using a single charge matching component and a Bayer pattern color filter array. It consists of several pixels, including red pixels, blue pixels, and green pixels. The mother pixel has only one color element with the gray value as shown in the second figure. • Bayer mode color filter array schematic . • Step S2 finds the best horizontal different mapping and the best vertical different mapping, so that the ruler is a #xl size Heterogeneity-Projection vector, which is obtained according to formula (1): ΡΝχ\= Η pure............................................. / 1 \ The matrix of iVxM is obtained according to formula (2): ^nxm - [l -1 -1 if ®eye{M)........... (2) (3) 1265726 Μχΐ The vector fMx1 is obtained according to the formula (3): M-\ ^Mxl =立1 [l — l]7^ ® eye{M — /) /=1 where is an integer greater than or equal to 5, 14 Represents a two-dimensional convolution (C〇nv〇lution) operator, and a large unit matrix. Using the different projections, the horizontally different maps and the vertical different maps are obtained from the inner eight X1 ' according to equations (4) and (5):

Hh map .....................................................Hh map ................................................ .....

^V_Wa/7 - | 方® Axl ................................. (5) 其中万ayer表示原始的貝爾模式之數位影像。 利用影像復原技術,如平均值濾波器(Mean Filter)、中間值遽波器 (MedianFilter)、適應性濾波器(AdaptiveFilter)等,分別對(4)及(5) 所知之水平及垂直異次映射騎行方向性_訊濾除。也就是說,對水平 異次映射圖^進行水平方向的雜訊濾除處理,對垂直異次映射圖尽_ 則進行垂直方向的雜訊濾除處理。在此提出以適應性濾波器進行方向性雜 訊濾除處理之方法。 依據式(6)對水平異次映射圖^ -上之每一元素足進行水平方向之 適應性濾波處理: (6) 其中庆為元素A進行濾波處理後之最佳估測值,(民I,况〇分別為以^^為中 心之IX#大小視窗(window)内的區域平均值(mean)及變異量(variance), //f為元素圮左邊緊鄰之元素,谢丨)分別為以好^為中心之卜#大小視^V_Wa/7 - | 方® Axl ........................... (5) where wan ayer represents the original Digital image of the Bell mode. Use image restoration techniques, such as Mean Filter, Median Filter, Adaptive Filter, etc., for horizontal and vertical differences, respectively, for (4) and (5) Map the riding direction _ filtering. That is to say, the horizontal noise filtering processing is performed on the horizontal different mapping map, and the vertical filtering processing is performed on the vertical different mapping map. Here, a method of performing directional noise filtering processing with an adaptive filter is proposed. According to formula (6), the horizontally adaptive filtering process is performed on each element of the horizontally different mapping map: (6) The best estimated value after filtering the element A is filtered, (Min I, The situation is the area mean (mean) and variance (variance) in the IX# window (windows) centered on ^^, //f is the element immediately to the left of the element 丨, Xie 丨) ^ Center for Bu #大小视

1265726 窗(window)内的區域平均值(mean)及變異量(variance),珩為元素巧右邊 緊鄰之元素。請參閱第三圖為本發明在水平方向上適應性渡波處理之圖 示。利用式(6)處理完所有巧_上之每一元素後,即可得最佳水平異次 映射圖庆-。 依據式(7)對垂直異次映射圖付v w叩上之每一元素坟進行垂直方向之 適應性濾波處理: H* = Hu + — (Ή° -Ήυλ................... (η、 其中為元素//ν進行濾波處理後之最佳估測值,(互丨/,讯y)分別為以/^為 中心之#χΐ大小視窗(window)内的區域平均值(mean)及變異量 (variance),&lt;為元素尽上邊緊鄰之元素,(忠&gt;,〇分別為以忙為中心 之#χΐ大小視窗(wind〇w)内的區域平均值(mean)及變異量(variance),把 為元素%下邊緊鄰之元素。請參閱第四圖為本發明在垂直方向上適應性濾 波處理之圖示。糊式⑺處理完所有&amp; _上之每_元素後,即可得最 佳垂直異次映射圖好:—。 步驟S3以硬性決定規則分離出水平集合、垂直集合及平滑集合,係根 據式(8)、(9)及(1〇)分別決定出影像中之水平集合%、垂直集合仏及 平滑集合义: Ω, ^ {(x,y) | Hl_map(x^y) &lt; aH*v map(x^y)}..................... ( 8 ) Ων ^ {(x.y) I Hi map(x9y) &lt; aHl_map{x^y)}..................... ( 9 ) Ω5 ξ {(^y) I (x,y) i QhXx,y) i Ων} ........................ Q〇) 其中㈣為影像像素位置,α為-個介於Q到丨之間的縮放係數(⑽以 1265726 factor) 〇 步驟S4重建所有遺失的色彩元素,重建順序為先重建出n 失的綠 色色彩元素,再利用重建出的綠色色彩元素幫助重建所有遺失的紅色及該 色色彩元素。 重建綠色色彩元素,分別對複數個紅色像素計算其周圍四個綠色像素 之色彩調整值及個別所對應的權重值,分別由式(11)求得: (¾ =6+0??-尺)/2,,/ = 1 〜4.................. (11) / k=\1265726 The mean and variance of the area in the window, which is the element immediately to the right of the element. Please refer to the third figure for the illustration of the adaptive wave processing in the horizontal direction of the present invention. After processing each element on the __ using equation (6), the best horizontally different mapping can be obtained. According to equation (7), the vertical filtering of the elemental vox叩 on each vertical gravel is adaptively filtered: H* = Hu + — (Ή° -Ήυλ.......... ......... (η, where is the best estimate of the element / / ν after filtering, (mutual 丨 /, y) are respectively # / 为 center window The mean (mean) and variance (variance) in the window), &lt;the element that is close to the top of the element, (loyalty &gt;, 〇 is the busy-centered #χΐ 视窗 window (wind〇w) The mean and variance of the region are the elements immediately below the element %. Please refer to the fourth figure for the adaptive filtering process in the vertical direction of the present invention. Paste (7) has processed all &amp; After the _ element on _, the best vertical sub-map is obtained: -. Step S3 separates the horizontal set, the vertical set and the smooth set by the hard decision rule, according to equations (8), (9) And (1〇) determine the horizontal set %, vertical set 仏, and smooth set meaning in the image: Ω, ^ {(x,y) | Hl_map(x^y) &lt; aH*v map(x^y) }........ ............. ( 8 ) Ων ^ {(xy) I Hi map(x9y) &lt; aHl_map{x^y)}............. ........ ( 9 ) Ω5 ξ {(^y) I (x,y) i QhXx,y) i Ων} .................. ...... Q〇) where (4) is the image pixel position, α is a scaling factor between Q and ( ((10) is 1265726 factor) 〇Step S4 reconstructs all missing color elements, the reconstruction order is first Rebuild the missing green color elements and use the reconstructed green color elements to help rebuild all the missing red and color elements. Reconstruct the green color element, calculate the color adjustment values of the four green pixels around and the corresponding weight values for the plurality of red pixels, respectively, which are obtained by equation (11): (3⁄4 = 6+0??-foot) /2,, / = 1 ~4.................. (11) / k=\

其中$值為紅色像素周圍綠色像素之色彩調整值,%值為色彩調整值個別 所對應的權重值,A值為紅色像素周圍綠色像素之邊緣指標(edge indicator),請參閱第五圖為本發明在紅色像素位置上求遺失綠色色彩元 素之圖示,邊緣指標A可由式(12-1)至(12-4)求得:The value of $ is the color adjustment value of the green pixel around the red pixel, the % value is the weight value corresponding to the color adjustment value, and the A value is the edge indicator of the green pixel around the red pixel. Please refer to the fifth figure. The invention finds a diagram of the missing green color element at the red pixel position, and the edge index A can be obtained by the formulas (12-1) to (12-4):

ei e3 e4==(^1 + lG2-G4| + |G4-G8| + |i? —及4|·Ei e3 e4==(^1 + lG2-G4| + |G4-G8| + |i? —and 4|·

l + |G1-G3| + |G5-G1| + |i?1-j?| + 1 + |G2—G4| + |G6—G抑2—及 | + 1+lGi G9-G4 1 G\Q—G2 ^ 2 十 2 J Gil -G 1 gu_g3、 2 十 2 J G2 ~G\3 丄 G4-Gi4) 2 十 2 J G「G16 1 2 十 2 J (12-1) (12-2)(12-3)(12-4) 、工色像素在影像中之位置(〜々)屬於平滑集合A中日夺,則紅色像素上的 綠色像素由式(13)計算求得:l + |G1-G3| + |G5-G1| + |i?1-j?| + 1 + |G2—G4| + |G6—G=2—and | + 1+lGi G9-G4 1 G\ Q—G2 ^ 2 十 2 J Gil -G 1 gu_g3, 2 12 2 J G2 ~G\3 丄G4-Gi4) 2 X 2 JG "G16 1 2 十 2 J (12-1) (12-2) ( 12-3) (12-4), the position of the work color pixel in the image (~々) belongs to the smooth set A, and the green pixel on the red pixel is calculated by the formula (13):

G Σ^Α /=1 (13) ^265726 右、、工色像素在影像中之位置(X/^)屬於水平集合%中日寺,則紅色像素上的 綠色像素由式(14)計算求得: (14) 若、、工色像素在影像中之位置心力)屬於垂直集合A中時,則紅色像素上的 綠色像素根據式(15)計算求得: (15) 接著分別對複數個藍色像素計算其周圍四個綠色像素之色彩調整值及個別 所對應的權重值,分別由式(16)計算: -尽)/2,,· = 1〜4............... (16) 其中(¾值為紅色像素周圍綠色像素之色彩調整值,%值為色彩調整值個別 所對應的權重值’ Α值為紅色像素周圍綠色像素之邊緣指標,請參閱第六圖 所不為本發明在藍色像素位置上求遺失綠色色彩元素之圖示,邊緣指標&amp;由 式(17-1)至(17-4)計算: 1 + |Gj - G3| + ^5-^1 +~ B\ + G9 -g4 1 G10 - 2 十 2 J Gu^G\ (17-1) β3 i+|g2-σ4|+|σ6-σ2|+|52—5| + i+|g1-g3|+|g3-g7|+|5^53|h l + |G2 - G4| + |G4 -σ8| + |5 — 54|.G Σ^Α /=1 (13) ^265726 Right, the position of the work color pixel in the image (X/^) belongs to the horizontal set % Zhongri Temple, then the green pixel on the red pixel is calculated by the formula (14) Obtain: (14) If the position of the work pixel in the image is in the vertical set A, the green pixel on the red pixel is calculated according to the formula (15): (15) Then the plurality of blues respectively The color pixel calculates the color adjustment value of the four green pixels around it and the corresponding weight value, which are respectively calculated by the formula (16): -2), ·· = 1~4......... (16) where (3⁄4 is the color adjustment value of the green pixel around the red pixel, the % value is the weight value corresponding to the color adjustment value individually) Α is the edge indicator of the green pixel around the red pixel, please Referring to the sixth figure, the figure of the missing green color element is not found in the blue pixel position, and the edge index &amp; is calculated by the formulas (17-1) to (17-4): 1 + |Gj - G3| + ^5-^1 +~ B\ + G9 -g4 1 G10 - 2 12 2 J Gu^G\ (17-1) β3 i+|g2-σ4|+|σ6-σ2|+|52—5| + i+|g1-g3|+|g3-g7|+|5^53|hl + |G2 - G4| + |G4 - Σ8| + |5 — 54|.

2 Gu 2 2 1 G12叫 十 2 J 1 - G14、 十 2 J 1 G3 - G15、 十 2 J ... (17-2) (17-3) (17-4) 最後再以式(13)至式(15)求得所有藍色像素上所遺失的綠色色彩元素 12 1265726 重建紅色色彩元素,用雙線性__ilinear inten)Qlat㈣初步 重建所有遺失的紅色色彩元素,再將初步重建㈣紅色色彩元素平面與已 重建出的綠色色彩元素平面相減,求得一個兩者之間的色差平面&amp; );在所有遺失紅色色像素位置上根據式(18)計算求得遺 失紅色色彩元素: R 一 灸 gl + ea2 袅 g2 + 灸 g3 + eajg4........ βα\ + ea2 + ea3 + ea4 ( 1 8 )2 Gu 2 2 1 G12 is called 10 2 J 1 - G14, 10 2 J 1 G3 - G15, 10 2 J ... (17-2) (17-3) (17-4) Finally, by equation (13) To (15) find the green color element lost on all blue pixels 12 1265726 Reconstruct the red color element, use bilinear __ilinear inten) Qlat (4) to initially reconstruct all the missing red color elements, and then the initial reconstruction (four) red color The element plane is subtracted from the reconstructed green color element plane, and a color difference plane &amp; between the two is obtained; the missing red color element is calculated according to formula (18) at all missing red color pixel positions: R A moxibustion gl + ea2 袅g2 + moxibustion g3 + eajg4........ βα\ + ea2 + ea3 + ea4 ( 1 8 )

其中心,/ = 1〜4,為紅色色差調整值,〜,,· = 1〜4,為色差邊緣指標,請參 閱第七圖為本發明在藍色像素位置上求遺失紅色色彩元素之圖示。 接著,利用已重建_色色彩元素及已重建的藍色像素位置上之紅色 色彩元素,根據下列計算式重建所有在綠色像素位置上遺失紅色色彩元素: 若綠色像素在影像中之位置(Wc)屬於平滑集合Α中時,則綠色像素上遺 失的紅色像素由式(19)計算求得: Α Λ R。= ^1^1' + euRg2 + eb3kg3 + eb4Rg4............. eb\ + eb2 + eb3 + ( 1 9 ) •若綠色像素在影像中之位置(Wg)屬於水平集合%中時,則綠色像素上遺 失的紅色像素由式(2〇)計算求得·· • g W ....................................... (20) 若綠色像素在影像中之位置(Wg&gt;屬於垂直集合Ω中時,則綠色像素上遺 失的紅色像素由式(21)計算求得: R Ά..... g ebi+eb3 .................................. (21) 13 1265726 請參閱第八圖為本發明在綠色像素位置上求遺失紅色色彩元素之圖示。計 算式(18)至(21)中,其紅色色差調整值之,/ = 1〜4,由式(22-1)至(22-4) 求得. 4=4 + ^g2 = Rgl + = Rg3 + 2 RgrRg2 2 Rgl~Rg2 2 Rg2 - Rg4 ϋ.......................................(22-1) ....................................(22-2) ....................................(22-3) 2 ....................................(22-4) 根據第七圖所示,色差邊緣指標/ = 1〜4,由式(23-1)至(23-4)求得 1+ 二以 +]^τ-旲·. -π ..................... (23-1) 1 + 1 + 1 + 2V2 一gl …g3 2λ/2 y Rg4~Rg2 ^4-2^2+^6 丫1 2V2 2V2 / Rgl~Rg3 Rg\-2Rg^Rgl v-1 2λ/2 2V2 / / Rg4 - Rg2 ,Rg^-2Rg^Rg2 yi (23-2) (23-3) (23-4) 2V2 2V2 ea2 ea3 ea4 又根據第八圖所示,色差邊緣指標〜,/ = 1〜4,由式(24-1)至(24-4)求 得: ^bl ^b3 / 1 j_ Rg3-Rgl 丄卞 V 2 / 1 + V Rg2 ~Rg4 2 ( 1 + V Rg3~Rgl 2 U1L'+R Rg6-2Rg2+Rg Rgl-2Rg^Rg (24-1) (24-2) (24-3) 14 1265726 (24-4) 最後’以紅色像素的色差平面&amp;加上已重建之綠色色彩元素平面g (i? = G + i?g)求得所有遺失的紅色色彩元素。 重建藍色色彩元素,㈣線性内插法(bilinear interpolation)初步 重建所有遺失的紅色色彩元素,再將初步重建出的紅色色彩元素平面與已 重建出的綠色色彩元素平面相減,求得—個兩者之_色差平面巧Its center, / = 1~4, is the red color difference adjustment value, ~,, · = 1~4, is the color difference edge index, please refer to the seventh figure for the invention to find the missing red color element in the blue pixel position Show. Then, using the reconstructed_color color element and the red color element on the reconstructed blue pixel position, all red color elements are lost in the green pixel position according to the following calculation formula: If the green pixel is in the image (Wc) When it belongs to the smooth set Α, the red pixel lost on the green pixel is calculated by the formula (19): Α Λ R. = ^1^1' + euRg2 + eb3kg3 + eb4Rg4............. eb\ + eb2 + eb3 + ( 1 9 ) • If the position of the green pixel in the image (Wg) is horizontal When the % is in the collection, the red pixel missing on the green pixel is calculated by the formula (2〇)··· g W ....................... ................ (20) If the position of the green pixel in the image (Wg&gt; belongs to the vertical set Ω, the red pixel lost on the green pixel is represented by the equation (21) Calculated: R Ά..... g ebi+eb3 .................................. 21) 13 1265726 Please refer to the eighth figure for the invention to find the missing red color element at the green pixel position. In the calculation formulas (18) to (21), the red color difference adjustment value, / = 1~4, It is obtained by the formulas (22-1) to (22-4). 4=4 + ^g2 = Rgl + = Rg3 + 2 RgrRg2 2 Rgl~Rg2 2 Rg2 - Rg4 ϋ........... ............................(22-1) ................. ...................(22-2) .......................... ..........(22-3) 2 .................................. ..(22-4) According to the seventh figure, the chromatic aberration edge index / = 1~4 is obtained by equations (23-1) to (23-4) 1+ two to +]^τ-旲·. -π ..................... (23-1) 1 + 1 + 1 + 2V2 a gl ... G3 2λ/2 y Rg4~Rg2 ^4-2^2+^6 丫1 2V2 2V2 / Rgl~Rg3 Rg\-2Rg^Rgl v-1 2λ/2 2V2 / / Rg4 - Rg2 , Rg^-2Rg^Rg2 Yi (23-2) (23-3) (23-4) 2V2 2V2 ea2 ea3 ea4 According to the eighth figure, the chromatic aberration edge index ~, / = 1~4, from equation (24-1) to (24 -4) Find: ^bl ^b3 / 1 j_ Rg3-Rgl 丄卞V 2 / 1 + V Rg2 ~Rg4 2 ( 1 + V Rg3~Rgl 2 U1L'+R Rg6-2Rg2+Rg Rgl-2Rg^Rg (24-1) (24-2) (24-3) 14 1265726 (24-4) Finally 'color difference plane with red pixels &amp; plus reconstructed green color element plane g (i? = G + i? g) Find all missing red color elements. Reconstruct blue color elements, (4) linearly interpolate all the missing red color elements, and then subtract the newly reconstructed red color element plane from the reconstructed green color element plane to find one _ chromatic aberration plane

f 1 + Rg2—^ Rg2-2Rg4+R妓 λ V 2 丁 2 / ('=5-G),在所有遺失藍色的紅色像素位置上根據式(奶)計算求得遺 失藍色色彩元素:f 1 + Rg2—^ Rg2-2Rg4+R妓 λ V 2 D 2 / ('=5-G), the missing blue color element is calculated according to the formula (milk) at all reddish blue pixel positions:

Bg = Ά +毛2 ++ g&quot;尤....... ea\ + ea2 + ea3 + e〇4 ··· (25) 其中九&quot;· = 1〜4,為藍色色差調整值,U = i〜4,為色差邊緣指標,請參 閱第九圖為本發明在紅色像素位置上求遺失藍色色彩元素之圖示。 接著,利用已重建的綠色色彩元素及已重建的紅色像素位置上之藍色 色彩元素,根據下列計算式重建所有在綠色像素位置上遺失藍色色彩元素: 若綠色像素在影像中之錄(^G)屬於平㈣,麟色像素上遺 失的藍色像素由式(26)計算求得:Bg = Ά + 毛 2 ++ g&quot; Especially....... ea\ + ea2 + ea3 + e〇4 ··· (25) where nine &quot;· = 1~4, is the blue color difference adjustment value , U = i ~ 4, is the color difference edge indicator, please refer to the ninth figure for the invention to find the missing blue color element in the red pixel position. Then, using the reconstructed green color element and the blue color element on the reconstructed red pixel position, all blue color elements lost at the green pixel position are reconstructed according to the following formula: If the green pixel is recorded in the image (^ G) belongs to the flat (four), and the blue pixel lost on the lining pixel is calculated by the formula (26):

Bg = +。2纪2 + 〜3毛3 + 〜A4 eb\ + eb2 eb3 eb4 ( 26 ) 若綠色像素在影像中之位置(〜,以於水平集叫中時,麟色像素上遺 失的藍色像素由式(27)計算求得:Bg = +. 2 纪 2 + 〜 3 毛 3 + ~ A4 eb\ + eb2 eb3 eb4 ( 26 ) If the green pixel is in the position of the image (~, in the horizontal set called, the missing blue pixel on the color pixel is (27) Calculate and obtain:

Bg = ^M2+eb4Bg4..................... g ^2+^4 ......................... (27) 15 1265726 若綠色像素在影像中之位置(Χσ,A)屬於垂直集合Ων中時,則綠色像素上遺 失的藍色像素由式(28)計算求得: (28) β _eb\^g\ +eb3^g3 eb\ + eb3 請參閱第十圖為在綠色像素位置上求遺失藍色色彩元素之圖示。計算式 (25)至(28)中,其藍色色差調整值之,/ = 1〜4,由式(29-1)至(29-4) 求得: = 5gi + K2 = Bg2 + =Bg3 + =5g4 + 2 Bg4 ~ Bgl 2 Bgi ~ Bg^ 2 Bg2 - Bg4Bg = ^M2+eb4Bg4........................ g ^2+^4 ................. ........ (27) 15 1265726 If the position of the green pixel in the image (Χσ, A) belongs to the vertical set Ων, then the missing blue pixel on the green pixel is calculated by equation (28). : (28) β _eb\^g\ +eb3^g3 eb\ + eb3 See Figure 10 for an illustration of the missing blue color element at the green pixel location. In the calculation formulas (25) to (28), the blue color difference adjustment value, / = 1 to 4, is obtained by the equations (29-1) to (29-4): = 5gi + K2 = Bg2 + = Bg3 + =5g4 + 2 Bg4 ~ Bgl 2 Bgi ~ Bg^ 2 Bg2 - Bg4

Bg3_Bgl....................................... (29-1) ....................................(29-2) ....................................(29-3) 2 ....................................(29-4) 根據第九圖,色差邊緣指標〜,/ = 1〜4,由式(30-1)至(30-4)求得 ea2 〜4 / 1 + V Ug3 _L 2V2 卞 2λ/2 J / 1 _L Ug2 _L Bg^2Bg2+Bg6 1卞 V 2V2 卞 2λ/2 / / 1 + V Bgl~Bg3 Bgi~2Bg^+Bgi ' 2λ/2 卞 2V2 J / 1 + V B8^~Bg2 ._L Bg「2Bg4+Bg2 2λ/2 卞 2λ/2 ...................(30—1) (30-2) (30-3) (30-4) 根據第十圖’色差邊緣指標〜,/ = 1〜4 ’由式(31_1)至(31_4)求得: eb\ 12 / 1 j_ j. 〜_2Bgl+Bg5、 -1 2 卞 2 } V J / 1 + Bg2-Bg4 ._L Bg6~2Bg2 +Bg4 1 1 \ 2 r 2 / ................(31-1) (31-2) 16 1265726Bg3_Bgl....................................... (29-1) ..... ...............................(29-2) .............. ......................(29-3) 2 ...................... ..............(29-4) According to the ninth figure, the color difference edge index ~, / = 1~4, is obtained by the equations (30-1) to (30-4). Ea2 ~4 / 1 + V Ug3 _L 2V2 卞2λ/2 J / 1 _L Ug2 _L Bg^2Bg2+Bg6 1卞V 2V2 卞2λ/2 / / 1 + V Bgl~Bg3 Bgi~2Bg^+Bgi ' 2λ/ 2 卞2V2 J / 1 + V B8^~Bg2 ._L Bg"2Bg4+Bg2 2λ/2 卞2λ/2 ...................(30-1) (30-2) (30-3) (30-4) According to the tenth figure, the color difference edge index ~, / = 1~4 ' is obtained from the equations (31_1) to (31_4): eb\ 12 / 1 j_ j ~_2Bgl+Bg5, -1 2 卞2 } VJ / 1 + Bg2-Bg4 ._L Bg6~2Bg2 +Bg4 1 1 \ 2 r 2 / ................( 31-1) (31-2) 16 1265726

β1&gt;3^ U &quot;m- 1 + 4. Bgl ^2Bg3 -^Bsl ) 2 卞 2 J Bgl -2Bg4 +^8、 2 卞 2 J (31-3) (31-4) 像素的色差平M加上已重建之綠色色彩元素平 ^G + &amp;)轉所有遺失賴色色彩元素。 /驟S5對目兩的綠色色彩元素平面做色彩修正 田 色彩元素平面;5該a 用目洳求得的紅色 ”面及▲色色彩元素平面對 正;依據式(32)求得綠色色彩 〜色色如素平面做色彩修 色彩元素平面之_色差平面:' I顺紅色色彩元素平面及藍色 (32)11&gt;3^ U &quot;m- 1 + 4. Bgl ^2Bg3 -^Bsl ) 2 卞2 J Bgl -2Bg4 +^8, 2 卞2 J (31-3) (31-4) Pixel color difference flat M Plus the reconstructed green color element flat ^G + &amp;) turns all the missing color elements. /Step S5 to color the green color element plane of the two color field color element plane; 5 the a red "face" and ▲ color color element plane alignment obtained by the eye; according to the formula (32) to obtain the green color ~ Color color as a plain plane to do color repair color element plane _ color difference plane: 'I shun red color element plane and blue (32)

Gr-G-R, Gb^〇^B............... ·········· 再依據式(33)求得新的&amp;色差平面·Gr-G-R, Gb^〇^B............... ··························································

Gr =Y^WJGrj ^ Μ ck .··· (33) 其中w = 1〜8 ’為色差邊緣指標並請表閱第 差平面之圖示,色差邊緣指標可— 叫 ,H、—,Λ(3Μ)至(㈣求得: 十一圖 為本發明求得新的6色 ecl = 1 + ec3 = 1 + 2Gd 2λ/2 Gr3-G,7 ec4 = 1 +Gr =Y^WJGrj ^ Μ ck .··· (33) where w = 1~8 ' is the color difference edge indicator and please look at the icon of the difference plane, the color difference edge indicator can be called, H, -, Λ ( 3Μ) to (4): 11 is the new 6-color ecl = 1 + ec3 = 1 + 2Gd 2λ/2 Gr3-G, 7 ec4 = 1 +

2 Gri ~GrA 2λ/22 Gri ~GrA 2λ/2

Gr-G r9 2 V2 (34-1) (34-2) (34-3) (34~~4 ) 17 1265726 ecl ^c8Gr-G r9 2 V2 (34-1) (34-2) (34-3) (34~~4) 17 1265726 ecl ^c8

1 + 1 + 1 + Gr5-GH 1 GrU ~Gr r........................ 2 十 2 j Ur6 I Gr ~ GrU yi 2V2 十 J Gr3 ~Grl 1 Gr - Gr\5 2 十 2 / Gr8 - Gm 1 Grl6-Gr 2V2 十 J (34-5) (34-6) (34-7) (34-8) 再依據式(35)求得新的(¾色差平面1 + 1 + 1 + Gr5-GH 1 GrU ~Gr r........................ 2 10 2 j Ur6 I Gr ~ GrU yi 2V2 Ten J Gr3 ~Grl 1 Gr - Gr\5 2 X 2 / Gr8 - Gm 1 Grl6-Gr 2V2 Ten J (34-5) (34-6) (34-7) (34-8) Then according to formula (35) Find a new (3⁄4 color difference plane

Gb = twjGbj, 7=1 (35) k=\ 其中〜,y = i〜8,為色差邊緣指標,並請參閱第十二圖為本發明求得新的(¾ 色差平面之圖示,色差邊緣指標可由式(36-1)至(36-8)求得:Gb = twjGbj, 7=1 (35) k=\ where ~, y = i~8, is the color difference edge index, and see the twelfth figure for the new invention (3⁄4 color difference plane, color difference) The edge index can be obtained from equations (36-1) to (36-8):

f 1 + V GbS - Gbl _L 2 十 2 J / 1 . 〇b2 - Gb6 _L Gbw -Gb 1卞 V 2V2 十 V2 J (36-1) (36-2) ec2f 1 + V GbS - Gbl _L 2 X 2 J / 1 . 〇b2 - Gb6 _L Gbw -Gb 1卞 V 2V2 Ten V2 J (36-1) (36-2) ec2

(36-3) (36-4) ec5 f 1 _L Gb5_Gbl 4. GbU-Gb 丄f V 2 卞 2 (36-5) ^c6 ec7 / 1 + V Gb2_Gb6 1 Gb—GbU -1 2λ/2 十 / 1 . Gb?)-Gyj + Gb~Gbls V 丄十 V 2 2 J (36-6) (36-7) 18 1265726 ec8(36-3) (36-4) ec5 f 1 _L Gb5_Gbl 4. GbU-Gb 丄f V 2 卞2 (36-5) ^c6 ec7 / 1 + V Gb2_Gb6 1 Gb—GbU -1 2λ/2 Ten / 1 . Gb?)-Gyj + Gb~Gbls V 丄10 V 2 2 J (36-6) (36-7) 18 1265726 ec8

Tb8 2V2 I , \GtTb8 2V2 I , \Gt

I V2 ]J ........................ (36-8) 再依據式(37)求得色彩修正後的綠色色彩元素平面: Q_(GrJ^lt(Pb±B) 92 ................................... (37) 正 色色彩元素平面之間的色差平 步驟S6對目則的紅色色槪素平面及藍色色彩元素平面分別做色彩修 ,利用步驟S5所得的色雜錢之聽色彩元素平面對目前離色色彩 =平面及藍色色彩元素平面分舰色彩修正;依據式(38)求得紅色色 彩元素平面及藍色色彩元素平面分別與綠 面: -R-G,I V2 ]J ........................ (36-8) Then find the green color element plane after color correction according to formula (37): Q_(GrJ^lt(Pb±B) 92 ................................... (37) Positive color The color difference between the planes of the color elements is flattened in step S6, and the color of the red color element plane and the blue color element plane of the objective color are respectively repaired, and the color element plane of the color miscellaneous money obtained in step S5 is used to face the current color separation color=plane. And the blue color element plane is divided into ship color correction; according to formula (38), the red color element plane and the blue color element plane are respectively determined with the green plane: -RG,

G (38) 再依據式(39) 其中G係經步驟S5所得之色彩修正後的綠色色彩元素平面。 求得新的\色差平面: 8 7=1 k=\ W, (39) 其中 &quot;c2 c3 &quot;c4 ec\ = 1 + 1 + 1 + -4» n \-1 2 丁 2 J RP-Rg6 + Rgw-Rg、 -1 2λ/2 S ] -^g7 + RgU-Rg \-i 2 2 / 及d -L Rg &quot; Rgn 2V2 丁 / (40-2) (40-3) (40-4) (40-1) 19 1265726 ecl ec% 1 + 1 + 1 + Rg5~Rgl 1 Rgl3-Rg 2 Rg2-Rg6 十 1 2 Rg ~Rgu / y1 2λ/2 十 . / -Rgl l Rg ~Rgl5 v-l 2 Rg「Rg4 十 1 2 ‘-V / -1 2V2 十_ (40-7) (40-8) (40-5) (40-6) 再依據式(41)求得新的β色差平面: (41) k=\ 其中&amp;,;· = 1〜8,為色差邊緣指標,請參閱第十四圖為本發明求得新的色 差平面之圖示,色差邊緣指標可由式(42-1)至(42-8)求得: ^cl ec2 ec5 ec6 ecl 1 + V / 1 v f 1 V ί 1 + 1 + 1 + 1 + 1 + Bg5 - Bgl 1 y1 2 十 2 Bg2~Bg6 1 V ~\ 2λ/2 十- Bg3 ~ Bgl 1 Bgn~Bg 2 十 2 / BgS - BgA 1 Bg~Bgn \-i 2V2 十 / Bg5~Bgl 1 〜-V -1 2 十 2 ; Bg2~Bg6 I Bg~BgU yi 2V2 十 42 ) Bg^Bgi 1 Bg -5gl5 \-! 2 十 2 / (42-2) (42-5) (42-1) (42-3) (42-4) (42-6) (42-7) 20 1265726 ec8 ( 1 + Bg^ ~~ Bg4 4- 5gl6 - 义 V ~1^2~ 卞 ~ΊΤ~ (42-8) 再依據式(43)求得色彩修正後的紅色色槪素平面及藍色色彩元素平面 (43) 及= G + B = G + B ....................... 步驟S7重複執行步驟S5及S6 __至三次,最後制—色紐正後之數 位影像。 請參閱第十五圖為本發明步驟S1至S4的處理流程及處理結果圖,第 十六圖為本發明麵S5至S7的處理流程及處理結果圖。本發明利用上述 提出的異次投影技術及硬性決定齡m蚊出最佳_插方向,可降低因 内插方向錯誤所造成數位影像的色彩失真及㈣紋理失真,並可重建透過 色彩據光片_後之數《彡像所遺失的色彩元素,使數位影像的色彩重建 效果能更為逼真。 請參閱第十七圖(A)至⑻為本發明與其它方法之一種實驗結果比 較顯示圖,第十七® (A)係為原始影像,第十七圖⑻係為以g她戌 所挺出之方法的重建結果,其彳§號雜訊比(p测)值為從爪娜;第十七 圖(c)係為以Lu所提出之方法的重建結果,其信號雜訊比(psNR)值為 32. 2664dB ’第十七圖⑻係為以本發鴨提出之方法的重建結果,其信 號雜訊比⑽R)值為34. 9164dB ;另外,請參閱第十八圖(A)至(D)為 本發明與其它方法之另—種實驗絲崎顯_,第仏圖⑴係為原始 影像’第十人K (B)縣以Gunturk所提出之方法(2_的重建結果其 信號雜訊比⑽R)值為31. 96腦,第十八圖(〇係為以Lu所提出之方 法的重建結果,其信號雜訊比(PSNR)值為32.292_,第十人圖係 21 1265726 為以本發明所提出之方法的重建 木具^唬雜訊比(PSNR)值為 35.5103dB。 . 社所述係藉由實施例說明本發明之特點,其目的在使熟習該技術者 '能暸解本發明之内容並據以實施’而非限料發明之專利綱,故,凡直 .他未脫離本發明所揭示之精神所完成之等效修飾或修改,仍應包含在以下 所述之申請專利範圍中。 φ 【圖式簡單說明】 第一圖為本發明之方法流程圖。 第二圖所示為貝爾(Bayer)模式色織光片陣列。 第三圖為水平異次映射圖u的—元執在水平方向上進行適應性滤 - 波處理之圖示。 ,第四圖為垂直異次映射圖U的-元素巧在垂直方向上進行適應性遽 波處理之圖示。 Φ 第五圖為本發明在紅色像素位置上求遺失綠色色彩元素之圖示。 第六圖為本發明在藍色像素位置上求遺失綠色色彩元素之圖示。 ‘第七圖為本發明在藍色像素位置上求遺失紅色色彩元素之圖示。 第八圖為本發明在綠色像素位置上求遺失紅色色彩元素之圖示。 第九圖為本發明在紅色像素位置上求遺失藍色色彩元素之圖示。 第十圖為本發明在綠色像素位置上求遺失藍色色彩元素之圖示。 第十一圖為本發明求得新的G色差平面之圖示。 第十二圖為本發明求得新的%色差平面之圖示。 22 1265726 第十三圖為本發明求得新的&amp;色差平面之圖示。 第十四圖為本發明求得新的&amp;色差平面之圖示。 第十五圖為本發明步驟S1至S4的處理流程及處理結果圖。 第十六圖為本發明步驟S5至S7的處理流程及處理結果圖。 第十七圖(A)至(D)為本發明與其它方法之一種實驗結果比較顯示圖。 第十八圖(A)至(D)為本發明與其它方法之另一種實驗結果比較顯示圖。G (38) Further according to formula (39) wherein G is the color corrected green color element plane obtained in step S5. Find a new \ color difference plane: 8 7=1 k=\ W, (39) where &quot;c2 c3 &quot;c4 ec\ = 1 + 1 + 1 + -4» n \-1 2 D 2 J RP- Rg6 + Rgw-Rg, -1 2λ/2 S ] -^g7 + RgU-Rg \-i 2 2 / and d -L Rg &quot; Rgn 2V2 butyl / (40-2) (40-3) (40- 4) (40-1) 19 1265726 ecl ec% 1 + 1 + 1 + Rg5~Rgl 1 Rgl3-Rg 2 Rg2-Rg6 Ten 1 2 Rg ~Rgu / y1 2λ/2 X. / -Rgl l Rg ~Rgl5 vl 2 Rg "Rg4 十一 1 2 '-V / -1 2V2 _ (40-7) (40-8) (40-5) (40-6) Then find the new β color difference plane according to formula (41): (41) k=\ where &amp;,;· = 1~8, which is the color difference edge index, please refer to the fourteenth figure for the invention to find a new color difference plane. The color difference edge index can be expressed by the formula (42-1). ) to (42-8): ^cl ec2 ec5 ec6 ecl 1 + V / 1 vf 1 V ί 1 + 1 + 1 + 1 + 1 + Bg5 - Bgl 1 y1 2 10 2 Bg2~Bg6 1 V ~\ 2λ/2 十- Bg3 ~ Bgl 1 Bgn~Bg 2 十 2 / BgS - BgA 1 Bg~Bgn \-i 2V2 十 / Bg5~Bgl 1 ~-V -1 2 Twenty-two; Bg2~Bg6 I Bg~BgU yi 2V2 十42) Bg^Bgi 1 Bg -5gl5 \-! 2 10 2 / (42-2) (42-5) (42-1) (42-3) (42-4) ( 42-6) (42-7) 20 1265726 ec8 ( 1 + Bg^ ~~ Bg4 4- 5gl6 - 义 V ~1^2~ 卞~ΊΤ~ (42-8) Then find the color correction according to formula (43) After the red color pixel plane and blue color element plane (43) and = G + B = G + B ....................... Step S7 Repeat steps S5 and S6 __ to three times, and finally make a digital image after the color is positive. Please refer to the fifteenth figure for the processing flow and the processing result of the steps S1 to S4 of the present invention. The sixteenth embodiment is the processing flow and the processing result of the surfaces S5 to S7 of the present invention. The invention utilizes the above-mentioned different sub-projection technology and the hardest determining age m mosquito to produce the best _ insertion direction, can reduce the color distortion of the digital image caused by the error of the interpolation direction and (4) texture distortion, and can reconstruct the transmitted color data film _After the number of color elements lost by the image, the color reconstruction effect of the digital image can be more realistic. Please refer to Figure 17 (A) to (8) for a comparison of the experimental results of the present invention with other methods. The seventeenth (A) is the original image, and the seventeenth (8) is the The reconstruction result of the method is as follows: the § § noise ratio (p measured) is from the claws; the seventeenth (c) is the reconstruction result of the method proposed by Lu, and its signal noise ratio (psNR) The value of 32. 2664 dB 'The seventeenth figure (8) is the reconstruction result of the method proposed by the present duck, and the signal noise ratio (10)R) is 34.164 dB; in addition, please refer to Fig. 18 (A) to (D) is another experiment of the invention and other methods, and the first figure (1) is the original image 'the tenth person K (B) County proposed by Gunturk (the reconstruction result of 2_ its signal) The noise ratio (10)R) is 31. 96 brain, the eighteenth figure (the 〇 is the reconstruction result of the method proposed by Lu, the signal-to-noise ratio (PSNR) value is 32.292_, the tenth person figure 21 1265726 The reconstructed wood has a noise-to-noise ratio (PSNR) value of 35.5103 dB for the method proposed by the present invention. The description of the present invention is made by way of examples. The equivalent modifications or modifications made by those skilled in the art can be made without departing from the spirit of the invention as disclosed in the appended claims. It should still be included in the scope of the patent application described below. φ [Simplified description of the drawings] The first figure is a flow chart of the method of the present invention. The second figure shows a Bayer mode color ray film array. The figure shows the adaptive filtering-wave processing in the horizontal direction of the horizontally-ordered map u. The fourth figure shows the adaptation of the elements of the vertical different-order map U in the vertical direction. The illustration of the wave processing Φ The fifth figure is an illustration of the invention for missing green color elements at the red pixel position. The sixth figure is an illustration of the invention for missing green color elements at the blue pixel position. Figure 7 is a diagram showing the missing red color elements in the blue pixel position of the present invention. The eighth figure is an illustration of the red color element missing in the green pixel position of the present invention. The ninth figure is the red pixel position of the present invention. Seeking to lose blue The illustration of the color element is shown in Fig. 11. The figure is the illustration of the missing blue color element in the green pixel position of the present invention. The eleventh figure is a diagram of the new G color difference plane obtained by the present invention. An illustration of a new % chromatic aberration plane is obtained for the present invention. 22 1265726 The thirteenth diagram is a representation of a new &amp; chromatic aberration plane for the present invention. Figure 14 is a new &amp; chromatic aberration plane for the present invention. The fifteenth figure is a process flow and a process result of the steps S1 to S4 of the present invention. The sixteenth figure is a process flow and a process result of the steps S5 to S7 of the present invention. (D) is a comparative diagram showing an experimental result of the present invention and other methods. Fig. 18 (A) to (D) are comparison diagrams showing another experimental result of the present invention and other methods.

【主要元件符號說明】 無[Main component symbol description] None

23twenty three

Claims (1)

1265726 十、申請專利範圍: L 一種異次投影硬性決定色彩内插法,包括下列步驟: ⑷進行鱗娜並剌數位影像,_缝位影像絲數個像素 • 所組成’該等像素包括:數個紅色像素、數個藍色像素、以及數個綠色像 ’素; (b) 利用異^方法’分別對該原始數位影像進行水平方向投影及垂直 方向投影,求得水平異次映射圖(H〇riz〇ntal Heter〇geneity 及垂直 異久映射圖(Vertlcal Hetero敗neity Map),再利用影像復原(Image Restoration)方式求得最佳水平異次映射圖及最佳垂直異次映射圖; (c) 利用該最佳水平異次映射圖及該最佳垂直異次映射圖,以硬性決定 (Har(H)ecisi〇n)規則分離出水平集合、垂直集合及平滑集合; (d) 重建所有遺失的色彩元素,係在該水平集合中進行水平方向内插,在 , 該垂直集合中進行垂直方向内插,在該平滑集合中進行平均内插; (e) 利用該等像素上紅色色彩元素之第一色差平面及藍色色彩元素之第一 # 色差平崎該等像素上綠色色彩元素之第—色差平面做色彩修正,並得到 綠色色彩元素之第二色差平面; (f) 利用該等像素上綠色色彩元素之第二色差平面對該等像素上紅色色彩 •元素之第一色差平面及藍色色彩元素之第一色差平面分別做色彩修正,得 到、’工色色彩元素之第二色差平面及藍色色彩元素之第二色差平面;以及 (S)重複執行步驟(e)及⑴數次,最後得到一色彩校正後之數位影像。 2·如申請專利範圍第丨項所述之一種異次投影硬性決定色彩内插法,其中, 在步驟(a)中是以單一個電荷耦合元件搭配貝爾模式(Bayer pattern)彩 24 1265726 色濾光片陣列進行影像擷取並得到一貝爾模式之數位影像。 3.如申请專利範圍第1項所述之一種異次投景多硬性決定色彩内插法,其中, .該原始數位影像上的每一個像素只具有單一個色彩元素之灰度值。 ,· 4·如中轉利範圍第1項所述之—種異次投影硬性決定色軸插法,其中, • 在步驟(b)更包括利用影像復原(Image Restoration)方法分別對該水平 異次映射圖及該垂直異次映射圖進行水平方向及垂直方向作滤波處理,進 而求得該最佳水平異次映射圖及該最佳垂直異次映射圖。 5·如巾轉利範圍第1項所述之—種異次投f彡硬性決定色彩嶋法,其中, 該影像復原(Image Restoration)方法係為平均值濾波器(Mean Filter) 法、中間值濾波器(MedianFilter)法、及適應性濾波器(AdaptiveFilter) 法所組成之群組之其中之一者。 6·如申請專利範圍第1項所述之一種異次投影硬性決定色彩内插法,其中, 在步驟(e)巾糊該最佳水平異次映賴、該最健直異次_圖及一縮 放係數(scalar factor),配合該硬性決定規則,在該原始數位影像中分離 ^ 出該水平集合、該垂直集合及該平滑集合。 7·如申請專利範圍第6項所述之一種異次投影硬性決定色彩内插法,其中, 該縮放係數(scalar factor)之值介於〇到1之間。 8·如申請專利範圍第1項所述之—種異次投影硬性決定色軸插法,其中, 在步驟⑷中利用固定式或非固定式影像内插法在該水平集合中進行水平 方向内插’在該垂直集合巾進行垂直方向内插,在該平滑集合巾進行平均 内插。 25 1265726 9.如申請專利細第丨項所述之—種異次投影硬性決定色彩内插法,巧, 在步驟⑷⑽性決糊齡在該梢合中進行水平糊插,在該 垂直集合中進行垂直方向内插,在辭賴合中進行平均内插。 1〇.如申請專利範圍第9項所述之一種異次投影硬性決定色彩内插法,其 中,該硬性決定内插法為先重建出該原始數位影像之像素所遺失的綠色色 彩兀素’再·重建出的綠色色彩元素重建鱗像素所遺失的紅色及藍色 色彩元素。 一 11.如申請專利範圍第10項所述之一種異次投影硬性決定色彩内插法,其 中’重建綠色色彩元素係重建該原始數位影像上紅色像素及藍色像素上所 运失的綠色色彩元素,其係包括下列步驟: .分別對每一該等紅色像素及每-該等藍色像素計算其周圍四個綠色像素之 色彩調整值及所對應的權重值· ,以及 利用該水平集合、該垂直集合及該平滑集合來決定最佳的内插方向。 12·如申請專利範圍第u項所述之一種異次投影硬性決定色彩内插法,其 # 中,該權重值為每-該等紅色像素或每—該等藍色像素周圍數個綠色像素 之邊緣指標計算而得。 13. 如申請專利範圍第12項所述之—種異次投影硬性決定色軸插法,其 中,該邊緣指標值可採用固定值或使用鄰近元素資訊計算求得。 14. 如申請專利範圍第n項所述之一種異次投影硬性決定色彩内插法,其 中’決定最佳的内插方向更包括下列步驟·· 該遺失綠色色彩元素之像素位置屬於平滑集合時,每一該等紅色像素或每 26 1265726 -該等藍色像素上的綠色像素由該色糊整值及其所對應的權重值計算而 得; •該遺失綠色色彩元素之像素位置屬於水平集合時,每一該等紅色像素或每 一該等藍色像素上的綠色像素由水平内插方法求得;以及 4遺失綠色色彩元素之像素位置屬於垂直集合時,每一該等紅色像素或每 ~該等藍色像素上的綠色像素由垂直内插方法求得。 15·如申請專利範圍第1〇項所述之一種異次投影硬性決定色彩内插法,其 中,重建紅色色彩元素包括下列步驟: 以雙線性内插法(bilinear interpolation)初步重建該原始數位影像所有 像素遺失的紅色色彩元素,產生一初步重建的紅色色彩元素平面; 將該初步重建的紅色色彩元素平面與重建出的該綠色色彩元素相減,求得 ~色差平面; 求得所有藍色像素上遺失的紅色色彩元素之色差值; 以求得的藍色像素上之紅色色彩元素,利用水平、垂直及平滑集合來決定 出最佳内插方向,進而求得所有綠色像素上遺失的紅色色彩元素之色差 值;以及 以該色差平面及該綠色色彩元素求得所有像素遺失的紅色色彩元素。 16·如申請專利範圍第10項所述之一種異次投影硬性決定色彩内插法,其 中,重建藍色色彩元素包括下列步驟·· 以雙線性内插法(bilinear interpolation)初步重建該原始數位影像所有 像素遺失的藍色色彩元素,產生一初步重建的藍色色彩元素平面; 27 1265726 將該初步重建的藍色色彩元素平面與重建出的麟色色觀料目減,求得 一色差平面; .求得所有紅色像素上遺失的藍色色彩元素之色差值; • 以求得的紅色像素上之藍色色彩元素,侧水平、垂直及平滑集合來決定 • A最佳内插方向,進而求得所有綠色像素上遺失的藍色色彩元素之色差 值;以及 以該色差平面及麟色色彩元素求得所有像素遺失賴色色彩元素。 一 17·如申料概圍第丨項所述之—種異次投影硬性決定色糊插法,其 中’步驟(e)更包括下列步驟: 求得綠色色彩元素平面與紅色色彩元素平面之間的第_色差平面; •求得綠色色彩元素平面與藍色色彩元素平面之間的第二色差平面;以及 以口亥第&amp;差平面及該第二色差平面求得色彩修正後的綠色色彩元素平 面。 18·如申請專利範圍第!項所述之一種異次投影硬性決定色彩内插法,其 • 巾,步驟⑴更包括下列步驟: 求得該綠色色彩元素平面與該紅色色彩元素平面之間的第—色差平面; '求得麟色色彩元素平面與縫色色彩元素平面之關第二色差平面; 以該第-色差平面及该第二色差平面求得色彩修正後的紅色色彩元素平面 及藍色色彩元素平面。 19·如申响專利範圍第1項所述之一種異次投影硬性決定色彩内插法,其 中,在步驟(g)中重複執行步驟(e)及⑴一至三次。 281265726 X. Patent application scope: L A hetero-projection hard decision color interpolation method, including the following steps: (4) performing a scaled image and a digital image, _ seam image number of pixels • composed of 'these pixels include: number A red pixel, a plurality of blue pixels, and a plurality of green images are used as the prime; (b) the original digital image is projected horizontally and vertically by the different method to obtain a horizontally different map (H) 〇riz〇ntal Heter〇geneity and vertical different map (Vertlcal Hetero defeat neity map), and then use Image Restoration to obtain the best horizontal different map and the best vertical different map; Separating the horizontal set, the vertical set, and the smooth set by the hard decision (Har(H)ecisi〇n) rule by using the optimal horizontal different map and the optimal vertical different map; (d) reconstructing all missing a color element in which horizontal interpolation is performed in the horizontal set, where vertical interpolation is performed in the vertical set, and average interpolation is performed in the smooth set; (e) utilization The first color difference plane of the red color element on the pixel and the first color difference element of the blue color element are the color correction of the first color difference plane of the green color element on the pixels, and the second color difference plane of the green color element is obtained; f) using the second color difference plane of the green color elements on the pixels to perform color correction on the first color difference plane of the red color element and the first color difference plane of the blue color element, respectively, to obtain a 'work color color a second color difference plane of the element and a second color difference plane of the blue color element; and (S) repeating steps (e) and (1) several times, and finally obtaining a color corrected digital image. 2·If the patent application scope is 丨A hetero-projection hardness determining color interpolation method, wherein in step (a), a single charge-coupled element is matched with a Bayer pattern color 24 1265726 color filter array for image capture and Obtaining a digital image of a Bell mode. 3. A multi-shot multi-hardness determining color interpolation method as described in claim 1 of the patent application scope, wherein Each pixel on the digital image has only the gray value of a single color element. ··········································· (b) further comprising filtering the horizontal and vertical directions of the horizontally different map and the vertical different map by using an image restoration method, thereby obtaining the optimal horizontal different map and The optimal vertical sub-map is as follows: 5. As described in item 1 of the towel transfer range, the heterogeneous method determines the color method, wherein the image restoration method is average filtering. One of a group consisting of a Mean Filter method, a Median Filter method, and an Adaptive Filter method. 6) A hetero-projection hard decision color interpolation method according to claim 1, wherein in step (e), the optimal level is different, the most accurate time is - and one A scalar factor, in conjunction with the hard decision rule, separates the horizontal set, the vertical set, and the smoothed set in the original digital image. 7. A hetero-projection hard decision color interpolation method as described in claim 6 wherein the value of the scalar factor is between 〇1 and 1. 8. The heterogeneous projection hardness determining color axis interpolation method as described in claim 1 of the patent application, wherein in the step (4), the fixed or non-fixed image interpolation method is used in the horizontal set in the horizontal direction. The insertion 'in the vertical collection towel is interpolated in the vertical direction, and the smooth collection towel is averaged. 25 1265726 9. The heterogeneous projection hard-determining color interpolation method as described in the application patent detailing, in the step (4) (10), the horizontal paste in the tip combination, in the vertical set Perform vertical interpolation and average interpolation in the resignation. 1〇. A hetero-projection hard decision color interpolation method according to claim 9 of the patent application scope, wherein the hard decision interpolation method is to reconstruct a green color element missing from a pixel of the original digital image first. The reconstructed green color element reconstructs the red and blue color elements lost by the scale pixels. 11. A hetero-projection hard decision color interpolation method according to claim 10, wherein the 'reconstructed green color element reconstructs the green color lost on the red pixel and the blue pixel on the original digital image. The element includes the following steps: calculating, for each of the red pixels and each of the blue pixels, a color adjustment value of the surrounding four green pixels and a corresponding weight value, and using the horizontal set, The vertical set and the smoothed set determine the optimal interpolation direction. 12. A hetero-projection hard decision color interpolation method as described in the scope of claim U, wherein the weight value is - each of the red pixels or each of the plurality of green pixels around the blue pixels The edge indicator is calculated. 13. The heterogeneous projection hardness determining color axis interpolation as described in claim 12, wherein the edge index value can be obtained by using a fixed value or using neighboring element information. 14. A hetero-projection hard decision color interpolation method as described in item n of the patent application, wherein 'determining the optimal interpolation direction further comprises the following steps: · The pixel position of the missing green color element belongs to a smooth set , each of the red pixels or every 26 1265726 - the green pixels on the blue pixels are calculated from the color paste integer value and its corresponding weight value; • the pixel position of the missing green color element belongs to a horizontal set When each of the red pixels or green pixels on each of the blue pixels is obtained by a horizontal interpolation method; and 4 when the pixel positions of the missing green color elements belong to a vertical set, each of the red pixels or each ~ The green pixels on the blue pixels are obtained by the vertical interpolation method. 15. A hetero-projection hard decision color interpolation method as described in claim 1 wherein the reconstructing the red color element comprises the steps of: initially reconstructing the original digit by bilinear interpolation. The red color element lost in all pixels of the image generates a preliminary reconstructed red color element plane; subtracting the initially reconstructed red color element plane from the reconstructed green color element to obtain a ~ color difference plane; obtaining all blue The color difference of the red color element lost on the pixel; the red color element on the obtained blue pixel uses the horizontal, vertical, and smooth sets to determine the optimal interpolation direction, thereby obtaining the missing on all the green pixels. The color difference of the red color element; and the red color element lost by all the pixels by the color difference plane and the green color element. 16. A hetero-projection hard decision color interpolation method as described in claim 10, wherein reconstructing the blue color element comprises the following steps: preliminarily reconstructing the original by bilinear interpolation The blue color element lost in all pixels of the digital image produces a preliminary reconstructed blue color element plane; 27 1265726 The first reconstructed blue color element plane is subtracted from the reconstructed hues, and a color difference plane is obtained. Find the color difference of the blue color elements lost on all red pixels; • Determine the best interpolating direction by the blue horizontal color elements on the red pixels, horizontal, vertical and smooth sets. Further, the color difference values of the blue color elements lost on all the green pixels are obtained; and all the pixel missing color elements are obtained by the color difference plane and the color color elements. 1. The heterogeneous projection hard-determining color paste insertion method as described in the third paragraph of the application, wherein the step (e) further comprises the following steps: obtaining a plane between the green color element plane and the red color element plane a _th color difference plane; • obtaining a second color difference plane between the green color element plane and the blue color element plane; and obtaining a color corrected green color by using the mouth &amp; difference plane and the second color difference plane Element plane. 18·If you apply for a patent scope! A hetero-projection hardness determining color interpolation method, wherein the step (1) further comprises the steps of: obtaining a first color difference plane between the green color element plane and the red color element plane; The second color difference plane of the color of the color of the color of the color of the color of the color of the color of the color of the color of the color of the plane of the color of the color of the plane of the color of the color of the plane of the color of 19. A hetero-projection hard decision color interpolation method as described in claim 1 of the patent scope, wherein steps (e) and (1) are repeated one to three times in step (g). 28
TW94119320A 2005-06-10 2005-06-10 Method for heterogeneity-projection hard-decision TWI265726B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
TW94119320A TWI265726B (en) 2005-06-10 2005-06-10 Method for heterogeneity-projection hard-decision

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW94119320A TWI265726B (en) 2005-06-10 2005-06-10 Method for heterogeneity-projection hard-decision

Publications (2)

Publication Number Publication Date
TWI265726B true TWI265726B (en) 2006-11-01
TW200644613A TW200644613A (en) 2006-12-16

Family

ID=38122293

Family Applications (1)

Application Number Title Priority Date Filing Date
TW94119320A TWI265726B (en) 2005-06-10 2005-06-10 Method for heterogeneity-projection hard-decision

Country Status (1)

Country Link
TW (1) TWI265726B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI459810B (en) 2011-11-22 2014-11-01 Altek Corp Image processing apparatus and processing method thereof

Also Published As

Publication number Publication date
TW200644613A (en) 2006-12-16

Similar Documents

Publication Publication Date Title
JP4352371B2 (en) Digital image processing method implementing adaptive mosaic reduction method
CN106375740B (en) Generate the methods, devices and systems of RGB image
TWI407800B (en) Improved processing of mosaic images
TWI283930B (en) Method and apparatus for processing image data of a color filter array
US6181376B1 (en) Method of determining missing color values for pixels in a color filter array
Monno et al. Adaptive residual interpolation for color image demosaicking
CN108055452A (en) Image processing method, device and equipment
US20080298639A1 (en) Image Processing Apparatus, Image Processing Method, and Electronic Appliance
JP2023025085A (en) Camera image processing method and camera
CN110730336B (en) Demosaicing method and device
TWI249336B (en) Method and apparatus of color filter array demosaicking for digital image acquisition system
US10349040B2 (en) Storing data retrieved from different sensors for generating a 3-D image
CN103347190B (en) Edge-related and color-combined demosaicing and amplifying method
TW201208349A (en) Method and apparatus for converting 2D image into 3D image
Chen et al. Effective demosaicking algorithm based on edge property for color filter arrays
CN108769641B (en) Bayer color reconstruction method of video satellite image
CN108122201A (en) A kind of Bayer interpolation slide fastener effect minimizing technology
CN110517206A (en) Colored moire fringes removing method and device
TWI265726B (en) Method for heterogeneity-projection hard-decision
CN105046631B (en) Image processing equipment and image processing method
CN110580684A (en) image enhancement method based on black-white-color binocular camera
WO2009098619A2 (en) Method and device for reconstructing a color image
TWI493979B (en) Demosaicking method, non-transitory machine-readable storage medium and image signal processor
CN107517367B (en) Baeyer area image interpolation method, device, picture processing chip and storage device
TW201121305A (en) System and method of color interpolation

Legal Events

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