影像修補技術是近十年來被廣泛討論的技術之一,其為一種將受損影像或選 定刪去物後,利用影像中現有資訊來做修補的技術。目的在於經過修補的影像, 是可以自然、不易被人眼所看出異狀。但目前對於需修補的區域面積較大,又要 維持影像結構的一致性,是需要人為的介入,使用者必須先畫出影像結構的形 狀,否則很容易造成修補過後的影像,有結構不一致的問題產生。 在此論文中,提出了一種自動保留結構與材質一致性的影像修補技術,希望 不需人為介入就可以達成保留結構一致性的效果。在此,為找出影像的主體結 構,使用邊界保留(edge-preserving)的方法,把材質的部份做平滑的處理,接著利用邊界偵測(edge detection)的方法,抓出影像的主體結構線,最後藉由邊緣分析與串連(edge analysis and linking)推測出而被修補區域中所缺少的結構,接著以此結構為準則來做影像修補,修補結果要盡可能滿足推測出的結構,以此達成結構的延續與一致性。 在影像修補的過程中,演算法分別對影像的結構與材質部份採取不同的演算 法來做修補。其中針對影像中屬於結構的部份,採用全域修補的方式來進行修 補,而針對影像中屬於材質的部份則結合了材質生成和影像修補的演算法來進行 修補的動作。實驗的結果顯示,提出的方法能有效保留影像結構與材質的一致 性,並且也和其他影像修補方法以及Photoshop CS5做比較,來探討彼此修補過 後的差異。
Image Inpainting is a useful method for removing part of the objects in a image.Traditional inpainting techniques considered only the local informations, which may cause artifacts. In this thesis, a novel approach of inpainting for preserving structure consistence is proposed. It combines the advantages of both structure propagation and texture synthesis. In the proposed algorithm, user intervenes only at the beginning for defining the damaged area, and the left completes automatically. The algorithm can be divided into three steps, pre-processing, structure propagation then texture synthesis. In pre-processing step, edge-preserving lter is used to smooth texture area, edge detection to nd structure edge and edge analysis and linking is used to guess structure edge in damaged area. In order to preserve the structure consistence, the proposed method use the guessed structure edge as guidance to perform structure propagation. In the repairing precessing, the proposed algorithm treat structure and texture with di erent algorithm. At structure propagation step, global optimization algorithm is used to perform image structure repair. In texture synthesis, inpainting and texture synthesis algorithm are integrated to inpaint the texture of image. Experiment result shows that the proposed algorithm preserve structure and texture consistence in effect.