Successfully reported this slideshow.

Texture Synthesis

4

Share

Loading in …3
×
1 of 24
1 of 24

More Related Content

Texture Synthesis

  1. 1. Texture Synthesis using the Image Quilting Algorithm<br />From Image Quilting for Texture Synthesis and Transferby Efros & Freeman, SIGGRAPH 2001<br />Presenter: Vicente Ordonez<br />Department of Computer Science Stony Brook University <br />State University of New York<br />
  2. 2. Texture Synthesis<br />Given a sample texture image, generate an output texture of arbitrary size.<br />
  3. 3. It Should Work on Different Types of Textures<br />Stochastic textures (no apparent structure)<br />
  4. 4. It Should Work on Different Types of Textures<br />Repeated textures (Structured)<br />
  5. 5. Other types of textures<br />Semi-structured textures. Repetition and stochastic processes involved.<br />
  6. 6. The Taking Patch Samples from the Sample Image Approach<br />Xu et al. from MSR proposed the idea of taking random patch samples from the input image and then blending them together by blurring the edges.<br />
  7. 7. Take the Patches so that they Agree on Some Overlapping Region<br />B1<br />B2<br />Neighboring blocks<br />constrained by overlap<br />Idea: <br />Select the K patches from the input sample that match closely to the current overlapping region in the output texture.<br />Pick one of those K patches randomly.<br />
  8. 8. Algorithm<br />Select a random patch from the input image and place it on the top left corner of the output texture.<br />Go through the output texture in raster scan order with steps of the size of the patch minus the dimension of the overlap region.<br />Using the current overlap region in the output texture, search for every location in the input image that minimizes the sum of square distances error between the overlap with top and left side of the last patch.<br />Choose randomly one of the patches identified in the previous step and paste it into the output texture.<br />
  9. 9. How to avoid repeating calculations?<br />Idea: Don’t calculate the SSD for the overlapping regions for each possible positions one-bye-one but do it all in one pass.<br />This is the objective:<br />
  10. 10. How to avoid repeating calculations?<br />
  11. 11. Blend each new patch along a Minimum Error Boundary Cut<br />Calculate a cut between patches that minimizes the error along the overlap region.<br />B1<br />B2<br />Minimal error<br />boundary cut<br />
  12. 12. Using Dynamic Programming to Calculate the Minimum Cost Path<br />Generate a minimum cost path table {Eij} using the overlap error area {eij} using Dynamic Programming as follows:<br />Traverse backwards the resulting table to find the minimum cost path.<br />
  13. 13. Error Overlap Region and min-cut<br />
  14. 14. Running the min-cut algorithm <br />
  15. 15. How to get a better blending?<br />Alpha blending <br />Pyramid blending<br />Histogram matching<br />Blending in the gradient domain<br />Poisson Blending<br />
  16. 16. User Controlled Parameters<br />The size of the patches. This heavily affects the results. The ideal size patch is the one that captures the minimum units of detail of the objects being repeated in the texture. We also have to be careful not to choose the size patch so large so that the stochastic nature of the results gets affected. <br />The size of the overlap. This mainly affects the cuts between adjacent patches. This parameter also depends on the patterns of the input texture. Having a larger overlap does not always results into a visual improvement in the generated texture. <br />The size of the error range when choosing patches.Making this range larger makes the selection converge into a random selection of patches, so it has to be sufficiently large to take advantage of the overlap constraints while leaving an stochastic process to affect the results.<br />
  17. 17. Final Results. Generating some textures.<br />Generated in 12s<br />
  18. 18. Final Results. Generating some textures.<br />Generated in 25s<br />
  19. 19. Final Results. Generating some textures.<br />Generated in 11 s<br />
  20. 20. Final results: Generating some textures.<br />Patch size = 50pxOverlap size = 8pxError range = (0 – 0.05)Execution time = 15sInput texture size = 148x139Output texture size = 428x428<br />
  21. 21. Final Results. Generating some textures.<br />Patch size = 20pxOverlap size = 4pxError range = (0 – 0.05)Execution time = 26sInput texture size = 148x138Output texture size = 343x343<br />
  22. 22. Conclusions<br />The results of the original paper have been successfully replicated. <br />The execution times are slow for a real time application but there are some hints about how to make it in real time using other research results. <br />Even when there are some recommendations for selecting the parameters, selecting the appropriate ones is an important step for the method and still largely depends on the image contents. <br />Despite the previous fact, the method performs well in a wide range of textures that were difficult to handle for previous methods. <br />Given the appropriate parameters the method seems to resemble well the visual appearance of the input texture.<br />
  23. 23. Issues/Further Additions<br />Searching for a patch that agrees on an overlap region is computationally expensive, so it is necessary to search using heuristics or use another kind of efficient search (Tree structures).<br />The blending function still produces a visible seam. Maybe there’s room for improvement here. Pyramid Blending/ Gradient/Poisson Blending?<br />Other ways to choose the seam that allow more flexibility in the curvature of the seam.<br />
  24. 24. References<br />Sample textures taken from the original Efros & Freeman paper and the project website athttp://graphics.cs.cmu.edu/people/efros/research/quilting.html<br />

×