130 likes | 322 Views
Texture Synthesis by Patch-Based Sampling. Real-Time Texture Synthesis By Patch-Based Sampling , LinLiang, Ce-Liu, Yingqing Xu, Baining Guo, Heung-Yeng Shum, 2001. Presented by: Maryia Kazakevich Dec.3, 2004. Outline. Background to Texture Synthesis Patch-based sampling Algorithm outline
E N D
Texture Synthesis by Patch-Based Sampling Real-Time Texture Synthesis By Patch-Based Sampling, LinLiang, Ce-Liu, Yingqing Xu, Baining Guo, Heung-Yeng Shum, 2001. Presented by: Maryia Kazakevich Dec.3, 2004
Outline • Background to Texture Synthesis • Patch-based sampling • Algorithm outline • Some details • Summary of the method • Results Maryia Kazakevich
Background • Want output texture to appear perceptually similar to input • Several techniques possible: • Similar: pixel-based sampling Neighbourhood match • Texture mapping: simple tiling might be unacceptable
Patch-Based Sampling • Select next patch from the input image based on the boundary zone match
Outline of Algorithm • Randomly select first texture patch. • Choose the next patch from the input image to paste in the output. • Repeat previous step until output image is fully covered. • Blend pixels in the boundary zones.
Algorithm in detail • To select the next patch: • Construct a set of possible texture patches with boundary zone matching the output: • If the set is empty, chose the patch with minimum d(EBk, Ekout) Otherwise randomly select a patch from yb as next texture patch to paste into the output image
Algorithm in detail (constructing yb) Boundary zone matching: A – number of pixels in the boundary zone Pi – i-th pixel of the boundary zone EBk, Ekout – boundary zone of the next patch and output image e – relative matching error between boundary zones
Boundary zone blending • To smooth the transition between adjacent patches, blend them using feathering: d(x) – distance to the border pixel w – monotonic function (used w(d(x)) = d(x)) I – original intensity C – output intensity
Summary • Paste random patch in one of the corners. • Select next best suited patch and paste it in the next spot in the output image. • Blend the overlap regions between patches.
Input parameters • Patch size – how well local characteristics of input texture are captured • Larger boundary zone width – stronger statistical constraint, more natural transition between boundaries • Relative matching error – controls similarity of overlapping boundary zones
Influence of the parameters • Input: 32x32, Output: 64x64 Checkers: • Patch size: 16x16; 8x8 • boundary: 2; 8 • Relative matching error: 0.6; 0.2 Dots: • Patch size: 16x16; 6x6 • boundary: 2; 10 • Relative matching error: 0.2; 0.2
My interface • Not shown: • Input fields for the output texture size • Buttons for selecting a different input picture and for synthesizing
Results • Patch size:16x16, boundary: 2 • Relative matching error: 0.2 • Input: 32x32, Output: 64x64 • Input: 32x32, Output: 84x84