TWI477155B - 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
TWI477155B
TWI477155B TW098107436A TW98107436A TWI477155B TW I477155 B TWI477155 B TW I477155B TW 098107436 A TW098107436 A TW 098107436A TW 98107436 A TW98107436 A TW 98107436A TW I477155 B TWI477155 B TW I477155B
Authority
TW
Taiwan
Prior art keywords
intensity value
pixels
color
estimated
calculation step
Prior art date
Application number
TW098107436A
Other languages
Chinese (zh)
Other versions
TW201034470A (en
Inventor
Hsien Chuan Tai
Wentsung Huang
Wenjan 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

Description

色彩內插方法與應用此色彩內插方法之影像解馬賽克方法及其電腦程式產品Color interpolation method and image demosaicing method using the color interpolation method and computer program product thereof

本發明是有關於一種色彩內插方法與應用此色彩內插方法之影像解馬賽克方法,特別是應用於處理彩色濾光片所產生之影像的色彩內插方法與應用此色彩內插方法之影像解馬賽克方法。The present invention relates to a color interpolation method and an image demosaicing method using the color interpolation method, in particular, a color interpolation method applied to an image generated by a color filter and an image using the color interpolation method. Demosaicing method.

近年來,數位相機(Digital Still Cameras;DSCs)成為非常受歡迎的消費性電子產品。數位相機一般係利用電荷耦合元件(Charge Couple Device;CCD)或互補式金氧半導體(CMOS)感測器將所感測到之入射光轉化成電氣信號,然後這些電氣信號經類比/數位的轉換,成為數位影像信號。In recent years, Digital Still Cameras (DSCs) have become very popular consumer electronics products. A digital camera generally converts the sensed incident light into an electrical signal by means of a charge coupled device (CCD) or a complementary metal oxide semiconductor (CMOS) sensor, and then these analog signals are converted by analog/digital conversion. Become a digital image signal.

請參照第1圖,其係繪示習知之彩色濾光片陣列(Color Filter Array;CFA)的結構示意圖。為了節省取樣的色彩像素及感測器的尺寸,一般最常採用彩色濾光片陣列來作為色彩取樣格式,因此CCD或CMOS感測器上通常會鍍一層彩色濾光片陣列。一般常使用之彩色濾光片陣列係採用貝爾(Bryce E. Bayer)所發表之CFA,如第1圖所示,其中FR係為紅色濾光片、FG係為綠色濾光片以及FB係為藍色濾光片。當採用CFA時,每一個取樣點只有一個顏色,即全色系(即紅、綠、藍三色)的三分之一。由於CFA中的每一濾鏡係對應一像素並僅允許特定色彩成份通過,因此在所擷取的影像被進一步處理或顯示之前,每一像素所缺乏的色彩成份便必須先進行重建,以使每一像素包含所有的三種色彩成份。Please refer to FIG. 1 , which is a schematic structural diagram of a conventional color filter array (CFA). In order to save the size of the sampled color pixels and the sensor, a color filter array is generally used as the color sampling format, so a color filter array is usually plated on the CCD or CMOS sensor. A commonly used color filter array is a CFA published by Bryce E. Bayer, as shown in Fig. 1, wherein the FR system is a red filter, the FG system is a green filter, and the FB system is Blue filter. When using CFA, each sampling point has only one color, that is, one-third of the full-color system (ie, three colors of 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 color components.

為了自原始感測資料重建出一完整的彩色影像,通常係藉由色彩內插法來估測每一像素所缺乏的兩種色彩成份。所謂的色彩內插法係依據每一目標像素之周遭一部份像素所提供的資訊來進行,亦即,當一CFA為已知時,則每一像素所缺乏的兩種色彩成份便可經由使用相鄰像素所提供的資訊而加以重建出來。而整體影像之重建即為業界習知的解馬賽克操作(demosaicking)。In order to reconstruct a complete color image from the original sensing data, color interpolation is usually used to estimate the two color components that each pixel lacks. The so-called color interpolation method is based on the information provided by a part of the pixels of each target pixel, that is, when a CFA is known, the two color components lacking each pixel can be Reconstructed using information provided by adjacent pixels. The reconstruction of the overall image is a well-known demosaicking operation in the industry.

目前的解碼賽克(demosaicking)技術對於貝爾圖形的色彩過濾陣列(Bayer CFA)皆只能做到垂直及水平邊方向的估測及重建,然而對於另外兩個也可能存在於電子影像中的45°和135°邊方向,並無有效的重建方法。The current decoding demozaicking technology can only estimate and reconstruct the vertical and horizontal edges of the Bayer CFA color filter array (Bayer CFA). However, the other two may exist in the electronic image. There is no effective reconstruction method for the ° and 135° sides.

因此,本發明之一態樣是在提供一種色彩內插方法。此色彩內插方法可沿著目標像素之135°邊方向來進行內插。此色彩內插方法係適用於一像素陣列,此像素陣列包含複數個像素,這些像素包含複數個第一像素和複數個第二像素,每一第一像素具有對應至一第一顏色之一第一強度值(G i,j ),每一第二像素具有對應至一第二顏色之一第二強度值(R i,j ),其中j代表每一像素之橫座標,i代表每一像素之縱座標。在此色彩內插方法中,首先對每一第二像素進行內插步驟,以計算出每一第二像素對應至該第一顏色之一估測強度值(P i,j )。此色彩內插方法係對每一第二像素進行一內插步驟,以計算出每一第二像素對應至第一顏色之一估測強度值(P i,j )。在此內插步驟中,首先,根據此像素陣列來提供高通遮罩(high pass mask),以偵測第二像素(目標像素)相對於像素陣列之一邊緣(edge)的位置,並提供偵測結果(f)。然後,進行一第一斜向強度值計算步驟,以計算出第一斜向強度值(),其中此第一斜向強度值計算步驟係根據一公式:。接著,進行一第二斜向強度值計算步驟,以計算出一第二斜向強度值(),其中此第二斜向強度值計算步驟係根據一公式:。接著,進行一估測參數計算步驟,以計算出一估測參數(),其中此估測參數計算步驟係根據一公式:Accordingly, one aspect of the present invention is to provide a color interpolation method. This color interpolation method can be interpolated along the 135° side of the target pixel. The color interpolation method is applicable to a pixel array, the pixel array includes a plurality of pixels, the pixels include a plurality of first pixels and a plurality of second pixels, each of the first pixels having a corresponding one to a first color An intensity value ( G i,j ), each second pixel having a second intensity value ( R i,j ) corresponding to one of the second colors, wherein j represents the abscissa of each pixel, and i represents each pixel The ordinate. In this color interpolation method, an interpolation step is first performed for each second pixel to calculate an estimated intensity value ( P i,j ) corresponding to one of the first colors for each second pixel. The color interpolation method performs an interpolation step for each second pixel to calculate an estimated intensity value ( P i,j ) corresponding to one of the first colors for each second pixel. In this interpolation step, first, a high pass mask is provided according to the pixel array to detect the position of the second pixel (target pixel) relative to an edge of the pixel array, and provide detection Test result (f). Then, a first oblique intensity value calculation step is performed to calculate the first oblique intensity value ( ), wherein the first oblique intensity value calculation step is based on a formula: . Next, a second oblique intensity value calculation step is performed to calculate a second oblique intensity value ( ), wherein the second oblique intensity value calculation step is based on a formula: . Next, an estimation parameter calculation step is performed to calculate an estimation parameter ( ), wherein the estimation parameter calculation step is based on a formula:

然後,進行一估測強度值計算步驟,以計算此估測強度值(P i,j ),其中此估測強度值計算步驟係根據一公式:Then, an estimated intensity value calculation step is performed to calculate the estimated intensity value ( P i,j ), wherein the estimated intensity value calculation step is based on a formula:

本發明之另一態樣是在提供一種色彩內插方法。此色彩內插方法可沿著目標像素之45°邊方向來進行內插。此色彩內插方法係適用於一像素陣列,此像素陣列包含複數個像素,這些像素包含複數個第一像素和複數個第二像素,每一第一像素具有對應至一第一顏色之一第一強度值(G i,j ),每一第二像素具有對應至一第二顏色之一第二強度值(R i,j ),其中j代表每一像素之橫座標,i代表每一像素之縱座標。此色彩內插方法係對每一第二像素進行一內插步驟,以計算出每一第二像素對應至第一顏色之一估測強度值(P i ,j )。在此內插步驟中,首先根據像素陣列來提供高通遮罩(high pass mask),以偵測第二像素相對於像素陣列之一邊緣(edge)的位置,並提供偵測結果(f)。然後,進行第一斜向強度值計算步驟,以計算出一第一斜向強度值(),其中此第一斜向強度值計算步驟係根據一公式:。接著,進行一第二斜向強度值計算步驟, 以計算出一第二斜向強度值(),其中此第二斜向強度值計算步驟係根據一公式:。然後,進行一估 測參數計算步驟,以計算出一估測參數(),其中此估測參數計算步驟係根據一公式: 接著,進行一估測強度值計算步驟,以計算一估測強度值(P i ,j ),其中此估測強度值計算步驟係根據一公式: Another aspect of the present invention is to provide a color interpolation method. This color interpolation method can be interpolated along the 45° side of the target pixel. The color interpolation method is applicable to a pixel array, the pixel array includes a plurality of pixels, the pixels include a plurality of first pixels and a plurality of second pixels, each of the first pixels having a corresponding one to a first color An intensity value ( G i,j ), each second pixel having a second intensity value ( R i,j ) corresponding to one of the second colors, wherein j represents the abscissa of each pixel, and i represents each pixel The ordinate. The color interpolation method performs an interpolation step for each second pixel to calculate an estimated intensity value ( P i , j ) corresponding to one of the first colors of each 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 the detection result (f) is provided. Then, performing a first oblique intensity value calculation step to calculate a first oblique intensity value ( ), wherein the first oblique intensity value calculation step is based on a formula: . Next, a second oblique intensity value calculation step is performed to calculate a second oblique intensity value ( ), wherein the second oblique intensity value calculation step is based on a formula: . Then, an estimation parameter calculation step is performed to calculate an estimation parameter ( ), wherein the estimation parameter calculation step is based on a formula: Next, an estimated intensity value calculation step is performed to calculate an estimated intensity value ( P i , j ), wherein the estimated intensity value calculation step is based on a formula:

本發明之又一態樣是在提供一種影像解馬賽克方法,用來處理對應一彩色濾鏡陣列之一像素陣列,以重建此像素陣列所缺乏的色彩成份。在此影像解馬賽克方法中,首先提供此像素陣列,此像素陣列包含複數個第一像素和第二像素,其中每一第一像素具有對應至一第一顏色之一第一強度值(G i ,j ),而每一第二像素具有對應至一第二顏色之一第二強度值(R i ,j )。這些第二像素包含複數個已估測像素 和未估測像素,其中未估測像素包含目標像素,而未估測像素之其餘者和已估測像素係以目標像素為中心來環繞。然後,進行一強度值估測步驟,以計算出此目標像素對應至第一顏色之一第二估測強度值。在此強度值估測步驟中,首先進行內插步驟,以計算出目標像素之複數個候選估測強度值。然後,進行一決定步驟,以根據候選估測強度值和第一估測強度值,來決定目標像素之第二估測強度值。Yet another aspect of the present invention is to provide an image demosaicing method for processing a pixel array corresponding to a color filter array to reconstruct a color component lacking in the pixel array. In the image demosaicing method, the pixel array is first provided, the pixel array includes a plurality of first pixels and second pixels, wherein each of the first pixels has a first intensity value corresponding to one of the first colors ( G i , j ), and each second pixel has a second intensity value ( R i , j ) corresponding to one of the second colors. The second pixels comprise a plurality of estimated pixels and unestimated pixels, wherein the unestimated pixels comprise target pixels, and the remaining of the unestimated pixels and the estimated pixels are centered around the target pixels. Then, an intensity value estimation step is performed to calculate that the target pixel corresponds to one of the first colors and the second estimated intensity value. In this intensity value estimation step, an interpolation step is first performed to calculate a plurality of candidate estimated intensity values of the target pixel. Then, a decision step is performed to determine a second estimated intensity value of the target pixel based on the candidate estimated intensity value and the first estimated intensity value.

為了方便說明起見,在以下的敘述中,將以”強度值”來代表像素中某一顏色的亮度,例如:綠色強度值係代表像素的綠色亮度值。For convenience of explanation, in the following description, the "intensity value" will be used to represent the brightness of a certain color in the pixel, for example, the green intensity value represents the green brightness value of the pixel.

請同時參照第2圖和第3圖,第2圖係繪示根據本發明一實施例之像素陣列100的結構示意圖,第3圖係繪示根據本發明一實施例之處理區域102的結構示意圖。像素陣列100包含複數個第一像素R、第二像素G和第三像素B,這些像素根據彩色濾光片陣列之結構可分別對應至不同的顏色。以貝爾濾光片陣列為例,第一像素R係對應至紅色,第二像素G係對應至綠色,第三像素B係對應至藍色。另外,為了進行色彩內插法,使用者通常會利用一決定視窗(decision window)W來決定處理區域102的大小,再利用處理區域102中的像素來進行內插。在本實施例中,決定視窗之大小為5乘5個像素大小,但本發明並不受限於此。Referring to FIG. 2 and FIG. 3 simultaneously, FIG. 2 is a schematic structural diagram of a pixel array 100 according to an embodiment of the invention, and FIG. 3 is a schematic structural diagram of a processing region 102 according to an embodiment of the invention. . The pixel array 100 includes a plurality of first pixels R, second pixels G, and third pixels B, and the pixels may respectively correspond to different colors according to the structure of the color filter array. Taking the Bell filter array as an example, the first pixel R corresponds to red, the second pixel G corresponds to green, and the third pixel B corresponds to blue. In addition, in order to perform color interpolation, the user usually determines the size of the processing area 102 by using a decision window W, and then uses the pixels in the processing area 102 for interpolation. 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.

內插方法200的流程示意圖。色彩內插方法200係用以估測處理區域102之一目標像素所缺乏的色彩成份。一般而言,由於人眼對於綠色較為敏感,因此在以下的說明中,將以估測座標為(i,j)之第一像素R(以下稱為目標像素)中的綠色強度值pi,j 為例來說明色彩內插方法100。A schematic diagram of the flow of the interpolation method 200. The color interpolation method 200 is used to estimate color components that are lacking in a target pixel of one of the processing regions 102. In general, since the human eye is sensitive to green, in the following description, the green intensity value p i in the first pixel R (hereinafter referred to as the target pixel) whose coordinates are (i, j) is estimated , j is an example to illustrate the color interpolation method 100.

在色彩內插方法200中,首先進行遮罩提供步驟210,以提供預設之高通遮罩(high pass mask),例如:拉普拉斯遮罩(Laplacian mask)或高斯拉普拉斯遮罩(Laplacian of Gaussian Mask),來偵測目標像素相對於像素陣列之邊緣(edge)的位置,並輸出一偵測結果f,其中邊緣係指像素陣列中灰階變化較大的地方。遮罩的大小係根據決定視窗來決定,由於本實施例所採用之決定視窗為5乘5個像素,因此遮罩之大小亦為5乘5個像素。接著,進行斜向強度值計算步驟220。在第一斜向強度值計算步驟220中,利用一公式來計算出斜向強度值,此公式係表示如下:In the color interpolation method 200, a mask providing step 210 is first performed to provide a preset high pass mask, such as a Laplacian mask or a Gaussian Laplacian mask. (Laplacian of Gaussian Mask), to detect the position of the target pixel relative to the edge of the pixel array, and output a detection result f, wherein the edge refers to a place where the gray scale changes greatly in the pixel array. The size of the mask is determined according to the decision window. Since the decision window used in this embodiment is 5 by 5 pixels, the size of the mask is also 5 by 5 pixels. Next, an oblique intensity value calculation step 220 is performed. In the first oblique intensity value calculation step 220, a formula is used to calculate the oblique intensity value This formula is expressed as follows:

其中係代表以目標像素為中心,由北向西估測之斜向強度值,Gi-1,j 係代表座標為(i-1,j)之第二像素G的綠色強度值,Gi,j-1 係代表座標為(i,j-1)之第二像素G的綠色強度值。然後,進行第二斜向強度值計算步驟230。在第二斜向強度值計算步驟230中,利用一公式來計算出斜向強度值,此公式係表示如下:among them The system represents the oblique intensity value estimated from the north to the west centered on the target pixel, and Gi -1,j represents the green intensity value of the second pixel G with coordinates (i-1,j), G i,j- The 1 series represents the green intensity value of the second pixel G whose coordinates are (i, j-1). Then, a second oblique intensity value calculation step 230 is performed. In the second oblique intensity value calculation step 230, a formula is used to calculate the oblique intensity value This formula is expressed as follows:

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

由上式可看出,當結果f大於或等於零時,估測參數L i,j 之中之最大者;當結果f小於零時,估測參數L i,j 之中之最小者。然後,進行強度值計算步驟250。在估測強度值計算步驟250中,根據一公式來計算估測強度值P i,j ,此公式係表示如下:It can be seen from the above equation that when the result f is greater than or equal to zero, the estimated parameter L i,j is with The largest of them; when the result f is less than zero, the estimated parameter L i,j is with The smallest of them. Then, an intensity value calculation step 250 is performed. In the estimated intensity value calculation step 250, the estimated intensity value P i,j is calculated according to a formula, which is expressed as follows:

其中,Ri,j 代表目標像素之紅色強度值,Ri-2,j+2 代表座標為(i-2,j+2)之第一像素R的紅色強度值,Ri+2,j-2 代表座標為(i+2,j-2)之第一像素R的紅色強度值。Where R i,j represents the red intensity value of the target pixel, and R i-2,j+2 represents the red intensity value of the first pixel R with coordinates (i-2,j+2), R i+2,j -2 represents the red intensity value of the first pixel R whose coordinates are (i+2, j-2).

本實施例之色彩內插方法200可沿著目標像素之135°邊方向來估測遺失的色彩。對於具有135°邊方向之邊緣的像素陣列而言,色彩內插方法200可提高估測的精確度。The color interpolation method 200 of the present embodiment can estimate the missing color along the 135° side of the target pixel. For pixel arrays having edges of 135[deg.] sides, the color interpolation method 200 can improve the accuracy of the estimation.

請參照第5圖,其係繪示根據本發明一實施例之色彩內插方法300的流程示意圖。本實施例之色彩內插方法300係類似於色彩內插方法200,但不同之處在於色彩內插方法300係用以沿著目標像素之45°邊方向來估測遺失的色彩。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, but differs in that the color interpolation method 300 is used to estimate the missing color along the 45° side of the target pixel.

在色彩內插方法300中,首先進行遮罩提供步驟310,以提供預設之高通遮罩來偵測目標像素相對於像素陣列之邊緣的位置,並提供偵測結果f。接著,進行斜向強度值計算步驟320。在斜向強度值計算步驟320中,利用一公式來計算出斜向強度值,此公式係表示如下:In the color interpolation method 300, a mask providing step 310 is first performed to provide a preset high pass mask to detect the position of the target pixel relative to the edge of the pixel array and to provide a detection result f. Next, a diagonal intensity value calculation step 320 is performed. In the oblique intensity value calculation step 320, a formula is used to calculate the oblique intensity value This formula is expressed as follows:

其中係代表以目標像素為中心,由北向東估測之斜向強度值,Gi-1, j係代表座標為(i-1,j)之第二像素G的綠色強度值,Gi,j+1 係代表座標為(i,j+1)之第二像素G的綠色強度值。然後,進行斜向強度值計算步驟330。在斜向強度值計算步驟330中,利用一公式來計算出斜向強度值,此公式係表示如下:among them The system represents the oblique intensity value estimated from north to east centering on the target pixel, and G i-1, j represents the green intensity value of the second pixel G with coordinates (i-1, j), G i,j The +1 line represents the green intensity value of the second pixel G whose coordinates are (i, j+1). 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 This formula is expressed as follows:

其中,係代表以目標像素為中心,由西向南估測之斜向強度值,Gi+1,j 係代表座標為(i+1,j)之第二像素G的綠色強度值,Gi,j-1 係代表座標為(i,j-1)之第二像素G的綠色強度值。接著,進行估測參數計算步驟340,以計算出估測參數。在估測參數計算步驟340中,係利用高通遮罩偵測得到的結果f並根據一公式來計算出估測參數,此公式係表示如下:among them, The system represents the oblique intensity value estimated from the west to the south centered on the target pixel, and G i+1,j represents the green intensity value of the second pixel G with coordinates (i+1,j), G i,j The -1 series represents the green intensity value of the second pixel G of coordinates (i, j-1). Next, an estimated parameter calculation step 340 is performed to calculate the estimated parameters. . In the estimated parameter calculation step 340, 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大於或等於零時,估測參數L i,j 之中之最大者;當結果f小於零時,估測參數L i,j 之中之最小者。然後,進行估測強度值計算步驟350。在估測強度值計算步驟350中,根據一公式來計算估測強度值P i,j ,此公式係表示如下:It can be seen from the above equation that when the result f is greater than or equal to zero, the estimated parameter L i,j is with The largest of them; when the result f is less than zero, the estimated parameter L i,j is with The smallest of them. Then, an estimated intensity value calculation step 350 is performed. In the estimated intensity value calculation step 350, the estimated intensity value P i,j is calculated according to a formula, which is expressed as follows:

其中,Ri,j 代表目標像素之紅色強度值,Ri-2,j-2 代表座標為(i-2,j-2)之第一像素R的紅色強度值,Ri+2,j+2 代表座標為(i+2,j+2)之第一像素R的紅色強度值。Where R i,j represents the red intensity value of the target pixel, and R i-2,j-2 represents the red intensity value of the first pixel R with coordinates (i-2,j-2), R i+2,j +2 represents the red intensity value of the first pixel R whose coordinates are (i+2, j+2).

本實施例之色彩內插方法300可沿著目標像素之45°邊方向來估測遺失的色彩,如此可增加影像重建的精確度。The color interpolation method 300 of the present embodiment can estimate the missing color along the 45° side of the target pixel, which can increase the accuracy of image reconstruction.

請同時參照第6圖和第7圖,第6圖係繪示根據本發明一實施例之像素陣列400的結構示意圖,第7圖係繪示根據本發明一實施例之處理區域402的結構示意圖。像素陣列400係類似於像素陣列100,且第一像素R包含有已估測像素111~116和未估測像素117~125,其中已估測像素111~116對應至綠色之色強度值已被正式的估測得知,而未估測像素117~125對應至綠色之色強度值尚未正式的被估測。另外,為了進行影像解馬賽克方法方法,使用者通常會利用決定視窗W來決定處理區域402的大小,再利用處理區域402中的像素來進行解馬賽克。在本實施例中,決定視窗之大小為5乘5個像素大小,但本發明並不受限於此。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 The official estimate shows 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 determination window W, and then performs de-mosaic using the pixels in the processing area 402. 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.

請參照第8圖,其係繪示根據本發明一實施例之影像解馬賽克方法500的流程示意圖。解馬賽克方法500係以軟性決定為架構,利用已估測像素來估測目標像素所遺失的色彩強度值,如此所獲得之重建影像可具有更高的精確度。在以下的說明中,將以估測處理區域402中座標為(i,j)之未估測像素117所遺失的綠色成份為例來說明解馬賽克方法500,其中已估測像素111~116之綠色強度值已被估測得知,而未估測像素117~125之綠色強度值則尚未被估測。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 a soft 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 precision. In the following description, the demosaicing method 500 will be described by taking the green component missing from the unestimated pixel 117 whose coordinates are (i, j) in the estimation processing region 402 as an example, in which the pixels 111 to 116 have been estimated. The green intensity value has been estimated, and the green intensity values of the unestimated pixels 117-125 have not been estimated.

在解馬賽克方法500中,首先進行內插步驟510,以計算出像素117-125對應至綠色之複數個候選估測強度值。內插步驟510可利用習知之水平內插法、垂直內插法和本發明之45°邊內插法和135°邊內插法來產生像素117-125之複數個候選估測強度值。這些候選估測強度值可為內插法所計算出的內插強度值,或是經由某些計算方法(例如:平均計算法)將內插強度值更進一步處理所獲得之強度值。接著,進行決定步驟520,以根據像素117~125之候選估測強度值和已估測像素111、112、113和116之綠色強度值,來計算出像素117之綠色估測強度值。In the demosaicing method 500, an interpolation step 510 is first performed to calculate a plurality of candidate estimated intensity values for pixels 117-125 that correspond to green. The interpolation step 510 can generate a plurality of candidate estimated intensity values for the pixels 117-125 using conventional horizontal interpolation, vertical interpolation, and 45° edge interpolation and 135° edge interpolation of the present invention. These candidate estimated intensity values may be the interpolated intensity values calculated by the interpolation method, or the intensity values obtained by further processing the interpolated intensity values by some calculation method (for example, the average calculation method). Next, a decision step 520 is performed to calculate the green estimated intensity value of the pixel 117 based on the candidate estimated intensity values of the pixels 117-125 and the green intensity values of the estimated pixels 111, 112, 113, and 116.

在決定步驟520中,首先進行色差計算步驟520a,以計算出以像素117為中心,視窗W區域內之複數個色差值,其中色差計算步驟520a係利用以下公式計算:In decision step 520, a color difference calculation step 520a is first performed to calculate a plurality of color difference values within the window W region centered on the pixel 117. with , wherein the color difference calculation step 520a is calculated using the following formula:

其中i,j係代表像素之座標值,R係代表像素的紅色強度值,係代表像素之已估測綠色強度值,代表像素之水平估測綠色強度值,代表像素之垂直估測綠色強度值,代表像素於45°邊之估測綠色強度值代表像素於135°邊之估測綠色強度值。接著,進行指示因子(indicator)計算步驟520b,以計算出指示因子群組(indicator set)Ω i,j ={ΔH i,j V i,j ,Δ45° i,j ,Δ135° i,j },其中指示因子係計算視窗W區域內沿著垂直,水平,45°,135°方向色差變化差異度,本實施例以下列公式計算而得,但本發明不受限於此。Where i, j represents the coordinate value of the pixel, and R represents the red intensity value of the pixel. Represents the estimated green intensity value of the pixel, Representing the level of the pixel to estimate the green intensity value, Represents the vertical estimated green intensity value of the pixel, representing the estimated green intensity value of the pixel at 45° , The estimated green intensity value of the pixel on the 135° side. Next, an indicator calculation step 520b is performed to calculate an indicator set Ω i,j ={Δ H i,j V i,j ,Δ45° i,j ,Δ135° i , j }, wherein the indicator factor calculates the difference in color difference variation along the vertical, horizontal, 45°, and 135° directions in the window W region, and the present embodiment is calculated by the following formula, but the present invention is not limited thereto.

然後,進行選擇步驟520c,以根據指示因子群組來從候選估測強度值中選擇像素117之估測綠色強度值,其中選擇步驟520c係選擇色差變化差異度最小方向其對應之估測強度值,本實施例以下列公式計算而得,但本發明不受限於此。Then, a selection step 520c is performed to select the estimated green intensity value of the pixel 117 from the candidate estimated intensity values according to the indicator factor group. The selection step 520c selects the estimated intensity value corresponding to the minimum direction of the color difference change difference, and the present embodiment is calculated by the following formula, but the invention is not limited thereto.

由上述說明可知,在本實施例中,已正式估測像素111、112、113、116和未正式估測像素118、121、122、123係以目標像素117為中心來圍繞,因此可根據已正式估測像素111、112、113、116之已估測強度值以及未正式估測像素118、121、122、123對應至多個內插方式所得之候選強度值()來決定這些候選強度值之一者做為目標像素117之估測綠色強度值,或是再將候選之綠色估測強度值經過一些計算(例如平均計算法)來計算出目標像素117之估測綠色強度值。 As can be seen from the above description, in the present embodiment, the pixels 111, 112, 113, 116 and the un-estimated pixels 118, 121, 122, and 123 are surrounded by the target pixel 117, and thus can be Formally estimating the estimated intensity values of the pixels 111, 112, 113, 116 and the candidate intensity values of the un-formally estimated pixels 118, 121, 122, 123 corresponding to the plurality of interpolation methods ( The one of the candidate intensity values is determined as the estimated green intensity value of the target pixel 117, or the candidate green estimated intensity value is further calculated (eg, the average calculation method) to calculate the estimated target pixel 117. Measure the green intensity value.

另外,當目標像素117之綠色強度值被估測得知後,決定視窗W便會決定下一個5乘5像素大小之處理區域,例如:以未估測像素118為中心之處理區域。此時,由於目標像素117之綠色強度值已被計算出來,因此未正式估測像素118之綠色估測強度值可根據已正式估測像素112、113、114、117和未正式估測像素119、122、123、124來計算得知。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, 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, 124 to calculate.

請同時參照第9圖、第10圖和第11圖,第9圖係繪示根據本發明一實施例之像素陣列400的結構示意圖,第10圖係繪示根據本發明一實施例之處理區域602的結構示意圖,第11圖係繪示根據本發明一實施例之影像解馬賽克方法700的流程示意圖。在本實施例中,影像解馬賽克方法700係利用綠色強度值已正式估測之像素117來對下一個未正式估測像素118進行綠色強度值之估測。在影像解馬賽克方法700中,首先進行解馬賽克方法500,以獲得目標估測像素117所遺失的綠色成份。當目標像素117之綠色強度值被正式估測得知後,決定視窗W便移動至以未正式估測像素118為中心之處理區域602。接著,進行內插步驟710,以計算出未正式估測像素118、119、122、123、124對應至綠色之複數個候選估測強度值。內插步驟710可利用習知之水平內插法、垂直內插法和本發明之45°度邊內插法和135°邊內插法來產生像素118、119、122、123、124之複數個候選估測強度值。這些候選估測強度值可為內插法所計算出的內插強度值,或是經由某些計算方法(例如:平均計算法)將內插強度值更進一步處理所獲得之強度值。接著,進行決定步驟720,以根據候選估測強度值和已正式估測像素112、113、114和117之綠色強度值,來計算出像素118之綠色估測強度值。Please refer to FIG. 9 , FIG. 10 and FIG. 11 , FIG. 9 is a schematic structural diagram of a pixel array 400 according to an embodiment of the invention, and FIG. 10 is a diagram showing a processing area according to an embodiment of the invention. FIG. 11 is a schematic flow chart of an image demosaicing method 700 according to an embodiment of the invention. In the present embodiment, the image demosaicing method 700 uses the pixel 117 whose green intensity value has been officially estimated to estimate the green intensity value for the next un-estimated pixel 118. In the image demosaicing method 700, the demosaicing method 500 is first performed to obtain the green component lost by the target estimation pixel 117. When the green intensity value of the target pixel 117 is officially estimated, the decision window W moves to the processing region 602 centered on the un-estimated pixel 118. Next, an interpolation step 710 is performed to calculate a plurality of candidate estimated intensity values corresponding to green that are not formally estimated pixels 118, 119, 122, 123, 124. Interpolation step 710 can generate a plurality of pixels 118, 119, 122, 123, 124 using conventional horizontal interpolation, vertical interpolation, and 45° degree edge interpolation and 135° edge interpolation of the present invention. Candidate estimated intensity value. These candidate estimated intensity values may be the interpolated intensity values calculated by the interpolation method, or the intensity values obtained by further processing the interpolated intensity values by some calculation method (for example, the average calculation method). Next, a decision step 720 is performed to calculate the green estimated intensity value of the pixel 118 based on the candidate estimated intensity value and the green intensity values of the officially estimated pixels 112, 113, 114, and 117.

在決定步驟720中,首先進行色差計算步驟720a,計算出以像素118為中心,視窗W區域內之複數個色差值,其中色差計算步驟720a係利用以下公式計算:In decision step 720, a color difference calculation step 720a is first performed to calculate a plurality of color difference values within the window W region centered on the pixel 118. , wherein the color difference calculation step 720a is calculated using the following formula:

其中i,j係代表像素之座標值,R係代表像素的紅色強度值,係代表像素之已估測綠色強度值,代表像素之水平估測綠色強度值,代表像素之垂直估測綠色強度值,代表像素於45°邊之估測綠色強度值代表像素於135°邊之估測綠色強度值。接著,進行指示因子(indicator)計算步驟720b,以計算出指示因子群組(indicator set)Ω i,j ={ΔH i,j V i,j ,Δ45° i,j ,Δ135° i,j },其中指示因子係計算視窗W區域內沿著垂直,水平,45°,135°方向色差變化差異度,本實施例以下列公式計算而得,但本發明不受限於此。Where i, j represents the coordinate value of the pixel, and R represents the red intensity value of the pixel. Represents the estimated green intensity value of the pixel, Representing the level of the pixel to estimate the green intensity value, Represents the vertical estimated green intensity value of the pixel, representing the estimated green intensity value of the pixel at 45° , The estimated green intensity value of the pixel on the 135° side. Next, an indicator calculation step 720b is performed to calculate an indicator set Ω i,j ={Δ H i,j V i,j ,Δ45° i,j ,Δ135° i , j }, wherein the indicator factor calculates the difference in color difference variation along the vertical, horizontal, 45°, and 135° directions in the window W region, and the present embodiment is calculated by the following formula, but the present invention is not limited thereto.

然後,進行選擇步驟720c,以根據指示因子群組來從候選估測強度值中選擇像素118之估測綠色強度值,其中選擇步驟720c係選擇色差變化差異度最小方向其對應之估測強度值,本實施例以下列公式計算而得,但本發明不受限於此:Then, a selection step 720c is performed to select the estimated green intensity value of the pixel 118 from the candidate estimated intensity values according to the indicator factor group. The selecting step 720c selects the estimated difference value of the smallest difference direction of the color difference change degree, and the present embodiment is calculated by the following formula, but the present invention is not limited thereto:

另外,值得注意的是本發明之色彩內插方法200、300和影像解馬賽克方法500、700可應用於電腦程式產品中,當此電腦程式產品被載入於電腦時,此電腦即可進行色彩內插方法200、300和影像解馬賽克方法500。In addition, it should be noted that the color interpolation method 200, 300 and the image demosaicing method 500, 700 of the present invention can be applied to a computer program product, and when the computer program product is loaded on a computer, the computer can perform color. Interpolation methods 200, 300 and image demosaicing method 500.

雖然本發明已以實施例揭露如上,然其並非用以限定本發明,任何熟習此技藝者,在不脫離本發明之精神和範圍內,當可作各種之更動與潤飾,因此本發明之保護範圍當視後附之申請專利範圍所界定者為準。Although the present invention has been disclosed in the above embodiments, it is not intended to limit the present invention, and the present invention can be modified and retouched without departing from the spirit and scope of the present invention. The scope is subject to the definition of the scope of the patent application attached.

100...像素陣列100. . . Pixel array

102...處理區域102. . . Processing area

111~116...已估測像素111~116. . . Estimated pixel

117~125...未估測像素117~125. . . Unestimated pixel

200...色彩內插方法200. . . Color interpolation method

210...遮罩提供步驟210. . . Mask providing step

220...斜向強度值計算步驟220. . . Oblique intensity value calculation step

230...斜向強度值計算步驟230. . . Oblique intensity value calculation step

240...估測參數計算步驟240. . . Estimated parameter calculation step

250...估測強度值計算步驟250. . . Estimated intensity value calculation step

300...色彩內插方法300. . . Color interpolation method

310...遮罩提供步驟310. . . Mask providing step

320...斜向強度值計算步驟320. . . Oblique intensity value calculation step

330...斜向強度值計算步驟330. . . Oblique intensity value calculation step

340...估測參數計算步驟340. . . Estimated parameter calculation step

350...估測強度值計算步驟350. . . Estimated intensity value calculation step

400...像素陣列400. . . Pixel array

402...處理區域402. . . Processing area

500...解馬賽克方法500. . . Mosaic method

510...內插步驟510. . . Interpolation step

520...決定步驟520. . . Decision step

520a...色差計算步驟520a. . . Color difference calculation step

520b...指示因子計算步驟520b. . . Indicator calculation step

520c...選擇步驟520c. . . Selection step

602...處理區域602. . . Processing area

700...影像解馬賽克方法700. . . Image demosaicing method

710...內插步驟710. . . Interpolation step

720...決定步驟720. . . Decision step

720a...色差計算步驟720a. . . Color difference calculation step

720b...指示因子計算步驟720b. . . Indicator calculation step

720c...選擇步驟720c. . . Selection step

FG...綠色濾光片FG. . . Green filter

FR...紅色濾光片FR. . . Red filter

G...第二像素G. . . Second pixel

FB...藍色濾光片FB. . . Blue filter

W...決定視窗W. . . Decision window

R...第一像素R. . . First pixel

i...座標值i. . . Coordinate value

B...第三像素B. . . Third pixel

j...座標值j. . . Coordinate value

為讓本發明之上述和其他目的、特徵、和優點能更明顯易懂,上文特舉一較佳實施例,並配合所附圖式,作詳細說明如下:The above and other objects, features, and advantages of the present invention will become more apparent and understood.

第1圖係繪示習知之彩色濾光片陣列(Color Filter Array;CFA)的結構示意圖。FIG. 1 is a schematic view showing the structure of a conventional color filter array (CFA).

第2圖係繪示根據本發明一實施例之像素陣列的結構示意圖。2 is a schematic structural view of a pixel array according to an embodiment of the invention.

第3圖係繪示根據本發明一實施例之處理區域的結構示意圖。3 is a schematic structural view of a processing region according to an embodiment of the present invention.

第4圖係繪示根據本發明一實施例之色彩內插方法的流程示意圖。4 is a flow chart showing a color interpolation method according to an embodiment of the present invention.

第5圖係繪示根據本發明一實施例之色彩內插方法的流程示意圖。FIG. 5 is a flow chart showing a color interpolation method according to an embodiment of the present invention.

第6圖係繪示根據本發明一實施例之像素陣列的結構示意圖。FIG. 6 is a schematic structural view of a pixel array according to an embodiment of the invention.

第7圖係繪示根據本發明一實施例之處理區域的結構示意圖。Figure 7 is a block diagram showing the structure of a processing area according to an embodiment of the present invention.

第8圖係繪示根據本發明一實施例之影像解馬賽克方法的流程示意圖。FIG. 8 is a flow chart showing an image demosaicing method according to an embodiment of the invention.

第9圖係繪示根據本發明一實施例之像素陣列的結構示意圖。FIG. 9 is a schematic structural view of a pixel array according to an embodiment of the invention.

第10圖係繪示根據本發明一實施例之處理區域的結構示意圖。Figure 10 is a block diagram showing the structure of a processing area according to an embodiment of the present invention.

第11圖係繪示根據本發明一實施例之影像解馬賽克方法的流程示意圖。11 is a flow chart showing an image demosaicing method according to an embodiment of the invention.

500...解馬賽克方法500. . . Mosaic method

510...內插步驟510. . . Interpolation step

520...決定步驟520. . . Decision step

520a...色差計算步驟520a. . . Color difference calculation step

520b...指示因子計算步驟520b. . . Indicator calculation step

520c...選擇步驟520c. . . Selection step

Claims (14)

一種色彩內插方法,適用於一像素陣列,該像素陣列包含複數個像素,該些像素包含複數個第一像素和複數個第二像素,每一該些第一像素具有對應至一第一顏色之一第一強度值(G i ,j ),每一該些第二像素具有對應至一第二顏色之一第二強度值(R i ,j ),其中j代表每一該些像素之橫座標,i代表每一該些像素之縱座標,該色彩內插方法包含:利用一電腦之一處理器來對每一該些第二像素進行一內插步驟,以計算出每一該些第二像素對應至該第一顏色之一估測強度值(P i ,j ),其中該內插步驟包含:根據該像素陣列來提供一高通遮罩(high pass mask),以偵測該第二像素相對於該像素陣列之一邊緣(edge)的位置,並輸出一偵測結果(f);進行一第一斜向強度值計算步驟,以計算出一第一斜向強度值(),其中該第一斜向強度值計算步驟係根據一公式: 進行一第二斜向強度值計算步驟,以計算出一第二斜向強度值(),其中該第二斜向強度值計算步驟係根據一公式: 進行一估測參數計算步驟,以計算出一估測參數(),其中該估測參數計算步驟係根據一公式: 進行一估測強度值計算步驟,以計算該估測強度值(P i ,j ),其中該估測強度值計算步驟係根據一公式:;以及利用該電腦之該處理器來根據每一該些第二像素對應至該第一顏色之該估測強度值來重建每一該些第二像素之色彩資訊。A color interpolation method, applicable to a pixel array, the pixel array comprising a plurality of pixels, the pixels comprising a plurality of first pixels and a plurality of second pixels, each of the first pixels having a corresponding first color a first intensity value ( G i , j ), each of the second pixels having a second intensity value ( R i , j ) corresponding to one of the second colors, wherein j represents a horizontal of each of the pixels a coordinate, i represents the ordinate of each of the pixels, and the color interpolation method comprises: performing an interpolation step on each of the second pixels by using a processor of a computer to calculate each of the The two pixels correspond to an estimated intensity value ( P i , j ) of the first color, wherein the interpolating step comprises: providing a high pass mask according to the pixel array to detect the second pixel a position of the pixel relative to an edge of the pixel array, and outputting a detection result (f); performing a first oblique intensity value calculation step to calculate a first oblique intensity value ( ), wherein the first oblique intensity value calculation step is based on a formula: Performing a second oblique intensity value calculation step to calculate a second oblique intensity value ( ), wherein the second oblique intensity value calculation step is based on a formula: Perform an estimation parameter calculation step to calculate an estimation parameter ( ), wherein the estimation parameter calculation step is based on a formula: Performing an estimated intensity value calculation step to calculate the estimated intensity value ( P i , j ), wherein the estimated intensity value calculation step is based on a formula: And using the processor of the computer to reconstruct the color information of each of the second pixels according to the estimated intensity values corresponding to the first color of each of the second pixels. 如申請專利範圍第1項所述之色彩內插方法,其中該高通遮罩為拉普拉斯遮罩(Lapalacian Mask)或高斯拉普拉斯遮罩(Laplacian of Gaussian Mask)。 The color interpolation method of claim 1, wherein the high-pass mask is a Lapalacian Mask or a Laplacian of Gaussian Mask. 如申請專利範圍第1項所述之色彩內插方法,其中該第一顏色為綠色,該第二顏色為紅色或藍色。 The color interpolation method of claim 1, wherein the first color is green and the second color is red or blue. 一種電腦程式產品,經由一電腦載入該程式並執行後,該電腦可進行如申請專利範圍第1項所述之色彩內插方法。 A computer program product, after loading and executing the program via a computer, the computer can perform the color interpolation method as described in claim 1 of the patent application. 一種色彩內插方法,適用於一像素陣列,其中該像素陣列包含複數個像素,該些像素包含複數個第一像素和複數個第二像素,每一該些第一像素具有對應至一第一顏色之一第一顏色強度值(G i ,j ),每一該些第二像素具有對應 至一第二顏色之一第二顏色強度值(R i ,j ),其中j代表每一該些像素之橫座標,i代表每一該些像素之縱座標包含,該色彩內插方法包含:利用一電腦之一處理器來對每一該些第二像素進行一內插步驟,以計算出每一該些第二像素對應至該第一顏色之一估測強度值(P i ,j ),其中該內插步驟包含:根據該像素陣列來提供一高通遮罩(high pass mask),以偵測該第二像素相對於該像素陣列之一邊緣(edge)的位置,並輸出一偵測結果(f);進行一第一斜向強度值計算步驟,以計算出一第一斜向強度值(),其中該第一斜向強度值計算步驟係根據一公式: 進行一第二斜向強度值計算步驟,以計算出一第二斜向強度值(),其中該第二斜向強度值計算步驟係根據一公式: 進行一估測參數計算步驟,以計算出一估測參數(),其中該估測參數計算步驟係根據一公式: 進行一估測強度值計算步驟,以計算該估測強度值(P i ,j ),其中該估測強度值計算步驟係根據一公式:;以及 利用該電腦之該處理器來根據每一該些第二像素對應至該第一顏色之該估測強度值來重建每一該些第二像素之色彩資訊。A color interpolation method is applicable to a pixel array, wherein the pixel array includes a plurality of pixels, the pixels include a plurality of first pixels and a plurality of second pixels, each of the first pixels having a corresponding first One of the first color intensity values ( G i , j ), each of the second pixels having a second color intensity value ( R i , j ) corresponding to one of the second colors, wherein j represents each of the The horizontal coordinate of the pixel, i represents the ordinate of each of the pixels, and the color interpolation method comprises: performing an interpolation step on each of the second pixels by using a processor of a computer to calculate each The second pixels correspond to one of the first color estimated intensity values ( P i , j ), wherein the interpolating step comprises: providing a high pass mask according to the pixel array to detect Measure a position of the second pixel relative to an edge of the pixel array, and output a detection result (f); perform a first oblique intensity value calculation step to calculate a first oblique intensity value ( ), wherein the first oblique intensity value calculation step is based on a formula: Performing a second oblique intensity value calculation step to calculate a second oblique intensity value ( ), wherein the second oblique intensity value calculation step is based on a formula: Perform an estimation parameter calculation step to calculate an estimation parameter ( ), wherein the estimation parameter calculation step is based on a formula: Performing an estimated intensity value calculation step to calculate the estimated intensity value ( P i , j ), wherein the estimated intensity value calculation step is based on a formula: And using the processor of the computer to reconstruct the color information of each of the second pixels according to the estimated intensity values corresponding to the first color of each of the second pixels. 如申請專利範圍第5項所述之色彩內插方法,其中該高通遮罩為拉普拉斯遮罩或高斯拉普拉斯遮罩。 The color interpolation method of claim 5, wherein the high pass mask is a Laplacian mask or a Gaussian Laplacian mask. 如申請專利範圍第5項所述之色彩內插方法,其中該第一顏色為綠色,該第二顏色為紅色或藍色。 The color interpolation method of claim 5, wherein the first color is green and the second color is red or blue. 一種電腦程式產品,經由一電腦載入該程式並執行後,該電腦可進行如申請專利範圍第5項所述之色彩內插方法。 A computer program product, after loading and executing the program via a computer, the computer can perform the color interpolation method as described in claim 5 of the patent application. 一種影像解馬賽克方法,用來處理對應一彩色濾鏡陣列之一像素陣列,以重建該像素陣列所缺乏的色彩成份,該影像解馬賽克方法包含:提供該像素陣列,其中該像素陣列包含:複數個第一像素,其中每一該些第一像素具有對應至一第一顏色之一第一強度值(G i ,j );以及複數個第二像素,其中每一該些第二像素具有對應至一第二顏色之一第二強度值(R i ,j ),該些第二像素包含:複數個已估測像素,其中該些已估測像素係對應至複數個第一估測強度值,該些第一估測強度值係對應至該第一顏色;以及 複數個未估測像素,其中該些未估測像素包含一目標像素,該些未估測像素之其餘者和該些已估測像素係以該目標像素為中心來環繞;利用一電腦之一處理器來進行一強度值估測步驟,以計算出該目標像素對應至該第一顏色之一第二估測強度值,該強度值估測步驟包含:進行一內插步驟,以計算出該目標像素之複數個候選估測強度值,其中該內插步驟包含:根據該像素陣列來提供一高通遮罩,以偵測該目標像素於該像素陣列之一邊緣的位置,並輸出一偵測結果(f);進行一第一斜向強度值計算步驟,以計算出一第一斜向強度值(),其中該第一斜向強度值計算步驟係根據一公式: 進行一第二斜向強度值計算步驟,以計算出一第二斜向強度值(),其中該第二斜向強度值計算步驟係根據一公式: 進行一估測參數計算步驟,以計算出一估測參數L i ,j ,其中該估測參數計算步驟係根據一公式:;以及進行一候選估測強度值計算步驟,以計算該些候選估測強度值之一者(P i ,j )之值,其中該候選 估測強度值計算步驟係根據一公式:;以及進行一決定步驟,以根據該些候選估測強度值和該些第一估測強度值,來決定該第二估測強度值,其中該決定步驟包含:進行一色差計算步驟,以計算出該目標像素為中心,一視窗區域內之複數個色差值;進行一指示因子計算步驟,以計算出該視窗區域內沿著垂直、水平、45°、135°方向之複數個色差變化差異度;以及進行一選擇步驟,以根據該些色差變化差異度來選擇出該第二估測強度值,其中該第二估測強度值為該些色差變化差異度中之最小者所對應方向之估測強度值;以及利用該電腦之該處理器來根據該目標像素對應至該第一顏色之該估測強度值來重建該目標像素之色彩資訊。An image demosaicing method for processing a pixel array corresponding to a color filter array to reconstruct a color component lacking the pixel array, the image demosaicing method comprising: providing the pixel array, wherein the pixel array comprises: a plurality First pixels, wherein each of the first pixels has a first intensity value ( G i , j ) corresponding to one of the first colors; and a plurality of second pixels, wherein each of the second pixels has a corresponding a second intensity value ( R i , j ) to a second color, the second pixels comprising: a plurality of estimated pixels, wherein the estimated pixels correspond to a plurality of first estimated intensity values The first estimated intensity values correspond to the first color; and the plurality of unestimated pixels, wherein the unestimated pixels comprise a target pixel, and the rest of the unestimated pixels and the Estimating the pixel is centered around the target pixel; using a processor of a computer to perform an intensity value estimation step to calculate a second estimated intensity value corresponding to the first color of the target pixel, The strength The value estimation step includes: performing an interpolation step to calculate a plurality of candidate estimated intensity values of the target pixel, wherein the interpolating step comprises: providing a high-pass mask according to the pixel array to detect the target Positioning the pixel at an edge of the pixel array and outputting a detection result (f); performing a first oblique intensity value calculation step to calculate a first oblique intensity value ( ), wherein the first oblique intensity value calculation step is based on a formula: Performing a second oblique intensity value calculation step to calculate a second oblique intensity value ( ), wherein the second oblique intensity value calculation step is based on a formula: Performing an estimation parameter calculation step to calculate an estimation parameter L i , j , wherein the estimation parameter calculation step is based on a formula: And performing a candidate estimated intensity value calculation step to calculate a value of one of the candidate estimated intensity values ( P i , j ), wherein the candidate estimated intensity value calculation step is based on a formula: And performing a determining step of determining the second estimated intensity value according to the candidate estimated intensity values and the first estimated intensity values, wherein the determining step comprises: performing a color difference calculating step to calculate Taking the target pixel as the center, a plurality of color difference values in a window region; performing an indicator calculation step to calculate a plurality of color difference variations in the window region along the vertical, horizontal, 45°, and 135° directions And performing a selection step of selecting the second estimated intensity value according to the difference in the color difference changes, wherein the second estimated intensity value is a direction corresponding to a minimum of the differences in the color difference changes Estimating the intensity value; and utilizing the processor of the computer to reconstruct the color information of the target pixel according to the estimated intensity value corresponding to the first color of the target pixel. 一種影像解馬賽克方法,用來處理對應一彩色濾鏡陣列之一像素陣列,以重建該像素陣列所缺乏的色彩成份,該影像解馬賽克方法包含:提供該像素陣列,其中該像素陣列包含:複數個第一像素,其中每一該些第一像素具有對應至一第一顏色之一第一強度值(G i ,j );以及複數個第二像素,其中每一該些第二像素具有對應至一第二顏色之一第二強度值(R i ,j ),該些第二像素包 含:複數個已估測像素,其中該些已估測像素係對應至複數個第一估測強度值,該些第一估測強度值係對應至該第一顏色;以及複數個未估測像素,其中該些未估測像素包含一目標像素,該些未估測像素之其餘者和該些已估測像素係以該目標像素為中心來環繞;利用一電腦之一處理器來進行一強度值估測步驟,以計算出該目標像素對應至該第一顏色之一第二估測強度值,該強度值估測步驟包含:進行一內插步驟,以計算出該目標像素之複數個候選估測強度值,其中該內插步驟包含:根據該像素陣列來提供一高通遮罩,以偵測該目標像素於該像素陣列之一邊緣的位置,並輸出一偵測結果(f);進行一第一斜向強度值計算步驟,以計算出一第一斜向強度值(),其中該第一斜向強度值計算步驟係根據一公式: 進行一第二斜向強度值計算步驟,以計算出一第二斜向強度值(),其中該第二斜向強度值計算步驟係根據一公式: 進行一估測參數計算步驟,以計算出一估測參數L i ,j ,其中該估測參數計算步驟係根據一公式:;以及進行一候選估測強度值計算步驟,以計算該些候選估測強度值之一者(P i ,j )之值,其中該候選估測強度值計算步驟係根據一公式:;以及進行一決定步驟,以根據該些候選估測強度值和該些第一估測強度值,來決定該第二估測強度值,其中該決定步驟包含:進行一色差計算步驟,以計算出該目標像素為中心,一視窗區域內之複數個色差值;進行一指示因子計算步驟,以計算出該視窗區域內沿著垂直、水平、45°、135°方向之複數個色差變化差異度;以及進行一選擇步驟,以根據該些色差變化差異度來選擇出該第二估測強度值,其中該第二估測強度值為該些色差變化差異度中之最小者所對應方向之估測強度值;以及利用該電腦之該處理器來根據該目標像素對應至該第一顏色之該估測強度值來重建該目標像素之色彩資訊。An image demosaicing method for processing a pixel array corresponding to a color filter array to reconstruct a color component lacking the pixel array, the image demosaicing method comprising: providing the pixel array, wherein the pixel array comprises: a plurality First pixels, wherein each of the first pixels has a first intensity value ( G i , j ) corresponding to one of the first colors; and a plurality of second pixels, wherein each of the second pixels has a corresponding a second intensity value ( R i , j ) to a second color, the second pixels comprising: a plurality of estimated pixels, wherein the estimated pixels correspond to a plurality of first estimated intensity values The first estimated intensity values correspond to the first color; and the plurality of unestimated pixels, wherein the unestimated pixels comprise a target pixel, and the rest of the unestimated pixels and the Estimating the pixel is centered around the target pixel; using a processor of a computer to perform an intensity value estimation step to calculate a second estimated intensity value corresponding to the first color of the target pixel, The strength The value estimation step includes: performing an interpolation step to calculate a plurality of candidate estimated intensity values of the target pixel, wherein the interpolating step comprises: providing a high-pass mask according to the pixel array to detect the target Positioning the pixel at an edge of the pixel array and outputting a detection result (f); performing a first oblique intensity value calculation step to calculate a first oblique intensity value ( ), wherein the first oblique intensity value calculation step is based on a formula: Performing a second oblique intensity value calculation step to calculate a second oblique intensity value ( ), wherein the second oblique intensity value calculation step is based on a formula: Performing an estimation parameter calculation step to calculate an estimation parameter L i , j , wherein the estimation parameter calculation step is based on a formula: And performing a candidate estimated intensity value calculation step to calculate a value of one of the candidate estimated intensity values ( P i , j ), wherein the candidate estimated intensity value calculation step is based on a formula: And performing a determining step of determining the second estimated intensity value according to the candidate estimated intensity values and the first estimated intensity values, wherein the determining step comprises: performing a color difference calculating step to calculate Taking the target pixel as the center, a plurality of color difference values in a window region; performing an indicator calculation step to calculate a plurality of color difference variations in the window region along the vertical, horizontal, 45°, and 135° directions And performing a selection step of selecting the second estimated intensity value according to the difference in the color difference changes, wherein the second estimated intensity value is a direction corresponding to a minimum of the differences in the color difference changes Estimating the intensity value; and utilizing the processor of the computer to reconstruct the color information of the target pixel according to the estimated intensity value corresponding to the first color of the target pixel. 如申請專利範圍第9項或第10項所述之影像解馬賽克方法,其中該決定步驟係從該些候選估測強度值中選擇一者來做為該第二估測強度值。 The image demosaicing method according to claim 9 or claim 10, wherein the determining step selects one of the candidate estimated intensity values as the second estimated intensity value. 如申請專利範圍第9項或第10項所述之影像解馬賽克方法,其中該高通遮罩為拉普拉斯遮罩或高斯拉普拉斯遮罩。 The image demosaicing method of claim 9 or 10, wherein the high pass mask is a Laplacian mask or a Gaussian Laplacian mask. 如申請專利範圍第9項或第10項所述之影像解馬賽克方法,其中該第一顏色為綠色,該第二顏色為紅色或藍色。 The image demosaicing method of claim 9 or 10, wherein the first color is green and the second color is red or blue. 一種電腦程式產品,經由一電腦載入該程式並執行後,該電腦可進行如申請專利範圍第9項或第10項所述之影像解馬賽克方法。A computer program product, after loading and executing the program via a computer, the computer can perform an image demosaicing method as described in claim 9 or 10.
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 TW201034470A (en) 2010-09-16
TWI477155B true 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)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050146629A1 (en) * 2004-01-05 2005-07-07 Darian Muresan Fast edge directed demosaicing
TW200822763A (en) * 2006-01-12 2008-05-16 Micron Technology Inc Method and apparatus for producing bayer color mosaic interpolation for imagers

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050146629A1 (en) * 2004-01-05 2005-07-07 Darian Muresan Fast edge directed demosaicing
TW200822763A (en) * 2006-01-12 2008-05-16 Micron Technology Inc Method and apparatus for producing bayer color mosaic interpolation for imagers

Also Published As

Publication number Publication date
TW201034470A (en) 2010-09-16

Similar Documents

Publication Publication Date Title
JP4054184B2 (en) Defective pixel correction device
US8131067B2 (en) Image processing apparatus, image processing method, and computer-readable media for attaining image processing
JP5904213B2 (en) Image processing apparatus, image processing method, and program
TWI516132B (en) An image processing apparatus, an image processing method, and a program
EP2278788B1 (en) Method and apparatus for correcting lens shading
US8004588B2 (en) Image processing procedure for receiving mosaic image data and calculating vertical and horizontal-direction color difference components for each pixel
US7995840B2 (en) Image processing apparatus, image processing method, and program for attaining image processing
TWI354487B (en) Image processing apparatus, image capturing appara
US20150278996A1 (en) Image processing apparatus, method, and medium for generating color image data
JP2008042482A5 (en)
US20170257584A1 (en) Image processing device, image processing method, and image processing system
JP2013066146A (en) Image processing device, image processing method, and program
WO2011158572A1 (en) Image processing device, image processing method, and program
JP2000341707A (en) Method for releasing mosaic of image by using directional smoothing operation
CN101917629A (en) Green component and color difference space-based Bayer format color interpolation method
CN106937064B (en) Detection method, bearing calibration and the device of digital picture bad point
JP2016504882A (en) Method and device for creating an improved color image using a sensor having a color filter
WO2005099355A2 (en) Imaging device and image processing program
JP2013066157A (en) Image processing apparatus, image processing method, and program
JP2010016814A (en) Image processing apparatus and method, and computer-readable medium
US8773556B2 (en) Signal processing device, imaging device, and signal processing method for color interpolation
US8045826B2 (en) Detecting edges in a digital images
JP2010211773A (en) Image process apparatus, image process method and computer program
TWI477155B (en) Color interpolation method and image demosaicking method using the same and computer program production thereof
Chen et al. Low complexity photo sensor dead pixel detection algorithm

Legal Events

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