Implicit Geometry Overview
• Imppctlicit Geomet ry – Implicit functions • Points • Curves • Surfaces • Geometry toolbox • Calculus toolbox – Signed distance functions • Distance fifunctions • Signed distance functions • Geometry and calculus tool box Introduction
• Tracking boundaries is an important problem – Image Processing – Machine Vision – Biometrics – Human Computer Interaction – Entertainment – Computational Physics – Computational Fluid Dynamics Introduction
• Image Processing – Video, Image and Volume Segmentation Introduction
• Machine Vision
• Biometrics Introduction
• Human Computer Interaction
• Entertainment Introduction
• Physical Simulations like Water Introduction
• The Problem – How is it possible to efficiently and accurately represent the boundary?
– How do you track the boundary ahead in time? Explicit Representation
• Marker/String Methods • A standard approach to modeling a moving boundary ((/front/contour /interface )is to discretize it into a set of marker particles whose positions are known at any time. • To reconstruct the front the particles are linked by line segments in 2D and triangles in 3D. Explicit Representation
• Marker/String Method – The idea is to advance the particles in the direction of the arrows, recalculate the arrows, advance the particles, and repeat
– More particles should mean greater accuracy Explicit Representation
• Marker/String Method Issues – The markers may potentially cross over one another and require untangggling
– The boundary may split or merge Explicit Representation
• Marker/String Method Issues – The front may expand or contract requiring the addition or removal of markers Implicit Vs. Explicit
• Tracking the interface through points (markers) on its surface is a Lagrangian formulation. • Capturing an interface through the evolution of the implicit surface is a Eulerian formulation. Explicit Functions • Points – Explicitly divide a 1‐d region Ω into two sub‐regions with an interface at x = ‐1 and x = 1 Outside Ω+ Inside Ω‐ Outside Ω+
‐2 ‐1012 Explicit Representation Interface 1,1 , 1 1, 1,1 Implicit Functions • Points – Implicitly divide a 1‐d region Ω into two sub‐regions with an interface at x = ‐1 and x = 1 Outside Ω+ Inside Ω‐ Outside Ω+
‐2 ‐1012 Implicit Representation x x2 1 :x 0 Interface : x 0 :x 0
Implicit Functions • Points – An implicit representation provides a simple, numerical method to determine the interior, exterior and interface of a region Ω. – In the previous case the interior is always negative and the exterior is always positive. – The set of points where φ(x)=0isknownasthe zero level set or zero isocontour and will always give the interface of the region. Implicit Functions
• in Rn , subdomains are n‐dimensional, while the interface has dimension n − 1. • We say that the interface has codimension one. Implicit Functions
• Curves – In 2 spatial dimensions a closed curve separates Ω into two sub‐ regions.
Outside Ω+ φ > 0
Inside Ω‐ φ < 0
Interface x x2 y 2 1 0 Implicit Functions Implicit Functions
• Surfaces – In 3+ spatial dimensions higher dimensional surfaces are used to represent the zero level set of φ.
Outside Ω+ φ > 0
Inside Ω‐ φ < 0
Interface x x2 y 2 z 2 1 0 Geometric Representation
• For complicatedsurfacesin3Dtheexplicit representation can be quite difficult to discretize. One needs to choose a number of points on the two‐dimensional surface and record their connectivity.
• Connectivity can changefordyy/namic/deformable surfaces, i.e., surfaces that are moving around.
• One of the nicest properties of implicit surfaces is that connectivity does not need to be determined. Geometric Representations
• Continuous representation – Explicit representation – Implicit representation • Discrete representation – Triangle meshes – Points/Particles Triangle Mesh Explicit vs Implicit Representation
Explicit: • Pros: easier display • Cons: maintain connectivity, difficult to handle topology change.
Implicit: • Pros: No connectivity, easier to handle topology change. • Cons: need extra step to display. Discrete Representations of Implicit Functions
• Complicated 2D curves and 3D surfaces do not always have analytical descriptions.
• The implicit function φ need to be stored with a discretization, i.e. in the implicit representation, we will know the values of the implicit function φ at only a finite number of data points and need to use interpolation to find the values of φ else where. Discrete Representations of Implicit Functions
• Thelocationoftheinterface, the φ(x) =0zeroiso‐ contour need to be interpolated from the known values of φ at the data points. • This can be done using contour plotting alhlgorithms such as Marching Cubes algorithm. • The set of data points where the implicit function φ is defined is called a grid. • Uniform Cartesian grids are mostly used. • Other grids include unstructured, adaptive, curvilinear, etc. Iso‐contour extraction
φ(x,y))0=0 φ(x,y)>0 φ(xyx,y)<0 Iso‐contour extraction
φ(x,y))0=0 φ(x,y)>0 φ(xyx,y)<0 Iso‐contour extraction
φ(x,y))0=0 φ(x,y)>0 φ(xyx,y)<0 Iso‐contour extraction
φ(x,y))0=0 φ(x,y)>0 φ(xyx,y)<0 Marching Squares
φ(x,y))0=0 φ(x,y)>0 φ(xyx,y)<0 Four unique cases (after considering symmetry) Marching Squares
Principle of Occam’s razor: If there are multiple possible explanations of a phenomenon that are consistent with the data, choose the simplest one. Marching Squares
Linear interpolation f(x,y)=0 f(xyx,y)>0
f(x,y)<0 fi, j+1 > 0fi+1, j+1 > 0
f < 0 i, j fi+1, j > 0 Marching Squares
fi, j = a < 0 f = b > 0 fi+x, j=0 i+1, j Marching Squares
fi, j = a < 0 f = b > 0 fi+x, j=0 i+1, j
x / h = (‐a) / (b‐a)
x = ah / (a‐b) Marching Squares Marching Squares Marching Squares‐ambiguity
More information are needed to resolve ambiguity Iso‐contour extraction
φ(x,y))0=0 φ(x,y)>0 φ(xyx,y)<0 Marching Cubes Algorithm
Lorensen & Cline: Marching Cubes: A high resolution 3D surface construction algorithm. In SIGGRAPH 1987. Geometry Toolbox
• Inside/outside • Boolean operation/CSG • The gradient of the iiliimplicit ffiunction • The normal of the implicit function • Mean curvature of the implicit function • Numerical approximations Inside/outside function
Determine whether a point is inside/outside the interface • Easier for Implicit function, just look at the sign of x : IidInside : :x 0 Outside : :x 0 Boundary : :x 0 • Difficult for explicit representation: Inside/outside function
Difficul t for eepctxplicit represe ntat io n: • A standard procedure is to cast a ray from the point in question to some far‐off place that is known to be outside the interface. • Then if the ray intersects the interface an even number of times, the point is outside the interface. • Otherw ise, therayitintersec ts the itinter face an odd number of times, and the point is inside the interface. Boolean Operations of Implicit Functions
• φ(x) = min (φ1(x), φ2(x)) is the union of the interior regions of φ1(x) and φ2(x).
• φ(x) = max (φ1(x), φ2(x)) is the intersection of the interior regions of φ1(x) and φ2(x).
• φ(x) = ‐φ1(x) is the complement of φ1(x) .
• φ(x) = max (φ1(x), ‐φ2(x)) represents the subtraction of the interior regions of φ1(x) by the interior regions of φ2(x). Constructive Solid Geometry (()CSG) Gradient/Normal of Implicit Function Mean Curvature of the Interface Calculus Toolbox
• Characteristic function • Heaviside function • Delta ffiunction • Volume integral • Surface integral • Numerical approximation Signed Distance Functions
• Signed distance functions are a subset of implicit function defined to be positive on the exterior, negative on the interior with | (x) 1| Distance Functions
• A distance function is defined as: dx minx xI where xI
• so: dx | x xc |, where xc is the closest point on the boundary to x dx 0, where x Distance function Signed Distance Functions
• A signed distance function adds the appropriate signing of the interior vs. exterior. d(x) x (x) d(x) 0 x d(x) x • Signed distance function share all the properties of implicit function with new ppproperties such as: | (x) 1| • Given a point x , the closest point xc on the interface is xc x (x)N Signed Distance Functions
• 1D Example: – Implicit function x x2 1 – Signed distance function x| x | 1 • 2D Example: – Implicit function x, y x2 y 2 1 – Signed distance function x, y x2 y 2 1 • 3D Example: – Implicit function x, y, z x2 y 2 z 2 1 – Signed distance function x, y, z x2 y 2 z 2 1 Signed Distance Functions Boolean Operations of Signed Distance Functions
• φ(x) = min (φ1(x), φ2(x)) is the union of the interior regions of φ1(x) and φ2(x).
• φ(x) = max (φ1(x), φ2(x)) is the intersection of the interior regions of φ1(x) and φ2(x).
• φ(x) = ‐φ1(x) is the complement of φ1(x) .
• φ(x) = max (φ1(x), ‐φ2(x)) represents the subtraction of the interior regions of φ1(x) by the interior regions of φ2(x). Geometry and Calculus Toolboxes of the Signed Distance Functions Since | (x) 1| • The Delta function is: (x) ((x)) • The Surface integral is:
f (x) ((x))d(x) Geometry and Calculus Toolboxes of the Signed Distance Functions Since | (x) 1| • The normal of the signed distance function is: N • Mean curvature of the the signed distance function is: k Where is the Laplacian of
xx yy zz Signed Distance Functions
• In two spatial dimensions the signed distance function for a circle with a
radius r and a center (x0, y0) is given as:
2 2 x x x0 y y0 r
Overview
• Implicit Geometry • Level Set Methods Overview
• Level set methods – Motion in an externally generated velocity field • Convection • Upwind differencing • Hamilton‐Jacobi ENO//,WENO, TVD Runge‐Kutta – Motion involves mean curvature • Equations of motion • Numerical discretization • Convection‐diffusion equations Overview
– Hamilton‐Jacobi Equation • Connection with Conservation Laws • Numerical discretization – Motion in the Normal Direction • The Basic Equation • Numerical discretization • Adding a Curvature‐Dependent Term • Adding an External Velocity Field References
• S. Osher and R. Fedkiw, Level Set Methods and Dynamic IliitImplicit SfSurfaces, SiSpringer, 2003. • J.A. Sethian, Level Set Methods and Fast Marching Methods, Cambridge, 1996. • Geometric Level Set Methods in Imaging, Vision, and Graphics, Stanley Osher, Nikos Paragios, Springer, 2003. • Geometric Partial Differential Equations and Image Analysis, Guillermo Sapiro, Cambridge University Press, 2001. • J. A. SthiSethian, “Leve l SStet MMthdethods: An AtAct of Vio lence ”, American Scientist, May‐June, 1997. • N. Foster and R. Fedkiw, "Practical Animation of Liquids", SIGGRAPH 2001, pp. 15‐22, 2001.