1 / 49

Diffusion Curves

This article explores diffusion curves, a vector graphics-based representation for 2D smooth-shaded images. It discusses the use of Bezier curves to represent discontinuities and the implementation of harmonic functions that interpolate boundary constraints.

delberts
Download Presentation

Diffusion Curves

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Diffusion Curves Dr. Scott Schaefer

  2. Diffusion Curves • Vector graphics-based representation for 2D images • Images are piecewise smooth with discontinuities represented as curves Image taken from “Diffusion Curves: A Vector Representation for Smooth-Shaded Images”

  3. Representation • Bezier curves represent discontinuities • Give each curve a color function on left/right side of curve • Original paper uses linear color change • Modification: Control points can have any color Image taken from “Diffusion Curves: A Vector Representation for Smooth-Shaded Images”

  4. Image Construction Use curves as boundary constraints Find a harmonic function that interpolates those boundary constraints Image taken from “Diffusion Curves: A Vector Representation for Smooth-Shaded Images”

  5. Implementation (Simplified) Define a left/right color for points Use a background color to represent no data (black) Draw curve as a polygon made of quads (thick) with smooth shading

  6. Implementation (Simplified) • Colored pixels are constraints • Find a harmonic function satisfying constraints • Harmonic function has Laplacian zero everywhere

  7. Implementation (Simplified) 1 0 0 -4 1 1 0 0 • Colored pixels are constraints • Find a harmonic function satisfying constraints • Harmonic function has Laplacian zero everywhere 1

  8. Implementation (Simplified) 1 0 0 -4 1 1 0 0 • Colored pixels are constraints • Find a harmonic function satisfying constraints • Harmonic function has Laplacian zero everywhere • Each value is average of its neighbors 1

  9. Implementation (Simplified) • Draw curves as quads • Read pixel buffer back from OpenGL • Repeat a lot • For all pixels whose initial value was black, replace with average color of its neighbors from previous iteration

  10. Problem

  11. Problem Final Result

  12. Problem 100 Iterations

  13. Problem 200 Iterations

  14. Problem 400 Iterations

  15. Problem 800 Iterations

  16. Problem 1600 Iterations

  17. Problem 6400 Iterations

  18. Problem Infinity Iterations

  19. Problem 256

  20. Simple Multi-Grid • Create power of 2 down-sampled images • Average value of all non-black pixels • For each level, starting at second to last • Up-sample previous level • Copy pixel value to black high-res pixels (non-black pixels are constraints) • For some number of iterations • For each non-constrained pixel, replace with color of its neighbors from previous iteration

  21. Example Original 512x512

  22. Example Down-sampled 256x256

  23. Example Down-sampled 128x128

  24. Example Down-sampled 64x64

  25. Example Down-sampled 32x32

  26. Example Down-sampled 16x16

  27. Example Down-sampled 8x8

  28. Example Down-sampled 4x4

  29. Example Down-sampled 2x2

  30. Example Down-sampled 1x1

  31. Example Up-sampled

  32. Example Smoothed

  33. Example Up-sampled

  34. Example Smoothed

  35. Example Up-sampled

  36. Example Smoothed

  37. Example Up-sampled

  38. Example Smoothed

  39. Example Up-sampled

  40. Example Smoothed

  41. Example Up-sampled

  42. Example Smoothed

  43. Example Up-sampled

  44. Example Smoothed

  45. Example Up-sampled

  46. Example Smoothed

  47. Example Up-sampled

  48. Example Smoothed

  49. Example

More Related