CSE554ContouringSlide 1 CSE 554 Lecture 4: Contouring Fall 2013.

Slides:



Advertisements
Similar presentations
Reconstruction from Voxels (GATE-540)
Advertisements

COMP 175 | COMPUTER GRAPHICS Remco Chang1/6103b – Shapes Lecture 03b: Shapes COMP 175: Computer Graphics February 3, 2015.
CSE554Cell ComplexesSlide 1 CSE 554 Lecture 3: Shape Analysis (Part II) Fall 2014.
Unconstrained Isosurface Extraction on Arbitrary Octrees
3DSkeleton-based Human Modeling with Metaballs 18 April 2008 Donghun Kim Robot Vision Lab.
Piecewise Convex Contouring of Implicit Functions Tao Ju Scott Schaefer Joe Warren Computer Science Department Rice University.
Dual Marching Cubes: An Overview
CDS 301 Fall, 2009 Scalar Visualization Chap. 5 September 24, 2009 Jie Zhang Copyright ©
Asst. Prof. Yusuf Sahillioğlu
lecture 4 : Isosurface Extraction
Surface Reconstruction from 3D Volume Data. Problem Definition Construct polyhedral surfaces from regularly-sampled 3D digital volumes.
Surface Simplification & Edgebreaker Compression for 2D Cel Animations Vivek Kwatra & Jarek Rossignac GVU Center, College of Computing Georgia Institute.
Robust Adaptive Meshes for Implicit Surfaces Afonso Paiva Hélio Lopes Thomas Lewiner Matmidia - Departament of Mathematics – PUC-Rio Luiz Henrique de Figueiredo.
Implicit Surfaces Tom Ouyang January 29, Outline Properties of Implicit Surfaces Polygonization Ways of generating implicit surfaces Applications.
Seminar 1 Surface Rendering, Decimation Presented By Sonali Barua Date:10/31/2005.
Implicit Representations of Surfaces and Polygonalization Algorithms Dr. Scott Schaefer.
ITUppsala universitet Data representation and fundamental algorithms Filip Malmberg
Marching Cubes A High Resolution 3D Surface Construction Algorithm.
CSE 681 Ray Tracing Implicit Surfaces. CSE 681 Overview Similar to CSG –Combine primitive objects to form complex object Primitives are “density fields”
CSE554Binary PicturesSlide 1 CSE 554 Lecture 1: Binary Pictures Fall 2013.
CSE554Binary PicturesSlide 1 CSE 554 Lecture 1: Binary Pictures Fall 2014.
October 8, 2013Computer Vision Lecture 11: The Hough Transform 1 Fitting Curve Models to Edges Most contours can be well described by combining several.
Marching Cubes: A High Resolution 3D Surface Construction Algorithm
Volumetric and Blobby Objects Lecture 8 (Modelling)
CS 450: Computer Graphics REVIEW: OVERVIEW OF POLYGONS
Scalar Visualization Chap. 5 September 23, 2008 Jie Zhang Copyright ©
CS559: Computer Graphics Lecture 33: Shape Modeling Li Zhang Spring 2008.
Graphics Graphics Korea University cgvr.korea.ac.kr Creating Virtual World I 김 창 헌 Department of Computer Science Korea University
A D V A N C E D C O M P U T E R G R A P H I C S CMSC 635 January 15, 2013 Quadric Error Metrics 1/20 Quadric Error Metrics.
Part 6: Graphics Output Primitives (4) 1.  Another useful construct,besides points, straight line segments, and curves for describing components of a.
University of Coimbra Reconstruction of Voxels from Sensor Data Ricardo Martins Coimbra, 19 th January 2010 Doctoral Programme in Electrical Engineering.
2D/3D Shape Manipulation, 3D Printing Shape Representations Slides from Olga Sorkine February 20, 2013 CS 6501.
Marching Cubes: A High Resolution 3D Surface Construction Algorithm William E. Lorenson Harvey E. Cline General Electric Company Corporate Research and.
Segmentation & Modeling ImagesSegmented Images Models.
CSE554Fairing and simplificationSlide 1 CSE 554 Lecture 6: Fairing and Simplification Fall 2012.
3D Object Representations
CSE554SkeletonsSlide 1 CSE 554 Lecture 2: Shape Analysis (Part I) Fall 2015.
CSE554ContouringSlide 1 CSE 554 Lecture 4: Contouring Fall 2015.
Hank Childs, University of Oregon Lecture #10 CIS 410/510: Isosurfacing.
Arrangements and Duality Motivation: Ray-Tracing Fall 2001, Lecture 9 Presented by Darius Jazayeri 10/4/01.
CSE554FairingSlide 1 CSE 554 Lecture 6: Fairing Fall 2015.
CHAPTER 5 CONTOURING. 5.3 CONTOURING Fig 5.7. Relationship between color banding and contouring Contour line (isoline): the same scalar value, or isovalue.
1/57 CS148: Introduction to Computer Graphics and Imaging Geometric Modeling CS148 Lecture 6.
CSE554Contouring IISlide 1 CSE 554 Lecture 5: Contouring (faster) Fall 2015.
CSE554Contouring IISlide 1 CSE 554 Lecture 3: Contouring II Fall 2011.
CSE554Contouring IISlide 1 CSE 554 Lecture 5: Contouring (faster) Fall 2013.
Advisor : Ku-Yaw Chang Speaker : Ren-Li Shen /6/12.
CDS 301 Fall, 2008 Domain-Modeling Techniques Chap. 8 November 04, 2008 Jie Zhang Copyright ©
1 Introduction to Computer Graphics with WebGL Ed Angel Professor Emeritus of Computer Science Founding Director, Arts, Research, Technology and Science.
Solid Modeling Dr. Scott Schaefer.
3D Object Representations. Introduction Line and circle and polygon algorithms- represented simple and smooth object. Some Natural object are neither.
Slide 1Lecture Fall ‘00 Surface Modeling Types: Polygon surfaces Curved surfaces Volumes Generating models: Interactive Procedural.
3D Object Representations 2009, Fall. Introduction What is CG?  Imaging : Representing 2D images  Modeling : Representing 3D objects  Rendering : Constructing.
APE'07 IV INTERNATIONAL CONFERENCE ON ADVANCES IN PRODUCTION ENGINEERING June 2007 Warsaw, Poland M. Nowakiewicz, J. Porter-Sobieraj Faculty of.
Subdivision Schemes. Center for Graphics and Geometric Computing, Technion What is Subdivision?  Subdivision is a process in which a poly-line/mesh is.
1 E. Angel and D. Shreiner: Interactive Computer Graphics 6E © Addison-Wesley 2012 Marching Squares Ed Angel Professor Emeritus of Computer Science University.

CSE 554 Lecture 5: Contouring (faster)
CSE 554 Lecture 1: Binary Pictures
Image Morphing © Zooface Many slides from Alexei Efros, Berkeley.
3D Object Representations
CSc4730/6730 Scientific Visualization
Domain-Modeling Techniques
Lecture 3 : Isosurface Extraction
Volume Graphics (lecture 4 : Isosurface Extraction)
CSE 554 Lecture 10: Extrinsic Deformations
CSE 554 Lecture 3: Shape Analysis (Part II)
Three Step Geometric Pipeline
Iso-Surface extraction from red and green samples on a regular lattice
Overview of Modeling 김성남.
Presentation transcript:

CSE554ContouringSlide 1 CSE 554 Lecture 4: Contouring Fall 2013

CSE554ContouringSlide 2 Review Binary pictures – Pros: natural geometric form for bio-medical data; simple to operate on – Cons: blocky boundary; costly to store or visualize (particularly in 3D).

CSE554ContouringSlide 3 Geometric Forms Continuous forms – Defined by mathematical functions – E.g.: parabolas, splines, subdivision surfaces Discrete forms – Disjoint elements with connectivity relations – E.g.: polylines, triangle surfaces, pixels and voxels Pixels Triangle surfaces Polyline Voxels CurvesSurfaces

CSE554ContouringSlide 4 Boundary Representations Polylines (2D) or meshes (3D) that tile the object boundary – Smoother appearance – Less storage (no interior elements) Binary picture Boundary mesh

CSE554ContouringSlide 5 Boundary Representations We will cover (in a sequence of lectures): – Creating a boundary curve (surface) from a grayscale image (volume) – Denoising and simplifying the geometry – Aligning two boundary geometry

CSE554ContouringSlide 6 Thresholding - Revisited Creates a binary picture from a grayscale image How to create a smooth boundary at the threshold? – Such boundary is known as an iso-contour (or iso-curve, iso-surface, etc.) Digital imageBinary pictureBoundary curve

CSE554ContouringSlide 7 Definition Iso-contour: set of points at a particular function value – Given a continuous function f defined on every point in the space – An iso-contour is all points where f evaluates to be some value c (called the iso-value)

CSE554ContouringSlide 8 Definition Iso-curves: iso-contours of 2D functions

CSE554ContouringSlide 9 Definition Iso-surfaces: iso-contours of 3D functions

CSE554ContouringSlide 10 Iso-contour Properties Closed – With a well-defined inside and outside Inside: points above the iso-value Outside: points below the iso-value Orthogonal to gradient directions In general, a manifold – A non-degenerate curve (surface) without branching – Except where the gradient vanishses Critical points Black curves: iso-contours Red arrows: gradient directions Green dots: critical points

CSE554ContouringSlide 11 Discrete Iso-contours An image is a sampling of some continuous function f – We approximate the continuous iso-contours of f with discrete polylines or meshes (known as contouring) – The discrete iso-contour separates the pixels (voxels) with values lower then the iso-value from those with values higher than the iso-value. x y f(x,y)

CSE554ContouringSlide 12 “Good” Approximations Closed (with inside and outside) – Polyline: a vertex is shared by even # of edges – Mesh: an edge is shared by even # of polygons Manifold – Polyline: a vertex is shared by 2 edges – Mesh: an edge is shared by 2 polygons, and a vertex is contained in a ring of polygons Non-intersecting Closed Manifold Open Non-manifold Closed Non-manifold Intersecting

CSE554ContouringSlide 13 “Good” Approximations A closed, manifold triangular mesh Closed (with inside and outside) – Polyline: a vertex is shared by even # of edges – Mesh: an edge is shared by even # of polygons Manifold – Polyline: a vertex is shared by 2 edges – Mesh: an edge is shared by 2 polygons, and a vertex is contained in a ring of polygons Non-intersecting

CSE554ContouringSlide 14 “Good” Approximations A closed, manifold triangular mesh Closed (with inside and outside) – Polyline: a vertex is shared by even # of edges – Mesh: an edge is shared by even # of polygons Manifold – Polyline: a vertex is shared by 2 edges – Mesh: an edge is shared by 2 polygons, and a vertex is contained in a ring of polygons Non-intersecting

CSE554ContouringSlide 15 Contouring (On A Grid) Input – A grid where each grid point (pixel or voxel) has a value (color) – An iso-value (threshold) Output – A closed, manifold, non- intersecting polyline (2D) or mesh (3D) that separates grid points above or below the iso-value Iso-value = Grid point (pixel) Grid edge Grid cell

CSE554ContouringSlide 16 Contouring (On A Grid) Iso-value = 0 negativepositive Input – A grid where each grid point (pixel or voxel) has a value (color) – An iso-value (threshold) Output – Equivalently, we extract the zero- contour (separating negative from positive) after subtracting the iso- value from the grid points

CSE554ContouringSlide 17 Algorithms Primal methods – Marching Squares (2D), Marching Cubes (3D) – Placing vertices on grid edges Dual methods – Dual Contouring (2D,3D) – Placing vertices in grid cells

CSE554ContouringSlide 18 Marching Squares (2D) For each grid cell with a sign change – Create one vertex on each grid edge with a sign change – Connect vertices by lines

CSE554ContouringSlide 19 Marching Squares (2D) Creating vertices – Assuming the underlying, continuous function is linear on the grid edge – Linearly interpolate the positions of the two grid points {x 0,y 0 } {x 1,y 1 } f f0f0 f1f1 0 {x,y} + - t 1-t

CSE554ContouringSlide 20 Connecting vertices by lines – Lines shouldn’t intersect – Each vertex is used once So that it will be used exactly twice by the two cells incident on the edge Two approaches – Do a walk around the grid cell Connect consecutive pair of vertices – Or, using a pre-computed look-up table 2^4=16 entries For each sign combination at the 4 corners, it stores the indices of the grid edges whose vertices make up the lines. Marching Squares (2D) Key: Data: {{2,4}} Key: Data: {{3,4}} Key: Data: {{1,3}, {2,4}}

CSE554ContouringSlide 21 Marching Cubes (3D) For each grid cell with a sign change – Create one vertex on each grid edge with a sign change (using linear interpolation) – Connect vertices into triangles

CSE554ContouringSlide 22 Marching Cubes (3D) Connecting vertices by triangles – Triangles shouldn’t intersect – To be a closed manifold: Each vertex used by a triangle “fan” Each mesh edge used by 2 triangles (if inside grid cell) or 1 triangle (if on a grid face)

CSE554ContouringSlide 23 Marching Cubes (3D) Connecting vertices by triangles – Triangles shouldn’t intersect – To be a closed manifold: Each vertex used by a triangle “fan” Each mesh edge used by 2 triangles (if inside grid cell) or 1 triangle (if on a grid face) Open mesh: each magenta edge is shared by one triangle

CSE554ContouringSlide 24 Marching Cubes (3D) Connecting vertices by triangles – Triangles shouldn’t intersect – To be a closed manifold: Each vertex used by a triangle “fan” Each mesh edge used by 2 triangles (if inside grid cell) or 1 triangle (if on a grid face) Each mesh edge on the grid face is shared between adjacent cells Look-up table – 2^8=256 entries – For each sign configuration, it stores indices of the grid edges whose vertices make up the triangles Closed mesh: each edge is shared by two triangles

CSE554ContouringSlide 25 Marching Cubes (3D) Connecting vertices by triangles – Triangles shouldn’t intersect – To be a closed manifold: Each vertex used by a triangle “fan” Each mesh edge used by 2 triangles (if inside grid cell) or 1 triangle (if on a grid face) Each mesh edge on the grid face is shared between adjacent cells Look-up table – 2^8=256 entries – For each sign configuration, it stores indices of the grid edges whose vertices make up the triangles Sign: “ ” Triangles: {{2,8,11},{4,7,10}}

CSE554ContouringSlide 26 Implementation Notes Avoid computing one vertex multiple times – Compute the vertex location once, and store it in a hash table When the grid point’s value is same as the iso-value – Treat it either as “above” or “below”, but be consistent.

CSE554ContouringSlide 27 Algorithms Primal methods – Marching Squares (2D), Marching Cubes (3D) – Placing vertices on grid edges Dual methods – Dual Contouring (2D,3D) – Placing vertices in grid cells

CSE554ContouringSlide 28 Dual Contouring (2D) For each grid cell with a sign change – Create one vertex For each grid edge with a sign change – Connect the two vertices in the adjacent cells with a line

CSE554ContouringSlide 29 Dual Contouring (2D) Creating the vertex within a cell – Compute one point on each grid edge with a sign change (by linear interpolation, as in Marching Squares/Cubes) There could be more than two sign-changing edges, so >2 points possible – Take the centroid of these points

CSE554ContouringSlide 30 Dual Contouring (3D) For each grid cell with a sign change – Create one vertex (same way as 2D) For each grid edge with a sign change – Create a quad (or two triangles) connecting the four vertices in the adjacent grid cubes – No look-up table is needed!

CSE554ContouringSlide 31 Dual Contouring: Discussion Result is closed, but possibly non-manifold – Each mesh edge is shared by even number of quads – An edge may be shared by 4 quads – A vertex may be shared by 2 rings of quads Can be fixed – But with more effort… Red edge is shared by 2 quads Red edge is shared by 4 quads (non-manifold) Center vertex is non-manifold

CSE554ContouringSlide 32 MC vs. DC: Mesh quality Marching Cubes – Closed, manifold, and intersection-free –  Often generates thin and tiny polygons Dual Contouring – Closed and intersection-free – Generates better-shaped polygons –  Can be non-manifold Marching Cubes Dual Contouring

CSE554ContouringSlide 33 MC vs. DC: Duality The two outputs have a dual structure – Vertices and quads of Dual Contouring correspond (roughly) to un- triangulated polygons and vertices produced by Marching Cubes Marching CubesDual Contouring

CSE554ContouringSlide 34 MC vs. DC: Implementation Marching Cubes –  Creating the triangulation table is non-trivial Although table-lookup is straight forward –  Restricted to uniform grids Dual Contouring – Simple to implement No look-up table is needed – Can be applied to any type of grid Good for generating anisotropic meshes DC on a Quadtree (2D) DC on uniform grid DC on octree (3D)

CSE554ContouringSlide 35 Further Readings Marching Cubes: “Marching cubes: A high resolution 3D surface construction algorithm”, by Lorensen and Cline (1987) – >6000 citations on Google Scholar “A survey of the marching cubes algorithm”, by Newman and Yi (2006) Dual Contouring: “Dual contouring of hermite data”, by Ju et al. (2002) – >300 citations on Google Scholar “Manifold dual contouring”, by Schaefer et al. (2007)