Diffusion curves
This presentation is the property of its rightful owner.
Sponsored Links
1 / 49

Diffusion Curves PowerPoint PPT Presentation


  • 89 Views
  • Uploaded on
  • Presentation posted in: General

Diffusion Curves. Dr. Scott Schaefer. 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”.

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.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -

Presentation Transcript


Diffusion curves

Diffusion Curves

Dr. Scott Schaefer


Diffusion curves1

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”


Representation

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”


Image construction

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”


Implementation simplified

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


Implementation simplified1

Implementation (Simplified)

  • Colored pixels are constraints

  • Find a harmonic function satisfying constraints

    • Harmonic function has Laplacian zero everywhere


Implementation simplified2

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


Implementation simplified3

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


Implementation simplified4

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


Problem

Problem


Problem1

Problem

Final Result


Problem2

Problem

100 Iterations


Problem3

Problem

200 Iterations


Problem4

Problem

400 Iterations


Problem5

Problem

800 Iterations


Problem6

Problem

1600 Iterations


Problem7

Problem

6400 Iterations


Problem8

Problem

Infinity Iterations


Problem9

Problem

256


Simple multi grid

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


Example

Example

Original 512x512


Example1

Example

Down-sampled 256x256


Example2

Example

Down-sampled 128x128


Example3

Example

Down-sampled 64x64


Example4

Example

Down-sampled 32x32


Example5

Example

Down-sampled 16x16


Example6

Example

Down-sampled 8x8


Example7

Example

Down-sampled 4x4


Example8

Example

Down-sampled 2x2


Example9

Example

Down-sampled 1x1


Example10

Example

Up-sampled


Example11

Example

Smoothed


Example12

Example

Up-sampled


Example13

Example

Smoothed


Example14

Example

Up-sampled


Example15

Example

Smoothed


Example16

Example

Up-sampled


Example17

Example

Smoothed


Example18

Example

Up-sampled


Example19

Example

Smoothed


Example20

Example

Up-sampled


Example21

Example

Smoothed


Example22

Example

Up-sampled


Example23

Example

Smoothed


Example24

Example

Up-sampled


Example25

Example

Smoothed


Example26

Example

Up-sampled


Example27

Example

Smoothed


Example28

Example


  • Login