Extraction of Level Sets from 2D Images

Similar documents
Level Set Extraction from Gridded 2D and 3D Data

1 Introduction 2. 2 A Simple Algorithm 2. 3 A Fast Algorithm 2

Distance Between Point and Triangle in 3D

Intersection of a Triangle and a Cone

Intersection of an Oriented Box and a Cone

Kochanek-Bartels Cubic Splines (TCB Splines)

Triangulation by Ear Clipping

Perspective Mappings. Contents

Direct Rendering. Direct Rendering Goals

Tessellation of a Unit Sphere Starting with an Inscribed Convex Triangular Mesh

Clipping a Mesh Against a Plane

A graph is finite if its vertex set and edge set are finite. We call a graph with just one vertex trivial and all other graphs nontrivial.

Constructing a Cycle Basis for a Planar Graph

18.S34 (FALL 2007) PROBLEMS ON HIDDEN INDEPENDENCE AND UNIFORMITY

Least-Squares Fitting of Data with B-Spline Curves

CS 112 The Rendering Pipeline. Slide 1

Intersection of Moving Sphere and Triangle

2D rendering takes a photo of the 2D scene with a virtual camera that selects an axis aligned rectangle from the scene. The photograph is placed into

2009 HMMT Team Round. Writing proofs. Misha Lavrov. ARML Practice 3/2/2014

To graph the point (r, θ), simply go out r units along the initial ray, then rotate through the angle θ. The point (1, 5π 6. ) is graphed below:

Minimum-Area Rectangle Containing a Set of Points

Contouring and Isosurfaces. Ronald Peikert SciVis Contouring 2-1

CSC Computer Graphics

Taibah University College of Computer Science & Engineering Course Title: Discrete Mathematics Code: CS 103. Chapter 2. Sets

Two Algorithms for Adaptive Approximation of Bivariate Functions by Piecewise Linear Polynomials on Triangulations

Scan Conversion. Drawing Lines Drawing Circles

9. Three Dimensional Object Representations

Edge and local feature detection - 2. Importance of edge detection in computer vision

Einführung in Visual Computing

Scalar Field Visualization I

A Branch-and-Cut Algorithm for the Partition Coloring Problem

Subpixel Corner Detection Using Spatial Moment 1)

Isosurface Rendering. CSC 7443: Scientific Information Visualization

Algorithms for GIS. Spatial data: Models and representation (part I) Laura Toma. Bowdoin College

Feature Descriptors. CS 510 Lecture #21 April 29 th, 2013

Section 7.2 Volume: The Disk Method

Topology Preserving Tetrahedral Decomposition of Trilinear Cell

Input Nodes. Surface Input. Surface Input Nodal Motion Nodal Displacement Instance Generator Light Flocking

CS 4620 Midterm, March 21, 2017

The Graphs of Triangulations of Polygons

A small review, Second Midterm, Calculus 3, Prof. Montero 3450: , Fall 2008

Section 4.4: Parabolas

Holt Grade Mathematics Curriculum Guides

Polyominoes and Polyiamonds as Fundamental Domains for Isohedral Tilings of Crystal Class D 2

Polyominoes and Polyiamonds as Fundamental Domains for Isohedral Tilings of Crystal Class D 2

HMMT February 2018 February 10, 2018

MARCHING CUBES AND VARIANTS

Chapter 3. Sukhwinder Singh

Minimum-Volume Box Containing a Set of Points

Review of Tuesday. ECS 175 Chapter 3: Object Representation

B.Stat / B.Math. Entrance Examination 2017

Scalar Field Visualization. Some slices used by Prof. Mike Bailey

Marching Squares Algorithm. Can you summarize the marching squares algorithm based on what we just discussed?

Math 311. Trees Name: A Candel CSUN Math

Matching and Planarity

Rendering. Converting a 3D scene to a 2D image. Camera. Light. Rendering. View Plane

? Answer:

Mathematics. Linear Programming

G 6i try. On the Number of Minimal 1-Steiner Trees* Discrete Comput Geom 12:29-34 (1994)

Graph theory. Po-Shen Loh. June We begin by collecting some basic facts which can be proved via bare-hands techniques.

PACKING DIGRAPHS WITH DIRECTED CLOSED TRAILS

Design Intent of Geometric Models

Scott Smith Advanced Image Processing March 15, Speeded-Up Robust Features SURF

AP * Calculus Review. Area and Volume

C Curves That Fill Space

Ma/CS 6b Class 26: Art Galleries and Politicians

Mathematical Operations

Introduction. Computer Vision & Digital Image Processing. Preview. Basic Concepts from Set Theory

SPERNER S LEMMA MOOR XU

On the Number of Tilings of a Square by Rectangles

CS388C: Combinatorics and Graph Theory

SE Mock Online Test 1-CG

Dowker Notation and Arc Presentation

EE 584 MACHINE VISION

CS Data Structures and Algorithm Analysis

Computer Graphics 7 - Rasterisation

As a consequence of the operation, there are new incidences between edges and triangles that did not exist in K; see Figure II.9.

EECS 556 Image Processing W 09. Interpolation. Interpolation techniques B splines

Vesa Halava Tero Harju. Walks on Borders of Polygons

Polygon Partitioning. Lecture03

Resampling Scattered Data into a Regular Grid

CoE4TN3 Medical Image Processing

Graph Algorithms. Tours in Graphs. Graph Algorithms

Solutions to In Class Problems Week 9, Fri.

Cluster algebras and infinite associahedra

CMP 2 Grade Mathematics Curriculum Guides

To graph the point (r, θ), simply go out r units along the initial ray, then rotate through the angle θ. The point (1, 5π 6

5 Graphs

Announcements. Image Matching! Source & Destination Images. Image Transformation 2/ 3/ 16. Compare a big image to a small image

arxiv: v1 [cs.cc] 30 Jun 2017

Activity 8. Midsegment of a Triangle. Name. Date

From Vertices to Fragments: Rasterization. Reading Assignment: Chapter 7. Special memory where pixel colors are stored.

Subdivision Surfaces

Number Theory and Graph Theory

Chapter - 2: Geometry and Line Generations

THE LABELLED PEER CODE FOR KNOT AND LINK DIAGRAMS 26th February, 2015

An Image Curvature Microscope

Intersection of Box and Ellipsoid

PLC Papers Created For:

[8] that this cannot happen on the projective plane (cf. also [2]) and the results of Robertson, Seymour, and Thomas [5] on linkless embeddings of gra

Transcription:

Extraction of Level Sets from 2D Images David Eberly, Geometric Tools, Redmond WA 98052 https://www.geometrictools.com/ This work is licensed under the Creative Commons Attribution 4.0 International License. To view a copy of this license, visit http://creativecommons.org/licenses/by/4.0/ or send a letter to Creative Commons, PO Box 1866, Mountain View, CA 94042, USA. Created: September 4, 2000 Last Modified: March 2, 2008 Contents 1 Introduction 2 2 Extraction Using Linear Interpolation 2 3 Extraction Using Bilinear Interpolation 4 1

1 Introduction For the purposes of this algorithm, a 2D image is assumed to be a B x B y array of integer values. The pixel locations are (x, y) where 0 x < B x and 0 y < B y. No restriction is assumed on the pixel values I xy other than they are integer-valued. A continuous formulation of the image is required. For domain square with corners (x 0, y 0 ), (x 0 + 1, y 0 ), (x 0, y 0 +1), and (x 0 +1, y 0 +1), let F (x, y) be a continuous function that represents the image on the square. It is not necessary that F match the pixel values at the four corners, but the two algorithms discussed in this document do have that property. If L is a value in the range of F, then the level set of F for L is the set of points (x, y) that satisfy F (x, y) = L. Generally one expects the level sets to consist of curves, but isolated points are possible. For example, if F (x, y) = x 2 + y 2, the level set F (x, y) = L > 0 consists of a single circle, but the level set F (x, y) = 0 is a single point. The algorithms in this document construct both curves and points. A level set for the entire image is constructed from the level sets for the functions on the domain squares. 2 Extraction Using Linear Interpolation The continuous formulation on domain squares is based on decomposing each square into two triangles and using linear interpolation on each triangle. Figure 1 shows a typical decomposition called a symmetric triangulation. Figure 1. Symmetric triangulation of a 4 3 image. The triangulation of the upper left domain square is said to be even. Its two neighbors are said to be odd. Let the upper left corner of the domain square be (x 0, y 0 ). The parity of the triangulation depends on the parity of the components. It is even whenever Par(x 0 ) = Par(y 0 ), otherwise it is odd. The linear interpolant F (x, y) is defined for x 0 x x 0 + 1 and y 0 y y 0 + 1 as follows. Define F 00 = F (x 0, y 0 ), F 10 = F (x 0 + 1, y 0 ), 2

F 01 = F (x 0, y 0 + 1), and F 11 = F ( x 0 + 1, y 0 + 1). Define dx = x x 0 and dy = y y 0 ; then F 00 + (F 10 F 00 )dx + (F 01 F 00 )dy, Par(x 0 ) = Par(y 0 ) and dx + dy 1 F 10 + F 01 F 11 + (F 11 F 01 )dx + (F 11 F 10 )dy, Par(x 0 ) = Par(y 0 ) and dx + dy 1 F (x, y) = F 00 + (F 10 F 00 )dx + (F 11 F 10 )dy, Par(x 0 ) Par(y 0 ) and dy dx F 00 + (F 11 F 01 )dx + (F 01 F 00 )dy, Par(x 0 ) Par(y 0 ) and dy dx. Given a level value L and a triangle in the decomposition, each vertex value F satisfies F < L, F = L, or F > L, for a total of 27 possibilities for the triangle. Each possibility corresponds to a triangle that has no level set points, a single level set point, a single level set line segment, or the function is zero over the entire triangle. The 27 possibilities can be partitioned into 6 topologically distinct cases, each case having at most 6 permutations. Table 1 shows the cases and permutations. Table 1. Cases and permutations for level sets of F on a triangle. case 0 1 2 3 4 5 0 + + + + + 0 +00 000 + + + 0 1 +0+ 0 + 0 + + +0 2 0 + + 00+ + + 0 + 3 0 00 + + 0 4 0 0 0 + 0+ 5 0 00 + 0 + The vertex ordering is shown in the figure for case 0 and is the same ordering for the figures of the remaining cases. Permutation 0 refers to that ordering. For example, case 5 and permutation 0 indicates that vertex 0 has positive value, vertex 1 has negative value, and vertex 2 has zero value. In case 0, the permutation is irrelevant since in either case there is no contribution to the level set. For cases 1, 2, 4, and 5, permuations 3 through 5 are effectively the same as permutations 0 through 2 for purposes of extracting level sets. The code makes this reduction. The total number of distinct possibilities is therefore 14. Figure 2 shows a gray scale image with integers in the range [0, 1023]. The left image shows the original image superimposed with the vertex locations for level set 512. The right image shows a subimage superimposed with level sets. The edges from the level set extraction are drawn in green. The vertices are drawn in red. 3

Figure 2. Image and subimage with superimposed level sets from linear interpolation. 3 Extraction Using Bilinear Interpolation The continuous formulation on domain squares is based on using each square as is and bilinearly interpolating. The linear interpolant F (x, y) is defined for x 0 x x 0 + 1 and y 0 y y 0 + 1 as follows. Define F 00 = F (x 0, y 0 ), F 10 = F (x 0 + 1, y 0 ), F 01 = F (x 0, y 0 + 1), and F 11 = F ( x 0 + 1, y 0 + 1). Define dx = x x 0 and dy = y y 0 ; then F (x, y) = F 00 (1 dx)(1 dy) + F 01 (1 dx)dy + F 10 dx(1 dy) + F 11 dxdy. Given a level value L and a square in the decomposition, each vertex value F satisfies F < L, F = L, or F > L, for a total of 81 possibilities for the square. These possibilities can be partitioned into topologically distinct cases, each case having at most 8 permutations. Tables 2, 3, and 4 show the cases and permutations. 4

Table 2. Some cases and permutations for level sets of F on a square. case 0 1 2 3 4 5 0 + + ++ 0 + ++ 00 + + 0 + 0+ 000+ 0000 1 +0 + + +00+ +0 + 0 00 + 0 2 + + 0+ + + 00 0 0 0 + 00 3 + + +0 0 + +0 0 0 +000 4 0 00 0 + 0 000 5 0 00 +0 0 00 0 6 0 00 0 0+ 0 00 7 0 0 0 0 + 0 000 5

Table 3. Some cases and permutations for level sets of F on a square. case 6 7 8 9 10 11 0 0 + 0 + + + + + 0 + + 00 + 1 0 + 0 + + + + + +0 + 00+ 2 0+ + 0+ + ++ + 0+ + 00 3 + 0 + + 0 + + + + +0 0 + 0 4 0 ++ 0 + + ++ 0 + 00 + 5 +0 + +0 + ++ 0 + +00 6 + + 0 + 0 + + + + 0 + 00 7 + +0 +0 + + + + 0 0 +0 Table 4. Last case and permutations for level sets of F on a square. The three cases depend on the relative values of the x-coordinates of the points. case 12 0 + + 1 + + The vertex ordering is shown in the figure for case 0 and is the same ordering for the figures of the remaining cases. Permutation 0 refers to that ordering. For example, case 10 and permutation 0 indicates that vertex 0 has zero value, vertex 1 has positive value, vertex 2 has negative value, and vertex 3 has positive value. As in the linear interpolation, some permutations are effectively the same as others. The total number of distinct cases is 41. Figure 3 shows a gray scale image with integers in the range [0, 1023]. The left image shows the original image superimposed with the vertex locations for level set 512. The right image shows a subimage superimposed 6

with level sets. The edges from the level set extraction are drawn in green. The vertices are drawn in red. Figure 3. Image and subimage with superimposed level sets from bilinear interpolation. 7