TW201034470A - Color interpolation method and image demosaicking method using the same and computer program production thereof - Google Patents

Color interpolation method and image demosaicking method using the same and computer program production thereof Download PDF

Info

Publication number
TW201034470A
TW201034470A TW98107436A TW98107436A TW201034470A TW 201034470 A TW201034470 A TW 201034470A TW 98107436 A TW98107436 A TW 98107436A TW 98107436 A TW98107436 A TW 98107436A TW 201034470 A TW201034470 A TW 201034470A
Authority
TW
Taiwan
Prior art keywords
intensity value
color
estimated
pixel
pixels
Prior art date
Application number
TW98107436A
Other languages
Chinese (zh)
Other versions
TWI477155B (en
Inventor
Hsien-Chuan Tai
Wen-Tsung Huang
Wen-Jan Chen
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 TW098107436A priority Critical patent/TWI477155B/en
Publication of TW201034470A publication Critical patent/TW201034470A/en
Application granted granted Critical
Publication of TWI477155B publication Critical patent/TWI477155B/en

Links

Landscapes

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

Abstract

Disclosed are a color interpolation method and an image demosaicking method using the same and a computer program production thereof for reconstructing missing color components of the pixels of a pixel array, wherein the pixel array is corresponding to a color filter array and includes a plurality of estimated pixels and a target pixel. The color interpolation method is used to estimate the strength of a target pixel in a 45 DEG diagonal or a 135 DEG diagonal direction. In the image demosaicking method, the color interpolation method is firstly performed to obtain a plurality of candidate estimated strengths of the target pixel. Then, one of the candidate estimated strength is determined to be the estimated strength of the target pixel in accordance with the strengths of the estimated pixels.

Description

201034470 _ 六、明 明: ............ . 【發明所屬之技術領域】 本發明是有關於一種色彩内插方法與應用此色彩内插 方法之影像解馬赛克方法,特別是應用於處理彩色濾先片 所產生之影像的色彩内插方法與應用此色彩内插方法之影 像解馬賽克方法。 > 【先前技術】 近年來,數位相機(Digital Still Cameras; DSCs)成為非 常受歡迎的消費性電子產品。數位相機一般係利用電荷執 合元件(Charge Couple Device; CCD)或互補式金氧半導體 (CMOS)感測器將所感測到之入射光轉化成電氣信號,然後 這些電氣信號經類比/數位的轉換,成為數位影像信號。 請參照第1圖’其係繪示習知之彩色濾光片陣列(col〇r Filter Array; CFA)的結構示意圖。為了節省取樣的色彩像素 及感測器的尺寸,一般最常採用彩色濾光片陣列來作為色 癱彩取樣格式,因此CCD或CMOS感測器上通常會鍍一層 彩色濾光片陣列。一般常使用之彩色濾光片陣列係採用貝 爾(Bryce E. Bayer)所發表之CFA,如第1圖所示,其中fr 係為紅色遽光片、FG係為綠色滤光片以及fb係為藍色漁 光片。當採用CFA時’每一個取樣點只有一個顏色,即全 色系(即紅、綠、藍三色)的三分之一。由於CFA中的每一 濾鏡係對應一像素並僅允許特定色彩成份通過,因此在所 擷取的影像被進一步處理或顯示之前,每一像素所缺乏的 色彩成份便必須先進行重建,以使每一像素包含所有的三 201034470 • 種色彩成份。 - 為了自原始感測資料重建出一完整的彩色影像,通常 係藉由色彩内插法來估測每—像素所缺乏的兩種色彩成 伤。所謂的色彩内插法係依據每一目標像素之周遭一部份 ,素所提供的資訊來進行,亦即,當一 CFA為已知時,則 ,一像素所缺乏的兩種色彩成份便可經由使用相鄰像素所 提供的資訊而加以重建出來。而整體影像之重建即為業界 ^知的解馬賽克操作(demosaicking)。 目如的解碼賽克(demosaicking)技術對於貝爾圖形的 色彩過濾陣列(Bayer CFA)皆只能做到垂直及水平邊方向的 和及重建,然而對於另外兩個也可能存在於電子影像中 的45。和135。邊方向,並無有效的重建方法。 【發明内容】 因此,本發明之一態樣是在提供一種色彩内插方法。 ㈣插方法可沿著目標像素之135。邊方向來進行内 此色彩内插方法係適用於-像素陣列,此像素陣列包 各複數個像素,這些像素包含複數個第一像素和複數個第 二像素,每一第一像素具有對應至一第一顏色之一第一強 度值(GJ,每一第二像素具有對應至一第二顏色之一第二 =度值(A),其中j代表每一像素之橫座標,丨代表每一像 素之縱座標。在此色彩内插方法中,首先對每一第二像素 進行内插步驟,以計算出每-第二像素對應至該第一顏色 之一估測強度值(4)。此色彩内插方法係對每一第二像素 進行-内插步驟,以計算出每1二像素對應至第一顏色 201034470 之一估測強度值⑹。在此内插步驟中,首先,根 素陣列來提供高通遮罩(high pass mask),則貞測第 (目標像素)相對於像素陣列之一邊緣(edge)的位置,^供 ,,果(f>。然後’進行―第—斜向強度值計驟= 強度值(譬其中此第一斜向強度值計 ,驟係根據一公式·· 。接著 斜向強度值計算步驟,以計算出—筮— 弟一 抓強度值計算步驟係根據-公式: 出ιΐτ丨+Γγ °接著,進行_估測參數計算㈣,以計算 式:“匕數⑷)’其中此估測參數計算步驟係根據-公201034470 _ VI. 明明: ............ [Technical Field of the Invention] The present invention relates to a color interpolation method and an image demosaicing method using the color interpolation method, in particular It is a color interpolation method applied to processing an image generated by a color filter and an image demosaicing method using the color interpolation method. > [Prior Art] In recent years, digital still cameras (Digital Still Cameras; DSCs) have become very popular consumer electronics products. Digital cameras typically use a Charge Couple Device (CCD) or a Complementary Metal Oxide Semiconductor (CMOS) sensor to convert the sensed incident light into an electrical signal, which is then analog/digital converted. , become a digital image signal. Please refer to FIG. 1 for a schematic diagram showing the structure of a conventional color filter array (CFA). In order to save the size of the sampled color pixels and sensors, color filter arrays are most commonly used as color sampling formats, so a color filter array is usually plated on a CCD or CMOS sensor. A commonly used color filter array is a CFA published by Bryce E. Bayer, as shown in Fig. 1, wherein fr is a red calender, FG is a green filter, and fb is Blue fishing light film. When using CFA, each sample point has only one color, which is one-third of the full-color system (ie, red, green, and blue). Since each filter in the CFA corresponds to a pixel and only allows a specific color component to pass, the color component lacking in each pixel must be reconstructed before the captured image is further processed or displayed. Each pixel contains all three 201034470 color components. - In order to reconstruct a complete color image from the original sensed data, color interpolation is usually used to estimate the two color defects that are missing from each pixel. The so-called color interpolation method is based on the information provided by a part of each target pixel, that is, when a CFA is known, the two color components lacking in one pixel can be Reconstructed by using information provided by neighboring pixels. The reconstruction of the overall image is the industry's known demosaicking operation. The purpose of decoding the demosaicking technology for Bayer's color filter array (Bayer CFA) can only achieve the vertical and horizontal side of the sum and reconstruction, but for the other two may also exist in the electronic image 45 . And 135. There is no effective reconstruction method in the side direction. SUMMARY OF THE INVENTION Accordingly, one aspect of the present invention is to provide a color interpolation method. (4) The interpolation method can be along 135 of the target pixel. The color interpolation method is applicable to a pixel array, the pixel array includes a plurality of pixels, and the pixels include a plurality of first pixels and a plurality of second pixels, each of the first pixels having a corresponding one a first intensity value of the first color (GJ, each second pixel having a second = degree value (A) corresponding to one of the second colors, where j represents the abscissa of each pixel, and 丨 represents each pixel In the color interpolation method, an interpolation step is first performed on each of the second pixels to calculate an estimated intensity value (4) corresponding to one of the first colors per second pixel. The interpolation method performs an interpolation step for each second pixel to calculate an estimated intensity value (6) corresponding to the first color 201034470 every 1 2 pixels. In this interpolation step, first, the root array is Providing a high pass mask, then measuring the position of the (target pixel) relative to one of the edges of the pixel array, ^, ,, (f>. Then 'performing the first-to-slant intensity value meter Step = intensity value (譬 this first oblique intensity value According to a formula ··. Then the oblique intensity value calculation step is calculated to calculate the -筮- 弟一 grab intensity value calculation step according to the formula: ιΐτ丨+Γγ ° Then, the _estimation parameter calculation (4) , by the formula: "number of turns (4)) 'where the estimated parameters are calculated according to the - public

L 135 max min观胃,抓 SE、 otherwise 綠測強度值 公式 V吾❿如,rWW2) 彩内供一種色彩内插方法… 彩内插方㈣適㈣邊方向來進行内插。此这 像素,這些像素包含複數::列二晴陣列包含複㈣ 每一第—像素具有對素和複數個第二像素, (〜),每-第二像素1:;: 色之一第一議L 135 max min Guanwei, catch SE, otherwise Green intensity value Formula V Wu Ruru, rWW2) Color interpolation method for color... Color interpolation (4) Suitable for interpolating in the direction of (4). For this pixel, the pixels comprise a plurality of:: column II array comprises a complex (four) each pixel has a pair of pixels and a plurality of second pixels, (~), each - second pixel 1::: one of the colors first Discussion

^ t J 彳冢素之杈座標,i代表每一像素之 201034470 縱座標。此色彩内插方法係對每一第二像素進行一内插步 驟’以計算出每-第二像素對應至第一顏色之一估測強度 值(心)。在此内插步驟中,首先根據像素陣列來提供高通 遮罩(high pass mask),以偵測第二像素相對於像素陣列之 一邊緣(edge)的位置’並提供偵測結果(f)。然後,進行第一 斜向強度值計算步驟,以計算出—第—斜向強度值㈣贴), 其中此第一斜向強度值計算步驟係根據一公^ : 八+1。接* ’進行-第二斜向強度值計算步驟, 二计算出一第二斜向強度值(〇’其中此第二斜向強 計算步驟係根據-公式: 〜。然後,進彳^# 測參數計算㈣,以計算出-估測參 參數計算㈣係〃中此估測^ t J 彳冢 杈 杈 coordinates, i represents the 201034470 ordinate of each pixel. The color interpolation method performs an interpolation step for each second pixel to calculate an estimated intensity value (heart) corresponding to one of the first colors per second pixel. In this interpolation step, a high pass mask is first provided according to the pixel array to detect the position of the second pixel with respect to an edge of the pixel array and to provide a detection result (f). Then, a first oblique intensity value calculation step is performed to calculate a -first oblique intensity value (four) sticker, wherein the first oblique intensity value calculation step is based on a common ^ 8 +1. Connect * 'to - the second oblique intensity value calculation step, two calculate a second oblique intensity value (〇 'where the second oblique strong calculation step is based on - formula: ~. Then, enter 彳 ^# test Parameter calculation (4), to calculate - estimate the parameter calculation (4) in the system

LL

45 U maxfsiV^^^ ^ l、j Uj j她{抓Ί V hj Li if />〇 otherwise 接著,進仃一估測強度值計算步驟 (m巾…/“丨故“ 十算—估測強度值 其中此估測強度值計算步驟係45 U maxfsiV^^^ ^ l, j Uj j her {catch Ί V hj Li if /> 〇 otherwise Next, enter the 估 an estimated intensity value calculation step (m towel... / "丨故" 十算-estimate Intensity value, wherein the estimated intensity value calculation step is

PP

i,,ΐ(〇 h2、广 - U ^發明之又-態樣是在提供—郷像 方 2處理對應-彩色濾、鏡陣列之—像 3 = 二像素,4二1ΓΓ包含複數個第-像綱 ^八^母第一像素具有對應至一第一麵$+ 、 一強度值(G.),而每—m _推上Β山 弟顏色之一 | 一皆 ,j)向母弟一像素具有對應至一第-紹洛夕 苐二強度值uv)。這此第< 七人、第一顏色之 —第—像素包含複數個已估測傳 201034470 .^ ’而這些已估測像素包含目標像素,其十未估測像素之 •其餘者和已估測像素係以目標像素為中心來環繞。狹後, =一強度值估測步驟,以計算出此目標像素對應 顏色之一第二估測強度值。在此強度值估測步驟中 步驟’以計算出目標像素之複數個候選估測強度 行—決定步驟,以根據候選估測強度值和第 一估測強度值,來蚊目標像素之第二估測強度值。 【實施方式】 為了方便說明起見,在以下的敘述中,將以,,強度值” 像顏色的亮度,例如:綠色強度值係代表 =據本發明-實施例之處理區域搬 y像 的顏T素根據彩色遽光片陣列之結構可分二 Γ第二以陣列為例,第一像素R係對應至紅 另外應至綠色’第三像素8係對應至藍色。 窗订色彩内插法’使用者通常會利用-決定視 eClslon wmd〇w) w來決定處理區域呢的大小,再利 3 = 中的像素來進行内插。在本實施例中,決 疋視囪之大小為5乘s主丨 * 此。 不5個像素大小,但本發明並不受限於 〇月參…、第4圖’其係綠示根據本發明-實施例之色彩 201034470 内插方法200的流程示意圖。色彩内插.方法2〇〇係用以估 測處理區域102之一目標像素所缺乏的色彩成份。一般而 言,由於人眼對於綠色較為敏感,因此在以下的說明中, 將以估測座標為(i,j)之第一像素R(以下稱為目標像素)中的 綠色強度值Pij為例來說明色彩内插方法1〇〇。 在色彩内插方法200中,首先進行遮罩提供步驟21〇, 以提供預設之高通遮罩(high pass mask),例如:拉普拉斯 遮罩(Laplacian mask)或高斯拉普拉斯遮罩(Lapladan 〇f Gaussian Mask),來偵測目標像素相對於像素陣列之邊緣 (edge)的位置’並輸出一摘測結果f,其中邊緣係指像素陣 列=灰階變化較大的地方。遮罩的大小係根據蚊視窗來 決定,由於本實施例所採用之決定視窗為5乘5個像素,i,, ΐ (〇h2, 广- U ^ invention again - the state is provided - 郷 image 2 processing corresponding - color filter, mirror array - like 3 = two pixels, 4 2 1 ΓΓ contains a plurality of - The first pixel like the ^^^^ mother has a corresponding value to a first face $+, an intensity value (G.), and each -m _ pushes one of the colors of the Β山弟| all, j) to the mother The pixel has a corresponding intensity value corresponding to a first-shoaling uv). The seventh person, the first color - the first pixel contains a plurality of estimated transmissions 201034470 .^ ' and these estimated pixels contain the target pixel, the remaining ten of the estimated pixels and the estimated The pixel is centered around the target pixel. Narrow, = an intensity value estimation step to calculate a second estimated intensity value for one of the corresponding colors of the target pixel. In the intensity value estimation step, the step 'to calculate a plurality of candidate estimated intensity lines of the target pixel-determining step to estimate the second target of the mosquito target pixel according to the candidate estimated intensity value and the first estimated intensity value Measure the intensity value. [Embodiment] For the sake of convenience of explanation, in the following description, the intensity value of the image color, for example, the green intensity value represents the color of the y image according to the processing region of the present invention. The T element can be divided into two according to the structure of the color filter array. The first pixel R corresponds to red and the other corresponds to green. The third pixel 8 corresponds to blue. Window color interpolation 'Users usually use - decide to view eClslon wmd〇w) w to determine the size of the processing area, and then use the pixels in 3 = to interpolate. In this embodiment, the size of the chimney is 5 times. s main 丨* This is not 5 pixels in size, but the present invention is not limited to the 〇月参..., Fig. 4' is a schematic flow diagram of the coloring method 2010100470 interpolation method 200 according to the present invention. Color interpolation. Method 2 is used to estimate the color component lacking in the target pixel of one of the processing regions 102. Generally, since the human eye is sensitive to green, in the following description, the coordinates will be estimated. The first pixel R of (i, j) (hereinafter referred to as In the color interpolation method 200, the mask providing step 21 is first performed to provide a preset high pass mask (high pass mask). ), for example: Laplacian mask or Lapladan 〇f Gaussian Mask to detect the position of the target pixel relative to the edge of the pixel array and output a Excerpt result f, where the edge refers to the pixel array = where the gray scale changes greatly. The size of the mask is determined according to the mosquito window, since the decision window used in this embodiment is 5 by 5 pixels,

SK 因=罩之大小亦為5乘5個像素。接著,進行斜向強度 值计算步驟220。在第一斜向強度值計算步驟中,利 用-公式來計算出斜向強度值^,此公式係表示如下: :Gw+Gu-i nrrrNW ^ _ 其中係代表以目標像素為中心,由 強度值,〜係代健標為㈣) 向西估測之斜向 度值,知係代表座標為(υ·υ之第=^的綠色強 值。繂後,ϋ彳干i 象素〇的綠色強度 值然後進仃第一斜向強度值計算步驟 向強度值計算步驟230中,利用一公式 〜在第一斜 值奶巧,此公式係表示如下: 叶算出斜向強度 其中’啊y係代表以目標像素為中心, 向強度值,Gi+1J係代表座標為(i+1,j)之向南估測』 強度值,GiJ+1係代表座標為_ 一像素G的 〜像素G的綠 201034470 度值。接著,進行估測參數計算步驟240,以計算出估測 參數β。在濾參數計算步驟240中,係利用高通遮罩偵測 得到的結果f並根據一公式來計算出估測參數,此公式 係表示如下: f NW SE) max srv ,SIV 135_ l Uj 'NW SE~\ min SIV ,SIV Uj) if /^〇 otherwiseSK = The size of the cover is also 5 by 5 pixels. Next, an oblique intensity value calculation step 220 is performed. In the first oblique intensity value calculation step, the oblique strength value ^ is calculated by using the - formula, which is expressed as follows: : Gw + Gu - i nrrrNW ^ _ where the representative represents the target pixel as the center, and the intensity value The value of the 健 健 为 ( ( 估 估 估 估 估 估 估 估 估 估 估 估 估 估 估 估 估 估 估 估 估 估 估 估 估 估 估 估 估 估 估 估 估 估 估 估 估 估 估 估 估 估 估 估 估The value then proceeds to the first oblique intensity value calculation step to the intensity value calculation step 230, using a formula ~ at the first oblique value milk, this formula is expressed as follows: The leaf calculates the oblique intensity where the 'ah y system represents The target pixel is centered, the intensity value, the Gi+1J system represents the southward estimate of the (i+1,j) intensity value, and the GiJ+1 system represents the coordinate _ one pixel G to the pixel G of the green 201034470 Then, an estimated parameter calculation step 240 is performed to calculate the estimated parameter β. In the filter parameter calculation step 240, the obtained result f is detected by the high-pass mask and the estimated parameter is calculated according to a formula. This formula is expressed as follows: f NW SE) max srv , SIV 135_ l Uj 'NW SE~\ Min SIV ,SIV Uj) if /^〇 otherwise

由上式可看出,當結果f大於或等於零時,估測參數1,,;為 之中之最大者;當結果f小於零時,估測參數心 為之中之最小者。然後,進行強度值計算步驟 250。在估測強度值計算步驟250中,根據一公式來計算估 測強度值A,此公式係表示如下: 其中,Ri,j代表目標像素之紅色強度值,艮-2,3+2代表座標為 (i-2,j+2)之第一像素R的紅色強度值,Ri+2,卜2代表座標為 (i+2,j-2)之第一像素R的紅色強度值。 本實施例之色彩内插方法200可沿著目標像素之135° 邊方向來估測遺失的色彩。對於具有135°邊方向之邊緣的 像素陣列而言,色彩内插方法200可提高估測的精確度。 請參照第5圖,其係繪示根據本發明一實施例之色彩 内插方法300的流程示意圖。本實施例之色彩内插方法300 係類似於色彩内插方法200,但不同之處在於色彩内插方 法300係用以沿著目標像素之45°邊方向來估測遺失的色 彩。 在色彩内插方法300中,首先進行遮罩提供步驟310, 201034470 . 以提供預設之高通遮罩來偵測目標像素相對於像素陣列之 邊緣的位置,並提供偵測結果f。接著,進行斜向強度值計 » 算步驟320。在斜向強度值計算步驟320中,利用一公式 來計算出斜向強度值耶;f,此公式係表示如下: sidj+Gu+' 其中啊,7係代表以目標像素為中心,由北向東估測之斜向 強度值,GM,j係代表座標為之第二像素G的綠色強 度值,Gi,^係代表座標為(ij+Ι)之第二像素G的綠色強度 φ 值。然後,進行斜向強度值計算步驟330。在斜向強度值 計算步驟330中,利用一公式來計算出斜向強度值呵,, 此公式係表示如下: siv= = gmj+g,,bIt can be seen from the above equation that when the result f is greater than or equal to zero, the estimated parameter 1,,; is the largest of them; when the result f is less than zero, the estimated parameter is the smallest of the minds. Then, an intensity value calculation step 250 is performed. In the estimated intensity value calculation step 250, the estimated intensity value A is calculated according to a formula, which is expressed as follows: where Ri, j represents the red intensity value of the target pixel, and 艮-2, 3+2 represents the coordinate The red intensity value of the first pixel R of (i-2, j+2), Ri+2, and 2 represent the red intensity value of the first pixel R whose coordinates are (i+2, j-2). The color interpolation method 200 of the present embodiment can estimate the missing color along the 135° side of the target pixel. For a pixel array having an edge of 135° edge direction, the color interpolation method 200 can improve the accuracy of the estimation. Please refer to FIG. 5, which is a flow chart of a color interpolation method 300 according to an embodiment of the invention. The color interpolation method 300 of the present embodiment is similar to the color interpolation method 200, except that the color interpolation method 300 is used to estimate the missing color along the 45° side of the target pixel. In the color interpolation method 300, a mask providing step 310, 201034470 is first performed. A preset high pass mask is provided to detect the position of the target pixel relative to the edge of the pixel array, and the detection result f is provided. Next, the oblique intensity value meter is calculated to calculate step 320. In the oblique intensity value calculation step 320, a formula is used to calculate the oblique intensity value y; f, the formula is expressed as follows: sidj+Gu+' where ah, the 7 series represents the target pixel as the center, and is estimated from the north to the east. The measured oblique intensity value, GM, j represents the green intensity value of the second pixel G of the coordinate, and Gi, ^ represents the green intensity φ value of the second pixel G whose coordinates are (ij + Ι). Then, an oblique intensity value calculation step 330 is performed. In the oblique intensity value calculation step 330, a formula is used to calculate the oblique intensity value, which is expressed as follows: siv = = gmj + g,, b

其中,係代表以目標像素為中心,由西向南估測之斜 向強度值,Gi+1,j係代表座標為(i+l,j)之第二像素G的綠色 強度值,Gy」係代表座標為(i,j_l)之第二像素G的綠色強 度值。接著,進行估測參數計算步驟340,以計算出估測 參數C。在估測參數計算步驟340中,係利用高通遮罩偵 測得到的結果f並根據一公式來計算出估測參數β,此公 式係表示如下:Among them, the representative represents the oblique intensity value centered on the target pixel from west to south, and Gi+1,j represents the green intensity value of the second pixel G with coordinates (i+l,j), Gy" Represents the green intensity value of the second pixel G of coordinates (i, j_l). Next, an estimated parameter calculation step 340 is performed to calculate the estimated parameter C. In the estimated parameter calculation step 340, the result f obtained by the high-pass mask detection is used and the estimated parameter β is calculated according to a formula, which is expressed as follows:

L 45 hj max min r NE SW^ SIV ,SIV 、i,j u) NE SW\ SIV ,SIV i,j hj ) if otherwise 由上式可看出,當結果f大於或等於零時,估測參數&為 见匕7和啊τ之中之最大者;當結果f小於零時,估測參數/^ 為邶7和啊Γ之中之最小者。然後,進行估測強度值計算 步驟350。在估測強度值計算步驟350中,根據一公式來 11 201034470 . 計算估測強度值I,此公式係表示如下: . P z· , J (Ζ5 ) + 士 (2式,厂式-2 J-2 -尺+2 J+2 ) 其中,Ri,j代表目標像素之紅色強度值,Ri-2,j-2代表座標為 (i-2,j-2)之第一像素R的紅色強度值,Ri+2J+2代表座標為 (i+2,j+2)之第一像素R的紅色強度值。 本實施例之色彩内插方法300可沿著目標像素之45° 邊方向來估測遺失的色彩,如此可增加影像重建的精確度。 請同時參照第6圖和第7圖,第6圖係繪示根據本發 明一實施例之像素陣列400的結構示意圖,第7圖係繪示 根據本發明一實施例之處理區域402的結構示意圖。像素 陣列400係類似於像素陣列100,且第一像素R包含有已 估測像素111〜116和未估測像素117〜125,其中已估測像素 111〜116對應至綠色之色強度值已被正式的估測得知,而未 估測像素117〜125對應至綠色之色強度值尚未正式的被估 測。另外,為了進行影像解馬赛克方法方法,使用者通常 會利用決定視窗W來決定處理區域402的大小,再利用 處理區域402中的像素來進行解馬赛克。在本實施例中, 決定視窗之大小為5乘5個像素大小,但本發明並不受限 於此。 請參照第8圖,其係繪示根據本發明一實施例之影像 解馬赛克方法500的流程示意圖。解馬賽克方法500係以 軟性決定為架構,利用已估測像素來估測目標像素所遺失 的色彩強度值,如此所獲得之重建影像可具有更高的精確 度。在以下的說明中,將以估測處理區域402中座標為(i,j) 之未估測像素117所遺失的綠色成份為例來說明解馬賽克 12 201034470 ϋ其中已估測像素111〜116之綠色強度值已被估測 •于σ’未估測像素117〜125之綠色強度值則尚未被估測。 斗狀在解馬赛克方法500中’首先進行内插步驟510,以 异出像素117-125對應至綠色之複數個候選估測強度 内插步驟510可利用習知之水平内插法、垂直内插法 本發明之45。邊内插法和135。邊内插法來產生像素 125之複數個候選估測強度值。這些候選估測強度值可 :、内插法所計算出的内插強度值’或是經由某些計算方法 J Τ如·平均計算法)將内插強度值更進—步處理所獲得之強 :值。接著’進行決定步驟52〇,以根據像素ιΐ7〜ΐ25之 ,選估測強度值和已估測像素⑴、U2、113和116之綠 強度值,來計算出像素117之綠色估測強度值。 在決定步驟52〇中,首先進行色差計算步驟520a,以 0鼻出以像素117為中心,視窗w區域内之複數個色差值 ,、义、C和Cf,其中色差計算步驟52如係利 公式計算: i^,y+n~ '0JJ+n , 々·+«, if « = if « = :-2 = 0,2 [Ri+n,j- ' ^i+n,j , if /7 = =-2 λ^η,Γ -¾ ”J, if « = = 0,2 if n =-2 ^Ri+n,j- n~GilnJ-n^ if « = 0,2 < ^+n9J+n ^i+nj+n , if« =~2 ^nJ^G}lnj+n^ if n -0,2 &中U係代表像素之座標值,R係代表像素的紅色強度 ,G係代表像素之已估測綠色強度值,仏代表像素之水 々·,/) 0,·/) = d) 13 201034470 -平估測綠色強度值,方代表像素之垂直估測綠色強度值, . 代表像素於45。邊之估測綠色強度值ό45。,ό135。代表像素於 135°邊之估測綠色強度值。 接著,進行指示因子(indicator)計算步驟520b,以計算 出指示因子群組(indicator set) ω,;={δ//,7,δρ^,Μ5〇,;,δι35。。}, 其中指示因子係計算視窗W區域内沿著垂直,水平,45。, 135°方向色差變化差異度,本實施例以下列公式計算而得, 但本發明不受限於此。 C㈣力-《抑丨+丨 娜L =|C;f (卜2J-2)-e(U.)HC(W)-C(i+2J+2). 然後,進行選擇步驟520c ’以根據指示因子群組來從 候選估測強度值中選擇像素117之估測綠色強度值&,其 中選擇步驟520c係選擇色差變化差異度最小方向其對應 • 之估測強度值,本實施例以下列公式計算而得,但本發明不 受限於此。 I(Gj + G[j), if any two of the indicators = min (Ω( y) 句, if ΜΓ,ν = min (Ω,-y) 兒, if Δ。= = min(QIJ) /45。 Gi,j, if Δ45〇 •J = min (Ω/>7) if Δ135° t j =min(Q,y)L 45 hj max min r NE SW^ SIV , SIV , i, ju) NE SW\ SIV , SIV i, j hj ) if otherwise It can be seen from the above equation that when the result f is greater than or equal to zero, the estimated parameter & To see the biggest of 匕7 and ahτ; when the result f is less than zero, the estimated parameter /^ is the smallest of 邶7 and Γ. Then, an estimated intensity value calculation step 350 is performed. In the estimated intensity value calculation step 350, the estimated intensity value I is calculated according to a formula 11 201034470. This formula is expressed as follows: . P z· , J (Ζ5 ) + 士(2, factory-2 J -2 - 尺 +2 J+2 ) where Ri, j represents the red intensity value of the target pixel, and Ri-2, j-2 represents the red intensity of the first pixel R of the coordinates (i-2, j-2) The value, Ri+2J+2 represents the red intensity value of the first pixel R whose coordinates are (i+2, j+2). The color interpolation method 300 of the present embodiment can estimate the missing color along the 45° direction of the target pixel, which can increase the accuracy of image reconstruction. Please refer to FIG. 6 and FIG. 7 simultaneously. FIG. 6 is a schematic structural diagram of a pixel array 400 according to an embodiment of the present invention, and FIG. 7 is a schematic structural diagram of a processing region 402 according to an embodiment of the invention. . The pixel array 400 is similar to the pixel array 100, and the first pixel R includes the estimated pixels 111-116 and the unestimated pixels 117-125, wherein the estimated color values of the pixels 111-116 corresponding to the green color have been A formal estimate reveals that the unmeasured pixels 117-125 corresponding to the green color intensity values have not been formally estimated. Further, in order to perform the image demosaicing method, the user usually determines the size of the processing area 402 by using the decision window W, and then uses the pixels in the processing area 402 to perform demosaicing. In the present embodiment, the size of the window is determined to be 5 by 5 pixels, but the present invention is not limited thereto. Please refer to FIG. 8 , which is a flow chart of an image demosaicing method 500 according to an embodiment of the invention. The demosaicing method 500 is based on the softness decision structure, and the estimated pixel is used to estimate the color intensity value lost by the target pixel, so that the reconstructed image obtained can have higher accuracy. In the following description, the green component lost by the unestimated pixel 117 having coordinates (i, j) in the estimation processing region 402 will be taken as an example to illustrate the demosaicing 12 201034470, in which the pixels 111 to 116 have been estimated. The green intensity value has been estimated • The green intensity value of the σ' unestimated pixels 117~125 has not been estimated. In the demosaicing method 500, 'interpolation step 510 is first performed, and the plurality of candidate estimation strength interpolation steps 510 corresponding to the green pixels 117-125 corresponding to green can utilize the conventional horizontal interpolation method and vertical interpolation method. 45 of the present invention. Edge interpolation and 135. Edge interpolation produces a plurality of candidate estimated intensity values for pixel 125. These candidate estimated intensity values can be: the interpolated intensity value calculated by the interpolation method or the higher the interpolated intensity value is obtained by some calculation method J such as the average calculation method. :value. Next, a decision step 52 is performed to calculate the green estimated intensity value of the pixel 117 based on the estimated intensity value and the green intensity values of the estimated pixels (1), U2, 113, and 116 according to the pixels ι 7 to ΐ25. In the decision step 52, the color difference calculation step 520a is first performed, with a plurality of color difference values, meanings, C and Cf in the window w region centered on the pixel 117, wherein the color difference calculation step 52 is performed Formula calculation: i^, y+n~ '0JJ+n , 々·+«, if « = if « = :-2 = 0,2 [Ri+n,j- ' ^i+n,j , if / 7 = =-2 λ^η,Γ -3⁄4 ”J, if « = = 0,2 if n =-2 ^Ri+n,j- n~GilnJ-n^ if « = 0,2 < ^+ n9J+n ^i+nj+n , if« =~2 ^nJ^G}lnj+n^ if n -0,2 & U is the coordinate value of the pixel, R is the red intensity of the pixel, G Represents the estimated green intensity value of the pixel, 仏 represents the pixel of the pixel ,, /) 0,·/) = d) 13 201034470 - The estimated green intensity value, the square represents the vertical estimated green intensity value of the pixel, The representative pixel is at 45. The estimated green intensity value ό 45., ό 135. represents the estimated green intensity value of the pixel on the 135° side. Next, an indicator calculation step 520b is performed to calculate the indicator group (indicator set) ω,;={δ//,7,δρ^,Μ5〇,;,δι35..}, where the indicator is calculated The variation of the color difference in the W region along the vertical, horizontal, 45, and 135° directions is calculated by the following formula, but the present invention is not limited thereto. C (four) force - "suppressing + 丨 L L = |C;f (Bu 2J-2)-e(U.)HC(W)-C(i+2J+2). Then, a selection step 520c' is performed to estimate the intensity value from the candidate according to the indicator group The estimated green intensity value & amp of the selected pixel 117, wherein the selecting step 520c selects the estimated intensity value corresponding to the smallest direction of the color difference change difference direction, and the embodiment is calculated by the following formula, but the invention is not limited Here I(Gj + G[j), if any two of the indicators = min (Ω( y), if ΜΓ, ν = min (Ω, -y), if Δ. = = min(QIJ) /45. Gi,j, if Δ45〇•J = min (Ω/>7) if Δ135° tj =min(Q,y)

由上述說明可知,在本實施例中,已正式估測像素 14 201034470 -111、112、113、116 和未正式估測像素 118、121、122、 • 123係以目標像素117為中心來圍繞,因此可根據已正式 估測像素1U、112、113、116之已估測強度值以及未正式 估測像素118、121、122、123對應至多個内插方式所得之 候選強度值(¾、、句。、暫。)來決定這些候選強度值之 -者做為目標像素117之估測綠色強度值,歧再將候選 之綠色估測強度值經過一些計算(例如平均計算法)來計算 出目標像素117之估測綠色強度值。 瞻另外,當目標像素117之綠色強度值被估測得知後, 決定視窗W便會決定下一個5乘5像素大小之處理區域, 例t :以未估測像素118為中心之處理區域。此時,由於 目標像素117之綠色強度值已被計算出來,因此未正式估 測像素118之綠色估測強度值可根據已正式估測像素 112、113、114、117 和未正式估測像素 119、122、123、、 124來計算得知。 _請同時參照第9圖、第10圖和第u圖,第9_ 不根據本發明一實施例之像素陣歹4 4〇〇 #結構示意圖 =圖係繪示根據本發明—實施例之處理區域6()2的結構示 意圖’第11圖騎示根據本發明—實施例之影像解馬赛充、 方法70G的流㈣意圖。在本實施财,影像解馬赛 法雇係利用、綠色強度值已正式估狀像素n?來對 測像素m進行綠色強度值之估測。在影像解 馬赛克方法7GG中’首先進行解馬#克方法5()(), 目標估测像素n7所遺失的綠色成份。當目標像素117 ^ 4色強度值被正式估測得知後,決定視窗w便移動 正式估測像素U8為中心之處理區域6〇2。接著,進行= 15 201034470 插步驟71G’叫算^未正^估縣素m、119、122、123、 124對應至綠色之複數個候選估測強度值。内插步驟710 可利用習知之水平㈣法、垂直㈣法和本發明之衫。度 邊内插法和135邊内插法來產生像素118、119、η〗、⑵、 複數個候選估測強度值。這些候選估測強度值可為 内插去所計算出_插強度值,或是經由某些計算方法(例 如·平均+計算法)將内插強度值更進—步處理所獲得之強度 f接著’進行決定步驟72〇,以根據候選估測強度值和 吁像素112、113、Μ和m之綠色強度值,來 汁异出像素118之綠色估測強度值。 在決定步驟72G中,首先進行色差計算步驟7施,計 二Λ像f118為中心、,視窗W區域内之複數個色差值 ^和,其中色差計算步驟720a係利用以下 / ^J'+n [^J+n if « = -2 if w = 0,2 (^+»J' ~^J+n,j , if n = =-2 ~ ^ϊ+nj > if w = :0,2 ^i+n,j-n~^i+nj-n , if n =—2 、Ri+n,j- -n-GUn,j-n^ if n = 0,2 1 ^i+n,j+n~ ^i+n,j+n , if n =-2 \Ri+n,j+n~^ilnJ+n^ if n = 0,2 其中 · ·, 值〜,J係代表像素之座標值,R係代表像素的紅色強度 平’ G係代表像素之已估測綠色強度值,仏代表像素之水 代表、i、、’彔色強度值,&代表像素之垂直估測綠色強度值, 像素於45。邊之估測綠色強度值巧。,⑦5。代表像素於 〇,. ->135° 16 201034470 . 135°邊之估測綠色強度值。 接著,進行指示因子(indicator)計算步驟720b,以計算 出指示因子群組(indicator set) ω,;={δ//,7, Δγ",Δ45°ί7.,Δ135。,"}, 其中指示因子係計算視窗W區域内沿著垂直,水平,45°, 135°方向色差變化差異度,本實施例以下列公式計算而得, 但本發明不受限於此。 ^ =| ^g(U-2)-c^g(ij) |+| 〇,7)-ς^(ΰ·+2)|As can be seen from the above description, in the present embodiment, the officially estimated pixels 14 201034470 - 111 , 112 , 113 , 116 and the un-estimated pixels 118 , 121 , 122 , • 123 are surrounded by the target pixel 117 . Therefore, the estimated intensity values (3⁄4, sentences) obtained by the estimated thickness values of the pixels 1U, 112, 113, and 116 and the non-formally estimated pixels 118, 121, 122, and 123 corresponding to the plurality of interpolation methods may be used. To determine the candidate intensity values as the estimated green intensity value of the target pixel 117, and then calculate the target pixel by some calculation (such as the average calculation method) of the candidate green estimated intensity value. Estimated green intensity value of 117. In addition, when the green intensity value of the target pixel 117 is estimated, the decision window W determines the next processing area of 5 by 5 pixels, for example, t: the processing area centered on the unestimated pixel 118. At this time, since the green intensity value of the target pixel 117 has been calculated, the green estimated intensity value of the unrecognized pixel 118 may be based on the officially estimated pixels 112, 113, 114, 117 and the un-estimated pixel 119. , 122, 123, and 124 are calculated. _Please refer to FIG. 9 , FIG. 10 and FIG. 9 at the same time, and the ninth embodiment of the present invention is not in accordance with an embodiment of the present invention. FIG. FIG. 11 is a schematic view of the flow (fourth) of the method 70G according to the present invention. In this implementation, the image is used by the Marseille method, and the green intensity value has been officially estimated to be the pixel n? to estimate the green intensity value of the measured pixel m. In the image demosaicing method 7GG, first, the solution #5 method 5()() is performed, and the target estimates the green component lost by the pixel n7. After the target pixel 117 ^ 4 color intensity value is officially estimated, the decision window w moves to the processing area 6 〇 2 centered on the official estimated pixel U8. Next, proceed to = 15 201034470 to insert the step 71G' to calculate the number of candidate estimated strength values corresponding to the green of the prime m, 119, 122, 123, and 124. The interpolation step 710 can utilize the conventional level (four) method, the vertical (four) method, and the shirt of the present invention. The degree interpolation method and the 135 side interpolation method generate pixels 118, 119, η, (2), and a plurality of candidate estimated intensity values. These candidate estimated intensity values may be interpolated to calculate the _plug strength value, or the interpolation strength value may be further advanced by some calculation method (eg, averaging + calculation method). 'Determining step 72' to determine the green estimate intensity value of the pixel 118 based on the candidate estimated intensity value and the green intensity values of the pixels 112, 113, Μ, and m. In the decision step 72G, first, the color difference calculation step 7 is performed to calculate the plurality of color difference values ^ in the window W region centered on the second image f118, wherein the color difference calculation step 720a utilizes the following / ^J'+n [^J+n if « = -2 if w = 0,2 (^+»J' ~^J+n,j , if n = =-2 ~ ^ϊ+nj > if w = :0,2 ^i+n,jn~^i+nj-n , if n =—2 , Ri+n,j- -n-GUn,jn^ if n = 0,2 1 ^i+n,j+n~ ^ i+n,j+n , if n =-2 \Ri+n,j+n~^ilnJ+n^ if n = 0,2 where · ·, value ~, J represents the coordinate value of the pixel, R system The red intensity of the representative pixel is 'G' represents the estimated green intensity value of the pixel, 仏 represents the water representative of the pixel, i, and '彔 intensity value, & represents the vertical estimated green intensity value of the pixel, pixel at 45 The estimated green intensity value of the edge is 75. The representative pixel is 〇, . -> 135° 16 201034470 . The estimated green intensity value of the 135° edge. Next, an indicator calculation step 720b is performed to Calculate the indicator set ω,;={δ//,7, Δγ",Δ45°ί7.,Δ135.,"}, where the indicator factor is calculated The difference in chromatic aberration variation along the vertical, horizontal, 45°, and 135° directions in the W region is calculated by the following formula, but the present invention is not limited thereto. ^ =| ^g(U-2)- c^g(ij) |+| 〇,7)-ς^(ΰ·+2)|

AVU =| I +| ^g(ij)-^g(i+zj) I Δ135;. =|^f(/-2,y-2)-^f(w)|+|^J(/;7VC(/+2,y>2). 然後,進行選擇步驟720c,以根據指示因子群組來從 候選估測強度值中選擇像素118之估測綠色強度值(^,其 中選擇步驟720c係選擇色差變化差異度最小方向其對應 之估測強度值,本實施例以下列公式計算而得,但本發明不 受限於此:AVU =| I +| ^g(ij)-^g(i+zj) I Δ135;. =|^f(/-2,y-2)-^f(w)|+|^J(/; 7VC (/+2, y > 2). Then, a selection step 720c is performed to select an estimated green intensity value (^, wherein the selection step 720c is selected from the candidate estimated intensity values according to the indicator group. The chromatic aberration change degree difference direction is the corresponding estimated intensity value, and the present embodiment is calculated by the following formula, but the present invention is not limited thereto:

if any two of the indicators = min (Ω,. y)If any two of the indicators = min (Ω,. y)

Gj, if Δ//,ν=πιΐη(Ω,ν)Gj, if Δ//, ν=πιΐη(Ω,ν)

G:j, if A^.=min(Q,.y) if Δ45; .=ιηΐη(Ω,ν) , if Δ135°. =min(Q,.y). 另外,值得注意的是本發明之色彩内插方法200、300 和影像解馬賽克方法500、700可應用於電腦程式產品中, 當此電腦程式產品被載入於電腦時,此電腦即可進行色彩 内插方法200、300和影像解馬赛克方法500。 17 201034470 . 雖然本發明已以實施例揭露如上,然其並非用以限定 ^ 本發明,任何熟習此技藝者,在不脫離本發明之精神和範 圍内,當可作各種之更動與潤飾,因此本發明之保護範圍 當視後附之申請專利範圍所界定者為準。 【圖式簡單說明】 為讓本發明之上述和其他目的、特徵、和優點能更明 顯易懂,上文特舉一較佳實施例,並配合所附圖式,作詳 • 細說明如下: 第1圖係繪示習知之彩色濾光片陣列(Color Filter Array; CFA)的結構示意圖。 第2圖係繪示根據本發明一實施例之像素陣列的結構 示意圖。 第3圖係繪示根據本發明一實施例之處理區域的結構 示意圖。 第4圖係繪示根據本發明一實施例之色彩内插方法的 籲 流程不意圖。 第5圖係繪示根據本發明一實施例之色彩内插方法的 流程示意圖。 第6圖係繪示根據本發明一實施例之像素陣列的結構 示意圖。 第7圖係繪示根據本發明一實施例之處理區域的結構 示意圖。 第8圖係繪示根據本發明一實施例之影像解馬賽克方 法的流程不意圖。 18 201034470 . 第9圖係繪示根據本發明一實施例之像素陣列的結構 示意圖。 第10圖係繪示根據本發明一實施例之處理區域的結 構不意圖。 第11圖係繪示根據本發明一實施例之影像解馬赛克 方法的流程不意圖。 【主要元件符號說明】 100 :像素陣列 102 :處理區域 111〜116 :已估測像素 117〜125 :未估測像素 200 :色彩内插方法 210 :遮罩提供步驟 220 :斜向強度值計算步驟 230 :斜向強度值計算步驟 240 :估測參數計算步驟 250 :估測強度值計算步驟 300 :色彩内插方法 310 :遮罩提供步驟 320 :斜向強度值計算步驟 330 :斜向強度值計算步驟 340 :估測參數計算步驟 350 :估測強度值計算步驟 400 :像素陣列 402 :處理區域 500 :解馬賽克方法 510 :内插步驟 520 :決定步驟 520a :色差計算步驟 520b :指示因子計算步驟 520c :選擇步驟 602 :處理區域 700 :影像解馬賽克方法 710 :内插步驟 720 :決定步驟 720a :色差計算步驟 720b :指示因子計算步驟 720c :選擇步驟 FG :綠色濾光片 19 201034470 , FR:紅色濾光片 FB :藍色濾光片 « R :第一像素 B:第三像素 G : ’第二像素 W :決定視窗 i :座標值 j :座標值G:j, if A^.=min(Q,.y) if Δ45; .=ιηΐη(Ω,ν) , if Δ135°. =min(Q,.y). In addition, it is worth noting that the present invention The color interpolation method 200, 300 and the image demosaicing method 500, 700 can be applied to a computer program product. When the computer program product is loaded into a computer, the computer can perform the color interpolation method 200, 300 and image solution. Mosaic method 500. The present invention has been disclosed in the above embodiments, and is not intended to limit the invention, and various modifications and refinements may be made without departing from the spirit and scope of the invention. The scope of the invention is defined by the scope of the appended claims. BRIEF DESCRIPTION OF THE DRAWINGS The above and other objects, features, and advantages of the present invention will become more apparent and understood. FIG. 1 is a schematic view showing the structure of a conventional color filter array (CFA). 2 is a schematic view showing the structure of a pixel array according to an embodiment of the present invention. Figure 3 is a block diagram showing the structure of a processing area in accordance with an embodiment of the present invention. Fig. 4 is a schematic diagram showing the flow of the color interpolation method according to an embodiment of the present invention. Figure 5 is a flow chart showing a color interpolation method according to an embodiment of the present invention. Figure 6 is a block diagram showing the structure of a pixel array in accordance with an embodiment of the present invention. Figure 7 is a block diagram showing the structure of a processing area in accordance with an embodiment of the present invention. Figure 8 is a schematic diagram showing the flow of an image demosaicing method according to an embodiment of the present invention. 18 201034470. Fig. 9 is a block diagram showing the structure of a pixel array according to an embodiment of the present invention. Fig. 10 is a view showing the structure of a processing area according to an embodiment of the present invention. Figure 11 is a flow chart showing an image demosaicing method according to an embodiment of the present invention. [Main component symbol description] 100: pixel array 102: processing regions 111 to 116: estimated pixels 117 to 125: unestimated pixel 200: color interpolation method 210: mask providing step 220: oblique intensity value calculation step 230: Oblique Strength Value Calculation Step 240: Estimation Parameter Calculation Step 250: Estimated Intensity Value Calculation Step 300: Color Interpolation Method 310: Mask Providing Step 320: Oblique Strength Value Calculation Step 330: Oblique Strength Value Calculation Step 340: Estimation parameter calculation step 350: Estimation intensity value calculation step 400: Pixel array 402: Processing area 500: Demosaicing method 510: Interpolation step 520: Decision step 520a: Color difference calculation step 520b: Indication factor calculation step 520c : Selection Step 602: Processing Area 700: Image Demosaicing Method 710: Interpolation Step 720: Decision Step 720a: Color Difference Calculation Step 720b: Indicator Factor Calculation Step 720c: Selection Step FG: Green Filter 19 201034470, FR: Red Filter Light sheet FB: blue filter «R: first pixel B: third pixel G: 'second pixel W: decision window i: coordinate value j: coordinate value

❿ 20❿ 20

Claims (1)

201034470 七 、申請專利範圍 列包含複數%插:ί像:【:::素陣列’該像素, -第-強度值(CU,每一-第-顏色之 顏色之-第二強度船象素㈣應至一第二 標,i代表每—祕像么縱二代表每—魅像素之橫座 對每-該些第色彩内插方法包含: 該些第二像素對應至該ί!Γ色:=計算出每- 中該内插步驟包含: 顏色之一估測強度值⑹,其 麵=像素陣列來提供-高通遮罩_ pass 貞顯第—像素相對㈣像素陣列之一邊緣 (edge)的位置’並輸出-_、结果(f); ,行—第—斜向強度值計算步驟,以計算出一第 係根據= (《)’其中該第-斜向強度值計算步驟 … 抓 , :進行一第二斜向強度值計算步驟,以計算出一 二斜向強度值(见^7),其中該第二斜向強度值計算步 係根據一公式: SIVS =GUXJ+GIJ+X ; 進行一估測參數計算步驟,以計算出一估測參 ($),其中該估測參數計算步驟係根據一公式: 21 201034470 NW SE') max siv ,srv < \ hj i,j) min 二 NW SE、 SIV . . ,SIV ·. .\ 、 l,J hj) if otherwise ;以及 進行一估測強度值計算步驟,以計算該估測強度 值(4) ’其中該估測強度值計算步驟係根據一公式: PU广卞货】、+\(2Ri,厂hd2,j-2、。 一2.如申請專利範圍第1項所述之色彩内插方法,其中 該同通遮罩為拉普拉斯遮罩(Lapalacian Mask)或高斯拉普 拉斯遮罩(Laplacian of Gaussian Mask)。 3.如申請專利範圍第1項所述之色彩内插方法,其中 該第-顏色為綠色,該第二顏色為紅色或藍色。 ^ 4· 一種電腦程式產品,經由一電腦載入該程式並執行 鲁=該電腦可進行如申請專利範圍第丨項所述之色彩内插 .種色$内插方法,適用於一像素陣列,其中該像 素陣列包含減個像素,該些像素包含複數個第—像素和 複數個第二像素’每—該些第—像素具有對應至-第-顏 色之-第-顏色強度值(GJ,每—該些第二像素具有對應 =第二,色之-第二顏色強度值⑷,其中〕·代表每一該 i像素之橫座標,i代表每-該些像素之縱座標包含,該色 彩内插方法包含: 22 201034470 對每-該些第二像素進行一内插步驟,以計算 一 該些第二像素對應至該帛色之—估測 中該内插步驟包含: 長 根據該像素陣列來提供一高通遮罩(high pass mask)’以仙m第二像素相對於該像素陣列之一邊緣 (edge)的位置,並輸出一偵測結果⑴; ,進灯一第一斜向強度值計算步驟,以計算出一第 斜向強度值〇〇其中該第一斜向強度 係根據一公式: 抓d,j+Gij+' 進打一第二斜向強度值計算步驟,以計算出一第 ,斜向強度值(〇,其中該第二斜㈣度值計算步驟 係根據一公式: mNE,抓sw、 ij ^(sjvne>Sivsw] v Uj i,J 進行-估測參數計算步驟,以計算出一估測參數 ’其中該估測參數計算步驟係根據一公式·· (—_ NR L 45。 hj if />〇 ;以及 otherwise W ^ ^古測強度值計算步驟,以計算該估測強度 (化)’其中該估測強度值計算步驟係根據一公式: Ύ《)4(2ά2,/-2·ί) 23 201034470 7.如申請專利範圍第5項所述之色彩内插方法,其中 該第一顏色為綠色,該第二顏色為紅色或藍色。 ^ 8. 一種電腦程式產品,經由一電腦载入該程式並執行 後’該電腦可進行如中請專利範圍第5項所述之色彩内插 方法。201034470 VII. The scope of the patent application includes a plural number of inserts: ί like: [::: prime array 'this pixel, - the first intensity value (CU, each - the color of the - color - the second intensity ship pixel (four) Should be a second standard, i for each - the secret image, the vertical two represents each - the charm of the horizontal seat pair - each of the first color interpolation method includes: the second pixel corresponds to the ί! Γ color: = The interpolation step is calculated to include: one of the color estimated intensity values (6), the face = pixel array to provide - the high pass mask _ pass 第 display - the position of the pixel relative to one (four) pixel array edge 'And output -_, result (f);, line - the first oblique intensity value calculation step to calculate a first system according to = (")' where the first - oblique intensity value calculation step ... grasp, : proceed a second oblique intensity value calculation step to calculate a two-direction oblique intensity value (see ^7), wherein the second oblique intensity value calculation step is based on a formula: SIVS = GUXJ + GIJ + X; Estimating a parameter calculation step to calculate an estimated parameter ($), wherein the estimating parameter calculating step is based on a formula 21 201034470 NW SE') max siv , srv < \ hj i,j) min two NW SE, SIV . . , SIV ·. .\ , l, J hj) if otherwise ; and perform an estimated intensity calculation step To calculate the estimated intensity value (4) 'where the estimated intensity value calculation step is based on a formula: PU wide goods], +\(2Ri, factory hd2, j-2, . 2. 2. If the patent application scope The color interpolation method according to Item 1, wherein the same mask is a Lapalacian Mask or a Laplacian of Gaussian Mask. The color interpolation method according to item 1, wherein the first color is green, and the second color is red or blue. ^ 4· A computer program product, which is loaded into the program via a computer and executed Lu = the computer can Performing a color interpolation as described in the scope of the patent application, the color interpolation method is applicable to a pixel array, wherein the pixel array includes subtracted pixels, and the pixels include a plurality of pixels and a plurality of pixels Two pixels 'each-the first-pixels have a corresponding to - the first color - the first a color intensity value (GJ, each - the second pixels have a corresponding = second, color - second color intensity value (4), wherein - · represents the abscissa of each of the i pixels, i represents each of the pixels The ordinate includes: the color interpolation method includes: 22 201034470 performing an interpolation step for each of the second pixels to calculate a second pixel corresponding to the color - the interpolation step in the estimation The method includes: providing a high pass mask according to the pixel array to position a second pixel relative to an edge of the pixel array, and outputting a detection result (1); a first oblique intensity value calculation step to calculate a first oblique intensity value, wherein the first oblique intensity is based on a formula: grab d, j+Gij+', enter a second oblique intensity value Steps to calculate a first, oblique intensity value (〇, wherein the second oblique (four) degree value calculation step is based on a formula: mNE, grab sw, ij ^(sjvne>Sivsw) v Uj i,J Measuring parameter calculation steps to calculate an estimated parameter 'where the estimate The parameter calculation steps are based on a formula · (-_ NR L 45. Hj if />〇; and otherwise W ^ ^ ancient measured intensity value calculation step to calculate the estimated intensity (chemical) 'where the estimated intensity value calculation step is based on a formula: Ύ ") 4 (2 ά 2, / The method of color interpolation according to claim 5, wherein the first color is green and the second color is red or blue. ^ 8. A computer program product that loads the program and executes it via a computer. The computer can perform the color interpolation method as described in item 5 of the patent application. 9.種影像解馬赛克方法,用來處理對應一彩色濾鏡 陣列之-像素P翔’以重建該像素陣賴缺乏的色彩成 份,該影像解馬赛克方法包含: 提供該像素陣列,其中該像素陣列包含: 複數個第-像素,其中每一該些第一像素具有對 〜至一第一顏色之一第一強度值(D;以及 =個第二像素,其中每一該些第二像素具有對 Γ.—顏色之一第二強度值(心),該些第二像素包9. An image demosaicing method for processing a pixel corresponding to a color filter array to reconstruct a color component lacking the pixel matrix, the image demosaicing method comprising: providing the pixel array, wherein the pixel array The method includes: a plurality of first-pixels, wherein each of the first pixels has a first intensity value (D; and a second pixel) of the first to the first color, wherein each of the second pixels has a pair Γ.—one of the second intensity values (heart), the second pixel pack :数個已估測像素,其中該些已估測像素係對 應至測強度值,該些第一估測強度值係 愿至該第一顏色;以及 目;個未估測像素’其中該些未估測像素包含 ^該目====_該些已估測 該第驟,以計算出該目標像素對應. 進行-内強度值’該強度值估測步驟包含 乂驟,以計算出該目標像素之複數1 24 201034470 候選估測料值,n 該些= 候選估測強度值和 估測強度值 法 1^.如中請專利範时9項所述 其中該決定步驟係從該些候 之影像解馬賽克方 來做為該第二估㈣候選估測強度值中選擇一者 ❿ u•如申請專利範圍第9項 法,其t該内插步驟包含: %像解馬赛克方 辛於供一高通遮罩,以偵測該目標像 ί: ΓΓ邊緣的位置’並輸出-_結果⑺; 進仃-第-斜向強度值計算步驟, =4值(警其中該第一斜向強度值計算步驟係根據 saJ+Gl,H ·, 一第二斜 步驟係根據一 進行一第二斜向強度值計算步驟, 向強度值(《ST^f),其中該第二斜向強度值計糞 公式: SIVu=Gmj+Gij+] 佑測參數 進行一估測參數計算步驟,以計算出 其令該估測參數計算步驟係根據一公式: L hj (NW SE\ max SIV .,57F. I, if />〇 V l,J hj) (NW SE\ min SIV . . ,SIV L otherwise K l,J hj 以及 進行一候選佑測強度值計算步驟,以計算該些候選估 25 201034470 選估測強度值計算步 之值’其中該候 〜+2Ί2)。 申請專利範圍第η 述 法’其中該高通料為拉普拉斯料或高斯;^拉=克罩方 > f rb如U利圍第9項所述之影像解馬赛克方 法’其中該㈣㈣包含: 根據該像素陣列來提供一高通遮罩, 素於該像素陣列之一邊绫的 、i〜目軲像 緣的位置,並輸出一偵測結果⑺; 進灯一第一斜向強度值計算步驟,以計算出-第一斜 =度值«),其中該第—斜向強度值計算步驟係根據一 SIV,〜+G一 進行一第二斜向強度值計算步驟,以計算出一第二斜 向強度值«)’其中該第二斜向強度值計算步驟係根據一 公式: SIVu=Gi+lJ+Gl 進行一估測參數計算步驟,以計算出一估測參數 其中該估測參數計算步驟係根據一公式: L hj min NE SW^ SIV ,SIV κ hj i,j 以及 otherwise 進行一候選估測強度值計算步驟’以計算該些候選估 26 201034470 •測強度值之—去“、 ^ .驟係根據一公^⑹之值’其中該候選估測強度值計算步 \Π、、、hj-广RM,j+2)。 、4.如申睛專利範圍第13項所述之影像解馬賽克方 法’其中該高通遮罩為拉普拉斯遮罩α__ηΜ_)。 φ 如申請專利範圍第9項所述之影像解馬賽克方 法,其中該第一顏色為綠色,該第二顏色為紅色或藍色。 16. —種電腦程式產品,經由一電腦載入該程式並執 行後,該電腦可進行如申請專利範圍第9項所述之影像解 馬賽克方法^ 27: a plurality of estimated pixels, wherein the estimated pixels correspond to measured intensity values, the first estimated intensity values are intended to be the first color; and the first unestimated pixels are selected The unestimated pixel includes ^the target====_the estimated step is calculated to calculate the target pixel corresponding. The performing-inner intensity value' the intensity value estimating step includes a step to calculate the The number of target pixels 1 24 201034470 Candidate estimated material value, n These = candidate estimated intensity value and estimated intensity value method 1 ^. As stated in the patent application, the decision step is from The image demosaicing side is selected as one of the second estimated (four) candidate estimated intensity values. • If the patent application scope ninth method, the interpolation step includes: % like the mosaic mosaic party a high-pass mask to detect the position of the target image ί: ΓΓ edge and output - _ result (7); enter the 仃 - first - oblique intensity value calculation step, = 4 value (alarm where the first oblique intensity value The calculation step is based on saJ+Gl, H ·, and a second oblique step is performed according to one The second oblique intensity value calculation step, the intensity value ("ST^f", wherein the second oblique intensity value formula: SIVu=Gmj+Gij+] is used to perform an estimation parameter calculation step to calculate It makes the estimation parameter calculation step according to a formula: L hj (NW SE\ max SIV ., 57F. I, if /> 〇V l, J hj) (NW SE\ min SIV . . , SIV L otherwise K l, J hj and a candidate for calculating the intensity value calculation step to calculate the value of the calculation step for the candidate evaluations 25 201034470. The candidate value is +2Ί2. The scope of the patent application is η. Wherein the high-pass material is a Laplace material or a Gaussian; ^拉=克罩方> f rb, such as the image demosaicing method described in Item 9 of the U.S., wherein the (four) (four) comprises: providing a pixel according to the pixel array a high-pass mask, which is located at the edge of one of the pixel arrays, i to the position of the image edge, and outputs a detection result (7); a first oblique intensity value calculation step of the lamp to calculate - first oblique = degree value «), wherein the first - oblique intensity value calculation step is based on a SIV, ~ + G Performing a second oblique intensity value calculation step to calculate a second oblique intensity value «)', wherein the second oblique intensity value calculation step performs an estimation according to a formula: SIVu=Gi+lJ+Gl a parameter calculation step to calculate an estimated parameter, wherein the estimated parameter calculating step is based on a formula: L hj min NE SW^ SIV , SIV κ hj i, j and otherwise performing a candidate estimated intensity value calculating step Calculate the candidate estimates 26 201034470 • Measure the intensity value - go to ", ^ . According to the value of a ^ ^ (6) 'where the candidate estimated intensity value is calculated step Π, ,, hj-广RM, j+2 ). 4. The image demosaicing method of claim 13 wherein the high pass mask is a Laplacian mask α__ηΜ_). φ. The image demosaicing method of claim 9, wherein the first color is green and the second color is red or blue. 16. A computer program product, after loading and executing the program via a computer, the computer can perform the image demosaicing method as described in claim 9 of the patent application.
TW098107436A 2009-03-06 2009-03-06 Color interpolation method and image demosaicking method using the same and computer program production thereof TWI477155B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
TW098107436A TWI477155B (en) 2009-03-06 2009-03-06 Color interpolation method and image demosaicking method using the same and computer program production thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW098107436A TWI477155B (en) 2009-03-06 2009-03-06 Color interpolation method and image demosaicking method using the same and computer program production thereof

Publications (2)

Publication Number Publication Date
TW201034470A true TW201034470A (en) 2010-09-16
TWI477155B TWI477155B (en) 2015-03-11

Family

ID=44855519

Family Applications (1)

Application Number Title Priority Date Filing Date
TW098107436A TWI477155B (en) 2009-03-06 2009-03-06 Color interpolation method and image demosaicking method using the same and computer program production thereof

Country Status (1)

Country Link
TW (1) TWI477155B (en)

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7525584B2 (en) * 2004-01-05 2009-04-28 Lifesize Communications, Inc. Fast edge directed demosaicing
US7456881B2 (en) * 2006-01-12 2008-11-25 Aptina Imaging Corporation Method and apparatus for producing Bayer color mosaic interpolation for imagers

Also Published As

Publication number Publication date
TWI477155B (en) 2015-03-11

Similar Documents

Publication Publication Date Title
CN102273208B (en) Image processing device and image processing method
JP5904213B2 (en) Image processing apparatus, image processing method, and program
US9270895B2 (en) Methods and apparatus for true high dynamic range imaging
US8131067B2 (en) Image processing apparatus, image processing method, and computer-readable media for attaining image processing
TWI328962B (en)
EP2278788B1 (en) Method and apparatus for correcting lens shading
WO2013031367A1 (en) Image processing device, image processing method, and program
EP2584782A1 (en) Image processing device, image processing method, and program
TW200908703A (en) Methods and apparatuses for defective pixel detection and correction
CN106937064B (en) Detection method, bearing calibration and the device of digital picture bad point
CN103604371A (en) Mobile terminal and object measurement method thereof
CN104735360B (en) Light field image treating method and apparatus
TW201026079A (en) Apparatus for demosaicing colors and method thereof
CN107966137A (en) A kind of satellite platform flutter detection method based on TDICCD splice regions image
JP2015050494A (en) Imaging device
JP2013066157A (en) Image processing apparatus, image processing method, and program
US8773556B2 (en) Signal processing device, imaging device, and signal processing method for color interpolation
JP2018017600A (en) Heat source detector, heat source detection method, and heat source detection program
US20120127347A1 (en) Image processing apparatus and system
TW201034470A (en) Color interpolation method and image demosaicking method using the same and computer program production thereof
RU2538340C1 (en) Method of superimposing images obtained using different-range photosensors
TW201445506A (en) Method and apparatus for determining interpolating direction for color demosaicking and non-transitory machine-readable storage medium
TWI493979B (en) Demosaicking method, non-transitory machine-readable storage medium and image signal processor
JP2009095012A (en) Method for determining direction of interpolation, method and apparatus for color interpolation
CN105427310B (en) Image registration method of sparse feature matching on the basis of local linear constraint

Legal Events

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