本論文針對國畫中的字元做字元擷取的動作,並將取得的字元位置利用樣本比對方法,將影像修復回尚未有題字或是蓋印的原樣。國畫為歷史文件,為了讓國畫可以永久保存不受毀壞因此建立數位檔案,且可提供人們線上瀏覽使用;因有許多字體與印章大多是後人收藏時才題字或蓋印,所以我們除了取出國畫上的字體外,更進一步將有字體的部份修復回單純只有畫作的影像。 國畫中的字體並無一定位置,大多在整張影像的四周,而背景由山水到花鳥皆有,並無一定格式。我們提出以型態學的背景重建(morphological reconstruct- tion)取得與四邊相連的背景資訊,再將與原影像相減反白後,取得文字的影像。接著使用各種型態學運算(morphological operactions)及connected component analysis來找出字元區塊,最後使用樣本比對方法修補得到的字元區塊。我們所提出的方法,經過實驗大多可得到令人滿意的成果。 More and more Chinese paintings are digitalized and browsed by people on the Internet. This paper proposes a two-folded scheme to extract calligraphy and seals from Chinese painting images and inpaint the original images such that images contain painting only. To accomplish the extraction task, a morphological operation, reconstruction by erosion, is used to remove most content of a painting (i.e. background). Consequently, background positioned in the center and connected to borders of the image will be removed. As a result, calligraphy and seals become the principal object and making extraction task much simplified. To accomplish the inpainting task, an adaptive sampling selection method is used for automatically choosing a sample most close to the damaged pixel for inpainting. The proposed algorithm has been executed on a set of Chinese paintings and proved its efficacy.