為了降低成本,目前大部份數位相機使用單晶片感光元件及一片三色交錯濾光鏡。每一感光像素只有一種顏色,因此每一顏色頻道必需各自內插出缺少的顏色像素。已有多種內插法被提出,但各種方法各有其優缺點,其中最大的問題在於諸多方法都會產生邊界模糊及彩色雜點等不良現象。 我們提出一個改良的演算法,以偵測邊界為優先,再沿著邊界取鄰近點內插,避免橫跨邊界,以降低邊界模糊及彩色雜點的問題。我們以數張影像作實驗,並與其他數種內插法相比,本方法確實可大幅改善及提昇影像品質。特別是在高頻區域,例如條紋或欄杆等,邊界不僅保持清晰而且彩色雜點的狀況也減少許多。在運算量方面,排除複雜的乘除法運算,適合應用在低成本的硬體上。不論是影像品質或低運算量,我們的方法皆比其他方法有更好的表現。 In order to reduce cost, most digital still cameas use a single-chip sensor and covered with a color filter array. There is only one color at each pixel, so the other two missing color must be interpolated in every color channel. Many interpolation algorithms have been proposed, but they have advantages and disadvantages respectively. The most problem is blurry edge and false color. We proposed an improved algorithm, which is edge directed and interpolate pixels along the edge to reduce blurry edge and false color. We experiment on several images and compare with other interpolation algorithms. The experiment result shows our proposed soultion surely improve the quality of interpolated images. Especially in high frequent area, the edges keep sharp and false color is reduced. We keep complicated calculation away and the algorithim is suited for apply to low-cost hardware. Our proposed algorithm makes better performance than other ones.