TWI455063B - Color interpolation device and method thereof - Google Patents

Color interpolation device and method thereof Download PDF

Info

Publication number
TWI455063B
TWI455063B TW100128803A TW100128803A TWI455063B TW I455063 B TWI455063 B TW I455063B TW 100128803 A TW100128803 A TW 100128803A TW 100128803 A TW100128803 A TW 100128803A TW I455063 B TWI455063 B TW I455063B
Authority
TW
Taiwan
Prior art keywords
color
interpolation
intensity value
pixel
pixels
Prior art date
Application number
TW100128803A
Other languages
Chinese (zh)
Other versions
TW201308249A (en
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 TW100128803A priority Critical patent/TWI455063B/en
Publication of TW201308249A publication Critical patent/TW201308249A/en
Application granted granted Critical
Publication of TWI455063B publication Critical patent/TWI455063B/en

Links

Description

色彩內插裝置及其方法Color interpolation device and method thereof

本發明係關於一種色彩內插裝置及其方法,特別是一種利用將特定像素之排列方式視為45度或135度交錯的排列方式,以提高色彩內插精確度之色彩內插裝置及其方法。The present invention relates to a color interpolation device and method thereof, and more particularly to a color interpolation device and method for improving color interpolation accuracy by using an arrangement manner in which a specific pixel arrangement is regarded as a 45 degree or 135 degree interleaving manner .

近幾年來,數位相機(Digital Still Cameras)已取代傳統底片照相機而成為非常受歡迎之消費性電子產品,數位相機係利用光感應式電荷耦合元件(Charge-coupled Device)或互補式金屬氧化物半導體(Complementary Metal-Oxide-Semiconductor)感測器取代傳統相機底片的化學感光功能。In recent years, Digital Still Cameras have become a very popular consumer electronics product replacing traditional negative film cameras. Digital cameras use light-sensitive charge-coupled devices or complementary metal oxide semiconductors. (Complementary Metal-Oxide-Semiconductor) sensors replace the chemical sensitization of traditional camera negatives.

其中,傳統底片照相機的色彩表現方式係透過對不同顏色波長敏感的銀鹽顆粒進行逐層感色,使得白色太陽光可以自動在底片層上完成分色動作。Among them, the color expression of the traditional negative film camera is through layer-by-layer color sensing of silver salt particles sensitive to different color wavelengths, so that white sunlight can automatically perform color separation on the film layer.

但數位相機受限於技術和成本,而只有一層感光基板,為了模擬傳統底片照相機之分色感光,馬賽克分色法(Color Filter Array)係應運而生,其原理係將濾色片分成了各四分之一之紅色以及藍色,以及二分之一的綠色,再藉由數位影像處理引擎進行色彩內插(Interpolation),以將未記錄下來的四分之三紅色以及藍色,以及另外二分之一的綠色,透過數據計算的方式加進影像檔案之中,使其構成完整之三原色檔案,進而合成為一數位照片。However, digital cameras are limited by technology and cost, and only one layer of photosensitive substrate. In order to simulate the color separation of traditional negative film cameras, the Color Filter Array comes into being. The principle is to divide the color filters into One-quarter of the red and blue, and one-half of the green, and then through the digital image processing engine for color interpolation (Interpolation) to unrecorded three-quarters of red and blue, and One-half of the green color is added to the image file by means of data calculation to form a complete three-primary color file, which is then combined into a digital photo.

如中華民國專利公告第I274908號,其揭示一種彩色濾光片陣列之影像色彩內插的方法。本發明之內插方法係利用預先估算最小平方誤差(Minimum Square Error;MSE),在彩色濾光片陣列(Color Filter Array;CFA)擷取影像之後,來內插彩色濾光片陣列中所得到之彩色影像。為了估算經過彩色濾光片陣列所失去的色彩像素值,先計算鄰近欲採用色彩像素值之權重值(Weights),且此權重值係由矩陣運算所求出。在運算過程中,亦採用一色彩模型使還原之色彩更接近於人類的視覺反應。For example, the Republic of China Patent Publication No. I274908 discloses a method of image color interpolation of a color filter array. The interpolation method of the present invention utilizes a pre-estimated minimum square error (MSE) to interpolate the color filter array after capturing an image by a color filter array (CFA). Color image. In order to estimate the color pixel values lost by the color filter array, weights (eights) adjacent to the color pixel values to be used are first calculated, and the weight values are obtained by matrix operations. In the course of the operation, a color model is also used to make the restored color closer to the human visual response.

然而,上述之色彩內插的方法對於彩色濾光片陣列僅能做到垂直及水平之邊緣方向的估測及重建,然而對於另外兩個也可能存在於電子影像中的45°和135°之邊緣方向,並無有效的重建方法,而容易於圖像之圖形邊界產生拉鍊狀、色彩重疊以及補色錯誤等失真情況。However, the color interpolation method described above can only estimate and reconstruct the vertical and horizontal edge directions for the color filter array, but the other two may also exist in the electronic image at 45° and 135°. In the edge direction, there is no effective reconstruction method, and the image boundary of the image is easy to produce distortion such as zipper shape, color overlap, and complementary color error.

因此,如何設計出一可以45°和135°邊緣方向估測及重建彩色濾光片陣列,進而有效避免於圖像之圖形邊界產生拉鍊狀、色彩重疊以及補色錯誤等失真情況之色彩內插裝置及其方法,便成為相關廠商以及相關研發人員所共同努力的目標。Therefore, how to design a color interpolation device that can estimate and reconstruct the color filter array at the 45° and 135° edge directions, thereby effectively avoiding distortion such as zipper shape, color overlap and complementary color error at the image boundary of the image. And its methods have become the goal of the joint efforts of relevant manufacturers and related research and development personnel.

本發明人有鑑於習知之色彩內插裝置及其方法無法以45°和135°邊緣方向估測及重建彩色濾光片陣列,而容易於圖像之圖形邊界產生拉鍊狀、色彩重疊以及補色錯誤等失真情況之缺失,乃積極著手進行開發,以期可以改進上述既有之缺點,經過不斷地試驗及努力,終於開發出本發明。The present inventors have in view of the fact that the conventional color interpolation apparatus and method thereof cannot estimate and reconstruct the color filter array in the 45° and 135° edge directions, and it is easy to produce zipper shape, color overlap, and complementary color error at the image boundary of the image. The lack of equal distortion is an active development, in order to improve the above-mentioned shortcomings, and through continuous experimentation and efforts, finally developed the present invention.

本發明之目的,係提供一種可以45°和135°邊緣方向估測及重建彩色濾光片陣列,而避免於圖像之圖形邊界產生拉鍊狀、色彩重疊以及補色錯誤等失真情況之色彩內插裝置及其方法。SUMMARY OF THE INVENTION It is an object of the present invention to provide a color interpolation that can estimate and reconstruct a color filter array at 45° and 135° edge directions while avoiding distortion such as zipper, color overlap, and complementary color errors at the image boundary of the image. Apparatus and method therefor.

為了達成上述之目的,本發明之色彩內插裝置,係適用於一像素陣列,該像素陣列包括複數第一像素、複數第二像素以及複數第三像素,每一第一像素具有一第一顏色之強度值,每一第二像素具有一第二顏色之強度值,每一第三像素具有一第三顏色之強度值,該色彩內插裝置包括:一邊緣特徵偵測單元,係分別將該像素陣列之複數第一像素之排列方式視為45度以及135度交錯的排列方式,再分別從沿著45度以及135度的方向去偵測該像素陣列複數方向之邊緣特徵;一內插單元,係與該邊緣特徵偵測單元連結,係依據該等邊緣特徵對該等第一像素進行內插而產生至少二內插結果,使該等第二像素以及該等第三像素係各自產生該第一顏色之強度值,並對該像素陣列進行光譜內插,使該等第一像素以及該等第二像素係各自產生該第三顏色之強度值,且該等第一像素以及該等第三像素係各自產生該第二顏色之強度值;一加權中值濾波器,係分別與該邊緣特徵偵測單元以及該內插單元連接,並依據該邊緣特徵,對該等內插結果分配不同權重值,並進行方向性加權中值濾波(Directional Weighted Median Filtering),以決定最佳之該第一顏色之強度值,並對該最佳之該第一顏色之強度值以及進行光譜內插後所產生之該第二顏色以及該第三顏色之強度值進行中間加權中值濾波(Center Weighted Median Filtering);以及一後處理單元,係與該加權中值濾波器連接,並依據進行中間加權中值濾波後之該最佳之該第一顏色之強度值,以及進行光譜內插後所產生之該第二顏色以及該第三顏色之強度值,產生最後輸出之該第一顏色、該第二顏色以及該第三顏色之強度值。In order to achieve the above object, the color interpolation device of the present invention is applicable to a pixel array including a plurality of first pixels, a plurality of second pixels, and a plurality of third pixels, each of the first pixels having a first color The intensity value, each second pixel has a second color intensity value, and each third pixel has a third color intensity value, the color interpolation device includes: an edge feature detecting unit, respectively The arrangement of the plurality of first pixels of the pixel array is regarded as an arrangement of 45 degrees and 135 degrees of interleaving, and then detecting edge features of the pixel array in a direction along 45 degrees and 135 degrees respectively; an interpolation unit Linking with the edge feature detecting unit, the first pixels are interpolated according to the edge features to generate at least two interpolation results, so that the second pixels and the third pixel systems respectively generate the An intensity value of the first color, and spectrally interpolating the pixel array, such that the first pixel and the second pixel systems each generate an intensity value of the third color, and the first The pixel and the third pixel respectively generate intensity values of the second color; a weighted median filter is respectively connected to the edge feature detecting unit and the interpolation unit, and according to the edge feature, The interpolation result assigns different weight values, and performs Directional Weighted Median Filtering to determine the best intensity value of the first color, and the optimal intensity value of the first color and The second color generated by the spectral interpolation and the intensity value of the third color are subjected to Center Weighted Median Filtering; and a post processing unit is connected to the weighted median filter, and And generating the first output of the final output according to the optimal intensity value of the first color after performing the intermediate weighted median filtering, and the intensity value of the second color and the third color generated after performing spectral interpolation The color, the second color, and the intensity value of the third color.

為了達成上述之目的,本發明之色彩內插方法,係適用於一像素陣列,該像素陣列包括複數第一像素、複數第二像素以及複數第三像素,每一第一像素具有一第一顏色之強度值,每一第二像素具有一第二顏色之強度值,每一第三像素具有一第三顏色之強度值,該色彩內插方法包括步驟:將該像素陣列之複數第一像素之排列方式分別視為45度或135度交錯的排列方式,再分別沿著45度或135度的方向去偵測該像素陣列複數方向之邊緣特徵;依據該等邊緣特徵對該等第一像素進行初步內插,以產生至少二內插結果,進行初步內插後,該等第二像素以及該等第三像素係各自產生該第一顏色之強度值;根據該等邊緣特徵,對該等內插結果分配不同權重值,並進行方向性加權中值濾波;根據進行方向性加權中值濾波後之內插結果之該第一顏色之強度值,決定最佳之該第一顏色之強度值;對該像素陣列進行光譜內插,使該等第一像素以及該等第二像素係各自產生該第三顏色之強度值,且該等第一像素以及該等第三像素係各自產生該第二顏色之強度值;以及對該最佳之該第一顏色之強度值以及進行光譜內插後所產生之該第二顏色以及該第三顏色之強度值進行中間加權中值濾波,以決定最後輸出之該第一顏色、該第二顏色以及該第三顏色之強度值。In order to achieve the above object, the color interpolation method of the present invention is applicable to a pixel array including a plurality of first pixels, a plurality of second pixels, and a plurality of third pixels, each of the first pixels having a first color The intensity value, each second pixel has a second color intensity value, and each third pixel has a third color intensity value, the color interpolation method comprising the steps of: multiplexing the first pixel of the pixel array The arrangement manner is respectively regarded as an arrangement of 45 degrees or 135 degrees of interleaving, and then detecting edge features of the pixel array in the direction of 45 degrees or 135 degrees respectively; performing the first pixels according to the edge features Initially interpolating to generate at least two interpolation results, after the preliminary interpolation, the second pixels and the third pixel systems each generate an intensity value of the first color; according to the edge features, the The interpolation result assigns different weight values and performs directional weighted median filtering; determining the best value according to the intensity value of the first color of the interpolation result after performing the directional weighted median filtering An intensity value of the first color; spectrally interpolating the pixel array, wherein the first pixel and the second pixel are each generating an intensity value of the third color, and the first pixel and the first The three pixel systems each generate an intensity value of the second color; and intermediately weighting the optimal intensity value of the first color and the intensity value of the second color and the third color generated after performing spectral interpolation Median filtering to determine the intensity value of the first color, the second color, and the third color that are finally output.

透過上述之裝置及方法,本發明因可沿著45度或135度的方向去偵測與重建彩色濾光片陣列之邊緣特徵,而能夠避免於圖像之圖形邊界產生拉鍊狀、色彩重疊以及補色錯誤等失真情況。Through the above apparatus and method, the present invention can detect and reconstruct the edge features of the color filter array along the direction of 45 degrees or 135 degrees, thereby avoiding zipper shape, color overlap, and the image boundary of the image. Distortion such as complementary color error.

為使熟悉該項技藝人士瞭解本發明之目的,兹配合圖式將本發明之較佳實施例詳細說明如下。The preferred embodiments of the present invention are described in detail below with reference to the drawings.

請參考第一至五c圖所示,本發明之色彩內插裝置(1),係適用於一像素陣列(2),該像素陣列(2)包括複數第一像素(20)、複數第二像素(21)以及複數第三像素(22),每一第一像素(20)具有一第一顏色之強度值(圖未示),每一第二像素(21)具有一第二顏色之強度值(圖未示),每一第三像素(22)具有一第三顏色之強度值(圖未示),該色彩內插裝置(1)係包括:一邊緣特徵偵測單元(10),係分別將該像素陣列(2)之複數第一像素(20)之排列方式視為45度以及135度交錯的排列方式,再分別從沿著45度以及135度的方向去偵測該像素陣列(2)複數方向之邊緣特徵;一內插單元(11),係與該邊緣特徵偵測單元(10)連結,係依據該等邊緣特徵對該等第一像素(20)進行內插而產生至少二內插結果,使該等第二像素(21)以及該等第三像素(22)係各自產生該第一顏色之強度值,並對該像素陣列(2)進行光譜內插,使該等第一像素(20)以及該等第二像素(21)係各自產生該第三顏色之強度值,且該等第一像素(20)以及該等第三像素(22)係各自產生該第二顏色之強度值;一加權中值濾波器(12),係分別與該邊緣特徵偵測單元(10)以及該內插單元(11)連接,並依據該邊緣特徵,對該等內插結果分配不同權重值,並進行方向性加權中值濾波(Directional Weighted Median Filtering),以決定最佳之該第一顏色之強度值,並對該最佳之該第一顏色之強度值以及進行光譜內插後所產生之該第二顏色以及該第三顏色之強度值進行中間加權中值濾波(Center Weighted Median Filtering);以及一後處理單元(13),係與該加權中值濾波器(12)連接,並依據進行中間加權中值濾波後之該最佳之該第一顏色之強度值,以及進行光譜內插後所產生之該第二顏色以及該第三顏色之強度值,產生最後輸出之該第一顏色、該第二顏色以及該第三顏色之強度值。Please refer to the first to fifth c-pictures, the color interpolation device (1) of the present invention is applied to a pixel array (2), the pixel array (2) includes a plurality of first pixels (20), and a plurality of second a pixel (21) and a plurality of third pixels (22), each of the first pixels (20) having a first color intensity value (not shown), and each second pixel (21) having a second color intensity a value (not shown), each third pixel (22) has a third color intensity value (not shown), and the color interpolation device (1) includes: an edge feature detecting unit (10), The arrangement of the plurality of first pixels (20) of the pixel array (2) is regarded as an arrangement of 45 degrees and 135 degrees, and the pixel array is detected from 45 degrees and 135 degrees respectively. (2) edge features in the complex direction; an interpolation unit (11) is coupled to the edge feature detecting unit (10), and is generated by interpolating the first pixels (20) according to the edge features And at least two interpolating results, wherein the second pixels (21) and the third pixels (22) respectively generate intensity values of the first color, and perform spectrum on the pixel array (2) Inserting, the first pixel (20) and the second pixels (21) each generating an intensity value of the third color, and the first pixel (20) and the third pixel (22) are Generating an intensity value of the second color; a weighted median filter (12) is respectively connected to the edge feature detecting unit (10) and the interpolation unit (11), and according to the edge feature, The interpolation result assigns different weight values, and performs Directional Weighted Median Filtering to determine the optimal intensity value of the first color, and the optimal intensity value of the first color. And performing the intermediate weighted median filtering on the second color generated by the spectral interpolation and the intensity value of the third color; and a post processing unit (13), and the weighted median filtering The device (12) is connected, and according to the optimal intensity value of the first color after performing intermediate weighted median filtering, and the intensity value of the second color and the third color generated after performing spectral interpolation, Producing the first color of the final output, A second color and the third color intensity value.

在本發明之一較佳實施例中,該邊緣特徵偵測單元(10)係先將該像素陣列(2)之複數第一像素(20)之排列方式視為135度交錯的排列方式,非第一像素(20)之空格係代表該第二像素(21)或該第三像素(22),i代表該像素陣列(2)之縱座標,j代表該像素陣列(2)之橫座標,由於將該像素陣列(2)之複數第一像素(20)之排列方式視為45度交錯的排列方式係與135度交錯的排列方式呈對稱關係,因此在此不再贅述。In a preferred embodiment of the present invention, the edge feature detecting unit (10) first considers the arrangement of the plurality of first pixels (20) of the pixel array (2) as a 135-degree interlaced arrangement, The space of the first pixel (20) represents the second pixel (21) or the third pixel (22), i represents the ordinate of the pixel array (2), and j represents the abscissa of the pixel array (2). Since the arrangement of the plurality of first pixels (20) of the pixel array (2) is regarded as a 45-degree interlaced arrangement in a symmetrical relationship with the 135-degree interleaved arrangement, no further description is provided herein.

該邊緣特徵偵測單元(10)沿著135度的方向偵測出該像素陣列(2)五個方向之邊緣特徵,分別為一第一方向、一第二方向、一第三方向、一第四方向以及一第五方向,該第一方向、該第二方向、該第三方向、該第四方向以及該第五方向係分別以複數菱形方格從該像素陣列(2)原點(i,j)向二端延伸,各別菱形方格係內切一第二像素(21)或該第三像素(22),且各別菱形方格之四個角係各自對應一第一像素(20)。The edge feature detecting unit (10) detects edge features of the pixel array (2) in five directions along a direction of 135 degrees, which are a first direction, a second direction, a third direction, and a first a fourth direction and a fifth direction, the first direction, the second direction, the third direction, the fourth direction, and the fifth direction are respectively from a plurality of diamond squares from the pixel array (2) origin (i , j) extending to the two ends, each of the diamond-shaped squares inscribed a second pixel (21) or the third pixel (22), and each of the four corners of each of the diamond-shaped squares corresponds to a first pixel ( 20).

若該原點(i,j)為第二像素(21),則先模擬出該等第一像素(20)之第二顏色之強度值,再分別求出該第一方向、該第二方向、該第三方向、該第四方向以及該第五方向上,原點(i,j)之菱形方格與其二端最接近之菱形方格相互之間最接近之角所對應之複數第一像素(20)的第一顏色強度值與第二顏色強度值之色差,接著對上述之第一顏色強度值與第二顏色強度值之色差取平均值,該平均值加上原點(i,j)上之第二顏色強度值,即為該邊緣特徵偵測單元(10)沿著135度的方向所偵測該像素陣列(2)之原點(i,j)上之邊緣特徵,但本發明並不以此為限,若該原點(i,j)為第三像素(21),則以第三顏色之強度值取代上述之第二顏色之強度值。If the origin (i, j) is the second pixel (21), the intensity values of the second color of the first pixels (20) are first simulated, and the first direction and the second direction are respectively obtained. In the third direction, the fourth direction, and the fifth direction, the first point corresponding to the closest angle between the diamond square of the origin (i, j) and the diamond square closest to the two ends thereof is first a color difference between the first color intensity value of the pixel (20) and the second color intensity value, and then averaging the color difference between the first color intensity value and the second color intensity value, the average value plus the origin (i, j) The second color intensity value is the edge feature of the edge feature detecting unit (10) detecting the origin (i, j) of the pixel array (2) along the direction of 135 degrees, but The invention is not limited thereto. If the origin (i, j) is the third pixel (21), the intensity value of the second color is replaced by the intensity value of the third color.

然後,該加權中值濾波器(12)根據,該第一方向、該第二方向、該第三方向、該第四方向以及該第五方向上所取得之平均值,對該第一方向、該第二方向、該第三方向、該第四方向以及該第五方向進行方向性加權中值濾波,而對該第一方向、該第二方向、該第三方向、該第四方向以及該第五方向取得之平均值分配不同之權重,以改變該邊緣特徵偵測單元(10)從該第一方向、該第二方向、該第三方向、該第四方向以及該第五方向上取得平均值之次數。Then, the weighted median filter (12) is based on the average values obtained in the first direction, the second direction, the third direction, the fourth direction, and the fifth direction, and the first direction, The second direction, the third direction, the fourth direction, and the fifth direction perform directional weighted median filtering, and the first direction, the second direction, the third direction, the fourth direction, and the The average value obtained by the fifth direction is assigned different weights to change the edge feature detecting unit (10) from the first direction, the second direction, the third direction, the fourth direction, and the fifth direction. The number of times the average.

其中該邊緣特徵偵測單元(10)所偵測的邊緣特徵更包括圖像內容之水平寬度與垂直寬度,且該內插單元(11)更依據圖像內容之水平寬度與垂直寬度產生一寬度內插結果,使該等第二像素(21)以及該等第三像素(22)係各自產生該第一顏色之強度值。The edge feature detected by the edge feature detecting unit (10) further includes a horizontal width and a vertical width of the image content, and the interpolation unit (11) further generates a width according to the horizontal width and the vertical width of the image content. As a result of the interpolation, the second pixels (21) and the third pixels (22) each generate an intensity value of the first color.

在本發明之一實施例中,若原點(i,j)為一第二像素(21),當圖像內容之水平寬度大於垂直寬度,則該寬度內插結果,係從該圖像內容之垂直方向第一像素之第一顏色強度值與模擬第二顏色強度值之色差,以及該圖像內容之垂直方向上下對稱第二像素之第二顏色強度值之平均取得,當圖像內容之水平寬度小於垂直寬度,則該寬度內插結果,係從該圖像內容之水平方向第一像素之第一顏色強度值與模擬第二顏色強度值之色差,以及該圖像內容之水平方向左右對稱第二像素之之第二顏色強度值之平均取得,該加權中值濾波器(12)所進行之方向性加權中值濾波中之邊緣特徵係包括該等寬度內插結果。In an embodiment of the present invention, if the origin (i, j) is a second pixel (21), when the horizontal width of the image content is greater than the vertical width, the width interpolation result is from the image content. The color difference between the first color intensity value of the first pixel in the vertical direction and the color intensity value of the simulated second color intensity, and the average of the second color intensity values of the second pixel symmetrically up and down in the vertical direction of the image content, when the image content level If the width is smaller than the vertical width, the width interpolation result is a color difference between the first color intensity value of the first pixel and the simulated second color intensity value in the horizontal direction of the image content, and the horizontal direction of the image content is bilaterally symmetric. The second color intensity values of the second pixels are averaged, and the edge features in the directional weighted median filtering performed by the weighted median filter (12) include the width interpolation results.

其中內插單元(11)所進行之光譜內插,以使該等第一像素(20)以及該等第三像素(22)係各自產生該第二顏色之強度值為例,其中若中心像素(i,j)為該第一像素(20),則分別利用與中心像素(i,j)相鄰之第二像素(21)模擬出之第一顏色強度值與第二顏色強度值之色差,內插出該中心像素(i,j)之第二顏色強度值,其中與中心像素(i,j)相鄰之第二像素(21)有可能在該中心像素(i,j)之上下位置或左右位置,若中心像素(i,j)為該第三像素(22),則利用該中心像素(i,j)之模擬第一顏色強度值,以及該中心像素(i,j)週邊四個角落方向之第二像素(21)之模擬第一顏色強度值以及第二顏色強度值,內插出該第二顏色之強度值。The spectral interpolation performed by the interpolation unit (11), such that the first pixel (20) and the third pixel (22) each generate an intensity value of the second color, wherein the central pixel (i, j) is the first pixel (20), and the color difference between the first color intensity value and the second color intensity value is simulated by the second pixel (21) adjacent to the center pixel (i, j), respectively. Inserting a second color intensity value of the central pixel (i, j), wherein the second pixel (21) adjacent to the central pixel (i, j) is likely to be above the central pixel (i, j) Position or left and right position, if the central pixel (i, j) is the third pixel (22), the simulated first color intensity value of the central pixel (i, j), and the periphery of the central pixel (i, j) The simulated first color intensity value and the second color intensity value of the second pixel (21) in the four corner directions interpolate the intensity value of the second color.

內插單元(11)所進行之光譜內插,以使該等第一像素(20)以及該等第二像素(21)係各自產生該第三顏色之強度值為例,其中若中心像素(i,j)為該第一像素(20),則分別利用與中心像素(i,j)相鄰之第三像素(22)模擬出之第一顏色強度值與第三顏色強度值之色差,內插出該中心像素(i,j)之第三顏色強度值,其中與中心像素(i,j)相鄰之第三像素(22)有可能在該中心像素(i,j)之上下位置或左右位置,若中心像素(i,j)為該第二像素(21),則利用該中心像素(i,j)之模擬第一顏色強度值,以及該中心像素(i,j)週邊四個角落方向之第三像素(21)之模擬第一顏色強度值以及第三顏色強度值,內插出該第三顏色之強度值。Interpolating the spectral interpolation performed by the interpolation unit (11) such that the first pixel (20) and the second pixels (21) each generate an intensity value of the third color, wherein if the central pixel ( i, j) is the first pixel (20), and the color difference between the first color intensity value and the third color intensity value is simulated by the third pixel (22) adjacent to the central pixel (i, j), respectively. Interpolating a third color intensity value of the central pixel (i, j), wherein a third pixel (22) adjacent to the central pixel (i, j) is likely to be above and below the central pixel (i, j) Or the left and right positions, if the central pixel (i, j) is the second pixel (21), the simulated first color intensity value of the central pixel (i, j) is used, and the central pixel (i, j) is surrounded by four The simulated first color intensity value and the third color intensity value of the third pixel (21) in the corner direction interpolate the intensity value of the third color.

其中,該加權中值濾波器(12)所進行之中間加權中值濾波,係先利用該最佳之該第一顏色之強度值以及進行光譜內插後所產生之該第二顏色以及該第三顏色之強度值,求出該像素陣列(2)之第一顏色強度值與第二顏色強度值之色差,以及第一顏色強度值與第三顏色強度值之色差,再對需要強化精確度之位置的像素進行加權,以增加取該特定之像素之第一顏色強度值與第二顏色強度值之色差,以及第一顏色強度值與第三顏色強度值之色差之次數,最後該後處理單元(13)再利用第一顏色強度值與第二顏色強度值之色差,以及第一顏色強度值與第三顏色強度值之色差,並依據該最佳之該第一顏色之強度值,以及進行光譜內插後所產生之該第二顏色以及該第三顏色之強度值產生最後輸出之該第一顏色、該第二顏色以及該第三顏色之強度值。The intermediate weighted median filtering performed by the weighted median filter (12) first utilizes the optimal intensity value of the first color and the second color generated after spectral interpolation and the first The intensity value of the three colors is used to obtain the color difference between the first color intensity value and the second color intensity value of the pixel array (2), and the color difference between the first color intensity value and the third color intensity value, and then the precision needs to be enhanced. The pixels at the position are weighted to increase the color difference between the first color intensity value and the second color intensity value of the specific pixel, and the number of color differences between the first color intensity value and the third color intensity value, and finally the post processing The unit (13) reuses the color difference between the first color intensity value and the second color intensity value, and the color difference between the first color intensity value and the third color intensity value, and according to the optimal intensity value of the first color, and The second color generated by the spectral interpolation and the intensity value of the third color produce a final output of the first color, the second color, and the intensity value of the third color.

該內插單元(11)所進行之該初步內插以及該光譜內插係以雙線性內插法(bilinear interpolation)或雙立方內插法(bicubic interpolation)達成。The preliminary interpolation performed by the interpolation unit (11) and the spectral interpolation are achieved by bilinear interpolation or bicubic interpolation.

在本發明之一較佳實施例中,該第一顏色為綠色,該第二顏色為紅色,該第三顏色為藍色,但本發明並不以此為限,在本發明之另一實施例中,該第一顏色為綠色,該第二顏色為藍色,該第三顏色為紅色。In a preferred embodiment of the present invention, the first color is green, the second color is red, and the third color is blue, but the invention is not limited thereto, and another implementation of the present invention. In the example, the first color is green, the second color is blue, and the third color is red.

請參考第二至六圖所示,本發明之色彩內插方法(3),係適用於一像素陣列(2),該像素陣列(2)包括複數第一像素(20)、複數第二像素(21)以及複數第三像素(22),每一第一像素(20)具有一第一顏色之強度值,每一第二像素(21)具有一第二顏色之強度值,每一第三像素(22)具有一第三顏色之強度值,該色彩內插方法(3)包括步驟:Referring to the second to sixth figures, the color interpolation method (3) of the present invention is applicable to a pixel array (2) including a plurality of first pixels (20) and a plurality of second pixels. (21) and a plurality of third pixels (22), each first pixel (20) has a first color intensity value, and each second pixel (21) has a second color intensity value, each third The pixel (22) has a third color intensity value, and the color interpolation method (3) comprises the steps of:

步驟300:將該像素陣列(2)之複數第一像素(20)之排列方式分別視為45度以及135度交錯的排列方式,再分別沿著45度以及135度的方向去偵測該像素陣列(2)複數方向之邊緣特徵;Step 300: The arrangement of the plurality of first pixels (20) of the pixel array (2) is regarded as an arrangement of 45 degrees and 135 degrees, respectively, and then the pixels are detected along the directions of 45 degrees and 135 degrees, respectively. Array (2) edge features in the complex direction;

步驟301:依據該等邊緣特徵對該等第一像素(20)進行初步內插,以產生至少二內插結果,進行初步內插後,該等第二像素(21)以及該等第三像素(22)係各自產生該第一顏色之強度值;Step 301: Perform preliminary interpolation on the first pixels (20) according to the edge features to generate at least two interpolation results, and after performing preliminary interpolation, the second pixels (21) and the third pixels. (22) each generating an intensity value of the first color;

步驟302:根據該等邊緣特徵,對該等內插結果分配不同權重值,並進行方向性加權中值濾波;Step 302: assign different weight values to the interpolation results according to the edge features, and perform directional weighted median filtering;

步驟303:根據進行方向性加權中值濾波後之內插結果之該第一顏色之強度值,決定最佳之該第一顏色之強度值;Step 303: Determine an optimal intensity value of the first color according to the intensity value of the first color of the interpolation result after performing the directional weighted median filtering;

步驟304:對該像素陣列(2)進行光譜內插,使該等第一像素(20)以及該等第二像素(21)係各自產生該第三顏色之強度值,且該等第一像素(20)以及該等第三像素(22)係各自產生該第二顏色之強度值;以及Step 304: performing spectral interpolation on the pixel array (2), so that the first pixels (20) and the second pixels (21) respectively generate intensity values of the third color, and the first pixels (20) and the third pixels (22) each generating an intensity value of the second color;

步驟305:對該最佳之該第一顏色之強度值以及進行光譜內插後所產生之該第二顏色以及該第三顏色之強度值進行中間加權中值濾波,以決定最後輸出之該第一顏色、該第二顏色以及該第三顏色之強度值。Step 305: Perform intermediate weighted median filtering on the intensity value of the first color and the intensity value of the second color and the third color generated after spectral interpolation to determine the final output. The intensity value of a color, the second color, and the third color.

其中該步驟300係沿著135度的方向偵測出該像素陣列(2)五個方向之邊緣特徵,分別為一第一方向、一第二方向、一第三方向、一第四方向以及一第五方向,該第一方向、該第二方向、該第三方向、該第四方向以及該第五方向係分別以複數菱形方格從該像素陣列(2)原點(i,j)向二端延伸,各別菱形方格係內切一第二像素(21)或該第三像素(22),且各別菱形方格之四個角係各自對應一第一像素(20)。The step 300 detects the edge features of the five directions of the pixel array (2) along a direction of 135 degrees, which are a first direction, a second direction, a third direction, a fourth direction, and a a fifth direction, the first direction, the second direction, the third direction, the fourth direction, and the fifth direction are respectively from a plurality of diamond squares from an origin (i, j) of the pixel array (2) The two ends extend, and each of the diamond-shaped squares inscribes a second pixel (21) or the third pixel (22), and each of the four corners of each of the diamond-shaped squares corresponds to a first pixel (20).

若該原點(i,j)為第二像素(21),則先模擬出該等第一像素(20)之第二顏色之強度值,再分別求出該第一方向、該第二方向、該第三方向、該第四方向以及該第五方向上,原點(i,j)之菱形方格與其二端最接近之菱形方格相互之間最接近之角所對應之複數第一像素(20)的第一顏色強度值與第二顏色強度值之色差,接著對上述之第一顏色強度值與第二顏色強度值之色差取平均值,該平均值加上原點(i,j)上之第二顏色強度值,即為沿著135度的方向所偵測該像素陣列(2)之原點(i,j)上之邊緣特徵,但本發明並不以此為限,若該原點(i,j)為第三像素(21),則以第三顏色之強度值取代上述之第二顏色之強度值。If the origin (i, j) is the second pixel (21), the intensity values of the second color of the first pixels (20) are first simulated, and the first direction and the second direction are respectively obtained. In the third direction, the fourth direction, and the fifth direction, the first point corresponding to the closest angle between the diamond square of the origin (i, j) and the diamond square closest to the two ends thereof is first a color difference between the first color intensity value of the pixel (20) and the second color intensity value, and then averaging the color difference between the first color intensity value and the second color intensity value, the average value plus the origin (i, j) The second color intensity value is the edge feature on the origin (i, j) of the pixel array (2) detected along the direction of 135 degrees, but the invention is not limited thereto. When the origin (i, j) is the third pixel (21), the intensity value of the second color is replaced by the intensity value of the third color.

該步驟302係根據該第一方向、該第二方向、該第三方向、該第四方向以及該第五方向上所取得之平均值,對該第一方向、該第二方向、該第三方向、該第四方向以及該第五方向進行方向性加權中值濾波,而對該第一方向、該第二方向、該第三方向、該第四方向以及該第五方向取得之平均值分配不同之權重,以改變從該第一方向、該第二方向、該第三方向、該第四方向以及該第五方向上取得平均值之次數。The step 302 is based on the average values obtained in the first direction, the second direction, the third direction, the fourth direction, and the fifth direction, and the first direction, the second direction, and the third The direction, the fourth direction, and the fifth direction perform directional weighted median filtering, and the average values of the first direction, the second direction, the third direction, the fourth direction, and the fifth direction are averaged Different weights are used to change the number of times the average value is obtained from the first direction, the second direction, the third direction, the fourth direction, and the fifth direction.

其中該步驟304所進行之光譜內插,以使該等第一像素(20)以及該等第三像素(22)係各自產生該第二顏色之強度值為例,其中若中心像素(i,j)為該第一像素(20),則分別利用與中心像素(i,j)相鄰之第二像素(21)模擬出之第一顏色強度值與第二顏色強度值之色差,內插出該中心像素(i,j)之第二顏色強度值,其中與中心像素(i,j)相鄰之第二像素(21)有可能在該中心像素(i,j)之上下位置或左右位置,若中心像素(i,j)為該第三像素(22),則利用該中心像素(i,j)之模擬第一顏色強度值,以及該中心像素(i,j)週邊四個角落方向之第二像素(21)之模擬第一顏色強度值以及第二顏色強度值,內插出該第二顏色之強度值。The spectral interpolation performed by the step 304 is such that the first pixel (20) and the third pixel (22) each generate an intensity value of the second color, wherein if the central pixel (i, j) for the first pixel (20), respectively, using the second pixel (21) adjacent to the central pixel (i, j) to simulate the color difference between the first color intensity value and the second color intensity value, interpolation a second color intensity value of the central pixel (i, j), wherein the second pixel (21) adjacent to the central pixel (i, j) is likely to be above or below the central pixel (i, j) Position, if the central pixel (i, j) is the third pixel (22), the simulated first color intensity value of the central pixel (i, j) and the four corners surrounding the central pixel (i, j) The simulated first color intensity value and the second color intensity value of the second pixel (21) of the direction interpolate the intensity value of the second color.

其中該步驟304所進行之光譜內插,以使該等第一像素(20)以及該等第二像素(21)係各自產生該第三顏色之強度值為例,其中若中心像素(i,j)為該第一像素(20),則分別利用與中心像素(i,j)相鄰之第三像素(22)模擬出之第一顏色強度值與第三顏色強度值之色差,內插出該中心像素(i,j)之第三顏色強度值,其中與中心像素(i,j)相鄰之第三像素(22)有可能在該中心像素(i,j)之上下位置或左右位置,若中心像素(i,j)為該第二像素(21),則利用該中心像素(i,j)之模擬第一顏色強度值,以及該中心像素(i,j)週邊四個角落方向之第三像素(21)之模擬第一顏色強度值以及第三顏色強度值,內插出該第三顏色之強度值。The spectral interpolation performed in the step 304 is such that the first pixel (20) and the second pixels (21) respectively generate an intensity value of the third color, wherein if the central pixel (i, j) for the first pixel (20), respectively, using the third pixel (22) adjacent to the central pixel (i, j) to simulate the color difference between the first color intensity value and the third color intensity value, interpolation a third color intensity value of the central pixel (i, j), wherein the third pixel (22) adjacent to the central pixel (i, j) is likely to be above or below the central pixel (i, j) Position, if the central pixel (i, j) is the second pixel (21), the simulated first color intensity value of the central pixel (i, j) and the four corners surrounding the central pixel (i, j) The simulated first color intensity value and the third color intensity value of the third pixel (21) of the direction interpolate the intensity value of the third color.

該步驟305所進行之中間加權中值濾波,係先利用該最佳之該第一顏色之強度值以及進行光譜內插後所產生之該第二顏色以及該第三顏色之強度值,求出該像素陣列(2)之第一顏色強度值與第二顏色強度值之色差,以及第一顏色強度值與第三顏色強度值之色差,再對需要強化精確度之位置的像素進行加權,以增加取該特定之像素之第一顏色強度值與第二顏色強度值之色差,以及第一顏色強度值與第三顏色強度值之色差之次數,最後再利用第一顏色強度值與第二顏色強度值之色差,以及第一顏色強度值與第三顏色強度值之色差,並依據該最佳之該第一顏色之強度值,以及進行光譜內插後所產生之該第二顏色以及該第三顏色之強度值產生最後輸出之該第一顏色、該第二顏色以及該第三顏色之強度值。The intermediate weighted median filtering performed in step 305 is performed by first using the optimal intensity value of the first color and the intensity value of the second color and the third color generated after spectral interpolation. a color difference between the first color intensity value and the second color intensity value of the pixel array (2), and a color difference between the first color intensity value and the third color intensity value, and then weighting the pixel at a position where the precision is required to be Increasing a color difference between the first color intensity value and the second color intensity value of the specific pixel, and a color difference between the first color intensity value and the third color intensity value, and finally using the first color intensity value and the second color a color difference of the intensity value, and a color difference between the first color intensity value and the third color intensity value, and according to the optimal intensity value of the first color, and the second color generated after spectral interpolation and the first The intensity values of the three colors produce a final output of the first color, the second color, and the intensity value of the third color.

其中該等邊緣特徵更包括圖像內容之水平寬度與垂直寬度,並依據圖像內容之水平寬度與垂直寬度,對該等第一像素(20)進行初步內插,以產生至少一寬度內插結果,使該等第二像素(21)以及該等第三像素(22)係各自產生該第一顏色之強度值,該步驟302中之內插結果係包括該等寬度內插結果。The edge features further include a horizontal width and a vertical width of the image content, and preliminary interpolating the first pixels (20) according to the horizontal width and the vertical width of the image content to generate at least one width interpolation. As a result, the second pixels (21) and the third pixels (22) each generate an intensity value of the first color, and the interpolation result in the step 302 includes the width interpolation results.

在本發明之一實施例中,若原點(i,j)為一第二像素(21),當圖像內容之水平寬度大於垂直寬度,則該寬度內插結果,係從該圖像內容之垂直方向第一像素之第一顏色強度值與模擬第二顏色強度值之色差,以及該圖像內容之垂直方向上下對稱第二像素之第二顏色強度值之平均取得,當圖像內容之水平寬度小於垂直寬度,則該寬度內插結果,係從該圖像內容之水平方向第一像素之第一顏色強度值與模擬第二顏色強度值之色差,以及該圖像內容之水平方向左右對稱第二像素之之第二顏色強度值之平均取得,該步驟302所進行之方向性加權中值濾波中之邊緣特徵係包括該等寬度內插結果。In an embodiment of the present invention, if the origin (i, j) is a second pixel (21), when the horizontal width of the image content is greater than the vertical width, the width interpolation result is from the image content. The color difference between the first color intensity value of the first pixel in the vertical direction and the color intensity value of the simulated second color intensity, and the average of the second color intensity values of the second pixel symmetrically up and down in the vertical direction of the image content, when the image content level If the width is smaller than the vertical width, the width interpolation result is a color difference between the first color intensity value of the first pixel and the simulated second color intensity value in the horizontal direction of the image content, and the horizontal direction of the image content is bilaterally symmetric. The average of the second color intensity values of the second pixels is obtained. The edge features in the directional weighted median filtering performed in step 302 include the width interpolation results.

其中該步驟301之初步內插以及該步驟304之光譜內插係以雙線性內插法(bilinear interpolation)或雙立方內插法(bicubic interpolation)達成。The preliminary interpolation of the step 301 and the spectral interpolation of the step 304 are achieved by bilinear interpolation or bicubic interpolation.

在本發明之一較佳實施例中,該第一顏色為綠色,該第二顏色為紅色,該第三顏色為藍色,但本發明並不以此為限,在本發明之另一實施例中,該第一顏色為綠色,該第二顏色為藍色,該第三顏色為紅色。In a preferred embodiment of the present invention, the first color is green, the second color is red, and the third color is blue, but the invention is not limited thereto, and another implementation of the present invention. In the example, the first color is green, the second color is blue, and the third color is red.

由於本發明係透過沿著45度或135度的方向去偵測與重建彩色濾光片陣列之邊緣特徵,因此能夠避免於圖像之圖形邊界產生拉鍊狀、色彩重疊以及補色錯誤等失真情況;再者,其結構型態以及步驟方法並非所屬技術領域中之人士所能輕易思及而達成者,實具有新穎性以及進步性無疑。Since the present invention detects and reconstructs edge features of the color filter array in a direction of 45 degrees or 135 degrees, it is possible to avoid distortion such as zipper shape, color overlap, and complementary color error at the image boundary of the image; Moreover, the structure and the method of the steps are not easily reached by those skilled in the art, and are novel and progressive.

透過上述之詳細說明,即可充分顯示本發明之目的及功效上均具有實施之進步性,極具產業之利用性價值,且為目前市面上前所未見之新發明,完全符合發明專利要件,爰依法提出申請。唯以上所述著僅為本發明之較佳實施例而已,當不能用以限定本發明所實施之範圍。即凡依本發明專利範圍所作之均等變化與修飾,皆應屬於本發明專利涵蓋之範圍內,謹請 貴審查委員明鑑,並祈惠准,是所至禱。Through the above detailed description, it can fully demonstrate that the object and effect of the present invention are both progressive in implementation, highly industrially usable, and are new inventions not previously seen on the market, and fully comply with the invention patent requirements. , 提出 apply in accordance with the law. The above is only the preferred embodiment of the present invention, and is not intended to limit the scope of the invention. All changes and modifications made in accordance with the scope of the invention shall fall within the scope covered by the patent of the invention. I would like to ask your review committee to give a clear explanation and pray for it.

(1)...色彩內插裝置(1). . . Color interpolation device

(10)...邊緣特徵偵測單元(10). . . Edge feature detection unit

(11)...內插單元(11). . . Interpolation unit

(12)...加權中值濾波器(12). . . Weighted median filter

(13)...後處理單元(13). . . Post processing unit

(2)...像素陣列(2). . . Pixel array

(20)...第一像素(20). . . First pixel

(21)...第二像素(twenty one). . . Second pixel

(22)...第三像素(twenty two). . . Third pixel

(3)...色彩內插方法(3). . . Color interpolation method

300...步驟300. . . step

301...步驟301. . . step

302...步驟302. . . step

303...步驟303. . . step

304...步驟304. . . step

305...步驟305. . . step

第一圖係為本發明之色彩內插裝置之架構圖;The first figure is an architectural diagram of the color interpolation device of the present invention;

第二圖係為將一像素陣列之複數第一像素之排列方式視為135度交錯的排列方式之示意圖;The second figure is a schematic diagram of the arrangement of the plurality of first pixels of a pixel array as a 135 degree interleaving arrangement;

第三a圖係為沿著135度的方向去偵測該像素陣列第一方向之邊緣特徵之示意圖;The third a diagram is a schematic diagram of detecting edge features of the first direction of the pixel array along a direction of 135 degrees;

第三b圖係為沿著135度的方向去偵測該像素陣列第二方向之邊緣特徵之示意圖;The third b diagram is a schematic diagram of detecting edge features of the second direction of the pixel array along a direction of 135 degrees;

第三c圖係為沿著135度的方向去偵測該像素陣列第三方向之邊緣特徵之示意圖;The third c-picture is a schematic diagram of detecting edge features of the third direction of the pixel array along a direction of 135 degrees;

第三d圖係為沿著135度的方向去偵測該像素陣列第四方向之邊緣特徵之示意圖;The third d-picture is a schematic diagram of detecting edge features of the fourth direction of the pixel array along a direction of 135 degrees;

第三e圖係為沿著135度的方向去偵測該像素陣列第五方向之邊緣特徵之示意圖;The third e-picture is a schematic diagram of detecting edge features of the fifth direction of the pixel array along a direction of 135 degrees;

第四a圖係為一圖像內容之水平寬度邊緣特徵之示意圖;The fourth a diagram is a schematic diagram of the horizontal width edge feature of an image content;

第四b圖係為該圖像內容之垂直寬度邊緣特徵之示意圖;The fourth b diagram is a schematic diagram of the vertical width edge features of the image content;

第五a圖係為一第一像素產生一第二顏色之強度值之第一實施例;The fifth embodiment is a first embodiment in which a first pixel generates a second color intensity value;

第五b圖係為該第一像素產生該第二顏色之強度值之第二實施例;The fifth b is a second embodiment in which the first pixel generates an intensity value of the second color;

第五c圖係為一第三像素產生該第二顏色之強度值之一實施例;以及The fifth c-picture is an embodiment in which a third pixel generates an intensity value of the second color;

第六圖係為本發明之色彩內插方法之方法流程圖。The sixth figure is a flow chart of the method of the color interpolation method of the present invention.

(1)...色彩內插裝置(1). . . Color interpolation device

(10)...邊緣特徵偵測單元(10). . . Edge feature detection unit

(11)...內插單元(11). . . Interpolation unit

(12)...加權中值濾波器(12). . . Weighted median filter

(13)...後處理單元(13). . . Post processing unit

Claims (10)

一種色彩內插裝置,係適用於一像素陣列,該像素陣列包括複數第一像素、複數第二像素以及複數第三像素,每一第一像素具有一第一顏色之強度值,每一第二像素具有一第二顏色之強度值,每一第三像素具有一第三顏色之強度值,該色彩內插裝置包括:一邊緣特徵偵測單元,係分別將該像素陣列之複數第一像素之排列方式視為45度以及135度交錯的排列方式,再分別從沿著45度以及135度的方向去偵測該像素陣列複數方向之邊緣特徵;一內插單元,係與該邊緣特徵偵測單元連結,係依據該等邊緣特徵對該等第一像素進行內插而產生至少二內插結果,使該等第二像素以及該等第三像素係各自產生該第一顏色之強度值,並對該像素陣列進行光譜內插,使該等第一像素以及該等第二像素係各自產生該第三顏色之強度值,且該等第一像素以及該等第三像素係各自產生該第二顏色之強度值;一加權中值濾波器,係分別與該邊緣特徵偵測單元以及該內插單元連接,並依據該邊緣特徵,對該等內插結果分配不同權重值,並進行方向性加權中值濾波(Directional Weighted Median Filtering),以決定最佳之該第一顏色之強度值,並對該最佳之該第一顏色之強度值以及進行光譜內插後所產生之該第二顏色以及該第三顏色之強度值進行中間加權中值濾波(Center Weighted Median Filtering);以及一後處理單元,係與該加權中值濾波器連接,並依據進行中間加權中值濾波後之該最佳之該第一顏色之強度值,以及進行光譜內插後所產生之該第二顏色以及該第三顏色之強度值,產生最後輸出之該第一顏色、該第二顏色以及該第三顏色之強度值。A color interpolation device is applicable to a pixel array, the pixel array includes a plurality of first pixels, a plurality of second pixels, and a plurality of third pixels, each of the first pixels having a first color intensity value, each second The pixel has a second color intensity value, and each of the third pixels has a third color intensity value. The color interpolation device includes: an edge feature detecting unit, wherein the plurality of first pixels of the pixel array are respectively The arrangement is regarded as an arrangement of 45 degrees and 135 degrees of interleaving, and then detects edge features of the pixel array in a direction along 45 degrees and 135 degrees respectively; an interpolation unit, and the edge feature detection a unit connection, wherein the first pixels are interpolated according to the edge features to generate at least two interpolation results, so that the second pixels and the third pixel systems respectively generate the intensity values of the first color, and Performing spectral interpolation on the pixel array, such that the first pixel and the second pixel system respectively generate intensity values of the third color, and the first pixels and the third pixel systems are respectively Self-generating the intensity value of the second color; a weighted median filter is respectively connected to the edge feature detecting unit and the interpolation unit, and according to the edge feature, assigning different weight values to the interpolation results, And performing Directional Weighted Median Filtering to determine the best intensity value of the first color, and the optimal intensity value of the first color and the spectral interpolation The second color and the intensity value of the third color are subjected to Center Weighted Median Filtering; and a post-processing unit is connected to the weighted median filter and is subjected to intermediate weighted median filtering. The best intensity value of the first color, and the second color generated by the spectral interpolation and the intensity value of the third color, the last color of the first color, the second color, and the The intensity value of the third color. 如申請專利範圍第1項所述之色彩內插裝置,其中該邊緣特徵偵測單元所偵測的邊緣特徵更包括圖像內容之水平寬度與垂直寬度,且該內插單元更依據圖像內容之水平寬度與垂直寬度產生一寬度內插結果,使該等第二像素以及該等第三像素係各自產生該第一顏色之強度值,該加權中值濾波器所進行之方向性加權中值濾波中之內插結果係包括該等寬度內插結果。The color interpolation device of claim 1, wherein the edge feature detected by the edge feature detecting unit further includes a horizontal width and a vertical width of the image content, and the interpolation unit is further based on the image content. The horizontal width and the vertical width generate a width interpolation result, so that the second pixel and the third pixel system each generate an intensity value of the first color, and the weighted median filter performs a directional weighted median The interpolation result in the filtering includes the width interpolation results. 如申請專利範圍第1項所述之色彩內插裝置,其中該內插單元所進行之該初步內插以及該光譜內插係以雙線性內插法(bilinear interpolation)或雙立方內插法(bicubic interpolation)達成。The color interpolation device according to claim 1, wherein the preliminary interpolation performed by the interpolation unit and the spectral interpolation are performed by bilinear interpolation or bicubic interpolation. (bicubic interpolation) is achieved. 如申請專利範圍第1項所述之色彩內插裝置,其中該第一顏色為綠色,該第二顏色為紅色,該第三顏色為藍色。The color interpolation device of claim 1, wherein the first color is green, the second color is red, and the third color is blue. 如申請專利範圍第1項所述之色彩內插裝置,其中該第一顏色為綠色,該第二顏色為藍色,該第三顏色為紅色。The color interpolation device of claim 1, wherein the first color is green, the second color is blue, and the third color is red. 一種色彩內插方法,係適用於一像素陣列,該像素陣列包括複數第一像素、複數第二像素以及複數第三像素,每一第一像素具有一第一顏色之強度值,每一第二像素具有一第二顏色之強度值,每一第三像素具有一第三顏色之強度值,該色彩內插方法包括步驟:將該像素陣列之複數第一像素之排列方式分別視為45度以及135度交錯的排列方式,再分別沿著45度以及135度的方向去偵測該像素陣列複數方向之邊緣特徵;依據該等邊緣特徵對該等第一像素進行初步內插,以產生至少二內插結果,進行初步內插後,該等第二像素以及該等第三像素係各自產生該第一顏色之強度值;根據該等邊緣特徵,對該等內插結果分配不同權重值,並進行方向性加權中值濾波;根據進行方向性加權中值濾波後之內插結果之該第一顏色之強度值,決定最佳之該第一顏色之強度值;對該像素陣列進行光譜內插,使該等第一像素以及該等第二像素係各自產生該第三顏色之強度值,且該等第一像素以及該等第三像素係各自產生該第二顏色之強度值;以及對該最佳之該第一顏色之強度值以及進行光譜內插後所產生之該第二顏色以及該第三顏色之強度值進行中間加權中值濾波,以決定最後輸出之該第一顏色、該第二顏色以及該第三顏色之強度值。A color interpolation method is applicable to a pixel array, the pixel array includes a plurality of first pixels, a plurality of second pixels, and a plurality of third pixels, each of the first pixels having a first color intensity value, each second The pixel has a second color intensity value, and each third pixel has a third color intensity value. The color interpolation method includes the steps of: respectively arranging the plurality of first pixels of the pixel array as 45 degrees and 135 degree interlaced arrangement, and then detecting edge features of the pixel array in the direction of 45 degrees and 135 degrees respectively; preliminary interpolating the first pixels according to the edge features to generate at least two Interpolating results, after performing preliminary interpolation, the second pixels and the third pixel systems respectively generate intensity values of the first color; according to the edge features, assigning different weight values to the interpolation results, and Performing directional weighted median filtering; determining an optimal intensity value of the first color according to the intensity value of the first color of the interpolation result after performing the directional weighted median filtering; Performing spectral interpolation on the pixel array, such that the first pixel and the second pixel systems respectively generate intensity values of the third color, and the first pixels and the third pixel systems each generate the second The intensity value of the color; and the intermediate weighted median filtering of the optimal intensity value of the first color and the intensity value of the second color and the third color generated after spectral interpolation to determine the final output The intensity values of the first color, the second color, and the third color. 如申請專利範圍第6項所述之色彩內插方法,其中該等邊緣特徵更包括圖像內容之水平寬度與垂直寬度,並依據圖像內容之水平寬度與垂直寬度,對該等第一像素進行初步內插,以產生至少一寬度內插結果,使該等第二像素以及該等第三像素係各自產生該第一顏色之強度值,該進行方向性加權中值濾波步驟中之內插結果係包括該等寬度內插結果。The color interpolation method according to claim 6, wherein the edge features further comprise a horizontal width and a vertical width of the image content, and the first pixels are according to the horizontal width and the vertical width of the image content. Performing preliminary interpolation to generate at least one width interpolation result, such that the second pixels and the third pixel systems each generate an intensity value of the first color, and the interpolation in the directional weighted median filtering step The result includes the width interpolation results. 如申請專利範圍第6項所述之色彩內插方法,其中該初步內插以及該光譜內插係以雙線性內插法(bilinear interpolation)或雙立方內插法(bicubic interpolation)達成。The color interpolation method of claim 6, wherein the preliminary interpolation and the spectral interpolation are achieved by bilinear interpolation or bicubic interpolation. 如申請專利範圍第6項所述之色彩內插方法,其中該第一顏色為綠色,該第二顏色為紅色,該第三顏色為藍色。The color interpolation method of claim 6, wherein the first color is green, the second color is red, and the third color is blue. 如申請專利範圍第6項所述之色彩內插方法,其中該第一顏色為綠色,該第二顏色為藍色,該第三顏色為紅色。The color interpolation method of claim 6, wherein the first color is green, the second color is blue, and the third color is red.
TW100128803A 2011-08-12 2011-08-12 Color interpolation device and method thereof TWI455063B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
TW100128803A TWI455063B (en) 2011-08-12 2011-08-12 Color interpolation device and method thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW100128803A TWI455063B (en) 2011-08-12 2011-08-12 Color interpolation device and method thereof

Publications (2)

Publication Number Publication Date
TW201308249A TW201308249A (en) 2013-02-16
TWI455063B true TWI455063B (en) 2014-10-01

Family

ID=48169864

Family Applications (1)

Application Number Title Priority Date Filing Date
TW100128803A TWI455063B (en) 2011-08-12 2011-08-12 Color interpolation device and method thereof

Country Status (1)

Country Link
TW (1) TWI455063B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107529046B (en) * 2017-02-23 2024-03-08 思特威(深圳)电子科技有限公司 Color filter array and image sensor

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI274908B (en) * 2005-11-22 2007-03-01 Univ Nat Cheng Kung A method for interpolating the color of color filter array
US7236628B2 (en) * 1999-12-21 2007-06-26 Nikon Corporation Interpolation processing apparatus and recording medium having interpolation processing program recording therein
US7840096B2 (en) * 2006-01-23 2010-11-23 Samsung Electronics Co., Ltd. Directional interpolation method and video encoding/decoding apparatus and method using the directional interpolation method
US7961232B2 (en) * 2004-01-05 2011-06-14 Lifesize Communications, Inc. Calculating interpolation errors for interpolation edge detection

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7236628B2 (en) * 1999-12-21 2007-06-26 Nikon Corporation Interpolation processing apparatus and recording medium having interpolation processing program recording therein
US7961232B2 (en) * 2004-01-05 2011-06-14 Lifesize Communications, Inc. Calculating interpolation errors for interpolation edge detection
TWI274908B (en) * 2005-11-22 2007-03-01 Univ Nat Cheng Kung A method for interpolating the color of color filter array
US7840096B2 (en) * 2006-01-23 2010-11-23 Samsung Electronics Co., Ltd. Directional interpolation method and video encoding/decoding apparatus and method using the directional interpolation method

Also Published As

Publication number Publication date
TW201308249A (en) 2013-02-16

Similar Documents

Publication Publication Date Title
TWI504276B (en) Image sensor for capturing a color image
JP5724185B2 (en) Image processing apparatus, image processing method, and program
TWI547169B (en) Image processing method and module
CN105141838B (en) Demosaicing methods and the device for using this method
TWI324011B (en) Method for compensating pixel of image
JP2007251393A5 (en)
JP2009065671A (en) Color interpolation method, color interpolation apparatus and computer program
TWI588757B (en) Edge detection system and methods
TW200834467A (en) Providing a desired resolution color image
JP2001095001A (en) Demosaic method of image
TW201203130A (en) System for correcting image and correcting method thereof
JP2012186755A5 (en)
CN108961167A (en) A kind of Bayer-CFA interpolation method based on finite difference and gradient
TWI420124B (en) Edge detection apparatus and computing circuit employed in edge detection apparatus
TWI455063B (en) Color interpolation device and method thereof
JP2010016812A (en) Image processing apparatus and method, and computer-readable medium
TWI751124B (en) Method for processing signals arising from a colour image capture matrix, and corresponding sensor
TWI282519B (en) Color interpolation method with directed weights
WO2022061879A1 (en) Image processing method, apparatus and system, and computer-readable storage medium
EP2248102A2 (en) Method and device for reconstructing a color image
CN104038746A (en) Data interpolation method for BAYER format image
US8189910B2 (en) Color interpolation method for digital image
CN113242413B (en) Interpolation calculation method and system for anti-sawtooth RCCB filter array
JP2009095012A (en) Method for determining direction of interpolation, method and apparatus for color interpolation
JP3697459B2 (en) Image processing method and image processing apparatus

Legal Events

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