Top Banner
Presentation by:
21
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: distance transform 21

Presentation by:

Page 2: distance transform 21

Introduction

• A distance transform is a representation of a distance function to an object, as an image.

• It is also known as distance map or distance field.

Page 3: distance transform 21

Basics

• A connected space is a topological space which cannot be represented as the disjoint union of two or more nonempty open subsets.

• We often call a connected space an “object”.

Page 4: distance transform 21

Euclidean distance

• The Euclidean distance or Euclidean metric is the "ordinary" distance between two points that one would measure with a ruler, which can be proven by repeated application of the Pythagorean theorem.

• In Euclidean n-space, it is defined as:

√(∑(xi -yi )^2

Page 5: distance transform 21

Geodesic distance

• the distance between two vertices in a graph is the number of edges in a shortest path connecting them.

• to determine a geodesic distance in a connected space of this image:

each point - node of a graph,

each linkage - an arc

Page 6: distance transform 21

Comparison between Euclidean & Geodesic distances

Page 7: distance transform 21

Manhattan distance

• It is also known as rectilinear distance, L1 distance or city block distance.

• D = |x1 – x2 | + |y1 - y2|

• The red, blue, and yellow lines

have the same length (12) using

both Euclidean and Manhattan

distance.

• Using Euclidean geometry, the green

line is the unique shortest path.

Page 8: distance transform 21

Chessboard Distance

• The chessboard distance is a metric defined on a vector space where the distance between two vectors is the greatest of their differences along any coordinate dimension.

• The chessboard distance is the

number of moves a king requires

to move between spaces.

Page 9: distance transform 21

Distance map

• A distance transform, also known as distance map or distance field, is a derived representation of a digital image.

• The distance map labels each pixel of the image with the distance to the nearest obstacle pixel.

• A most common type of obstacle pixel is a boundary pixel in a binary image.

Page 10: distance transform 21

• Usually the transform/map is qualified with the chosen metric.

• Common metrics are:

Euclidean distance

Taxicab geometry, also known as City block distance or Manhattan distance

Chessboard distance

Page 11: distance transform 21

Chessboard distance transform on a binary image

Page 12: distance transform 21

Manhattan distance transform on a binary image

Binary input image.Black is background, white is object.

Output distance map using Manhattan distance.

Page 13: distance transform 21

Applications

Applications are

• digital image processing (e.g., blurring effects, skeletonising)

• motion planning in robotics

• path finding

Page 14: distance transform 21

Skeleton ExtractionShape -> DT -> Medial Axis

• The medial axis of an object is the set of all points having more than one closest point on the object's boundary.

• It is a tool for biological shape recognition.

Page 15: distance transform 21

Illustrations

The binary image when a distance transform is applied (scaled by a factor of 5) :

Page 16: distance transform 21

The distance transform is sometimes very sensitive to small changes in the object.

Page 17: distance transform 21

• This can be of advantage when we want to distinguish between similar objects like the two different rectangles above.

• However, it can also cause problems when trying to classify objects into classes of roughly the same shape.

• It also makes the distance transform very sensitive to noise.

Page 18: distance transform 21

Real world image -> Binary Image -> Distance Map

real world image

threshold the image at a value of 100

The scaled (factor 6) distance transform

Page 19: distance transform 21

What we learn from the illustration

• Distance transform gives a rough measure for the width of the object at each point.

• But is quite inaccurate at places where the object is incorrectly segmented from the background.

• Also the binary input image must be a good representation of the object that we want to process.

• Simple thresholding is often not enough. It might be necessary to further process the image before applying the distance transform.

Page 20: distance transform 21

References

• Technical Report on Distance Transform by Etienne Folio

• Distance Transform by David Coeurjolly

• HIPR2 Image Processing Learning Resources

• http://www.desmith.com/MJdS/DT1.htm

• http://www.cs.auckland.ac.nz/~rklette/TeachAuckland.html/mm/MI30slides.pdf

• http://www.tele.ucl.ac.be/PEOPLE/OC/these/node10.html#eq:def_chamfer34

Page 21: distance transform 21

Thank You