在本篇論文中,我們首先探討了現在具代表性的幾種inpainting演算法,發現基於偏微分方程的inpainting演算法對於結構性的保留的效果良好,但是大部分基於偏微分方程的inpainting演算法其計算複雜度都相當高。所以我們提出一個用來修補卡通的新inpainting演算法,我們使用顏色分群的技術來取得結構性資料或稱輪廓線並且使用餘弦定理來計算輪廓線取樣長度,以我們取樣的輪廓線推算出在修補區域內輪廓線的結構性,進而使用類似於現實生活中的貝茲曲線來重建消失的結構性資料。本篇論文中所提之演算法運算速度非常快,並且能充分保留修補區域內結構性的資料。 In this study, we first studied several inpainting algorithms. Inpainting algorithms based PDE (Partial Differential Equation) preserve the construction very well, but time consuming. We propose a new inpainting algorithm for cartoon based on color segmentation to preserve the structure of image. After trying several different ways to find the map of contour lines, we use color segmentation to construct the map of contour lines, and use the law of cosine to estimate the length of contour line we sample. We also estimate the slope of contour lines and compute how they should extend in the inpainting domain. We use the advantage of Bézier curves that fit the curves to the real world to reconstruct the contour lines. The algorithm also fit to more general cases.