Digital Image Processing Lecture 12: Image Topology

Slides:



Advertisements
Similar presentations
Image Processing Ch2: Digital image Fundamentals Part 2 Prepared by: Tahani Khatib.
Advertisements

8.3 Representing Relations Connection Matrices Let R be a relation from A = {a 1, a 2,..., a m } to B = {b 1, b 2,..., b n }. Definition: A n m  n connection.
Binary Image Analysis Selim Aksoy Department of Computer Engineering Bilkent University
電腦視覺 Computer and Robot Vision I Chapter2: Binary Machine Vision: Thresholding and Segmentation Instructor: Shih-Shinh Huang 1.
Some Basic Morphological Algorithm
Image Topology ( Part 3 ) Dr. Bai-ling Zhang School of Computer Science & Mathematics Victoria University of Technology SCM3511 Image Processing 2, Week.
CSSE463: Image Recognition Day 3 Announcements/reminders: Announcements/reminders: Lab 1 should have been turned in yesterday (due now if use a late day).
September 10, 2013Computer Vision Lecture 3: Binary Image Processing 1Thresholding Here, the right image is created from the left image by thresholding,
Digital Image Processing, 2nd ed. © 2002 R. C. Gonzalez & R. E. Woods Chapter 9 Morphological Image Processing Chapter 9 Morphological.
Morphology Structural processing of images Image Processing and Computer Vision: 33 Morphological Transformations Set theoretic methods of extracting.
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.
EE465: Introduction to Digital Image Processing 1 What is in Common?
Copyright © 2012 Elsevier Inc. All rights reserved.. Chapter 9 Binary Shape Analysis.
1 Image Processing(IP) 1. Introduction 2. Digital Image Fundamentals 3. Image Enhancement in the spatial Domain 4. Image Enhancement in the Frequency Domain.
Digital Image Processing
Spatial transformations
Digital Image Processing
Machine Vision for Robots
Lecture 06 Binary Image Analysis Lecture 06 Binary Image Analysis Mata kuliah: T Computer Vision Tahun: 2010.
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.
September 23, 2014Computer Vision Lecture 5: Binary Image Processing 1 Binary Images Binary images are grayscale images with only two possible levels of.
Digital Image Processing CCS331 Relationships of Pixel 1.
Digital Image Processing Lecture 18: Segmentation: Thresholding & Region-Based Prof. Charlene Tsai.
Introduction Image geometry studies rotation, translation, scaling, distortion, etc. Image topology studies, e.g., (i) the number of occurrences.
Digital Image Fundamentals Faculty of Science Silpakorn University.
1 Closures of Relations: Transitive Closure and Partitions Sections 8.4 and 8.5.
1 Regions and Binary Images Hao Jiang Computer Science Department Sept. 25, 2014.
Digital Image Processing Lecture 16: Segmentation: Detection of Discontinuities Prof. Charlene Tsai.
1 Euler Number Computation By Kishore Kulkarni (Under the Guidance of Dr. Longin Jan Latecki)
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)
Digital Topology CIS 601 Fall 2004 Longin Jan Latecki.
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.
Some Basic Relationships Between Pixels Definitions: –f(x,y): digital image –Pixels: q, p –Subset of pixels of f(x,y): S.
State space search Represented by a four-tuple [N,A,S,GD], where: N is the problem space A is the set of arcs (or links) between nodes. These correspond.
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.
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.
Image Processing Chapter(3) Part 1:Relationships between pixels Prepared by: Hanan Hardan.
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.
Image Sampling and Quantization
Some Basic Relationships Between Pixels
Digital Image Processing Lecture 15: Morphological Algorithms April 27, 2005 Prof. Charlene Tsai.
图像处理技术讲座(3) Digital Image Processing (3) Basic Image Operations
Digital Image Processing Lecture 13: Image Topology - Skeletonization
Binary Image Analysis Gokberk Cinbis
Mathematical Structures for Computer Science Chapter 6
Computer Vision Lecture 5: Binary Image Processing
T490 (IP): Tutorial 2 Chapter 2: Digital Image Fundamentals
Morphological Operations
CS Digital Image Processing Lecture 5
Pixel Relations.
Binary Image processing بهمن 92
Computer and Robot Vision I
CSC 381/481 Quarter: Fall 03/04 Daniela Stan Raicu
Computer and Robot Vision I
Department of Computer Engineering
Digital Image Processing
Digital Image Processing Lecture 15: Morphological Algorithms
Computer and Robot Vision I
Computer and Robot Vision I
Computer and Robot Vision I
Presentation transcript:

Digital Image Processing Lecture 12: Image Topology Prof. Charlene Tsai

A region with 3 connected components (objects) Introduction Definition: The study of properties of a figure that are unaffected by any deformation, as long as there is no tearing or joining of the figure. A region with 3 connected components (objects) A region with 2 holes

Another example How many bacteria here?

Neighbors and Adjacency We often have interests in classifying pixels into different categories Neighbourhoods: Two pixels P and Q are 4-adjacent if they are 4-neighbours of one another, and 8-adjacent if they are 8-neighbours of one another. 4 4-nghbr 8 8-nghbr • P • P 4-adjacent 8-adjacent

Paths Suppose that P and Q are any two pixels (not necessarily adjacent), and suppose P and Q can be joined by a sequence of pixels as shown: If the path contains only 4-adjacent pixels, then P, Q are 4-connected. If the path contains 8-adjacent pixels, then P and Q are 8-connected 4-adjacent 8-adjacent 4-connected 8-connected

Components A set of pixels all of which are 4-connected to each other is called a 4-component; if all the pixels are 8-connected the set is an 8-component. One 8-component 4-component 4-component

Formal Definition of a Path A 4-path from P to Q is a sequence of pixels P = p0, p1, p2, …, pn = Q such that for each i=0,1,…, n-1, pixel pi is 4-adjacent to pixel pi+1. An 8-path is where the pixels in the sequence connecting P and Q are 8-adjacent

Properties of Connectivity – Equivalence Relations A relation x~y between two objects x and y is an equivalence relation if the relation is Reflexive: Symmetric: Transitive: Examples for equivalence relation? Examples that are not equivalence relation?

Equivalence Relations Some examples: Numeric equality Set cardinality Connectedness Examples of some relations which are not equivalence: Personal relations Subset relation Pixel adjacency The importance of the equivalence relation concept is that it allows us a very neat way of dealing with issues of connectedness. Equivalence class: the set of all objects equivalent to each other.

Connected Component Labelling Define the components of a binary image as being the equivalence classes of the connectedness equivalence relation. Finding all equivalence classes of connected pixels in a binary image is called connected component labelling. The result of connected component labeling is another image in which everything in one connected region is labelled "1" (for example), everything in another connected region is labelled "2", etc.

Connected Component Labelling (con’d) Labelling all the 4-components of a binary image, starting a the top left and working across and down. “Scan” the image row by row moving across from left to right. Assign labels to pixels in the image; these labels will be the numbers of the components of the image. A pixel in the image will be called a foreground pixel (fp); a pixel not in the image will be called a background pixel (bp).

Connected Component Labeling: Algorithm Check the state of p. If it is a bp, move on to the next scanning position. If it is fp, check the state of u and l. If they are both bp, assign p a new label. If only one of u and l are fp, assign the label to p If both u and l are fp, but different labels, assign either label to p, and make the 2 labels equivalent. At the end of the scan, all foreground pixels have been labelled, but some labels may be equivalent. Then sort the labels into equivalence classes, and assign a different label to each class. Do a second pass through the image, replacing the label on each foreground pixel with the label assigned to its equivalence class in the previous step u l p

Example 1 Step 1. First foreground pixel in 2nd row Upper neighbor : background Left neighbor : non-existent The first foreground pixel Upper neighbor : non-existent Left neighbor : background Step 1. 2nd foreground pixel in 2nd row Upper neighbor : foreground Left neighbor : foreground 3rd foreground pixel in 2nd row Upper neighbor : background Left neighbor : background

Step 2. We have the following equivalent classes of labels 1st foreground pixel in 3rd row: Upper neighbor :foreground ( label 3) Left neighbor : foreground (label 4) 1st foreground pixel in 3rd row: Upper neighbor :background Left neighbor : background Step 2. We have the following equivalent classes of labels {1,2} and {3, 4,5} Assign label 1 to the first class, and label 2 to the second class Step 3. Each pixel with labels 1 or 2 from the first step will be assigned label 1, and each pixel with labels 3, 4, or 5 from the first step will be assigned label 2

Example 2 Original Binary image Pass 1: Pass 2:

Example 3 Original Binary image Pass 1: Pass 2:

Matlab bwlabel Function Syntax: Description: L = bwlabel(BW,n) returns a matrix L, of the same size as BW, containing labels for the connected objects in BW. n can have a value of either 4 or 8, where 4 specifies 4-connected objects and 8 specifies 8-connected objects (defaults to 8). The elements of L are integer values greater than or equal to 0. The pixels labeled 0 are the background. The pixels labeled 1 make up one object, the pixels labeled 2 make up a second object, and so on. [L,num] = bwlabel(BW,n) returns in num the number of connected objects found in BW. See the supplemental notes on using lookup table. L = bwlabel(BW,n) [L,num] = bwlabel(BW,n)

Distances and Metrics A distance function d(x,y) is called a metric if it satisfies the following: 1. 2. 3. A standard distance metric is Euclidean distance (a straight line between 2 points) where

Distance Metrics for Grid The Euclidean distance is For 4-path and 8-path?

The Distance Transform How to find the distance of every pixel from a region R? A well-known method is Chamfering Algorithm: Given: subset S of image Initialization: elements of S contain 0, and for others. Step1: Row by row, from top to bottom and left to right: Step2: Row by row, from bottom to top and right to left:

Masks for Chamfering Mask1: Mask2: 3-4 chamfer (most popular) 1 1 4 3 1 Forward mask, Mf Backward mask, Mb 4 3 3 4 Forward mask, Mf Backward mask, Mb

Masks for Chamfering (con’d) 11 7 5 5 11 7 Forward mask, Mf Backward mask, Mb

Example Initialization: (using 3-4 chamfer) Step1: ??? Step2: ??? 4 3 Initialization: (using 3-4 chamfer) Step1: ??? Step2: ??? 4 3 fw bw

Summary We discussed Neighbors and Adjacency Definition of path Equivalence relation Component labeling Distance metrics Euclidean distance Metrics for 4- and 8-path Chamfering