Algorithms for Picture Analysis. Lecture 07: Metrics. Axioms of a Metric

Similar documents
University of Florida CISE department Gator Engineering. Clustering Part 1

Data Mining: Data. Lecture Notes for Chapter 2. Introduction to Data Mining

Metrics: Growth, dimension, expansion

Well-Ordering Principle. Axiom: Every nonempty subset of Z + has a least element. That is, if S Z + and S, then S has a smallest element.

Math 320-2: Midterm 2 Practice Solutions Northwestern University, Winter 2015

Iowa State University. Instructor: Alex Roitershtein Summer Exam #1. Solutions. x u = 2 x v

Immerse Metric Space Homework

Chapter 3. Riemannian Manifolds - I. The subject of this thesis is to extend the combinatorial curve reconstruction approach to curves

(x, y) = d(x, y) = x y.

MATH 434 Fall 2016 Homework 1, due on Wednesday August 31

Mid Term-1 : Practice problems

Mathematics for Economists

Introduction to Real Analysis

Theorems. Theorem 1.11: Greatest-Lower-Bound Property. Theorem 1.20: The Archimedean property of. Theorem 1.21: -th Root of Real Numbers

MA677 Assignment #3 Morgan Schreffler Due 09/19/12 Exercise 1 Using Hölder s inequality, prove Minkowski s inequality for f, g L p (R d ), p 1:

Course 212: Academic Year Section 1: Metric Spaces

Lecture 5 - Hausdorff and Gromov-Hausdorff Distance

Set, functions and Euclidean space. Seungjin Han

A LITTLE REAL ANALYSIS AND TOPOLOGY

Let x be an approximate solution for Ax = b, e.g., obtained by Gaussian elimination. Let x denote the exact solution. Call. r := b A x.

Data Preprocessing. Cluster Similarity

Complete Induction and the Well- Ordering Principle

CS360 Homework 12 Solution

Definition 2.1. A metric (or distance function) defined on a non-empty set X is a function d: X X R that satisfies: For all x, y, and z in X :

Analysis Finite and Infinite Sets The Real Numbers The Cantor Set

Making Nearest Neighbors Easier. Restrictions on Input Algorithms for Nearest Neighbor Search: Lecture 4. Outline. Chapter XI

Math 54 - HW Solutions 5

Introduction to Real Analysis Alternative Chapter 1

Axioms for the Real Number System

IE 521 Convex Optimization Homework #1 Solution

Continuous extension in topological digital spaces

Real Analysis Math 131AH Rudin, Chapter #1. Dominique Abdi

Curvature of Digital Curves

Hyperbolic metric spaces and their applications to large complex real world networks II

Discrete Applied Mathematics. Weighted distances based on neighborhood sequences for point-lattices

Lecture 2: A crash course in Real Analysis

Chapter 2 Metric Spaces

Numerical Sequences and Series

Some Background Material

We want to show P (n) is true for all integers

LECTURE 15: COMPLETENESS AND CONVEXITY

Data preprocessing. DataBase and Data Mining Group 1. Data set types. Tabular Data. Document Data. Transaction Data. Ordered Data

7 Distances. 7.1 Metrics. 7.2 Distances L p Distances

MATH 31BH Homework 1 Solutions

Introduction to Proofs

ANALYSIS WORKSHEET II: METRIC SPACES

MATH 4200 HW: PROBLEM SET FOUR: METRIC SPACES

Your first day at work MATH 806 (Fall 2015)

Basics and Random Graphs con0nued

Contents Ordered Fields... 2 Ordered sets and fields... 2 Construction of the Reals 1: Dedekind Cuts... 2 Metric Spaces... 3

1 Spaces and operations Continuity and metric spaces Topological spaces Compactness... 3

1 Sequences and Summation

EXERCISES SHORTEST PATHS: APPLICATIONS, OPTIMIZATION, VARIATIONS, AND SOLVING THE CONSTRAINED SHORTEST PATH PROBLEM. 1 Applications and Modelling

CMSC 422 Introduction to Machine Learning Lecture 4 Geometry and Nearest Neighbors. Furong Huang /

Lecture 10 September 27, 2016

Part IB GEOMETRY (Lent 2016): Example Sheet 1

Shortest paths with negative lengths

CS 372: Computational Geometry Lecture 14 Geometric Approximation Algorithms

2 Metric Spaces Definitions Exotic Examples... 3

Studying Rudin s Principles of Mathematical Analysis Through Questions. August 4, 2008

Module 1: Basics and Background Lecture 5: Vector and Metric Spaces. The Lecture Contains: Definition of vector space.

Euclidean Shortest Path Algorithm for Spherical Obstacles

MA651 Topology. Lecture 10. Metric Spaces.

Notion of Distance. Metric Distance Binary Vector Distances Tangent Distance

A metric space is a set S with a given distance (or metric) function d(x, y) which satisfies the conditions

Economics 204 Fall 2011 Problem Set 1 Suggested Solutions

Math General Topology Fall 2012 Homework 1 Solutions

Ball and Spindle Convexity with respect to a Convex Body

a + b = b + a and a b = b a. (a + b) + c = a + (b + c) and (a b) c = a (b c). a (b + c) = a b + a c and (a + b) c = a c + b c.

Linear Analysis Lecture 5

Properties of the Integers

Continuity. Matt Rosenzweig

Geometric View of Machine Learning Nearest Neighbor Classification. Slides adapted from Prof. Carpuat

Part III. 10 Topological Space Basics. Topological Spaces

a. Define a function called an inner product on pairs of points x = (x 1, x 2,..., x n ) and y = (y 1, y 2,..., y n ) in R n by

Convergence of a Generalized Midpoint Iteration

MATH 324 Summer 2011 Elementary Number Theory. Notes on Mathematical Induction. Recall the following axiom for the set of integers.

The Minimal Element Theorem

FUNCTIONAL ANALYSIS-NORMED SPACE

Course Summary Math 211

Test #1 Geometry MAT 4263

Quiz 2 Practice Problems

DIFFERENTIAL GEOMETRY, LECTURE 16-17, JULY 14-17

Chapter 11. Approximation Algorithms. Slides by Kevin Wayne Pearson-Addison Wesley. All rights reserved.

arxiv:cs/ v1 [cs.cg] 7 Feb 2006

Metric spaces and metrizability

2.2 Some Consequences of the Completeness Axiom

Verulam School Mathematics. Year 9 Revision Material (with answers) Page 1

Math 302 Outcome Statements Winter 2013

1. Let A R be a nonempty set that is bounded from above, and let a be the least upper bound of A. Show that there exists a sequence {a n } n N

Metric Spaces Lecture 17

Solutions BAPC October University of Amsterdam. Solutions BAPC 2017 October / 31

Multimedia Retrieval Distance. Egon L. van den Broek

Introduction to Topology

CSE 206A: Lattice Algorithms and Applications Spring Minkowski s theorem. Instructor: Daniele Micciancio

Data Mining: Data. Lecture Notes for Chapter 2. Introduction to Data Mining

Discrete Geometry. Problem 1. Austin Mohr. April 26, 2012

Error Detection and Correction: Small Applications of Exclusive-Or

Lebesgue Measure. Dung Le 1

MATH 614 Dynamical Systems and Chaos Lecture 6: Symbolic dynamics.

Transcription:

Axioms of a Metric Picture analysis always assumes that pictures are defined in coordinates, and we apply the Euclidean metric as the golden standard for distance (or derived, such as area) measurements. However, grids may create difficulties sometimes for applying the Euclidean metric, or may suggest to use alternative metrics. Let S be an arbitrary nonempty set. A function d : S S R is a distance function or metric on S iff it has the following properties: M1: For all p, q S, we have d(p, q) 0, and d(p, q) = 0 iff p = q (positive definiteness). M2: For all p, q S, we have d(p, q) = d(q, p) (symmetry). M3: For all p, q, r S, we have d(p, r) d(p, q) + d(q, r) (triangularity: the triangle inequality). If d is a metric on S, the pair [S, d] defines a metric space. Page 1 February 2005

Let [S, d] be a metric space, p S, and ɛ > 0. The set of points q S such that d(p, q) ε is called a ball of radius ε with center p (or a disk if S is planar), and is the ε-neighborhood of p in S. U ε (p) = {q : q S d(p, q) < ε} A subset M of S is called bounded iff it is contained in a ball of some finite radius. Euclidean Metric Euclidean space E n is defined with an orthogonal coordinate system; it is used to define a metric d e called the Euclidean metric: d e (p, q) = (x 1 y 1 ) 2 +... + (x n y n ) 2 where points p, q have coordinates (x 1,..., x n ) and (y 1,..., y n ). Theorem 1 d e is a metric on R n. Page 2 February 2005

A Degenerate Example Let S be a nonempty set, and we define that d b (p, q) = { 0 if p = q 1 otherwise [S, d b ] is a metric space (d b is the binary metric): M1: M2: M3: [S, d b ] is bounded: Bounded Metric Spaces [R n, d e ] are unbounded metric spaces. If [S, d] is an unbounded metric space, d (p, q) = d(p, q) 1 + d(p, q) defines a metric d on S, and [S, d ] is a bounded metric space. Page 3 February 2005

Integer-Valued Metrics Assume a real a: a, the largest integer less than or equal to a a, the smallest integer greater than or equal to a [a], the nearest integer to a if it is unique, and a otherwise For any function d : S S R, we can define d by d (p, q) = d(p, q) and similarly for d and [d]. Even if d is a metric, these integer-valued functions may not be metrics. Example: d e and [d e ] are not metrics on Z 2. Theorem 2 If d is a metric d is also a metric. Page 4 February 2005

Minkowski Metrics Minkowski metrics L m on R n, where L 2 = d e (Euclidean metric): L m (p, q) = x m 1 y 1 m +... + x n y n m (m = 1, 2,...) L (p, q) = max{ x 1 y 1,..., x n y n } where p = (x 1, x 2,..., x n ) and q = (y 1, y 2,..., y n ). Theorem 3 All the L m are metrics on R n, with L m1 (p, q) L m2 (p, q) for all 1 m 2 m 1 and all p, q R n. Relation to Grid Adjacencies L 1 (p, q) = x 1 y 1 +... + x n y n Two 2D grid points p 1 and p 2 are 4-adjacent iff L 1 (p 1, p 2 ) = 1 and 8-adjacent iff L (p 1, p 2 ) = 1. Two 3D grid points p 1 and p 2 are 6-adjacent iff L 1 (p 1, p 2 ) = 1 and 26-adjacent iff L (p 1, p 2 ) = 1. Page 5 February 2005

2D Grid Point Metrics Let p, q R 2, p = (x 1, y 1 ), q = (x 2, y 2 ), and d 4 (p, q) = x 1 x 2 + y 1 y 2 [R 2, d 4 ] is a metric space; d 4 is the Minkowski metric L 1. We call d 4 the city-block metric or Manhattan metric because, when we restrict it to Z 2, d 4 (p, q) is the minimal number of isothetic unit-length steps from p to q; it resembles a shortest walk in a city with streets that are laid out in an orthogonal grid pattern. Let p, q R 2, p = (x 1, y 1 ), and q = (x 2, y 2 ), and d 8 (p, q) = max{ x 1 x 2, y 1 y 2 } [R 2, d 8 ] is a metric space; d 8 is the Minkowski metric L. We call d 8 the chessboard metric because, when we restrict it to Z 2, d 8 (p, q) is the minimal number of moves from p to q by a king on a chessboard. Theorem 4 d 8 (p, q) d e (p, q) d 4 (p, q) 2 d 8 (p, q) for all p, q R 2 Page 6 February 2005

The city block, Euclidean, and chessboard unit disks in the real plane. We have U ε (p) = {p} for ε 1 and any of the metrics d e, d 4 and d 8 on Z 2, or for the binary metric (on any set). Metrics on grid cells are defined by identifying cells with their centers. The ε-neighborhoods for ε = 1, 2, 3, 4, and 5 in the 2D grid cell model defined by the city block (left), Euclidean (middle), and chessboard (right) metrics. For any grid point p, the smallest neighborhood of p in [Z 2, d α ] (α {4, 8}) is defined by N α (p) = {q Z 2 : d α (p, q) 1} Page 7 February 2005

3D Grid Point Metrics Let p, q R 3, p = (x 1, y 1, z 1 ), and q = (x 2, y 2, z 2 ), and d 6 (p, q) = L 1 (p, q) = x 1 x 2 + y 1 y 2 + z 1 z 2 d 26 (p, q) = L (p, q) = max{ x 1 x 2, y 1 y 2, z 1 z 2 } We also define d 18 (p, q) = max{d 26 (p, q), d 6 (p, q)/2 } For any grid point p, the smallest neighborhood of p in [Z 3, d α ] (α {6, 18, 26}) is defined by N α (p) = {q Z 3 : d α (p, q) 1} N α (p) {p} has cardinality α for α = 6, 18, and 26. Theorem 5 d 26 (p, q) d e (p, q) d 6 (p, q) 3 d 26 (p, q) for all p, q R 3, and d 26 (p, q) d 18 (p, q) d e (p, q) for all p, q Z 3 such that d e (p, q) 3. Page 8 February 2005

2D and 3D Geodesics A sequence ρ of grid points (p 0, p 1,..., p n ) such that p 0 = p, p n = q, and p i+1 is α-adjacent to p i (0 i n 1) is called an α-path of length n from p to q; p and q are called the endpoints of ρ. An α-path is called an α-geodesic if no shorter α-path with the same endpoints exists. Theorem 6 The length of a shortest α-path from p to q is d α (p, q). It follows that an α-path ρ of length n is an α-geodesic iff the d α -distance between the endpoints of ρ is n. In Euclidean space, there is a unique shortest arc between any two points p and q, which is namely the straight line segment pq. In a grid, there can be many shortest α-paths between two grid points, and these paths need not be digital straight line segments. Page 9 February 2005

2D and 3D Intrinsic Distances If S is an α-connected set of grid points, for any p, q S, there exists an α-path ρ = (p 0, p 1,..., p n ) from p 0 = p to p n = q such that the p i s are all in S. The length d S α(p, q) of a shortest such path is called the intrinsic α-distance in S from p to q. The α-eccentricity e S α(p) is the maximum of all d S α(p, q), q S. The intrinsic α-diameter d α (S) of S is the maximum intrinsic α-distance between any of its points. This is equal to the maximum α-eccentricity of all p S. If the intrinsic diameter of a connected set S of pixels or voxels is given by the intrinsic distance between p, q S, then both p and q are on the border of S. Page 10 February 2005

The intrinsic α-radius r α (S) of S is the minimum α-eccentricity of all p S. p is an α-central pixel or voxel in S iff e S α(p) = r α (S). The α-center C α (S) of S is the set of all α-central pixels or voxels in S. The intrinsic diameter of this 4-connected set is equal to the intrinsic 4-distance between pixels p and q. All the filled dots are 4-central pixels. C. Jordan showed in 1869 that the centre of a tree is either a single node or a pair of adjacent nodes. More examples of 4-centers. Centers of (larger) simply connected regions can be used to identify locations of these regions. Page 11 February 2005

Coursework Related material in textbook: Sections 1.2.1, 3.1.1, 3.1.2 (norms not needed), 3.1.4, 3.1.6, 3.2.1, and parts of 3.2.4. Do Exercise 2 on page 113. A.7. [5 marks] Implement a program which calculates the intrinsic diameter (with respect to 4-adjacency) of any simply 4-connected set of pixels. (Hints: only a subset of border pixels needs to be considered, and in graph theory you learned, for example, about Dijkstra s algorithm). Visualize results for 4-regions of varying shape complexity and size. Generate a diagram which summarizes the observed runtime of your algorithm depending on the size (in numbers of pixels) of used 4-regions. Optional [1 mark]: you may extend your program such that it also allows to calculate the 4-center of a given simply 4-connected set of pixels. Page 12 February 2005

Appendix: Center versus Centroid For a finite set S = {p 1,..., p n } of points in the plane, p i = (x i, y i ) for 1 i n, the centroid p c = (x c, y c ) is defined by the mean of all coordinates: x c = 1 n n x i and y c = 1 n i=1 n i=1 y i The centroid is unique, but in general not at a grid point position. The center may contain more than just one pixel, but all points in the center are at grid point position. Page 13 February 2005