15- 1 11.1 Introduction Image geometry studies rotation, translation, scaling, distortion, etc. Image topology studies, e.g., (i) the number of occurrences.

Slides:



Advertisements
Similar presentations
Divide and Conquer. Subject Series-Parallel Digraphs Planarity testing.
Advertisements

Document Image Processing
電腦視覺 Computer and Robot Vision I Chapter2: Binary Machine Vision: Thresholding and Segmentation Instructor: Shih-Shinh Huang 1.
Digital Image Processing Lecture 12: Image Topology
Each pixel is 0 or 1, background or foreground Image processing to
Image Topology ( Part 3 ) Dr. Bai-ling Zhang School of Computer Science & Mathematics Victoria University of Technology SCM3511 Image Processing 2, Week.
Image Thinning Aria Rajasa Masna – Charles Gunawan – Rama Pandugita – Suluh Legowo –
September 10, 2013Computer Vision Lecture 3: Binary Image Processing 1Thresholding Here, the right image is created from the left image by thresholding,
Objective of Computer Vision
Objective of Computer Vision
1 © 2010 Cengage Learning Engineering. All Rights Reserved. 1 Introduction to Digital Image Processing with MATLAB ® Asia Edition McAndrew ‧ Wang ‧ Tseng.
1 © 2010 Cengage Learning Engineering. All Rights Reserved. 1 Introduction to Digital Image Processing with MATLAB ® Asia Edition McAndrew ‧ Wang ‧ Tseng.
Copyright © 2012 Elsevier Inc. All rights reserved.. Chapter 9 Binary Shape Analysis.
E.G.M. PetrakisBinary Image Processing1 Binary Image Analysis Segmentation produces homogenous regions –each region has uniform gray-level –each region.
Chapter 1 Section 1.2 Echelon Form and Gauss-Jordan Elimination.
CS 450: Computer Graphics REVIEW: OVERVIEW OF POLYGONS
Digital Image Processing
Spatial transformations
Digital Image Processing
CS 6825: Binary Image Processing – binary blob metrics
Digital Image Fundamentals II 1.Image modeling and representations 2.Pixels and Pixel relations 3.Arithmetic operations of images 4.Image geometry operation.
Chapter 9. Chapter Summary Relations and Their Properties n-ary Relations and Their Applications (not currently included in overheads) Representing Relations.
TCP Traffic and Congestion Control in ATM Networks
September 23, 2014Computer Vision Lecture 5: Binary Image Processing 1 Binary Images Binary images are grayscale images with only two possible levels of.
CSCI 115 Chapter 7 Trees. CSCI 115 §7.1 Trees §7.1 – Trees TREE –Let T be a relation on a set A. T is a tree if there exists a vertex v 0 in A s.t. there.
Digital Image Processing CCS331 Relationships of Pixel 1.
Digital Camera and Computer Vision Laboratory Department of Computer Science and Information Engineering National Taiwan University, Taipei, Taiwan, R.O.C.
Digital Camera and Computer Vision Laboratory Department of Computer Science and Information Engineering National Taiwan University, Taipei, Taiwan, R.O.C.
CSE554Fairing and simplificationSlide 1 CSE 554 Lecture 6: Fairing and Simplification Fall 2012.
1 Regions and Binary Images Hao Jiang Computer Science Department Sept. 24, 2009.
CS654: Digital Image Analysis Lecture 5: Pixels Relationships.
CS 376b Introduction to Computer Vision 02 / 11 / 2008 Instructor: Michael Eckmann.
CS654: Digital Image Analysis Lecture 4: Basic relationship between Pixels.
Digital Image Processing Lecture 12: Image Topology (Suppl)
Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley. Ver Chapter 13: Graphs Data Abstraction & Problem Solving with C++
Digital Topology CIS 601 Fall 2004 Longin Jan Latecki.
Chapter 8: Relations. 8.1 Relations and Their Properties Binary relations: Let A and B be any two sets. A binary relation R from A to B, written R : A.
Nottingham Image Analysis School, 23 – 25 June NITS Image Segmentation Guoping Qiu School of Computer Science, University of Nottingham
CS 376b Introduction to Computer Vision 02 / 12 / 2008 Instructor: Michael Eckmann.
1 Overview representing region in 2 ways in terms of its external characteristics (its boundary)  focus on shape characteristics in terms of its internal.
Some Basic Relationships Between Pixels Definitions: –f(x,y): digital image –Pixels: q, p –Subset of pixels of f(x,y): S.
Digital Image Processing Lecture 13: Image Topology - Skeletonization Prof. Charlene Tsai.
1 © 2010 Cengage Learning Engineering. All Rights Reserved. 1 Introduction to Digital Image Processing with MATLAB ® Asia Edition McAndrew ‧ Wang ‧ Tseng.
Digital Camera and Computer Vision Laboratory Department of Computer Science and Information Engineering National Taiwan University, Taipei, Taiwan, R.O.C.
Digital Image Processing, 3rd ed. © 1992–2008 R. C. Gonzalez & R. E. Woods Gonzalez & Woods Chapter 11 Representation and.
Course 3 Binary Image Binary Images have only two gray levels: “1” and “0”, i.e., black / white. —— save memory —— fast processing —— many features of.
Chapter 6 Skeleton & Morphological Operation. Image Processing for Pattern Recognition Feature Extraction Acquisition Preprocessing Classification Post.
Image Processing Chapter(3) Part 1:Relationships between pixels Prepared by: Hanan Hardan.
Morphological Image Processing
Relationship between pixels Neighbors of a pixel – 4-neighbors (N,S,W,E pixels) == N 4 (p). A pixel p at coordinates (x,y) has four horizontal and vertical.
Digital Image Processing CCS331 Relationships of Pixel 1.
Sheng-Fang Huang Chapter 11 part I.  After the image is segmented into regions, how to represent and describe these regions? ◦ In terms of its external.
Digital Camera and Computer Vision Laboratory Department of Computer Science and Information Engineering National Taiwan University, Taipei, Taiwan, R.O.C.
Image Sampling and Quantization
Some Basic Relationships Between Pixels
Graphing Linear Equations and Inequalities
IT472: Digital Image Processing
Digital Image Processing Lecture 13: Image Topology - Skeletonization
HIT and MISS.
Fill Area Algorithms Jan
Mean Shift Segmentation
Computer Vision Lecture 5: Binary Image Processing
Binary Image processing بهمن 92
Computer and Robot Vision I
Computer and Robot Vision I
Department of Computer Engineering
Digital Image Processing
Computer and Robot Vision I
Computer and Robot Vision I
Computer and Robot Vision I
Presentation transcript:

Introduction Image geometry studies rotation, translation, scaling, distortion, etc. Image topology studies, e.g., (i) the number of occurrences of a particular object, (ii) whether or not there are holes, etc. Chapter 11: Image Topology

Neighbors and Adjacency 4-neighbor 8-neighbor Two pixels are 4-adjacent if they are 4-neighbors of each other and 8-adjacent if they are 8-neighbors of each other. 4-adjacent 8-adjacent

Paths and Components If a path from P to Q contains only 4-adjacent pixels, then P and Q are 4-connected. If contains 8-adjacent pixels, then 8-connected.

15- 4 Two 4-component One 8-component e.g., How many 4-components and 8-components are inthe following figure? A set of pixels, all of which are 4-connected to each other, forms a 4-component. If all the pixels are 8-connected, the set forma an 8-component.

path: a sequence of pixels such that for each is 4-adjacent to. 8-path: the pixels in the sequence connecting P and Q are 8-adjacent Equivalent Relations Relation x ∼ y is an equivalence relation if it is (i) Reflexive, x ∼ x for all x, (ii) Symmetric, x ∼ y ⇐⇒ y ∼ x for all x and y, (iii) Transitive, if x ∼ y, y ∼ z, then x ∼ z for all x, y, and z

15- 6 Examples of relations that are not equivalence ones (1) Personal relations, (2) Pixel adjacency (3) Subset relation Examples of equivalence relations: (i) Numeric equality – if x and y are two numbers for which x = y (ii) Divisor – if x and y have the same remainder when divided by a divisor (iii) Set cardinality – if S and T are two sets with the same number of elements (iv) Connectedness – if P and Q are two connected pixels

Component Labeling Equivalence class: the set of all objects that are equivalent to each other Connected component: an equivalence class of connectedness equivalence relation An algorithm for labeling 4-components of a binary image

If p is a background pixel, move to the next pixel, Otherwise, (a) if both u and l are background pixels, assign a new label to p (b) if one of u and l is a foreground pixel, assign its label to p (c) if both u and l are foreground pixels and have the same label, assign that label to p (d) if both u and l are foreground pixels but have different labels, assign either of those label to p and make a note that those two labels are equivalent.

Sort the labels into equivalent classes and assign a different label to each. 3. Do a second pass through the image, replacing the label on each foreground pixel with the label assigned to its equivalent class. Example: Step 1. We start moving along the top row. The first foreground pixel is the dot in the second place, and since its upper and left neighbors are either background pixels or nonexistent, we assign it the label 1.

Step 2. We have the following equivalence classes of labels: {1,2 } and {3,4,5}. Assign label 1 to the first class and label 2 to the second class.

Modified step 1: If p is a background pixel, move to the next pixel, Otherwise, (a) if d, u, e and l are background pixels, assign a new label to p (b) if one of them is a foreground pixel, assign its label to p (c) if two or more are foreground pixels, assign any of their labels to p and make a note that all their labels are equivalent. Step 1 of the above algorithm can be modified for labeling 8-components of a binary image

Boundary Detection Boundary detection by lookup table. Considering the 3 by 3 neighborhood of a foreground pixel, there are different neighborhoods. A lookup table is a binary vector of length 512, each entry (either 0 or 1) representing the result of boundary detection of the neighborhood of a foreground pixel.

weight matrix Define The value of a neighborhood is obtained by adding the weights of 1-valued pixels, e.g.,

The value then serves as the index to the lookup table. The foreground pixel under consideration is a boundary pixel if the entry of the lookup table indexed by the value is 1.

Distances and Metrics A distance function d(x, y) is called a metric if it satisfies the following: (i) d(x, y) = d(y, x) (symmetry) (ii) d(x, y) ≥ 0 and d(x, y) = 0 iff x = y (positivity) (iii) d(x, y) + d(y, z) ≤ d(x, z) (the triangle inequality) e.g.,

The Distance Transform 1.Attach to each pixel (x, y) a value d(x, y), giving its distance from a region R. Start with assigning each pixel in R with 0 and each pixel not in R with ∞ 2. Travel through the image pixel by pixel. For each pixel (x, y) replace its label with min{d(x, y), d(x + 1, y) + 1, d(x − 1, y) + 1, d(x, y − 1) + 1, d(x, y + 1) + 1} 3. Repeat Step 2 until all values have been converted to finite values

using a mask: Example: Consider min{d(x, y), d(x + 1, y) + 1, d(x − 1, y) + 1, d(x, y − 1) + 1, d(x, y + 1) + 1}

Another mask: Divide all values by 3

Another mask:

Two-pass method: (i) The first pass starts at the top left of the image and moves left to right, top to bottom (ii) The second pass starts at the bottom right of the image and moves right to left, from bottom to top

Mask 3 Examples:

Skeletonization Skeleton consists of lines and curves which provide Information about the size and shape of an object.

Definition: the skeleton of an object is the medial axis of the object. A pixel is on the medial axis if it is equidistant from at least two boundary pixels of the object.

Problem: Very small changes to an object can result in large changes to the skeleton.

Topological methods consider skeletonization by iteratively removing deletable pixels Deletable pixels: the pixels that can be deleted without changing (i) the connectivity of an object, (ii) the number of components, (iii) the number of holes, or (iv) the relationship of objects and holes. Nondeletable pixels: (i)

(ii) (iii)

simple: a pixel that can be deleted without changing the 4-connectivity of the object 8-simple: a pixel that can be deleted without changing the 8-connectivity of the object Examples: The central pixel is neither 4-simple nor 8-simple The central pixel is 8-simple but not 4-simple

Check to see whether a foreground pixel p is 4-simple or 8-simple. Define : the 3 by 3 neighborhood of p A(p) : #4-components in C(p) : #8-components in B(p) : #foreground pixels in : the 3 by 3 neighborhood excluding p e.g.,

Example: A foreground pixel p is 4-simple, iff, A(p) = 1 and is 8-simple, iff, C(p) = 1. Since A(p) = 2, p is not 4-simple. Since C(p) = 1, the central pixel p is 8-simple.

Calculating A(p) and C(p) Crossing number X(p): the number of times a 0 is followed by a 1 as traversing clockwise the 8-neighbors of p. If X(p) = 1, then A(p) = 1 and p is 4-simple. e.g., X(p) = 2 X(p) = 1X(p) = 3

How to do Skeletonization At each step, find foreground pixels that are 4-simple and delete them. Drawback: In some cases, objects may be removed completely, e.g.,

The Zhang-Suen Skeletonization Algorithm Deletability test: In Step N, flag a foreground pixel p to be deletable if 1. 2 ≤ B(p) ≤ 6, 2. X(p) = 1, 3. If N is odd, then p 2 · p 4 · p 6 = 0, p 4 · p 6 · p 8 = 0 If N is even, then p 2 · p 4 · p 8 = 0, p 2 · p 6 · p 8 = 0 or 3. If N is odd, then p4 = 0 or p6 = 0 or p2 = p8 = 0 If N is even, then p2 = 0 or p8 = 0 or p4 = p6 = 0

Or rephrase as For odd iterations, delete only pixels that are on the right-hand side, or bottom of an object, or on a northwest corner For even iterations, delete only pixels that are on the left-hand side, or top of an object, or on a southeast corner e.g.,

Example:

15- 35

The Guo-Hall Skeletonization Algorithm Imagine the image grid being labeled with 1s and 2s in a chessboard configuration: At step one, consider only foreground pixels whose labels are 1. At step two, consider only foreground pixels whose labels are 2. Continue alternating between pixels labeled 1 and those labeled 2 from step to step until no more deletions are possible.

Algorithm: 1. Flag a foreground pixel p as deletable if C(p) = 1 and B(p) > 1, 2. Delete all flagged pixels, 3. Continue until no deletions are possible. Example: Superimpose a chessboard of 1s and 2s. Step 1: Delete only those 1s satisfying the Guo-Hall deletablity conditions

Step 2: Step 3:

Example: Real images Step 4:

Skeletonization Using the Distance Transform The distance transform can be used to provide the skeleton of a region R Example: Input Distance Transform of negative (?)

Example: Real image